diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.elf b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.elf index b034dc13..1366dbe5 100644 Binary files a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.elf and b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.elf differ diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.map b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.map index b107bef2..a53606d5 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.map +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.map @@ -44,9 +44,9 @@ Discarded input sections .bss.interruptNesting 0x00000000 0x1 ARM Flash Debug/../../obj/irq.o .text.IrqInterruptDisable - 0x00000000 0x6c ARM Flash Debug/../../obj/irq.o + 0x00000000 0x84 ARM Flash Debug/../../obj/irq.o .text.IrqInterruptRestore - 0x00000000 0x70 ARM Flash Debug/../../obj/irq.o + 0x00000000 0x88 ARM Flash Debug/../../obj/irq.o .text 0x00000000 0x0 ARM Flash Debug/../../obj/led.o .data 0x00000000 0x0 ARM Flash Debug/../../obj/led.o .bss 0x00000000 0x0 ARM Flash Debug/../../obj/led.o @@ -792,9 +792,9 @@ FLASH 0x00002000 0x0003e000 xr Linker script and memory map - 0x00003c44 __do_debug_operation = __do_debug_operation_dcc - 0x00002a10 __vfprintf = __vfprintf_int - 0x000034dc __vfscanf = __vfscanf_int + 0x00003d04 __do_debug_operation = __do_debug_operation_dcc + 0x00002ad0 __vfprintf = __vfprintf_int + 0x0000359c __vfscanf = __vfscanf_int 0xffe00000 __AHB_Peripherals_segment_start__ = 0xffe00000 0x00000000 __AHB_Peripherals_segment_end__ = 0x0 0xe0000000 __VPB_Peripherals_segment_start__ = 0xe0000000 @@ -900,7 +900,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .init is too large to fit in FLASH memory segment) 0x00002250 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x00002250 0x1ca8 +.text 0x00002250 0x1d68 0x00002250 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table) .glue_7 0x00000000 0x0 linker stubs @@ -911,105 +911,105 @@ Linker script and memory map 0x0000227c 0xb8 ARM Flash Debug/../../obj/boot.o 0x0000227c BootComInit .text.BootComCheckActivationRequest - 0x00002334 0xe8 ARM Flash Debug/../../obj/boot.o + 0x00002334 0x108 ARM Flash Debug/../../obj/boot.o 0x00002334 BootComCheckActivationRequest .text.UartReceiveByte - 0x0000241c 0x64 ARM Flash Debug/../../obj/boot.o + 0x0000243c 0x64 ARM Flash Debug/../../obj/boot.o .text.IrqGetCPSR - 0x00002480 0x28 ARM Flash Debug/../../obj/irq.o + 0x000024a0 0x28 ARM Flash Debug/../../obj/irq.o .text.IrqSetCPSR - 0x000024a8 0x24 ARM Flash Debug/../../obj/irq.o + 0x000024c8 0x24 ARM Flash Debug/../../obj/irq.o .text.IrqInterruptEnable - 0x000024cc 0x30 ARM Flash Debug/../../obj/irq.o - 0x000024cc IrqInterruptEnable - .text.LedInit 0x000024fc 0x3c ARM Flash Debug/../../obj/led.o - 0x000024fc LedInit + 0x000024ec 0x48 ARM Flash Debug/../../obj/irq.o + 0x000024ec IrqInterruptEnable + .text.LedInit 0x00002534 0x3c ARM Flash Debug/../../obj/led.o + 0x00002534 LedInit .text.LedToggle - 0x00002538 0xa8 ARM Flash Debug/../../obj/led.o - 0x00002538 LedToggle - .text.main 0x000025e0 0x1c ARM Flash Debug/../../obj/main.o - 0x000025e0 main - .text.Init 0x000025fc 0x1e8 ARM Flash Debug/../../obj/main.o + 0x00002570 0xb4 ARM Flash Debug/../../obj/led.o + 0x00002570 LedToggle + .text.main 0x00002624 0x4c ARM Flash Debug/../../obj/main.o + 0x00002624 main + .text.Init 0x00002670 0x218 ARM Flash Debug/../../obj/main.o .text.TimerInit - 0x000027e4 0x84 ARM Flash Debug/../../obj/timer.o - 0x000027e4 TimerInit + 0x00002888 0x90 ARM Flash Debug/../../obj/timer.o + 0x00002888 TimerInit .text.TimerUpdate - 0x00002868 0x2c ARM Flash Debug/../../obj/timer.o - 0x00002868 TimerUpdate + 0x00002918 0x2c ARM Flash Debug/../../obj/timer.o + 0x00002918 TimerUpdate .text.TimerSet - 0x00002894 0x2c ARM Flash Debug/../../obj/timer.o - 0x00002894 TimerSet + 0x00002944 0x2c ARM Flash Debug/../../obj/timer.o + 0x00002944 TimerSet .text.TimerGet - 0x000028c0 0x24 ARM Flash Debug/../../obj/timer.o - 0x000028c0 TimerGet + 0x00002970 0x24 ARM Flash Debug/../../obj/timer.o + 0x00002970 TimerGet .text.TIMER0_ISR - 0x000028e4 0x38 ARM Flash Debug/../../obj/vectors.o - 0x000028e4 TIMER0_ISR - *fill* 0x0000291c 0x4 00 + 0x00002994 0x44 ARM Flash Debug/../../obj/vectors.o + 0x00002994 TIMER0_ISR + *fill* 0x000029d8 0x8 00 .text.libc.memcpy - 0x00002920 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2_asm.o) - 0x00002920 memcpy + 0x000029e0 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2_asm.o) + 0x000029e0 memcpy .text.libc.strlen - 0x00002980 0x90 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2_asm.o) - 0x00002980 strlen + 0x00002a40 0x90 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2_asm.o) + 0x00002a40 strlen .text.libc.__vfprintf_int - 0x00002a10 0x8c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfprintf_int.o) - 0x00002a10 __vfprintf_int + 0x00002ad0 0x8c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfprintf_int.o) + 0x00002ad0 __vfprintf_int .text.libc.__ungetc - 0x000032d0 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) + 0x00003390 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) .text.libc.rd_int - 0x00003310 0x1cc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) + 0x000033d0 0x1cc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) .text.libc.__vfscanf_int - 0x000034dc 0x5a4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) - 0x000034dc __vfscanf_int + 0x0000359c 0x5a4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) + 0x0000359c __vfscanf_int .text.libc.__getc - 0x00003a80 0x4c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003a80 __getc + 0x00003b40 0x4c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003b40 __getc .text.libc.__putc - 0x00003acc 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003acc __putc + 0x00003b8c 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003b8c __putc .text.libc.__print_padding - 0x00003b38 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003b38 __print_padding + 0x00003bf8 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003bf8 __print_padding .text.libc.__pre_padding - 0x00003b74 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003b74 __pre_padding + 0x00003c34 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003c34 __pre_padding .text.libc.isupper - 0x00003b9c 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003b9c isupper + 0x00003c5c 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003c5c isupper .text.libc.islower - 0x00003bb0 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003bb0 islower + 0x00003c70 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003c70 islower .text.libc.isdigit - 0x00003bc4 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003bc4 isdigit + 0x00003c84 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003c84 isdigit .text.libc.__digit - 0x00003bd8 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003bd8 __digit + 0x00003c98 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003c98 __digit .text.libc.isspace - 0x00003c2c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003c2c isspace + 0x00003cec 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003cec isspace .text.libdebugio.__do_debug_operation_dcc - 0x00003c44 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v4t_a_le.a(libdebugio.o) - 0x00003c44 __do_debug_operation_dcc + 0x00003d04 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v4t_a_le.a(libdebugio.o) + 0x00003d04 __do_debug_operation_dcc .text.libc.__debug_io_lock - 0x00003c84 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) - 0x00003c84 __debug_io_lock + 0x00003d44 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) + 0x00003d44 __debug_io_lock .text.libc.__debug_io_unlock - 0x00003c88 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) - 0x00003c88 __debug_io_unlock - *fill* 0x00003c8c 0x4 00 + 0x00003d48 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) + 0x00003d48 __debug_io_unlock + *fill* 0x00003d4c 0x4 00 .text.libdebugio_dcc.libarm_dcc_read - 0x00003c90 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm.o) - 0x00003c90 libarm_dcc_read + 0x00003d50 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm.o) + 0x00003d50 libarm_dcc_read .text.libdebugio_dcc.libarm_dcc_write - 0x00003cb0 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm.o) - 0x00003cb0 libarm_dcc_write + 0x00003d70 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm.o) + 0x00003d70 libarm_dcc_write .text.libarm.libarm_run_dcc_port_server - 0x00003cd0 0x228 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm_run_dcc_port_server.o) - 0x00003cd0 libarm_run_dcc_port_server - 0x00003ef8 __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x00003ef8 __text_load_end__ = __text_end__ + 0x00003d90 0x228 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm_run_dcc_port_server.o) + 0x00003d90 libarm_run_dcc_port_server + 0x00003fb8 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00003fb8 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1017,46 +1017,46 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .text is too large to fit in FLASH memory segment) - 0x00003ef8 __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00003fb8 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x00003ef8 0x0 - 0x00003ef8 __dtors_start__ = . +.dtors 0x00003fb8 0x0 + 0x00003fb8 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) - 0x00003ef8 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x00003ef8 __dtors_load_end__ = __dtors_end__ + 0x00003fb8 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00003fb8 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .dtors is too large to fit in FLASH memory segment) - 0x00003ef8 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00003fb8 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x00003ef8 0x0 - 0x00003ef8 __ctors_start__ = . +.ctors 0x00003fb8 0x0 + 0x00003fb8 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) - 0x00003ef8 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x00003ef8 __ctors_load_end__ = __ctors_end__ + 0x00003fb8 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00003fb8 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ctors is too large to fit in FLASH memory segment) - 0x00003ef8 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00003fb8 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x00003ef8 0x24 - 0x00003ef8 __rodata_start__ = . +.rodata 0x00003fb8 0x24 + 0x00003fb8 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) - .rodata 0x00003ef8 0x4 ARM Flash Debug/../../obj/main.o + .rodata 0x00003fb8 0x4 ARM Flash Debug/../../obj/main.o .rodata.libc.__hex_lc - 0x00003efc 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003efc __hex_lc + 0x00003fbc 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003fbc __hex_lc .rodata.libc.__hex_uc - 0x00003f0c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - 0x00003f0c __hex_uc - 0x00003f1c __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x00003f1c __rodata_load_end__ = __rodata_end__ + 0x00003fcc 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + 0x00003fcc __hex_uc + 0x00003fdc __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x00003fdc __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .rodata is too large to fit in FLASH memory segment) - 0x00003f1c __data_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x00003fdc __data_load_start__ = ALIGN (__rodata_end__, 0x4) -.data 0x4000203c 0x0 load address 0x00003f1c +.data 0x4000203c 0x0 load address 0x00003fdc 0x4000203c __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x4000203c __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x00003f1c __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x00003fdc __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x40000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x4000203c 0x0 @@ -1170,14 +1170,14 @@ Linker script and memory map 0x40002d98 __stack_und_end__ = (__stack_und_start__ + SIZEOF (.stack_und)) 0x40002d98 __stack_und_load_end__ = __stack_und_end__ 0x00000001 . = ASSERT (((__stack_und_end__ >= __SRAM_segment_start__) && (__stack_und_end__ <= (__SRAM_segment_start__ + 0x4000))), error: .stack_und is too large to fit in SRAM memory segment) - 0x00003f1c __fast_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x00003fdc __fast_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.fast 0x40002d98 0x0 load address 0x00003f1c +.fast 0x40002d98 0x0 load address 0x00003fdc 0x40002d98 __fast_start__ = . *(.fast .fast.*) 0x40002d98 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x00003f1c __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) - 0x00003f1c __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.fast)) + 0x00003fdc __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x00003fdc __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x40000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x40002d98 0x0 @@ -1310,20 +1310,20 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_ .debug_ranges 0x000007e0 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) .debug_ranges 0x00000830 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm_run_dcc_port_server.o) -.debug_line 0x00000000 0x12a1 +.debug_line 0x00000000 0x12a3 .debug_line 0x00000000 0xec ARM Flash Debug/../../obj/boot.o .debug_line 0x000000ec 0x11e ARM Flash Debug/../../obj/cstart.o - .debug_line 0x0000020a 0xe8 ARM Flash Debug/../../obj/irq.o - .debug_line 0x000002f2 0xb6 ARM Flash Debug/../../obj/led.o - .debug_line 0x000003a8 0xea ARM Flash Debug/../../obj/main.o - .debug_line 0x00000492 0xd5 ARM Flash Debug/../../obj/timer.o - .debug_line 0x00000567 0x9d ARM Flash Debug/../../obj/vectors.o - .debug_line 0x00000604 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfprintf_int.o) - .debug_line 0x00000679 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) - .debug_line 0x000006ed 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) - .debug_line 0x00000c3c 0x56a C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v4t_a_le.a(libdebugio.o) - .debug_line 0x000011a6 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) - .debug_line 0x0000121a 0x87 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm_run_dcc_port_server.o) + .debug_line 0x0000020a 0xe9 ARM Flash Debug/../../obj/irq.o + .debug_line 0x000002f3 0xb6 ARM Flash Debug/../../obj/led.o + .debug_line 0x000003a9 0xeb ARM Flash Debug/../../obj/main.o + .debug_line 0x00000494 0xd5 ARM Flash Debug/../../obj/timer.o + .debug_line 0x00000569 0x9d ARM Flash Debug/../../obj/vectors.o + .debug_line 0x00000606 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfprintf_int.o) + .debug_line 0x0000067b 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(__vfscanf_int.o) + .debug_line 0x000006ef 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v4t_a_le.a(libc2.o) + .debug_line 0x00000c3e 0x56a C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v4t_a_le.a(libdebugio.o) + .debug_line 0x000011a8 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v4t_a_le.a(user_libc.o) + .debug_line 0x0000121c 0x87 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libarm_v4t_a_le.a(libarm_run_dcc_port_server.o) .debug_str 0x00000000 0xfc6 .debug_str 0x00000000 0x132 ARM Flash Debug/../../obj/boot.o diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.srec b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.srec index 0335692a..ab0ded96 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.srec +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/bin/demoprog_olimex_lpc_l2294_20mhz.srec @@ -30,12 +30,12 @@ S11321A8FBFFFF1A0EF0A0E10130D0E40130C1E4D6 S11321B8012052E2FBFFFF1A0EF0A0E1010050E1FA S11321C80EF0A0010120C0E4FBFFFFEA982D0040B7 S11321D8982C004098290040982A0040982B0040E9 -S11321E8982800401C3F00003C2000403C20004050 -S11321F85022000050220000F83E00001C3F00005E -S1132208982D0040982D0040F83E0000F83E00004C -S1132218F83E0000F83E0000F83E0000F83E0000DA -S1132228F83E0000F83E00001C3F00003C2000403F -S1132238982000409820004098240040E0250000A1 +S11321E898280040DC3F00003C2000403C20004090 +S11321F85022000050220000B83F0000DC3F0000DD +S1132208982D0040982D0040B83F0000B83F0000CA +S1132218B83F0000B83F0000B83F0000B83F0000D6 +S1132228B83F0000B83F0000DC3F00003C200040FD +S1132238982000409820004098240040242600005C S10B22480000A0E10000A0E188 S113225000482DE904B08DE204D04DE24030A0E303 S113226008300BE508301BE50FE0A0E113FF2FE178 @@ -51,452 +51,464 @@ S11322F0FF2002E20020C3E52C309FE50320A0E389 S11323000020C3E518309FE50720A0E30020C3E5C3 S113231000D08BE20008BDE81EFF2FE100C002E000 S113232004C000E008C000E014C000E00CC000E0FD -S113233000C000E000482DE904B08DE2CC309FE5F8 -S11323400030D3E5000053E30B00001AC0009FE502 -S1132350310000EB0030A0E1010053E32800001A33 -S1132360A8309FE50120A0E30020C3E5A4309FE549 -S11323700020A0E30020C3E5210000EA94309FE59B -S11323800030D3E5012083E284309FE5033082E00E -S11323900300A0E1200000EB0030A0E1010053E3C2 -S11323A01700001A6C309FE50030D3E5013083E25A -S11323B0FF2003E25C309FE50020C3E550309FE539 -S11323C00020D3E54C309FE50030D3E5030052E113 -S11323D00B00001A34309FE50020A0E30020C3E581 -S11323E02C309FE50130D3E5FF0053E30400001ACD -S11323F01C309FE50230D3E5000053E30000001ACF -S113240092FFFFEB04D04BE20048BDE81EFF2FE132 -S11324103C200040402000408420004004B02DE5D2 -S113242000B08DE204D04DE204000BE544309FE59A -S11324300030D3E5FF3003E2013003E2FF3003E272 -S1132440000053E30600000A2C309FE50030D3E57A -S1132450FF2003E204301BE50020C3E50130A0E3C4 -S1132460000000EA0030A0E30300A0E100D08BE20A -S11324700008BDE81EFF2FE114C000E000C000E02A -S113248010082DE904B08DE204D04DE200400FE1C4 -S113249008400BE508301BE50300A0E104D04BE243 -S11324A01008BDE81EFF2FE104B02DE500B08DE259 -S11324B004D04DE204000BE504301BE503F029E1F0 -S11324C000D08BE20008BDE81EFF2FE100482DE993 -S11324D004B08DE204D04DE2E8FFFFEB08000BE509 -S11324E008301BE58030C3E30300A0E1EDFFFFEB00 -S11324F004D04BE20048BDE81EFF2FE104B02DE5F7 -S113250000B08DE224309FE520209FE5002092E575 -S1132510022582E3002083E514309FE50225A0E331 -S1132520002083E500D08BE20008BDE81EFF2FE108 -S1132530188002E0148002E000482DE904B08DE226 -S113254004D04DE2DD0000EB08000BE578309FE598 -S1132550003093E508201BE5022063E06C309FE522 -S1132560030052E11400009A64309FE50030D3E583 -S1132570000053E30600001A54309FE50120A0E355 -S11325800020C3E54C309FE50225A0E3002083E54D -S1132590050000EA38309FE50020A0E30020C3E5F1 -S11325A034309FE50225A0E3002083E518309FE541 -S11325B008201BE5002083E5000000EA0000A0E1FC -S11325C004D04BE20048BDE81EFF2FE18820004004 -S11325D0F30100008C2000401C8002E0148002E023 -S11325E000482DE904B08DE2030000EB22FFFFEB6D -S11325F0D0FFFFEB4EFFFFEBFCFFFFEA00482DE9A5 -S113260004B08DE20CD04DE2AC319FE510104BE2EA -S11326100320A0E10430A0E30100A0E10210A0E146 -S11326200320A0E1BD0000EB0330A0E306304BE53E -S113263006305BE5013043E206304BE50030A0E3B1 -S113264005304BE51C0000EA05205BE50B30E0E3B8 -S113265004104BE2022081E0033082E00030D3E535 -S11326600320A0E10230A0E18332A0E1033062E064 -S11326700331A0E1023083E00322A0E1022063E001 -S11326800233A0E10320A0E10230A0E10C300BE50D -S11326900C201BE524319FE5030052E10300009A5E -S11326A00C201BE518319FE5030052E10600009A57 -S11326B005305BE5013083E205304BE505305BE531 -S11326C0030053E3DFFFFF9A000000EA0000A0E1EB -S11326D0F0309FE505205BE58222A0E1FF1002E2D5 -S11326E006205BE5022081E1FF2002E2FF2002E2F6 -S11326F00020C3E5D0309FE55520E0E30020C3E58A -S1132700C4309FE55520A0E30020C3E5BC309FE51D -S11327100120A0E30020C3E5AC309FE55520E0E3B1 -S11327200020C3E5A0309FE55520A0E30020C3E5C9 -S11327300000A0E198309FE5B030D3E10338A0E178 -S11327402338A0E1013B03E2000053E3F8FFFF0A52 -S113275078309FE50320A0E30020C3E568309FE5BF -S11327605520E0E30020C3E55C309FE55520A0E35D -S11327700020C3E55C309FE50020A0E30020C3E512 -S113278054309FE50420A0E30020C3E544309FE5D6 -S11327900220A0E30020C3E540309FE50120A0E330 -S11327A00020C3E554FFFFEB0D0000EB46FFFFEBF9 -S11327B004D04BE20048BDE81EFF2FE1F83E0000C4 -S11327C05F61020000E2040084C01FE08CC01FE0CF -S11327D080C01FE088C01FE000C01FE004C01FE0ED -S11327E000C11FE000482DE904B08DE254309FE59C -S11327F054209FE5002083E550309FE50320A0E3AB -S1132800002083E548309FE50120A0E3002083E514 -S113281040309FE540209FE5002083E53C309FE564 -S11328202420A0E3002083E534309FE51020A0E3BA -S1132830002083E50000A0E3150000EB04D04BE288 -S11328400048BDE81EFF2FE1184000E05FEA0000E9 -S1132850144000E0044000E000F1FFFFE428000021 -S113286000F2FFFF10F0FFFF04B02DE500B08DE291 -S113287018309FE5003093E5012083E20C309FE59A -S1132880002083E500D08BE20008BDE81EFF2FE1A5 -S11328909020004004B02DE500B08DE204D04DE25C -S11328A004000BE510309FE504201BE5002083E5C0 -S11328B000D08BE20008BDE81EFF2FE1902000400D -S11328C004B02DE500B08DE210309FE5003093E5B3 -S11328D00300A0E100D08BE20008BDE81EFF2FE159 -S11328E09020004004E04EE20F582DE918B08DE22C -S11328F01C309FE50120A0E3002083E514309FE510 -S11329000020A0E3002083E5D6FFFFEB18D04BE2C4 -S11329100F98FDE8004000E030F0FFFF00000000E9 -S113292000C0A0E1013080E1030013E30800001AB5 -S1132930240052E30600003AF00F2DE9F80FB1E845 -S1132940F80FA0E8242042E2240052E3FAFFFF2A11 -S1132950F00FBDE8000052E30300000A0130D1E4A7 -S11329600130C0E4012052E2FBFFFF1A0C00A0E199 -S11329701EFF2FE10000A0E10000A0E10000A0E1A3 -S1132980011080E2030010E30C00000A0120D0E4EF -S1132990000052E31700000A030010E30700000AD6 -S11329A00120D0E4000052E31200000A030010E307 -S11329B00200000A0120D0E4000052E30D00000AE6 -S11329C070002DE934209FE534309FE5044090E405 -S11329D0025044E00450C5E1035015E00000001A21 -S11329E0F9FFFFEA040040E27000BDE80120D0E4F2 -S11329F0000052E3FCFFFF1A010040E01EFF2FE13C -S1132A0001010101808080800000A0E10000A0E1BC -S1132A10F04F2DE918D04DE20070A0E10140A0E193 -S1132A2008208DE50030A0E3003080E584B89FE500 -S1132A300150A0E10E0200EA015085E2250051E3B5 -S1132A400530A0010060A0030200000A0700A0E115 -S1132A501D0400EB060200EA0310A0E10100D3E428 -S1132A600350A0E1202040E2100052E302F19F97BE -S1132A701C0000EAB82A0000E82A0000E82A000046 -S1132A80C02A0000E82A0000E82A0000E82A000022 -S1132A90C82A0000E82A0000E82A0000E82A00000A -S1132AA0D02A0000E82A0000D82A0000E82A000002 -S1132AB0E82A0000E02A0000406086E3E5FFFFEA20 -S1132AC0806086E3E3FFFFEA026986E3E1FFFFEA51 -S1132AD0206086E3DFFFFFEA106086E3DDFFFFEAA4 -S1132AE0026C86E3DBFFFFEA2A0050E30400000ADD -S1132AF0302040E2090052E30090A0830A00009ACB -S1132B00120000EA08309DE5040083E208008DE528 -S1132B10009093E5000059E3009069B2106086B319 -S1132B200100D1E5025081E2080000EA0090A0E330 -S1132B30099189E0300040E2899080E00100D3E40B -S1132B400350A0E1302040E2090052E3F7FFFF9A6E -S1132B50C99FC9E12E0050E30080A0131C00001A95 -S1132B600000D5E52A0050E30500000A015085E283 -S1132B70303040E2090053E30080A0830700009A4C -S1132B80120000EA08309DE5042083E208208DE568 -S1132B90008093E50100D5E5025085E2090000EAD2 -S1132BA00530A0E10080A0E3088188E0300040E225 -S1132BB0888080E00100D3E40350A0E1302040E2AB -S1132BC0090052E3F7FFFF9A000058E3000000BA3F -S1132BD0016C86E3680050E30600001A0000D5E5A6 -S1132BE0680050E3086086030100D50502508502A1 -S1132BF00150851204608613780050E300F19F971A -S1132C00780000EAA8320000E82D0000E82D00005A -S1132C10E82D0000E82D0000E82D0000E82D00005C -S1132C20E82D0000E82D0000E82D0000E82D00004C -S1132C30E82D0000E82D0000E82D0000E82D00003C -S1132C40E82D0000E82D0000E82D0000E82D00002C -S1132C50E82D0000E82D0000E82D0000E82D00001C -S1132C60E82D0000E82D0000E82D0000E82D00000C -S1132C70E82D0000E82D0000E82D0000E82D0000FC -S1132C80E82D0000E82D0000E82D0000E82D0000EC -S1132C90E82D0000E82D00001C2E0000E82D0000A7 -S1132CA0E82D0000E82D0000E82D0000E82D0000CC -S1132CB0E82D0000E82D0000E82D0000E82D0000BC -S1132CC0E82D0000E82D0000E82D0000E82D0000AC -S1132CD0E82D0000E82D0000E82D0000E82D00009C -S1132CE0E82D0000E82D0000E82D0000E82D00008C -S1132CF0E82D0000E82D0000E82D0000E82D00007C -S1132D00E82D0000E82D0000E82D0000E82D00006B -S1132D10E82D0000E82D0000E82D0000E82D00005B -S1132D20E82D0000E82D0000E82D0000E82D00004B -S1132D30E82D0000E82D0000E82D0000E82D00003B -S1132D40E82D0000E82D0000E82D0000E82D00002B -S1132D50E82D0000E82D0000E82D0000E82D00001B -S1132D60E82D0000382F0000E82D0000E82D0000B9 -S1132D70E82D0000E82D0000E82D0000E82D0000FB -S1132D80E82D0000E82D0000E82D0000E82D0000EB -S1132D902C2E0000942F0000E82D0000E82D0000E8 -S1132DA0E82D0000E82D0000942F0000E82D00001D -S1132DB0E82D0000E82D0000E82D0000782E00002A -S1132DC0642F00000C2F0000E82D0000E82D000007 -S1132DD09C2E0000E82D0000802F0000E82D00004C -S1132DE0E82D00003C2F0000CC149FE500C091E5C5 -S1132DF000005CE31E01000A00808DE508308DE2CE -S1132E0004308DE50710A0E10620A0E10930A0E11F -S1132E100FE0A0E11CFF2FE1150100EA0700A0E18B -S1132E202510A0E3280300EB110100EA08309DE51A -S1132E30042083E208208DE50040D3E5019049E2B7 -S1132E400600A0E10910A0E10720A0E1480300EB7F -S1132E500700A0E10410A0E11B0300EB100016E33F -S1132E600301000A2000A0E30910A0E10720A0E16B -S1132E70300300EBFE0000EA080016E308309DE58D -S1132E80042083E208208DE5003093E5002097E5D7 -S1132E900020C31500208305F50000EA08309DE5F5 -S1132EA0042083E208208DE500A093E50A00A0E158 -S1132EB0B2FEFFEB0040A0E1010C16E30030A003DA -S1132EC00130A013000058E10030A0A3013003B288 -S1132ED0000053E30840A011099064E00600A0E15B -S1132EE00910A0E10720A0E1210300EB000054E356 -S1132EF0D9FFFF0A0700A0E10110DAE4F20200EBB7 -S1132F00014054E2FAFFFF1AD3FFFFEA08309DE5BF -S1132F10042083E208208DE5003093E580A006E2DA -S1132F2000005AE323A0A01300A0A003016C86E3D1 -S1132F300880A0E33E0000EA026A86E3800016E30C -S1132F4000A0A0030300000A70339FE570A39FE56F -S1132F50780050E303A0A001010C16E3026CC61331 -S1132F600F0000EA80A006E200005AE330A0A0139C -S1132F7000A0A003010C16E3026CC613080000EACB -S1132F80010C16E3026CC61300A0A0130400001A7F -S1132F90020000EA016986E300A0A0E3000000EA61 -S1132FA000A0A0E3010916E31400000A08309DE51F -S1132FB0042083E208208DE5003093E5040016E345 -S1132FC00338A0114338A0110100001A080016E3C9 -S1132FD0FF300312000053E3003063B22DA0A0B30E -S1132FE0100000BA200016E32BA0A0130D00001A55 -S1132FF0402006E2000052E320A0A013090000EAEA -S113300008309DE5042083E208208DE5003093E537 -S1133010040016E30338A0112338A0110100001A9C -S1133020080016E3FF300312010C16E30200000A45 -S1133030026CC6E3010C16E30000001A0180A0E351 -S1133040580040E2200050E300F19F97590000EA45 -S1133050F4300000B8310000B8310000B83100008D -S1133060B8310000B8310000B8310000B8310000B8 -S1133070B8310000B8310000B8310000B8310000A8 -S1133080E4300000B8310000B8310000B83100006D -S1133090B8310000E4300000B8310000B83100005D -S11330A0B8310000B8310000B8310000D43000005D -S11330B0F4300000B8310000B8310000B83100002D -S11330C0B8310000E4300000B8310000B83100002D -S11330D0F4300000000053E30040A0031500001A80 -S11330E0350000EA000053E30040A0031A00001A70 -S11330F0310000EA000053E30040A0032E00000A60 -S11331000040A0E3022A06E2000052E30F1003E2AB -S1133110B0C19F150100DC17ACE19F050100DE077B -S11331200C108DE20100C4E7014084E22332B0E1D7 -S1133130F4FFFF1A200000EA0040A0E3071003E2B6 -S1133140301081E20C208DE20210C4E7014084E2D9 -S1133150A331B0E1F8FFFF1A170000EA0040A0E332 -S1133160020906E22CC0A0E3000050E30500000AB7 -S1133170032004E2030052E318108D0204208100AE -S11331800CC042050140840218208DE2041082E044 -S11331909BE382E0A221A0E102E182E08E3043E0E1 -S11331A0303083E20C3041E5014084E2003052E2E9 -S11331B0ECFFFF1A000000EA0040A0E3088064E08E -S11331C0C88FC8E1099068E0099064E0FF005AE301 -S11331D00190498200005AE301904912020C16E35F -S11331E00400001A0600A0E10910A0E10720A0E1F4 -S11331F05F0200EB0090A0E3FF005AE32A14A081D1 -S11332000700A081FF1001822F02008B00005AE307 -S1133210FF100A120700A0112B02001B0600A0E1F8 -S11332200910A0E10720A0E1510200EB3000A0E367 -S11332300810A0E10720A0E13E0200EB010054E3E6 -S11332400600004A0C808DE2044088E00700A0E1FB -S1133250011074E51C0200EB080054E1FAFFFF1AA8 -S1133260100016E32000A0130910A0110720A011DC -S11332703002001B0010D5E5000051E3EDFDFF1AFC -S1133280083097E5000053E30400000A002097E5A6 -S1133290041097E5010052E10010A0330210C33777 -S11332A0000097E5000000EA0000E0E318D08DE29A -S11332B0F04FBDE81EFF2FE1CDCCCCCC94200040D4 -S11332C078300000583000000C3F0000FC3E000045 -S11332D010402DE90040A0E10030D1E5000053E3A7 -S11332E00400000A010070E3043091150130431218 -S11332F004308115020000EA08C091E50FE0A0E166 -S11333001CFF2FE10400A0E11040BDE81EFF2FE1E7 -S1133310F04F2DE90090A0E101B0A0E10280A0E10E -S113332003A0A0E124609DE50050E0E3000000EA72 -S11333300450A0E1014085E20900A0E1CF0100EBC7 -S11333400070A0E1380200EB000050E3F7FFFF1A21 -S11333500730A0E1010077E30040E0035900000AD0 -S1133360068CC8E3000056E32B0000DA800018E363 -S11333700900000A2B0057E30200000A2D0057E35E -S11333800500001A018B88E3024085E20900A0E1F0 -S1133390BA0100EB0070A0E1016046E2000056E3D0 -S11333A00030A0D30130A0C3300057E30030A01395 -S11333B0000053E31800000A028C88E3016046E22F -S11333C0015084E20900A0E1AC0100EB0070A0E12F -S11333D0000056E30D0000DA580050E37800501363 -S11333E00A00001A10005AE300005A130700001ADA -S11333F0028CC8E3016046E2025084E20900A0E1C5 -S11334009E0100EB0070A0E110A0A0E3300000EAF0 -S113341000005AE308A0A0032D0000EA00005AE3CC -S11334200AA0A003000056E30050A0D30A0000CA7B -S11334300F0000EA028C88E3016046E29A0525E069 -S1133440014084E20900A0E18C0100EB0070A0E1DE -S1133450000056E30100001A050000EA0050A0E352 -S11334600700A0E10A10A0E1DA0100EB000050E33C -S1133470EFFFFFAA0700A0E10910A0E193FFFFEB13 -S1133480020C18E30140E0030E00000A010018E3F7 -S11334900C00001A00309BE5042083E200208BE539 -S11334A0003093E5122D08E2120D52E3005065023C -S11334B0100018E30050C3150200001A080018E3B6 -S11334C0B050C311005083050400A0E1F04FBDE8E3 -S11334D01EFF2FE10540A0E1D1FFFFEAF04F2DE9E7 -S11334E014D04DE204008DE501A0A0E110208DE58B -S11334F00090A0E308908DE57CB59FE50A60A0E10B -S11335000140D6E4000054E35701000A250054E3C7 -S11335102900000A0400A0E1C30100EB000050E30D -S11335200100001A120000EA0460A0E1014086E2F2 -S11335300000D6E5BC0100EB000050E3F9FFFF1AE0 -S1133540000000EA019089E204009DE54B0100EBD4 -S11335500040A0E1B40100EB000050E3F8FFFF1AC3 -S11335600400A0E104109DE558FFFFEB06A0A0E1D4 -S1133570E1FFFFEA04009DE5400100EB0050A0E1FB -S1133580040050E10190890206A0A001DAFFFF0ABD -S113359004109DE54DFFFFEB08209DE5000052E37C -S11335A0010075030050A0130150A003000055E36F -S11335B00020E01308208DE52B0100EA0130DAE554 -S11335C02A0053E302608A020180A0030080A01352 -S11335D00640A0E10050A0E3060000EA0B0055E11C -S11335E0210100CA055185E0306046E2855096E02D -S11335F01D01004A208088E30470A0E1014084E2B8 -S11336000060D7E504A0A0E10600A0E16C0100EB96 -S1133610000050E3F0FFFF1A0810A0E1202008E2A8 -S1133620000052E30251E0034C0056E30160D70569 -S113363002A08702448088030800000A680056E359 -S11336400600001A0160D7E5680056E3108088037D -S11336500260D70503A0870202A0871208808113A5 -S1133660256046E2530056E306F19F97FE0000EA08 -S1133670C03700006C3A00006C3A00006C3A00005D -S11336806C3A00006C3A00006C3A00006C3A00009E -S11336906C3A00006C3A00006C3A00006C3A00008E -S11336A06C3A00006C3A00006C3A00006C3A00007E -S11336B06C3A00006C3A00006C3A00006C3A00006E -S11336C06C3A00006C3A00006C3A00006C3A00005E -S11336D06C3A00006C3A00006C3A00006C3A00004E -S11336E06C3A00006C3A00006C3A00006C3A00003E -S11336F06C3A00006C3A00006C3A00006C3A00002E -S11337006C3A00006C3A00006C3A00006C3A00001D -S11337106C3A00006C3A00006C3A00006C3A00000D -S11337206C3A00006C3A00006C3A00006C3A0000FD -S11337306C3A00006C3A00006C3A00000C3A00004D -S11337406C3A00006C3A00006C3A00006C3A0000DD -S11337506C3A00006C3A00006C3A00006C3A0000CD -S11337606C3A00006C3A0000043800008038000015 -S11337706C3A00006C3A00006C3A00006C3A0000AD -S1133780A03800006C3A00006C3A00006C3A00006B -S11337906C3A0000C0380000F4380000143900000E -S11337A06C3A00006C3A0000343900006C3A0000B6 -S11337B0EC3900006C3A00006C3A00000C3A00004E -S11337C004009DE5AD0000EB0040A0E1250050E3BE -S11337D00190890248FFFF0A04109DE5BBFEFFEB40 -S11337E008309DE5010074E3000053030040A0038A -S11337F00140A013000054E30030E00308308DE5DD -S1133800990000EA203008E2000053E30150A003CD -S1133810018018E210309D050420830210208D05DC -S1133820004093050040A013000055E38E00000AF9 -S11338300D0000DA04009DE5900000EB010070E348 -S11338400400001A08209DE5000052E30020E00374 -S113385008208DE5840000EA000058E30100C40458 -S1133860019089E2015055E2F1FFFF1A000058E38C -S113387008309D050130830208308D051EFFFFEAE4 -S113388000508DE504009DE510108DE2802088E352 -S11338900A30A0E39DFEFFEB0040A0E1610000EAD6 -S11338A000508DE504009DE510108DE2802088E332 -S11338B00030A0E395FEFFEB0040A0E1590000EAD0 -S11338C0010018E30CFFFF1A10309DE5042083E289 -S11338D010208DE5003093E5100018E30090C31527 -S11338E005FFFF1A080018E3B090C3110090830588 -S11338F001FFFFEA00508DE504009DE510108DE204 -S1133900802088E30830A0E380FEFFEB0040A0E1C4 -S1133910440000EA00508DE504009DE510108DE29E -S11339201E20C8E31030A0E378FEFFEB0040A0E1C6 -S11339303C0000EA0040E0E3014084E204009DE52D -S11339404E0000EB0060A0E1B70000EB000050E384 -S1133950F8FFFF1A010076E30040E0033100000A9B -S1133960017018E210309D050420830210208D059B -S1133970003093050C308D050020A0130C208D150C -S1133980000055E30C0000CA0F0000EA015045E2B4 -S1133990000057E30C309D050160C3040C308D0515 -S11339A0014084E204009DE5340000EB0060A0E1E6 -S11339B0010070E300005513030000DA0600A0E1E3 -S11339C0990000EB000050E3EFFFFF0A0600A0E1BE -S11339D004109DE53DFEFFEB000057E30020A0032B -S11339E00C309D050020C3050E0000EA00508DE553 -S11339F004009DE510108DE2802088E30A30A0E3E6 -S1133A0042FEFFEB0040A0E1060000EA00508DE515 -S1133A1004009DE510108DE2802088E31030A0E3BF -S1133A203AFEFFEB0040A0E1000054E3080000AAC6 -S1133A3008209DE5010074E3000052030040A00348 -S1133A400140A013000054E30020E00308208DE5AA -S1133A50050000EA010018E308309D0501308302E7 -S1133A6008308D05049089E0A3FEFFEA08009DE577 -S1133A7014D08DE2F04FBDE81EFF2FE1CCCCCC0C6E -S1133A8004E02DE50030A0E10020D0E5000052E381 -S1133A900600000A042090E50000D2E5000050E38F -S1133AA001208212042083150500001A030000EA95 -S1133AB004C090E50FE0A0E11CFF2FE1000000EA44 -S1133AC00000E0E304E09DE41EFF2FE110402DE937 -S1133AD00040A0E1FF0001E2081094E5000051E37A -S1133AE00600000A003094E5042094E501C083E256 -S1133AF002005CE10000A003020053E10300C137AF -S1133B000C3094E5000053E30500000A001094E52E -S1133B10042094E5020051E10410A0310FE0A0312B -S1133B2013FF2F31003094E5013083E2003084E547 -S1133B301040BDE81EFF2FE1F0402DE90250A0E146 -S1133B40010051E30800004A0160A0E10040A0E345 -S1133B50FF7000E20500A0E10710A0E1DAFFFFEB2F -S1133B60014084E2060054E1F9FFFF1AF040BDE889 -S1133B701EFF2FE104E02DE5100010E30400001AFD -S1133B80020C00E2000050E32000A0033000A01368 -S1133B90E8FFFFEB04E09DE41EFF2FE1410040E25B -S1133BA0190050E30000A0830100A0931EFF2FE141 -S1133BB0610040E2190050E30000A0830100A093DB -S1133BC01EFF2FE1300040E2090050E30000A08313 -S1133BD00100A0931EFF2FE130402DE90040A0E139 -S1133BE00150A0E1F6FFFFEB000050E33000441267 -S1133BF00900001A0400A0E1ECFFFFEB000050E311 -S1133C00570044120400001A0400A0E1E2FFFFEB95 -S1133C10000050E3370044120000E003050050E1C7 -S1133C200000E0A33040BDE81EFF2FE1093040E270 -S1133C30200050E3040053130000A0830100A0936C -S1133C401EFF2FE130402DE904D04DE20050A0E1E9 -S1133C5004408DE2041024E5090000EB0500A0E116 -S1133C60120000EB0D00A0E1100000EB170000EBC8 -S1133C70040000EB00009DE504D08DE23040BDE877 -S1133C801EFF2FE11EFF2FE11EFF2FE100000000A9 -S1133C90100E10EE010010E3FCFFFF0A100E11EEEF -S1133CA01EFF2FE10000A0E10000A0E10000A0E160 -S1133CB002002DE9101E10EE020011E3FCFFFF1AB2 -S1133CC0100E01EE0200BDE81EFF2FE10000A0E18E -S1133CD0F0472DE90480A0E30870A0E10090A0E380 -S1133CE0EAFFFFEB2042A0E10F0000E20A0050E3EC -S1133CF000F19F97F9FFFFEA243D0000783D0000A2 -S1133D00343E0000603E0000703E0000C03E0000F3 -S1133D10D03D0000E03C0000E03C00007C3E0000A0 -S1133D20F03E0000D9FFFFEB000054E36600001AE8 -S1133D300D0000EAD5FFFFEB0730A0E10100C5E468 -S1133D40014054E20020A0030120A013013053E2FB -S1133D500010A00301100212000051E32004A0117E -S1133D60F5FFFF1A000052E3F1FFFF1A0100A0E380 -S1133D70CEFFFFEBD9FFFFEAC4FFFFEB000054E3E3 -S1133D800060A0110950A0110B00001A0C0000EAF9 -S1133D902554A0E1000054E30120D614025C8511EF -S1133DA001404412013053E2F8FFFF1A0500A0E17C -S1133DB0BEFFFFEB000054E30100000A0730A0E15E -S1133DC0F2FFFFEA0100A0E3B8FFFFEBC3FFFFEA45 -S1133DD0AEFFFFEB000054E30150A0033E00001AC5 -S1133DE0100000EAA9FFFFEB0730A0E10110D6E4C0 -S1133DF0FF2000E2020051E10050A013014054E210 -S1133E000020A0030120A013013053E20010A003FE -S1133E1001100212000051E32004A011F2FFFF1A66 -S1133E20000052E3EEFFFF1A0500A0E19FFFFFEB45 -S1133E30AAFFFFEA95FFFFEB0050A0E193FFFFEB21 -S1133E40000054E30200000A0100C5E4014054E20A -S1133E50FCFFFF1A0100A0E394FFFFEB9FFFFFEAC2 -S1133E608AFFFFEB0100A0E390FFFFEB9BFFFFEA5B -S1133E700100A0E38DFFFFEB98FFFFEA83FFFFEB58 -S1133E800040A0E181FFFFEB0050A0E17FFFFFEBCA -S1133E900060A0E17DFFFFEB00A0A0E17BFFFFEB52 -S1133EA00030A0E10500A0E10610A0E10A20A0E195 -S1133EB00FE0A0E114FF2FE17CFFFFEB87FFFFEA97 -S1133EC00100A0E379FFFFEB080000EA0050A0E145 -S1133ED06EFFFFEB0830A0E197FFFFEA0060A0E16E -S1133EE06AFFFFEB0150A0E30830A0E1BEFFFFEA48 -S10B3EF0F047BDE81EFF2FE1BD -S1133EF801020408303132333435363738396162D7 -S1133F086364656630313233343536373839414283 -S1073F18434445468F +S113233000C000E000482DE904B08DE2E4309FE5E0 +S11323400030D3E5000053E30D00001AD8009FE5E8 +S1132350D8309FE50FE0A0E113FF2FE10030A0E1AA +S1132360010053E32C00001AB8309FE50120A0E3DC +S11323700020C3E5B8309FE50020A0E30020C3E5BA +S1132380250000EAA8309FE50030D3E5012083E270 +S113239094309FE5033082E00300A0E18C309FE598 +S11323A00FE0A0E113FF2FE10030A0E1010053E3AF +S11323B01900001A78309FE50030D3E5013083E23C +S11323C0FF2003E268309FE50020C3E558309FE515 +S11323D00020D3E558309FE50030D3E5030052E1F7 +S11323E00D00001A3C309FE50020A0E30020C3E567 +S11323F034309FE50130D3E5FF0053E30600001AB3 +S113240024309FE50230D3E5000053E30200001AB4 +S113241020309FE50FE0A0E113FF2FE104D04BE251 +S11324200048BDE81EFF2FE13C2000404020004052 +S11324303C240000842000405022000004B02DE51C +S113244000B08DE204D04DE204000BE544309FE57A +S11324500030D3E5FF3003E2013003E2FF3003E252 +S1132460000053E30600000A2C309FE50030D3E55A +S1132470FF2003E204301BE50020C3E50130A0E3A4 +S1132480000000EA0030A0E30300A0E100D08BE2EA +S11324900008BDE81EFF2FE114C000E000C000E00A +S11324A010082DE904B08DE204D04DE200400FE1A4 +S11324B008400BE508301BE50300A0E104D04BE223 +S11324C01008BDE81EFF2FE104B02DE500B08DE239 +S11324D004D04DE204000BE504301BE503F029E1D0 +S11324E000D08BE20008BDE81EFF2FE100482DE973 +S11324F004B08DE204D04DE22C309FE50FE0A0E162 +S113250013FF2FE108000BE508301BE58030C3E31F +S11325100300A0E114309FE50FE0A0E113FF2FE1D9 +S113252004D04BE20048BDE81EFF2FE1A0240000C8 +S1132530C824000004B02DE500B08DE224309FE5EE +S113254020209FE5002092E5022582E3002083E518 +S113255014309FE50225A0E3002083E500D08BE240 +S11325600008BDE81EFF2FE1188002E0148002E09D +S113257000482DE904B08DE204D04DE288309FE597 +S11325800FE0A0E113FF2FE108000BE57C309FE58D +S1132590003093E508201BE5022063E070309FE5DE +S11325A0030052E11400009A68309FE50030D3E53F +S11325B0000053E30600001A58309FE50120A0E311 +S11325C00020C3E550309FE50225A0E3002083E509 +S11325D0050000EA3C309FE50020A0E30020C3E5AD +S11325E038309FE50225A0E3002083E51C309FE5F9 +S11325F008201BE5002083E5000000EA0000A0E1BC +S113260004D04BE20048BDE81EFF2FE17029000012 +S113261088200040F30100008C2000401C8002E070 +S1132620148002E000482DE904B08DE22C309FE5CF +S11326300FE0A0E113FF2FE124309FE50FE0A0E1BC +S113264013FF2FE11C309FE50FE0A0E113FF2FE102 +S113265014309FE50FE0A0E113FF2FE1F8FFFFEA3C +S1132660702600007C220000702500003423000046 +S113267000482DE904B08DE20CD04DE2CC319FE549 +S113268010104BE20320A0E10430A0E30100A0E11C +S11326900210A0E10320A0E1B4319FE50FE0A0E126 +S11326A013FF2FE10330A0E306304BE506305BE572 +S11326B0013043E206304BE50030A0E305304BE542 +S11326C01C0000EA05205BE50B30E0E304104BE25C +S11326D0022081E0033082E00030D3E50320A0E152 +S11326E00230A0E18332A0E1033062E00331A0E1D3 +S11326F0023083E00322A0E1022063E00233A0E180 +S11327000320A0E10230A0E10C300BE50C201BE516 +S113271040319FE5030052E10300009A0C201BE5C1 +S113272034319FE5030052E10600009A05305BE571 +S1132730013083E205304BE505305BE5030053E3EC +S1132740DFFFFF9A000000EA0000A0E10C319FE5E2 +S113275005205BE58222A0E1FF1002E206205BE592 +S1132760022081E1FF2002E2FF2002E20020C3E513 +S1132770EC309FE55520E0E30020C3E5E0309FE521 +S11327805520A0E30020C3E5D8309FE50120A0E355 +S11327900020C3E5C8309FE55520E0E30020C3E5F1 +S11327A0BC309FE55520A0E30020C3E50000A0E174 +S11327B0B4309FE5B030D3E10338A0E12338A0E181 +S11327C0013B03E2000053E3F8FFFF0A94309FE566 +S11327D00320A0E30020C3E584309FE55520E0E317 +S11327E00020C3E578309FE55520A0E30020C3E531 +S11327F078309FE50020A0E30020C3E570309FE51A +S11328000420A0E30020C3E560309FE50220A0E39C +S11328100020C3E55C309FE50120A0E30020C3E570 +S113282054309FE50FE0A0E113FF2FE14C309FE50A +S11328300FE0A0E113FF2FE144309FE50FE0A0E19A +S113284013FF2FE104D04BE20048BDE81EFF2FE147 +S1132850B83F0000E02900005F61020000E20400CC +S113286084C01FE08CC01FE080C01FE088C01FE050 +S113287000C01FE004C01FE000C11FE034250000B9 +S113288088280000EC24000000482DE904B08DE203 +S11328905C309FE55C209FE5002083E558309FE590 +S11328A00320A0E3002083E550309FE50120A0E34E +S11328B0002083E548309FE548209FE5002083E51C +S11328C044309FE52420A0E3002083E53C309FE5CD +S11328D01020A0E3002083E50000A0E330309FE552 +S11328E00FE0A0E113FF2FE104D04BE20048BDE864 +S11328F01EFF2FE1184000E05FEA0000144000E0F2 +S1132900044000E000F1FFFF9429000000F2FFFF03 +S113291010F0FFFF4429000004B02DE500B08DE263 +S113292018309FE5003093E5012083E20C309FE5E9 +S1132930002083E500D08BE20008BDE81EFF2FE1F4 +S11329409020004004B02DE500B08DE204D04DE2AB +S113295004000BE510309FE504201BE5002083E50F +S113296000D08BE20008BDE81EFF2FE1902000405C +S113297004B02DE500B08DE210309FE5003093E502 +S11329800300A0E100D08BE20008BDE81EFF2FE1A8 +S11329909020004004E04EE20F582DE918B08DE27B +S11329A024309FE50120A0E3002083E51C309FE54F +S11329B00020A0E3002083E514309FE50FE0A0E1B0 +S11329C013FF2FE118D04BE20F98FDE8004000E020 +S11329D030F0FFFF18290000000000000000000094 +S11329E000C0A0E1013080E1030013E30800001AF5 +S11329F0240052E30600003AF00F2DE9F80FB1E885 +S1132A00F80FA0E8242042E2240052E3FAFFFF2A50 +S1132A10F00FBDE8000052E30300000A0130D1E4E6 +S1132A200130C0E4012052E2FBFFFF1A0C00A0E1D8 +S1132A301EFF2FE10000A0E10000A0E10000A0E1E2 +S1132A40011080E2030010E30C00000A0120D0E42E +S1132A50000052E31700000A030010E30700000A15 +S1132A600120D0E4000052E31200000A030010E346 +S1132A700200000A0120D0E4000052E30D00000A25 +S1132A8070002DE934209FE534309FE5044090E444 +S1132A90025044E00450C5E1035015E00000001A60 +S1132AA0F9FFFFEA040040E27000BDE80120D0E431 +S1132AB0000052E3FCFFFF1A010040E01EFF2FE17B +S1132AC001010101808080800000A0E10000A0E1FC +S1132AD0F04F2DE918D04DE20070A0E10140A0E1D3 +S1132AE008208DE50030A0E3003080E584B89FE540 +S1132AF00150A0E10E0200EA015085E2250051E3F5 +S1132B000530A0010060A0030200000A0700A0E154 +S1132B101D0400EB060200EA0310A0E10100D3E467 +S1132B200350A0E1202040E2100052E302F19F97FD +S1132B301C0000EA782B0000A82B0000A82B000042 +S1132B40802B0000A82B0000A82B0000A82B00005D +S1132B50882B0000A82B0000A82B0000A82B000045 +S1132B60902B0000A82B0000982B0000A82B00003D +S1132B70A82B0000A02B0000406086E3E5FFFFEADD +S1132B80806086E3E3FFFFEA026986E3E1FFFFEA90 +S1132B90206086E3DFFFFFEA106086E3DDFFFFEAE3 +S1132BA0026C86E3DBFFFFEA2A0050E30400000A1C +S1132BB0302040E2090052E30090A0830A00009A0A +S1132BC0120000EA08309DE5040083E208008DE568 +S1132BD0009093E5000059E3009069B2106086B359 +S1132BE00100D1E5025081E2080000EA0090A0E370 +S1132BF0099189E0300040E2899080E00100D3E44B +S1132C000350A0E1302040E2090052E3F7FFFF9AAD +S1132C10C99FC9E12E0050E30080A0131C00001AD4 +S1132C200000D5E52A0050E30500000A015085E2C2 +S1132C30303040E2090053E30080A0830700009A8B +S1132C40120000EA08309DE5042083E208208DE5A7 +S1132C50008093E50100D5E5025085E2090000EA11 +S1132C600530A0E10080A0E3088188E0300040E264 +S1132C70888080E00100D3E40350A0E1302040E2EA +S1132C80090052E3F7FFFF9A000058E3000000BA7E +S1132C90016C86E3680050E30600001A0000D5E5E5 +S1132CA0680050E3086086030100D50502508502E0 +S1132CB00150851204608613780050E300F19F9759 +S1132CC0780000EA68330000A82E0000A82E000057 +S1132CD0A82E0000A82E0000A82E0000A82E000098 +S1132CE0A82E0000A82E0000A82E0000A82E000088 +S1132CF0A82E0000A82E0000A82E0000A82E000078 +S1132D00A82E0000A82E0000A82E0000A82E000067 +S1132D10A82E0000A82E0000A82E0000A82E000057 +S1132D20A82E0000A82E0000A82E0000A82E000047 +S1132D30A82E0000A82E0000A82E0000A82E000037 +S1132D40A82E0000A82E0000A82E0000A82E000027 +S1132D50A82E0000A82E0000DC2E0000A82E0000E3 +S1132D60A82E0000A82E0000A82E0000A82E000007 +S1132D70A82E0000A82E0000A82E0000A82E0000F7 +S1132D80A82E0000A82E0000A82E0000A82E0000E7 +S1132D90A82E0000A82E0000A82E0000A82E0000D7 +S1132DA0A82E0000A82E0000A82E0000A82E0000C7 +S1132DB0A82E0000A82E0000A82E0000A82E0000B7 +S1132DC0A82E0000A82E0000A82E0000A82E0000A7 +S1132DD0A82E0000A82E0000A82E0000A82E000097 +S1132DE0A82E0000A82E0000A82E0000A82E000087 +S1132DF0A82E0000A82E0000A82E0000A82E000077 +S1132E00A82E0000A82E0000A82E0000A82E000066 +S1132E10A82E0000A82E0000A82E0000A82E000056 +S1132E20A82E0000F82F0000A82E0000A82E0000F5 +S1132E30A82E0000A82E0000A82E0000A82E000036 +S1132E40A82E0000A82E0000A82E0000A82E000026 +S1132E50EC2E000054300000A82E0000A82E000024 +S1132E60A82E0000A82E000054300000A82E000058 +S1132E70A82E0000A82E0000A82E0000382F000065 +S1132E8024300000CC2F0000A82E0000A82E000043 +S1132E905C2F0000A82E000040300000A82E000087 +S1132EA0A82E0000FC2F0000CC149FE500C091E583 +S1132EB000005CE31E01000A00808DE508308DE20D +S1132EC004308DE50710A0E10620A0E10930A0E15F +S1132ED00FE0A0E11CFF2FE1150100EA0700A0E1CB +S1132EE02510A0E3280300EB110100EA08309DE55A +S1132EF0042083E208208DE50040D3E5019049E2F7 +S1132F000600A0E10910A0E10720A0E1480300EBBE +S1132F100700A0E10410A0E11B0300EB100016E37E +S1132F200301000A2000A0E30910A0E10720A0E1AA +S1132F30300300EBFE0000EA080016E308309DE5CC +S1132F40042083E208208DE5003093E5002097E516 +S1132F500020C31500208305F50000EA08309DE534 +S1132F60042083E208208DE500A093E50A00A0E197 +S1132F70B2FEFFEB0040A0E1010C16E30030A00319 +S1132F800130A013000058E10030A0A3013003B2C7 +S1132F90000053E30840A011099064E00600A0E19A +S1132FA00910A0E10720A0E1210300EB000054E395 +S1132FB0D9FFFF0A0700A0E10110DAE4F20200EBF6 +S1132FC0014054E2FAFFFF1AD3FFFFEA08309DE5FF +S1132FD0042083E208208DE5003093E580A006E21A +S1132FE000005AE323A0A01300A0A003016C86E311 +S1132FF00880A0E33E0000EA026A86E3800016E34C +S113300000A0A0030300000A70339FE570A39FE5AE +S1133010780050E303A0A001010C16E3026CC61370 +S11330200F0000EA80A006E200005AE330A0A013DB +S113303000A0A003010C16E3026CC613080000EA0A +S1133040010C16E3026CC61300A0A0130400001ABE +S1133050020000EA016986E300A0A0E3000000EAA0 +S113306000A0A0E3010916E31400000A08309DE55E +S1133070042083E208208DE5003093E5040016E384 +S11330800338A0114338A0110100001A080016E308 +S1133090FF300312000053E3003063B22DA0A0B34D +S11330A0100000BA200016E32BA0A0130D00001A94 +S11330B0402006E2000052E320A0A013090000EA29 +S11330C008309DE5042083E208208DE5003093E577 +S11330D0040016E30338A0112338A0110100001ADC +S11330E0080016E3FF300312010C16E30200000A85 +S11330F0026CC6E3010C16E30000001A0180A0E391 +S1133100580040E2200050E300F19F97590000EA84 +S1133110B4310000783200007832000078320000C8 +S113312078320000783200007832000078320000F3 +S113313078320000783200007832000078320000E3 +S1133140A4310000783200007832000078320000A8 +S113315078320000A4310000783200007832000098 +S11331607832000078320000783200009431000098 +S1133170B431000078320000783200007832000068 +S113318078320000A4310000783200007832000068 +S1133190B4310000000053E30040A0031500001AFE +S11331A0350000EA000053E30040A0031A00001AAF +S11331B0310000EA000053E30040A0032E00000A9F +S11331C00040A0E3022A06E2000052E30F1003E2EB +S11331D0B0C19F150100DC17ACE19F050100DE07BB +S11331E00C108DE20100C4E7014084E22332B0E117 +S11331F0F4FFFF1A200000EA0040A0E3071003E2F6 +S1133200301081E20C208DE20210C4E7014084E218 +S1133210A331B0E1F8FFFF1A170000EA0040A0E371 +S1133220020906E22CC0A0E3000050E30500000AF6 +S1133230032004E2030052E318108D0204208100ED +S11332400CC042050140840218208DE2041082E083 +S11332509BE382E0A221A0E102E182E08E3043E020 +S1133260303083E20C3041E5014084E2003052E228 +S1133270ECFFFF1A000000EA0040A0E3088064E0CD +S1133280C88FC8E1099068E0099064E0FF005AE340 +S11332900190498200005AE301904912020C16E39E +S11332A00400001A0600A0E10910A0E10720A0E133 +S11332B05F0200EB0090A0E3FF005AE32A14A08110 +S11332C00700A081FF1001822F02008B00005AE347 +S11332D0FF100A120700A0112B02001B0600A0E138 +S11332E00910A0E10720A0E1510200EB3000A0E3A7 +S11332F00810A0E10720A0E13E0200EB010054E326 +S11333000600004A0C808DE2044088E00700A0E13A +S1133310011074E51C0200EB080054E1FAFFFF1AE7 +S1133320100016E32000A0130910A0110720A0111B +S11333303002001B0010D5E5000051E3EDFDFF1A3B +S1133340083097E5000053E30400000A002097E5E5 +S1133350041097E5010052E10010A0330210C337B6 +S1133360000097E5000000EA0000E0E318D08DE2D9 +S1133370F04FBDE81EFF2FE1CDCCCCCC9420004013 +S11333807830000058300000CC3F0000BC3F000003 +S113339010402DE90040A0E10030D1E5000053E3E6 +S11333A00400000A010070E3043091150130431257 +S11333B004308115020000EA08C091E50FE0A0E1A5 +S11333C01CFF2FE10400A0E11040BDE81EFF2FE127 +S11333D0F04F2DE90090A0E101B0A0E10280A0E14E +S11333E003A0A0E124609DE50050E0E3000000EAB2 +S11333F00450A0E1014085E20900A0E1CF0100EB07 +S11334000070A0E1380200EB000050E3F7FFFF1A60 +S11334100730A0E1010077E30040E0035900000A0F +S1133420068CC8E3000056E32B0000DA800018E3A2 +S11334300900000A2B0057E30200000A2D0057E39D +S11334400500001A018B88E3024085E20900A0E12F +S1133450BA0100EB0070A0E1016046E2000056E30F +S11334600030A0D30130A0C3300057E30030A013D4 +S1133470000053E31800000A028C88E3016046E26E +S1133480015084E20900A0E1AC0100EB0070A0E16E +S1133490000056E30D0000DA580050E378005013A2 +S11334A00A00001A10005AE300005A130700001A19 +S11334B0028CC8E3016046E2025084E20900A0E104 +S11334C09E0100EB0070A0E110A0A0E3300000EA30 +S11334D000005AE308A0A0032D0000EA00005AE30C +S11334E00AA0A003000056E30050A0D30A0000CABB +S11334F00F0000EA028C88E3016046E29A0525E0A9 +S1133500014084E20900A0E18C0100EB0070A0E11D +S1133510000056E30100001A050000EA0050A0E391 +S11335200700A0E10A10A0E1DA0100EB000050E37B +S1133530EFFFFFAA0700A0E10910A0E193FFFFEB52 +S1133540020C18E30140E0030E00000A010018E336 +S11335500C00001A00309BE5042083E200208BE578 +S1133560003093E5122D08E2120D52E3005065027B +S1133570100018E30050C3150200001A080018E3F5 +S1133580B050C311005083050400A0E1F04FBDE822 +S11335901EFF2FE10540A0E1D1FFFFEAF04F2DE926 +S11335A014D04DE204008DE501A0A0E110208DE5CA +S11335B00090A0E308908DE57CB59FE50A60A0E14A +S11335C00140D6E4000054E35701000A250054E307 +S11335D02900000A0400A0E1C30100EB000050E34D +S11335E00100001A120000EA0460A0E1014086E232 +S11335F00000D6E5BC0100EB000050E3F9FFFF1A20 +S1133600000000EA019089E204009DE54B0100EB13 +S11336100040A0E1B40100EB000050E3F8FFFF1A02 +S11336200400A0E104109DE558FFFFEB06A0A0E113 +S1133630E1FFFFEA04009DE5400100EB0050A0E13A +S1133640040050E10190890206A0A001DAFFFF0AFC +S113365004109DE54DFFFFEB08209DE5000052E3BB +S1133660010075030050A0130150A003000055E3AE +S11336700020E01308208DE52B0100EA0130DAE593 +S11336802A0053E302608A020180A0030080A01391 +S11336900640A0E10050A0E3060000EA0B0055E15B +S11336A0210100CA055185E0306046E2855096E06C +S11336B01D01004A208088E30470A0E1014084E2F7 +S11336C00060D7E504A0A0E10600A0E16C0100EBD6 +S11336D0000050E3F0FFFF1A0810A0E1202008E2E8 +S11336E0000052E30251E0034C0056E30160D705A9 +S11336F002A08702448088030800000A680056E399 +S11337000600001A0160D7E5680056E310808803BC +S11337100260D70503A0870202A0871208808113E4 +S1133720256046E2530056E306F19F97FE0000EA47 +S1133730803800002C3B00002C3B00002C3B000098 +S11337402C3B00002C3B00002C3B00002C3B0000D9 +S11337502C3B00002C3B00002C3B00002C3B0000C9 +S11337602C3B00002C3B00002C3B00002C3B0000B9 +S11337702C3B00002C3B00002C3B00002C3B0000A9 +S11337802C3B00002C3B00002C3B00002C3B000099 +S11337902C3B00002C3B00002C3B00002C3B000089 +S11337A02C3B00002C3B00002C3B00002C3B000079 +S11337B02C3B00002C3B00002C3B00002C3B000069 +S11337C02C3B00002C3B00002C3B00002C3B000059 +S11337D02C3B00002C3B00002C3B00002C3B000049 +S11337E02C3B00002C3B00002C3B00002C3B000039 +S11337F02C3B00002C3B00002C3B0000CC3A00008A +S11338002C3B00002C3B00002C3B00002C3B000018 +S11338102C3B00002C3B00002C3B00002C3B000008 +S11338202C3B00002C3B0000C43800004039000051 +S11338302C3B00002C3B00002C3B00002C3B0000E8 +S1133840603900002C3B00002C3B00002C3B0000A6 +S11338502C3B000080390000B4390000D43900004A +S11338602C3B00002C3B0000F43900002C3B0000F2 +S1133870AC3A00002C3B00002C3B0000CC3A00008A +S113388004009DE5AD0000EB0040A0E1250050E3FD +S11338900190890248FFFF0A04109DE5BBFEFFEB7F +S11338A008309DE5010074E3000053030040A003C9 +S11338B00140A013000054E30030E00308308DE51C +S11338C0990000EA203008E2000053E30150A0030D +S11338D0018018E210309D050420830210208D051C +S11338E0004093050040A013000055E38E00000A39 +S11338F00D0000DA04009DE5900000EB010070E388 +S11339000400001A08209DE5000052E30020E003B3 +S113391008208DE5840000EA000058E30100C40497 +S1133920019089E2015055E2F1FFFF1A000058E3CB +S113393008309D050130830208308D051EFFFFEA23 +S113394000508DE504009DE510108DE2802088E391 +S11339500A30A0E39DFEFFEB0040A0E1610000EA15 +S113396000508DE504009DE510108DE2802088E371 +S11339700030A0E395FEFFEB0040A0E1590000EA0F +S1133980010018E30CFFFF1A10309DE5042083E2C8 +S113399010208DE5003093E5100018E30090C31566 +S11339A005FFFF1A080018E3B090C31100908305C7 +S11339B001FFFFEA00508DE504009DE510108DE243 +S11339C0802088E30830A0E380FEFFEB0040A0E104 +S11339D0440000EA00508DE504009DE510108DE2DE +S11339E01E20C8E31030A0E378FEFFEB0040A0E106 +S11339F03C0000EA0040E0E3014084E204009DE56D +S1133A004E0000EB0060A0E1B70000EB000050E3C3 +S1133A10F8FFFF1A010076E30040E0033100000ADA +S1133A20017018E210309D050420830210208D05DA +S1133A30003093050C308D050020A0130C208D154B +S1133A40000055E30C0000CA0F0000EA015045E2F3 +S1133A50000057E30C309D050160C3040C308D0554 +S1133A60014084E204009DE5340000EB0060A0E125 +S1133A70010070E300005513030000DA0600A0E122 +S1133A80990000EB000050E3EFFFFF0A0600A0E1FD +S1133A9004109DE53DFEFFEB000057E30020A0036A +S1133AA00C309D050020C3050E0000EA00508DE592 +S1133AB004009DE510108DE2802088E30A30A0E325 +S1133AC042FEFFEB0040A0E1060000EA00508DE555 +S1133AD004009DE510108DE2802088E31030A0E3FF +S1133AE03AFEFFEB0040A0E1000054E3080000AA06 +S1133AF008209DE5010074E3000052030040A00388 +S1133B000140A013000054E30020E00308208DE5E9 +S1133B10050000EA010018E308309D050130830226 +S1133B2008308D05049089E0A3FEFFEA08009DE5B6 +S1133B3014D08DE2F04FBDE81EFF2FE1CCCCCC0CAD +S1133B4004E02DE50030A0E10020D0E5000052E3C0 +S1133B500600000A042090E50000D2E5000050E3CE +S1133B6001208212042083150500001A030000EAD4 +S1133B7004C090E50FE0A0E11CFF2FE1000000EA83 +S1133B800000E0E304E09DE41EFF2FE110402DE976 +S1133B900040A0E1FF0001E2081094E5000051E3B9 +S1133BA00600000A003094E5042094E501C083E295 +S1133BB002005CE10000A003020053E10300C137EE +S1133BC00C3094E5000053E30500000A001094E56E +S1133BD0042094E5020051E10410A0310FE0A0316B +S1133BE013FF2F31003094E5013083E2003084E587 +S1133BF01040BDE81EFF2FE1F0402DE90250A0E186 +S1133C00010051E30800004A0160A0E10040A0E384 +S1133C10FF7000E20500A0E10710A0E1DAFFFFEB6E +S1133C20014084E2060054E1F9FFFF1AF040BDE8C8 +S1133C301EFF2FE104E02DE5100010E30400001A3C +S1133C40020C00E2000050E32000A0033000A013A7 +S1133C50E8FFFFEB04E09DE41EFF2FE1410040E29A +S1133C60190050E30000A0830100A0931EFF2FE180 +S1133C70610040E2190050E30000A0830100A0931A +S1133C801EFF2FE1300040E2090050E30000A08352 +S1133C900100A0931EFF2FE130402DE90040A0E178 +S1133CA00150A0E1F6FFFFEB000050E330004412A6 +S1133CB00900001A0400A0E1ECFFFFEB000050E350 +S1133CC0570044120400001A0400A0E1E2FFFFEBD5 +S1133CD0000050E3370044120000E003050050E107 +S1133CE00000E0A33040BDE81EFF2FE1093040E2B0 +S1133CF0200050E3040053130000A0830100A093AC +S1133D001EFF2FE130402DE904D04DE20050A0E128 +S1133D1004408DE2041024E5090000EB0500A0E155 +S1133D20120000EB0D00A0E1100000EB170000EB07 +S1133D30040000EB00009DE504D08DE23040BDE8B6 +S1133D401EFF2FE11EFF2FE11EFF2FE100000000E8 +S1133D50100E10EE010010E3FCFFFF0A100E11EE2E +S1133D601EFF2FE10000A0E10000A0E10000A0E19F +S1133D7002002DE9101E10EE020011E3FCFFFF1AF1 +S1133D80100E01EE0200BDE81EFF2FE10000A0E1CD +S1133D90F0472DE90480A0E30870A0E10090A0E3BF +S1133DA0EAFFFFEB2042A0E10F0000E20A0050E32B +S1133DB000F19F97F9FFFFEAE43D0000383E000060 +S1133DC0F43E0000203F0000303F0000803F000030 +S1133DD0903E0000A03D0000A03D00003C3F0000DC +S1133DE0B03F0000D9FFFFEB000054E36600001A67 +S1133DF00D0000EAD5FFFFEB0730A0E10100C5E4A8 +S1133E00014054E20020A0030120A013013053E23A +S1133E100010A00301100212000051E32004A011BD +S1133E20F5FFFF1A000052E3F1FFFF1A0100A0E3BF +S1133E30CEFFFFEBD9FFFFEAC4FFFFEB000054E322 +S1133E400060A0110950A0110B00001A0C0000EA38 +S1133E502554A0E1000054E30120D614025C85112E +S1133E6001404412013053E2F8FFFF1A0500A0E1BB +S1133E70BEFFFFEB000054E30100000A0730A0E19D +S1133E80F2FFFFEA0100A0E3B8FFFFEBC3FFFFEA84 +S1133E90AEFFFFEB000054E30150A0033E00001A04 +S1133EA0100000EAA9FFFFEB0730A0E10110D6E4FF +S1133EB0FF2000E2020051E10050A013014054E24F +S1133EC00020A0030120A013013053E20010A0033E +S1133ED001100212000051E32004A011F2FFFF1AA6 +S1133EE0000052E3EEFFFF1A0500A0E19FFFFFEB85 +S1133EF0AAFFFFEA95FFFFEB0050A0E193FFFFEB61 +S1133F00000054E30200000A0100C5E4014054E249 +S1133F10FCFFFF1A0100A0E394FFFFEB9FFFFFEA01 +S1133F208AFFFFEB0100A0E390FFFFEB9BFFFFEA9A +S1133F300100A0E38DFFFFEB98FFFFEA83FFFFEB97 +S1133F400040A0E181FFFFEB0050A0E17FFFFFEB09 +S1133F500060A0E17DFFFFEB00A0A0E17BFFFFEB91 +S1133F600030A0E10500A0E10610A0E10A20A0E1D4 +S1133F700FE0A0E114FF2FE17CFFFFEB87FFFFEAD6 +S1133F800100A0E379FFFFEB080000EA0050A0E184 +S1133F906EFFFFEB0830A0E197FFFFEA0060A0E1AD +S1133FA06AFFFFEB0150A0E30830A0E1BEFFFFEA87 +S10B3FB0F047BDE81EFF2FE1FC +S1133FB80102040830313233343536373839616216 +S1133FC863646566303132333435363738394142C3 +S1073FD843444546CF S90320607C diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzp b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzp index 4712f430..773e1a8a 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzp +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzs b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzs index 76b2d7cb..5fbe4cce 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzs +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_Crossworks/Prog/ide/lpc2294_crossworks.hzs @@ -56,7 +56,7 @@ - + diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Boot/makefile b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Boot/makefile index b510d89a..a6b622cb 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Boot/makefile +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Boot/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E diff --git a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Prog/makefile b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Prog/makefile index bf7e81b1..e1e3fcce 100644 --- a/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Prog/makefile +++ b/Target/Demo/ARM7_LPC2000_Olimex_LPC_L2294_GCC/Prog/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzp b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzp index 01dc34e0..8bb6e591 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzp +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzs b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzs index 5cb28b1e..50f78854 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzs +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Boot/ide/EFM32G880_crossworks.hzs @@ -26,6 +26,7 @@ + @@ -57,7 +58,9 @@ - + + + diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.elf b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.elf index ef0ede10..43a3394f 100644 Binary files a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.elf and b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.elf differ diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.map b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.map index 10a810a5..02b006d2 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.map +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.map @@ -59,18 +59,18 @@ Discarded input sections .text.SystemHFXOClockGet 0x00000000 0x18 THUMB Flash Debug/../../obj/system_efm32.o .text.SystemHFXOClockSet - 0x00000000 0x34 THUMB Flash Debug/../../obj/system_efm32.o + 0x00000000 0x38 THUMB Flash Debug/../../obj/system_efm32.o .text.SystemULFRCOClockGet 0x00000000 0x10 THUMB Flash Debug/../../obj/system_efm32.o .text.SystemLFXOClockSet - 0x00000000 0x34 THUMB Flash Debug/../../obj/system_efm32.o + 0x00000000 0x38 THUMB Flash Debug/../../obj/system_efm32.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_acmp.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_acmp.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_acmp.o .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_acmp.o .text.ACMP_CapsenseInit - 0x00000000 0x84 THUMB Flash Debug/../../obj/efm32_acmp.o + 0x00000000 0x88 THUMB Flash Debug/../../obj/efm32_acmp.o .text.ACMP_CapsenseChannelSet 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_acmp.o .text.ACMP_Disable @@ -84,7 +84,7 @@ Discarded input sections .text.ACMP_ChannelSet 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_acmp.o .text.ACMP_Init - 0x00000000 0x90 THUMB Flash Debug/../../obj/efm32_acmp.o + 0x00000000 0x98 THUMB Flash Debug/../../obj/efm32_acmp.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_adc.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_adc.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_adc.o @@ -95,15 +95,15 @@ Discarded input sections .text.ADC_Init 0x00000000 0x68 THUMB Flash Debug/../../obj/efm32_adc.o .text.ADC_InitScan - 0x00000000 0x9c THUMB Flash Debug/../../obj/efm32_adc.o - .text.ADC_InitSingle 0x00000000 0xa0 THUMB Flash Debug/../../obj/efm32_adc.o + .text.ADC_InitSingle + 0x00000000 0xa4 THUMB Flash Debug/../../obj/efm32_adc.o .text.ADC_PrescaleCalc - 0x00000000 0x78 THUMB Flash Debug/../../obj/efm32_adc.o + 0x00000000 0x80 THUMB Flash Debug/../../obj/efm32_adc.o .text.ADC_Reset 0x00000000 0x88 THUMB Flash Debug/../../obj/efm32_adc.o .text.ADC_TimebaseCalc - 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_adc.o + 0x00000000 0x68 THUMB Flash Debug/../../obj/efm32_adc.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_aes.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_aes.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_aes.o @@ -124,7 +124,7 @@ Discarded input sections .text.AES_CTRUpdate32Bit 0x00000000 0x40 THUMB Flash Debug/../../obj/efm32_aes.o .text.AES_DecryptKey128 - 0x00000000 0xc0 THUMB Flash Debug/../../obj/efm32_aes.o + 0x00000000 0xc8 THUMB Flash Debug/../../obj/efm32_aes.o .text.AES_DecryptKey256 0x00000000 0x118 THUMB Flash Debug/../../obj/efm32_aes.o .text.AES_ECB128 @@ -146,13 +146,13 @@ Discarded input sections .text.CMU_Calibrate 0x00000000 0xc8 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_ClockDivGet - 0x00000000 0xec THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00000000 0x104 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_FreezeEnable 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_HFRCOBandGet 0x00000000 0x20 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_HFRCOBandSet - 0x00000000 0x100 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00000000 0x118 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_HFRCOStartupDelayGet 0x00000000 0x20 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_HFRCOStartupDelaySet @@ -168,20 +168,20 @@ Discarded input sections .text.CMU_PCNTClockExternalGet 0x00000000 0x78 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_PCNTClockExternalSet - 0x00000000 0x40 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_cmu.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dac.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dac.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dac.o .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_dac.o .text.DAC_Enable - 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_dac.o + 0x00000000 0x44 THUMB Flash Debug/../../obj/efm32_dac.o .text.DAC_Init - 0x00000000 0xf4 THUMB Flash Debug/../../obj/efm32_dac.o + 0x00000000 0x100 THUMB Flash Debug/../../obj/efm32_dac.o .text.DAC_InitChannel 0x00000000 0x64 THUMB Flash Debug/../../obj/efm32_dac.o .text.DAC_PrescaleCalc - 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_dac.o + 0x00000000 0x74 THUMB Flash Debug/../../obj/efm32_dac.o .text.DAC_Reset 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_dac.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dbg.o @@ -190,9 +190,9 @@ Discarded input sections .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_dbg.o .text.GPIO_DbgSWOEnable - 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_dbg.o + 0x00000000 0x2c THUMB Flash Debug/../../obj/efm32_dbg.o .text.DBG_SWOEnable - 0x00000000 0x90 THUMB Flash Debug/../../obj/efm32_dbg.o + 0x00000000 0xa8 THUMB Flash Debug/../../obj/efm32_dbg.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dma.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dma.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_dma.o @@ -209,15 +209,15 @@ Discarded input sections .text.DMA_IRQHandler 0x00000000 0xf4 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_ActivateAuto - 0x00000000 0x5c THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_ActivateBasic - 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_ActivatePingPong - 0x00000000 0x64 THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_ActivateScatterGather 0x00000000 0x15c THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_CfgChannel - 0x00000000 0xc0 THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0xcc THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_CfgDescr 0x00000000 0x84 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_CfgDescrScatterGather @@ -225,28 +225,28 @@ Discarded input sections .text.DMA_ChannelEnabled 0x00000000 0x2c THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_Init - 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0x88 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_RefreshPingPong 0x00000000 0x118 THUMB Flash Debug/../../obj/efm32_dma.o .text.DMA_Reset - 0x00000000 0xd4 THUMB Flash Debug/../../obj/efm32_dma.o + 0x00000000 0xdc THUMB Flash Debug/../../obj/efm32_dma.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_ebi.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_ebi.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_ebi.o .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_Init - 0x00000000 0x194 THUMB Flash Debug/../../obj/efm32_ebi.o + 0x00000000 0x1dc THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_Disable 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_BankEnable - 0x00000000 0x8c THUMB Flash Debug/../../obj/efm32_ebi.o + 0x00000000 0xa4 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_BankAddress 0x00000000 0x80 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_ChipSelectEnable - 0x00000000 0x8c THUMB Flash Debug/../../obj/efm32_ebi.o + 0x00000000 0xa4 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_PolaritySet - 0x00000000 0x9c THUMB Flash Debug/../../obj/efm32_ebi.o + 0x00000000 0xb8 THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_ReadTimingSet 0x00000000 0x4c THUMB Flash Debug/../../obj/efm32_ebi.o .text.EBI_WriteTimingSet @@ -257,17 +257,17 @@ Discarded input sections .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_emu.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_emu.o .text.SystemCoreClockUpdate - 0x00000000 0xc THUMB Flash Debug/../../obj/efm32_emu.o + 0x00000000 0x10 THUMB Flash Debug/../../obj/efm32_emu.o .text.CMU_Lock 0x00000000 0x1c THUMB Flash Debug/../../obj/efm32_emu.o .text.CMU_Unlock 0x00000000 0x1c THUMB Flash Debug/../../obj/efm32_emu.o .text.EMU_Restore - 0x00000000 0xf8 THUMB Flash Debug/../../obj/efm32_emu.o + 0x00000000 0x104 THUMB Flash Debug/../../obj/efm32_emu.o .text.EMU_EnterEM2 - 0x00000000 0x64 THUMB Flash Debug/../../obj/efm32_emu.o + 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_emu.o .text.EMU_EnterEM3 - 0x00000000 0x94 THUMB Flash Debug/../../obj/efm32_emu.o + 0x00000000 0xac THUMB Flash Debug/../../obj/efm32_emu.o .text.EMU_EnterEM4 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_emu.o .text.EMU_MemPwrDown @@ -280,7 +280,7 @@ Discarded input sections .text.GPIO_DbgLocationSet 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_gpio.o .text.GPIO_IntConfig - 0x00000000 0xf0 THUMB Flash Debug/../../obj/efm32_gpio.o + 0x00000000 0x100 THUMB Flash Debug/../../obj/efm32_gpio.o .text.GPIO_PinInGet 0x00000000 0x40 THUMB Flash Debug/../../obj/efm32_gpio.o .text.GPIO_PinOutClear @@ -313,19 +313,19 @@ Discarded input sections .bss.i2cTransfer 0x00000000 0x10 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_BusFreqGet - 0x00000000 0x54 THUMB Flash Debug/../../obj/efm32_i2c.o + 0x00000000 0x58 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_BusFreqSet - 0x00000000 0x94 THUMB Flash Debug/../../obj/efm32_i2c.o + 0x00000000 0x98 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_Enable - 0x00000000 0x24 THUMB Flash Debug/../../obj/efm32_i2c.o + 0x00000000 0x2c THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_Init - 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_i2c.o + 0x00000000 0x74 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_Reset 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_Transfer 0x00000000 0x484 THUMB Flash Debug/../../obj/efm32_i2c.o .text.I2C_TransferInit - 0x00000000 0xd4 THUMB Flash Debug/../../obj/efm32_i2c.o + 0x00000000 0xd8 THUMB Flash Debug/../../obj/efm32_i2c.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_int.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_int.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_int.o @@ -343,19 +343,19 @@ Discarded input sections .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_Initialize - 0x00000000 0x80 THUMB Flash Debug/../../obj/efm32_lcd.o + 0x00000000 0x8c THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_VLCDSelect 0x00000000 0x4c THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_UpdateCtrl 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_FrameCountInit - 0x00000000 0x54 THUMB Flash Debug/../../obj/efm32_lcd.o + 0x00000000 0x58 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_AnimInit - 0x00000000 0x7c THUMB Flash Debug/../../obj/efm32_lcd.o + 0x00000000 0x84 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_SegmentRangeEnable 0x00000000 0x54 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_SegmentSet - 0x00000000 0x130 THUMB Flash Debug/../../obj/efm32_lcd.o + 0x00000000 0x160 THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_SegmentSetLow 0x00000000 0xfc THUMB Flash Debug/../../obj/efm32_lcd.o .text.LCD_SegmentSetHigh @@ -375,34 +375,34 @@ Discarded input sections .text.LETIMER_CompareGet 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_CompareSet - 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_letimer.o + 0x00000000 0x58 THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_Enable - 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_letimer.o + 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_FreezeEnable 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_Init - 0x00000000 0x114 THUMB Flash Debug/../../obj/efm32_letimer.o + 0x00000000 0x124 THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_RepeatGet 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_RepeatSet - 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_letimer.o + 0x00000000 0x58 THUMB Flash Debug/../../obj/efm32_letimer.o .text.LETIMER_Reset - 0x00000000 0x64 THUMB Flash Debug/../../obj/efm32_letimer.o + 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_letimer.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_leuart.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_leuart.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_BaudrateCalc 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_BaudrateGet - 0x00000000 0x64 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_Reset - 0x00000000 0x6c THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00000000 0x78 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_RxExt 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_Tx - 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_TxExt - 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_leuart.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_mpu.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_mpu.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_mpu.o @@ -429,21 +429,21 @@ Discarded input sections .text.PCNT_Sync 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_CounterReset - 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_CounterTopSet - 0x00000000 0xb0 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0xdc THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_Enable - 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_FreezeEnable 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_Init - 0x00000000 0x124 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x160 THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_Reset - 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x94 THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_TopBufferSet - 0x00000000 0x24 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_pcnt.o .text.PCNT_TopSet - 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_pcnt.o + 0x00000000 0x40 THUMB Flash Debug/../../obj/efm32_pcnt.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_prs.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_prs.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_prs.o @@ -459,9 +459,9 @@ Discarded input sections .text.EMU_Unlock 0x00000000 0x18 THUMB Flash Debug/../../obj/efm32_rmu.o .text.RMU_LockupResetDisable - 0x00000000 0x28 THUMB Flash Debug/../../obj/efm32_rmu.o + 0x00000000 0x2c THUMB Flash Debug/../../obj/efm32_rmu.o .text.RMU_ResetCauseClear - 0x00000000 0x68 THUMB Flash Debug/../../obj/efm32_rmu.o + 0x00000000 0x80 THUMB Flash Debug/../../obj/efm32_rmu.o .text.RMU_ResetCauseGet 0x00000000 0x88 THUMB Flash Debug/../../obj/efm32_rmu.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_rtc.o @@ -474,17 +474,17 @@ Discarded input sections .text.RTC_CompareGet 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_CompareSet - 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_rtc.o + 0x00000000 0x58 THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_Enable - 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_rtc.o + 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_FreezeEnable 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_Init - 0x00000000 0x5c THUMB Flash Debug/../../obj/efm32_rtc.o + 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_Reset 0x00000000 0x60 THUMB Flash Debug/../../obj/efm32_rtc.o .text.RTC_CounterReset - 0x00000000 0x18 THUMB Flash Debug/../../obj/efm32_rtc.o + 0x00000000 0x24 THUMB Flash Debug/../../obj/efm32_rtc.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_system.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_system.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_system.o @@ -509,21 +509,21 @@ Discarded input sections .data 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_usart.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_BaudrateAsyncSet - 0x00000000 0xbc THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0xc4 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_BaudrateCalc 0x00000000 0xd0 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_BaudrateGet - 0x00000000 0x5c THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0x68 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_BaudrateSyncSet - 0x00000000 0x70 THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0x78 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_Enable 0x00000000 0x34 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_InitAsync - 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0x54 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_InitSync - 0x00000000 0x74 THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0x80 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_InitIrDA - 0x00000000 0xa8 THUMB Flash Debug/../../obj/efm32_usart.o + 0x00000000 0xac THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_Reset 0x00000000 0x68 THUMB Flash Debug/../../obj/efm32_usart.o .text.USART_Rx @@ -550,7 +550,7 @@ Discarded input sections .text.VCMP_IntClear 0x00000000 0x1c THUMB Flash Debug/../../obj/efm32_vcmp.o .text.VCMP_Init - 0x00000000 0x190 THUMB Flash Debug/../../obj/efm32_vcmp.o + 0x00000000 0x1a8 THUMB Flash Debug/../../obj/efm32_vcmp.o .text.VCMP_LowPowerRefSet 0x00000000 0x3c THUMB Flash Debug/../../obj/efm32_vcmp.o .text.VCMP_TriggerSet @@ -561,13 +561,13 @@ Discarded input sections .text.BITBAND_Peripheral 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_wdog.o .text.WDOG_Enable - 0x00000000 0x48 THUMB Flash Debug/../../obj/efm32_wdog.o + 0x00000000 0x50 THUMB Flash Debug/../../obj/efm32_wdog.o .text.WDOG_Feed 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_wdog.o .text.WDOG_Init - 0x00000000 0xdc THUMB Flash Debug/../../obj/efm32_wdog.o + 0x00000000 0xe8 THUMB Flash Debug/../../obj/efm32_wdog.o .text.WDOG_Lock - 0x00000000 0x30 THUMB Flash Debug/../../obj/efm32_wdog.o + 0x00000000 0x38 THUMB Flash Debug/../../obj/efm32_wdog.o .text 0x00000000 0x0 THUMB Flash Debug/../../obj/lcdcontroller.o .data 0x00000000 0x0 THUMB Flash Debug/../../obj/lcdcontroller.o .bss 0x00000000 0x0 THUMB Flash Debug/../../obj/lcdcontroller.o @@ -580,17 +580,17 @@ Discarded input sections .data.EM_Numbers 0x00000000 0x18 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_Number - 0x00000000 0x14c THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00000000 0x15c THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_NumberOff - 0x00000000 0x80 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00000000 0x84 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_Write - 0x00000000 0x108 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00000000 0x118 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_AllOn 0x00000000 0x5c THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_Battery - 0x00000000 0x8c THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00000000 0x98 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_Disable - 0x00000000 0x50 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00000000 0x54 THUMB Flash Debug/../../obj/lcdcontroller.o .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) @@ -1143,9 +1143,9 @@ FLASH 0x00004000 0x0001c000 xr Linker script and memory map - 0x00006b6c __do_debug_operation = __do_debug_operation_bkpt - 0x00006014 __vfprintf = __vfprintf_int - 0x00006780 __vfscanf = __vfscanf_int + 0x00006dec __do_debug_operation = __do_debug_operation_bkpt + 0x00006294 __vfprintf = __vfprintf_int + 0x00006a00 __vfscanf = __vfscanf_int 0xe000e000 __CM3_System_Control_Space_segment_start__ = 0xe000e000 0xe000f000 __CM3_System_Control_Space_segment_end__ = 0xe000f000 0x20000000 __RAM_segment_start__ = 0x20000000 @@ -1192,7 +1192,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .init is too large to fit in FLASH memory segment) 0x000041e8 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x000041e8 0x29a4 +.text 0x000041e8 0x2c24 0x000041e8 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs @@ -1200,197 +1200,197 @@ Linker script and memory map .text.LEUART_IntClear 0x000041e8 0x1c THUMB Flash Debug/../../obj/boot.o .text.BootActivate - 0x00004204 0x1c THUMB Flash Debug/../../obj/boot.o + 0x00004204 0x24 THUMB Flash Debug/../../obj/boot.o .text.BootComInit - 0x00004220 0xf8 THUMB Flash Debug/../../obj/boot.o - 0x00004220 BootComInit + 0x00004228 0x138 THUMB Flash Debug/../../obj/boot.o + 0x00004228 BootComInit .text.BootComCheckActivationRequest - 0x00004318 0xc8 THUMB Flash Debug/../../obj/boot.o - 0x00004318 BootComCheckActivationRequest + 0x00004360 0xdc THUMB Flash Debug/../../obj/boot.o + 0x00004360 BootComCheckActivationRequest .text.UartReceiveByte - 0x000043e0 0x44 THUMB Flash Debug/../../obj/boot.o + 0x0000443c 0x48 THUMB Flash Debug/../../obj/boot.o .text.IrqInterruptEnable - 0x00004424 0xc THUMB Flash Debug/../../obj/irq.o - 0x00004424 IrqInterruptEnable - .text.LedInit 0x00004430 0x14 THUMB Flash Debug/../../obj/led.o - 0x00004430 LedInit + 0x00004484 0xc THUMB Flash Debug/../../obj/irq.o + 0x00004484 IrqInterruptEnable + .text.LedInit 0x00004490 0x18 THUMB Flash Debug/../../obj/led.o + 0x00004490 LedInit .text.LedToggle - 0x00004444 0x90 THUMB Flash Debug/../../obj/led.o - 0x00004444 LedToggle + 0x000044a8 0xa4 THUMB Flash Debug/../../obj/led.o + 0x000044a8 LedToggle .text.CHIP_Init - 0x000044d4 0x1e8 THUMB Flash Debug/../../obj/main.o - .text.main 0x000046bc 0x18 THUMB Flash Debug/../../obj/main.o - 0x000046bc main - .text.Init 0x000046d4 0x160 THUMB Flash Debug/../../obj/main.o + 0x0000454c 0x1ec THUMB Flash Debug/../../obj/main.o + .text.main 0x00004738 0x30 THUMB Flash Debug/../../obj/main.o + 0x00004738 main + .text.Init 0x00004768 0x1e4 THUMB Flash Debug/../../obj/main.o .text.NVIC_SetPriority - 0x00004834 0x58 THUMB Flash Debug/../../obj/timer.o + 0x0000494c 0x58 THUMB Flash Debug/../../obj/timer.o .text.SysTick_Config - 0x0000488c 0x64 THUMB Flash Debug/../../obj/timer.o + 0x000049a4 0x68 THUMB Flash Debug/../../obj/timer.o .text.TimerInit - 0x000048f0 0x34 THUMB Flash Debug/../../obj/timer.o - 0x000048f0 TimerInit + 0x00004a0c 0x44 THUMB Flash Debug/../../obj/timer.o + 0x00004a0c TimerInit .text.TimerDeinit - 0x00004924 0x18 THUMB Flash Debug/../../obj/timer.o - 0x00004924 TimerDeinit + 0x00004a50 0x18 THUMB Flash Debug/../../obj/timer.o + 0x00004a50 TimerDeinit .text.TimerSet - 0x0000493c 0x20 THUMB Flash Debug/../../obj/timer.o - 0x0000493c TimerSet + 0x00004a68 0x20 THUMB Flash Debug/../../obj/timer.o + 0x00004a68 TimerSet .text.TimerGet - 0x0000495c 0x18 THUMB Flash Debug/../../obj/timer.o - 0x0000495c TimerGet + 0x00004a88 0x18 THUMB Flash Debug/../../obj/timer.o + 0x00004a88 TimerGet .text.TimerISRHandler - 0x00004974 0x24 THUMB Flash Debug/../../obj/timer.o - 0x00004974 TimerISRHandler + 0x00004aa0 0x24 THUMB Flash Debug/../../obj/timer.o + 0x00004aa0 TimerISRHandler .text.UnusedISR - 0x00004998 0x8 THUMB Flash Debug/../../obj/vectors.o - 0x00004998 UnusedISR + 0x00004ac4 0x8 THUMB Flash Debug/../../obj/vectors.o + 0x00004ac4 UnusedISR .text.SystemCoreClockGet - 0x000049a0 0x3c THUMB Flash Debug/../../obj/system_efm32.o - 0x000049a0 SystemCoreClockGet + 0x00004acc 0x44 THUMB Flash Debug/../../obj/system_efm32.o + 0x00004acc SystemCoreClockGet .text.SystemHFClockGet - 0x000049dc 0xe8 THUMB Flash Debug/../../obj/system_efm32.o - 0x000049dc SystemHFClockGet + 0x00004b10 0xe8 THUMB Flash Debug/../../obj/system_efm32.o + 0x00004b10 SystemHFClockGet .text.SystemInit - 0x00004ac4 0xc THUMB Flash Debug/../../obj/system_efm32.o - 0x00004ac4 SystemInit + 0x00004bf8 0xc THUMB Flash Debug/../../obj/system_efm32.o + 0x00004bf8 SystemInit .text.SystemLFRCOClockGet - 0x00004ad0 0x10 THUMB Flash Debug/../../obj/system_efm32.o - 0x00004ad0 SystemLFRCOClockGet + 0x00004c04 0x10 THUMB Flash Debug/../../obj/system_efm32.o + 0x00004c04 SystemLFRCOClockGet .text.SystemLFXOClockGet - 0x00004ae0 0x18 THUMB Flash Debug/../../obj/system_efm32.o - 0x00004ae0 SystemLFXOClockGet + 0x00004c14 0x18 THUMB Flash Debug/../../obj/system_efm32.o + 0x00004c14 SystemLFXOClockGet .text.BITBAND_Peripheral - 0x00004af8 0x30 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004c2c 0x30 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_FlashWaitStateMax - 0x00004b28 0x68 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004c5c 0x68 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_DivToLog2 - 0x00004b90 0x2c THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004cc4 0x2c THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_FlashWaitStateControl - 0x00004bbc 0xa4 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004cf0 0xa4 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_AUXClkGet - 0x00004c60 0x20 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004d94 0x20 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_DBGClkGet - 0x00004c80 0x48 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004db4 0x5c THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_LFClkGet - 0x00004cc8 0x7c THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004e10 0x8c THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_Sync - 0x00004d44 0x40 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004e9c 0x40 THUMB Flash Debug/../../obj/efm32_cmu.o .text.CMU_ClockDivSet - 0x00004d84 0x1f0 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x00004d84 CMU_ClockDivSet + 0x00004edc 0x248 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00004edc CMU_ClockDivSet .text.CMU_ClockEnable - 0x00004f74 0xc8 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x00004f74 CMU_ClockEnable + 0x00005124 0xd4 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00005124 CMU_ClockEnable .text.CMU_ClockFreqGet - 0x0000503c 0x1f8 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x0000503c CMU_ClockFreqGet + 0x000051f8 0x24c THUMB Flash Debug/../../obj/efm32_cmu.o + 0x000051f8 CMU_ClockFreqGet .text.CMU_ClockSelectGet - 0x00005234 0x114 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x00005234 CMU_ClockSelectGet + 0x00005444 0x114 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00005444 CMU_ClockSelectGet .text.CMU_ClockSelectSet - 0x00005348 0x194 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x00005348 CMU_ClockSelectSet + 0x00005558 0x1c0 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00005558 CMU_ClockSelectSet .text.CMU_OscillatorEnable - 0x000054dc 0xe0 THUMB Flash Debug/../../obj/efm32_cmu.o - 0x000054dc CMU_OscillatorEnable + 0x00005718 0xe4 THUMB Flash Debug/../../obj/efm32_cmu.o + 0x00005718 CMU_OscillatorEnable .text.EMU_UpdateOscConfig - 0x000055bc 0x20 THUMB Flash Debug/../../obj/efm32_emu.o - 0x000055bc EMU_UpdateOscConfig + 0x000057fc 0x20 THUMB Flash Debug/../../obj/efm32_emu.o + 0x000057fc EMU_UpdateOscConfig .text.GPIO_DriveModeSet - 0x000055dc 0x54 THUMB Flash Debug/../../obj/efm32_gpio.o - 0x000055dc GPIO_DriveModeSet + 0x0000581c 0x54 THUMB Flash Debug/../../obj/efm32_gpio.o + 0x0000581c GPIO_DriveModeSet .text.GPIO_PinModeSet - 0x00005630 0x1ac THUMB Flash Debug/../../obj/efm32_gpio.o - 0x00005630 GPIO_PinModeSet + 0x00005870 0x1ac THUMB Flash Debug/../../obj/efm32_gpio.o + 0x00005870 GPIO_PinModeSet .text.LEUART_Sync - 0x000057dc 0x34 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005a1c 0x34 THUMB Flash Debug/../../obj/efm32_leuart.o .text.LEUART_BaudrateSet - 0x00005810 0x88 THUMB Flash Debug/../../obj/efm32_leuart.o - 0x00005810 LEUART_BaudrateSet + 0x00005a50 0x94 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005a50 LEUART_BaudrateSet .text.LEUART_Enable - 0x00005898 0x44 THUMB Flash Debug/../../obj/efm32_leuart.o - 0x00005898 LEUART_Enable + 0x00005ae4 0x48 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005ae4 LEUART_Enable .text.LEUART_FreezeEnable - 0x000058dc 0x38 THUMB Flash Debug/../../obj/efm32_leuart.o - 0x000058dc LEUART_FreezeEnable + 0x00005b2c 0x38 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005b2c LEUART_FreezeEnable .text.LEUART_Init - 0x00005914 0x70 THUMB Flash Debug/../../obj/efm32_leuart.o - 0x00005914 LEUART_Init + 0x00005b64 0x88 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005b64 LEUART_Init .text.LEUART_Rx - 0x00005984 0x28 THUMB Flash Debug/../../obj/efm32_leuart.o - 0x00005984 LEUART_Rx + 0x00005bec 0x28 THUMB Flash Debug/../../obj/efm32_leuart.o + 0x00005bec LEUART_Rx .text.SYSTEM_ChipRevisionGet - 0x000059ac 0x5c THUMB Flash Debug/../../obj/efm32_system.o - 0x000059ac SYSTEM_ChipRevisionGet + 0x00005c14 0x5c THUMB Flash Debug/../../obj/efm32_system.o + 0x00005c14 SYSTEM_ChipRevisionGet .text.NVIC_EnableIRQ - 0x00005a08 0x34 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005c70 0x34 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_IRQHandler - 0x00005a3c 0x3c THUMB Flash Debug/../../obj/lcdcontroller.o - 0x00005a3c LCD_IRQHandler + 0x00005ca4 0x3c THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005ca4 LCD_IRQHandler .text.LCD_enableSegment - 0x00005a78 0xd8 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005ce0 0xd8 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_disableSegment - 0x00005b50 0xf8 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005db8 0xf8 THUMB Flash Debug/../../obj/lcdcontroller.o .text.LCD_AllOff - 0x00005c48 0x5c THUMB Flash Debug/../../obj/lcdcontroller.o - 0x00005c48 LCD_AllOff + 0x00005eb0 0x5c THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005eb0 LCD_AllOff .text.LCD_Symbol - 0x00005ca4 0x114 THUMB Flash Debug/../../obj/lcdcontroller.o - 0x00005ca4 LCD_Symbol + 0x00005f0c 0x120 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x00005f0c LCD_Symbol .text.LCD_Init - 0x00005db8 0xd8 THUMB Flash Debug/../../obj/lcdcontroller.o - 0x00005db8 LCD_Init + 0x0000602c 0xe4 THUMB Flash Debug/../../obj/lcdcontroller.o + 0x0000602c LCD_Init .text.libc.__getc - 0x00005e90 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005e90 __getc + 0x00006110 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006110 __getc .text.libc.__putc - 0x00005eb8 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005eb8 __putc + 0x00006138 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006138 __putc .text.libc.__print_padding - 0x00005ef0 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005ef0 __print_padding + 0x00006170 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006170 __print_padding .text.libc.__pre_padding - 0x00005f14 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f14 __pre_padding + 0x00006194 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006194 __pre_padding .text.libc.isupper - 0x00005f30 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f30 isupper + 0x000061b0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000061b0 isupper .text.libc.islower - 0x00005f40 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f40 islower + 0x000061c0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000061c0 islower .text.libc.isdigit - 0x00005f50 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f50 isdigit + 0x000061d0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000061d0 isdigit .text.libc.__digit - 0x00005f60 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f60 __digit + 0x000061e0 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000061e0 __digit .text.libc.isspace - 0x00005f9c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00005f9c isspace + 0x0000621c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x0000621c isspace .text.libc.strlen - 0x00005fb4 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - 0x00005fb4 strlen + 0x00006234 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) + 0x00006234 strlen .text.libc.__vfprintf_int - 0x00006014 0x5d0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int.o) - 0x00006014 __vfprintf_int + 0x00006294 0x5d0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int.o) + 0x00006294 __vfprintf_int .text.libc.__ungetc - 0x000065e4 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00006864 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.rd_int - 0x00006604 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00006884 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.__vfscanf_int - 0x00006780 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x00006780 __vfscanf_int + 0x00006a00 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00006a00 __vfscanf_int .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x00006b6c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x00006b6c __do_debug_operation_bkpt + 0x00006dec 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x00006dec __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x00006b84 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x00006b84 __debug_io_lock + 0x00006e04 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00006e04 __debug_io_lock .text.libc.__debug_io_unlock - 0x00006b88 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x00006b88 __debug_io_unlock - 0x00006b8c __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x00006b8c __text_load_end__ = __text_end__ + 0x00006e08 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00006e08 __debug_io_unlock + 0x00006e0c __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00006e0c __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1398,58 +1398,58 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .text is too large to fit in FLASH memory segment) - 0x00006b8c __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00006e0c __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x00006b8c 0x0 - 0x00006b8c __dtors_start__ = . +.dtors 0x00006e0c 0x0 + 0x00006e0c __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x00006b8c __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x00006b8c __dtors_load_end__ = __dtors_end__ + 0x00006e0c __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00006e0c __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .dtors is too large to fit in FLASH memory segment) - 0x00006b8c __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00006e0c __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x00006b8c 0x0 - 0x00006b8c __ctors_start__ = . +.ctors 0x00006e0c 0x0 + 0x00006e0c __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x00006b8c __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x00006b8c __ctors_load_end__ = __ctors_end__ + 0x00006e0c __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00006e0c __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ctors is too large to fit in FLASH memory segment) - 0x00006b8c __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00006e0c __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x00006b8c 0x38 - 0x00006b8c __rodata_start__ = . +.rodata 0x00006e0c 0x38 + 0x00006e0c __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) - .rodata 0x00006b8c 0x18 THUMB Flash Debug/../../obj/boot.o + .rodata 0x00006e0c 0x18 THUMB Flash Debug/../../obj/boot.o .rodata.libc.__hex_lc - 0x00006ba4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006ba4 __hex_lc + 0x00006e24 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006e24 __hex_lc .rodata.libc.__hex_uc - 0x00006bb4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006bb4 __hex_uc - 0x00006bc4 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x00006bc4 __rodata_load_end__ = __rodata_end__ + 0x00006e34 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006e34 __hex_uc + 0x00006e44 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x00006e44 __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .rodata is too large to fit in FLASH memory segment) - 0x00006bc4 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x00006e44 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x00006bc4 0x0 - 0x00006bc4 __ARM.exidx_start__ = . - 0x00006bc4 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x00006e44 0x0 + 0x00006e44 __ARM.exidx_start__ = . + 0x00006e44 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x00006bc4 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x00006bc4 __exidx_end = __ARM.exidx_end__ - 0x00006bc4 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x00006e44 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x00006e44 __exidx_end = __ARM.exidx_end__ + 0x00006e44 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x00006bc4 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x00006e44 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x00006bc4 +.fast 0x20000000 0x0 load address 0x00006e44 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x00006bc4 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x00006e44 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x20000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -1458,9 +1458,9 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __RAM_segment_start__) && (__fast_run_end__ <= (__RAM_segment_start__ + 0x4000))), error: .fast_run is too large to fit in RAM memory segment) - 0x00006bc4 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x00006e44 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x8 load address 0x00006bc4 +.data 0x20000000 0x8 load address 0x00006e44 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) .data.SystemHFXOClock @@ -1468,10 +1468,10 @@ Linker script and memory map .data.SystemLFXOClock 0x20000004 0x4 THUMB Flash Debug/../../obj/system_efm32.o 0x20000008 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x00006bcc __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x00006e4c __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x20000))), error: .data is too large to fit in FLASH memory segment) -.data_run 0x20000000 0x8 load address 0x00006bc4 +.data_run 0x20000000 0x8 load address 0x00006e44 0x20000000 __data_run_start__ = . 0x20000008 . = MAX ((__data_run_start__ + SIZEOF (.data)), .) *fill* 0x20000000 0x8 00 @@ -1559,14 +1559,14 @@ Linker script and memory map 0x200001f0 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) 0x200001f0 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __RAM_segment_start__) && (__tbss_end__ <= (__RAM_segment_start__ + 0x4000))), error: .tbss is too large to fit in RAM memory segment) - 0x00006bcc __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x00006e4c __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x200001f0 0x0 load address 0x00006bcc +.tdata 0x200001f0 0x0 load address 0x00006e4c 0x200001f0 __tdata_start__ = . *(.tdata .tdata.*) 0x200001f0 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x00006bcc __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x00006bcc __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x00006e4c __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x00006e4c __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x20000))), error: .tdata is too large to fit in FLASH memory segment) .tdata_run 0x200001f0 0x0 @@ -1912,7 +1912,7 @@ OUTPUT(THUMB Flash Debug/../../bin/demoprog_olimex_efm32g880.elf elf32-littlearm .debug_ranges 0x00000e88 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .debug_ranges 0x00000ea8 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_line 0x00000000 0x8e51 +.debug_line 0x00000000 0x8e54 .debug_line 0x00000000 0x34a THUMB Flash Debug/../../obj/boot.o .debug_line 0x0000034a 0xfe THUMB Flash Debug/../../obj/cstart.o .debug_line 0x00000448 0x1de THUMB Flash Debug/../../obj/irq.o @@ -1929,33 +1929,33 @@ OUTPUT(THUMB Flash Debug/../../bin/demoprog_olimex_efm32g880.elf elf32-littlearm .debug_line 0x000028ff 0x6fb THUMB Flash Debug/../../obj/efm32_cmu.o .debug_line 0x00002ffa 0x38e THUMB Flash Debug/../../obj/efm32_dac.o .debug_line 0x00003388 0x368 THUMB Flash Debug/../../obj/efm32_dbg.o - .debug_line 0x000036f0 0x518 THUMB Flash Debug/../../obj/efm32_dma.o - .debug_line 0x00003c08 0x402 THUMB Flash Debug/../../obj/efm32_ebi.o - .debug_line 0x0000400a 0x3f4 THUMB Flash Debug/../../obj/efm32_emu.o - .debug_line 0x000043fe 0x440 THUMB Flash Debug/../../obj/efm32_gpio.o - .debug_line 0x0000483e 0x481 THUMB Flash Debug/../../obj/efm32_i2c.o - .debug_line 0x00004cbf 0x213 THUMB Flash Debug/../../obj/efm32_int.o - .debug_line 0x00004ed2 0x478 THUMB Flash Debug/../../obj/efm32_lcd.o - .debug_line 0x0000534a 0x107 THUMB Flash Debug/../../obj/efm32_lesense.o - .debug_line 0x00005451 0x3d0 THUMB Flash Debug/../../obj/efm32_letimer.o - .debug_line 0x00005821 0x41b THUMB Flash Debug/../../obj/efm32_leuart.o - .debug_line 0x00005c3c 0x23e THUMB Flash Debug/../../obj/efm32_mpu.o - .debug_line 0x00005e7a 0x357 THUMB Flash Debug/../../obj/efm32_msc.o - .debug_line 0x000061d1 0x107 THUMB Flash Debug/../../obj/efm32_opamp.o - .debug_line 0x000062d8 0x400 THUMB Flash Debug/../../obj/efm32_pcnt.o - .debug_line 0x000066d8 0x2d0 THUMB Flash Debug/../../obj/efm32_prs.o - .debug_line 0x000069a8 0x358 THUMB Flash Debug/../../obj/efm32_rmu.o - .debug_line 0x00006d00 0x3b6 THUMB Flash Debug/../../obj/efm32_rtc.o - .debug_line 0x000070b6 0x2f8 THUMB Flash Debug/../../obj/efm32_system.o - .debug_line 0x000073ae 0x3f9 THUMB Flash Debug/../../obj/efm32_timer.o - .debug_line 0x000077a7 0x4bf THUMB Flash Debug/../../obj/efm32_usart.o - .debug_line 0x00007c66 0x348 THUMB Flash Debug/../../obj/efm32_vcmp.o - .debug_line 0x00007fae 0x360 THUMB Flash Debug/../../obj/efm32_wdog.o - .debug_line 0x0000830e 0x497 THUMB Flash Debug/../../obj/lcdcontroller.o - .debug_line 0x000087a5 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_line 0x00008cf4 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int.o) - .debug_line 0x00008d69 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_line 0x00008ddd 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_line 0x000036f0 0x51b THUMB Flash Debug/../../obj/efm32_dma.o + .debug_line 0x00003c0b 0x402 THUMB Flash Debug/../../obj/efm32_ebi.o + .debug_line 0x0000400d 0x3f4 THUMB Flash Debug/../../obj/efm32_emu.o + .debug_line 0x00004401 0x440 THUMB Flash Debug/../../obj/efm32_gpio.o + .debug_line 0x00004841 0x481 THUMB Flash Debug/../../obj/efm32_i2c.o + .debug_line 0x00004cc2 0x213 THUMB Flash Debug/../../obj/efm32_int.o + .debug_line 0x00004ed5 0x478 THUMB Flash Debug/../../obj/efm32_lcd.o + .debug_line 0x0000534d 0x107 THUMB Flash Debug/../../obj/efm32_lesense.o + .debug_line 0x00005454 0x3d0 THUMB Flash Debug/../../obj/efm32_letimer.o + .debug_line 0x00005824 0x41b THUMB Flash Debug/../../obj/efm32_leuart.o + .debug_line 0x00005c3f 0x23e THUMB Flash Debug/../../obj/efm32_mpu.o + .debug_line 0x00005e7d 0x357 THUMB Flash Debug/../../obj/efm32_msc.o + .debug_line 0x000061d4 0x107 THUMB Flash Debug/../../obj/efm32_opamp.o + .debug_line 0x000062db 0x400 THUMB Flash Debug/../../obj/efm32_pcnt.o + .debug_line 0x000066db 0x2d0 THUMB Flash Debug/../../obj/efm32_prs.o + .debug_line 0x000069ab 0x358 THUMB Flash Debug/../../obj/efm32_rmu.o + .debug_line 0x00006d03 0x3b6 THUMB Flash Debug/../../obj/efm32_rtc.o + .debug_line 0x000070b9 0x2f8 THUMB Flash Debug/../../obj/efm32_system.o + .debug_line 0x000073b1 0x3f9 THUMB Flash Debug/../../obj/efm32_timer.o + .debug_line 0x000077aa 0x4bf THUMB Flash Debug/../../obj/efm32_usart.o + .debug_line 0x00007c69 0x348 THUMB Flash Debug/../../obj/efm32_vcmp.o + .debug_line 0x00007fb1 0x360 THUMB Flash Debug/../../obj/efm32_wdog.o + .debug_line 0x00008311 0x497 THUMB Flash Debug/../../obj/lcdcontroller.o + .debug_line 0x000087a8 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + .debug_line 0x00008cf7 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int.o) + .debug_line 0x00008d6c 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + .debug_line 0x00008de0 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .debug_str 0x00000000 0x66d7 .debug_str 0x00000000 0x782 THUMB Flash Debug/../../obj/boot.o diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.srec b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.srec index 0238208b..53309ca2 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.srec +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/bin/demoprog_olimex_efm32g880.srec @@ -1,16 +1,16 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S1134000F001002071410000994900009949000025 -S11340109949000099490000994900009949000014 -S11340209949000099490000994900009949000004 -S11340309949000099490000994900007549000018 -S113404099490000994900009949000099490000E4 -S113405099490000994900009949000099490000D4 -S113406099490000994900009949000099490000C4 -S113407099490000994900009949000099490000B4 -S113408099490000994900009949000099490000A4 -S11340909949000099490000994900009949000094 -S11340A09949000099490000994900003D5A0000CF -S10F40B09949000099490000EE11AA553E +S1134000F001002071410000C54A0000C54A0000CB +S1134010C54A0000C54A0000C54A0000C54A000060 +S1134020C54A0000C54A0000C54A0000C54A000050 +S1134030C54A0000C54A0000C54A0000A14A000064 +S1134040C54A0000C54A0000C54A0000C54A000030 +S1134050C54A0000C54A0000C54A0000C54A000020 +S1134060C54A0000C54A0000C54A0000C54A000010 +S1134070C54A0000C54A0000C54A0000C54A000000 +S1134080C54A0000C54A0000C54A0000C54A0000F0 +S1134090C54A0000C54A0000C54A0000C54A0000E0 +S11340A0C54A0000C54A0000C54A0000A55C0000DE +S10F40B0C54A0000C54A0000EE11AA55E4 S11340BC2E498D462E492F480A1A04D081F30988BB S11340CC022282F314882C482C492D4A00F039F82A S11340DC2C482D492D4A00F034F82D482D492E4AF0 @@ -23,683 +23,723 @@ S113413CF7E700208646EC4600200021244A9047ED S113414CFEE7884207D0521A05D0037801300B7071 S113415C0131013AF9D17047884202D00270013022 S113416CFAE770471B481C490160A1E7F0010020E5 -S113417CF0010020F0010020C46B000000000020BE -S113418C08000020E8410000E84100008C6B0000AE -S113419CC46B000000000020000000208C6B0000A9 -S11341AC8C6B00008C6B00008C6B00008C6B000023 -S11341BC8C6B00008C6B00008C6B0000C46B0000DB +S113417CF0010020F0010020446E0000000000203B +S113418C08000020E8410000E84100000C6E00002B +S113419C446E000000000020000000200C6E0000A3 +S11341AC0C6E00000C6E00000C6E00000C6E000017 +S11341BC0C6E00000C6E00000C6E0000446E0000CF S11341CC080000207000002070000020F000002087 -S10F41DCBD46000008ED00E000400000BB +S10F41DC3947000008ED00E0004000003E S11341E880B482B000AF786039607B683A685A63FB S11341F807F10807BD4680BC704700BF80B581B091 -S113420800AF00F08BFB4FF0B9033B603B68984765 -S113421807F10407BD4680BDB0B586B000AF46F6C9 -S11342288C33C0F200033C461D460FCD0FC495E8FD -S1134238030084E803004FF44240C0F202004FF048 -S1134248010100F093FE4FF002004FF006014FF019 -S113425804024FF0010301F0E7F94FF002004FF0B8 -S113426807014FF001024FF0000301F0DDF94FF4AC -S11342780C50C0F204004FF0010100F077FE4FF03B -S11342880300C0F212004FF0020101F059F84FF494 -S1134298AA50C0F216004FF0010100F06FFD4FF470 -S11342A8AA50C0F216004FF0010100F05FFE4FF073 -S11342B800033B603B464FF48840C4F208001946AB -S11342C801F024FB4FF48840C4F208004FF00001C9 -S11342D84FF4165201F098FA4FF48843C4F20803D5 -S11342E84FF003025A654FF48840C4F208004FF0B7 -S11342F80401FFF775FF4FF48840C4F208004FF03B -S1134308050101F0C5FA07F11807BD46B0BD00BFA5 -S113431880B500AF40F20803C2F200031B78002BFB -S113432817D140F20C00C2F2000000F055F8034621 -S1134338012B50D140F20803C2F200034FF00102EE -S11343481A7040F25003C2F200034FF000021A70D0 -S113435841E040F25003C2F200031B7803F101026A -S113436840F20C03C2F20003D318184600F034F8E4 -S11343780346012B2FD140F25003C2F200031B78ED -S113438803F10103DAB240F25003C2F200031A70D7 -S113439840F20C03C2F200031A7840F25003C2F24E -S11343A800031B789A4216D140F20803C2F20003B4 -S11343B84FF000021A7040F20C03C2F200035B785B -S11343C8FF2B08D140F20C03C2F200039B78002BA8 -S11343D801D1FFF713FF80BD80B581B000AF38600D -S11343E84FF48843C4F20803DB6A03F00403002B88 -S11343F80CD04FF48840C4F2080001F0BFFA034619 -S11344081A463B681A704FF0010301E04FF00003AD -S1134418184607F10407BD4680BD00BF80B400AF4D -S113442862B6BD4680BC704780B500AF4FF42040EB -S1134438C4F2080001F0BCFC80BD00BF80B581B0A7 -S113444800AF00F087FA03463B6040F25403C2F21F -S113445800031B683A68D21A40F2F3139A4230D91F -S113446840F25803C2F200031B78002B11D140F22A -S11344785803C2F200034FF001021A704FF42040AF -S1134488C4F208004FF000014FF0010201F006FCED -S113449810E040F25803C2F200034FF000021A7011 -S11344A84FF42040C4F208004FF000014FF000021E -S11344B801F0F4FB40F25403C2F200033A681A60B4 -S11344C800E000BF07F10407BD4680BD80B584B095 -S11344D800AF48F2FC13C0F6E0731B68FB60FB688E -S11344E84FEA1363002B1BD14AF20C03C4F20C03EA -S11344F8BB60BB681B6823F07002BB681A6046F295 -S11345082003C4F20C03BB60BB681B6823F0604241 -S1134518BB681A60BB681B6863F06062BB681A609A -S1134528FB684FEA1363032B37D846F22003C4F21F -S11345380C03BB60BB681B6823F4FC52BB681A609D -S113454848F24003C4F20C03BB60BB684FF000029E -S11345581A6048F24403C4F20C03BB60BB684FF012 -S113456800021A6048F25803C4F20C03BB60BB682B -S11345784FF000021A6048F26003C4F20C03BB60F7 -S1134588BB684FF000021A6048F27803C4F20C03C7 -S1134598BB60BB684FF000021A603B46184601F046 -S11345A801FA3B78012B1BD17B78002B0AD148F206 -S11345B84003C4F20C03BB60BB681B6843F00202EF -S11345C8BB681A607B78012B0AD848F24403C4F20A -S11345D80C03BB60BB681B6843F00102BB681A602C -S11345E848F2F013C0F6E0731B68FB60FA684BF6F8 -S11345F8FF13C4F68A439A4257D848F24403C4F2D4 -S11346080C03BB60BB681B6843F49042BB681A6028 -S113461848F2B413C0F6E0731B6803F4FE434FEA90 -S113462813234FEA03637B6048F2B413C0F6E073C4 -S11346381B6803F07F034FEA03437A6813437B60E4 -S113464848F2B413C0F6E0731B6803F4FE437A68B7 -S113465813437B6048F2B413C0F6E0731B6803F09D -S11346687F037A6813437B6042F23403C4F2000385 -S1134678BB60BB687A681A6044F22C03C4F2000376 -S1134688BB6048F2C813C0F6E0731B687B60BB6864 -S11346987A681A6048F24403C4F20C03BB60BB682E -S11346A81B6823F49042BB681A6007F11007BD46E3 -S11346B880BD00BF80B500AF00F008F8FFF7ACFD7F -S11346C8FFF7BCFEFFF724FEFAE700BF80B500AF92 -S11346D800F0F4F9FFF7FAFE4FF000004FF0010183 -S11346E84FF0010200F0F6FE4FF40043C4F20C034D -S11346F84FF40042C4F20C02126C42F00F021A6426 -S11347084FF40043C4F20C034FF40042C4F20C0209 -S1134718526C6FEA12426FEA02425A644FF44070D4 -S1134728C0F204004FF0000100F020FC4FF4985050 -S1134738C0F204004FF0000100F018FC4FF44C5094 -S1134748C0F204004FF0000100F010FC4FF42240C6 -S1134758C0F202004FF0000100F008FC4FF40070B2 -S1134768C0F202004FF0000100F000FC4FF490503A -S1134778C0F202004FF0000100F0F8FB4FF40850BB -S1134788C0F202004FF0000100F0F0FB4FF4485073 -S1134798C0F202004FF0000100F0E8FB4FF4E440DF -S11347A8C0F202004FF0000100F0E0FB4FF40240B9 -S11347B8C0F202004FF0000100F0D8FB4FF4324081 -S11347C8C0F202004FF0000100F0D0FB4FF4624049 -S11347D8C0F202004FF0000100F0C8FB4FF4724031 -S11347E8C0F202004FF0000100F0C0FB4FF4524049 -S11347F8C0F202004FF0000100F0B8FB4FF00100D6 -S11348084FF009014FF005024FF0010300F00CFFCF -S11348184FF001004FF0020100F0DCFEFFF704FE48 -S113482800F062F8FFF7FAFD80BD00BF80B482B0E3 -S113483800AF786039607B68002B10DA4FF46D4361 -S1134848CEF200037A6802F00F02A2F104013A687A -S1134858D2B24FEA4212D2B25B181A760CE04FF485 -S11348686143CEF2000379683A68D2B24FEA421241 -S1134878D2B25B1883F8002307F10807BD4680BC51 -S1134888704700BF80B581B000AF38603A686FF0F8 -S11348987F439A4202D94FF001031FE04EF21003FE -S11348A8CEF200033A6822F07F4202F1FF325A60E6 -S11348B84FF0FF304FF00701FFF7B8FF4EF2100337 -S11348C8CEF200034FF000029A604EF21003CEF2CB -S11348D800034FF007021A604FF00003184607F16F -S11348E80407BD4680BD00BF80B500AF4FF020006F -S11348F8C0F2040000F09EFB024644F6D353C1F212 -S11349086203A3FB02134FEA93131846FFF7BAFF97 -S11349184FF0000000F00EF880BD00BF80B400AF77 -S11349284EF21003CEF200034FF000021A60BD46A7 -S113493880BC704780B481B000AF386040F25C033B -S1134948C2F200033A681A6007F10407BD4680BC46 -S1134958704700BF80B400AF40F25C03C2F20003AA -S11349681B681846BD4680BC704700BF80B400AFC2 -S113497840F25C03C2F200031B6803F1010240F237 -S11349885C03C2F200031A60BD4680BC704700BFD6 -S113499880B400AFFEE700BF80B581B000AF00F07F -S11349A819F803463B604FF40043C4F20C035B68F8 -S11349B803F00F033A6822FA03F33B6040F2600302 -S11349C8C2F200033A681A603B68184607F1040704 -S11349D8BD4680BD80B481B000AF4FF40043C4F23B -S11349E80C03DB6A03F47053B3F5805F0DD0B3F5A1 -S11349F8005F03D0B3F5006F0BD011E040F204035D -S1134A08C2F200031B683B6050E04FF400433B6074 -S1134A184CE040F20003C2F200031B683B6045E02F -S1134A284FF40043C4F20C03DB6803F4E063B3F50A -S1134A38007F24D0B3F5007F05D8002B2BD0B3F525 -S1134A48807F22D02DE0B3F5806F0CD0B3F5A06F32 -S1134A5803D0B3F5407F0CD023E04FF47C53C0F26D -S1134A68AB133B6021E046F64073C0F240133B6051 -S1134A781BE049F68073C0F2D5033B6015E04DF6A0 -S1134A88C003C0F2A7033B600FE04CF6C073C0F24A -S1134A986A033B6009E044F24023C0F20F033B6021 -S1134AA803E04FF000033B6000BF00BF3B681846BB -S1134AB807F10407BD4680BC704700BF80B400AF4F -S1134AC8BD4680BC704700BF80B400AF4FF40043BC -S1134AD81846BD4680BC704780B400AF40F204035A -S1134AE8C2F200031B681846BD4680BC704700BF6D -S1134AF880B484B000AFB86079603A60BB6803F1F1 -S1134B0804734FEAC3027B68D3184FEA8303FB603C -S1134B18FB683A681A6007F11007BD4680BC704705 -S1134B2880B481B000AF4FF00003C4F20C035B689B -S1134B383B603B6803F00703032B19D801A252F822 -S1134B4823F000BF5D4B00005D4B00006B4B000081 -S1134B586B4B00003B6823F0070343F001033B6001 -S1134B6806E03B6823F0070343F003033B6000BF00 -S1134B784FF00003C4F20C033A685A6007F10407C3 -S1134B88BD4680BC704700BF90B484B000AF3860A5 -S1134B983B68BB60BB68B3FA83F4FC71FB79C3F16F -S1134BA81F03FB60FB68184607F11007BD4690BC5D -S1134BB8704700BF80B482B000AF38604FF0000384 -S1134BC8C4F20C035B687B603A684FF41053C0F27C -S1134BD8F4039A421BD93A684FF49043C0F2E8139D -S1134BE89A4214D87B6803F00703A3F10203012B4C -S1134BF806D87B6823F0070343F003037B6006E0D1 -S1134C087B6823F0070343F001037B6000BF3A6825 -S1134C184FF41053C0F2F4039A4212D87B6803F09D -S1134C280703A3F10203012B06D87B6823F00703CB -S1134C3843F002037B6004E07B6823F007037B6096 -S1134C4800BF4FF00003C4F20C037A685A6007F1FE -S1134C580807BD4680BC704780B481B000AF49F6F0 -S1134C688073C0F2D5033B603B68184607F104071C -S1134C78BD4680BC704700BF80B582B000AF4FF01E -S1134C880400C0F2180000F0D1FA03463B603B6808 -S1134C98072B06D0082B09D1FFF79CFE03467B603F -S1134CA808E0FFF7D9FF03467B6003E04FF00003F9 -S1134CB87B6000BF7B68184607F10807BD4680BDC6 -S1134CC880B582B000AF38604FF40043C4F20C03DF -S1134CD89A6A3B684FEA430322FA03F303F0030397 -S1134CE8032B20D801A252F823F000BF274D00005F -S1134CF8054D00000F4D0000194D0000FFF7E4FEBC -S1134D0803467B6013E0FFF7E7FE03467B600EE093 -S1134D18FFF742FE03464FEA53037B6007E04FF078 -S1134D2800037B6003E04FF000037B6000BF7B68F7 -S1134D38184607F10807BD4680BD00BF80B481B09E -S1134D4800AF38604FF40043C4F20C035B6D03F00A -S1134D580103DBB2002B0AD100BF4FF40043C4F2B5 -S1134D680C031A6D3B681340002BF6D100E000BF1A -S1134D7807F10407BD4680BC704700BF80B584B006 -S1134D8800AF786039607B684FEA131303F00F03B0 -S1134D98FB60FB6803F1FF33032B00F2E18001A2FF -S1134DA852F823F0BD4D0000E54D00001F4E0000F1 -S1134DB8E54E00003868FFF7E7FE03463B604FF412 -S1134DC80043C4F20C034FF40042C4F20C0292688C -S1134DD822F00F013A680A439A60C2E0FFF7A0FE86 -S1134DE83868FFF7D1FE03463B604FF40043C4F232 -S1134DF80C034FF40042C4F20C02526822F00F0173 -S1134E083A680A435A60FFF7C7FD0346BB60B868AF -S1134E18FFF7D0FEA5E07A6841F23043C0F20A03F6 -S1134E289A4223D04FF03003C0F20C039A4237D091 -S1134E384FF48663C0F208039A424DD14FF0040040 -S1134E48FFF77CFF3868FFF79FFE03463B604FF48B -S1134E580043C4F20C034FF40042C4F20C02926EF5 -S1134E6822F00F013A680A439A6636E04FF00400CC -S1134E78FFF764FF3868FFF787FE03463B604FF48B -S1134E880043C4F20C034FF40042C4F20C02926EC5 -S1134E9822F0F0013A684FEA02120A439A661CE0CB -S1134EA84FF00400FFF74AFF3868FFF76DFE03462A -S1134EB83B604FF40043C4F20C034FF40042C4F2C5 -S1134EC80C02926E22F440713A68A2F110024FEA81 -S1134ED802220A439A6600E000BF42E07A684FF46F -S1134EE8A863C0F214039A4206D04FF4AA53C0F23E -S1134EF816039A4218D031E04FF04000FFF71EFF26 -S1134F083868FFF741FE03463B604FF40043C4F2A0 -S1134F180C034FF40042C4F20C02126F22F0030196 -S1134F283A680A431A671AE04FF04000FFF706FF91 -S1134F383868FFF729FE03463B604FF40043C4F288 -S1134F480C034FF40042C4F20C02126F22F0300139 -S1134F583A684FEA02120A431A6700E000BF00E009 -S1134F6800BF07F11007BD4680BD00BF80B585B0FE -S1134F7800AF78600B463B704FF00003FB607B6822 -S1134F884FEA132303F00F0303F1FF33052B4CD827 -S1134F9801A252F823F000BFB94F0000C54F00002A -S1134FA8D14F0000DD4F0000EF4F0000015000001A -S1134FB848F20803C4F20C033B6123E048F24403BB -S1134FC8C4F20C033B611DE048F24003C4F20C0335 -S1134FD83B6117E048F25803C4F20C033B614FF0FD -S1134FE80103FB600EE048F26003C4F20C033B616A -S1134FF84FF01003FB6005E048F27803C4F20C0399 -S11350083B6100BF7B684FEA133303F01F03BB60A7 -S1135018FB68002B02D0F868FFF790FE3B783869EC -S1135028B9681A46FFF764FD00E000BF07F11407EA -S1135038BD4680BD80B582B000AF38603B6803F4DC -S11350487813B3F5402F7BD0B3F5402F15D8B3F5BB -S1135058802F43D0B3F5802F05D8002B29D0B3F582 -S1135068003F2BD0D8E0B3F5002F43D0B3F5202F61 -S113507852D0B3F5C02F36D0CEE0B3F5A01F00F060 -S11350889B80B3F5A01F07D8B3F5602F6CD0B3F598 -S1135098901F00F08A80BFE0B3F5C01F00F0B28013 -S11350A8B3F5D01F00F0B380B3F5B01F00F09680BD -S11350B8B2E0FFF78FFC03467B60B1E0FFF78AFCA0 -S11350C803467B604FF40043C4F20C039B6803F06F -S11350D80F037A6822FA03F37B60A1E0FFF75CFC14 -S11350E803467B609CE04FF00000FFF7E9FD0346B0 -S11350F87B6095E04FF00000FFF7E2FD03467B601C -S11351084FF40043C4F20C039B6E03F00F037A6858 -S113511822FA03F37B6083E04FF00000FFF7D0FD31 -S113512803467B604FF40043C4F20C039B6E03F008 -S1135138F0034FEA13137A6822FA03F37B606FE0F3 -S11351484FF00000FFF7BCFD03467B604FF40043BB -S1135158C4F20C039B6E03F440734FEA13237A687A -S113516822FA03F37B605BE04FF00000FFF7A8FD31 -S113517803467B604FF40043C4F20C039B6E03F4B4 -S113518840734FEA13237A6822FA03F37B604FF4DF -S11351980043C4F20C03DB6F03F0070303F10103BC -S11351A87A68B2FBF3F37B603AE04FF00100FFF753 -S11351B887FD03467B6033E04FF00100FFF780FD75 -S11351C803467B604FF40043C4F20C031B6F03F0E7 -S11351D803037A6822FA03F37B6021E04FF00100AD -S11351E8FFF76EFD03467B604FF40043C4F20C03E3 -S11351F81B6F03F030034FEA13137A6822FA03F3A0 -S11352087B600DE0FFF738FD03467B6008E0FFF79D -S113521823FD03467B6003E04FF000037B6000BF7F -S11352287B68184607F10807BD4680BD80B483B083 -S113523800AF38604FF00103BB603B6803F00F0315 -S11352487B607B6803F1FF33032B6DD801A252F80E -S113525823F000BF6D520000B1520000ED5200006F -S1135268295300004FF40043C4F20C03DB6A03F42F -S11352787053B3F5805F0AD0B3F5005F03D0B3F57C -S1135288006F08D00BE04FF00203BB600BE04FF057 -S11352980303BB6007E04FF00403BB6003E04FF077 -S11352A80503BB6000BF43E04FF40043C4F20C03A2 -S11352B89B6A03F00303022B07D0032B09D0012BAD -S11352C80BD14FF00303BB600BE04FF00203BB604C -S11352D807E04FF00603BB6003E04FF00103BB6037 -S11352E800BF25E04FF40043C4F20C039B6A03F0AB -S11352F80C03022B07D0032B09D0012B0BD14FF041 -S11353080303BB600BE04FF00203BB6007E04FF000 -S11353180603BB6003E04FF00103BB6000BF07E076 -S11353284FF00703BB6003E04FF00003BB6000BF0E -S1135338BB68184607F10C07BD4680BC704700BF20 -S113534880B588B000AF786039604FF00303FB6123 -S11353584FF00303BB617B6803F00F03FB60FB683A -S1135368012B06D0012BC0F0AB80032B00F2A880E0 -S113537845E03B68A3F10203032B00F2A38001A2DA -S113538852F823F09D530000AB530000B9530000BA -S1135398C75300004FF00403FB614FF00003BB61E7 -S11353A814E04FF00303FB614FF00103BB610DE010 -S11353B84FF00203FB614FF00203BB6106E04FF0BC -S11353C80103FB614FF00303BB6100BFB8694FF0F1 -S11353D801014FF0010200F07DF8FFF7A1FB4FF443 -S11353E80043C4F20C03FA695A6200F0E3F8FFF7C9 -S11353F8D3FA0346BB60B868FFF7DCFB65E0FB68DB -S1135408022B03D14FF000037B6102E04FF002034B -S11354187B613B6803F1FF33052B55D801A252F891 -S113542823F000BF455400004D54000065540000AB -S1135438D1540000D15400007D5400004FF0000303 -S11354483B6125E04FF000004FF001014FF00102ED -S113545800F040F84FF002033B6119E04FF00100FF -S11354684FF001014FF0010200F034F84FF001034E -S11354783B610DE048F24000C4F20C004FF0020119 -S11354884FF00102FFF734FB4FF003033B6100BF09 -S11354984FF40043C4F20C034FF40042C4F20C026C -S11354A8916A7A694FF0030000FA02F26FEA020285 -S11354B811407A69386900FA02F20A439A6204E0F0 -S11354C800BF02E000BF00E000BF07F12007BD46AF -S11354D880BD00BF80B586B000AFB86013460A46E9 -S11354E83A713B70BB68042B5ED801A252F823F0D2 -S11354F85D55000049550000215500000D55000078 -S1135508355500004FF001033B614FF00203FB6087 -S11355184FF002037B6127E04FF004033B614FF037 -S11355280803FB604FF008037B611DE04FF0100394 -S11355383B614FF02003FB604FF020037B6113E0D5 -S11355484FF040033B614FF08003FB604FF0800352 -S11355587B6109E04FF480733B614FF40073FB6097 -S11355684FF400737B6100BF3B79002B13D04FF4D9 -S11355780043C4F20C033A691A623B78002B10D03A -S113558800BF4FF40043C4F20C03DA6A7B6913408A -S1135598002BF6D005E04FF40043C4F20C03FA687C -S11355A81A6200F007F800E000BF07F11807BD46CB -S11355B880BD00BF80B400AF4FF40043C4F20C03B5 -S11355C8DB6A9AB240F26403C2F200031A80BD4651 -S11355D880BC704780B482B000AF786039604FF403 -S11355E8C042C4F200024FF4C041C4F2000178681A -S11355F803464FEAC3031B184FEA8303CB181B68FF -S113560823F003013B6841EA030079680B464FEA3B -S1135618C3035B184FEA8303D318186007F108071C -S1135628BD4680BC704700BF80B484B000AFF8604A -S1135638B9607A603B607B68002B2DD03B68002BF7 -S113564815D04FF4C042C4F20002BB684FF0010108 -S113565801FA03F31846F9680B464FEAC3035B18CB -S11356684FEA8303D31803F11003186014E04FF4CE -S1135678C042C4F20002BB684FF0010101FA03F30F -S11356881846F9680B464FEAC3035B184FEA8303CD -S1135698D31803F114031860BB68072B30D84FF4F0 -S11356A8C042C4F200024FF4C041C4F20001F868D9 -S11356B803464FEAC3031B184FEA8303CB1803F1CD -S11356C804031968BB684FEA83034FF00F0000FA1C -S11356D803F36FEA03031940BB684FEA830378684E -S11356E800FA03F341EA0300F9680B464FEAC303DF -S11356F85B184FEA8303D31803F10403186033E0FB -S11357084FF4C042C4F200024FF4C041C4F2000195 -S1135718F86803464FEAC3031B184FEA8303CB1800 -S113572803F108031968BB684FEA8303A3F1200354 -S11357384FF00F0000FA03F36FEA03031940BB6844 -S11357484FEA8303A3F12003786800FA03F341EADC -S11357580300F9680B464FEAC3035B184FEA830357 -S1135768D31803F1080318607B68002B2DD13B681C -S1135778002B15D04FF4C042C4F20002BB684FF0AE -S1135788010101FA03F31846F9680B464FEAC3030B -S11357985B184FEA8303D31803F11003186014E06D -S11357A84FF4C042C4F20002BB684FF0010101FA91 -S11357B803F31846F9680B464FEAC3035B184FEA2C -S11357C88303D31803F11403186007F11007BD46C7 -S11357D880BC704780B482B000AF786039607B6861 -S11357E81B6C03F00103DBB2002B07D100BF7B68FD -S11357F85A6C3B681340002BF9D100E000BF07F155 -S11358080807BD4680BC704780B585B000AFB86056 -S113581879603A607B68002B1DD1BA684FF48043E5 -S1135828C4F208039A4205D14FF4A863C0F21403E2 -S11358383B610BE0BA684FF48843C4F208039A4208 -S113584821D14FF4AA53C0F216033B613869FFF71C -S1135858F1FB03467B607B684FEA43123B68B2FB6B -S1135868F3F3FB60FB68A3F12003FB60FB684FEADA -S1135878C303FB60B8684FF00401FFF7ABFFBB68D4 -S1135888FA68DA6000E000BF07F11407BD4680BD7E -S113589880B583B000AF786039603B686FEA030372 -S11358A8BB60BB6803F00503BB60BB684FEA4303F6 -S11358B8BB60BA683B681343BB6078684FF0020169 -S11358C8FFF788FF7B68BA685A6007F10C07BD4682 -S11358D880BD00BF80B482B000AF78600B463B70D7 -S11358E83B78002B09D000BF7B685B6C002BFBD195 -S11358F87B684FF001021A6403E07B684FF00002F2 -S11359081A6407F10807BD4680BC704780B582B0A9 -S113591800AF7860396078684FF00201FFF75AFFEA -S11359287B684FF00A025A6078684FF00101FFF76C -S1135938D1FF7B681B6823F01C023B68DB681A43B1 -S11359483B681B691A433B685B691A437B681A60A6 -S11359583B685A683B689B68786811461A46FFF7A3 -S113596853FF3B681A687B685A6078684FF00001F7 -S1135978FFF7B0FF07F10807BD4680BD80B481B0CA -S113598800AF386000BF3B689B6803F02003002B1E -S1135998F9D03B68DB69DBB2184607F10407BD465A -S11359A880BC704780B482B000AF38604FF6D073C3 -S11359B8CEF20F031B69DBB203F03F03DAB23B6894 -S11359C81A704FF6D073CEF20F039B69DBB223F043 -S11359D80F03FB714FF6D073CEF20F03DB6903F0AC -S11359E8F0034FEA1313DAB2FB791343FB713B68F4 -S11359F8FA795A7007F10807BD4680BC704700BFA2 -S1135A0880B481B000AF38604FF46143CEF2000334 -S1135A183A684FEA5212396801F01F014FF0010049 -S1135A2800FA01F143F8221007F10407BD4680BCCF -S1135A38704700BF80B481B000AF4FF42043C4F274 -S1135A4808033B603B684FF0FF325A6240F2680338 -S1135A58C2F200031B6803F1010240F26803C2F2B8 -S1135A6800031A6007F10407BD4680BC704700BFF5 -S1135A7880B483B000AFB86079603A603B681F2B8C -S1135A8807DD3B68A3F120033B607B6803F1040353 -S1135A987B604FF001023B6802FA03F33B607B68CA -S1135AA8072B4BD801A252F823F000BFD55A0000A7 -S1135AB8E35A0000F15A0000FF5A00000D5B000091 -S1135AC81B5B0000295B0000375B0000BB681A6C95 -S1135AD83B681A43BB681A6430E0BB685A6C3B687D -S1135AE81A43BB685A6429E0BB689A6C3B681A433A -S1135AF8BB689A6422E0BB68DA6C3B681A43BB68EB -S1135B08DA641BE0BB681A6D3B681A43BB681A6504 -S1135B1814E0BB685A6D3B681A43BB685A650DE0CC -S1135B28BB689A6D3B681A43BB689A6506E0BB6814 -S1135B38DA6D3B681A43BB68DA6500BF07F10C07E6 -S1135B48BD4680BC704700BF80B483B000AFB86066 -S1135B5879603A603B681F2B07DD3B68A3F120039B -S1135B683B607B6803F104037B604FF001023B68F0 -S1135B7802FA03F33B607B68072B5BD801A252F857 -S1135B8823F000BFAD5B0000BF5B0000D15B0000E9 -S1135B98E35B0000F55B0000075C0000195C000093 -S1135BA82B5C0000BB681A6C3B686FEA03031A405D -S1135BB8BB681A643EE0BB685A6C3B686FEA03032F -S1135BC81A40BB685A6435E0BB689A6C3B686FEA54 -S1135BD803031A40BB689A642CE0BB68DA6C3B6820 -S1135BE86FEA03031A40BB68DA6423E0BB681A6DE2 -S1135BF83B686FEA03031A40BB681A651AE0BB687E -S1135C085A6D3B686FEA03031A40BB685A6511E092 -S1135C18BB689A6D3B686FEA03031A40BB689A65D0 -S1135C2808E0BB68DA6D3B686FEA03031A40BB6897 -S1135C38DA6500BF07F10C07BD4680BC704700BF9A -S1135C4880B481B000AF38603B684FF000021A643A -S1135C583B684FF000021A653B684FF000025A6433 -S1135C683B684FF000025A653B684FF000029A64A3 -S1135C783B684FF000029A653B684FF00002DA6413 -S1135C883B684FF00002DA6500BF3B685B6E002B8F -S1135C98FBD107F10407BD4680BC704780B585B0C9 -S1135CA800AFB86079603A607B680B2B6ED801A2AC -S1135CB852F823F0ED5C0000FB5C0000095D000075 -S1135CC8175D0000255D0000335D0000415D0000A4 -S1135CD84F5D00005D5D00006B5D0000795D0000B4 -S1135CE8875D00004FF003033B614FF00F03FB6037 -S1135CF84CE04FF001033B614FF00303FB6045E0C8 -S1135D084FF003033B614FF00303FB603EE04FF0A9 -S1135D1800033B614FF00303FB6037E04FF00203DD -S1135D283B614FF00303FB6030E04FF000033B613D -S1135D384FF02703FB6029E04FF003033B614FF06A -S1135D482703FB6022E04FF003033B614FF001039C -S1135D58FB601BE04FF002033B614FF00103FB6063 -S1135D6814E04FF001033B614FF00103FB600DE0C9 -S1135D784FF001033B614FF00103FB6006E04FF075 -S1135D8803033B614FF00703FB6000BF3B68002B34 -S1135D9805D0B8683969FA68FFF76AFE04E0B8689C -S1135DA83969FA68FFF7D0FE07F11407BD4680BDCC -S1135DB880B582B000AF38604FF40043C4F20C03DE -S1135DC87B607B689B6A23F003027B689A627B682A -S1135DD89B6A43F002027B689A627B689B6D43F07E -S1135DE804027B689A657B689B6E23F440727B6827 -S1135DF89A667B689B6E43F440727B689A663B683C -S1135E084FF000029A6200BF3B685B6E002BFBD127 -S1135E183B684FF0FF325A624FF01B00FFF7F0FD6A -S1135E283B684FF001029A623B6841F60B725A6074 -S1135E387B684FF00002DA673868FFF701FF3B68B8 -S1135E4840F2FF329A603B684FF005021A6000BFC7 -S1135E583B685B6E002BFBD13A684FF48073C0F249 -S1135E681C03D36000BF3B685B6E002BFBD13B680F -S1135E784FF001025A623B684FF001029A6207F13F -S1135E880807BD4680BD00BF00B5034602783AB195 -S1135E984268107840B102F101025A605DF804FBCF -S1135EA8436898475DF804FB4FF0FF305DF804FB46 -S1135EB830B50446C8B2A16849B12368626803F1E1 -S1135EC80105954208BF0020934238BFC854E368CF -S1135ED82BB121686268914201D221469847236810 -S1135EE803F10103236030BDF0B5154601290BD435 -S1135EF80E464FF00004C7B228463946FFF7D8FFCC -S1135F0804F10104B442F7D1F0BD00BF00B510F0AC -S1135F18100F07D100F4007000280CBF2020302097 -S1135F28FFF7E2FF5DF804FBA0F1410019288CBFDC -S1135F3800200120704700BFA0F1610019288CBF20 -S1135F4800200120704700BFA0F1300009288CBF51 -S1135F5800200120704700BF30B504460D46FFF706 -S1135F68F3FF10B1A4F130000FE02046FFF7E4FF7F -S1135F7810B1A4F1570008E02046FFF7D5FF10B18F -S1135F88A4F1370001E04FF0FF30A842A8BF4FF05A -S1135F98FF3030BDA0F10903202814BF00200120E0 -S1135FA8042B98BF40F00100704700BF00F10101C5 -S1135FB810F0030F11D010F8012B002A23D010F091 -S1135FC8030F0AD010F8012B002A1CD010F0030F7D -S1135FD803D010F8012B002A15D02DE970004FF0DA -S1135FE801324FF0803350F8044BA4EB020525EA44 -S1135FF804051D4000D1F6E7A0F1040070BC10F8B8 -S1136008012B002AFBD1A0EB010070472DE9F04FCA -S113601887B007460C4603924FF00003036046F628 -S1136028A43BC0F2000B46F6B433C0F2000302935B -S1136038C1E204F10104252904BF2346002603D044 -S11360483846FFF735FFB6E2194613F8010B1C462C -S1136058A0F12002102A1CD8DFE802F0091B1B0C4F -S11360681B1B1B0F1B1B1B121B151B1B180046F0AD -S11360784006E9E746F08006E6E746F40046E3E72B -S113608846F02006E0E746F01006DDE746F4007621 -S1136098DAE72A2808D0A0F13002D2B2092A88BF48 -S11360A84FF0000A11D920E0039B03F10400039088 -S11360B8D3F800A0BAF1000FBCBFCAF1000A46F039 -S11360C81006487801F102040FE04FF0000A0AEBC9 -S11360D88A0AA0F1300000EB4A0A13F8010B1C46A7 -S11360E8A0F13002D2B2092AF1D92AEAEA7A2E2892 -S11360F818BF4FF000082DD120782A280AD004F1BF -S11361080104A0F13003DBB2092B88BF4FF000086B -S11361180AD91DE0039B03F104020392D3F800801B -S1136128607804F1020410E023464FF0000808EBFD -S11361388808A0F1300000EB480813F8010B1C464E -S1136148A0F13002D2B2092AF1D9B8F1000F01DB6B -S113615846F4807668280AD12078682803BF46F078 -S1136168080660780234013418BF46F0040678281B -S11361787AD8DFE810F02E027900790079007900E6 -S1136188790079007900790079007900790079003B -S1136198790079007900790079007900790079002B -S11361A8790079007900790079007900790079001B -S11361B8790079007900790079007900790079000B -S11361C88A007900790079007900790079007900EA -S11361D879007900790079007900790079007900EB -S11361E879007900790079007900790079007900DB -S11361F879007900790079007900790079007900CB -S113620879007900790079007900790079007900BA -S113621879007900790079007900790079007900AA -S1136228790079007900EE00790079007900790025 -S113623879007900790079007900790090001A01D1 -S113624879007900790079001A01790079007900D8 -S11362587900AB000201DB0079007900B70079000E -S1136268110179007900F00040F26C03C2F20003D6 -S11362781D68002D00F09F81CDF8008003AB0193C9 -S1136288394632465346A84795E138464FF025012A -S1136298FFF70EFE8FE1039B03F1040203921D78BE -S11362A80AF1FF3A304651463A46FFF72FFE384680 -S11362B82946FFF7FDFD16F0100F00F07C814FF022 -S11362C8200051463A46FFF70FFE74E116F0080F16 -S11362D8039B03F1040203921B683A6814BF1A7003 -S11362E81A6068E1039B03F104020392D3F8009057 -S11362F84846FFF75BFE05468045ACBF00230123F3 -S113630803EA1623002B18BF4546C5EB0A0A304694 -S113631851463A46FFF7FAFD002DCCD019F8011B77 -S11363283846FFF7C5FD013DF8D1C4E7039B03F1E7 -S1136338040203921B6806F08009B9F1000F14BF28 -S11363484FF023094FF0000946F480764FF008080F -S113635869E046F4005643F2780343F25809782872 -S113636808BF994616F0800F08BF4FF0000916F4CD -S1136378807F18BF26F400761EE006F08009B9F184 -S1136388000F14BF4FF030094FF0000916F4807F56 -S113639818BF26F400760FE016F4807F1CBF26F49D -S11363A800764FF0000907D104E046F480464FF028 -S11363B8000901E04FF0000916F4804F1DD0039B3B -S11363C803F1040203921B6816F0040F18BF1BB2F2 -S11363D803D116F0080F18BFDBB2002BBCBF5B4219 -S11363E84FF02D091ADB06F04002002A18BF4FF0BF -S11363F8200916F0200F11D00EE0039B03F10402CC -S113640803921B6816F0040F18BF9BB206D116F04E -S1136418080F18BFDBB201E04FF02B0916F4807F98 -S113642804D026F4007616F4807F01D14FF00108D9 -S1136438A0F15800202870D8DFE800F0196F6F6FBA -S11364486F6F6F6F6F6F6F6F156F6F6F6F156F6F04 -S11364586F6F6F11196F6F6F6F156F6F19004FF0B2 -S113646800050BBB5BE04FF0000553BB57E04FF052 -S11364780005002B53D04FF0000506F40052DDF858 -S113648808E032B103F00F011EF8010004A96854B2 -S113649805E003F00F011BF8010004A9685405F195 -S11364A801051B09EDD13AE04FF0000503F007019F -S11364B801F1300104AAA95405F10105DB08F5D15D -S11364C82DE04FF0000506F4004C4CF6CD4ECCF60A -S11364D8CC4E6246A446144654B105F00302032A7E -S11364E801BF07A842192C2102F80C1C08BF01356A -S11364F807AA5119AEFB03024FEAD20202EB82004B -S1136508A3EB400303F1300301F80C3C05F101054A -S11365181346002AE0D1644601E04FF00005C5EBBC -S1136528080828EAE878C8EB0A0AC5EB0A0AB9F1A8 -S1136538FF0F88BF0AF1FF3AB9F1000F01D00AF141 -S1136548FF3A16F4007F06D1304651463A46FFF723 -S1136558DDFC4FF0000AB9F1FF0F04D9C9F3072194 -S11365683846FFF7A5FCB9F1000F04D05FFA89F1AA -S11365783846FFF79DFC304651463A46FFF7C6FCBD -S11365884FF0300041463A46FFF7AEFC012D09D4DE -S11365980DF11008454415F8011D3846FFF788FC2D -S11365A84545F8D116F0100F05D04FF0200051469C -S11365B83A46FFF799FC217800297FF43AADBB6885 -S11365C82BB13A6879688A423CBF002199543868EB -S11365D801E04FF0FF3007B0BDE8F08F10B5044676 -S11365E80B783BB1B0F1FF3F06D04B6803F1FF33A2 -S11365F84B6001E08B689847204610BD2DE9F04FA9 -S113660882468B4617469846099E4FF0FF3900E0AC -S1136618A94609F101055046FFF736FC0446FFF781 -S1136628B9FC0028F4D12346B4F1FF3F08BF4FF06A -S1136638FF3500F09C8027F4C067002E4EDD17F06C -S1136648800F0DD02B2C03D02D2C09D147F4806753 -S113665809F102055046FFF717FC044606F1FF3618 -S1136668302C14BF00230123002ED4BF002303F0D1 -S11366780103002B32D047F4007706F1FF3605F109 -S113668801095046FFF700FC0446002E20DD582877 -S113669814BF00230123782808BF43F00103BBB1CA -S11366A8B8F1100F14BF00230123B8F1000F08BF7D -S11366B843F0010363B127F4007706F1FF3605F1CF -S11366C802095046FFF7E0FB04464FF0100851E07A -S11366D8B8F1000F08BF4FF008084BE0B8F1000FFD -S11366E808BF4FF00A08002ED8BF4FF000090EDC8F -S11366F815E047F4007706F1FF3608FB090905F1B0 -S113670801055046FFF7C0FB044616B907E04FF0F1 -S1136718000920464146FFF71FFC0028E9DA204615 -S11367285146FFF75BFF17F4007F08BF6FF00105C0 -S11367381DD017F0010F1AD1DBF8003003F1040261 -S1136748CBF800201B6807F49062B2F5906F08BF7D -S1136758C9F1000917F0100F18BF83F8009006D18B -S113676817F0080F14BFA3F80090C3F80090284648 -S1136778BDE8F08F4D46B6E72DE9F04F85B001909E -S11367888A4604924FF0000BCDF808B04CF6CC4979 -S1136798C0F6CC49544614F8015B002D00F0DE81A4 -S11367A8252D3BD02846FFF7F5FB08B918E02C4601 -S11367B804F101052078FFF7EDFB0028F7D101E08B -S11367C80BF1010B0198FFF75FFB0546FFF7E2FBAE -S11367D80028F5D128460199FFF700FFA246D9E71A -S11367E80198FFF751FB0646A84203D10BF1010BB0 -S11367F8A246CFE70199FFF7F1FE029AD2F101030D -S113680838BF0023B6F1FF3F14BF002603F001068A -S1136818002E18BF4FF0FF3202929FE19AF8013020 -S11368282A2B06BF0AF102044FF001084FF00008B2 -S11368384FF000050CE04D4500F3908105EB85050C -S1136848A6F1300616EB450500F1888148F02008CA -S1136858274604F101043E78A2463046FFF774FB4C -S11368680028E8D1414608F02002002A08BF6FF04A -S113687800454C2E05D17E7807F1020A48F04408F9 -S11368880EE0682E0CD17E78682E03BF48F01008FD -S1136898BE7807F1030A07F1020A18BF41F0080895 -S11368A8A6F12506532E00F25981DFE816F05400AC -S11368B8570157015701570157015701570157010C -S11368C857015701570157015701570157015701FC -S11368D857015701570157015701570157015701EC -S11368E857015701570157015701570157015701DC -S11368F857015701570157015701570157015701CC -S113690857015701570157015701570157015701BB -S113691857015701330157015701570157015701CF -S11369285701570157015701570170009F0057013C -S1136938570157015701AA00570157015701570139 -S1136948B500CD00D80057015701E30057012801CD -S11369585701570133010198FFF796FA0446252891 -S113696802D10BF1010B15E70199FFF737FE029AE3 -S1136978131C18BF0123B4F1FF3F0CBF1C4643F09E -S11369880104002C08BF4FF0FF320292E6E008F041 -S11369982003002B08BF012518F0010401BF049B44 -S11369A81A1D04921E6818BF0026002D00F0D68018 -S11369B8002D13DD0198FFF767FAB0F1FF3F06D108 -S11369C8029B002B08BF4FF0FF330293C6E00CB9BB -S11369D806F8010B0BF1010B013DEBD1002C7FF400 -S11369E8D9AE029B03F101030293D3E648F0800277 -S11369F80095019804A94FF00A03FFF7FFFD044628 -S1136A0892E048F080020095019804A94FF0000331 -S1136A18FFF7F4FD044687E018F0010F7FF4BAAEDF -S1136A28049B03F1040204921B6818F0100F18BFAA -S1136A3883F800B07FF4AEAE18F0080F14BFA3F8C3 -S1136A4800B0C3F800B0A5E648F0800200950198AC -S1136A5804A94FF00803FFF7D1FD044664E028F0C9 -S1136A681E020095019804A94FF01003FFF7C6FD14 -S1136A78044659E04FF0FF3404F101040198FFF78C -S1136A8803FA0646FFF786FA0028F5D1B6F1FF3F68 -S1136A9808BF4FF0FF3447D018F0010701BF049B2B -S1136AA81A1D04921B680EBF039300220392002D43 -S1136AB816DC1AE005F1FF351FB9039B03F8016BD7 -S1136AC8039304F101040198FFF7DEF90646431C19 -S1136AD818BF0123002DD4BF002303F0010323B101 -S1136AE83046FFF757FA0028E4D030460199FFF7FB -S1136AF875FDCFB94FF00002039B1A7014E048F0FB -S1136B0880020095019804A94FF00A03FFF776FD67 -S1136B18044609E048F080020095019804A94FF062 -S1136B281003FFF76BFD0446002C0FDA029A131CBE -S1136B3818BF0123B4F1FF3F0CBF1C4643F0010406 -S1136B48002C08BF4FF0FF32029207E018F0010F43 -S1136B5802BF029B01330293A3441BE6029805B0CB -S1136B68BDE8F08F00B503B400F008F803BC02B424 -S1136B78694609BE00F004F801BC00BD704700BFB7 -S1076B88704700BF8F -S1136B8C050000000000000080250000000000004B -S1136B9C0000000000000000303132333435363749 -S1136BAC3839616263646566303132333435363773 -S10B6BBC3839414243444546C7 -S10B6BC40048E8010080000014 +S113420800AF44F65123C0F2000398474FF0B903B6 +S11342183B603B68984707F10407BD4680BD00BF73 +S1134228B0B586B000AF46F60C63C0F200033C4656 +S11342381D460FCD0FC495E8030084E803004FF42E +S11342484240C0F202004FF0010145F22513C0F2CA +S1134258000398474FF002004FF006014FF00402A4 +S11342684FF0010345F67104C0F20004A0474FF073 +S113427802004FF007014FF001024FF0000345F62A +S11342887104C0F20004A0474FF40C50C0F20400BB +S11342984FF0010145F22513C0F2000398474FF08F +S11342A80300C0F212004FF0020145F25953C0F264 +S11342B8000398474FF4AA50C0F216004FF00101CA +S11342C844F6DD63C0F2000398474FF4AA50C0F2E5 +S11342D816004FF0010145F22513C0F20003984778 +S11342E84FF000033B603B464FF48840C4F208009B +S11342F8194645F66533C0F2000398474FF48840E1 +S1134308C4F208004FF000014FF4165245F6512349 +S1134318C0F2000398474FF48843C4F208034FF0EF +S113432803025A654FF48840C4F208004FF00401B0 +S113433844F2E913C0F2000398474FF48840C4F2EA +S113434808004FF0050145F6E523C0F2000398473D +S113435807F11807BD46B0BD80B500AF40F20803A9 +S1134368C2F200031B78002B1AD140F20C00C2F2EF +S1134378000044F23D43C0F2000398470346012B72 +S113438856D140F20803C2F200034FF001021A703A +S113439840F25003C2F200034FF000021A7047E0E3 +S11343A840F25003C2F200031B7803F1010240F209 +S11343B80C03C2F20003D318184644F23D43C0F27A +S11343C8000398470346012B32D140F25003C2F24E +S11343D800031B7803F10103DAB240F25003C2F27E +S11343E800031A7040F20C03C2F200031A7840F278 +S11343F85003C2F200031B789A4219D140F2080311 +S1134408C2F200034FF000021A7040F20C03C2F229 +S113441800035B78FF2B0BD140F20C03C2F20003BC +S11344289B78002B04D144F20523C0F2000398477B +S113443880BD00BF80B581B000AF38604FF48843B9 +S1134448C4F20803DB6A03F00403002B0FD04FF413 +S11344588840C4F2080045F6ED33C0F200039847DB +S113446803461A463B681A704FF0010301E04FF007 +S11344780003184607F10407BD4680BD80B400AFA9 +S113448862B6BD4680BC704780B500AF4FF420408B +S1134498C4F2080046F22D03C0F20003984780BD19 +S11344A880B581B000AF44F68923C0F20003984771 +S11344B803463B6040F25403C2F200031B683A68A7 +S11344C8D21A40F2F3139A4236D940F25803C2F290 +S11344D800031B78002B14D140F25803C2F20003E6 +S11344E84FF001021A704FF42040C4F208004FF054 +S11344F800014FF0010245F60D73C0F2000398471E +S113450813E040F25803C2F200034FF000021A709D +S11345184FF42040C4F208004FF000014FF00002AD +S113452845F60D73C0F20003984740F25403C2F2F3 +S113453800033A681A6000E000BF07F10407BD46AB +S113454880BD00BF80B584B000AF48F2FC13C0F64C +S1134558E0731B68FB60FB684FEA1363002B1BD1F5 +S11345684AF20C03C4F20C03BB60BB681B6823F05B +S11345787002BB681A6046F22003C4F20C03BB60E5 +S1134588BB681B6823F06042BB681A60BB681B6881 +S113459863F06062BB681A60FB684FEA1363032B1D +S11345A837D846F22003C4F20C03BB60BB681B680F +S11345B823F4FC52BB681A6048F24003C4F20C03AB +S11345C8BB60BB684FF000021A6048F24403C4F2AF +S11345D80C03BB60BB684FF000021A6048F2580332 +S11345E8C4F20C03BB60BB684FF000021A6048F2C7 +S11345F86003C4F20C03BB60BB684FF000021A608E +S113460848F27803C4F20C03BB60BB684FF00002A5 +S11346181A603B46184645F61543C0F2000398470E +S11346283B78012B1BD17B78002B0AD148F240033D +S1134638C4F20C03BB60BB681B6843F00202BB688E +S11346481A607B78012B0AD848F24403C4F20C039D +S1134658BB60BB681B6843F00102BB681A6048F280 +S1134668F013C0F6E0731B68FB60FA684BF6FF139F +S1134678C4F68A439A4257D848F24403C4F20C0356 +S1134688BB60BB681B6843F49042BB681A6048F27D +S1134698B413C0F6E0731B6803F4FE434FEA132314 +S11346A84FEA03637B6048F2B413C0F6E0731B68F7 +S11346B803F07F034FEA03437A6813437B6048F2AD +S11346C8B413C0F6E0731B6803F4FE437A6813431B +S11346D87B6048F2B413C0F6E0731B6803F07F03F1 +S11346E87A6813437B6042F23403C4F20003BB606C +S11346F8BB687A681A6044F22C03C4F20003BB60F6 +S113470848F2C813C0F6E0731B687B60BB687A681C +S11347181A6048F24403C4F20C03BB60BB681B680C +S113472823F49042BB681A6007F11007BD4680BDA8 +S113473880B500AF44F26973C0F20003984744F2AD +S11347482923C0F20003984744F2A943C0F20003A6 +S1134758984744F26133C0F200039847F4E700BF76 +S113476890B500AF44F6F933C0F20003984744F219 +S11347784D53C0F2000398474FF000004FF0010179 +S11347884FF0010245F21973C0F2000398474FF441 +S11347980043C4F20C034FF40042C4F20C02126C3E +S11347A842F00F021A644FF40043C4F20C034FF4AE +S11347B80042C4F20C02526C6FEA12426FEA0242DF +S11347C85A644FF44070C0F204004FF0000145F2FF +S11347D82513C0F2000398474FF49850C0F2040020 +S11347E84FF0000145F22513C0F2000398474FF437 +S11347F84C50C0F204004FF0000145F22513C0F2FA +S1134808000398474FF42240C0F202004FF0000121 +S113481845F22513C0F2000398474FF40070C0F224 +S113482802004FF0000145F22513C0F20003984737 +S11348384FF49050C0F202004FF0000145F22513E6 +S1134848C0F2000398474FF40850C0F202004FF03A +S1134858000145F22513C0F2000398474FF448506D +S1134868C0F202004FF0000145F22513C0F2000324 +S113487898474FF4E440C0F202004FF0000145F2BB +S11348882513C0F2000398474FF40240C0F2020017 +S11348984FF0000145F22513C0F2000398474FF486 +S11348A83240C0F202004FF0000145F22513C0F275 +S11348B8000398474FF46240C0F202004FF0000131 +S11348C845F22513C0F2000398474FF47240C0F232 +S11348D802004FF0000145F22513C0F20003984787 +S11348E84FF45240C0F202004FF0000145F2251384 +S11348F8C0F2000398474FF001004FF009014FF050 +S113490805024FF0010345F67104C0F20004A04704 +S11349184FF001004FF0020145F61D03C0F20003F9 +S1134928984744F29143C0F20003984744F60D2394 +S1134938C0F20003984744F28543C0F20003984745 +S113494890BD00BF80B482B000AF786039607B68E6 +S1134958002B10DA4FF46D43CEF200037A6802F0AC +S11349680F02A2F104013A68D2B24FEA4212D2B25B +S11349785B181A760CE04FF46143CEF200037968B1 +S11349883A68D2B24FEA4212D2B25B1883F80023D3 +S113499807F10807BD4680BC704700BF80B581B0E9 +S11349A800AF38603A686FF07F439A4202D94FF0FB +S11349B8010322E04EF21003CEF200033A6822F01B +S11349C87F4202F1FF325A604FF0FF304FF0070187 +S11349D844F64D13C0F2000398474EF21003CEF28A +S11349E800034FF000029A604EF21003CEF2000367 +S11349F84FF007021A604FF00003184607F1040746 +S1134A08BD4680BD80B500AF4FF02000C0F2040061 +S1134A1845F2F913C0F200039847024644F6D3530B +S1134A28C1F26203A3FB02134FEA9313184644F638 +S1134A38A513C0F2000398474FF0000044F6692319 +S1134A48C0F20003984780BD80B400AF4EF2100353 +S1134A58CEF200034FF000021A60BD4680BC7047D6 +S1134A6880B481B000AF386040F25C03C2F2000346 +S1134A783A681A6007F10407BD4680BC704700BF56 +S1134A8880B400AF40F25C03C2F200031B6818460E +S1134A98BD4680BC704700BF80B400AF40F25C03E1 +S1134AA8C2F200031B6803F1010240F25C03C2F284 +S1134AB800031A60BD4680BC704700BF80B400AFD5 +S1134AC8FEE700BF80B581B000AF44F61133C0F2F1 +S1134AD80003984703463B604FF40043C4F20C03B9 +S1134AE85B6803F00F033A6822FA03F33B6040F271 +S1134AF86003C2F200033A681A603B68184607F17B +S1134B080407BD4680BD00BF80B481B000AF4FF438 +S1134B180043C4F20C03DB6A03F47053B3F5805FFB +S1134B280DD0B3F5005F03D0B3F5006F0BD011E0DF +S1134B3840F20403C2F200031B683B6050E04FF4E8 +S1134B4800433B604CE040F20003C2F200031B68E0 +S1134B583B6045E04FF40043C4F20C03DB6803F404 +S1134B68E063B3F5007F24D0B3F5007F05D8002BAC +S1134B782BD0B3F5807F22D02DE0B3F5806F0CD015 +S1134B88B3F5A06F03D0B3F5407F0CD023E04FF406 +S1134B987C53C0F2AB133B6021E046F64073C0F28D +S1134BA840133B601BE049F68073C0F2D5033B60B9 +S1134BB815E04DF6C003C0F2A7033B600FE04CF6C6 +S1134BC8C073C0F26A033B6009E044F24023C0F2B8 +S1134BD80F033B6003E04FF000033B6000BF00BFDE +S1134BE83B68184607F10407BD4680BC704700BF00 +S1134BF880B400AFBD4680BC704700BF80B400AF2E +S1134C084FF400431846BD4680BC704780B400AFDB +S1134C1840F20403C2F200031B681846BD4680BC78 +S1134C28704700BF80B484B000AFB86079603A6060 +S1134C38BB6803F104734FEAC3027B68D3184FEAD5 +S1134C488303FB60FB683A681A6007F11007BD46E6 +S1134C5880BC704780B481B000AF4FF00003C4F249 +S1134C680C035B683B603B6803F00703032B19D80C +S1134C7801A252F823F000BF914C0000914C0000AF +S1134C889F4C00009F4C00003B6823F0070343F04F +S1134C9801033B6006E03B6823F0070343F003038A +S1134CA83B6000BF4FF00003C4F20C033A685A603B +S1134CB807F10407BD4680BC704700BF90B484B0B8 +S1134CC800AF38603B68BB60BB68B3FA83F4FC711F +S1134CD8FB79C3F11F03FB60FB68184607F1100753 +S1134CE8BD4690BC704700BF80B482B000AF386046 +S1134CF84FF00003C4F20C035B687B603A684FF41E +S1134D081053C0F2F4039A421BD93A684FF4904303 +S1134D18C0F2E8139A4214D87B6803F00703A3F19E +S1134D280203012B06D87B6823F0070343F003032F +S1134D387B6006E07B6823F0070343F001037B6094 +S1134D4800BF3A684FF41053C0F2F4039A4212D8E1 +S1134D587B6803F00703A3F10203012B06D87B68E1 +S1134D6823F0070343F002037B6004E07B6823F02D +S1134D7807037B6000BF4FF00003C4F20C037A689A +S1134D885A6007F10807BD4680BC704780B481B0FB +S1134D9800AF49F68073C0F2D5033B603B68184600 +S1134DA807F10407BD4680BC704700BF80B582B0D8 +S1134DB800AF4FF00400C0F2180045F24543C0F2BA +S1134DC80003984703463B603B68072B09D0082B30 +S1134DD80FD144F61133C0F20003984703467B60B1 +S1134DE80BE044F69553C0F20003984703467B60F2 +S1134DF803E04FF000037B6000BF7B68184607F1AF +S1134E080807BD4680BD00BF80B582B000AF3860DA +S1134E184FF40043C4F20C039A6A3B684FEA430315 +S1134E2822FA03F303F00303032B29D801A252F84F +S1134E3823F000BF814E00004D4E00005D4E00007F +S1134E486D4E000044F60543C0F20003984703463C +S1134E587B6019E044F61543C0F200039847034603 +S1134E687B6011E044F6CD23C0F200039847034663 +S1134E784FEA53037B6007E04FF000037B6003E0D5 +S1134E884FF000037B6000BF7B68184607F10807F2 +S1134E98BD4680BD80B481B000AF38604FF4004394 +S1134EA8C4F20C035B6D03F00103DBB2002B0AD1DF +S1134EB800BF4FF40043C4F20C031A6D3B6813405F +S1134EC8002BF6D100E000BF07F10407BD4680BC03 +S1134ED8704700BF80B584B000AF786039607B68E4 +S1134EE84FEA131303F00F03FB60FB6803F1FF336E +S1134EF8032B00F20E8101A252F823F0154F000093 +S1134F08434F0000954F00007F500000386844F676 +S1134F18C543C0F20003984703463B604FF400437F +S1134F28C4F20C034FF40042C4F20C02926822F05B +S1134F380F013A680A439A60ECE044F65D43C0F214 +S1134F4800039847386844F6C543C0F200039847FD +S1134F5803463B604FF40043C4F20C034FF4004291 +S1134F68C4F20C02526822F00F013A680A435A60EC +S1134F7844F6CD23C0F2000398470346BB60B868E3 +S1134F8844F6F143C0F200039847C3E07A6841F25B +S1134F983043C0F20A039A4229D04FF03003C0F2DA +S1134FA80C039A4243D04FF48663C0F208039A4232 +S1134FB85FD14FF0040044F69D63C0F200039847A4 +S1134FC8386844F6C543C0F20003984703463B607B +S1134FD84FF40043C4F20C034FF40042C4F20C0231 +S1134FE8926E22F00F013A680A439A6642E04FF043 +S1134FF8040044F69D63C0F200039847386844F6F9 +S1135008C543C0F20003984703463B604FF400438E +S1135018C4F20C034FF40042C4F20C02926E22F064 +S1135028F0013A684FEA02120A439A6622E04FF006 +S1135038040044F69D63C0F200039847386844F6B8 +S1135048C543C0F20003984703463B604FF400434E +S1135058C4F20C034FF40042C4F20C02926E22F420 +S113506840713A68A2F110024FEA02220A439A6692 +S113507800E000BF4EE07A684FF4A863C0F214035E +S11350889A4206D04FF4AA53C0F216039A421ED08D +S11350983DE04FF0400044F69D63C0F2000398479A +S11350A8386844F6C543C0F20003984703463B609A +S11350B84FF40043C4F20C034FF40042C4F20C0250 +S11350C8126F22F003013A680A431A6720E04FF08E +S11350D8400044F69D63C0F200039847386844F6DC +S11350E8C543C0F20003984703463B604FF40043AE +S11350F8C4F20C034FF40042C4F20C02126F22F003 +S113510830013A684FEA02120A431A6700E000BF06 +S113511800E000BF07F11007BD4680BD80B585B02B +S113512800AF78600B463B704FF00003FB607B6870 +S11351384FEA132303F00F0303F1FF33052B52D86F +S113514801A252F823F000BF695100007551000014 +S1135158815100008D5100009F510000B1510000A1 +S113516848F20803C4F20C033B6123E048F2440309 +S1135178C4F20C033B611DE048F24003C4F20C0383 +S11351883B6117E048F25803C4F20C033B614FF04B +S11351980103FB600EE048F26003C4F20C033B61B8 +S11351A84FF01003FB6005E048F27803C4F20C03E7 +S11351B83B6100BF7B684FEA133303F01F03BB60F6 +S11351C8FB68002B05D0F86844F69D63C0F2000321 +S11351D898473B783869B9681A4644F62D43C0F2B3 +S11351E80003984700E000BF07F11407BD4680BDDF +S11351F880B582B000AF38603B6803F47813B3F528 +S1135208402F00F08F80B3F5402F15D8B3F5802FC9 +S11352184AD0B3F5802F05D8002B2AD0B3F5003F28 +S11352282FD000E1B3F5002F50D0B3F5202F62D072 +S1135238B3F5C02F40D0F6E0B3F5A01F00F0B78057 +S1135248B3F5A01F08D8B3F5602F00F08280B3F53A +S1135258901F00F0A280E6E0B3F5C01F00F0D380F1 +S1135268B3F5D01F00F0D780B3F5B01F00F0B480B9 +S1135278D9E044F61133C0F20003984703467B6033 +S1135288D5E044F61133C0F20003984703467B6027 +S11352984FF40043C4F20C039B6803F00F037A68CD +S11352A822FA03F37B60C2E044F6CD23C0F2000384 +S11352B8984703467B60BAE04FF0000044F6116358 +S11352C8C0F20003984703467B60B0E04FF000004B +S11352D844F61163C0F20003984703467B604FF419 +S11352E80043C4F20C039B6E03F00F037A6822FA9E +S11352F803F37B609BE04FF0000044F61163C0F2B7 +S11353080003984703467B604FF40043C4F20C0340 +S11353189B6E03F0F0034FEA13137A6822FA03F33F +S11353287B6084E04FF0000044F61163C0F2000390 +S1135338984703467B604FF40043C4F20C039B6E0A +S113534803F440734FEA13237A6822FA03F37B6069 +S11353586DE04FF0000044F61163C0F20003984773 +S113536803467B604FF40043C4F20C039B6E03F4C2 +S113537840734FEA13237A6822FA03F37B604FF4ED +S11353880043C4F20C03DB6F03F0070303F10103CA +S11353987A68B2FBF3F37B6049E04FF0010044F60E +S11353A81163C0F20003984703467B603FE04FF067 +S11353B8010044F61163C0F20003984703467B607A +S11353C84FF40043C4F20C031B6F03F003037A6821 +S11353D822FA03F37B602AE04FF0010044F61163DC +S11353E8C0F20003984703467B604FF40043C4F2BD +S11353F80C031B6F03F030034FEA13137A6822FA85 +S113540803F37B6013E044F6B553C0F200039847F6 +S113541803467B600BE044F69553C0F200039847BB +S113542803467B6003E04FF000037B6000BF7B68AA +S1135438184607F10807BD4680BD00BF80B483B095 +S113544800AF38604FF00103BB603B6803F00F0303 +S11354587B607B6803F1FF33032B6DD801A252F8FC +S113546823F000BF7D540000C1540000FD54000027 +S1135478395500004FF40043C4F20C03DB6A03F40B +S11354887053B3F5805F0AD0B3F5005F03D0B3F56A +S1135498006F08D00BE04FF00203BB600BE04FF045 +S11354A80303BB6007E04FF00403BB6003E04FF065 +S11354B80503BB6000BF43E04FF40043C4F20C0390 +S11354C89B6A03F00303022B07D0032B09D0012B9B +S11354D80BD14FF00303BB600BE04FF00203BB603A +S11354E807E04FF00603BB6003E04FF00103BB6025 +S11354F800BF25E04FF40043C4F20C039B6A03F099 +S11355080C03022B07D0032B09D0012B0BD14FF02E +S11355180303BB600BE04FF00203BB6007E04FF0EE +S11355280603BB6003E04FF00103BB6000BF07E064 +S11355384FF00703BB6003E04FF00003BB6000BFFC +S1135548BB68184607F10C07BD4680BC704700BF0E +S113555880B588B000AF786039604FF00303FB6111 +S11355684FF00303BB617B6803F00F03FB60FB6828 +S1135578012B06D0012BC0F0C280032B00F2BF80A0 +S113558854E03B68A3F10203032B00F2BA8001A2A2 +S113559852F823F0AD550000BB550000C955000072 +S11355A8D75500004FF00403FB614FF00003BB61C3 +S11355B814E04FF00303FB614FF00103BB610DE0FE +S11355C84FF00203FB614FF00203BB6106E04FF0AA +S11355D80103FB614FF00303BB6100BFB8694FF0DF +S11355E801014FF0010245F21973C0F20003984714 +S11355F844F65D43C0F2000398474FF40043C4F2F5 +S11356080C03FA695A6245F2FD73C0F20003984725 +S113561844F6CD23C0F2000398470346BB60B8683C +S113562844F6F143C0F2000398476DE0FB68022B8F +S113563803D14FF000037B6102E04FF002037B616A +S11356483B6803F1FF33052B5DD801A252F823F020 +S11356587156000079560000975600000F57000055 +S11356680F570000B55600004FF000033B612EE0D1 +S11356784FF000004FF001014FF0010245F2197399 +S1135688C0F2000398474FF002033B611FE04FF05C +S113569801004FF001014FF0010245F21973C0F205 +S11356A8000398474FF001033B6110E048F24000C3 +S11356B8C4F20C004FF002014FF0010244F62D43EE +S11356C8C0F2000398474FF003033B6100BF4FF457 +S11356D80043C4F20C034FF40042C4F20C02916A72 +S11356E87A694FF0030000FA02F26FEA02021140ED +S11356F87A69386900FA02F20A439A6204E000BF40 +S113570802E000BF00E000BF07F12007BD4680BDEE +S113571880B586B000AFB86013460A463A713B704C +S1135728BB68042B61D801A252F823F099570000F2 +S1135738855700005D570000495700007157000065 +S11357484FF001033B614FF00203FB604FF002038B +S11357587B6127E04FF004033B614FF00803FB60D3 +S11357684FF008037B611DE04FF010033B614FF0DD +S11357782003FB604FF020037B6113E04FF04003EC +S11357883B614FF08003FB604FF080037B6109E0CD +S11357984FF480733B614FF40073FB604FF4007364 +S11357A87B6100BF3B79002B13D04FF40043C4F254 +S11357B80C033A691A623B78002B10D000BF4FF4EF +S11357C80043C4F20C03DA6A7B691340002BF6D059 +S11357D805E04FF40043C4F20C03FA681A6245F278 +S11357E8FD73C0F20003984700E000BF07F11807F3 +S11357F8BD4680BD80B400AF4FF40043C4F20C032F +S1135808DB6A9AB240F26403C2F200031A80BD460E +S113581880BC704780B482B000AF786039604FF4C0 +S1135828C042C4F200024FF4C041C4F200017868D7 +S113583803464FEAC3031B184FEA8303CB181B68BC +S113584823F003013B6841EA030079680B464FEAF9 +S1135858C3035B184FEA8303D318186007F10807DA +S1135868BD4680BC704700BF80B484B000AFF86008 +S1135878B9607A603B607B68002B2DD03B68002BB5 +S113588815D04FF4C042C4F20002BB684FF00101C6 +S113589801FA03F31846F9680B464FEAC3035B1889 +S11358A84FEA8303D31803F11003186014E04FF48C +S11358B8C042C4F20002BB684FF0010101FA03F3CD +S11358C81846F9680B464FEAC3035B184FEA83038B +S11358D8D31803F114031860BB68072B30D84FF4AE +S11358E8C042C4F200024FF4C041C4F20001F86897 +S11358F803464FEAC3031B184FEA8303CB1803F18B +S113590804031968BB684FEA83034FF00F0000FAD9 +S113591803F36FEA03031940BB684FEA830378680B +S113592800FA03F341EA0300F9680B464FEAC3039C +S11359385B184FEA8303D31803F10403186033E0B8 +S11359484FF4C042C4F200024FF4C041C4F2000153 +S1135958F86803464FEAC3031B184FEA8303CB18BE +S113596803F108031968BB684FEA8303A3F1200312 +S11359784FF00F0000FA03F36FEA03031940BB6802 +S11359884FEA8303A3F12003786800FA03F341EA9A +S11359980300F9680B464FEAC3035B184FEA830315 +S11359A8D31803F1080318607B68002B2DD13B68DA +S11359B8002B15D04FF4C042C4F20002BB684FF06C +S11359C8010101FA03F31846F9680B464FEAC303C9 +S11359D85B184FEA8303D31803F11003186014E02B +S11359E84FF4C042C4F20002BB684FF0010101FA4F +S11359F803F31846F9680B464FEAC3035B184FEAEA +S1135A088303D31803F11403186007F11007BD4684 +S1135A1880BC704780B482B000AF786039607B681E +S1135A281B6C03F00103DBB2002B07D100BF7B68BA +S1135A385A6C3B681340002BF9D100E000BF07F112 +S1135A480807BD4680BC704780B585B000AFB86014 +S1135A5879603A607B68002B20D1BA684FF48043A0 +S1135A68C4F208039A4205D14FF4A863C0F21403A0 +S1135A783B610BE0BA684FF48843C4F208039A42C6 +S1135A8827D14FF4AA53C0F216033B61386945F293 +S1135A98F913C0F20003984703467B607B684FEA1A +S1135AA843123B68B2FBF3F3FB60FB68A3F12003EA +S1135AB8FB60FB684FEAC303FB60B8684FF004015E +S1135AC845F61D23C0F200039847BB68FA68DA60FC +S1135AD800E000BF07F11407BD4680BD80B583B060 +S1135AE800AF786039603B686FEA0303BB60BB684A +S1135AF803F00503BB60BB684FEA4303BB60BA68A5 +S1135B083B681343BB6078684FF0020145F61D23D8 +S1135B18C0F2000398477B68BA685A6007F10C071B +S1135B28BD4680BD80B482B000AF78600B463B7040 +S1135B383B78002B09D000BF7B685B6C002BFBD142 +S1135B487B684FF001021A6403E07B684FF000029F +S1135B581A6407F10807BD4680BC704780B582B057 +S1135B6800AF7860396078684FF0020145F61D236C +S1135B78C0F2000398477B684FF00A025A607868BD +S1135B884FF0010145F62D33C0F2000398477B68B6 +S1135B981B6823F01C023B68DB681A433B681B69DB +S1135BA81A433B685B691A437B681A603B685A6806 +S1135BB83B689B68786811461A4645F65123C0F23B +S1135BC8000398473B681A687B685A6078684FF006 +S1135BD8000145F62D33C0F20003984707F1080782 +S1135BE8BD4680BD80B481B000AF386000BF3B685B +S1135BF89B6803F02003002BF9D03B68DB69DBB218 +S1135C08184607F10407BD4680BC704780B482B0CB +S1135C1800AF38604FF6D073CEF20F031B69DBB2C6 +S1135C2803F03F03DAB23B681A704FF6D073CEF232 +S1135C380F039B69DBB223F00F03FB714FF6D0739C +S1135C48CEF20F03DB6903F0F0034FEA1313DAB261 +S1135C58FB791343FB713B68FA795A7007F108071B +S1135C68BD4680BC704700BF80B481B000AF3860C7 +S1135C784FF46143CEF200033A684FEA521239688E +S1135C8801F01F014FF0010000FA01F143F822105E +S1135C9807F10407BD4680BC704700BF80B481B0DB +S1135CA800AF4FF42043C4F208033B603B684FF055 +S1135CB8FF325A6240F26803C2F200031B6803F120 +S1135CC8010240F26803C2F200031A6007F10407F4 +S1135CD8BD4680BC704700BF80B483B000AFB860D5 +S1135CE879603A603B681F2B07DD3B68A3F120030A +S1135CF83B607B6803F104037B604FF001023B685F +S1135D0802FA03F33B607B68072B4BD801A252F8D5 +S1135D1823F000BF3D5D00004B5D0000595D0000AD +S1135D28675D0000755D0000835D0000915D000003 +S1135D389F5D0000BB681A6C3B681A43BB681A6411 +S1135D4830E0BB685A6C3B681A43BB685A6429E064 +S1135D58BB689A6C3B681A43BB689A6422E0BB68C8 +S1135D68DA6C3B681A43BB68DA641BE0BB681A6DDB +S1135D783B681A43BB681A6514E0BB685A6D3B68F4 +S1135D881A43BB685A650DE0BB689A6D3B681A43B1 +S1135D98BB689A6506E0BB68DA6D3B681A43BB6862 +S1135DA8DA6500BF07F10C07BD4680BC704700BF29 +S1135DB880B483B000AFB86079603A603B681F2B49 +S1135DC807DD3B68A3F120033B607B6803F1040310 +S1135DD87B604FF001023B6802FA03F33B607B6887 +S1135DE8072B5BD801A252F823F000BF155E000010 +S1135DF8275E0000395E00004B5E00005D5E000017 +S1135E086F5E0000815E0000935E0000BB681A6C40 +S1135E183B686FEA03031A40BB681A643EE0BB6838 +S1135E285A6C3B686FEA03031A40BB685A6435E04E +S1135E38BB689A6C3B686FEA03031A40BB689A64B0 +S1135E482CE0BB68DA6C3B686FEA03031A40BB6852 +S1135E58DA6423E0BB681A6D3B686FEA03031A40EF +S1135E68BB681A651AE0BB685A6D3B686FEA03039E +S1135E781A40BB685A6511E0BB689A6D3B686FEAC3 +S1135E8803031A40BB689A6508E0BB68DA6D3B688F +S1135E986FEA03031A40BB68DA6500BF07F10C0711 +S1135EA8BD4680BC704700BF80B481B000AF386085 +S1135EB83B684FF000021A643B684FF000021A6511 +S1135EC83B684FF000025A643B684FF000025A6581 +S1135ED83B684FF000029A643B684FF000029A65F1 +S1135EE83B684FF00002DA643B684FF00002DA6561 +S1135EF800BF3B685B6E002BFBD107F10407BD466E +S1135F0880BC704780B585B000AFB86079603A60EE +S1135F187B680B2B6ED801A252F823F0555F000062 +S1135F28635F0000715F00007F5F00008D5F000009 +S1135F389B5F0000A95F0000B75F0000C55F000019 +S1135F48D35F0000E15F0000EF5F00004FF0030340 +S1135F583B614FF00F03FB604CE04FF001033B61E2 +S1135F684FF00303FB6045E04FF003033B614FF040 +S1135F780303FB603EE04FF000033B614FF0030373 +S1135F88FB6037E04FF002033B614FF00303FB6013 +S1135F9830E04FF000033B614FF02703FB6029E03A +S1135FA84FF003033B614FF02703FB6022E04FF0FF +S1135FB803033B614FF00103FB601BE04FF0020356 +S1135FC83B614FF00103FB6014E04FF001033B61B8 +S1135FD84FF00103FB600DE04FF001033B614FF00C +S1135FE80103FB6006E04FF003033B614FF0070336 +S1135FF8FB6000BF3B68002B08D0B8683969FA68B1 +S113600845F6E143C0F20003984707E0B8683969E8 +S1136018FA6845F6B953C0F20003984707F1140724 +S1136028BD4680BD80B582B000AF38604FF40043F0 +S1136038C4F20C037B607B689B6A23F003027B68D1 +S11360489A627B689B6A43F002027B689A627B6867 +S11360589B6D43F004027B689A657B689B6E23F40E +S113606840727B689A667B689B6E43F440727B68D7 +S11360789A663B684FF000029A6200BF3B685B6E09 +S1136088002BFBD13B684FF0FF325A624FF01B00E4 +S113609845F67143C0F2000398473B684FF001028C +S11360A89A623B6841F60B725A607B684FF00002B3 +S11360B8DA67386845F6B163C0F2000398473B686D +S11360C840F2FF329A603B684FF005021A6000BF45 +S11360D83B685B6E002BFBD13A684FF48073C0F2C7 +S11360E81C03D36000BF3B685B6E002BFBD13B688D +S11360F84FF001025A623B684FF001029A6207F1BD +S11361080807BD4680BD00BF00B5034602783AB112 +S11361184268107840B102F101025A605DF804FB4C +S1136128436898475DF804FB4FF0FF305DF804FBC3 +S113613830B50446C8B2A16849B12368626803F15E +S11361480105954208BF0020934238BFC854E3684C +S11361582BB121686268914201D22146984723688D +S113616803F10103236030BDF0B5154601290BD4B2 +S11361780E464FF00004C7B228463946FFF7D8FF49 +S113618804F10104B442F7D1F0BD00BF00B510F02A +S1136198100F07D100F4007000280CBF2020302015 +S11361A8FFF7E2FF5DF804FBA0F1410019288CBF5A +S11361B800200120704700BFA0F1610019288CBF9E +S11361C800200120704700BFA0F1300009288CBFCF +S11361D800200120704700BF30B504460D46FFF784 +S11361E8F3FF10B1A4F130000FE02046FFF7E4FFFD +S11361F810B1A4F1570008E02046FFF7D5FF10B10D +S1136208A4F1370001E04FF0FF30A842A8BF4FF0D7 +S1136218FF3030BDA0F10903202814BF002001205D +S1136228042B98BF40F00100704700BF00F1010142 +S113623810F0030F11D010F8012B002A23D010F00E +S1136248030F0AD010F8012B002A1CD010F0030FFA +S113625803D010F8012B002A15D02DE970004FF057 +S113626801324FF0803350F8044BA4EB020525EAC1 +S113627804051D4000D1F6E7A0F1040070BC10F835 +S1136288012B002AFBD1A0EB010070472DE9F04F48 +S113629887B007460C4603924FF00003036046F6A6 +S11362A8246BC0F2000B46F63463C0F20003029379 +S11362B8C1E204F10104252904BF2346002603D0C2 +S11362C83846FFF735FFB6E2194613F8010B1C46AA +S11362D8A0F12002102A1CD8DFE802F0091B1B0CCD +S11362E81B1B1B0F1B1B1B121B151B1B180046F02B +S11362F84006E9E746F08006E6E746F40046E3E7A9 +S113630846F02006E0E746F01006DDE746F400769E +S1136318DAE72A2808D0A0F13002D2B2092A88BFC5 +S11363284FF0000A11D920E0039B03F10400039005 +S1136338D3F800A0BAF1000FBCBFCAF1000A46F0B6 +S11363481006487801F102040FE04FF0000A0AEB46 +S11363588A0AA0F1300000EB4A0A13F8010B1C4624 +S1136368A0F13002D2B2092AF1D92AEAEA7A2E280F +S113637818BF4FF000082DD120782A280AD004F13C +S11363880104A0F13003DBB2092B88BF4FF00008E9 +S11363980AD91DE0039B03F104020392D3F8008099 +S11363A8607804F1020410E023464FF0000808EB7B +S11363B88808A0F1300000EB480813F8010B1C46CC +S11363C8A0F13002D2B2092AF1D9B8F1000F01DBE9 +S11363D846F4807668280AD12078682803BF46F0F6 +S11363E8080660780234013418BF46F00406782899 +S11363F87AD8DFE810F02E02790079007900790064 +S113640879007900790079007900790079007900B8 +S113641879007900790079007900790079007900A8 +S11364287900790079007900790079007900790098 +S11364387900790079007900790079007900790088 +S11364488A00790079007900790079007900790067 +S11364587900790079007900790079007900790068 +S11364687900790079007900790079007900790058 +S11364787900790079007900790079007900790048 +S11364887900790079007900790079007900790038 +S11364987900790079007900790079007900790028 +S11364A8790079007900EE007900790079007900A3 +S11364B879007900790079007900790090001A014F +S11364C879007900790079001A0179007900790056 +S11364D87900AB000201DB0079007900B70079008C +S11364E8110179007900F00040F26C03C2F2000354 +S11364F81D68002D00F09F81CDF8008003AB019347 +S1136508394632465346A84795E138464FF02501A7 +S1136518FFF70EFE8FE1039B03F1040203921D783B +S11365280AF1FF3A304651463A46FFF72FFE3846FD +S11365382946FFF7FDFD16F0100F00F07C814FF09F +S1136548200051463A46FFF70FFE74E116F0080F93 +S1136558039B03F1040203921B683A6814BF1A7080 +S11365681A6068E1039B03F104020392D3F80090D4 +S11365784846FFF75BFE05468045ACBF0023012370 +S113658803EA1623002B18BF4546C5EB0A0A304612 +S113659851463A46FFF7FAFD002DCCD019F8011BF5 +S11365A83846FFF7C5FD013DF8D1C4E7039B03F165 +S11365B8040203921B6806F08009B9F1000F14BFA6 +S11365C84FF023094FF0000946F480764FF008088D +S11365D869E046F4005643F2780343F258097828F0 +S11365E808BF994616F0800F08BF4FF0000916F44B +S11365F8807F18BF26F400761EE006F08009B9F102 +S1136608000F14BF4FF030094FF0000916F4807FD3 +S113661818BF26F400760FE016F4807F1CBF26F41A +S113662800764FF0000907D104E046F480464FF0A5 +S1136638000901E04FF0000916F4804F1DD0039BB8 +S113664803F1040203921B6816F0040F18BF1BB26F +S113665803D116F0080F18BFDBB2002BBCBF5B4296 +S11366684FF02D091ADB06F04002002A18BF4FF03C +S1136678200916F0200F11D00EE0039B03F1040249 +S113668803921B6816F0040F18BF9BB206D116F0CC +S1136698080F18BFDBB201E04FF02B0916F4807F16 +S11366A804D026F4007616F4807F01D14FF0010857 +S11366B8A0F15800202870D8DFE800F0196F6F6F38 +S11366C86F6F6F6F6F6F6F6F156F6F6F6F156F6F82 +S11366D86F6F6F11196F6F6F6F156F6F19004FF030 +S11366E800050BBB5BE04FF0000553BB57E04FF0D0 +S11366F80005002B53D04FF0000506F40052DDF8D6 +S113670808E032B103F00F011EF8010004A968542F +S113671805E003F00F011BF8010004A9685405F112 +S113672801051B09EDD13AE04FF0000503F007011C +S113673801F1300104AAA95405F10105DB08F5D1DA +S11367482DE04FF0000506F4004C4CF6CD4ECCF687 +S1136758CC4E6246A446144654B105F00302032AFB +S113676801BF07A842192C2102F80C1C08BF0135E7 +S113677807AA5119AEFB03024FEAD20202EB8200C8 +S1136788A3EB400303F1300301F80C3C05F10105C8 +S11367981346002AE0D1644601E04FF00005C5EB3A +S11367A8080828EAE878C8EB0A0AC5EB0A0AB9F126 +S11367B8FF0F88BF0AF1FF3AB9F1000F01D00AF1BF +S11367C8FF3A16F4007F06D1304651463A46FFF7A1 +S11367D8DDFC4FF0000AB9F1FF0F04D9C9F3072112 +S11367E83846FFF7A5FCB9F1000F04D05FFA89F128 +S11367F83846FFF79DFC304651463A46FFF7C6FC3B +S11368084FF0300041463A46FFF7AEFC012D09D45B +S11368180DF11008454415F8011D3846FFF788FCAA +S11368284545F8D116F0100F05D04FF02000514619 +S11368383A46FFF799FC217800297FF43AADBB6802 +S11368482BB13A6879688A423CBF00219954386868 +S113685801E04FF0FF3007B0BDE8F08F10B50446F3 +S11368680B783BB1B0F1FF3F06D04B6803F1FF331F +S11368784B6001E08B689847204610BD2DE9F04F26 +S113688882468B4617469846099E4FF0FF3900E02A +S1136898A94609F101055046FFF736FC0446FFF7FF +S11368A8B9FC0028F4D12346B4F1FF3F08BF4FF0E8 +S11368B8FF3500F09C8027F4C067002E4EDD17F0EA +S11368C8800F0DD02B2C03D02D2C09D147F48067D1 +S11368D809F102055046FFF717FC044606F1FF3696 +S11368E8302C14BF00230123002ED4BF002303F04F +S11368F80103002B32D047F4007706F1FF3605F187 +S113690801095046FFF700FC0446002E20DD5828F4 +S113691814BF00230123782808BF43F00103BBB147 +S1136928B8F1100F14BF00230123B8F1000F08BFFA +S113693843F0010363B127F4007706F1FF3605F14C +S113694802095046FFF7E0FB04464FF0100851E0F7 +S1136958B8F1000F08BF4FF008084BE0B8F1000F7A +S113696808BF4FF00A08002ED8BF4FF000090EDC0C +S113697815E047F4007706F1FF3608FB090905F12D +S113698801055046FFF7C0FB044616B907E04FF06F +S1136998000920464146FFF71FFC0028E9DA204693 +S11369A85146FFF75BFF17F4007F08BF6FF001053E +S11369B81DD017F0010F1AD1DBF8003003F10402DF +S11369C8CBF800201B6807F49062B2F5906F08BFFB +S11369D8C9F1000917F0100F18BF83F8009006D109 +S11369E817F0080F14BFA3F80090C3F800902846C6 +S11369F8BDE8F08F4D46B6E72DE9F04F85B001901C +S1136A088A4604924FF0000BCDF808B04CF6CC49F6 +S1136A18C0F6CC49544614F8015B002D00F0DE8121 +S1136A28252D3BD02846FFF7F5FB08B918E02C467E +S1136A3804F101052078FFF7EDFB0028F7D101E008 +S1136A480BF1010B0198FFF75FFB0546FFF7E2FB2B +S1136A580028F5D128460199FFF700FFA246D9E797 +S1136A680198FFF751FB0646A84203D10BF1010B2D +S1136A78A246CFE70199FFF7F1FE029AD2F101038A +S1136A8838BF0023B6F1FF3F14BF002603F0010608 +S1136A98002E18BF4FF0FF3202929FE19AF801309E +S1136AA82A2B06BF0AF102044FF001084FF0000830 +S1136AB84FF000050CE04D4500F3908105EB85058A +S1136AC8A6F1300616EB450500F1888148F0200848 +S1136AD8274604F101043E78A2463046FFF774FBCA +S1136AE80028E8D1414608F02002002A08BF6FF0C8 +S1136AF800454C2E05D17E7807F1020A48F0440877 +S1136B080EE0682E0CD17E78682E03BF48F010087A +S1136B18BE7807F1030A07F1020A18BF41F0080812 +S1136B28A6F12506532E00F25981DFE816F0540029 +S1136B385701570157015701570157015701570189 +S1136B485701570157015701570157015701570179 +S1136B585701570157015701570157015701570169 +S1136B685701570157015701570157015701570159 +S1136B785701570157015701570157015701570149 +S1136B885701570157015701570157015701570139 +S1136B98570157013301570157015701570157014D +S1136BA85701570157015701570170009F005701BA +S1136BB8570157015701AA005701570157015701B7 +S1136BC8B500CD00D80057015701E300570128014B +S1136BD85701570133010198FFF796FA044625280F +S1136BE802D10BF1010B15E70199FFF737FE029A61 +S1136BF8131C18BF0123B4F1FF3F0CBF1C4643F01C +S1136C080104002C08BF4FF0FF320292E6E008F0BE +S1136C182003002B08BF012518F0010401BF049BC1 +S1136C281A1D04921E6818BF0026002D00F0D68095 +S1136C38002D13DD0198FFF767FAB0F1FF3F06D185 +S1136C48029B002B08BF4FF0FF330293C6E00CB938 +S1136C5806F8010B0BF1010B013DEBD1002C7FF47D +S1136C68D9AE029B03F101030293D3E648F08002F4 +S1136C780095019804A94FF00A03FFF7FFFD0446A5 +S1136C8892E048F080020095019804A94FF00003AF +S1136C98FFF7F4FD044687E018F0010F7FF4BAAE5D +S1136CA8049B03F1040204921B6818F0100F18BF28 +S1136CB883F800B07FF4AEAE18F0080F14BFA3F841 +S1136CC800B0C3F800B0A5E648F08002009501982A +S1136CD804A94FF00803FFF7D1FD044664E028F047 +S1136CE81E020095019804A94FF01003FFF7C6FD92 +S1136CF8044659E04FF0FF3404F101040198FFF70A +S1136D0803FA0646FFF786FA0028F5D1B6F1FF3FE5 +S1136D1808BF4FF0FF3447D018F0010701BF049BA8 +S1136D281A1D04921B680EBF039300220392002DC0 +S1136D3816DC1AE005F1FF351FB9039B03F8016B54 +S1136D48039304F101040198FFF7DEF90646431C96 +S1136D5818BF0123002DD4BF002303F0010323B17E +S1136D683046FFF757FA0028E4D030460199FFF778 +S1136D7875FDCFB94FF00002039B1A7014E048F078 +S1136D8880020095019804A94FF00A03FFF776FDE5 +S1136D98044609E048F080020095019804A94FF0E0 +S1136DA81003FFF76BFD0446002C0FDA029A131C3C +S1136DB818BF0123B4F1FF3F0CBF1C4643F0010484 +S1136DC8002C08BF4FF0FF32029207E018F0010FC1 +S1136DD802BF029B01330293A3441BE6029805B049 +S1136DE8BDE8F08F00B503B400F008F803BC02B4A2 +S1136DF8694609BE00F004F801BC00BD704700BF35 +S1076E08704700BF0C +S1136E0C05000000000000008025000000000000C8 +S1136E1C00000000000000003031323334353637C6 +S1136E2C38396162636465663031323334353637F0 +S10B6E3C383941424344454644 +S10B6E440048E8010080000091 S90341714A diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzp b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzp index c1b07e18..d72ddf47 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzp +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzs b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzs index 4bc738ef..00218886 100644 --- a/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzs +++ b/Target/Demo/ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks/Prog/ide/EFM32G880_crossworks.hzs @@ -56,7 +56,7 @@ - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.elf index 5566a67d..77654425 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.map index 91830bd1..e0d91337 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.map @@ -1,21 +1,3 @@ -Archive member included because of file (symbol) - -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - (__vfprintf_int_nwp) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - (__vfscanf_int) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) (__getc) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (memcpy) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__umoddi3) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - (__do_debug_operation_bkpt) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__errno) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__floatsisf) Discarded input sections @@ -23,125 +5,125 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .bss 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .text.SysCtlSRAMSizeGet - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlFlashSizeGet - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlPinPresent - 0x00000000 0x188 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x184 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralPresent - 0x00000000 0x60 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralReset - 0x00000000 0x64 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x50 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepEnable - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepEnable - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralClockGating - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntRegister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x12 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntEnable 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntDisable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntClear 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlIntStatus - 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOSet - 0x00000000 0x5c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOGet 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOConfigSet - 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x20 THUMB Debug/../../obj/sysctl.o .text.SysCtlReset - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlSleep - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x4 THUMB Debug/../../obj/sysctl.o .text.SysCtlDeepSleep 0x00000000 0x20 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseGet 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseClear - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlBrownOutConfigSet - 0x00000000 0x44 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockSet - 0x00000000 0x90 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockGet - 0x00000000 0x48 THUMB Debug/../../obj/sysctl.o - .text.SysCtlADCSpeedSet - 0x00000000 0x84 THUMB Debug/../../obj/sysctl.o - .text.SysCtlADCSpeedGet 0x00000000 0x34 THUMB Debug/../../obj/sysctl.o + .text.SysCtlADCSpeedSet + 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + .text.SysCtlADCSpeedGet + 0x00000000 0x2c THUMB Debug/../../obj/sysctl.o .text.SysCtlIOSCVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlMOSCVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlPLLVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlClkVerificationClear - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBEnable - 0x00000000 0xb0 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBDisable - 0x00000000 0xb4 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLEnable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLDisable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlI2SMClkSet - 0x00000000 0x11c THUMB Debug/../../obj/sysctl.o + 0x00000000 0xe8 THUMB Debug/../../obj/sysctl.o .rodata.g_pulDCRegs 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o + .rodata.g_pulDCGCRegs + 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulSCGCRegs 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulSRCRRegs 0x00000000 0xc THUMB Debug/../../obj/sysctl.o - .rodata.g_pulDCGCRegs - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .data 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .bss 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .text.IntDefaultHandler - 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x2 THUMB Debug/../../obj/interrupt.o .text.IntMasterEnable 0x00000000 0xc THUMB Debug/../../obj/interrupt.o .text.IntMasterDisable 0x00000000 0xc THUMB Debug/../../obj/interrupt.o .text.IntRegister - 0x00000000 0x7c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o .text.IntUnregister - 0x00000000 0x30 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x28 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingSet - 0x00000000 0x38 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x34 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingGet - 0x00000000 0x38 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x24 THUMB Debug/../../obj/interrupt.o .text.IntPrioritySet - 0x00000000 0x50 THUMB Debug/../../obj/interrupt.o - .text.IntPriorityGet 0x00000000 0x40 THUMB Debug/../../obj/interrupt.o + .text.IntPriorityGet + 0x00000000 0x34 THUMB Debug/../../obj/interrupt.o .text.IntEnable - 0x00000000 0xa8 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x88 THUMB Debug/../../obj/interrupt.o .text.IntDisable - 0x00000000 0xa8 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x88 THUMB Debug/../../obj/interrupt.o .text.IntPendSet - 0x00000000 0x94 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x78 THUMB Debug/../../obj/interrupt.o .text.IntPendClear - 0x00000000 0x7c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x68 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskSet - 0x00000000 0xc THUMB Debug/../../obj/interrupt.o + 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskGet - 0x00000000 0xc THUMB Debug/../../obj/interrupt.o - .rodata.str1.4 + 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o + .rodata.str1.1 0x00000000 0x74 THUMB Debug/../../obj/interrupt.o vtable 0x00000000 0x11c THUMB Debug/../../obj/interrupt.o .rodata.g_pulPriority @@ -154,185 +136,187 @@ Discarded input sections .text.CPUcpsid 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o .text.CPUprimask - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text.CPUcpsie 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o .text.CPUwfi 0x00000000 0x4 THUMB Debug/../../obj/cpulib.o .text.CPUbasepriSet - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text.CPUbasepriGet - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .data 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .bss 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .text.GPIOGetIntNumber - 0x00000000 0x16c THUMB Debug/../../obj/gpio.o + 0x00000000 0xe0 THUMB Debug/../../obj/gpio.o .text.GPIODirModeGet - 0x00000000 0x58 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeSet - 0x00000000 0xac THUMB Debug/../../obj/gpio.o + 0x00000000 0x98 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeGet - 0x00000000 0x68 THUMB Debug/../../obj/gpio.o + 0x00000000 0x5c THUMB Debug/../../obj/gpio.o .text.GPIOPadConfigGet - 0x00000000 0xbc THUMB Debug/../../obj/gpio.o + 0x00000000 0xa4 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntEnable 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntDisable - 0x00000000 0x2c THUMB Debug/../../obj/gpio.o + 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntStatus - 0x00000000 0x2c THUMB Debug/../../obj/gpio.o + 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntClear - 0x00000000 0x24 THUMB Debug/../../obj/gpio.o + 0x00000000 0x20 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntRegister 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntUnregister 0x00000000 0x30 THUMB Debug/../../obj/gpio.o .text.GPIOPinRead - 0x00000000 0x24 THUMB Debug/../../obj/gpio.o + 0x00000000 0x20 THUMB Debug/../../obj/gpio.o .text.GPIOPinWrite 0x00000000 0x24 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeADC - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeCAN - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeComparator - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOInput - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutput - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutputOD - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2C - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypePWM - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeQEI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeSSI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeTimer - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBDigital - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBAnalog - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2S - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEthernetLED - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEPI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinConfigure - 0x00000000 0x80 THUMB Debug/../../obj/gpio.o + 0x00000000 0x6c THUMB Debug/../../obj/gpio.o .rodata.g_pulGPIOBaseAddrs 0x00000000 0x48 THUMB Debug/../../obj/gpio.o .text 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .data 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .bss 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .text.FlashUsecGet - 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .text.FlashUsecSet - 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .text.FlashProtectGet - 0x00000000 0xc4 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x94 THUMB Debug/../../obj/flashlib.o .text.FlashProtectSet - 0x00000000 0x18c THUMB Debug/../../obj/flashlib.o + 0x00000000 0x12c THUMB Debug/../../obj/flashlib.o .text.FlashProtectSave - 0x00000000 0x6c THUMB Debug/../../obj/flashlib.o - .text.FlashUserGet - 0x00000000 0x80 THUMB Debug/../../obj/flashlib.o - .text.FlashUserSet 0x00000000 0x50 THUMB Debug/../../obj/flashlib.o + .text.FlashUserGet + 0x00000000 0x64 THUMB Debug/../../obj/flashlib.o + .text.FlashUserSet + 0x00000000 0x38 THUMB Debug/../../obj/flashlib.o .text.FlashUserSave - 0x00000000 0xa0 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x64 THUMB Debug/../../obj/flashlib.o .text.FlashIntRegister - 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x14 THUMB Debug/../../obj/flashlib.o .text.FlashIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x12 THUMB Debug/../../obj/flashlib.o .text.FlashIntEnable 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .text.FlashIntDisable - 0x00000000 0x14 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .text.FlashIntStatus - 0x00000000 0x1c THUMB Debug/../../obj/flashlib.o + 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o .text.FlashIntClear 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .rodata.g_pulFMPPERegs 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .rodata.g_pulFMPRERegs 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + .rodata.CSWTCH.4 + 0x00000000 0x3 THUMB Debug/../../obj/flashlib.o .text 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .data 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .text.UARTParityModeSet - 0x00000000 0x64 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x54 THUMB Debug/../../obj/uartlib.o .text.UARTParityModeGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOLevelSet - 0x00000000 0x74 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x60 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOLevelGet - 0x00000000 0x30 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x2c THUMB Debug/../../obj/uartlib.o .text.UARTConfigGetExpClk - 0x00000000 0x48 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTFIFODisable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTEnableSIR - 0x00000000 0x34 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x2c THUMB Debug/../../obj/uartlib.o .text.UARTDisableSIR 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTSmartCardEnable - 0x00000000 0xac THUMB Debug/../../obj/uartlib.o + 0x00000000 0x78 THUMB Debug/../../obj/uartlib.o .text.UARTSmartCardDisable - 0x00000000 0xa0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTModemControlSet - 0x00000000 0xc0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x84 THUMB Debug/../../obj/uartlib.o .text.UARTModemControlClear - 0x00000000 0xc0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x84 THUMB Debug/../../obj/uartlib.o .text.UARTModemControlGet - 0x00000000 0xa4 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTModemStatusGet - 0x00000000 0xa4 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x70 THUMB Debug/../../obj/uartlib.o .text.UARTFlowControlSet - 0x00000000 0xbc THUMB Debug/../../obj/uartlib.o + 0x00000000 0x80 THUMB Debug/../../obj/uartlib.o .text.UARTFlowControlGet - 0x00000000 0xa0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTTxIntModeSet - 0x00000000 0x4c THUMB Debug/../../obj/uartlib.o + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTTxIntModeGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTCharsAvail 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o .text.UARTCharGet - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o - .text.UARTCharPut - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o - .text.UARTBreakCtl - 0x00000000 0x38 THUMB Debug/../../obj/uartlib.o - .text.UARTBusy 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + .text.UARTCharPut + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + .text.UARTBreakCtl + 0x00000000 0x30 THUMB Debug/../../obj/uartlib.o + .text.UARTBusy + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTIntRegister - 0x00000000 0x4c THUMB Debug/../../obj/uartlib.o - .text.UARTIntUnregister 0x00000000 0x48 THUMB Debug/../../obj/uartlib.o + .text.UARTIntUnregister + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTIntEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntDisable - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntStatus - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntClear 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTDMAEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTDMADisable - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTRxErrorGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTRxErrorClear - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text 0x00000000 0x0 THUMB Debug/../../obj/hooks.o .data 0x00000000 0x0 THUMB Debug/../../obj/hooks.o .bss 0x00000000 0x0 THUMB Debug/../../obj/hooks.o @@ -361,6 +345,8 @@ Discarded input sections .text 0x00000000 0x0 THUMB Debug/../../obj/timer.o .data 0x00000000 0x0 THUMB Debug/../../obj/timer.o .bss 0x00000000 0x0 THUMB Debug/../../obj/timer.o + .text.TimerSet + 0x00000000 0xc THUMB Debug/../../obj/timer.o .text 0x00000000 0x0 THUMB Debug/../../obj/uart.o .data 0x00000000 0x0 THUMB Debug/../../obj/uart.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uart.o @@ -377,7 +363,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/com.o .bss 0x00000000 0x0 THUMB Debug/../../obj/com.o .text.ComSetDisconnectEntryState - 0x00000000 0x10 THUMB Debug/../../obj/com.o + 0x00000000 0xc THUMB Debug/../../obj/com.o .text.ComIsConnectEntryState 0x00000000 0xc THUMB Debug/../../obj/com.o .text 0x00000000 0x0 THUMB Debug/../../obj/cop.o @@ -386,552 +372,6 @@ Discarded input sections .text 0x00000000 0x0 THUMB Debug/../../obj/xcp.o .data 0x00000000 0x0 THUMB Debug/../../obj/xcp.o .bss 0x00000000 0x0 THUMB Debug/../../obj/xcp.o - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.twodigit - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.month_name - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.checked_day_name - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_ch - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_str - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_nstr - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_digit - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigit - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigits_leading_blank - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigit2 - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_formatted - 0x00000000 0x410 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__pow10 - 0x00000000 0x70 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__stdin_ungetc - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__print_padding - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__pre_padding - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xlltoa - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xltoa - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xtoa - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.abs - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.asctime_r - 0x00000000 0xfc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.asctime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atexit - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc._execute_at_exit_fns - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.bsearch - 0x00000000 0x64 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_is_exact_power_of_two - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_round_power_of_two - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_count_leading_zeroes - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_ilogb - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_alloc - 0x00000000 0x108 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_free - 0x00000000 0xf0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_heap_init - 0x00000000 0xc0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isalpha - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isxdigit - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__strtoull - 0x00000000 0x158 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__strtoul - 0x00000000 0x104 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ispunct - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isalnum - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isprint - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isgraph - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.iscntrl - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.tolower - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.toupper - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isblank - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.div - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.itoa - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.labs - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ldiv - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_init - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_alloc - 0x00000000 0xb0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_free - 0x00000000 0xd8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_realloc - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.llabs - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.lldiv - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.lltoa - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localeconv - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.setlocale - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ltoa - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.malloc - 0x00000000 0x90 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.calloc - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.free - 0x00000000 0xb0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.realloc - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memccpy - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memcmp - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memmove - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.qsort - 0x00000000 0x264 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.rand - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.snprintf - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.sprintf - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.srand - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.sscanf - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcasecmp - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcat - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strchr - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcspn - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strdup - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strftime - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncasecmp - 0x00000000 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncat - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncmp - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnlen - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strndup - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnstr - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strpbrk - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strrchr - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strsep - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strspn - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strstr - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtod - 0x00000000 0x1c8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtof - 0x00000000 0x1a4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtok - 0x00000000 0x98 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtok_r - 0x00000000 0x84 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtol - 0x00000000 0x8c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atol - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atoi - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atof - 0x00000000 0x158 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoll - 0x00000000 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atoll - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoul - 0x00000000 0x9c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoull - 0x00000000 0xb4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localtime_r - 0x00000000 0x18c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.difftime - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.checktm - 0x00000000 0x19c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.mktime - 0x00000000 0x1bc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctime - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctime_r - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gmtime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gmtime_r - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localtime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gettimeofday - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.settimeofday - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ulltoa - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ultoa - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.utoa - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsnprintf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsprintf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsscanf - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscat - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcschr - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscmp - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscpy - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscspn - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcslen - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsdup - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncat - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnchr - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncmp - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnlen - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnstr - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcspbrk - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsrchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcssep - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsspn - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsstr - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcstok - 0x00000000 0x98 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcstok_r - 0x00000000 0x84 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemcpy - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemmove - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemcmp - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemchr - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemset - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.heap - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__crt_get_time_of_day - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.year_lengths - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.mon_name - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__atexitfns - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.last.2559 - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.invalid - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.str1.4 - 0x00000000 0x138 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.__rand_next - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.last.3020 - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.mon_lengths - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.day_name - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.month_names - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.asctime_buf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.power - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__crt_set_time_of_day - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.atexitfn_count - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.__ungot - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc._lconv - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.__ctype - 0x00000000 0x104 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc._tm 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.day_names - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.longjmp - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy_fast - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy_small - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memset - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.setjmp - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strcpy - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strcmp - 0x00000000 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strlen - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc 0x00000000 0xa4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_umod - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_asr - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_div - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_lsl - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_lsr - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_mod - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_udivmod - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_ldivmod - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_cmp - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_ucmp - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.muldi3 - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_umod - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_div - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_mod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_udivmod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_uidivmod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_idivmod - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.ctl_count_leading_zeros_32 - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.ctl_count_leading_zeros_16 - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .data.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .bss.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_printf - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_fprintf - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_scanf - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_fscanf - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__errno - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__heap_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__heap_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__printf_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__printf_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__scanf_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__scanf_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .bss.libc.errno - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int32_to_float32 - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int32_to_float64 - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint32_to_float32 - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint32_to_float64 - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int64_to_float32 - 0x00000000 0x94 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int64_to_float64 - 0x00000000 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint64_to_float32 - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint64_to_float64 - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_int32 - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_int64 - 0x00000000 0x7c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_uint32 - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_uint64 - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_int32 - 0x00000000 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_int64 - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_uint32 - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_uint64 - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_float64 - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_float32 - 0x00000000 0x70 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_add - 0x00000000 0x138 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_mul - 0x00000000 0xd4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_div - 0x00000000 0x1e0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_cmp - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpeq - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmplt - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmple - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpge - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpgt - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_add - 0x00000000 0x294 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_mul - 0x00000000 0x16c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_div - 0x00000000 0x214 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_cmp - 0x00000000 0x64 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpeq - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmplt - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmple - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpge - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpgt - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_signbit - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_signbit - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isinf - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isinf - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isnan - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isnan - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isfinite - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isfinite - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isnormal - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isnormal - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_classify - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_classify - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float32_infinity - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float32_nan - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float64_infinity - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float64_nan - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) Memory Configuration @@ -941,14 +381,11 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Peripherals 0x40020000 0x00100000 xw FiRM_Peripherals 0x40000000 0x00010000 xw SRAM 0x20000000 0x00001000 xw -FLASH 0x00000000 0x00004000 xr +FLASH 0x00000000 0x00002000 xr *default* 0x00000000 0xffffffff Linker script and memory map - 0x00002990 __do_debug_operation = __do_debug_operation_bkpt - 0x00001f30 __vfprintf = __vfprintf_int_nwp - 0x000024c0 __vfscanf = __vfscanf_int 0xe000e000 __CM3_System_Control_Space_segment_start__ = 0xe000e000 0xe000f000 __CM3_System_Control_Space_segment_end__ = 0xe000f000 0x40020000 __Peripherals_segment_start__ = 0x40020000 @@ -958,7 +395,7 @@ Linker script and memory map 0x20000000 __SRAM_segment_start__ = 0x20000000 0x20001000 __SRAM_segment_end__ = 0x20001000 0x00000000 __FLASH_segment_start__ = 0x0 - 0x00004000 __FLASH_segment_end__ = 0x4000 + 0x00002000 __FLASH_segment_end__ = 0x2000 0x00000100 __STACKSIZE__ = 0x100 0x00000000 __STACKSIZE_PROCESS__ = 0x0 0x00000000 __STACKSIZE_IRQ__ = 0x0 @@ -999,239 +436,190 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .init is too large to fit in FLASH memory segment) 0x00000288 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x00000288 0x2728 +.text 0x00000288 0x14c0 0x00000288 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs .glue_7t 0x00000000 0x0 linker stubs .text.SysCtlPeripheralValid - 0x00000288 0x390 THUMB Debug/../../obj/sysctl.o + 0x00000288 0x2a4 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralEnable - 0x00000618 0x3c THUMB Debug/../../obj/sysctl.o - 0x00000618 SysCtlPeripheralEnable + 0x0000052c 0x38 THUMB Debug/../../obj/sysctl.o + 0x0000052c SysCtlPeripheralEnable .text.SysCtlDelay - 0x00000654 0x8 THUMB Debug/../../obj/sysctl.o - 0x00000654 SysCtlDelay + 0x00000564 0x6 THUMB Debug/../../obj/sysctl.o + 0x00000564 SysCtlDelay + *fill* 0x0000056a 0x2 00 .text.SysCtlClockSet - 0x0000065c 0x1b8 THUMB Debug/../../obj/sysctl.o - 0x0000065c SysCtlClockSet + 0x0000056c 0x154 THUMB Debug/../../obj/sysctl.o + 0x0000056c SysCtlClockSet .text.SysCtlClockGet - 0x00000814 0x2d4 THUMB Debug/../../obj/sysctl.o - 0x00000814 SysCtlClockGet + 0x000006c0 0x1c0 THUMB Debug/../../obj/sysctl.o + 0x000006c0 SysCtlClockGet .text.GPIOBaseValid - 0x00000ae8 0x180 THUMB Debug/../../obj/gpio.o + 0x00000880 0x120 THUMB Debug/../../obj/gpio.o .text.GPIODirModeSet - 0x00000c68 0x60 THUMB Debug/../../obj/gpio.o - 0x00000c68 GPIODirModeSet + 0x000009a0 0x54 THUMB Debug/../../obj/gpio.o + 0x000009a0 GPIODirModeSet .text.GPIOPadConfigSet - 0x00000cc8 0x168 THUMB Debug/../../obj/gpio.o - 0x00000cc8 GPIOPadConfigSet + 0x000009f4 0x150 THUMB Debug/../../obj/gpio.o + 0x000009f4 GPIOPadConfigSet .text.GPIOPinTypeUART - 0x00000e30 0x3c THUMB Debug/../../obj/gpio.o - 0x00000e30 GPIOPinTypeUART + 0x00000b44 0x34 THUMB Debug/../../obj/gpio.o + 0x00000b44 GPIOPinTypeUART .text.FlashClear - 0x00000e6c 0x74 THUMB Debug/../../obj/flashlib.o - 0x00000e6c FlashClear + 0x00000b78 0x48 THUMB Debug/../../obj/flashlib.o + 0x00000b78 FlashClear .text.FlashProgram - 0x00000ee0 0x120 THUMB Debug/../../obj/flashlib.o - 0x00000ee0 FlashProgram + 0x00000bc0 0xdc THUMB Debug/../../obj/flashlib.o + 0x00000bc0 FlashProgram .text.UARTBaseValid - 0x00001000 0x3c THUMB Debug/../../obj/uartlib.o + 0x00000c9c 0x34 THUMB Debug/../../obj/uartlib.o .text.UARTEnable - 0x0000103c 0x30 THUMB Debug/../../obj/uartlib.o - 0x0000103c UARTEnable + 0x00000cd0 0x30 THUMB Debug/../../obj/uartlib.o + 0x00000cd0 UARTEnable .text.UARTDisable - 0x0000106c 0x38 THUMB Debug/../../obj/uartlib.o - 0x0000106c UARTDisable + 0x00000d00 0x34 THUMB Debug/../../obj/uartlib.o + 0x00000d00 UARTDisable .text.UARTConfigSetExpClk - 0x000010a4 0x130 THUMB Debug/../../obj/uartlib.o - 0x000010a4 UARTConfigSetExpClk + 0x00000d34 0xd8 THUMB Debug/../../obj/uartlib.o + 0x00000d34 UARTConfigSetExpClk .text.UARTSpaceAvail - 0x000011d4 0x28 THUMB Debug/../../obj/uartlib.o - 0x000011d4 UARTSpaceAvail + 0x00000e0c 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000e0c UARTSpaceAvail .text.UARTCharGetNonBlocking - 0x000011fc 0x2c THUMB Debug/../../obj/uartlib.o - 0x000011fc UARTCharGetNonBlocking + 0x00000e34 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000e34 UARTCharGetNonBlocking .text.UARTCharPutNonBlocking - 0x00001228 0x2c THUMB Debug/../../obj/uartlib.o - 0x00001228 UARTCharPutNonBlocking - .text.main 0x00001254 0x30 THUMB Debug/../../obj/main.o - 0x00001254 main + 0x00000e5c 0x2c THUMB Debug/../../obj/uartlib.o + 0x00000e5c UARTCharPutNonBlocking + .text.startup.main + 0x00000e88 0x2c THUMB Debug/../../obj/main.o + 0x00000e88 main .text.UnusedISR - 0x00001284 0x18 THUMB Debug/../../obj/vectors.o - 0x00001284 UnusedISR + 0x00000eb4 0xc THUMB Debug/../../obj/vectors.o + 0x00000eb4 UnusedISR .text.CpuStartUserProgram - 0x0000129c 0x28 THUMB Debug/../../obj/cpu.o - 0x0000129c CpuStartUserProgram + 0x00000ec0 0x24 THUMB Debug/../../obj/cpu.o + 0x00000ec0 CpuStartUserProgram .text.CpuMemCopy - 0x000012c4 0x28 THUMB Debug/../../obj/cpu.o - 0x000012c4 CpuMemCopy + 0x00000ee4 0x20 THUMB Debug/../../obj/cpu.o + 0x00000ee4 CpuMemCopy .text.CpuReset - 0x000012ec 0xc THUMB Debug/../../obj/cpu.o - 0x000012ec CpuReset + 0x00000f04 0x4 THUMB Debug/../../obj/cpu.o + 0x00000f04 CpuReset .text.FlashGetSector - 0x000012f8 0x48 THUMB Debug/../../obj/flash.o - .text.FlashGetSectorBaseAddr - 0x00001340 0x40 THUMB Debug/../../obj/flash.o + 0x00000f08 0x38 THUMB Debug/../../obj/flash.o .text.FlashWriteBlock - 0x00001380 0x64 THUMB Debug/../../obj/flash.o - .text.FlashInitBlock - 0x000013e4 0x38 THUMB Debug/../../obj/flash.o + 0x00000f40 0x48 THUMB Debug/../../obj/flash.o .text.FlashSwitchBlock - 0x0000141c 0x4c THUMB Debug/../../obj/flash.o + 0x00000f88 0x50 THUMB Debug/../../obj/flash.o .text.FlashAddToBlock - 0x00001468 0xa0 THUMB Debug/../../obj/flash.o + 0x00000fd8 0x8a THUMB Debug/../../obj/flash.o + *fill* 0x00001062 0x2 00 .text.FlashInit - 0x00001508 0x1c THUMB Debug/../../obj/flash.o - 0x00001508 FlashInit + 0x00001064 0x18 THUMB Debug/../../obj/flash.o + 0x00001064 FlashInit .text.FlashWrite - 0x00001524 0x50 THUMB Debug/../../obj/flash.o - 0x00001524 FlashWrite + 0x0000107c 0x48 THUMB Debug/../../obj/flash.o + 0x0000107c FlashWrite .text.FlashErase - 0x00001574 0xf0 THUMB Debug/../../obj/flash.o - 0x00001574 FlashErase + 0x000010c4 0xf4 THUMB Debug/../../obj/flash.o + 0x000010c4 FlashErase .text.FlashWriteChecksum - 0x00001664 0x58 THUMB Debug/../../obj/flash.o - 0x00001664 FlashWriteChecksum + 0x000011b8 0x44 THUMB Debug/../../obj/flash.o + 0x000011b8 FlashWriteChecksum .text.FlashVerifyChecksum - 0x000016bc 0x48 THUMB Debug/../../obj/flash.o - 0x000016bc FlashVerifyChecksum + 0x000011fc 0x48 THUMB Debug/../../obj/flash.o + 0x000011fc FlashVerifyChecksum .text.FlashDone - 0x00001704 0x58 THUMB Debug/../../obj/flash.o - 0x00001704 FlashDone - .text.NvmInit 0x0000175c 0xc THUMB Debug/../../obj/nvm.o - 0x0000175c NvmInit + 0x00001244 0x34 THUMB Debug/../../obj/flash.o + 0x00001244 FlashDone + .text.NvmInit 0x00001278 0x4 THUMB Debug/../../obj/nvm.o + 0x00001278 NvmInit .text.NvmWrite - 0x00001768 0xc THUMB Debug/../../obj/nvm.o - 0x00001768 NvmWrite + 0x0000127c 0x4 THUMB Debug/../../obj/nvm.o + 0x0000127c NvmWrite .text.NvmErase - 0x00001774 0xc THUMB Debug/../../obj/nvm.o - 0x00001774 NvmErase + 0x00001280 0x4 THUMB Debug/../../obj/nvm.o + 0x00001280 NvmErase .text.NvmVerifyChecksum - 0x00001780 0xc THUMB Debug/../../obj/nvm.o - 0x00001780 NvmVerifyChecksum - .text.NvmDone 0x0000178c 0x18 THUMB Debug/../../obj/nvm.o - 0x0000178c NvmDone - .text.TimerReset - 0x000017a4 0x10 THUMB Debug/../../obj/timer.o - 0x000017a4 TimerReset - .text.TimerUpdate - 0x000017b4 0x24 THUMB Debug/../../obj/timer.o - 0x000017b4 TimerUpdate - .text.TimerSet - 0x000017d8 0xc THUMB Debug/../../obj/timer.o - 0x000017d8 TimerSet + 0x00001284 0x4 THUMB Debug/../../obj/nvm.o + 0x00001284 NvmVerifyChecksum + .text.NvmDone 0x00001288 0x14 THUMB Debug/../../obj/nvm.o + 0x00001288 NvmDone .text.TimerInit - 0x000017e4 0x28 THUMB Debug/../../obj/timer.o - 0x000017e4 TimerInit + 0x0000129c 0x20 THUMB Debug/../../obj/timer.o + 0x0000129c TimerInit + .text.TimerReset + 0x000012bc 0xc THUMB Debug/../../obj/timer.o + 0x000012bc TimerReset + .text.TimerUpdate + 0x000012c8 0x1c THUMB Debug/../../obj/timer.o + 0x000012c8 TimerUpdate .text.TimerGet - 0x0000180c 0x14 THUMB Debug/../../obj/timer.o - 0x0000180c TimerGet - .text.UartReceiveByte - 0x00001820 0x20 THUMB Debug/../../obj/uart.o - .text.UartTransmitByte - 0x00001840 0x38 THUMB Debug/../../obj/uart.o + 0x000012e4 0x14 THUMB Debug/../../obj/timer.o + 0x000012e4 TimerGet .text.UartInit - 0x00001878 0x2c THUMB Debug/../../obj/uart.o - 0x00001878 UartInit + 0x000012f8 0x28 THUMB Debug/../../obj/uart.o + 0x000012f8 UartInit .text.UartTransmitPacket - 0x000018a4 0x70 THUMB Debug/../../obj/uart.o - 0x000018a4 UartTransmitPacket + 0x00001320 0x74 THUMB Debug/../../obj/uart.o + 0x00001320 UartTransmitPacket .text.UartReceivePacket - 0x00001914 0xb0 THUMB Debug/../../obj/uart.o - 0x00001914 UartReceivePacket + 0x00001394 0x70 THUMB Debug/../../obj/uart.o + 0x00001394 UartReceivePacket .text.AssertFailure - 0x000019c4 0x1c THUMB Debug/../../obj/assert.o - 0x000019c4 AssertFailure + 0x00001404 0x18 THUMB Debug/../../obj/assert.o + 0x00001404 AssertFailure .text.BackDoorCheck - 0x000019e0 0x3c THUMB Debug/../../obj/backdoor.o - 0x000019e0 BackDoorCheck + 0x0000141c 0x30 THUMB Debug/../../obj/backdoor.o + 0x0000141c BackDoorCheck .text.BackDoorInit - 0x00001a1c 0x1c THUMB Debug/../../obj/backdoor.o - 0x00001a1c BackDoorInit + 0x0000144c 0x18 THUMB Debug/../../obj/backdoor.o + 0x0000144c BackDoorInit .text.BootInit - 0x00001a38 0x18 THUMB Debug/../../obj/boot.o - 0x00001a38 BootInit + 0x00001464 0x16 THUMB Debug/../../obj/boot.o + 0x00001464 BootInit .text.BootTask - 0x00001a50 0x14 THUMB Debug/../../obj/boot.o - 0x00001a50 BootTask - .text.ComInit 0x00001a64 0x34 THUMB Debug/../../obj/com.o - 0x00001a64 ComInit - .text.ComTask 0x00001a98 0x24 THUMB Debug/../../obj/com.o - 0x00001a98 ComTask - .text.ComFree 0x00001abc 0x4 THUMB Debug/../../obj/com.o - 0x00001abc ComFree + 0x0000147a 0x12 THUMB Debug/../../obj/boot.o + 0x0000147a BootTask + .text.ComInit 0x0000148c 0x2c THUMB Debug/../../obj/com.o + 0x0000148c ComInit + .text.ComTask 0x000014b8 0x20 THUMB Debug/../../obj/com.o + 0x000014b8 ComTask + .text.ComFree 0x000014d8 0x2 THUMB Debug/../../obj/com.o + 0x000014d8 ComFree .text.ComTransmitPacket - 0x00001ac0 0x10 THUMB Debug/../../obj/com.o - 0x00001ac0 ComTransmitPacket + 0x000014da 0x10 THUMB Debug/../../obj/com.o + 0x000014da ComTransmitPacket + *fill* 0x000014ea 0x2 00 .text.ComSetConnectEntryState - 0x00001ad0 0x10 THUMB Debug/../../obj/com.o - 0x00001ad0 ComSetConnectEntryState + 0x000014ec 0xc THUMB Debug/../../obj/com.o + 0x000014ec ComSetConnectEntryState .text.ComIsConnected - 0x00001ae0 0xc THUMB Debug/../../obj/com.o - 0x00001ae0 ComIsConnected - .text.CopInit 0x00001aec 0x4 THUMB Debug/../../obj/cop.o - 0x00001aec CopInit + 0x000014f8 0x4 THUMB Debug/../../obj/com.o + 0x000014f8 ComIsConnected + .text.CopInit 0x000014fc 0x2 THUMB Debug/../../obj/cop.o + 0x000014fc CopInit .text.CopService - 0x00001af0 0x4 THUMB Debug/../../obj/cop.o - 0x00001af0 CopService - .text.XcpProtectResources - 0x00001af4 0x10 THUMB Debug/../../obj/xcp.o + 0x000014fe 0x2 THUMB Debug/../../obj/cop.o + 0x000014fe CopService .text.XcpSetCtoError - 0x00001b04 0x1c THUMB Debug/../../obj/xcp.o - .text.XcpInit 0x00001b20 0x20 THUMB Debug/../../obj/xcp.o - 0x00001b20 XcpInit + 0x00001500 0x14 THUMB Debug/../../obj/xcp.o + .text.XcpInit 0x00001514 0x1c THUMB Debug/../../obj/xcp.o + 0x00001514 XcpInit .text.XcpIsConnected - 0x00001b40 0x14 THUMB Debug/../../obj/xcp.o - 0x00001b40 XcpIsConnected + 0x00001530 0x10 THUMB Debug/../../obj/xcp.o + 0x00001530 XcpIsConnected .text.XcpPacketTransmitted - 0x00001b54 0x14 THUMB Debug/../../obj/xcp.o - 0x00001b54 XcpPacketTransmitted + 0x00001540 0x10 THUMB Debug/../../obj/xcp.o + 0x00001540 XcpPacketTransmitted .text.XcpPacketReceived - 0x00001b68 0x3c8 THUMB Debug/../../obj/xcp.o - 0x00001b68 XcpPacketReceived - .text.libc.__vfprintf_int_nwp - 0x00001f30 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x00001f30 __vfprintf_int_nwp - .text.libc.__ungetc - 0x00002324 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc.rd_int - 0x00002344 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc.__vfscanf_int - 0x000024c0 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x000024c0 __vfscanf_int - .text.libc.__getc - 0x000028ac 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000028ac __getc - .text.libc.__putc - 0x000028d4 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000028d4 __putc - .text.libc.isupper - 0x0000290c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000290c isupper - .text.libc.islower - 0x0000291c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000291c islower - .text.libc.isdigit - 0x0000292c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000292c isdigit - .text.libc.__digit - 0x0000293c 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000293c __digit - .text.libc.isspace - 0x00002978 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002978 isspace - .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x00002990 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x00002990 __do_debug_operation_bkpt - .text.libc.__debug_io_lock - 0x000029a8 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000029a8 __debug_io_lock - .text.libc.__debug_io_unlock - 0x000029ac 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000029ac __debug_io_unlock - 0x000029b0 __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x000029b0 __text_load_end__ = __text_end__ + 0x00001550 0x1f8 THUMB Debug/../../obj/xcp.o + 0x00001550 XcpPacketReceived + 0x00001748 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00001748 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1239,87 +627,73 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .text is too large to fit in FLASH memory segment) - 0x000029b0 __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00001748 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x000029b0 0x0 - 0x000029b0 __dtors_start__ = . +.dtors 0x00001748 0x0 + 0x00001748 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x000029b0 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x000029b0 __dtors_load_end__ = __dtors_end__ + 0x00001748 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00001748 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .dtors is too large to fit in FLASH memory segment) - 0x000029b0 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00001748 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x000029b0 0x0 - 0x000029b0 __ctors_start__ = . +.ctors 0x00001748 0x0 + 0x00001748 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x000029b0 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x000029b0 __ctors_load_end__ = __ctors_end__ + 0x00001748 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00001748 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ctors is too large to fit in FLASH memory segment) - 0x000029b0 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00001748 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x000029b0 0x440 - 0x000029b0 __rodata_start__ = . +.rodata 0x00001748 0x425 + 0x00001748 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) .rodata.g_pulXtals - 0x000029b0 0x5c THUMB Debug/../../obj/sysctl.o - .rodata.str1.4 - 0x00002a0c 0x71 THUMB Debug/../../obj/sysctl.o - 0x74 (size before relaxing) - *fill* 0x00002a7d 0x3 00 + 0x00001748 0x5c THUMB Debug/../../obj/sysctl.o + .rodata.str1.1 + 0x000017a4 0x71 THUMB Debug/../../obj/sysctl.o + *fill* 0x00001815 0x3 00 .rodata.g_pulRCGCRegs - 0x00002a80 0xc THUMB Debug/../../obj/sysctl.o - .rodata.str1.4 - 0x00002a8c 0x6f THUMB Debug/../../obj/gpio.o - 0x70 (size before relaxing) - *fill* 0x00002afb 0x1 00 - .rodata.str1.4 - 0x00002afc 0x73 THUMB Debug/../../obj/flashlib.o - 0x74 (size before relaxing) - *fill* 0x00002b6f 0x1 00 - .rodata.str1.4 - 0x00002b70 0x72 THUMB Debug/../../obj/uartlib.o - 0x74 (size before relaxing) - *fill* 0x00002be2 0x2 00 - .rodata.str1.4 - 0x00002be4 0x8b THUMB Debug/../../obj/vectors.o - 0x8c (size before relaxing) - *fill* 0x00002c6f 0x1 00 + 0x00001818 0xc THUMB Debug/../../obj/sysctl.o + .rodata.str1.1 + 0x00001824 0x6f THUMB Debug/../../obj/gpio.o + .rodata.str1.1 + 0x00001893 0x73 THUMB Debug/../../obj/flashlib.o + .rodata.str1.1 + 0x00001906 0x72 THUMB Debug/../../obj/uartlib.o + .rodata.str1.1 + 0x00001978 0x8b THUMB Debug/../../obj/vectors.o + *fill* 0x00001a03 0x1 00 .rodata.flashLayout - 0x00002c70 0xd8 THUMB Debug/../../obj/flash.o - .rodata.str1.4 - 0x00002d48 0x80 THUMB Debug/../../obj/uart.o + 0x00001a04 0xe4 THUMB Debug/../../obj/flash.o + .rodata.str1.1 + 0x00001ae8 0x7d THUMB Debug/../../obj/uart.o .rodata.xcpStationId - 0x00002dc8 0x8 THUMB Debug/../../obj/xcp.o - .rodata.libc.__hex_lc - 0x00002dd0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002dd0 __hex_lc - .rodata.libc.__hex_uc - 0x00002de0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002de0 __hex_uc - 0x00002df0 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x00002df0 __rodata_load_end__ = __rodata_end__ + 0x00001b65 0x8 THUMB Debug/../../obj/xcp.o + 0x00001b6d __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x00001b6d __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .rodata is too large to fit in FLASH memory segment) - 0x00002df0 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x00001b70 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x00002df0 0x0 - 0x00002df0 __ARM.exidx_start__ = . - 0x00002df0 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x00001b70 0x0 + 0x00001b70 __ARM.exidx_start__ = . + 0x00001b70 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x00002df0 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x00002df0 __exidx_end = __ARM.exidx_end__ - 0x00002df0 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x00001b70 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x00001b70 __exidx_end = __ARM.exidx_end__ + 0x00001b70 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x00002df0 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x00001b70 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x00002df0 +.fast 0x20000000 0x0 load address 0x00001b70 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x00002df0 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x00001b70 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x40000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -1328,13 +702,13 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __SRAM_segment_start__) && (__fast_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .fast_run is too large to fit in SRAM memory segment) - 0x00002df0 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x00001b70 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x0 load address 0x00002df0 +.data 0x20000000 0x0 load address 0x00001b70 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x20000000 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x00002df0 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x00001b70 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x40000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x20000000 0x0 @@ -1345,7 +719,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__data_run_end__ >= __SRAM_segment_start__) && (__data_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .data_run is too large to fit in SRAM memory segment) 0x20000000 __bss_load_start__ = ALIGN (__data_run_end__, 0x4) -.bss 0x20000000 0x4f0 +.bss 0x20000000 0x4e8 0x20000000 __bss_start__ = . *(.bss .bss.* .gnu.linkonce.b.*) .bss.bootBlockInfo @@ -1354,94 +728,90 @@ Linker script and memory map 0x20000204 0x204 THUMB Debug/../../obj/flash.o .bss.millisecond_counter 0x20000408 0x2 THUMB Debug/../../obj/timer.o - *fill* 0x2000040a 0x2 00 .bss.xcpCtoReqPacket.1061 - 0x2000040c 0x44 THUMB Debug/../../obj/uart.o + 0x2000040a 0x41 THUMB Debug/../../obj/uart.o .bss.xcpCtoRxLength.1062 - 0x20000450 0x1 THUMB Debug/../../obj/uart.o + 0x2000044b 0x1 THUMB Debug/../../obj/uart.o .bss.xcpCtoRxInProgress.1063 - 0x20000451 0x1 THUMB Debug/../../obj/uart.o - *fill* 0x20000452 0x2 00 + 0x2000044c 0x1 THUMB Debug/../../obj/uart.o + *fill* 0x2000044d 0x3 00 .bss.assert_failure_file - 0x20000454 0x4 THUMB Debug/../../obj/assert.o + 0x20000450 0x4 THUMB Debug/../../obj/assert.o .bss.assert_failure_line - 0x20000458 0x4 THUMB Debug/../../obj/assert.o + 0x20000454 0x4 THUMB Debug/../../obj/assert.o .bss.backdoorOpen - 0x2000045c 0x1 THUMB Debug/../../obj/backdoor.o + 0x20000458 0x1 THUMB Debug/../../obj/backdoor.o .bss.comEntryStateConnect - 0x2000045d 0x1 THUMB Debug/../../obj/com.o - *fill* 0x2000045e 0x2 00 + 0x20000459 0x1 THUMB Debug/../../obj/com.o .bss.xcpCtoReqPacket.859 - 0x20000460 0x40 THUMB Debug/../../obj/com.o - .bss.xcpInfo 0x200004a0 0x4c THUMB Debug/../../obj/xcp.o - .bss.libc.__format_extender - 0x200004ec 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x200004ec __format_extender + 0x2000045a 0x40 THUMB Debug/../../obj/com.o + *fill* 0x2000049a 0x2 00 + .bss.xcpInfo 0x2000049c 0x4c THUMB Debug/../../obj/xcp.o *(COMMON) - 0x200004f0 __bss_end__ = (__bss_start__ + SIZEOF (.bss)) - 0x200004f0 __bss_load_end__ = __bss_end__ + 0x200004e8 __bss_end__ = (__bss_start__ + SIZEOF (.bss)) + 0x200004e8 __bss_load_end__ = __bss_end__ 0x00000001 . = ASSERT (((__bss_end__ >= __SRAM_segment_start__) && (__bss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .bss is too large to fit in SRAM memory segment) - 0x200004f0 __non_init_load_start__ = ALIGN (__bss_end__, 0x4) + 0x200004e8 __non_init_load_start__ = ALIGN (__bss_end__, 0x4) -.non_init 0x200004f0 0x0 - 0x200004f0 __non_init_start__ = . +.non_init 0x200004e8 0x0 + 0x200004e8 __non_init_start__ = . *(.non_init .non_init.*) - 0x200004f0 __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) - 0x200004f0 __non_init_load_end__ = __non_init_end__ + 0x200004e8 __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) + 0x200004e8 __non_init_load_end__ = __non_init_end__ 0x00000001 . = ASSERT (((__non_init_end__ >= __SRAM_segment_start__) && (__non_init_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .non_init is too large to fit in SRAM memory segment) - 0x200004f0 __heap_load_start__ = ALIGN (__non_init_end__, 0x4) + 0x200004e8 __heap_load_start__ = ALIGN (__non_init_end__, 0x4) -.heap 0x200004f0 0x80 - 0x200004f0 __heap_start__ = . +.heap 0x200004e8 0x80 + 0x200004e8 __heap_start__ = . *(.heap .heap.*) - 0x20000570 . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) - *fill* 0x200004f0 0x80 00 - 0x20000570 __heap_end__ = (__heap_start__ + SIZEOF (.heap)) - 0x20000570 __heap_load_end__ = __heap_end__ + 0x20000568 . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) + *fill* 0x200004e8 0x80 00 + 0x20000568 __heap_end__ = (__heap_start__ + SIZEOF (.heap)) + 0x20000568 __heap_load_end__ = __heap_end__ 0x00000001 . = ASSERT (((__heap_end__ >= __SRAM_segment_start__) && (__heap_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .heap is too large to fit in SRAM memory segment) - 0x20000570 __stack_load_start__ = ALIGN (__heap_end__, 0x4) + 0x20000568 __stack_load_start__ = ALIGN (__heap_end__, 0x4) -.stack 0x20000570 0x100 - 0x20000570 __stack_start__ = . +.stack 0x20000568 0x100 + 0x20000568 __stack_start__ = . *(.stack .stack.*) - 0x20000670 . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) - *fill* 0x20000570 0x100 00 - 0x20000670 __stack_end__ = (__stack_start__ + SIZEOF (.stack)) - 0x20000670 __stack_load_end__ = __stack_end__ + 0x20000668 . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) + *fill* 0x20000568 0x100 00 + 0x20000668 __stack_end__ = (__stack_start__ + SIZEOF (.stack)) + 0x20000668 __stack_load_end__ = __stack_end__ 0x00000001 . = ASSERT (((__stack_end__ >= __SRAM_segment_start__) && (__stack_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .stack is too large to fit in SRAM memory segment) - 0x20000670 __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) + 0x20000668 __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) -.stack_process 0x20000670 0x0 - 0x20000670 __stack_process_start__ = . +.stack_process 0x20000668 0x0 + 0x20000668 __stack_process_start__ = . *(.stack_process .stack_process.*) - 0x20000670 . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) - 0x20000670 __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) - 0x20000670 __stack_process_load_end__ = __stack_process_end__ + 0x20000668 . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) + 0x20000668 __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) + 0x20000668 __stack_process_load_end__ = __stack_process_end__ 0x00000001 . = ASSERT (((__stack_process_end__ >= __SRAM_segment_start__) && (__stack_process_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .stack_process is too large to fit in SRAM memory segment) - 0x20000670 __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) + 0x20000668 __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) -.tbss 0x20000670 0x0 - 0x20000670 __tbss_start__ = . +.tbss 0x20000668 0x0 + 0x20000668 __tbss_start__ = . *(.tbss .tbss.*) - 0x20000670 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) - 0x20000670 __tbss_load_end__ = __tbss_end__ + 0x20000668 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) + 0x20000668 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __SRAM_segment_start__) && (__tbss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tbss is too large to fit in SRAM memory segment) - 0x00002df0 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x00001b70 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x20000670 0x0 load address 0x00002df0 - 0x20000670 __tdata_start__ = . +.tdata 0x20000668 0x0 load address 0x00001b70 + 0x20000668 __tdata_start__ = . *(.tdata .tdata.*) - 0x20000670 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x00002df0 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x00002df0 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x20000668 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) + 0x00001b70 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x00001b70 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x40000))), error: .tdata is too large to fit in FLASH memory segment) -.tdata_run 0x20000670 0x0 - 0x20000670 __tdata_run_start__ = . - 0x20000670 . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) - 0x20000670 __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) - 0x20000670 __tdata_run_load_end__ = __tdata_run_end__ - 0x20000670 __SRAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) +.tdata_run 0x20000668 0x0 + 0x20000668 __tdata_run_start__ = . + 0x20000668 . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) + 0x20000668 __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) + 0x20000668 __tdata_run_load_end__ = __tdata_run_end__ + 0x20000668 __SRAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) 0x00000001 . = ASSERT (((__tdata_run_end__ >= __SRAM_segment_start__) && (__tdata_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tdata_run is too large to fit in SRAM memory segment) START GROUP LOAD THUMB Debug/../../obj/sysctl.o @@ -1465,121 +835,95 @@ LOAD THUMB Debug/../../obj/boot.o LOAD THUMB Debug/../../obj/com.o LOAD THUMB Debug/../../obj/cop.o LOAD THUMB Debug/../../obj/xcp.o -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libcpp_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_targetio_impl_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a END GROUP OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/../bin/openbtl_ek_lm3s6965.elf elf32-littlearm) -.debug_frame 0x00000000 0x33f0 - .debug_frame 0x00000000 0x414 THUMB Debug/../../obj/sysctl.o - .debug_frame 0x00000414 0x1a4 THUMB Debug/../../obj/interrupt.o - .debug_frame 0x000005b8 0x70 THUMB Debug/../../obj/cpulib.o - .debug_frame 0x00000628 0x434 THUMB Debug/../../obj/gpio.o - .debug_frame 0x00000a5c 0x184 THUMB Debug/../../obj/flashlib.o - .debug_frame 0x00000be0 0x4d8 THUMB Debug/../../obj/uartlib.o - .debug_frame 0x000010b8 0x2c THUMB Debug/../../obj/main.o - .debug_frame 0x000010e4 0x2c THUMB Debug/../../obj/vectors.o - .debug_frame 0x00001110 0x68 THUMB Debug/../../obj/cpu.o - .debug_frame 0x00001178 0x180 THUMB Debug/../../obj/flash.o - .debug_frame 0x000012f8 0x9c THUMB Debug/../../obj/nvm.o - .debug_frame 0x00001394 0x78 THUMB Debug/../../obj/timer.o - .debug_frame 0x0000140c 0xa4 THUMB Debug/../../obj/uart.o - .debug_frame 0x000014b0 0x2c THUMB Debug/../../obj/assert.o - .debug_frame 0x000014dc 0x48 THUMB Debug/../../obj/backdoor.o - .debug_frame 0x00001524 0x48 THUMB Debug/../../obj/boot.o - .debug_frame 0x0000156c 0xc4 THUMB Debug/../../obj/com.o - .debug_frame 0x00001630 0x30 THUMB Debug/../../obj/cop.o - .debug_frame 0x00001660 0x80 THUMB Debug/../../obj/xcp.o - .debug_frame 0x000016e0 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_frame 0x00001720 0x88 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_frame 0x000017a8 0x11a8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_frame 0x00002950 0x100 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .debug_frame 0x00002a50 0x260 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .debug_frame 0x00002cb0 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .debug_frame 0x00002d50 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .debug_frame 0x00002df0 0x600 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) +.debug_frame 0x00000000 0x15d4 + .debug_frame 0x00000000 0x404 THUMB Debug/../../obj/sysctl.o + .debug_frame 0x00000404 0x18c THUMB Debug/../../obj/interrupt.o + .debug_frame 0x00000590 0x70 THUMB Debug/../../obj/cpulib.o + .debug_frame 0x00000600 0x434 THUMB Debug/../../obj/gpio.o + .debug_frame 0x00000a34 0x18c THUMB Debug/../../obj/flashlib.o + .debug_frame 0x00000bc0 0x4d8 THUMB Debug/../../obj/uartlib.o + .debug_frame 0x00001098 0x2c THUMB Debug/../../obj/main.o + .debug_frame 0x000010c4 0x20 THUMB Debug/../../obj/vectors.o + .debug_frame 0x000010e4 0x5c THUMB Debug/../../obj/cpu.o + .debug_frame 0x00001140 0x13c THUMB Debug/../../obj/flash.o + .debug_frame 0x0000127c 0x6c THUMB Debug/../../obj/nvm.o + .debug_frame 0x000012e8 0x6c THUMB Debug/../../obj/timer.o + .debug_frame 0x00001354 0x70 THUMB Debug/../../obj/uart.o + .debug_frame 0x000013c4 0x2c THUMB Debug/../../obj/assert.o + .debug_frame 0x000013f0 0x48 THUMB Debug/../../obj/backdoor.o + .debug_frame 0x00001438 0x48 THUMB Debug/../../obj/boot.o + .debug_frame 0x00001480 0xb4 THUMB Debug/../../obj/com.o + .debug_frame 0x00001534 0x30 THUMB Debug/../../obj/cop.o + .debug_frame 0x00001564 0x70 THUMB Debug/../../obj/xcp.o -.debug_info 0x00000000 0x49d2 - .debug_info 0x00000000 0x849 THUMB Debug/../../obj/sysctl.o - .debug_info 0x00000849 0x37b THUMB Debug/../../obj/interrupt.o - .debug_info 0x00000bc4 0x110 THUMB Debug/../../obj/cpulib.o - .debug_info 0x00000cd4 0x973 THUMB Debug/../../obj/gpio.o - .debug_info 0x00001647 0x41e THUMB Debug/../../obj/flashlib.o - .debug_info 0x00001a65 0x9ad THUMB Debug/../../obj/uartlib.o - .debug_info 0x00002412 0x5a THUMB Debug/../../obj/hooks.o - .debug_info 0x0000246c 0x90 THUMB Debug/../../obj/main.o - .debug_info 0x000024fc 0x107 THUMB Debug/../../obj/cstart.o - .debug_info 0x00002603 0xf1 THUMB Debug/../../obj/vectors.o - .debug_info 0x000026f4 0x13a THUMB Debug/../../obj/cpu.o - .debug_info 0x0000282e 0x5a3 THUMB Debug/../../obj/flash.o - .debug_info 0x00002dd1 0x15e THUMB Debug/../../obj/nvm.o - .debug_info 0x00002f2f 0x144 THUMB Debug/../../obj/timer.o - .debug_info 0x00003073 0x1ca THUMB Debug/../../obj/uart.o - .debug_info 0x0000323d 0xe4 THUMB Debug/../../obj/assert.o - .debug_info 0x00003321 0xa4 THUMB Debug/../../obj/backdoor.o - .debug_info 0x000033c5 0x88 THUMB Debug/../../obj/boot.o - .debug_info 0x0000344d 0x1b4 THUMB Debug/../../obj/com.o - .debug_info 0x00003601 0x86 THUMB Debug/../../obj/cop.o - .debug_info 0x00003687 0x60b THUMB Debug/../../obj/xcp.o - .debug_info 0x00003c92 0x36 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_info 0x00003cc8 0x65 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_info 0x00003d2d 0xbd8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_info 0x00004905 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_info 0x00000000 0x3dee + .debug_info 0x00000000 0x844 THUMB Debug/../../obj/sysctl.o + .debug_info 0x00000844 0x379 THUMB Debug/../../obj/interrupt.o + .debug_info 0x00000bbd 0x110 THUMB Debug/../../obj/cpulib.o + .debug_info 0x00000ccd 0x96b THUMB Debug/../../obj/gpio.o + .debug_info 0x00001638 0x422 THUMB Debug/../../obj/flashlib.o + .debug_info 0x00001a5a 0x9ad THUMB Debug/../../obj/uartlib.o + .debug_info 0x00002407 0x5a THUMB Debug/../../obj/hooks.o + .debug_info 0x00002461 0x90 THUMB Debug/../../obj/main.o + .debug_info 0x000024f1 0x107 THUMB Debug/../../obj/cstart.o + .debug_info 0x000025f8 0xf0 THUMB Debug/../../obj/vectors.o + .debug_info 0x000026e8 0x139 THUMB Debug/../../obj/cpu.o + .debug_info 0x00002821 0x666 THUMB Debug/../../obj/flash.o + .debug_info 0x00002e87 0x15a THUMB Debug/../../obj/nvm.o + .debug_info 0x00002fe1 0x183 THUMB Debug/../../obj/timer.o + .debug_info 0x00003164 0x26a THUMB Debug/../../obj/uart.o + .debug_info 0x000033ce 0xe4 THUMB Debug/../../obj/assert.o + .debug_info 0x000034b2 0xa4 THUMB Debug/../../obj/backdoor.o + .debug_info 0x00003556 0x88 THUMB Debug/../../obj/boot.o + .debug_info 0x000035de 0x1b3 THUMB Debug/../../obj/com.o + .debug_info 0x00003791 0x86 THUMB Debug/../../obj/cop.o + .debug_info 0x00003817 0x5d7 THUMB Debug/../../obj/xcp.o -.debug_abbrev 0x00000000 0x131e - .debug_abbrev 0x00000000 0x198 THUMB Debug/../../obj/sysctl.o - .debug_abbrev 0x00000198 0x15b THUMB Debug/../../obj/interrupt.o - .debug_abbrev 0x000002f3 0xa8 THUMB Debug/../../obj/cpulib.o - .debug_abbrev 0x0000039b 0x118 THUMB Debug/../../obj/gpio.o - .debug_abbrev 0x000004b3 0x1a3 THUMB Debug/../../obj/flashlib.o - .debug_abbrev 0x00000656 0x11e THUMB Debug/../../obj/uartlib.o - .debug_abbrev 0x00000774 0x28 THUMB Debug/../../obj/hooks.o - .debug_abbrev 0x0000079c 0x5f THUMB Debug/../../obj/main.o - .debug_abbrev 0x000007fb 0x14 THUMB Debug/../../obj/cstart.o - .debug_abbrev 0x0000080f 0xbe THUMB Debug/../../obj/vectors.o - .debug_abbrev 0x000008cd 0xaf THUMB Debug/../../obj/cpu.o - .debug_abbrev 0x0000097c 0x21c THUMB Debug/../../obj/flash.o - .debug_abbrev 0x00000b98 0xa3 THUMB Debug/../../obj/nvm.o - .debug_abbrev 0x00000c3b 0xdf THUMB Debug/../../obj/timer.o - .debug_abbrev 0x00000d1a 0xe8 THUMB Debug/../../obj/uart.o - .debug_abbrev 0x00000e02 0x7c THUMB Debug/../../obj/assert.o - .debug_abbrev 0x00000e7e 0x5b THUMB Debug/../../obj/backdoor.o - .debug_abbrev 0x00000ed9 0x3f THUMB Debug/../../obj/boot.o - .debug_abbrev 0x00000f18 0xe0 THUMB Debug/../../obj/com.o - .debug_abbrev 0x00000ff8 0x3f THUMB Debug/../../obj/cop.o - .debug_abbrev 0x00001037 0x1ba THUMB Debug/../../obj/xcp.o - .debug_abbrev 0x000011f1 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_abbrev 0x00001216 0x43 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_abbrev 0x00001259 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_abbrev 0x000012f9 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_abbrev 0x00000000 0x133d + .debug_abbrev 0x00000000 0x1a5 THUMB Debug/../../obj/sysctl.o + .debug_abbrev 0x000001a5 0x172 THUMB Debug/../../obj/interrupt.o + .debug_abbrev 0x00000317 0xa8 THUMB Debug/../../obj/cpulib.o + .debug_abbrev 0x000003bf 0x125 THUMB Debug/../../obj/gpio.o + .debug_abbrev 0x000004e4 0x1a3 THUMB Debug/../../obj/flashlib.o + .debug_abbrev 0x00000687 0x11e THUMB Debug/../../obj/uartlib.o + .debug_abbrev 0x000007a5 0x28 THUMB Debug/../../obj/hooks.o + .debug_abbrev 0x000007cd 0x5f THUMB Debug/../../obj/main.o + .debug_abbrev 0x0000082c 0x14 THUMB Debug/../../obj/cstart.o + .debug_abbrev 0x00000840 0xbe THUMB Debug/../../obj/vectors.o + .debug_abbrev 0x000008fe 0xaf THUMB Debug/../../obj/cpu.o + .debug_abbrev 0x000009ad 0x23d THUMB Debug/../../obj/flash.o + .debug_abbrev 0x00000bea 0xba THUMB Debug/../../obj/nvm.o + .debug_abbrev 0x00000ca4 0x138 THUMB Debug/../../obj/timer.o + .debug_abbrev 0x00000ddc 0x161 THUMB Debug/../../obj/uart.o + .debug_abbrev 0x00000f3d 0x7c THUMB Debug/../../obj/assert.o + .debug_abbrev 0x00000fb9 0x5b THUMB Debug/../../obj/backdoor.o + .debug_abbrev 0x00001014 0x3f THUMB Debug/../../obj/boot.o + .debug_abbrev 0x00001053 0xe0 THUMB Debug/../../obj/com.o + .debug_abbrev 0x00001133 0x3f THUMB Debug/../../obj/cop.o + .debug_abbrev 0x00001172 0x1cb THUMB Debug/../../obj/xcp.o -.debug_loc 0x00000000 0x4a53 - .debug_loc 0x00000000 0x8eb THUMB Debug/../../obj/sysctl.o - .debug_loc 0x000008eb 0x3ac THUMB Debug/../../obj/interrupt.o - .debug_loc 0x00000c97 0xe93 THUMB Debug/../../obj/gpio.o - .debug_loc 0x00001b2a 0x3b0 THUMB Debug/../../obj/flashlib.o - .debug_loc 0x00001eda 0xd72 THUMB Debug/../../obj/uartlib.o - .debug_loc 0x00002c4c 0x20 THUMB Debug/../../obj/main.o - .debug_loc 0x00002c6c 0x20 THUMB Debug/../../obj/vectors.o - .debug_loc 0x00002c8c 0x10f THUMB Debug/../../obj/cpu.o - .debug_loc 0x00002d9b 0x6c1 THUMB Debug/../../obj/flash.o - .debug_loc 0x0000345c 0xff THUMB Debug/../../obj/nvm.o - .debug_loc 0x0000355b 0x40 THUMB Debug/../../obj/timer.o - .debug_loc 0x0000359b 0x168 THUMB Debug/../../obj/uart.o - .debug_loc 0x00003703 0x46 THUMB Debug/../../obj/assert.o - .debug_loc 0x00003749 0x40 THUMB Debug/../../obj/backdoor.o - .debug_loc 0x00003789 0x40 THUMB Debug/../../obj/boot.o - .debug_loc 0x000037c9 0xb2 THUMB Debug/../../obj/com.o - .debug_loc 0x0000387b 0x1a7 THUMB Debug/../../obj/xcp.o - .debug_loc 0x00003a22 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_loc 0x00003a4e 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_loc 0x00003aba 0xf99 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) +.debug_loc 0x00000000 0x37c5 + .debug_loc 0x00000000 0x81a THUMB Debug/../../obj/sysctl.o + .debug_loc 0x0000081a 0x354 THUMB Debug/../../obj/interrupt.o + .debug_loc 0x00000b6e 0xe3e THUMB Debug/../../obj/gpio.o + .debug_loc 0x000019ac 0x431 THUMB Debug/../../obj/flashlib.o + .debug_loc 0x00001ddd 0xd99 THUMB Debug/../../obj/uartlib.o + .debug_loc 0x00002b76 0x20 THUMB Debug/../../obj/main.o + .debug_loc 0x00002b96 0xbf THUMB Debug/../../obj/cpu.o + .debug_loc 0x00002c55 0x680 THUMB Debug/../../obj/flash.o + .debug_loc 0x000032d5 0x7f THUMB Debug/../../obj/nvm.o + .debug_loc 0x00003354 0x20 THUMB Debug/../../obj/timer.o + .debug_loc 0x00003374 0x190 THUMB Debug/../../obj/uart.o + .debug_loc 0x00003504 0x46 THUMB Debug/../../obj/assert.o + .debug_loc 0x0000354a 0x40 THUMB Debug/../../obj/backdoor.o + .debug_loc 0x0000358a 0x40 THUMB Debug/../../obj/boot.o + .debug_loc 0x000035ca 0x86 THUMB Debug/../../obj/com.o + .debug_loc 0x00003650 0x175 THUMB Debug/../../obj/xcp.o -.debug_aranges 0x00000000 0xdf0 +.debug_aranges 0x00000000 0x848 .debug_aranges 0x00000000 0x178 THUMB Debug/../../obj/sysctl.o .debug_aranges @@ -1601,35 +945,27 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw .debug_aranges 0x000005d0 0x30 THUMB Debug/../../obj/cpu.o .debug_aranges - 0x00000600 0x78 THUMB Debug/../../obj/flash.o + 0x00000600 0x68 THUMB Debug/../../obj/flash.o .debug_aranges - 0x00000678 0x40 THUMB Debug/../../obj/nvm.o + 0x00000668 0x40 THUMB Debug/../../obj/nvm.o .debug_aranges - 0x000006b8 0x40 THUMB Debug/../../obj/timer.o + 0x000006a8 0x40 THUMB Debug/../../obj/timer.o .debug_aranges - 0x000006f8 0x40 THUMB Debug/../../obj/uart.o + 0x000006e8 0x30 THUMB Debug/../../obj/uart.o .debug_aranges - 0x00000738 0x20 THUMB Debug/../../obj/assert.o + 0x00000718 0x20 THUMB Debug/../../obj/assert.o .debug_aranges - 0x00000758 0x28 THUMB Debug/../../obj/backdoor.o + 0x00000738 0x28 THUMB Debug/../../obj/backdoor.o .debug_aranges - 0x00000780 0x28 THUMB Debug/../../obj/boot.o + 0x00000760 0x28 THUMB Debug/../../obj/boot.o .debug_aranges - 0x000007a8 0x58 THUMB Debug/../../obj/com.o + 0x00000788 0x58 THUMB Debug/../../obj/com.o .debug_aranges - 0x00000800 0x28 THUMB Debug/../../obj/cop.o + 0x000007e0 0x28 THUMB Debug/../../obj/cop.o .debug_aranges - 0x00000828 0x48 THUMB Debug/../../obj/xcp.o - .debug_aranges - 0x00000870 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_aranges - 0x00000890 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_aranges - 0x000008c0 0x4d0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_aranges - 0x00000d90 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00000808 0x40 THUMB Debug/../../obj/xcp.o -.debug_ranges 0x00000000 0xc90 +.debug_ranges 0x00000000 0x808 .debug_ranges 0x00000000 0x168 THUMB Debug/../../obj/sysctl.o .debug_ranges 0x00000168 0x80 THUMB Debug/../../obj/interrupt.o .debug_ranges 0x000001e8 0x38 THUMB Debug/../../obj/cpulib.o @@ -1639,49 +975,41 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw .debug_ranges 0x00000510 0x10 THUMB Debug/../../obj/main.o .debug_ranges 0x00000520 0x10 THUMB Debug/../../obj/vectors.o .debug_ranges 0x00000530 0x20 THUMB Debug/../../obj/cpu.o - .debug_ranges 0x00000550 0x98 THUMB Debug/../../obj/flash.o - .debug_ranges 0x000005e8 0x30 THUMB Debug/../../obj/nvm.o - .debug_ranges 0x00000618 0x30 THUMB Debug/../../obj/timer.o - .debug_ranges 0x00000648 0x30 THUMB Debug/../../obj/uart.o - .debug_ranges 0x00000678 0x10 THUMB Debug/../../obj/assert.o - .debug_ranges 0x00000688 0x18 THUMB Debug/../../obj/backdoor.o - .debug_ranges 0x000006a0 0x18 THUMB Debug/../../obj/boot.o - .debug_ranges 0x000006b8 0x48 THUMB Debug/../../obj/com.o - .debug_ranges 0x00000700 0x18 THUMB Debug/../../obj/cop.o - .debug_ranges 0x00000718 0x38 THUMB Debug/../../obj/xcp.o - .debug_ranges 0x00000750 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_ranges 0x00000760 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_ranges 0x00000780 0x4c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_ranges 0x00000c40 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_ranges 0x00000550 0x70 THUMB Debug/../../obj/flash.o + .debug_ranges 0x000005c0 0x30 THUMB Debug/../../obj/nvm.o + .debug_ranges 0x000005f0 0x48 THUMB Debug/../../obj/timer.o + .debug_ranges 0x00000638 0xa0 THUMB Debug/../../obj/uart.o + .debug_ranges 0x000006d8 0x10 THUMB Debug/../../obj/assert.o + .debug_ranges 0x000006e8 0x18 THUMB Debug/../../obj/backdoor.o + .debug_ranges 0x00000700 0x18 THUMB Debug/../../obj/boot.o + .debug_ranges 0x00000718 0x48 THUMB Debug/../../obj/com.o + .debug_ranges 0x00000760 0x18 THUMB Debug/../../obj/cop.o + .debug_ranges 0x00000778 0x90 THUMB Debug/../../obj/xcp.o -.debug_line 0x00000000 0x3319 - .debug_line 0x00000000 0x751 THUMB Debug/../../obj/sysctl.o - .debug_line 0x00000751 0x2a2 THUMB Debug/../../obj/interrupt.o - .debug_line 0x000009f3 0x105 THUMB Debug/../../obj/cpulib.o - .debug_line 0x00000af8 0x571 THUMB Debug/../../obj/gpio.o - .debug_line 0x00001069 0x39a THUMB Debug/../../obj/flashlib.o - .debug_line 0x00001403 0x6d8 THUMB Debug/../../obj/uartlib.o - .debug_line 0x00001adb 0x1d THUMB Debug/../../obj/hooks.o - .debug_line 0x00001af8 0x9d THUMB Debug/../../obj/main.o - .debug_line 0x00001b95 0x155 THUMB Debug/../../obj/cstart.o - .debug_line 0x00001cea 0x13d THUMB Debug/../../obj/vectors.o - .debug_line 0x00001e27 0xee THUMB Debug/../../obj/cpu.o - .debug_line 0x00001f15 0x264 THUMB Debug/../../obj/flash.o - .debug_line 0x00002179 0x10a THUMB Debug/../../obj/nvm.o - .debug_line 0x00002283 0x108 THUMB Debug/../../obj/timer.o - .debug_line 0x0000238b 0x140 THUMB Debug/../../obj/uart.o - .debug_line 0x000024cb 0x12a THUMB Debug/../../obj/assert.o - .debug_line 0x000025f5 0x142 THUMB Debug/../../obj/backdoor.o - .debug_line 0x00002737 0xb9 THUMB Debug/../../obj/boot.o - .debug_line 0x000027f0 0x1a7 THUMB Debug/../../obj/com.o - .debug_line 0x00002997 0xb1 THUMB Debug/../../obj/cop.o - .debug_line 0x00002a48 0x225 THUMB Debug/../../obj/xcp.o - .debug_line 0x00002c6d 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_line 0x00002ce2 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_line 0x00002d56 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_line 0x000032a5 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_line 0x00000000 0x2ddf + .debug_line 0x00000000 0x786 THUMB Debug/../../obj/sysctl.o + .debug_line 0x00000786 0x2c2 THUMB Debug/../../obj/interrupt.o + .debug_line 0x00000a48 0x105 THUMB Debug/../../obj/cpulib.o + .debug_line 0x00000b4d 0x5a4 THUMB Debug/../../obj/gpio.o + .debug_line 0x000010f1 0x3ea THUMB Debug/../../obj/flashlib.o + .debug_line 0x000014db 0x74d THUMB Debug/../../obj/uartlib.o + .debug_line 0x00001c28 0x1d THUMB Debug/../../obj/hooks.o + .debug_line 0x00001c45 0x9d THUMB Debug/../../obj/main.o + .debug_line 0x00001ce2 0x155 THUMB Debug/../../obj/cstart.o + .debug_line 0x00001e37 0x13e THUMB Debug/../../obj/vectors.o + .debug_line 0x00001f75 0xeb THUMB Debug/../../obj/cpu.o + .debug_line 0x00002060 0x25b THUMB Debug/../../obj/flash.o + .debug_line 0x000022bb 0x10a THUMB Debug/../../obj/nvm.o + .debug_line 0x000023c5 0x117 THUMB Debug/../../obj/timer.o + .debug_line 0x000024dc 0x13c THUMB Debug/../../obj/uart.o + .debug_line 0x00002618 0x12c THUMB Debug/../../obj/assert.o + .debug_line 0x00002744 0x149 THUMB Debug/../../obj/backdoor.o + .debug_line 0x0000288d 0xb9 THUMB Debug/../../obj/boot.o + .debug_line 0x00002946 0x1af THUMB Debug/../../obj/com.o + .debug_line 0x00002af5 0xb1 THUMB Debug/../../obj/cop.o + .debug_line 0x00002ba6 0x239 THUMB Debug/../../obj/xcp.o -.debug_str 0x00000000 0x2553 +.debug_str 0x00000000 0x1e53 .debug_str 0x00000000 0x53a THUMB Debug/../../obj/sysctl.o 0x561 (size before relaxing) .debug_str 0x0000053a 0x1ab THUMB Debug/../../obj/interrupt.o @@ -1722,14 +1050,6 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw 0xea (size before relaxing) .debug_str 0x00001beb 0x268 THUMB Debug/../../obj/xcp.o 0x30c (size before relaxing) - .debug_str 0x00001e53 0x68 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x74 (size before relaxing) - .debug_str 0x00001ebb 0x7c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x88 (size before relaxing) - .debug_str 0x00001f37 0x54a C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x5d3 (size before relaxing) - .debug_str 0x00002481 0xd2 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0xde (size before relaxing) .comment 0x00000000 0x11 .comment 0x00000000 0x11 THUMB Debug/../../obj/sysctl.o @@ -1753,10 +1073,6 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw .comment 0x00000000 0x12 THUMB Debug/../../obj/com.o .comment 0x00000000 0x12 THUMB Debug/../../obj/cop.o .comment 0x00000000 0x12 THUMB Debug/../../obj/xcp.o - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .ARM.attributes 0x00000000 0x10 @@ -1802,19 +1118,3 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw 0x00000130 0x10 THUMB Debug/../../obj/cop.o .ARM.attributes 0x00000140 0x10 THUMB Debug/../../obj/xcp.o - .ARM.attributes - 0x00000150 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .ARM.attributes - 0x00000160 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .ARM.attributes - 0x00000170 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .ARM.attributes - 0x00000180 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .ARM.attributes - 0x00000190 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .ARM.attributes - 0x000001a0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .ARM.attributes - 0x000001b0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .ARM.attributes - 0x000001c0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.srec index 51591c00..8c60408c 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.srec +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/bin/openbtl_ek_lm3s6965.srec @@ -1,19 +1,19 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S1130000700600207B0100008512000085120000AC -S11300108512000085120000851200008512000080 -S11300208512000085120000851200008512000070 -S11300308512000085120000851200008512000060 -S11300408512000085120000851200008512000050 -S11300508512000085120000851200008512000040 -S11300608512000085120000851200008512000030 -S11300708512000085120000851200008512000020 -S11300808512000085120000851200008512000010 -S11300908512000085120000851200008512000000 -S11300A085120000851200008512000085120000F0 -S11300B085120000851200008512000085120000E0 -S11300C085120000851200008512000085120000D0 -S11300D085120000851200008512000085120000C0 -S11300E085120000851200008512000085120000B0 +S1130000680600207B010000B50E0000B50E00005C +S1130010B50E0000B50E0000B50E0000B50E0000D0 +S1130020B50E0000B50E0000B50E0000B50E0000C0 +S1130030B50E0000B50E0000B50E0000B50E0000B0 +S1130040B50E0000B50E0000B50E0000B50E0000A0 +S1130050B50E0000B50E0000B50E0000B50E000090 +S1130060B50E0000B50E0000B50E0000B50E000080 +S1130070B50E0000B50E0000B50E0000B50E000070 +S1130080B50E0000B50E0000B50E0000B50E000060 +S1130090B50E0000B50E0000B50E0000B50E000050 +S11300A0B50E0000B50E0000B50E0000B50E000040 +S11300B0B50E0000B50E0000B50E0000B50E000030 +S11300C0B50E0000B50E0000B50E0000B50E000020 +S11300D0B50E0000B50E0000B50E0000B50E000010 +S11300E0B50E0000B50E0000B50E0000B50E000000 S11300F072B64B484B4901604B498D464B484C49BD S11301004C4A00F07BF84C484C494D4A00F076F8D4 S11301104C484D494D4A00F071F84D484D494E4AFE @@ -22,7 +22,7 @@ S11301304E494F4A00F062F84E484F49002200F001 S113014068F84E484E49091A082903DB0022026068 S1130150043001603F484049884205D002680430B9 S113016003B4904703BCF7E700208646EC4601F051 -S1130170AFFC00200021434A904772B62A498D46BD +S1130170BDF900200021434A904772B62A498D46B2 S11301802A482B492B4A00F039F82B482B492C4A92 S113019000F034F82B482C492C4A00F02FF82C4856 S11301A02C492D4A00F02AF82C482D492D4A00F0FC @@ -33,706 +33,410 @@ S11301E00268043003B4904703BCF7E70020864656 S11301F0EC4600200021234A9047FEE7884207D0BE S1130200521A05D0037801300B700131013AF9D14B S11302107047884202D002700130FAE7704700004C -S113022008ED00E00000000070060020F02D000042 +S113022008ED00E00000000068060020701B0000DC S11302300000002000000020880200008802000066 -S1130240B0290000F02D0000000000200000002074 -S1130250B0290000B0290000B0290000B029000036 -S1130260B0290000B0290000B0290000B029000026 -S1130270F02D000000000020F0040020F004002015 -S10B0280700500205512000076 -S1130288A0F5801303F1FF334FF48072C0F210021B -S1130298904214BF00220122012B8CBF134642F066 -S11302A80103002B40F077814FF40073C0F2100370 -S11302B84FF48062C0F21002904214BF002201225F -S11302C8984214BF134642F00103002B40F06681A4 -S11302D84FF48073C1F210034FF40072C1F210029C -S11302E8904214BF00220122984214BF134642F0E0 -S11302F80103002B40F055814FF48063C1F21003D1 -S11303084FF48042C1F21002904214BF002201222D -S1130318984214BF134642F00103002B40F0448175 -S11303284FF4A043C2F210034FF00102C2F20002DC -S1130338904214BF00220122984214BF134642F08F -S11303480103002B40F033814FF00203C2F2000393 -S11303584FF00402C2F20002904214BF00220122AC -S1130368984214BF134642F00103002B40F0228147 -S11303784FF00803C2F200034FF01002C2F2000269 -S1130388904214BF00220122984214BF134642F03F -S11303980103002B40F011814FF02003C2F2000347 -S11303A84FF04002C2F20002904214BF0022012220 -S11303B8984214BF134642F00103002B40F0008119 -S11303C84FF08003C2F200034FF48072C2F20002BD -S11303D8904214BF00220122984214BF134642F0EF -S11303E80103002B40F0EF80B0F1102F14BF00235D -S11303F80123402808BF43F00103002B40F0E680A6 -S11304084FF48043C1F200034FF48052C1F210024A -S1130418904214BF00220122984214BF134642F0AE -S11304280103002B40F0D5804FF48073C2F210030F -S11304384FF08002C3F20002904214BF002201224E -S1130448984214BF134642F00103002B40F0C480C5 -S11304584FF01003C3F20003B0F1101F14BF0022C1 -S11304680122984214BF134642F00103002B40F0C6 -S1130478B6804FF48073C1F200034FF40072C1F2E6 -S11304880002904214BF00220122984214BF13466E -S113049842F00103002B40F0A5804FF01003C1F295 -S11304A800034FF02002C1F20002904214BF002260 -S11304B80122984214BF134642F00103002B40F076 -S11304C894804FF02003C3F200034FF00102C1F2FD -S11304D81002904214BF00220122984214BF13460E -S11304E842F00103002B40F083804FF00203C1F275 -S11304F810034FF00402C1F21002904214BF00220C -S11305080122984214BF134642F00103002B72D112 -S11305184FF00803C1F210034FF00102C1F20002C8 -S1130528904214BF00220122984214BF134642F09D -S11305380103002B62D14FF00203C1F200034FF014 -S11305480402C1F20002904214BF00220122984220 -S113055814BF134642F00103002B52D14FF001039C -S1130568C2F21003984214BF00230123B0F1202FD4 -S113057808BF43F00103002B46D14FF48053C0F267 -S11305881003984214BF00230123082814BF1846F7 -S113059843F0010070474FF0010070474FF001002D -S11305A870474FF0010070474FF0010070474FF05B -S11305B8010070474FF0010070474FF00100704789 -S11305C84FF0010070474FF0010070474FF00100F1 -S11305D870474FF0010070474FF0010070474FF02B -S11305E8010070474FF0010070474FF00100704759 -S11305F84FF0010070474FF0010070474FF00100C1 -S113060870474FF0010070474FF00100704700BF7A -S113061810B50446FFF734FE38B942F60C20C0F290 -S113062800004FF4FC7101F0C9F942F68023C0F2CE -S113063800034FEA147253F822301A68A1B2C4F3C3 -S1130648044401FA04F414431C6010BD0138FDD1BC -S1130658704700BFF0B504464FF46043C4F20F037B -S11306681B6813F0E04F0CD04FF46043C4F20F033F -S11306781A684FF00003C7F2FF031340B3F1805F19 -S113068802D1002CC0F2C1804EF26002C4F20F0203 -S113069811684EF27003C4F20F031E6841F400613E -S11306A821F4800546F4006615601E6011F0020FFF -S11306B802D014F0020F05D015F0010F26D014F063 -S11306C8010F23D164F003031D404EF26003C4F20A -S11306D80F031D60002E0CDA06F07003702B14BF94 -S11306E800220122302B14BF134642F0010323B920 -S11306F808E005F03003302B04D14FF48050FFF7A5 -S1130708A5FF03E04FF40020FFF7A0FF25F45E5790 -S113071827F0700743F2F07323401F434DF68F739D -S1130728C7F6FF73334042F23005C8F2000525408E -S11307381D4304F008034EF25802C4F20F024FF0AE -S11307484001116055EAC3050AD54EF27003C4F29C -S11307580F031D604EF26003C4F20F031F6009E02B -S11307684EF26003C4F20F031F604EF27003C4F22A -S11307780F031D604FF01000FFF768FF27F0F867BC -S113078827F003074FF00303C0F2C07323401F434D -S113079825F0FC5504F0FC531D4314F0804F1FBF93 -S11307A847F4800725F480000023C4F240031ABFED -S11307B82340184325F0804014F4006F17D14EF2FB -S11307C85003C4F20F031B6813F0400F0BD147F614 -S11307D8FF734EF25001C4F20F010A6812F0400F81 -S11307E801D1013BF9D127F4006720F400604EF2EF -S11307F86003C4F20F031F604EF27003C4F20F03C8 -S113080818604FF01000FFF721FFF0BD30B44EF22E -S11308186003C4F20F031B684EF27002C4F20F02A5 -S11308281268002AB4BF02F0700103F030012029D5 -S113083800F0828004D881B1102940F04D8115E080 -S1130848602900F0DF80702900F0D980302908BFC2 -S113085847F2305040F04081D6E042F6B011C0F281 -S11308680001C3F3841051F82000CDE04FF4604137 -S1130878C4F20F01096811F0E04F04BF4EF2C01032 -S1130888C0F2E40000F0C0804FF46041C4F20F01EC -S113089808684FF00001C7F2FF010140B1F1805F21 -S11308A804BF4EF2C010C0F2E40000F0AD804FF473 -S11308B86041C4F20F0108684FF00001C7F2FF015C -S11308C801404FF00000C1F2010081420DD14FF404 -S11308D86041C4F20F01096889B2022904BF4FF4C8 -S11308E8D850C0F2B70000F08F804FF46041C4F2D2 -S11308F80F0108684FF00001C7F2FF0101404FF0F3 -S11309080000C1F2030081421CBF4FF41050C0F232 -S1130918F40079D14FF46041C4F20F010C68A4B219 -S11309284FF4D850C0F2B7004FF41051C0F2F4019C -S1130938002C18BF084667E04FF46041C4F20F0169 -S1130948096811F0E04F04BF43F67000C0F23900A3 -S11309585AD04FF46041C4F20F0108684FF0000107 -S1130968C7F2FF010140B1F1805F04BF43F6700094 -S1130978C0F2390048D04FF46041C4F20F0108684E -S11309884FF00001C7F2FF0101404FF00000C1F22F -S1130998010081420CD14FF46041C4F20F0109688F -S11309A889B2022904BF4CF2C060C0F22D002BD0DA -S11309B84FF46041C4F20F0108684FF00001C7F218 -S11309C8FF0101404FF00000C1F2030081421CBF47 -S11309D84FF41060C0F23D0016D14FF46041C4F2E8 -S11309E80F010C68A4B24CF2C060C0F22D004FF4A1 -S11309F81061C0F23D01002C18BF084604E04FF412 -S1130A08004001E04FF48000002A03DA12F4006F7A -S1130A1803D03FE013F4006F3CD14EF26401C4F2FA -S1130A280F0109684FF46044C4F20F04246814F0F9 -S1130A38E04F0CD04FF46044C4F20F0425684FF023 -S1130A480004C7F2FF042C40B4F1805F0CD1C1F359 -S1130A58481404F1020404FB00F001F01F0404F13B -S1130A680204B0FBF4F00BE0C1F3481404FB00F0FB -S1130A7801F01F0404F101044FEA4404B0FBF4F04C -S1130A8811F4804F18BF400811F4004F18BF8008B4 -S1130A9843F4800313F4800F20D0002A15DA12F0EF -S1130AA8804F0BD012F4006F08D14FEA4000C2F314 -S1130AB8865202F10102B0FBF2F00FE0C2F3C55214 -S1130AC802F10102B0FBF2F008E0C3F3C35303F1EF -S1130AD80103B0FBF3F001E04FF0000030BC7047B5 -S1130AE84FF40043C4F20503984214BF00230123C2 -S1130AF8B0F1402F08BF43F00103002B40F0988069 -S1130B084FF4A043C4F200034FF41042C4F20502A8 -S1130B18904214BF00220122984214BF134642F0A7 -S1130B280103002B40F087804FF4C043C4F2000354 -S1130B384FF42042C4F20502904214BF002201225D -S1130B48984214BF134642F00103002B76D14FF4A8 -S1130B58E043C4F200034FF43042C4F20502904269 -S1130B6814BF00220122984214BF134642F0010325 -S1130B78002B66D14FF48043C4F202034FF4404281 -S1130B88C4F20502904214BF00220122984214BF05 -S1130B98134642F00103002B56D14FF4A043C4F28C -S1130BA802034FF45042C4F20502904214BF0022DB -S1130BB80122984214BF134642F00103002B46D188 -S1130BC84FF4C043C4F202034FF46042C4F2050276 -S1130BD8904214BF00220122984214BF134642F0E7 -S1130BE80103002B36D14FF4E043C4F202034FF45F -S1130BF87042C4F20502904214BF002201229842B6 -S1130C0814BF134642F00103002B26D14FF450437E -S1130C18C4F203034FF00002C4F20602904214BF68 -S1130C2800220122984214BF104642F00100704786 -S1130C384FF0010070474FF0010070474FF001007A -S1130C4870474FF0010070474FF0010070474FF0B4 -S1130C58010070474FF0010070474FF001007047E2 -S1130C6870B504461546CEB2FFF73AFF38B942F6D6 -S1130C788C20C0F200004FF0E40100F09FFE022D2A -S1130C8807D942F68C20C0F200004FF0E60100F0CC -S1130C9895FE15F0010F04F58063D4F8002414BF01 -S1130CA83243B2431A6015F0020F04F58463D4F892 -S1130CB8202414BF164322EA06061E6070BD00BF36 -S1130CC8F0B5044617461E46CDB2FFF709FF38B9FA -S1130CD842F68C20C0F200004FF4DD7100F06EFE85 -S1130CE807F1FF323B1F18BF0123012A94BF0023D9 -S1130CF803F001034BB10C2F07D042F68C20C0F24D -S1130D0800004FF4DF7100F059FEB6F10A0318BF72 -S1130D180123082E0CBF002303F00103E3B1B6F14D -S1130D28090318BF01230C2E0CBF002303F0010391 -S1130D3893B1B6F10D0318BF01230B2E0CBF00238A -S1130D4803F0010343B13EB142F68C20C0F2000027 -S1130D5840F2C51100F032FE17F0010F04F5A0634C -S1130D68D4F8002514BF2A43AA431A6017F0020FC7 -S1130D7804F5A06303F10403D4F8042514BF2A433B -S1130D88AA431A6017F0040F04F5A163D4F80825E0 -S1130D9814BF2A43AA431A6017F0080F04F5A36383 -S1130DA8D4F8182514BF2A43AA431A6016F0010F71 -S1130DB804F5A06303F10C03D4F80C2514BF2A43EB -S1130DC8AA431A6016F0020F04F5A263D4F810259A -S1130DD814BF2A43AA431A6016F0040F04F5A26349 -S1130DE803F10403D4F8142514BF2A43AA431A6050 -S1130DF816F0080F04F5A26303F10C03D4F81C25BC -S1130E0814BF2A43AA431A602EB904F5A563D4F87B -S1130E182825154305E004F5A563D4F8282522EA16 -S1130E2805051D60F0BD00BF30B50446CDB2FFF71F -S1130E3857FE38B942F68C20C0F2000040F21F5128 -S1130E4800F0BCFD204629464FF00202FFF708FFD8 -S1130E58204629464FF001024FF00803FFF730FF00 -S1130E6830BD00BF10B504464FEA80534FEA935390 -S1130E783BB142F6FC20C0F200004FF0840100F0C0 -S1130E889DFD4DF21403C4F20F034FF001021A60E2 -S1130E984FF45043C4F20F031C604DF20803C4F22C -S1130EA80F034FF00202CAF242421A604DF20802DE -S1130EB8C4F20F02136813F0020FFBD14DF20C03B6 -S1130EC8C4F20F03186800F00100002814BF4FF0A3 -S1130ED8FF30002010BD00BF2DE9F04106460C4646 -S1130EE8154611F0030F07D042F6FC20C0F20000AB -S1130EF84FF0C80100F062FD15F0030F07D042F669 -S1130F08FC20C0F200004FF0C90100F057FD4DF27B -S1130F181403C4F20F034FF001021A604EF2A01337 -S1130F28C4F20F031B6813F0010F33D1002D37D11E -S1130F3853E04FF45048C4F20F084DF23000C4F2A5 -S1130F480F004FF45141C4F20F014DF22007C4F2CF -S1130F580F074FF0010CCAF2424C24F07F03C8F883 -S1130F68003006E056F8042B5A5004F10404A5F1A5 -S1130F78040514F07C0301D102681AB9002DF1D1DB -S1130F882A4600E02A46C7F800C03B6813F0010F60 -S1130F98FBD102E0002DCCD11FE0002ADDD11CE0FA -S1130FA84FF45047C4F20F074DF20400C4F20F0087 -S1130FB84DF20802C4F20F024FF00101CAF2424195 -S1130FC83C6056F8043B03601160136813F0010F8A -S1130FD8FBD104F10404043DF2D14DF20C03C4F234 -S1130FE80F03186800F00100002814BF4FF0FF3009 -S1130FF80020BDE8F08100BF4FF44043C4F2000371 -S11310084FF45042C4F20002904214BF002201225D -S1131018984214BF134642F0010343B94FF46043A6 -S1131028C4F20003984214BF0020012070474FF017 -S11310380100704710B50446FFF7DEFF38B942F6E1 -S11310487030C0F200004FF4CF7100F0B7FCE36ACF -S113105843F01003E362236B43F4407343F001034A -S1131068236310BD10B50446FFF7C6FF38B942F62E -S11310787030C0F200004FF4DF7100F09FFCA369E8 -S113108813F0080FFBD1E36A23F01003E362236B28 -S113109823F4407323F00103236310BDF0B5044621 -S11310A80E4615461F46FFF7A7FF38B942F67030BB -S11310B8C0F2000040F20D1100F080FC3DB942F688 -S11310C87030C0F200004FF4877100F077FC4FF4E1 -S11310D86043C4F20F031B6813F0E04F08BF1023EA -S11310E844D04FF46043C4F20F031A684FF000036E -S11310F8C7F2FF031340B3F1805F08BF102335D054 -S11311084FF46043C4F20F031A684FF00003C7F2A8 -S1131118FF0313404FF00002C1F20102934209D1C8 -S11311284FF46043C4F20F031B689BB2022B08BF41 -S113113810231BD04FF46043C4F20F031A684FF016 -S11311480003C7F2FF0313404FF00002C1F2030289 -S1131158934218BF082309D14FF46043C4F20F0324 -S11311681B689BB2002B0CBF1023082305FB03F359 -S1131178B34207D942F67030C0F2000040F20F11B2 -S113118800F01CFC2046FFF76DFFB6EB051F236B30 -S11311983DBF43F0200323636D0823F0200328BFD9 -S11311A823634FEAC606B6FBF5F505F101054FEAD8 -S11311B8D5136362C5F34505A562E7624FF00003E2 -S11311C8A3612046FFF736FFF0BD00BF10B5044603 -S11311D8FFF712FF38B942F67030C0F2000040F24F -S11311E8E93100F0EBFBA36913F0200F14BF0020D2 -S11311F8012010BD10B50446FFF7FEFE38B942F6CB -S11312087030C0F2000040F2094100F0D7FBA36936 -S113121813F0100F0CBF20684FF0FF3010BD00BF53 -S113122830B50446CDB2FFF7E7FE38B942F6703060 -S1131238C0F2000040F25B4100F0C0FBA36913F068 -S1131248200F06BF25600120002030BD00B54FF4F3 -S11312586070C0F2C010FFF7FDF94FF00100C2F250 -S11312680000FFF7D5F94FF040204FF00301FFF7D6 -S1131278DBFD00F0DDFB00F0E7FBFCE700B542F620 -S1131288E430C0F200004FF03C0100F097FB5DF839 -S113129804FB00BF00B500F06FFA60B100F00AFC6F -S11312A84EF60853CEF200034FF480421A6044F21B -S11312B804031B6898475DF804FB00BF70B50E462D -S11312C892B272B1044600F1010002F1FF3292B207 -S11312D8851816F8013B04F8013B00F005FCAC4204 -S11312E8F7D170BD00B5FEF744FF5DF804FB00BFFD -S11312F870B5064642F67045C0F200054FF000048A -S113130800F0F2FB2B68B3420DD869685B189E4263 -S113131809D242F67043C0F2000304EB440203EB23 -S11313288203187A70BD04F1010405F10C05122C2E -S1131338E6D14FF0FF0070BD70B5C6B242F67045F5 -S1131348C0F200054FF0000400F0CEFB2B7AB34244 -S113135808D142F67043C0F2000304EB440253F888 -S1131368220070BD04F1010405F10C05122CEBD127 -S11313784FF0FF3070BD00BF2DE9F04181B0054644 -S11313880068FFF7B5FFFF2808BF002022D04FF000 -S113139800044FF004082E68A71904F10403EB585D -S11313A8009300F0A1FB684639464246FFF794FDD6 -S11313B858B9A259009B9A420AD104F10404B4F51D -S11313C8007FE8D14FF0010004E04FF0000001E095 -S11313D84FF0000001B0BDE8F08100BF00B54FEA4E -S11313E8C1534FEAD35363B903688B420DD040F815 -S11313F8041B4FF40072FFF761FF4FF001005DF822 -S113140804FB4FF000005DF804FB4FF001005DF8A9 -S113141804FB00BF30B504460D4640F20003C2F297 -S11314280003984206D0B1F5804F08D0FFF7A4FF17 -S113143848B910E040F20424C2F2000403E040F288 -S11314480004C2F2000420462946FFF7C7FF00281B -S113145808BF002401E04FF00004204630BD00BF5F -S11314682DE9F04305460C4616469FB24FEA51292A -S11314784FEA49290368B3F1FF3F04D14946FFF70E -S1131488ADFF002830D02B684B4505D02846494687 -S1131498FFF7C0FF054658B32B68E41A04F10404A7 -S11314A82C1906F1010807F1FF37BFB2B84440F21E -S11314B8FF1709F5007900F017FB05F10403E31A97 -S11314C8BB4207D928464946FFF7A4FF054698B109 -S11314D800F1040416F8013B04F8013B4645EAD13F -S11314E84FF00100BDE8F0834FF00000BDE8F08341 -S11314F84FF00000BDE8F0834FF00000BDE8F08332 -S113150840F20423C2F200034FF0FF321A6040F2A3 -S11315180003C2F200031A60704700BF70B50446A6 -S11315280D461646FFF7E4FEFF2818D004F1FF30F5 -S11315384019FFF7DDFEFF2814D04FEA5423202B6F -S113154807BF40F20000C2F2000040F20420C2F2D9 -S11315580000ABB221463246FFF782FF70BD4FF060 -S1131568000070BD4FF0000070BD00BF2DE9F041D0 -S113157804460E46FFF7BCFE054604F1FF34A019E5 -S1131588FFF7B6FE04460646FF2814BF00230123CE -S1131598FF2D08BF43F00103002B5BD1854245D8DA -S11315A8012D47D9132849D82846FFF7C5FE074611 -S11315B82046FFF7C1FE804642F67045C0F200059A -S11315C84FF0000400F090FA2B7AB34209D142F6A6 -S11315D87043C0F2000304EB440203EB82035B682C -S11315E807E004F1010405F10C05122CEAD14FF0CF -S11315F80003C7EB08084344C3F38F2313B303F171 -S1131608FF35ADB205F101054FEA85254FF0000419 -S113161800F06AFAE019FFF725FCB8B904F580640C -S1131628AC42F5D14FF00100BDE8F0814FF0000065 -S1131638BDE8F0814FF00000BDE8F0814FF00000F4 -S1131648BDE8F0814FF00100BDE8F0814FF00000E3 -S1131658BDE8F0814FF00000BDE8F08100B581B02D -S113166840F20003C2F200031B68B3F1FF3F08BF56 -S113167801201CD040F20003C2F2000399685A68A2 -S11316888918DA6889181A6989185A6989189A693F -S11316988918DA698B18C3F1000301AA42F8043DDA -S11316A844F2F0004FF004016A46FFF737FF01B037 -S11316B800BD00BF44F2040318684FF480431B685C -S11316C8C01844F208031B68C01844F20C031B68D2 -S11316D8C01844F210031B68C01844F214031B68B2 -S11316E8C01844F218031B68C01844F2F0031B68BE -S11316F8C018D0F1010038BF0020704700B540F28F -S11317080003C2F200031B68B3F1FF3F06D040F2A6 -S11317180000C2F20000FFF72FFE90B140F204234C -S1131728C2F200031B68B3F1FF3F0ED040F204205D -S1131738C2F20000FFF720FE003018BF01205DF858 -S113174804FB4FF000005DF804FB4FF001005DF866 -S113175804FB00BF00B5FFF7D3FE5DF804FB00BF30 -S113176800B5FFF7DBFE5DF804FB00BF00B5FFF72B -S1131778FDFE5DF804FB00BF00B5FFF79BFF5DF8B5 -S113178804FB00BF00B5FFF769FF18B1FFF7B6FF08 -S11317985DF804FB4FF000005DF804FB4EF2100303 -S11317A8CEF200034FF000021A6070474EF21003A5 -S11317B8CEF200031B6813F4803F1FBF40F20843B6 -S11317C8C2F200031A88013218BF1A80704700BF9A -S11317D840F20843C2F200031880704700B5FFF7CF -S11317E8DDFF4EF21003CEF200034CF24F325A6082 -S11317F84FF0000098604FF005021A60FFF7E8FF09 -S11318085DF804FB00B5FFF7D1FF40F20843C2F2CC -S1131818000318885DF804FB10B504464FF44040F3 -S1131828C4F20000FFF7E6FCB0F1FF3F1ABF2070D6 -S11318380120002010BD00BF10B5C1B24FF44040D4 -S1131848C4F20000FFF7ECFC18B90EE000F04CF904 -S113185803E04FF44044C4F200042046FFF7B6FC0A -S11318680028F3D04FF0010010BD4FF0000010BD68 -S113187800B54FF00100C1F20000FEF7C9FEFEF703 -S1131888C5FF01464FF44040C4F200004FF46142E2 -S11318984FF06003FFF702FC5DF804FB2DE9F0410B -S11318A80546CCB2402C07D942F64850C0F2000095 -S11318B84FF0560100F082F82046FFF7BDFF0128DB -S11318C807D042F64850C0F200004FF0590100F02A -S11318D875F82646BCB14FF0000442F64857C0F2EA -S11318E800074FF0610800F0FFF8285DFFF7A4FF38 -S11318F8012803D03846414600F060F804F1010499 -S1131908A3B2B342EFD3BDE8F08100BF10B50446DB -S113191840F25143C2F200031B78B3B940F20C40C1 -S1131928C2F20000FFF778FF01283CD140F251438E -S1131938C2F200034FF001021A7040F25043C2F29F -S113194800034FF00000187010BD40F20C43C2F2BF -S1131958000340F25042C2F20002107800F1010084 -S11319681818FFF759FF012820D140F25043C2F25A -S113197800031A7802F10102D2B21A7040F20C4341 -S1131988C2F200031B78934213D120460A49FFF799 -S113199895FC40F25143C2F200034FF000021A7062 -S11319A84FF0010010BD4FF0000010BD4FF00000D3 -S11319B810BD4FF0000010BD0D04002000B540F22A -S11319C85443C2F20003186040F25843C2F20003C1 -S11319D8196000F089F8FCE700B500F07DF80128EB -S11319E815D040F25C43C2F200031B78012B0ED1E0 -S11319F8FFF708FF31280AD940F25C43C2F200031A -S1131A084FF000021A70FFF7C9FEFFF743FC5DF8B8 -S1131A1804FB00BF00B540F25C43C2F200034FF080 -S1131A2801021A70FFF7DAFEFFF7D6FF5DF804FB30 -S1131A3800B500F057F8FFF7EDFFFFF78BFE00F055 -S1131A480DF85DF804FB00BF00B500F04DF800F098 -S1131A581FF8FFF7C1FF5DF804FB00BF00B581B0B4 -S1131A684FF0FF038DF800304FF000038DF801307C -S1131A7800F052F8FFF7FCFE40F25D43C2F20003A7 -S1131A881B78012B02D1684600F06AF801B000BD4A -S1131A9800B540F26040C2F20000FFF737FF0128AA -S1131AA805D140F26040C2F2000000F059F85DF838 -S1131AB804FB00BF704700BF00B5C9B2FFF7EEFED4 -S1131AC800F044F85DF804FB40F25D43C2F2000301 -S1131AD84FF001021A70704700B500F02DF85DF858 -S1131AE804FB00BF704700BF704700BF40F2A0432B -S1131AF8C2F200034FF000025A70704740F2A0434C -S1131B08C2F200034FF0FE02DA7018714FF00202BD -S1131B18A3F84420704700BF40F2A043C2F2000378 -S1131B284FF000021A709A6483F84320A3F8442003 -S1131B389A705A70704700BF40F2A043C2F2000383 -S1131B481878003018BF0120704700BF40F2A04346 -S1131B58C2F200034FF0000283F84320704700BF2D -S1131B6830B504460278FF2A1DD1FFF7BFFF40F2C3 -S1131B78A043C2F200034FF001021A704FF0FF01B4 -S1131B88D9704FF0100119714FF0000159714FF0DD -S1131B9840009871D87119725A729A724FF00802FB -S1131BA8A3F84420A4E140F2A043C2F200031B7846 -S1131BB8012B40F0B781A2F1C902352A00F29481C1 -S1131BC8DFE812F0F800920192018D01920192016E -S1131BD87F01190165014F0192019201920192015D -S1131BE89201920192019201920192019201920151 -S1131BF89201920192019201920192019201920141 -S1131C089201920192019201920192019201920130 -S1131C1892019201920192018200540036007400EC -S1131C28920192019201B2009201CE00D300E70022 -S1131C3842783F2A04D94FF02200FFF75FFF57E1AB -S1131C4840F2A045C2F2000505F10400A96CFFF7B3 -S1131C5835FB4FF0FF03EB706278AB6CD318AB64C1 -S1131C68637803F10103A5F8443041E143783F2B3D -S1131C7804D94FF02200FFF741FF39E1416840F2EF -S1131C88A045C2F20005A96405F104006278FFF7D3 -S1131C9815FB4FF0FF03EB706278AB6CD318AB64A1 -S1131CA8637803F10103A5F8443021E140F2A0432D -S1131CB8C2F200034FF0FF02DA7042689A644FF0F0 -S1131CC80102A3F8442013E140F2A043C2F2000346 -S1131CD84FF0FF02DA70996C43684FF000023BB191 -S1131CE84FF0000211F8010B1218D2B2013BF9D1DE -S1131CF840F2A043C2F200034FF00001DA714FEA48 -S1131D081220C0B218724FEA1240C0B258724FEA99 -S1131D1812629A724FF001021A71597199714FF057 -S1131D280802A3F84420E3E040F2A043C2F200030F -S1131D384FF0FF02DA7042F6C852C0F200029A6409 -S1131D484FF000021A715A719A714FF00701D97154 -S1131D581A725A729A724FF00802A3F84420C7E024 -S1131D684FF00000FFF7CAFEC2E040F2A043C2F2FF -S1131D7800034FF0FF02DA704FF000021A7159782D -S1131D8859719A71DA711A724FF00602A3F8442055 -S1131D98AEE040F2A044C2F200044FF00003237006 -S1131DA8FFF7A4FE4FF0FF03E3704FF00103A4F81C -S1131DB844309DE040F2A043C2F20003986C04F161 -S1131DC801024FF03F01FFF7CBFC20B94FF031007F -S1131DD8FFF794FE8CE040F2A043C2F200034FF0F8 -S1131DE8FF02DA709A6C02F13F029A644FF0010222 -S1131DF8A3F844207CE043783E2B04D94FF022001A -S1131E08FFF77CFE74E040F2A043C2F200034FF0F7 -S1131E18FF02DA704FF00102A3F84420417841B977 -S1131E28FFF7B0FC002863D14FF03100FFF766FEDE -S1131E385EE040F2A043C2F20003986C04F102028F -S1131E48FFF78EFC20B94FF03100FFF757FE4FE043 -S1131E5840F2A043C2F2000361789A6C8A189A642B -S1131E6846E040F2A043C2F200034FF0FF02DA70EA -S1131E784FF000021A715A714FF040019971DA71EA -S1131E881A725A724FF00702A3F8442030E040F265 -S1131E98A043C2F20003986C6168FFF767FC20B99D -S1131EA84FF03100FFF72AFE22E040F2A043C2F2CD -S1131EB800034FF0FF02DA704FF00102A3F8442048 -S1131EC816E0FFF70FFA40F2A043C2F200034FF006 -S1131ED8FF02DA704FF00102A3F8442008E04FF043 -S1131EE83100FFF70BFE03E04FF02000FFF706FE7A -S1131EF840F2A043C2F2000393F84330012B03D10C -S1131F084FF01000FFF7FAFD40F2A043C2F20003BD -S1131F184FF0010283F8432003F10300B3F844109F -S1131F28FFF7CAFD30BD00BF2DE9F04F86B0064665 -S1131F380D4602924FF00003036042F6D058C0F2F7 -S1131F48000842F6E059C0F20009D3E105F10105A1 -S1131F58252904BF2B46002203D0304600F0B6FCE6 -S1131F68C8E11C4613F8010B1D46A0F120010B29FA -S1131F7813D8DFE801F0061212091212120C121219 -S1131F88120F42F04002ECE742F08002E9E742F423 -S1131F980042E6E742F02002E3E7134668280AD144 -S1131FA86078682803BF42F00802A078E51CA51CE5 -S1131FB818BF43F0040278287AD8DFE810F0A901A2 -S1131FC8790079007900790079007900790079003D -S1131FD8790079007900790079007900790079002D -S1131FE8790079007900790079007900790079001D -S1131FF8790079007900790079007900790079000D -S113200879007900790079008900790079007900EC -S113201879007900790079007900790079007900EC -S113202879007900790079007900790079007900DC -S113203879007900790079007900790079007900CC -S113204879007900790079007900790079007900BC -S113205879007900790079007900790079007900AC -S11320687900790079007900790079007900C30052 -S1132078790079007900790079007900790079008C -S1132088790079008F00D700790079007900790008 -S1132098D70079007900790079009800D000B5005C -S11320A879007900A4007900DC0079007900C50082 -S11320B840F2EC43C2F200031C68002C00F01A81C1 -S11320C84FF0FF33009302A901913146A04711E173 -S11320D830464FF0250100F0F9FB0BE1029B03F1B8 -S11320E8040202921978304600F0F0FB02E112F083 -S11320F8080F029B03F1040202921B68326814BFA2 -S11321081A701A60F6E0029B03F1040202921C683A -S11321182178002900F0EE80304600F0D7FB14F84F -S1132128011F0029F8D1E5E0029B03F104010291A3 -S11321381B6802F08007002F14BF2327002742F4EE -S113214880726CE042F4005243F2780343F2580779 -S1132158782808BF1F4612F0800F11D10EE002F054 -S11321688007002F14BF3027002709E042F480427B -S11321784FF0000704E04FF0000701E04FF00007BC -S113218812F4804F1BD0029B03F1040102911B68D7 -S113219812F0040F18BF1BB203D112F0080F18BFB6 -S11321A8DBB2002BBCBF5B422D2719DB02F04001D8 -S11321B8002918BF202712F0200F11D00EE0029B2F -S11321C803F1040102911B6812F0040F18BF9BB2BB -S11321D806D112F0080F18BFDBB201E04FF02B074D -S11321E8A0F1580020286CD8DFE800F0196B6B6B5D -S11321F86B6B6B6B6B6B6B6B156B6B6B6B156B6BCF -S11322086B6B6B11196B6B6B6B156B6B19004FF068 -S11322180004FBB957E04FF0000443BB53E04FF010 -S11322280004002B4FD04FF0000402F4005232B1E6 -S113223803F00F0119F8010003A9605405E003F045 -S11322480F0118F8010003A9605404F101041B09E3 -S1132258EDD138E04FF0000403F0070101F130013B -S113226803AAA15404F10104DB08F5D12BE04FF0D3 -S1132278000402F400424FF02C0B4CF6CD4ACCF685 -S1132288CC4A52B104F00301032901BF0DF1180C23 -S11322980CEB040101F80CBC013406A90819AAFBCB -S11322A803C14FEAD10101EB810CA3EB4C0303F109 -S11322B8300300F80C3C04F101040B460029E0D17A -S11322C801E04FF00004FF2F04D9C7F3072130467B -S11322D800F0FCFA1FB1F9B2304600F0F7FA012C0D -S11322E808D403AF3C1914F8011D304600F0EEFA87 -S11322F8BC42F8D1297800297FF428AEB3682BB101 -S1132308326871688A423CBF00219954306801E000 -S11323184FF0FF3006B0BDE8F08F00BF10B504469B -S11323280B783BB1B0F1FF3F06D04B6803F1FF33A4 -S11323384B6001E08B689847204610BD2DE9F04FAB -S113234882468B4617469846099E4FF0FF3900E0AF -S1132358A94609F10105504600F0A4FA044600F024 -S113236807FB0028F4D12346B4F1FF3F08BF4FF020 -S1132378FF3500F09C8027F4C067002E4EDD17F06F -S1132388800F0DD02B2C03D02D2C09D147F4806756 -S113239809F10205504600F085FA044606F1FF36B5 -S11323A8302C14BF00230123002ED4BF002303F0D4 -S11323B80103002B32D047F4007706F1FF3605F10C -S11323C80109504600F06EFA0446002E20DD582814 -S11323D814BF00230123782808BF43F00103BBB1CD -S11323E8B8F1100F14BF00230123B8F1000F08BF80 -S11323F843F0010363B127F4007706F1FF3605F1D2 -S11324080209504600F04EFA04464FF0100851E015 -S1132418B8F1000F08BF4FF008084BE0B8F1000FFF -S113242808BF4FF00A08002ED8BF4FF000090EDC91 -S113243815E047F4007706F1FF3608FB090905F1B2 -S11324480105504600F02EFA044616B907E04FF08D -S113245800092046414600F06DFA0028E9DA2046D2 -S11324685146FFF75BFF17F4007F08BF6FF00105C3 -S11324781DD017F0010F1AD1DBF8003003F1040264 -S1132488CBF800201B6807F49062B2F5906F08BF80 -S1132498C9F1000917F0100F18BF83F8009006D18E -S11324A817F0080F14BFA3F80090C3F8009028464B -S11324B8BDE8F08F4D46B6E72DE9F04F85B00190A1 -S11324C88A4604924FF0000BCDF808B04CF6CC497C -S11324D8C0F6CC49544614F8015B002D00F0DE81A7 -S11324E8252D3BD0284600F043FA08B918E02C46BD -S11324F804F10105207800F03BFA0028F7D101E047 -S11325080BF1010B019800F0CDF9054600F030FA03 -S11325180028F5D128460199FFF700FFA246D9E71C -S1132528019800F0BFF90646A84203D10BF1010B4C -S1132538A246CFE70199FFF7F1FE029AD2F101030F -S113254838BF0023B6F1FF3F14BF002603F001068D -S1132558002E18BF4FF0FF3202929FE19AF8013023 -S11325682A2B06BF0AF102044FF001084FF00008B5 -S11325784FF000050CE04D4500F3908105EB85050F -S1132588A6F1300616EB450500F1888148F02008CD -S1132598274604F101043E78A246304600F0C2F909 -S11325A80028E8D1414608F02002002A08BF6FF04D -S11325B800454C2E05D17E7807F1020A48F04408FC -S11325C80EE0682E0CD17E78682E03BF48F0100800 -S11325D8BE7807F1030A07F1020A18BF41F0080898 -S11325E8A6F12506532E00F25981DFE816F05400AF -S11325F8570157015701570157015701570157010F -S113260857015701570157015701570157015701FE -S113261857015701570157015701570157015701EE -S113262857015701570157015701570157015701DE -S113263857015701570157015701570157015701CE -S113264857015701570157015701570157015701BE -S113265857015701330157015701570157015701D2 -S11326685701570157015701570170009F0057013F -S1132678570157015701AA0057015701570157013C -S1132688B500CD00D80057015701E30057012801D0 -S1132698570157013301019800F004F9044625282D -S11326A802D10BF1010B15E70199FFF737FE029AE6 -S11326B8131C18BF0123B4F1FF3F0CBF1C4643F0A1 -S11326C80104002C08BF4FF0FF320292E6E008F044 -S11326D82003002B08BF012518F0010401BF049B47 -S11326E81A1D04921E6818BF0026002D00F0D6801B -S11326F8002D13DD019800F0D5F8B0F1FF3F06D1A5 -S1132708029B002B08BF4FF0FF330293C6E00CB9BD -S113271806F8010B0BF1010B013DEBD1002C7FF402 -S1132728D9AE029B03F101030293D3E648F0800279 -S11327380095019804A94FF00A03FFF7FFFD04462A -S113274892E048F080020095019804A94FF0000334 -S1132758FFF7F4FD044687E018F0010F7FF4BAAEE2 -S1132768049B03F1040204921B6818F0100F18BFAD -S113277883F800B07FF4AEAE18F0080F14BFA3F8C6 -S113278800B0C3F800B0A5E648F0800200950198AF -S113279804A94FF00803FFF7D1FD044664E028F0CC -S11327A81E020095019804A94FF01003FFF7C6FD17 -S11327B8044659E04FF0FF3404F10104019800F095 -S11327C871F8064600F0D4F80028F5D1B6F1FF3FB9 -S11327D808BF4FF0FF3447D018F0010701BF049B2E -S11327E81A1D04921B680EBF039300220392002D46 -S11327F816DC1AE005F1FF351FB9039B03F8016BDA -S1132808039304F10104019800F04CF80646431CB4 -S113281818BF0123002DD4BF002303F0010323B103 -S1132828304600F0A5F80028E4D030460199FFF7B7 -S113283875FDCFB94FF00002039B1A7014E048F0FD -S113284880020095019804A94FF00A03FFF776FD6A -S1132858044609E048F080020095019804A94FF065 -S11328681003FFF76BFD0446002C0FDA029A131CC1 -S113287818BF0123B4F1FF3F0CBF1C4643F0010409 -S1132888002C08BF4FF0FF32029207E018F0010F46 -S113289802BF029B01330293A3441BE6029805B0CE -S11328A8BDE8F08F00B5034602783AB14268107863 -S11328B840B102F101025A605DF804FB436898478D -S11328C85DF804FB4FF0FF305DF804FB30B50446B7 -S11328D8C8B2A16849B12368626803F10105954249 -S11328E808BF0020934238BFC854E3682BB121685D -S11328F86268914201D221469847236803F1010393 -S1132908236030BDA0F1410019288CBF00200120AC -S1132918704700BFA0F1610019288CBF0020012076 -S1132928704700BFA0F1300009288CBF00200120A7 -S1132938704700BF30B504460D46FFF7F3FF10B1EA -S1132948A4F130000FE02046FFF7E4FF10B1A4F132 -S1132958570008E02046FFF7D5FF10B1A4F137006F -S113296801E04FF0FF30A842A8BF4FF0FF3030BD60 -S1132978A0F10903202814BF00200120042B98BFCC -S113298840F00100704700BF00B503B400F008F838 -S113299803BC02B4694609BE00F004F801BC00BDDA -S10B29A8704700BF704700BF37 -S11329B040420F0000201C0080841E00008025007F -S11329C0999E36000040380000093D0000803E001A -S11329D000004B00404B4C0000204E00808D5B00FB -S11329E000C05D000080700000127A0000007D00CD -S11329F080969800001BB7000080BB00C0E8CE00A2 -S1132A00647ADA000024F4000000FA00443A2F75D6 -S1132A1073722F6665617365722F736F6674776165 -S1132A2072652F4F70656E424C542F546172676506 -S1132A30742F44656D6F2F41524D434D335F4C4DA0 -S1132A4033535F454B5F4C4D3353363936355F4313 -S1132A50726F7373776F726B732F426F6F742F691A -S1132A6064652F2E2E2F6C69622F647269766572ED -S1132A706C69622F73797363746C2E6300000000B9 -S1132A8000E10F4004E10F4008E10F40443A2F7584 -S1132A9073722F6665617365722F736F66747761E5 -S1132AA072652F4F70656E424C542F546172676586 -S1132AB0742F44656D6F2F41524D434D335F4C4D20 -S1132AC033535F454B5F4C4D3353363936355F4393 -S1132AD0726F7373776F726B732F426F6F742F699A -S1132AE064652F2E2E2F6C69622F6472697665726D -S1132AF06C69622F6770696F2E630000443A2F750A -S1132B0073722F6665617365722F736F6674776174 -S1132B1072652F4F70656E424C542F546172676515 -S1132B20742F44656D6F2F41524D434D335F4C4DAF -S1132B3033535F454B5F4C4D3353363936355F4322 -S1132B40726F7373776F726B732F426F6F742F6929 -S1132B5064652F2E2E2F6C69622F647269766572FC -S1132B606C69622F666C6173686C69622E63000025 -S1132B70443A2F7573722F6665617365722F736F94 -S1132B806674776172652F4F70656E424C542F5492 -S1132B9061726765742F44656D6F2F41524D434DCB -S1132BA0335F4C4D33535F454B5F4C4D3353363994 -S1132BB036355F43726F7373776F726B732F426F27 -S1132BC06F742F6964652F2E2E2F6C69622F6472C7 -S1132BD0697665726C69622F756172746C69622EB4 -S1132BE063000000443A2F7573722F666561736544 -S1132BF0722F736F6674776172652F4F70656E42C2 -S1132C004C542F5461726765742F44656D6F2F4166 -S1132C10524D434D335F4C4D33535F454B5F4C4DE9 -S1132C203353363936355F43726F7373776F726B14 -S1132C30732F426F6F742F6964652F2E2E2F2E2EE3 -S1132C402F2E2E2F2E2E2F536F757263652F415208 -S1132C504D434D335F4C4D33532F43726F73737732 -S1132C606F726B732F766563746F72732E630000DB -S1132C70004000000020000002000000006000008E -S1132C80002000000300000000800000002000007D -S1132C900400000000A00000002000000500000067 -S1132CA000C00000002000000600000000E000005A -S1132CB000200000070000000000010000200000C8 -S1132CC008000000002001000020000009000000AE -S1132CD000400100002000000A0000000060010024 -S1132CE0002000000B000000008001000020000014 -S1132CF00C00000000A00100002000000D000000F6 -S1132D0000C00100002000000E00000000E00100EF -S1132D10002000000F0000000000020000800000FE -S1132D20100000000080020000800000110000007C -S1132D300000030000800000120000000080030077 -S1132D400080000013000000443A2F7573722F6650 -S1132D5065617365722F736F6674776172652F4F47 -S1132D6070656E424C542F5461726765742F4465CC -S1132D706D6F2F41524D434D335F4C4D33535F457F -S1132D804B5F4C4D3353363936355F43726F737333 -S1132D90776F726B732F426F6F742F6964652F2E78 -S1132DA02E2F2E2E2F2E2E2F2E2E2F536F75726315 -S1132DB0652F41524D434D335F4C4D33532F756155 -S1132DC072742E63000000004F70656E424C540014 -S1132DD0303132333435363738396162636465668D -S1132DE0303132333435363738394142434445463D +S113024048170000701B0000000000200000002080 +S1130250481700004817000048170000481700001E +S1130260481700004817000048170000481700000E +S11302706D1B000000000020E8040020E8040020BA +S10B028068050020890E00004E +S11302888C4AA0F58013811A013B4A4242EB0102D1 +S1130298012B8CBF134642F00103002B40F006816A +S11302A8854BC21A534243EB0203844A904208BF67 +S11302B843F00103002B40F0F980814B814AC3EBE2 +S11302C8000CDCF1000343EB0C03904208BF43F03D +S11302D80103002B40F0EA807B4B02F57852C11AE7 +S11302E84B4243EB0103904208BF43F00103002B48 +S11302F840F0DC80754BC21A534243EB0203744A44 +S1130308904208BF43F00103002B40F0CF80714BAB +S1130318C3EB000CDCF1000343EB0C030332904203 +S113032808BF43F00103002B40F0C0806A4BC11A98 +S11303384B4243EB01030C32904208BF43F00103E4 +S1130348002B40F0B380654BC3EB000CDCF10003D9 +S113035843EB0C033032904208BF43F00103002BF7 +S113036840F0A4805E4BC11A4B4243EB0103C032F8 +S1130378904208BF43F00103002B40F09780A0F19E +S11303884002534243EB0203B0F1102F08BF43F07D +S11303980103002B40F08A80524B534AC3EB000CF4 +S11303A8DCF1000343EB0C03904208BF43F0010364 +S11303B8002B7BD14D4B4E4AC11A4B4243EB0103F0 +S11303C8904208BF43F00103002B6FD1494BC21A76 +S11303D8534243EB0203B0F1101F08BF43F001037B +S11303E8002B63D1444B454AC3EB000CDCF10003FA +S11303F843EB0C03904208BF43F00103002B55D193 +S11304083F4BA2F5F072C11A4B4243EB01039042F1 +S113041808BF43F00103002B48D13A4B3A4AC3EBD7 +S1130428000CDCF1000343EB0C03904208BF43F0DB +S11304380103002B3AD1354BC11A4B4243EB01035C +S11304480332904208BF43F00103002B2ED1304BF6 +S1130458C21A534243EB02032E4A904208BF43F0A8 +S113046801031BBB2C4BC3EB000CDCF1000343EB77 +S11304780C030332904208BF43F00103B3B9A0F15F +S113048820214B42254A43EB0103904208BF43F025 +S113049801036BB9A0F10802534243EB0203204A5B +S11304A8904214BF184643F001007047012070477A +S11304B80120704700011000000210000004100021 +S11304C80001101000021010000410100050102039 +S11304D80100002002000020080000202000002065 +S11304E880000020004000100010101000011020AF +S11304F880000030100000300001001000020010DD +S1130508100000102000003001001010020010102C +S11305180800101001000010020000100100102053 +S11305280010100010B50446FFF7AAFE20B90948C8 +S11305384FF4FC7100F062FF220FA1B2C4F304442B +S113054811FA04F4044B53F822301A6814431C605B +S113055810BD00BFA4170000181800000138FDD111 +S1130568704700004A4B70B51A68044612F0E04F11 +S113057805D01A68474B1340B3F1805F02D1002CB1 +S1130588C0F284804449454A0B68166843F4006302 +S113059823F4800546F4006698070D60166001D5BB +S11305A8A10703D5EB0721D5E0071FD464F00303A3 +S11305B81D40394B002E1D600DDA06F07003A3F1BF +S11305C830014A4242EB0102702B14BF134642F039 +S11305D8010323B906E005F03003302B02D14FF4B0 +S11305E8805001E04FF40020FFF7B8FF25F45E5572 +S11305F843F2F073234025F070051D43284B294A24 +S11306083340294E402126401E4304F0080356EA8D +S1130618C306224B116002F108024BBF1E6015602D +S113062815601E601020FFF799FF204B25F0F86530 +S1130638234025F00305620045EA030526F0FC562D +S113064804F0FC5346EA030641BF194B26F480061E +S1130658234045F480054CBF1E4326F080462305FD +S11306680BD4144A4FF400431168480601D4013BE3 +S1130678FAD125F4006526F40066074B10201D60A6 +S113068810331E60BDE87040FFF768BF70BD00BF3F +S113069800E00F400000FF7060E00F4070E00F4082 +S11306A88FDFFF7F58E00F40302000800300C00731 +S11306B80000404050E00F40624B70B51A68103398 +S11306C81B68002BB4BF03F0700102F0300120292D +S11306D83BD004D871B1102940F0B28010E06029F1 +S11306E85FD070295AD0302908BF47F2305040F003 +S11306F8A7805CE05449C2F3841051F8200056E006 +S11307085249086810F0E04F4ED00C685048204019 +S1130718B0F1805F48D00C684D4820404D4CA04251 +S113072805D1096889B2022908BF4B483FD0474818 +S1130738474904682140494CA14218BF484836D16A +S11307480068474980B2444C23E04049086810F0E7 +S1130758E04F2BD00C683E482040B0F1805F25D094 +S11307680C683B4820403B4CA04205D1096889B23B +S1130778022908BF3B481AD0344835490468214047 +S1130788364CA14218BF384811D100683649354C57 +S113079880B200280CBF2046084608E04FF4004009 +S11307A805E04FF4800002E0304800E03048002BB8 +S11307B802DA13F4006F01E012F4006F28D12D4916 +S11307C8224D09682C6814F0E04F43F6E07401EAFE +S11307D804044FEA541405D02E681D4D3540B5F174 +S11307E8805F05D1023401F01F056043023504E03F +S11307F8604301F01F0501356D00B0FBF5F011F4FD +S1130808804F18BF4008090448BF800842F480029A +S1130818510216D5002B0DDA590005D51A0503D453 +S11308284000C3F3865301E0C3F3C5530133B0FB5F +S1130838F3F070BDC2F3C3520132B0FBF2F070BDE5 +S1130848002070BD60E00F404817000000E00F4032 +S11308580000FF7000000110001BB7000000031027 +S11308680024F400C0C62D0000093D00C0E1E400E6 +S11308787038390064E00F40A0F14022534243EB42 +S113088802033C4A904208BF43F00103002B6CD199 +S1130898394B02F58052C3EB000CDCF1000343EB47 +S11308A80C03904208BF43F00103002B5DD1334B86 +S11308B802F58052C11A4B4243EB0103904208BF30 +S11308C843F00103002B50D12D4B02F58052C3EBAA +S11308D8000CDCF1000343EB0C03904208BF43F027 +S11308E80103002B41D1274B02F58052C11A4B4218 +S11308F843EB0103904208BF43F00103002B34D1BA +S1130908214B02F58052C3EB000CDCF1000343EBEE +S11309180C03904208BF43F0010333BB1B4B02F5A1 +S11309288052C11A4B4243EB0103904208BF43F083 +S11309380103D3B9164B02F58052C3EB000CDCF16A +S1130948000343EB0C03904208BF43F0010373B95F +S1130958104B02F58052C11A4B4243EB01039042FB +S113096814BF184643F00100704701207047012066 +S1130978704700BF00800540005000400060004000 +S113098800700040004002400050024000600240F5 +S11309980070024000D0034070B504461646CDB23C +S11309A8FFF76AFF18B91048E42100F027FD022E6A +S11309B803D90D48E62100F021FDD4F8003416F0DF +S11309C8010F14BF2B43AB4304F580621360D4F8C2 +S11309D8202416F0020F04F5846314BF154322EA99 +S11309E805051D6070BD00BF24180000F0B504465D +S11309F815461F46CEB2FFF73FFF20B94E484FF4C5 +S1130A08DD7100F0FBFC6A1E2B1F18BF0123012AAD +S1130A1894BF002303F0010333B10C2D04D04648DE +S1130A284FF4DF7100F0EAFCB7F1080318BF0123A3 +S1130A380A2F0CBF002303F00103CBB1B7F10C0359 +S1130A4818BF0123092F0CBF002303F001037BB156 +S1130A58B7F10B0318BF01230D2F0CBF002303F0BC +S1130A6801032BB127B1344840F2C51100F0C6FC8C +S1130A78D4F8003515F0010F14BF3343B34304F51C +S1130A88A0621360D4F8042515F0020F04F5A063DE +S1130A9814BF3243B24303F104031A60D4F808358F +S1130AA815F0040F14BF3343B34304F5A162136074 +S1130AB8D4F8183515F0080F14BF3343B34304F5BD +S1130AC8A3621360D4F80C2517F0010F04F5A06392 +S1130AD814BF3243B24303F10C031A60D4F810353F +S1130AE817F0020F14BF3343B34304F5A262136033 +S1130AF8D4F8142517F0040F04F5A26314BF324385 +S1130B08B24303F104031A60D4F81C2517F0080F44 +S1130B1804F5A26303F10C0314BF3243B2431A6011 +S1130B28D4F8282504F5A5630FB9164301E022EA91 +S1130B3806061E60F0BD00BF2418000030B5044648 +S1130B48CDB2FFF799FE20B9084840F21F5100F0D2 +S1130B5855FC204629460222FFF71EFF2046294657 +S1130B6801220823BDE83040FFF740BF24180000E5 +S1130B78830510B5044603D00B48842100F03EFCDD +S1130B880A4B01221A6043F8144C094A143B0833EF +S1130B981A601A689207FCD4064B186810F0010012 +S1130BA818BF4FF0FF3010BD9318000014D00F4049 +S1130BB8020042A40CD00F402DE9F04105468807F5 +S1130BC80C46164603D02848C82100F017FCB10784 +S1130BD803D02548C92100F011FC244B01221A60D6 +S1130BE8234B1B68DA071ED4224B234F234824497E +S1130BF81A462EE024F07F03CCF8003007E0214B9E +S1130C080434434455F8048B043EC3F8008014F0BC +S1130C187C0801D13B680BB9002EF0D110600B6839 +S1130C28DB07FCD405E0184ADFF84CC0174F14481A +S1130C381146002EDED10EE03C6055F804CBC0F816 +S1130C4800C01960D2F800C01CF0010FFAD10434B6 +S1130C58043E002EF0D10E4B186810F0010018BFA6 +S1130C684FF0FF30BDE8F0819318000014D00F4016 +S1130C78A0E10F4008D00F4000D00F4004D00F402F +S1130C88010042A400D10F4020D00F4030D00F40C3 +S1130C980CD00F40094BC21A534243EB0203084AD3 +S1130CA8904208BF43F001032BB9064BC31A5842BC +S1130CB840EB030070470120704700BF00C00040AC +S1130CC800D0004000E0004010B50446FFF7E2FF02 +S1130CD820B908484FF4CF7100F090FBE36A43F061 +S1130CE81003E362236B43F4407343F0010323636B +S1130CF810BD00BF0619000010B50446FFF7CAFF6F +S1130D0820B909484FF4DF7100F078FBA36918078C +S1130D18FCD4E36A23F01003E362236B23F44073E7 +S1130D2823F00103236310BD06190000F0B504463F +S1130D380D4616461F46FFF7ADFF20B92C4840F272 +S1130D480D1100F05BFB26B929484FF4877100F0B8 +S1130D5855FB284B1A6812F0E04F1DD01968264A33 +S1130D680A40B2F1805F17D01968234A0A40234920 +S1130D788A4203D11B689BB2022B0DD01D4A1E4B1D +S1130D8811680B401E498B4208D113689BB2002B93 +S1130D980CBF1023082302E0102300E00823734348 +S1130DA89D4204D2124840F20F1100F027FB20465E +S1130DB8FFF7A2FF236BB5EB061F2BBF23F020031D +S1130DC843F020032363236338BF7608ED00B5FBA3 +S1130DD8F6F60136F3096362C6F345060023204696 +S1130DE8A662E762A361BDE8F040FFF76DBF00BFEC +S1130DF80619000000E00F400000FF700000011019 +S1130E080000031010B50446FFF744FF20B9064854 +S1130E1840F2E93100F0F2FAA36913F0200F14BF8D +S1130E280020012010BD00BF0619000010B50446BB +S1130E38FFF730FF20B9064840F2094100F0DEFA16 +S1130E48A369DB0654BF20684FF0FF3010BD00BF14 +S1130E580619000030B50446CDB2FFF71BFF20B9D0 +S1130E68064840F25B4100F0C9FAA369990602D426 +S1130E782560012030BD002030BD00BF06190000E8 +S1130E8800B50848FFF76EFB0748FFF74BFB4FF028 +S1130E9840200321FFF752FE00F0E0FA00F0E9FADF +S1130EA8FCE700BF8003C0010100002001483C2189 +S1130EB800F0A4BA7819000000B500F0DFF948B1D1 +S1130EC800F006FB044B4FF400521A6042F204038C +S1130ED81B6898475DF804FB08ED00E070B50C4604 +S1130EE895B2064607E014F8013B013D06F8013BBC +S1130EF800F001FBADB2002DF5D170BDFFF739B993 +S1130F0870B50C4D0646002400F0F5FA2B689E4295 +S1130F1809D36A689B189E4205D2064B0C2202FB31 +S1130F280434207A70BD01340C35132CECD1FF2025 +S1130F3870BD00BF041A00002DE9F14105460068A0 +S1130F48FFF7DEFFFF2818D000242F68261DAB59B1 +S1130F5804EB0708009300F0CEFA684641460422E1 +S1130F68FFF72AFE48B9E259009B9A4206D1B6F522 +S1130F78007F3446E9D1012000E00020BDE8F88173 +S1130F88114B30B5984204460D4606D0B1F5005FC2 +S1130F9805D0FFF7D1FF18B910E00C4C00E01C464F +S1130FA8EB050DD12368AB420BD0204640F8045B17 +S1130FB829464FF40072FFF791FF02E0044600E06F +S1130FC80024204630BD00BF000000200402002099 +S1130FD82DE9F0431FFA83F8036821F4FE770133FF +S1130FE804460D46164627F0030706D140F8047B4D +S1130FF839464FF40072FFF771FF2368BB4205D0EE +S113100820463946FFF7BCFF044610B3236840F274 +S1131018FF19ED1A0435651907F5007700F06BFA26 +S1131028231DEB1A4B4506D920463946FFF7A8FF7E +S1131038044680B1051D16F8013B08F1FF381FFA74 +S113104888F805F8013BB8F1000FE7D10120BDE8A5 +S1131058F083BDE8F083BDE8F0830000034A4FF055 +S1131068FF331360024A1360704700BF0402002074 +S11310780000002070B504460E461546FFF740FFF1 +S1131088FF2815D0601E8019FFF73AFFFF280FD0FC +S113109824F4FE7323F00303B3F5005F0CBF054883 +S11310A80548B3B221462A46BDE87040FFF790BF11 +S11310B8002070BD00000020040200202DE9F0414A +S11310C80E460446FFF71CFF013C0546A019FFF72E +S11310D817FFA5F1FF030746584240EB0300FF2F13 +S11310E808BF40F0010000285DD1BD425CD8002D46 +S11310F853D0132F58D82D4E0446B04600F0FBF9B0 +S113110898F80830AB4204D10C204443274B1C59AF +S113111806E00134132C08F10C08EFD14FF0FF342A +S1131128DFF88880002500F0E6F998F80830BB421B +S113113805D10C235D431D4B53F8058006E00135AA +S1131148132D08F10C08EED14FF0FF38002500F0FC +S1131158D2F9337ABB4205D1144B0C2202FB053574 +S11311686B6804E001350C36132DF0D10023C4EB71 +S11311780806F618C6F38F26002509E000F0BBF927 +S11311882046FFF7F5FC04F5806448B90135ADB293 +S1131198B542F3D30120BDE8F0812846BDE8F081CB +S11311A80020BDE8F0810020BDE8F081041A0000A9 +S11311B80F4B01B51A68013217D05A68996842F280 +S11311C8F0008918DA6889181A6989185A69891817 +S11311D89A698918DA698B185B4201AA42F8043DB6 +S11311E804216A46FFF746FF00E0012008BD00BF5E +S11311F80000002042F2040318684FF400531B68EF +S1131208C01842F208031B68C01842F20C031B689A +S1131218C01842F210031B68C01842F214031B687A +S1131228C01842F218031B68C01842F2F0031B6886 +S1131238C018D0F1010038BF002070470A4800B533 +S11312480368013302D0FFF777FE58B107480368F3 +S1131258013306D0FFF770FE003018BF01205DF897 +S113126804FB01205DF804FB0000002004020020B8 +S1131278FFF7F4BEFFF7FEBEFFF720BFFFF7BABFC4 +S113128800B5FFF795FF18B15DF804EBFFF7D6BF7B +S11312985DF804FB054B00224CF24F311A6059608B +S11312A805219A601960024B1A80704710E000E02B +S11312B808040020014B00221A60704710E000E087 +S11312C8044B1B68DB0303D5034B1A8801321A80CD +S11312D8704700BF10E000E00804002000B5FFF7E5 +S11312E8EFFF024B18885DF804FB00BF08040020D8 +S11312F800B50748FFF716F9FFF7DEF90146054878 +S11313084FF4614260235DF804EBFFF70FBD00BFA3 +S11313180100001000C0004070B5CDB2402D064653 +S113132803D91848572100F069F817482946FFF7E8 +S113133891FD40B101E000F0DEF81348FFF762FDCB +S11313480028F8D003E00F485A2100F057F8002489 +S113135814E000F0D0F8315D0B48FFF77BFD40B195 +S113136801E000F0C8F80848FFF74CFD0028F8D061 +S113137803E00448622100F041F80134A3B2AB420F +S1131388E7D370BDE81A000000C00040F0B5174C60 +S1131398064625785DB91648FFF748FD421C1FD05C +S11313A8144B187001232370134B1D7018E0124D51 +S11313B80F482F78FFF73AFD431C13D00D492B78BB +S11313C8CF19787001330A78DBB29A422B700BD1AB +S11313D830460131FFF782FD002323700120F0BD60 +S11313E82846F0BD0020F0BD0020F0BD4C040020CC +S11313F800C000400A0400204B040020034B00B541 +S11314081860034B196000F076F8FCE750040020DC +S11314185404002010B500F06BF801280FD0084CD4 +S11314282378012B0BD1FFF759FF312807D9002363 +S11314382370FFF73FFFBDE81040FFF73DBD10BD27 +S113144858040020044B012200B51A70FFF722FF4C +S11314585DF804EBFFF7DEBF5804002000B500F088 +S113146849F8FFF7EFFFFFF703FF5DF804EB00F01F +S113147809B800B500F03FF800F01AF85DF804EB7D +S1131488FFF7C8BF01B5FF238DF8003000238DF89E +S1131498013000F03BF8FFF72BFF044B1B78012BBE +S11314A802D1684600F050F808BD00BF5904002076 +S11314B800B50648FFF76AFF012804D103485DF820 +S11314C804EB00F041B85DF804FB00BF5A040020A7 +S11314D8704700B5C9B2FFF71FFF5DF804EB00F0D1 +S11314E82BB80000014B01221A70704759040020E0 +S11314F800F01AB870477047034BFE22DA700222D4 +S11315081871A3F8442070479C040020054B00225E +S11315181A709A6483F84320A3F844209A705A7086 +S1131528704700BF9C040020024B1878003018BF95 +S1131538012070479C040020024B002283F84320BA +S1131548704700BF9C04002070B503780546FF2B44 +S1131558784C0FD1E370102301220021237140231A +S113156822706272A27261706171A371E371217257 +S113157808227DE02678012E40F0DB80F32B40D052 +S113158811D8CF2B00F0B78005D8C92B77D0CC2B36 +S113159840F0BA80B6E0D12B00F0A7807CD3D22BE0 +S11315A840F0B28093E0FA2B47D006D8F52B0CD044 +S11315B811D3F62B40F0A8801FE0FD2B4ED0FE2B54 +S11315C859D0FC2B40F0A08046E042783F2A66D8E8 +S11315D8201DA16C06E043783F2B60D84168A164C4 +S11315E84278201DFFF77AFCFF23E3706A78A36C26 +S11315F8D318A3646B78013374E0FF23E370436862 +S113160848E0FF23E3700023A06C69681A4603E0EE +S11316181C5C01331219D2B28B42F9D1454B00211B +S1131628DA71120E9A7201221A7108221972597209 +S113163859719971A3F8442069E0FF23E3703E4B84 +S11316480722A364002323716371A3712372637255 +S1131658A372E271082345E0002056E0FF23627874 +S1131668E370002362712371A371E371237206226C +S1131678A4F844204BE00023237063703DE0421C2F +S11316883F21A06CFFF7F6FD00283BD0FF23E37051 +S1131698A36C3F33A36432E043783E2B01D9222064 +S11316A833E0FF23E370A4F84460417821B9FFF7DD +S11316B8E7FD00282BD125E01E4C821CA06CFFF707 +S11316C8D9FDF8B16A78A36CD318A3641FE0FF238B +S11316D8E3704022002323716371E3712372637200 +S11316E8A2710723A4F8443011E0A06C6968FFF7DD +S11316F8C3FD10B906E0FFF701FCFF23E370A4F86B +S1131708446004E0312000E02020FFF7F5FE094C96 +S113171894F84330012B02D11020FFF7EDFEB4F802 +S113172844100648012384F84330BDE87040FFF7AD +S1131738D0BE70BD9C040020651B00009F040020DF +S113174840420F0000201C0080841E0000802500F9 +S1131758999E36000040380000093D0000803E0094 +S113176800004B00404B4C0000204E00808D5B0075 +S113177800C05D000080700000127A0000007D0047 +S113178880969800001BB7000080BB00C0E8CE001C +S1131798647ADA000024F4000000FA00443A2F7551 +S11317A873722F6665617365722F736F66747761E0 +S11317B872652F4F70656E424C542F546172676581 +S11317C8742F44656D6F2F41524D434D335F4C4D1B +S11317D833535F454B5F4C4D3353363936355F438E +S11317E8726F7373776F726B732F426F6F742F6995 +S11317F864652F2E2E2F6C69622F64726976657268 +S11318086C69622F73797363746C2E630000000033 +S113181800E10F4004E10F4008E10F40443A2F75FE +S113182873722F6665617365722F736F667477615F +S113183872652F4F70656E424C542F546172676500 +S1131848742F44656D6F2F41524D434D335F4C4D9A +S113185833535F454B5F4C4D3353363936355F430D +S1131868726F7373776F726B732F426F6F742F6914 +S113187864652F2E2E2F6C69622F647269766572E7 +S11318886C69622F6770696F2E6300443A2F757311 +S1131898722F6665617365722F736F6674776172F0 +S11318A8652F4F70656E424C542F5461726765748E +S11318B82F44656D6F2F41524D434D335F4C4D336B +S11318C8535F454B5F4C4D3353363936355F43725E +S11318D86F7373776F726B732F426F6F742F6964B2 +S11318E8652F2E2E2F6C69622F6472697665726C6F +S11318F869622F666C6173686C69622E6300443A8E +S11319082F7573722F6665617365722F736F6674B2 +S1131918776172652F4F70656E424C542F54617213 +S11319286765742F44656D6F2F41524D434D335F86 +S11319384C4D33535F454B5F4C4D33533639363535 +S11319485F43726F7373776F726B732F426F6F7429 +S11319582F6964652F2E2E2F6C69622F6472697645 +S113196865726C69622F756172746C69622E6300AA +S1131978443A2F7573722F6665617365722F736F9E +S11319886674776172652F4F70656E424C542F549C +S113199861726765742F44656D6F2F41524D434DD5 +S11319A8335F4C4D33535F454B5F4C4D335336399E +S11319B836355F43726F7373776F726B732F426F31 +S11319C86F742F6964652F2E2E2F2E2E2F2E2E2FF7 +S11319D82E2E2F536F757263652F41524D434D332D +S11319E85F4C4D33532F43726F7373776F726B73FE +S11319F82F766563746F72732E63000000200000F5 +S1131A080020000001000000004000000020000049 +S1131A180200000000600000002000000300000035 +S1131A2800800000002000000400000000A0000066 +S1131A38002000000500000000C000000020000095 +S1131A480600000000E0000000200000070000007D +S1131A580000010000200000080000000020010030 +S1131A6800200000090000000040010000200000E0 +S1131A780A00000000600100002000000B000000C4 +S1131A8800800100002000000C00000000A00100FC +S1131A98002000000D00000000C00100002000002C +S1131AA80E00000000E00100002000000F0000000C +S1131AB80000020000800000100000000080020006 +S1131AC800800000110000000000030000800000F6 +S1131AD812000000008003000080000013000000D2 +S1131AE8443A2F7573722F6665617365722F736F2D +S1131AF86674776172652F4F70656E424C542F542B +S1131B0861726765742F44656D6F2F41524D434D63 +S1131B18335F4C4D33535F454B5F4C4D335336392C +S1131B2836355F43726F7373776F726B732F426FBF +S1131B386F742F6964652F2E2E2F2E2E2F2E2E2F85 +S1131B482E2E2F536F757263652F41524D434D33BB +S1131B585F4C4D33532F756172742E63004F70655B +S1081B686E424C540024 S903017B80 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzp b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzp index d3fb989f..2c8d6a34 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzp +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzs b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzs index b4bf8710..49b5b173 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzs +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/ide/lm3s6965_crossworks.hzs @@ -24,9 +24,9 @@ - - + + @@ -57,7 +57,8 @@ - + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.elf index 9f3eb495..d28b3493 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.map index 1ee9686a..e66d534e 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.map @@ -35,9 +35,9 @@ Discarded input sections .bss.interruptNesting 0x00000000 0x1 THUMB Debug/../../obj/irq.o .text.IrqInterruptDisable - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text.IrqInterruptRestore - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text 0x00000000 0x0 THUMB Debug/../../obj/led.o .data 0x00000000 0x0 THUMB Debug/../../obj/led.o .bss 0x00000000 0x0 THUMB Debug/../../obj/led.o @@ -57,89 +57,89 @@ Discarded input sections 0x00000000 0x4 THUMB Debug/../../obj/adc.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/adc.o .text.ADCIntRegister - 0x00000000 0x84 THUMB Debug/../../obj/adc.o + 0x00000000 0x9c THUMB Debug/../../obj/adc.o .text.ADCIntUnregister - 0x00000000 0x80 THUMB Debug/../../obj/adc.o - .text.ADCIntDisable - 0x00000000 0x74 THUMB Debug/../../obj/adc.o - .text.ADCIntEnable - 0x00000000 0x84 THUMB Debug/../../obj/adc.o - .text.ADCIntStatus - 0x00000000 0xbc THUMB Debug/../../obj/adc.o - .text.ADCIntClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceEnable - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceDisable - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceConfigure - 0x00000000 0x124 THUMB Debug/../../obj/adc.o - .text.ADCSequenceStepConfigure - 0x00000000 0x1a0 THUMB Debug/../../obj/adc.o - .text.ADCSequenceOverflow - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceOverflowClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceUnderflow - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceUnderflowClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceDataGet - 0x00000000 0xa4 THUMB Debug/../../obj/adc.o - .text.ADCProcessorTrigger - 0x00000000 0x7c THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleConfigure - 0x00000000 0xbc THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleStepConfigure - 0x00000000 0x188 THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleDataGet - 0x00000000 0x130 THUMB Debug/../../obj/adc.o - .text.ADCHardwareOversampleConfigure - 0x00000000 0xa8 THUMB Debug/../../obj/adc.o - .text.ADCComparatorConfigure - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCComparatorRegionSet - 0x00000000 0xb0 THUMB Debug/../../obj/adc.o - .text.ADCComparatorReset 0x00000000 0x98 THUMB Debug/../../obj/adc.o + .text.ADCIntDisable + 0x00000000 0x80 THUMB Debug/../../obj/adc.o + .text.ADCIntEnable + 0x00000000 0x90 THUMB Debug/../../obj/adc.o + .text.ADCIntStatus + 0x00000000 0xc8 THUMB Debug/../../obj/adc.o + .text.ADCIntClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceEnable + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceDisable + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceConfigure + 0x00000000 0x13c THUMB Debug/../../obj/adc.o + .text.ADCSequenceStepConfigure + 0x00000000 0x1b0 THUMB Debug/../../obj/adc.o + .text.ADCSequenceOverflow + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceOverflowClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceUnderflow + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceUnderflowClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceDataGet + 0x00000000 0xb0 THUMB Debug/../../obj/adc.o + .text.ADCProcessorTrigger + 0x00000000 0x88 THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleConfigure + 0x00000000 0xd0 THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleStepConfigure + 0x00000000 0x19c THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleDataGet + 0x00000000 0x144 THUMB Debug/../../obj/adc.o + .text.ADCHardwareOversampleConfigure + 0x00000000 0xb4 THUMB Debug/../../obj/adc.o + .text.ADCComparatorConfigure + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCComparatorRegionSet + 0x00000000 0xc8 THUMB Debug/../../obj/adc.o + .text.ADCComparatorReset + 0x00000000 0xa4 THUMB Debug/../../obj/adc.o .text.ADCComparatorIntDisable - 0x00000000 0x74 THUMB Debug/../../obj/adc.o + 0x00000000 0x80 THUMB Debug/../../obj/adc.o .text.ADCComparatorIntEnable - 0x00000000 0x70 THUMB Debug/../../obj/adc.o + 0x00000000 0x7c THUMB Debug/../../obj/adc.o .text.ADCComparatorIntStatus - 0x00000000 0x48 THUMB Debug/../../obj/adc.o - .text.ADCComparatorIntClear - 0x00000000 0x48 THUMB Debug/../../obj/adc.o - .text.ADCReferenceSet - 0x00000000 0x74 THUMB Debug/../../obj/adc.o - .text.ADCReferenceGet 0x00000000 0x4c THUMB Debug/../../obj/adc.o + .text.ADCComparatorIntClear + 0x00000000 0x50 THUMB Debug/../../obj/adc.o + .text.ADCReferenceSet + 0x00000000 0x80 THUMB Debug/../../obj/adc.o + .text.ADCReferenceGet + 0x00000000 0x50 THUMB Debug/../../obj/adc.o .text.ADCPhaseDelaySet - 0x00000000 0xb8 THUMB Debug/../../obj/adc.o + 0x00000000 0xc4 THUMB Debug/../../obj/adc.o .text.ADCPhaseDelayGet - 0x00000000 0x48 THUMB Debug/../../obj/adc.o + 0x00000000 0x4c THUMB Debug/../../obj/adc.o .text 0x00000000 0x0 THUMB Debug/../../obj/comp.o .data 0x00000000 0x0 THUMB Debug/../../obj/comp.o .bss 0x00000000 0x0 THUMB Debug/../../obj/comp.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/comp.o .text.ComparatorConfigure - 0x00000000 0x5c THUMB Debug/../../obj/comp.o - .text.ComparatorRefSet - 0x00000000 0x3c THUMB Debug/../../obj/comp.o - .text.ComparatorValueGet - 0x00000000 0x6c THUMB Debug/../../obj/comp.o - .text.ComparatorIntRegister - 0x00000000 0x80 THUMB Debug/../../obj/comp.o - .text.ComparatorIntUnregister - 0x00000000 0x80 THUMB Debug/../../obj/comp.o - .text.ComparatorIntEnable - 0x00000000 0x64 THUMB Debug/../../obj/comp.o - .text.ComparatorIntDisable 0x00000000 0x68 THUMB Debug/../../obj/comp.o + .text.ComparatorRefSet + 0x00000000 0x40 THUMB Debug/../../obj/comp.o + .text.ComparatorValueGet + 0x00000000 0x78 THUMB Debug/../../obj/comp.o + .text.ComparatorIntRegister + 0x00000000 0x98 THUMB Debug/../../obj/comp.o + .text.ComparatorIntUnregister + 0x00000000 0x98 THUMB Debug/../../obj/comp.o + .text.ComparatorIntEnable + 0x00000000 0x70 THUMB Debug/../../obj/comp.o + .text.ComparatorIntDisable + 0x00000000 0x74 THUMB Debug/../../obj/comp.o .text.ComparatorIntStatus - 0x00000000 0x7c THUMB Debug/../../obj/comp.o + 0x00000000 0x88 THUMB Debug/../../obj/comp.o .text.ComparatorIntClear - 0x00000000 0x54 THUMB Debug/../../obj/comp.o + 0x00000000 0x60 THUMB Debug/../../obj/comp.o .text 0x00000000 0x0 THUMB Debug/../../obj/cpu.o .data 0x00000000 0x0 THUMB Debug/../../obj/cpu.o .bss 0x00000000 0x0 THUMB Debug/../../obj/cpu.o @@ -157,107 +157,107 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/epi.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/epi.o .text.EPIModeSet - 0x00000000 0x64 THUMB Debug/../../obj/epi.o - .text.EPIDividerSet - 0x00000000 0x3c THUMB Debug/../../obj/epi.o - .text.EPIConfigSDRAMSet 0x00000000 0x70 THUMB Debug/../../obj/epi.o - .text.EPIConfigHB8Set - 0x00000000 0xa8 THUMB Debug/../../obj/epi.o - .text.EPIConfigHB16Set - 0x00000000 0xa8 THUMB Debug/../../obj/epi.o - .text.EPIConfigGPModeSet - 0x00000000 0xb0 THUMB Debug/../../obj/epi.o - .text.EPIAddressMapSet - 0x00000000 0x50 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadConfigure - 0x00000000 0xa0 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadStart - 0x00000000 0x78 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadStop - 0x00000000 0x60 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadCount - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadAvail - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet32 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet16 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet8 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPIFIFOConfig - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPIWriteFIFOCountGet - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPIIntEnable - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPIIntDisable - 0x00000000 0x60 THUMB Debug/../../obj/epi.o - .text.EPIIntStatus - 0x00000000 0x4c THUMB Debug/../../obj/epi.o - .text.EPIIntErrorStatus - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPIIntErrorClear - 0x00000000 0x50 THUMB Debug/../../obj/epi.o - .text.EPIIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/epi.o - .text.EPIIntUnregister + .text.EPIDividerSet 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIConfigSDRAMSet + 0x00000000 0x7c THUMB Debug/../../obj/epi.o + .text.EPIConfigHB8Set + 0x00000000 0xb4 THUMB Debug/../../obj/epi.o + .text.EPIConfigHB16Set + 0x00000000 0xb4 THUMB Debug/../../obj/epi.o + .text.EPIConfigGPModeSet + 0x00000000 0xc4 THUMB Debug/../../obj/epi.o + .text.EPIAddressMapSet + 0x00000000 0x5c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadConfigure + 0x00000000 0xb8 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadStart + 0x00000000 0x8c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadStop + 0x00000000 0x6c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadCount + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadAvail + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet32 + 0x00000000 0xc4 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet16 + 0x00000000 0xc8 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet8 + 0x00000000 0xc8 THUMB Debug/../../obj/epi.o + .text.EPIFIFOConfig + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPIWriteFIFOCountGet + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIIntEnable + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPIIntDisable + 0x00000000 0x6c THUMB Debug/../../obj/epi.o + .text.EPIIntStatus + 0x00000000 0x54 THUMB Debug/../../obj/epi.o + .text.EPIIntErrorStatus + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIIntErrorClear + 0x00000000 0x5c THUMB Debug/../../obj/epi.o + .text.EPIIntRegister + 0x00000000 0x70 THUMB Debug/../../obj/epi.o + .text.EPIIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/epi.o .text 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .data 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .bss 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/ethernet.o .text.EthernetInitExpClk - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o .text.EthernetConfigSet - 0x00000000 0xcc THUMB Debug/../../obj/ethernet.o + 0x00000000 0xd8 THUMB Debug/../../obj/ethernet.o .text.EthernetConfigGet - 0x00000000 0x68 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetMACAddrSet - 0x00000000 0xa8 THUMB Debug/../../obj/ethernet.o + 0x00000000 0xb4 THUMB Debug/../../obj/ethernet.o .text.EthernetMACAddrGet - 0x00000000 0xa4 THUMB Debug/../../obj/ethernet.o + 0x00000000 0xb0 THUMB Debug/../../obj/ethernet.o .text.EthernetEnable - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o .text.EthernetDisable - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketAvail - 0x00000000 0x48 THUMB Debug/../../obj/ethernet.o - .text.EthernetSpaceAvail 0x00000000 0x4c THUMB Debug/../../obj/ethernet.o + .text.EthernetSpaceAvail + 0x00000000 0x54 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGetInternal 0x00000000 0x1b0 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGetNonBlocking - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x9c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGet - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x98 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPutInternal 0x00000000 0x17c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPutNonBlocking - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x9c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPut - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x98 THUMB Debug/../../obj/ethernet.o .text.EthernetIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o .text.EthernetIntEnable - 0x00000000 0x60 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x6c THUMB Debug/../../obj/ethernet.o .text.EthernetIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetIntStatus - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o .text.EthernetIntClear - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x5c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYWrite - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x8c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYRead - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x88 THUMB Debug/../../obj/ethernet.o .text.EthernetPHYPowerOff - 0x00000000 0x30 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x3c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYPowerOn - 0x00000000 0x30 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x3c THUMB Debug/../../obj/ethernet.o .text 0x00000000 0x0 THUMB Debug/../../obj/flash.o .data 0x00000000 0x0 THUMB Debug/../../obj/flash.o .bss 0x00000000 0x0 THUMB Debug/../../obj/flash.o @@ -271,25 +271,25 @@ Discarded input sections 0x00000000 0x24 THUMB Debug/../../obj/flash.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/flash.o .text.FlashErase - 0x00000000 0x90 THUMB Debug/../../obj/flash.o + 0x00000000 0x94 THUMB Debug/../../obj/flash.o .text.FlashProgram - 0x00000000 0x17c THUMB Debug/../../obj/flash.o + 0x00000000 0x188 THUMB Debug/../../obj/flash.o .text.FlashProtectGet - 0x00000000 0x114 THUMB Debug/../../obj/flash.o + 0x00000000 0x11c THUMB Debug/../../obj/flash.o .text.FlashProtectSet - 0x00000000 0x23c THUMB Debug/../../obj/flash.o + 0x00000000 0x248 THUMB Debug/../../obj/flash.o .text.FlashProtectSave 0x00000000 0x98 THUMB Debug/../../obj/flash.o .text.FlashUserGet - 0x00000000 0x94 THUMB Debug/../../obj/flash.o + 0x00000000 0xa0 THUMB Debug/../../obj/flash.o .text.FlashUserSet 0x00000000 0x64 THUMB Debug/../../obj/flash.o .text.FlashUserSave 0x00000000 0xb0 THUMB Debug/../../obj/flash.o .text.FlashIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/flash.o + 0x00000000 0x30 THUMB Debug/../../obj/flash.o .text.FlashIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/flash.o + 0x00000000 0x24 THUMB Debug/../../obj/flash.o .text.FlashIntEnable 0x00000000 0x2c THUMB Debug/../../obj/flash.o .text.FlashIntDisable @@ -306,59 +306,59 @@ Discarded input sections .text.GPIOGetIntNumber 0x00000000 0x194 THUMB Debug/../../obj/gpio.o .text.GPIODirModeGet - 0x00000000 0x8c THUMB Debug/../../obj/gpio.o + 0x00000000 0xa0 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeSet - 0x00000000 0x110 THUMB Debug/../../obj/gpio.o + 0x00000000 0x124 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeGet - 0x00000000 0xb4 THUMB Debug/../../obj/gpio.o + 0x00000000 0xc8 THUMB Debug/../../obj/gpio.o .text.GPIOPadConfigGet - 0x00000000 0x164 THUMB Debug/../../obj/gpio.o + 0x00000000 0x174 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/gpio.o + 0x00000000 0x50 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/gpio.o + 0x00000000 0x54 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntStatus - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x5c THUMB Debug/../../obj/gpio.o .text.GPIOPinIntClear - 0x00000000 0x40 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOPortIntRegister - 0x00000000 0x48 THUMB Debug/../../obj/gpio.o + 0x00000000 0x64 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntUnregister - 0x00000000 0x44 THUMB Debug/../../obj/gpio.o + 0x00000000 0x60 THUMB Debug/../../obj/gpio.o .text.GPIOPinRead - 0x00000000 0x40 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeADC - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeCAN - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeComparator - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOInput - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutputOD - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2C - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypePWM - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeQEI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeSSI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeTimer - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBDigital - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBAnalog - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2S - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEthernetLED - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEPI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinConfigure - 0x00000000 0xe0 THUMB Debug/../../obj/gpio.o + 0x00000000 0xec THUMB Debug/../../obj/gpio.o .text 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o .data 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o .bss 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o @@ -372,53 +372,53 @@ Discarded input sections 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/hibernate.o .text.HibernateClockSelect - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x50 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCEnable 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCDisable 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateWakeSet - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x4c THUMB Debug/../../obj/hibernate.o .text.HibernateWakeGet 0x00000000 0x1c THUMB Debug/../../obj/hibernate.o .text.HibernateLowBatSet - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x50 THUMB Debug/../../obj/hibernate.o .text.HibernateLowBatGet 0x00000000 0x1c THUMB Debug/../../obj/hibernate.o .text.HibernateRTCSet - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCGet 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch0Set - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch0Get 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch1Set - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch1Get 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCTrimSet - 0x00000000 0x6c THUMB Debug/../../obj/hibernate.o + 0x00000000 0x80 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCTrimGet 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateDataSet - 0x00000000 0xac THUMB Debug/../../obj/hibernate.o + 0x00000000 0xc4 THUMB Debug/../../obj/hibernate.o .text.HibernateDataGet - 0x00000000 0x74 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x80 THUMB Debug/../../obj/hibernate.o .text.HibernateRequest 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/hibernate.o - .text.HibernateIntDisable 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + .text.HibernateIntDisable + 0x00000000 0x4c THUMB Debug/../../obj/hibernate.o .text.HibernateIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x30 THUMB Debug/../../obj/hibernate.o .text.HibernateIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateIntStatus 0x00000000 0x3c THUMB Debug/../../obj/hibernate.o .text.HibernateIntClear - 0x00000000 0x44 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o .text.HibernateIsActive 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text 0x00000000 0x0 THUMB Debug/../../obj/i2c.o @@ -426,121 +426,121 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/i2c.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/i2c.o .text.I2CMasterInitExpClk - 0x00000000 0xa0 THUMB Debug/../../obj/i2c.o + 0x00000000 0xac THUMB Debug/../../obj/i2c.o .text.I2CSlaveInit - 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o .text.I2CMasterEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveEnable - 0x00000000 0x5c THUMB Debug/../../obj/i2c.o - .text.I2CMasterDisable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveDisable - 0x00000000 0x5c THUMB Debug/../../obj/i2c.o - .text.I2CIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/i2c.o - .text.I2CIntUnregister 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + .text.I2CMasterDisable + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveDisable + 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + .text.I2CIntRegister + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o + .text.I2CIntUnregister + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o .text.I2CMasterIntEnable - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntEnableEx - 0x00000000 0x54 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CMasterIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntDisable 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntDisable + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntDisableEx - 0x00000000 0x58 THUMB Debug/../../obj/i2c.o - .text.I2CMasterIntStatus - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntStatus - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntStatusEx - 0x00000000 0xa8 THUMB Debug/../../obj/i2c.o - .text.I2CMasterIntClear - 0x00000000 0x54 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntClear - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntClearEx - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CMasterSlaveAddrSet - 0x00000000 0x6c THUMB Debug/../../obj/i2c.o - .text.I2CMasterBusy 0x00000000 0x5c THUMB Debug/../../obj/i2c.o + .text.I2CMasterIntStatus + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntStatus + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntStatusEx + 0x00000000 0xb0 THUMB Debug/../../obj/i2c.o + .text.I2CMasterIntClear + 0x00000000 0x5c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntClear + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntClearEx + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CMasterSlaveAddrSet + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o + .text.I2CMasterBusy + 0x00000000 0x60 THUMB Debug/../../obj/i2c.o .text.I2CMasterBusBusy - 0x00000000 0x58 THUMB Debug/../../obj/i2c.o + 0x00000000 0x60 THUMB Debug/../../obj/i2c.o .text.I2CMasterControl - 0x00000000 0x94 THUMB Debug/../../obj/i2c.o + 0x00000000 0xa0 THUMB Debug/../../obj/i2c.o .text.I2CMasterErr - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o .text.I2CMasterDataPut - 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CMasterDataGet - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveStatus - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveDataPut 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveStatus + 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveDataPut + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CSlaveDataGet - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o + 0x00000000 0x4c THUMB Debug/../../obj/i2c.o .text 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .data 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .bss 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/i2s.o .text.I2STxEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o .text.I2STxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o .text.I2STxDataPut - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + 0x00000000 0x4c THUMB Debug/../../obj/i2s.o .text.I2STxDataPutNonBlocking - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o .text.I2STxConfigSet - 0x00000000 0x8c THUMB Debug/../../obj/i2s.o + 0x00000000 0x98 THUMB Debug/../../obj/i2s.o .text.I2STxFIFOLimitSet - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x5c THUMB Debug/../../obj/i2s.o .text.I2STxFIFOLimitGet - 0x00000000 0x38 THUMB Debug/../../obj/i2s.o - .text.I2STxFIFOLevelGet - 0x00000000 0x38 THUMB Debug/../../obj/i2s.o - .text.I2SRxEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o - .text.I2SRxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2SRxDataGet - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o - .text.I2SRxDataGetNonBlocking - 0x00000000 0x58 THUMB Debug/../../obj/i2s.o - .text.I2SRxConfigSet - 0x00000000 0xd0 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLimitSet - 0x00000000 0x54 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLimitGet - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLevelGet - 0x00000000 0x3c THUMB Debug/../../obj/i2s.o - .text.I2STxRxEnable - 0x00000000 0x5c THUMB Debug/../../obj/i2s.o - .text.I2STxRxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2STxRxConfigSet - 0x00000000 0xf8 THUMB Debug/../../obj/i2s.o - .text.I2SMasterClockSelect - 0x00000000 0x68 THUMB Debug/../../obj/i2s.o - .text.I2SIntEnable - 0x00000000 0x60 THUMB Debug/../../obj/i2s.o - .text.I2SIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/i2s.o - .text.I2SIntStatus - 0x00000000 0x54 THUMB Debug/../../obj/i2s.o - .text.I2SIntClear - 0x00000000 0x5c THUMB Debug/../../obj/i2s.o - .text.I2SIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/i2s.o - .text.I2SIntUnregister 0x00000000 0x40 THUMB Debug/../../obj/i2s.o + .text.I2STxFIFOLevelGet + 0x00000000 0x40 THUMB Debug/../../obj/i2s.o + .text.I2SRxEnable + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o + .text.I2SRxDisable + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2SRxDataGet + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o + .text.I2SRxDataGetNonBlocking + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2SRxConfigSet + 0x00000000 0xdc THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLimitSet + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLimitGet + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLevelGet + 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + .text.I2STxRxEnable + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2STxRxDisable + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2STxRxConfigSet + 0x00000000 0x104 THUMB Debug/../../obj/i2s.o + .text.I2SMasterClockSelect + 0x00000000 0x74 THUMB Debug/../../obj/i2s.o + .text.I2SIntEnable + 0x00000000 0x6c THUMB Debug/../../obj/i2s.o + .text.I2SIntDisable + 0x00000000 0x70 THUMB Debug/../../obj/i2s.o + .text.I2SIntStatus + 0x00000000 0x5c THUMB Debug/../../obj/i2s.o + .text.I2SIntClear + 0x00000000 0x68 THUMB Debug/../../obj/i2s.o + .text.I2SIntRegister + 0x00000000 0x70 THUMB Debug/../../obj/i2s.o + .text.I2SIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/i2s.o .text 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .data 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .bss 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o @@ -552,54 +552,54 @@ Discarded input sections 0x00000000 0x8 THUMB Debug/../../obj/interrupt.o vtable 0x00000000 0x11c THUMB Debug/../../obj/interrupt.o .text.IntMasterDisable - 0x00000000 0x10 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x18 THUMB Debug/../../obj/interrupt.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/interrupt.o .text.IntRegister - 0x00000000 0xc4 THUMB Debug/../../obj/interrupt.o + 0x00000000 0xd0 THUMB Debug/../../obj/interrupt.o .text.IntUnregister - 0x00000000 0x3c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x44 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingSet - 0x00000000 0x48 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x4c THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingGet 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o .text.IntPrioritySet - 0x00000000 0x90 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x94 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGet - 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x58 THUMB Debug/../../obj/interrupt.o .text.IntEnable - 0x00000000 0xec THUMB Debug/../../obj/interrupt.o + 0x00000000 0xf0 THUMB Debug/../../obj/interrupt.o .text.IntDisable - 0x00000000 0xec THUMB Debug/../../obj/interrupt.o + 0x00000000 0xf0 THUMB Debug/../../obj/interrupt.o .text.IntPendSet - 0x00000000 0xcc THUMB Debug/../../obj/interrupt.o + 0x00000000 0xd0 THUMB Debug/../../obj/interrupt.o .text.IntPendClear - 0x00000000 0xac THUMB Debug/../../obj/interrupt.o + 0x00000000 0xb0 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskSet - 0x00000000 0x18 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x1c THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskGet - 0x00000000 0x10 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x14 THUMB Debug/../../obj/interrupt.o .text 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .data 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .bss 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/mpu.o .text.MPUEnable - 0x00000000 0x3c THUMB Debug/../../obj/mpu.o + 0x00000000 0x40 THUMB Debug/../../obj/mpu.o .text.MPUDisable 0x00000000 0x24 THUMB Debug/../../obj/mpu.o .text.MPURegionCountGet 0x00000000 0x20 THUMB Debug/../../obj/mpu.o .text.MPURegionEnable - 0x00000000 0x4c THUMB Debug/../../obj/mpu.o + 0x00000000 0x50 THUMB Debug/../../obj/mpu.o .text.MPURegionDisable - 0x00000000 0x4c THUMB Debug/../../obj/mpu.o + 0x00000000 0x50 THUMB Debug/../../obj/mpu.o .text.MPURegionSet - 0x00000000 0x84 THUMB Debug/../../obj/mpu.o + 0x00000000 0x90 THUMB Debug/../../obj/mpu.o .text.MPURegionGet - 0x00000000 0x80 THUMB Debug/../../obj/mpu.o + 0x00000000 0x90 THUMB Debug/../../obj/mpu.o .text.MPUIntRegister - 0x00000000 0x38 THUMB Debug/../../obj/mpu.o + 0x00000000 0x4c THUMB Debug/../../obj/mpu.o .text.MPUIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/mpu.o + 0x00000000 0x24 THUMB Debug/../../obj/mpu.o .text 0x00000000 0x0 THUMB Debug/../../obj/pwm.o .data 0x00000000 0x0 THUMB Debug/../../obj/pwm.o .bss 0x00000000 0x0 THUMB Debug/../../obj/pwm.o @@ -609,144 +609,144 @@ Discarded input sections 0x00000000 0x58 THUMB Debug/../../obj/pwm.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/pwm.o .text.PWMGenConfigure - 0x00000000 0xa8 THUMB Debug/../../obj/pwm.o + 0x00000000 0xbc THUMB Debug/../../obj/pwm.o .text.PWMGenPeriodSet - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xdc THUMB Debug/../../obj/pwm.o .text.PWMGenPeriodGet - 0x00000000 0x7c THUMB Debug/../../obj/pwm.o + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o .text.PWMGenEnable - 0x00000000 0x60 THUMB Debug/../../obj/pwm.o + 0x00000000 0x74 THUMB Debug/../../obj/pwm.o .text.PWMGenDisable - 0x00000000 0x60 THUMB Debug/../../obj/pwm.o + 0x00000000 0x74 THUMB Debug/../../obj/pwm.o .text.PWMPulseWidthSet - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xd4 THUMB Debug/../../obj/pwm.o .text.PWMPulseWidthGet - 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o + 0x00000000 0xb8 THUMB Debug/../../obj/pwm.o .text.PWMDeadBandEnable - 0x00000000 0xb4 THUMB Debug/../../obj/pwm.o + 0x00000000 0xd4 THUMB Debug/../../obj/pwm.o .text.PWMDeadBandDisable - 0x00000000 0x68 THUMB Debug/../../obj/pwm.o + 0x00000000 0x7c THUMB Debug/../../obj/pwm.o .text.PWMSyncUpdate - 0x00000000 0x50 THUMB Debug/../../obj/pwm.o + 0x00000000 0x5c THUMB Debug/../../obj/pwm.o .text.PWMSyncTimeBase - 0x00000000 0x54 THUMB Debug/../../obj/pwm.o - .text.PWMOutputState - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMOutputInvert - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMOutputFaultLevel - 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o - .text.PWMOutputFault - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntRegister - 0x00000000 0x78 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntUnregister - 0x00000000 0x74 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntRegister - 0x00000000 0x44 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntTrigEnable - 0x00000000 0x88 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntTrigDisable - 0x00000000 0x8c THUMB Debug/../../obj/pwm.o - .text.PWMGenIntStatus - 0x00000000 0x74 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntClear - 0x00000000 0x78 THUMB Debug/../../obj/pwm.o - .text.PWMIntEnable 0x00000000 0x60 THUMB Debug/../../obj/pwm.o - .text.PWMIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntClear - 0x00000000 0x3c THUMB Debug/../../obj/pwm.o - .text.PWMIntStatus - 0x00000000 0x4c THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntClearExt + .text.PWMOutputState + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMOutputInvert + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMOutputFaultLevel + 0x00000000 0xb8 THUMB Debug/../../obj/pwm.o + .text.PWMOutputFault + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntRegister + 0x00000000 0x98 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntUnregister + 0x00000000 0x94 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntRegister 0x00000000 0x54 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntTrigEnable + 0x00000000 0xa0 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntTrigDisable + 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntStatus + 0x00000000 0x84 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntClear + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMIntEnable + 0x00000000 0x6c THUMB Debug/../../obj/pwm.o + .text.PWMIntDisable + 0x00000000 0x70 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntClear + 0x00000000 0x40 THUMB Debug/../../obj/pwm.o + .text.PWMIntStatus + 0x00000000 0x54 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntClearExt + 0x00000000 0x60 THUMB Debug/../../obj/pwm.o .text.PWMGenFaultConfigure - 0x00000000 0xc8 THUMB Debug/../../obj/pwm.o + 0x00000000 0xec THUMB Debug/../../obj/pwm.o .text.PWMGenFaultTriggerSet - 0x00000000 0xf4 THUMB Debug/../../obj/pwm.o + 0x00000000 0x11c THUMB Debug/../../obj/pwm.o .text.PWMGenFaultTriggerGet - 0x00000000 0xb0 THUMB Debug/../../obj/pwm.o + 0x00000000 0xcc THUMB Debug/../../obj/pwm.o .text.PWMGenFaultStatus - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xd8 THUMB Debug/../../obj/pwm.o .text.PWMGenFaultClear - 0x00000000 0x100 THUMB Debug/../../obj/pwm.o + 0x00000000 0x128 THUMB Debug/../../obj/pwm.o .text 0x00000000 0x0 THUMB Debug/../../obj/qei.o .data 0x00000000 0x0 THUMB Debug/../../obj/qei.o .bss 0x00000000 0x0 THUMB Debug/../../obj/qei.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/qei.o .text.QEIEnable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIDisable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIConfigure - 0x00000000 0x5c THUMB Debug/../../obj/qei.o - .text.QEIPositionGet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIPositionSet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIDirectionGet - 0x00000000 0x58 THUMB Debug/../../obj/qei.o - .text.QEIErrorGet 0x00000000 0x50 THUMB Debug/../../obj/qei.o - .text.QEIVelocityEnable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIVelocityDisable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIVelocityConfigure - 0x00000000 0x90 THUMB Debug/../../obj/qei.o - .text.QEIVelocityGet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/qei.o - .text.QEIIntUnregister - 0x00000000 0x64 THUMB Debug/../../obj/qei.o - .text.QEIIntEnable + .text.QEIDisable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIConfigure + 0x00000000 0x60 THUMB Debug/../../obj/qei.o + .text.QEIPositionGet + 0x00000000 0x4c THUMB Debug/../../obj/qei.o + .text.QEIPositionSet + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIDirectionGet + 0x00000000 0x60 THUMB Debug/../../obj/qei.o + .text.QEIErrorGet 0x00000000 0x54 THUMB Debug/../../obj/qei.o - .text.QEIIntDisable + .text.QEIVelocityEnable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIVelocityDisable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIVelocityConfigure + 0x00000000 0xa0 THUMB Debug/../../obj/qei.o + .text.QEIVelocityGet + 0x00000000 0x4c THUMB Debug/../../obj/qei.o + .text.QEIIntRegister + 0x00000000 0x78 THUMB Debug/../../obj/qei.o + .text.QEIIntUnregister + 0x00000000 0x74 THUMB Debug/../../obj/qei.o + .text.QEIIntEnable 0x00000000 0x58 THUMB Debug/../../obj/qei.o - .text.QEIIntStatus + .text.QEIIntDisable 0x00000000 0x5c THUMB Debug/../../obj/qei.o + .text.QEIIntStatus + 0x00000000 0x60 THUMB Debug/../../obj/qei.o .text.QEIIntClear - 0x00000000 0x48 THUMB Debug/../../obj/qei.o + 0x00000000 0x50 THUMB Debug/../../obj/qei.o .text 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .data 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .bss 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/ssi.o .text.SSIConfigSetExpClk - 0x00000000 0x1ac THUMB Debug/../../obj/ssi.o + 0x00000000 0x1d0 THUMB Debug/../../obj/ssi.o .text.SSIEnable - 0x00000000 0x50 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIDisable - 0x00000000 0x50 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/ssi.o + 0x00000000 0x78 THUMB Debug/../../obj/ssi.o .text.SSIIntUnregister - 0x00000000 0x64 THUMB Debug/../../obj/ssi.o + 0x00000000 0x74 THUMB Debug/../../obj/ssi.o .text.SSIIntEnable - 0x00000000 0x54 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIIntDisable - 0x00000000 0x58 THUMB Debug/../../obj/ssi.o + 0x00000000 0x5c THUMB Debug/../../obj/ssi.o .text.SSIIntStatus - 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + 0x00000000 0x60 THUMB Debug/../../obj/ssi.o .text.SSIIntClear - 0x00000000 0x48 THUMB Debug/../../obj/ssi.o + 0x00000000 0x50 THUMB Debug/../../obj/ssi.o .text.SSIDataPut - 0x00000000 0x84 THUMB Debug/../../obj/ssi.o + 0x00000000 0x90 THUMB Debug/../../obj/ssi.o .text.SSIDataPutNonBlocking - 0x00000000 0x8c THUMB Debug/../../obj/ssi.o + 0x00000000 0x98 THUMB Debug/../../obj/ssi.o .text.SSIDataGet - 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + 0x00000000 0x64 THUMB Debug/../../obj/ssi.o .text.SSIDataGetNonBlocking - 0x00000000 0x68 THUMB Debug/../../obj/ssi.o + 0x00000000 0x6c THUMB Debug/../../obj/ssi.o .text.SSIDMAEnable - 0x00000000 0x54 THUMB Debug/../../obj/ssi.o - .text.SSIDMADisable 0x00000000 0x58 THUMB Debug/../../obj/ssi.o - .text.SSIBusy 0x00000000 0x54 THUMB Debug/../../obj/ssi.o + .text.SSIDMADisable + 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + .text.SSIBusy 0x00000000 0x5c THUMB Debug/../../obj/ssi.o .text 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .data 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .bss 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o @@ -763,27 +763,27 @@ Discarded input sections .text.SysCtlFlashSizeGet 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o .text.SysCtlPinPresent - 0x00000000 0x128 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x12c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralPresent - 0x00000000 0x98 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa4 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralReset - 0x00000000 0xd0 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xdc THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepEnable - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x7c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepEnable - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x7c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralClockGating 0x00000000 0x4c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x30 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntEnable 0x00000000 0x2c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntDisable @@ -793,31 +793,31 @@ Discarded input sections .text.SysCtlIntStatus 0x00000000 0x34 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOSet - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOGet 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOConfigSet - 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlReset 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlSleep - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlDeepSleep - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseGet 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseClear 0x00000000 0x30 THUMB Debug/../../obj/sysctl.o .text.SysCtlBrownOutConfigSet - 0x00000000 0x5c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x68 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockSet - 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa0 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockGet - 0x00000000 0x50 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlADCSpeedSet - 0x00000000 0x98 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa4 THUMB Debug/../../obj/sysctl.o .text.SysCtlADCSpeedGet - 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlIOSCVerificationSet 0x00000000 0x4c THUMB Debug/../../obj/sysctl.o .text.SysCtlMOSCVerificationSet @@ -827,22 +827,22 @@ Discarded input sections .text.SysCtlClkVerificationClear 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBEnable - 0x00000000 0xc0 THUMB Debug/../../obj/sysctl.o - .text.SysCtlGPIOAHBDisable 0x00000000 0xc4 THUMB Debug/../../obj/sysctl.o + .text.SysCtlGPIOAHBDisable + 0x00000000 0xc8 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLEnable 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLDisable 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlI2SMClkSet - 0x00000000 0x1cc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1d0 THUMB Debug/../../obj/sysctl.o .text 0x00000000 0x0 THUMB Debug/../../obj/systick.o .data 0x00000000 0x0 THUMB Debug/../../obj/systick.o .bss 0x00000000 0x0 THUMB Debug/../../obj/systick.o .text.SysTickIntRegister - 0x00000000 0x34 THUMB Debug/../../obj/systick.o + 0x00000000 0x38 THUMB Debug/../../obj/systick.o .text.SysTickIntUnregister - 0x00000000 0x28 THUMB Debug/../../obj/systick.o + 0x00000000 0x2c THUMB Debug/../../obj/systick.o .text.SysTickPeriodGet 0x00000000 0x1c THUMB Debug/../../obj/systick.o .text.SysTickValueGet @@ -854,132 +854,132 @@ Discarded input sections 0x00000000 0x58 THUMB Debug/../../obj/timer.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/timer.o .text.TimerEnable - 0x00000000 0x74 THUMB Debug/../../obj/timer.o - .text.TimerDisable - 0x00000000 0x78 THUMB Debug/../../obj/timer.o - .text.TimerConfigure - 0x00000000 0x154 THUMB Debug/../../obj/timer.o - .text.TimerControlLevel - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerControlTrigger - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerControlEvent 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerDisable + 0x00000000 0x88 THUMB Debug/../../obj/timer.o + .text.TimerConfigure + 0x00000000 0x16c THUMB Debug/../../obj/timer.o + .text.TimerControlLevel + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o + .text.TimerControlTrigger + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o + .text.TimerControlEvent + 0x00000000 0x98 THUMB Debug/../../obj/timer.o .text.TimerControlStall - 0x00000000 0x94 THUMB Debug/../../obj/timer.o + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o .text.TimerControlWaitOnTrigger - 0x00000000 0xcc THUMB Debug/../../obj/timer.o + 0x00000000 0xe0 THUMB Debug/../../obj/timer.o .text.TimerRTCEnable - 0x00000000 0x40 THUMB Debug/../../obj/timer.o - .text.TimerRTCDisable - 0x00000000 0x40 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleSet - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleGet - 0x00000000 0x70 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleMatchSet - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleMatchGet - 0x00000000 0x70 THUMB Debug/../../obj/timer.o - .text.TimerLoadSet - 0x00000000 0x80 THUMB Debug/../../obj/timer.o - .text.TimerLoadGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerValueGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerMatchSet - 0x00000000 0x80 THUMB Debug/../../obj/timer.o - .text.TimerMatchGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerIntRegister - 0x00000000 0xd4 THUMB Debug/../../obj/timer.o - .text.TimerIntUnregister - 0x00000000 0xd0 THUMB Debug/../../obj/timer.o - .text.TimerIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/timer.o - .text.TimerIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/timer.o - .text.TimerIntStatus 0x00000000 0x4c THUMB Debug/../../obj/timer.o + .text.TimerRTCDisable + 0x00000000 0x4c THUMB Debug/../../obj/timer.o + .text.TimerPrescaleSet + 0x00000000 0xac THUMB Debug/../../obj/timer.o + .text.TimerPrescaleGet + 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerPrescaleMatchSet + 0x00000000 0xac THUMB Debug/../../obj/timer.o + .text.TimerPrescaleMatchGet + 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerLoadSet + 0x00000000 0x90 THUMB Debug/../../obj/timer.o + .text.TimerLoadGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerValueGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerMatchSet + 0x00000000 0x90 THUMB Debug/../../obj/timer.o + .text.TimerMatchGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerIntRegister + 0x00000000 0x100 THUMB Debug/../../obj/timer.o + .text.TimerIntUnregister + 0x00000000 0xf8 THUMB Debug/../../obj/timer.o + .text.TimerIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/timer.o + .text.TimerIntDisable + 0x00000000 0x54 THUMB Debug/../../obj/timer.o + .text.TimerIntStatus + 0x00000000 0x58 THUMB Debug/../../obj/timer.o .text.TimerIntClear - 0x00000000 0x38 THUMB Debug/../../obj/timer.o + 0x00000000 0x44 THUMB Debug/../../obj/timer.o .text.TimerQuiesce - 0x00000000 0x10c THUMB Debug/../../obj/timer.o + 0x00000000 0x11c THUMB Debug/../../obj/timer.o .text 0x00000000 0x0 THUMB Debug/../../obj/uart.o .data 0x00000000 0x0 THUMB Debug/../../obj/uart.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uart.o .text.UARTParityModeSet - 0x00000000 0x74 THUMB Debug/../../obj/uart.o + 0x00000000 0x88 THUMB Debug/../../obj/uart.o .text.UARTParityModeGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o + 0x00000000 0x48 THUMB Debug/../../obj/uart.o .text.UARTFIFOLevelSet - 0x00000000 0x9c THUMB Debug/../../obj/uart.o + 0x00000000 0xb4 THUMB Debug/../../obj/uart.o .text.UARTFIFOLevelGet - 0x00000000 0x50 THUMB Debug/../../obj/uart.o - .text.UARTConfigGetExpClk - 0x00000000 0x8c THUMB Debug/../../obj/uart.o - .text.UARTFIFOEnable - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTFIFODisable - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTEnableSIR - 0x00000000 0x60 THUMB Debug/../../obj/uart.o - .text.UARTDisableSIR - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTSmartCardEnable - 0x00000000 0xe0 THUMB Debug/../../obj/uart.o - .text.UARTSmartCardDisable - 0x00000000 0xbc THUMB Debug/../../obj/uart.o - .text.UARTModemControlSet - 0x00000000 0xe8 THUMB Debug/../../obj/uart.o - .text.UARTModemControlClear - 0x00000000 0xec THUMB Debug/../../obj/uart.o - .text.UARTModemControlGet - 0x00000000 0xb8 THUMB Debug/../../obj/uart.o - .text.UARTModemStatusGet - 0x00000000 0xbc THUMB Debug/../../obj/uart.o - .text.UARTFlowControlSet - 0x00000000 0xdc THUMB Debug/../../obj/uart.o - .text.UARTFlowControlGet - 0x00000000 0xb8 THUMB Debug/../../obj/uart.o - .text.UARTTxIntModeSet - 0x00000000 0x64 THUMB Debug/../../obj/uart.o - .text.UARTTxIntModeGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o - .text.UARTCharsAvail - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTSpaceAvail - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTCharGet - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTCharPutNonBlocking - 0x00000000 0x54 THUMB Debug/../../obj/uart.o - .text.UARTCharPut - 0x00000000 0x48 THUMB Debug/../../obj/uart.o - .text.UARTBreakCtl 0x00000000 0x5c THUMB Debug/../../obj/uart.o - .text.UARTBusy - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTIntRegister - 0x00000000 0x6c THUMB Debug/../../obj/uart.o - .text.UARTIntUnregister - 0x00000000 0x68 THUMB Debug/../../obj/uart.o - .text.UARTIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/uart.o - .text.UARTIntStatus + .text.UARTConfigGetExpClk + 0x00000000 0x98 THUMB Debug/../../obj/uart.o + .text.UARTFIFOEnable 0x00000000 0x4c THUMB Debug/../../obj/uart.o - .text.UARTIntClear - 0x00000000 0x38 THUMB Debug/../../obj/uart.o - .text.UARTDMAEnable - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTDMADisable + .text.UARTFIFODisable + 0x00000000 0x4c THUMB Debug/../../obj/uart.o + .text.UARTEnableSIR + 0x00000000 0x6c THUMB Debug/../../obj/uart.o + .text.UARTDisableSIR + 0x00000000 0x4c THUMB Debug/../../obj/uart.o + .text.UARTSmartCardEnable + 0x00000000 0xf4 THUMB Debug/../../obj/uart.o + .text.UARTSmartCardDisable + 0x00000000 0xd0 THUMB Debug/../../obj/uart.o + .text.UARTModemControlSet + 0x00000000 0xf8 THUMB Debug/../../obj/uart.o + .text.UARTModemControlClear + 0x00000000 0xfc THUMB Debug/../../obj/uart.o + .text.UARTModemControlGet + 0x00000000 0xc4 THUMB Debug/../../obj/uart.o + .text.UARTModemStatusGet + 0x00000000 0xc8 THUMB Debug/../../obj/uart.o + .text.UARTFlowControlSet + 0x00000000 0xf4 THUMB Debug/../../obj/uart.o + .text.UARTFlowControlGet + 0x00000000 0xc8 THUMB Debug/../../obj/uart.o + .text.UARTTxIntModeSet + 0x00000000 0x74 THUMB Debug/../../obj/uart.o + .text.UARTTxIntModeGet 0x00000000 0x48 THUMB Debug/../../obj/uart.o + .text.UARTCharsAvail + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTSpaceAvail + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTCharGet + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTCharPutNonBlocking + 0x00000000 0x60 THUMB Debug/../../obj/uart.o + .text.UARTCharPut + 0x00000000 0x54 THUMB Debug/../../obj/uart.o + .text.UARTBreakCtl + 0x00000000 0x68 THUMB Debug/../../obj/uart.o + .text.UARTBusy + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTIntRegister + 0x00000000 0x84 THUMB Debug/../../obj/uart.o + .text.UARTIntUnregister + 0x00000000 0x80 THUMB Debug/../../obj/uart.o + .text.UARTIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTIntDisable + 0x00000000 0x54 THUMB Debug/../../obj/uart.o + .text.UARTIntStatus + 0x00000000 0x58 THUMB Debug/../../obj/uart.o + .text.UARTIntClear + 0x00000000 0x44 THUMB Debug/../../obj/uart.o + .text.UARTDMAEnable + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTDMADisable + 0x00000000 0x54 THUMB Debug/../../obj/uart.o .text.UARTRxErrorGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o + 0x00000000 0x48 THUMB Debug/../../obj/uart.o .text.UARTRxErrorClear - 0x00000000 0x38 THUMB Debug/../../obj/uart.o + 0x00000000 0x44 THUMB Debug/../../obj/uart.o .text 0x00000000 0x0 THUMB Debug/../../obj/udma.o .data 0x00000000 0x0 THUMB Debug/../../obj/udma.o .bss 0x00000000 0x0 THUMB Debug/../../obj/udma.o @@ -993,167 +993,167 @@ Discarded input sections 0x00000000 0x18 THUMB Debug/../../obj/udma.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/udma.o .text.uDMAChannelEnable - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelDisable - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelIsEnabled - 0x00000000 0x48 THUMB Debug/../../obj/udma.o + 0x00000000 0x50 THUMB Debug/../../obj/udma.o .text.uDMAControlBaseSet - 0x00000000 0x58 THUMB Debug/../../obj/udma.o + 0x00000000 0x64 THUMB Debug/../../obj/udma.o .text.uDMAControlBaseGet 0x00000000 0x18 THUMB Debug/../../obj/udma.o .text.uDMAControlAlternateBaseGet 0x00000000 0x18 THUMB Debug/../../obj/udma.o .text.uDMAChannelRequest - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeEnable - 0x00000000 0xbc THUMB Debug/../../obj/udma.o + 0x00000000 0xc8 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeDisable - 0x00000000 0xbc THUMB Debug/../../obj/udma.o + 0x00000000 0xc8 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeGet - 0x00000000 0xb8 THUMB Debug/../../obj/udma.o + 0x00000000 0xc0 THUMB Debug/../../obj/udma.o .text.uDMAChannelControlSet - 0x00000000 0x78 THUMB Debug/../../obj/udma.o - .text.uDMAChannelTransferSet - 0x00000000 0x1b0 THUMB Debug/../../obj/udma.o - .text.uDMAChannelScatterGatherSet - 0x00000000 0x110 THUMB Debug/../../obj/udma.o - .text.uDMAChannelSizeGet - 0x00000000 0x7c THUMB Debug/../../obj/udma.o - .text.uDMAChannelModeGet 0x00000000 0x84 THUMB Debug/../../obj/udma.o + .text.uDMAChannelTransferSet + 0x00000000 0x1d4 THUMB Debug/../../obj/udma.o + .text.uDMAChannelScatterGatherSet + 0x00000000 0x12c THUMB Debug/../../obj/udma.o + .text.uDMAChannelSizeGet + 0x00000000 0x88 THUMB Debug/../../obj/udma.o + .text.uDMAChannelModeGet + 0x00000000 0x90 THUMB Debug/../../obj/udma.o .text.uDMAChannelSelectSecondary 0x00000000 0x2c THUMB Debug/../../obj/udma.o .text.uDMAChannelSelectDefault 0x00000000 0x30 THUMB Debug/../../obj/udma.o .text.uDMAIntRegister - 0x00000000 0x54 THUMB Debug/../../obj/udma.o + 0x00000000 0x6c THUMB Debug/../../obj/udma.o .text.uDMAIntUnregister - 0x00000000 0x1c THUMB Debug/../../obj/udma.o + 0x00000000 0x28 THUMB Debug/../../obj/udma.o .text 0x00000000 0x0 THUMB Debug/../../obj/usb.o .data 0x00000000 0x0 THUMB Debug/../../obj/usb.o .bss 0x00000000 0x0 THUMB Debug/../../obj/usb.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/usb.o .text.USBIndexWrite - 0x00000000 0xbc THUMB Debug/../../obj/usb.o + 0x00000000 0xd0 THUMB Debug/../../obj/usb.o .text.USBIndexRead - 0x00000000 0xbc THUMB Debug/../../obj/usb.o - .text.USBHostSuspend - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBHostReset - 0x00000000 0x6c THUMB Debug/../../obj/usb.o - .text.USBHostResume - 0x00000000 0x6c THUMB Debug/../../obj/usb.o - .text.USBHostSpeedGet - 0x00000000 0x64 THUMB Debug/../../obj/usb.o - .text.USBIntStatus - 0x00000000 0xdc THUMB Debug/../../obj/usb.o - .text.USBIntDisable - 0x00000000 0x110 THUMB Debug/../../obj/usb.o - .text.USBIntEnable - 0x00000000 0xfc THUMB Debug/../../obj/usb.o - .text.USBIntDisableControl - 0x00000000 0xa4 THUMB Debug/../../obj/usb.o - .text.USBIntEnableControl - 0x00000000 0xa0 THUMB Debug/../../obj/usb.o - .text.USBIntStatusControl - 0x00000000 0xb4 THUMB Debug/../../obj/usb.o - .text.USBIntDisableEndpoint - 0x00000000 0x80 THUMB Debug/../../obj/usb.o - .text.USBIntEnableEndpoint - 0x00000000 0x74 THUMB Debug/../../obj/usb.o - .text.USBIntStatusEndpoint - 0x00000000 0x54 THUMB Debug/../../obj/usb.o - .text.USBIntRegister - 0x00000000 0x44 THUMB Debug/../../obj/usb.o - .text.USBIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/usb.o - .text.USBEndpointStatus 0x00000000 0xcc THUMB Debug/../../obj/usb.o - .text.USBHostEndpointStatusClear - 0x00000000 0x120 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStatusClear - 0x00000000 0x170 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointDataToggle - 0x00000000 0x184 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataToggleClear - 0x00000000 0xe8 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStall - 0x00000000 0x128 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStallClear - 0x00000000 0x168 THUMB Debug/../../obj/usb.o - .text.USBDevConnect - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBDevDisconnect - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBDevAddrSet - 0x00000000 0x38 THUMB Debug/../../obj/usb.o - .text.USBDevAddrGet - 0x00000000 0x38 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointConfig - 0x00000000 0x260 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointConfigSet - 0x00000000 0x1b4 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointConfigGet - 0x00000000 0x1f0 THUMB Debug/../../obj/usb.o - .text.USBFIFOConfigSet + .text.USBHostSuspend + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBHostReset + 0x00000000 0x70 THUMB Debug/../../obj/usb.o + .text.USBHostResume + 0x00000000 0x70 THUMB Debug/../../obj/usb.o + .text.USBHostSpeedGet + 0x00000000 0x6c THUMB Debug/../../obj/usb.o + .text.USBIntStatus + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o + .text.USBIntDisable 0x00000000 0x11c THUMB Debug/../../obj/usb.o + .text.USBIntEnable + 0x00000000 0x108 THUMB Debug/../../obj/usb.o + .text.USBIntDisableControl + 0x00000000 0xb0 THUMB Debug/../../obj/usb.o + .text.USBIntEnableControl + 0x00000000 0xac THUMB Debug/../../obj/usb.o + .text.USBIntStatusControl + 0x00000000 0xb8 THUMB Debug/../../obj/usb.o + .text.USBIntDisableEndpoint + 0x00000000 0x84 THUMB Debug/../../obj/usb.o + .text.USBIntEnableEndpoint + 0x00000000 0x78 THUMB Debug/../../obj/usb.o + .text.USBIntStatusEndpoint + 0x00000000 0x58 THUMB Debug/../../obj/usb.o + .text.USBIntRegister + 0x00000000 0x54 THUMB Debug/../../obj/usb.o + .text.USBIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/usb.o + .text.USBEndpointStatus + 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + .text.USBHostEndpointStatusClear + 0x00000000 0x12c THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStatusClear + 0x00000000 0x17c THUMB Debug/../../obj/usb.o + .text.USBHostEndpointDataToggle + 0x00000000 0x190 THUMB Debug/../../obj/usb.o + .text.USBEndpointDataToggleClear + 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStall + 0x00000000 0x138 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStallClear + 0x00000000 0x178 THUMB Debug/../../obj/usb.o + .text.USBDevConnect + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBDevDisconnect + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBDevAddrSet + 0x00000000 0x40 THUMB Debug/../../obj/usb.o + .text.USBDevAddrGet + 0x00000000 0x3c THUMB Debug/../../obj/usb.o + .text.USBHostEndpointConfig + 0x00000000 0x274 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointConfigSet + 0x00000000 0x1c0 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointConfigGet + 0x00000000 0x204 THUMB Debug/../../obj/usb.o + .text.USBFIFOConfigSet + 0x00000000 0x140 THUMB Debug/../../obj/usb.o .text.USBFIFOConfigGet - 0x00000000 0x124 THUMB Debug/../../obj/usb.o + 0x00000000 0x148 THUMB Debug/../../obj/usb.o .text.USBEndpointDMAEnable 0x00000000 0x78 THUMB Debug/../../obj/usb.o .text.USBEndpointDMADisable 0x00000000 0x78 THUMB Debug/../../obj/usb.o .text.USBEndpointDataAvail - 0x00000000 0xe0 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataGet - 0x00000000 0x138 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointDataAck - 0x00000000 0xe8 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointDataAck - 0x00000000 0xe0 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataPut - 0x00000000 0x10c THUMB Debug/../../obj/usb.o - .text.USBEndpointDataSend 0x00000000 0xec THUMB Debug/../../obj/usb.o + .text.USBEndpointDataGet + 0x00000000 0x144 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointDataAck + 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + .text.USBHostEndpointDataAck + 0x00000000 0xec THUMB Debug/../../obj/usb.o + .text.USBEndpointDataPut + 0x00000000 0x118 THUMB Debug/../../obj/usb.o + .text.USBEndpointDataSend + 0x00000000 0xf8 THUMB Debug/../../obj/usb.o .text.USBFIFOFlush - 0x00000000 0x148 THUMB Debug/../../obj/usb.o + 0x00000000 0x154 THUMB Debug/../../obj/usb.o .text.USBHostRequestIN - 0x00000000 0xc4 THUMB Debug/../../obj/usb.o + 0x00000000 0xd0 THUMB Debug/../../obj/usb.o .text.USBHostRequestStatus - 0x00000000 0x3c THUMB Debug/../../obj/usb.o + 0x00000000 0x40 THUMB Debug/../../obj/usb.o .text.USBHostAddrSet - 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + 0x00000000 0xe4 THUMB Debug/../../obj/usb.o .text.USBHostAddrGet - 0x00000000 0xd4 THUMB Debug/../../obj/usb.o + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o .text.USBHostHubAddrSet - 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + 0x00000000 0xe4 THUMB Debug/../../obj/usb.o .text.USBHostHubAddrGet - 0x00000000 0xd4 THUMB Debug/../../obj/usb.o + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o .text.USBHostPwrConfig - 0x00000000 0x84 THUMB Debug/../../obj/usb.o + 0x00000000 0x90 THUMB Debug/../../obj/usb.o .text.USBHostPwrFaultEnable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrFaultDisable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrEnable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrDisable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBFrameNumberGet - 0x00000000 0x3c THUMB Debug/../../obj/usb.o + 0x00000000 0x40 THUMB Debug/../../obj/usb.o .text.USBOTGSessionRequest - 0x00000000 0x6c THUMB Debug/../../obj/usb.o + 0x00000000 0x70 THUMB Debug/../../obj/usb.o .text.USBFIFOAddrGet 0x00000000 0x24 THUMB Debug/../../obj/usb.o .text.USBModeGet - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBEndpointDMAChannel - 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + 0x00000000 0x108 THUMB Debug/../../obj/usb.o .text.USBHostMode - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBDevMode - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBPHYPowerOff 0x00000000 0x2c THUMB Debug/../../obj/usb.o .text.USBPHYPowerOn @@ -1163,39 +1163,39 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/watchdog.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/watchdog.o .text.WatchdogRunning - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogResetEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogResetDisable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogLock - 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o .text.WatchdogUnlock - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogLockState - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogReloadSet - 0x00000000 0x40 THUMB Debug/../../obj/watchdog.o - .text.WatchdogReloadGet - 0x00000000 0x3c THUMB Debug/../../obj/watchdog.o - .text.WatchdogValueGet - 0x00000000 0x40 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntRegister - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntUnregister - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntStatus - 0x00000000 0x54 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntClear 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + .text.WatchdogReloadGet + 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + .text.WatchdogValueGet + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntRegister + 0x00000000 0x5c THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntUnregister + 0x00000000 0x58 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntStatus + 0x00000000 0x5c THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntClear + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o .text.WatchdogStallEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogStallDisable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) @@ -1756,9 +1756,9 @@ FLASH 0x00004000 0x0003c000 xr Linker script and memory map - 0x000061ac __do_debug_operation = __do_debug_operation_bkpt - 0x0000574c __vfprintf = __vfprintf_int_nwp - 0x00005cdc __vfscanf = __vfscanf_int + 0x00006348 __do_debug_operation = __do_debug_operation_bkpt + 0x000058e8 __vfprintf = __vfprintf_int_nwp + 0x00005e78 __vfscanf = __vfscanf_int 0xe000e000 __CM3_System_Control_Space_segment_start__ = 0xe000e000 0xe000f000 __CM3_System_Control_Space_segment_end__ = 0xe000f000 0x40020000 __Peripherals_segment_start__ = 0x40020000 @@ -1809,159 +1809,159 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .init is too large to fit in FLASH memory segment) 0x00004208 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x00004208 0x1fc4 +.text 0x00004208 0x2160 0x00004208 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs .glue_7t 0x00000000 0x0 linker stubs .text.BootActivate - 0x00004208 0x1c THUMB Debug/../../obj/boot.o + 0x00004208 0x24 THUMB Debug/../../obj/boot.o .text.BootComInit - 0x00004224 0x48 THUMB Debug/../../obj/boot.o - 0x00004224 BootComInit + 0x0000422c 0x64 THUMB Debug/../../obj/boot.o + 0x0000422c BootComInit .text.BootComCheckActivationRequest - 0x0000426c 0xc8 THUMB Debug/../../obj/boot.o - 0x0000426c BootComCheckActivationRequest + 0x00004290 0xdc THUMB Debug/../../obj/boot.o + 0x00004290 BootComCheckActivationRequest .text.UartReceiveByte - 0x00004334 0x3c THUMB Debug/../../obj/boot.o + 0x0000436c 0x44 THUMB Debug/../../obj/boot.o .text.IrqInterruptEnable - 0x00004370 0xc THUMB Debug/../../obj/irq.o - 0x00004370 IrqInterruptEnable - .text.LedInit 0x0000437c 0x38 THUMB Debug/../../obj/led.o - 0x0000437c LedInit + 0x000043b0 0x10 THUMB Debug/../../obj/irq.o + 0x000043b0 IrqInterruptEnable + .text.LedInit 0x000043c0 0x48 THUMB Debug/../../obj/led.o + 0x000043c0 LedInit .text.LedToggle - 0x000043b4 0x90 THUMB Debug/../../obj/led.o - 0x000043b4 LedToggle - .text.main 0x00004444 0x18 THUMB Debug/../../obj/main.o - 0x00004444 main - .text.Init 0x0000445c 0x20 THUMB Debug/../../obj/main.o + 0x00004408 0xa4 THUMB Debug/../../obj/led.o + 0x00004408 LedToggle + .text.main 0x000044ac 0x30 THUMB Debug/../../obj/main.o + 0x000044ac main + .text.Init 0x000044dc 0x38 THUMB Debug/../../obj/main.o .text.__error__ - 0x0000447c 0x24 THUMB Debug/../../obj/main.o - 0x0000447c __error__ + 0x00004514 0x24 THUMB Debug/../../obj/main.o + 0x00004514 __error__ .text.UnusedISR - 0x000044a0 0x8 THUMB Debug/../../obj/vectors.o - 0x000044a0 UnusedISR + 0x00004538 0x8 THUMB Debug/../../obj/vectors.o + 0x00004538 UnusedISR .text.TimeInit - 0x000044a8 0x34 THUMB Debug/../../obj/time.o - 0x000044a8 TimeInit + 0x00004540 0x50 THUMB Debug/../../obj/time.o + 0x00004540 TimeInit .text.TimeDeinit - 0x000044dc 0x10 THUMB Debug/../../obj/time.o - 0x000044dc TimeDeinit - .text.TimeSet 0x000044ec 0x20 THUMB Debug/../../obj/time.o - 0x000044ec TimeSet - .text.TimeGet 0x0000450c 0x18 THUMB Debug/../../obj/time.o - 0x0000450c TimeGet + 0x00004590 0x1c THUMB Debug/../../obj/time.o + 0x00004590 TimeDeinit + .text.TimeSet 0x000045ac 0x20 THUMB Debug/../../obj/time.o + 0x000045ac TimeSet + .text.TimeGet 0x000045cc 0x18 THUMB Debug/../../obj/time.o + 0x000045cc TimeGet .text.TimeISRHandler - 0x00004524 0x24 THUMB Debug/../../obj/time.o - 0x00004524 TimeISRHandler + 0x000045e4 0x24 THUMB Debug/../../obj/time.o + 0x000045e4 TimeISRHandler .text.CPUcpsie - 0x00004548 0xc THUMB Debug/../../obj/cpu.o - 0x00004548 CPUcpsie + 0x00004608 0xc THUMB Debug/../../obj/cpu.o + 0x00004608 CPUcpsie .text.GPIOBaseValid - 0x00004554 0x118 THUMB Debug/../../obj/gpio.o + 0x00004614 0x118 THUMB Debug/../../obj/gpio.o .text.GPIODirModeSet - 0x0000466c 0xbc THUMB Debug/../../obj/gpio.o - 0x0000466c GPIODirModeSet + 0x0000472c 0xcc THUMB Debug/../../obj/gpio.o + 0x0000472c GPIODirModeSet .text.GPIOPadConfigSet - 0x00004728 0x288 THUMB Debug/../../obj/gpio.o - 0x00004728 GPIOPadConfigSet + 0x000047f8 0x2a0 THUMB Debug/../../obj/gpio.o + 0x000047f8 GPIOPadConfigSet .text.GPIOPinWrite - 0x000049b0 0x44 THUMB Debug/../../obj/gpio.o - 0x000049b0 GPIOPinWrite + 0x00004a98 0x50 THUMB Debug/../../obj/gpio.o + 0x00004a98 GPIOPinWrite .text.GPIOPinTypeGPIOOutput - 0x000049f4 0x50 THUMB Debug/../../obj/gpio.o - 0x000049f4 GPIOPinTypeGPIOOutput + 0x00004ae8 0x68 THUMB Debug/../../obj/gpio.o + 0x00004ae8 GPIOPinTypeGPIOOutput .text.GPIOPinTypeUART - 0x00004a44 0x50 THUMB Debug/../../obj/gpio.o - 0x00004a44 GPIOPinTypeUART + 0x00004b50 0x68 THUMB Debug/../../obj/gpio.o + 0x00004b50 GPIOPinTypeUART .text.IntMasterEnable - 0x00004a94 0x10 THUMB Debug/../../obj/interrupt.o - 0x00004a94 IntMasterEnable + 0x00004bb8 0x18 THUMB Debug/../../obj/interrupt.o + 0x00004bb8 IntMasterEnable .text.SysCtlPeripheralValid - 0x00004aa4 0x288 THUMB Debug/../../obj/sysctl.o + 0x00004bd0 0x288 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralEnable - 0x00004d2c 0x70 THUMB Debug/../../obj/sysctl.o - 0x00004d2c SysCtlPeripheralEnable + 0x00004e58 0x7c THUMB Debug/../../obj/sysctl.o + 0x00004e58 SysCtlPeripheralEnable .text.SysCtlDelay - 0x00004d9c 0x8 THUMB Debug/../../obj/sysctl.o - 0x00004d9c SysCtlDelay + 0x00004ed4 0x8 THUMB Debug/../../obj/sysctl.o + 0x00004ed4 SysCtlDelay .text.SysCtlClockSet - 0x00004da4 0x274 THUMB Debug/../../obj/sysctl.o - 0x00004da4 SysCtlClockSet + 0x00004edc 0x28c THUMB Debug/../../obj/sysctl.o + 0x00004edc SysCtlClockSet .text.SysCtlClockGet - 0x00005018 0x370 THUMB Debug/../../obj/sysctl.o - 0x00005018 SysCtlClockGet + 0x00005168 0x370 THUMB Debug/../../obj/sysctl.o + 0x00005168 SysCtlClockGet .text.SysTickEnable - 0x00005388 0x24 THUMB Debug/../../obj/systick.o - 0x00005388 SysTickEnable + 0x000054d8 0x24 THUMB Debug/../../obj/systick.o + 0x000054d8 SysTickEnable .text.SysTickDisable - 0x000053ac 0x24 THUMB Debug/../../obj/systick.o - 0x000053ac SysTickDisable + 0x000054fc 0x24 THUMB Debug/../../obj/systick.o + 0x000054fc SysTickDisable .text.SysTickIntEnable - 0x000053d0 0x24 THUMB Debug/../../obj/systick.o - 0x000053d0 SysTickIntEnable + 0x00005520 0x24 THUMB Debug/../../obj/systick.o + 0x00005520 SysTickIntEnable .text.SysTickIntDisable - 0x000053f4 0x24 THUMB Debug/../../obj/systick.o - 0x000053f4 SysTickIntDisable + 0x00005544 0x24 THUMB Debug/../../obj/systick.o + 0x00005544 SysTickIntDisable .text.SysTickPeriodSet - 0x00005418 0x40 THUMB Debug/../../obj/systick.o - 0x00005418 SysTickPeriodSet + 0x00005568 0x44 THUMB Debug/../../obj/systick.o + 0x00005568 SysTickPeriodSet .text.UARTBaseValid - 0x00005458 0x4c THUMB Debug/../../obj/uart.o + 0x000055ac 0x4c THUMB Debug/../../obj/uart.o .text.UARTConfigSetExpClk - 0x000054a4 0x198 THUMB Debug/../../obj/uart.o - 0x000054a4 UARTConfigSetExpClk + 0x000055f8 0x1bc THUMB Debug/../../obj/uart.o + 0x000055f8 UARTConfigSetExpClk .text.UARTEnable - 0x0000563c 0x5c THUMB Debug/../../obj/uart.o - 0x0000563c UARTEnable + 0x000057b4 0x68 THUMB Debug/../../obj/uart.o + 0x000057b4 UARTEnable .text.UARTDisable - 0x00005698 0x6c THUMB Debug/../../obj/uart.o - 0x00005698 UARTDisable + 0x0000581c 0x78 THUMB Debug/../../obj/uart.o + 0x0000581c UARTDisable .text.UARTCharGetNonBlocking - 0x00005704 0x48 THUMB Debug/../../obj/uart.o - 0x00005704 UARTCharGetNonBlocking + 0x00005894 0x54 THUMB Debug/../../obj/uart.o + 0x00005894 UARTCharGetNonBlocking .text.libc.__vfprintf_int_nwp - 0x0000574c 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x0000574c __vfprintf_int_nwp + 0x000058e8 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) + 0x000058e8 __vfprintf_int_nwp .text.libc.__ungetc - 0x00005b40 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00005cdc 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.rd_int - 0x00005b60 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00005cfc 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.__vfscanf_int - 0x00005cdc 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x00005cdc __vfscanf_int + 0x00005e78 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00005e78 __vfscanf_int .text.libc.__getc - 0x000060c8 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000060c8 __getc + 0x00006264 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006264 __getc .text.libc.__putc - 0x000060f0 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000060f0 __putc + 0x0000628c 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x0000628c __putc .text.libc.isupper - 0x00006128 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006128 isupper + 0x000062c4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000062c4 isupper .text.libc.islower - 0x00006138 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006138 islower + 0x000062d4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000062d4 islower .text.libc.isdigit - 0x00006148 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006148 isdigit + 0x000062e4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000062e4 isdigit .text.libc.__digit - 0x00006158 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006158 __digit + 0x000062f4 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000062f4 __digit .text.libc.isspace - 0x00006194 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006194 isspace + 0x00006330 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006330 isspace .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x000061ac 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x000061ac __do_debug_operation_bkpt + 0x00006348 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x00006348 __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x000061c4 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000061c4 __debug_io_lock + 0x00006360 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00006360 __debug_io_lock .text.libc.__debug_io_unlock - 0x000061c8 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000061c8 __debug_io_unlock - 0x000061cc __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x000061cc __text_load_end__ = __text_end__ + 0x00006364 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00006364 __debug_io_unlock + 0x00006368 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00006368 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1969,65 +1969,65 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .text is too large to fit in FLASH memory segment) - 0x000061cc __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00006368 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x000061cc 0x0 - 0x000061cc __dtors_start__ = . +.dtors 0x00006368 0x0 + 0x00006368 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x000061cc __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x000061cc __dtors_load_end__ = __dtors_end__ + 0x00006368 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00006368 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .dtors is too large to fit in FLASH memory segment) - 0x000061cc __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00006368 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x000061cc 0x0 - 0x000061cc __ctors_start__ = . +.ctors 0x00006368 0x0 + 0x00006368 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x000061cc __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x000061cc __ctors_load_end__ = __ctors_end__ + 0x00006368 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00006368 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ctors is too large to fit in FLASH memory segment) - 0x000061cc __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00006368 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x000061cc 0x250 - 0x000061cc __rodata_start__ = . +.rodata 0x00006368 0x250 + 0x00006368 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) - .rodata 0x000061cc 0x70 THUMB Debug/../../obj/gpio.o + .rodata 0x00006368 0x70 THUMB Debug/../../obj/gpio.o .rodata.g_pulRCGCRegs - 0x0000623c 0xc THUMB Debug/../../obj/sysctl.o + 0x000063d8 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulXtals - 0x00006248 0x5c THUMB Debug/../../obj/sysctl.o - .rodata 0x000062a4 0x74 THUMB Debug/../../obj/sysctl.o - .rodata 0x00006318 0x74 THUMB Debug/../../obj/systick.o - .rodata 0x0000638c 0x70 THUMB Debug/../../obj/uart.o + 0x000063e4 0x5c THUMB Debug/../../obj/sysctl.o + .rodata 0x00006440 0x74 THUMB Debug/../../obj/sysctl.o + .rodata 0x000064b4 0x74 THUMB Debug/../../obj/systick.o + .rodata 0x00006528 0x70 THUMB Debug/../../obj/uart.o .rodata.libc.__hex_lc - 0x000063fc 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000063fc __hex_lc + 0x00006598 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00006598 __hex_lc .rodata.libc.__hex_uc - 0x0000640c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000640c __hex_uc - 0x0000641c __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x0000641c __rodata_load_end__ = __rodata_end__ + 0x000065a8 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000065a8 __hex_uc + 0x000065b8 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x000065b8 __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .rodata is too large to fit in FLASH memory segment) - 0x0000641c __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x000065b8 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x0000641c 0x0 - 0x0000641c __ARM.exidx_start__ = . - 0x0000641c __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x000065b8 0x0 + 0x000065b8 __ARM.exidx_start__ = . + 0x000065b8 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x0000641c __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x0000641c __exidx_end = __ARM.exidx_end__ - 0x0000641c __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x000065b8 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x000065b8 __exidx_end = __ARM.exidx_end__ + 0x000065b8 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x0000641c __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x000065b8 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x0000641c +.fast 0x20000000 0x0 load address 0x000065b8 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x0000641c __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x000065b8 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x40000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -2036,13 +2036,13 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __SRAM_segment_start__) && (__fast_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .fast_run is too large to fit in SRAM memory segment) - 0x0000641c __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x000065b8 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x0 load address 0x0000641c +.data 0x20000000 0x0 load address 0x000065b8 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x20000000 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x0000641c __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x000065b8 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x40000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x20000000 0x0 @@ -2127,14 +2127,14 @@ Linker script and memory map 0x200001e4 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) 0x200001e4 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __SRAM_segment_start__) && (__tbss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tbss is too large to fit in SRAM memory segment) - 0x0000641c __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x000065b8 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x200001e4 0x0 load address 0x0000641c +.tdata 0x200001e4 0x0 load address 0x000065b8 0x200001e4 __tdata_start__ = . *(.tdata .tdata.*) 0x200001e4 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x0000641c __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x0000641c __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x000065b8 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x000065b8 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x40000))), error: .tdata is too large to fit in FLASH memory segment) .tdata_run 0x200001e4 0x0 @@ -2425,40 +2425,40 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossw .debug_ranges 0x000012a0 0x4c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) .debug_ranges 0x00001760 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_line 0x00000000 0x7bb5 - .debug_line 0x00000000 0xe2 THUMB Debug/../../obj/boot.o - .debug_line 0x000000e2 0xeb THUMB Debug/../../obj/cstart.o - .debug_line 0x000001cd 0xb9 THUMB Debug/../../obj/irq.o - .debug_line 0x00000286 0xb1 THUMB Debug/../../obj/led.o - .debug_line 0x00000337 0xcd THUMB Debug/../../obj/main.o - .debug_line 0x00000404 0x98 THUMB Debug/../../obj/vectors.o - .debug_line 0x0000049c 0xde THUMB Debug/../../obj/time.o - .debug_line 0x0000057a 0x7a7 THUMB Debug/../../obj/adc.o - .debug_line 0x00000d21 0x231 THUMB Debug/../../obj/comp.o - .debug_line 0x00000f52 0x109 THUMB Debug/../../obj/cpu.o - .debug_line 0x0000105b 0x518 THUMB Debug/../../obj/epi.o - .debug_line 0x00001573 0x4b3 THUMB Debug/../../obj/ethernet.o - .debug_line 0x00001a26 0x396 THUMB Debug/../../obj/flash.o - .debug_line 0x00001dbc 0x783 THUMB Debug/../../obj/gpio.o - .debug_line 0x0000253f 0x3a0 THUMB Debug/../../obj/hibernate.o - .debug_line 0x000028df 0x54a THUMB Debug/../../obj/i2c.o - .debug_line 0x00002e29 0x425 THUMB Debug/../../obj/i2s.o - .debug_line 0x0000324e 0x2d8 THUMB Debug/../../obj/interrupt.o - .debug_line 0x00003526 0x182 THUMB Debug/../../obj/mpu.o - .debug_line 0x000036a8 0x6ef THUMB Debug/../../obj/pwm.o - .debug_line 0x00003d97 0x372 THUMB Debug/../../obj/qei.o - .debug_line 0x00004109 0x3ff THUMB Debug/../../obj/ssi.o - .debug_line 0x00004508 0x7f3 THUMB Debug/../../obj/sysctl.o - .debug_line 0x00004cfb 0x142 THUMB Debug/../../obj/systick.o - .debug_line 0x00004e3d 0x6cc THUMB Debug/../../obj/timer.o - .debug_line 0x00005509 0x74a THUMB Debug/../../obj/uart.o - .debug_line 0x00005c53 0x421 THUMB Debug/../../obj/udma.o - .debug_line 0x00006074 0x1180 THUMB Debug/../../obj/usb.o - .debug_line 0x000071f4 0x315 THUMB Debug/../../obj/watchdog.o - .debug_line 0x00007509 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_line 0x0000757e 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_line 0x000075f2 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_line 0x00007b41 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_line 0x00000000 0x7bbb + .debug_line 0x00000000 0xe3 THUMB Debug/../../obj/boot.o + .debug_line 0x000000e3 0xeb THUMB Debug/../../obj/cstart.o + .debug_line 0x000001ce 0xb9 THUMB Debug/../../obj/irq.o + .debug_line 0x00000287 0xb1 THUMB Debug/../../obj/led.o + .debug_line 0x00000338 0xcd THUMB Debug/../../obj/main.o + .debug_line 0x00000405 0x98 THUMB Debug/../../obj/vectors.o + .debug_line 0x0000049d 0xdf THUMB Debug/../../obj/time.o + .debug_line 0x0000057c 0x7a7 THUMB Debug/../../obj/adc.o + .debug_line 0x00000d23 0x231 THUMB Debug/../../obj/comp.o + .debug_line 0x00000f54 0x109 THUMB Debug/../../obj/cpu.o + .debug_line 0x0000105d 0x518 THUMB Debug/../../obj/epi.o + .debug_line 0x00001575 0x4b3 THUMB Debug/../../obj/ethernet.o + .debug_line 0x00001a28 0x396 THUMB Debug/../../obj/flash.o + .debug_line 0x00001dbe 0x783 THUMB Debug/../../obj/gpio.o + .debug_line 0x00002541 0x3a0 THUMB Debug/../../obj/hibernate.o + .debug_line 0x000028e1 0x54a THUMB Debug/../../obj/i2c.o + .debug_line 0x00002e2b 0x425 THUMB Debug/../../obj/i2s.o + .debug_line 0x00003250 0x2d8 THUMB Debug/../../obj/interrupt.o + .debug_line 0x00003528 0x182 THUMB Debug/../../obj/mpu.o + .debug_line 0x000036aa 0x6ef THUMB Debug/../../obj/pwm.o + .debug_line 0x00003d99 0x372 THUMB Debug/../../obj/qei.o + .debug_line 0x0000410b 0x3ff THUMB Debug/../../obj/ssi.o + .debug_line 0x0000450a 0x7f3 THUMB Debug/../../obj/sysctl.o + .debug_line 0x00004cfd 0x142 THUMB Debug/../../obj/systick.o + .debug_line 0x00004e3f 0x6cc THUMB Debug/../../obj/timer.o + .debug_line 0x0000550b 0x74a THUMB Debug/../../obj/uart.o + .debug_line 0x00005c55 0x421 THUMB Debug/../../obj/udma.o + .debug_line 0x00006076 0x1184 THUMB Debug/../../obj/usb.o + .debug_line 0x000071fa 0x315 THUMB Debug/../../obj/watchdog.o + .debug_line 0x0000750f 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) + .debug_line 0x00007584 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + .debug_line 0x000075f8 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + .debug_line 0x00007b47 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .debug_str 0x00000000 0x4372 .debug_str 0x00000000 0x12d THUMB Debug/../../obj/boot.o diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.srec index fb6e14e9..bc292043 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.srec +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/bin/demoprog_ek_lm3s6965.srec @@ -1,19 +1,19 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S1134000E401002097410000A1440000A144000005 -S1134010A1440000A1440000A1440000A144000008 -S1134020A1440000A1440000A1440000A1440000F8 -S1134030A1440000A1440000A14400002545000063 -S1134040A1440000A1440000A1440000A1440000D8 -S1134050A1440000A1440000A1440000A1440000C8 -S1134060A1440000A1440000A1440000A1440000B8 -S1134070A1440000A1440000A1440000A1440000A8 -S1134080A1440000A1440000A1440000A144000098 -S1134090A1440000A1440000A1440000A144000088 -S11340A0A1440000A1440000A1440000A144000078 -S11340B0A1440000A1440000A1440000A144000068 -S11340C0A1440000A1440000A1440000A144000058 -S11340D0A1440000A1440000A1440000A144000048 -S11340E0A1440000A1440000A1440000A144000038 +S1134000E4010020974100003945000039450000D3 +S113401039450000394500003945000039450000A4 +S11340203945000039450000394500003945000094 +S1134030394500003945000039450000E5450000D8 +S11340403945000039450000394500003945000074 +S11340503945000039450000394500003945000064 +S11340603945000039450000394500003945000054 +S11340703945000039450000394500003945000044 +S11340803945000039450000394500003945000034 +S11340903945000039450000394500003945000024 +S11340A03945000039450000394500003945000014 +S11340B03945000039450000394500003945000004 +S11340C039450000394500003945000039450000F4 +S11340D039450000394500003945000039450000E4 +S11340E039450000394500003945000039450000D4 S10740F0EE11AA55CA S11340F42A498D462A482B492B4A00F039F82B4883 S11341042B492C4A00F034F82B482C492C4A00F053 @@ -26,557 +26,582 @@ S113416400208646EC4600200021234A9047FEE7BF S1134174884207D0521A05D0037801300B700131FC S1134184013AF9D17047884202D002700130FAE74B S113419470471A481A490160AAE70000E4010020A4 -S11341A41C640000000000200000002008420000FD -S11341B408420000CC6100001C64000000000020E0 -S11341C400000020CC610000CC610000CC61000040 -S11341D4CC610000CC610000CC610000CC61000023 -S11341E4CC6100001C640000000000206400002076 -S11341F464000020E40000204544000008ED00E0D1 +S11341A4B865000000000020000000200842000060 +S11341B40842000068630000B865000000000020A5 +S11341C40000002068630000686300006863000066 +S11341D468630000686300006863000068630000AB +S11341E468630000B865000000000020640000203B +S11341F464000020E4000020AD44000008ED00E069 S10742040040000072 -S113420880B581B000AF00F065F94FF0F1033B6071 -S11342183B68984707F10407BD4680BD80B500AFE9 -S11342284FF00100C1F2000000F07CFD4FF00100E6 -S1134238C2F2000000F076FD4FF040204FF0030179 -S113424800F0FCFB00F0E4FE03464FF44040C4F2E7 -S1134258000019464FF461424FF0600301F01EF963 -S113426880BD00BF80B500AF40F20003C2F2000376 -S11342781B78002B17D140F20400C2F2000000F0B2 -S113428855F80346012B50D140F20003C2F2000353 -S11342984FF001021A7040F24803C2F200034FF0D3 -S11342A800021A7041E040F24803C2F200031B788E -S11342B803F1010240F20403C2F20003D3181846C2 -S11342C800F034F80346012B2FD140F24803C2F220 -S11342D800031B7803F10103DAB240F24803C2F287 -S11342E800031A7040F20403C2F200031A7840F281 -S11342F84803C2F200031B789A4216D140F2000325 -S1134308C2F200034FF000021A7040F20403C2F232 -S113431800035B78FF2B08D140F20403C2F20003C8 -S11343289B78002B01D1FFF76BFF80BD80B582B06D -S113433800AF38604FF44040C4F2000001F0DEF9E9 -S113434803467B607B68B3F1FF3F06D07B68DAB233 -S11343583B681A704FF0010301E04FF00003184660 -S113436807F10807BD4680BD80B500AF00F08EFB9D -S113437880BD00BF80B500AF4FF02000C2F200003E -S113438800F0D0FC4FF4A040C4F202004FF0010149 -S113439800F02CFB4FF4A040C4F202004FF00101DE -S11343A84FF0000200F000FB80BD00BF80B581B073 -S11343B800AF00F0A7F803463B6040F24C03C2F29A -S11343C800031B683A68D21A40F2F3139A4230D9B0 -S11343D840F25003C2F200031B78002B11D140F2C3 -S11343E85003C2F200034FF001021A704FF4A040C8 -S11343F8C4F202004FF001014FF0010200F0D4FAB8 -S113440810E040F25003C2F200034FF000021A70A9 -S11344184FF4A040C4F202004FF001014FF0000233 -S113442800F0C2FA40F24C03C2F200033A681A6080 -S113443800E000BF07F10407BD4680BD80B500AFAA -S113444800F008F8FFF7EAFEFFF7B0FFFFF70AFFEE -S1134458FAE700BF80B500AF4FF46070C0F2C01037 -S113446800F09CFCFFF786FF00F01AF8FFF77CFFCA -S113447880BD00BF80B482B000AF7860396040F27C -S11344885403C2F200037A681A6040F25803C2F275 -S113449800033A681A60FEE780B400AFFEE700BF85 -S11344A880B500AF00F0B4FD024644F6D353C1F220 -S11344B86203A3FB02134FEA9313184600F0A8FF04 -S11344C800F05EFF00F080FF4FF0000000F00AF8F3 -S11344D880BD00BF80B500AF00F088FF00F062FF28 -S11344E880BD00BF80B481B000AF386040F25C0387 -S11344F8C2F200033A681A6007F10407BD4680BC9B -S1134508704700BF80B400AF40F25C03C2F20003FE -S11345181B681846BD4680BC704700BF80B400AF16 -S113452840F25C03C2F200031B6803F1010240F28B -S11345385C03C2F200031A60BD4680BC704700BF2A -S1134548EFF3108062B670472346184680B481B0F2 -S113455800AF38603B68B3F1402F76D03A684FF427 -S11345680043C4F205039A426FD03A684FF4A0435B -S1134578C4F200039A4268D03A684FF41043C4F274 -S113458805039A4261D03A684FF4C043C4F2000369 -S11345989A425AD03A684FF42043C4F205039A4227 -S11345A853D03A684FF4E043C4F200039A424CD023 -S11345B83A684FF43043C4F205039A4245D03A6846 -S11345C84FF48043C4F202039A423ED03A684FF44F -S11345D84043C4F205039A4237D03A684FF4A043E3 -S11345E8C4F202039A4230D03A684FF45043C4F2FA -S11345F805039A4229D03A684FF4C043C4F202032F -S11346089A4222D03A684FF46043C4F205039A42AE -S11346181BD03A684FF4E043C4F202039A4214D020 -S11346283A684FF47043C4F205039A420DD03A68CD -S11346384FF45043C4F203039A4206D03A684FF049 -S11346480003C4F206039A4202D14FF0010301E0C9 -S11346584FF00003DBB2184607F10407BD4680BCDF -S1134668704700BF80B583B000AFB8600B463A60AE -S11346783B71B868FFF76AFF0346002B07D146F27F -S1134688CC10C0F200004FF0E401FFF7F3FE3B68E2 -S1134698002B0DD03B68012B0AD03B68022B07D0B6 -S11346A846F2CC10C0F200004FF0E601FFF7E2FE3C -S11346B8BB6803F580631A463B6803F00103DBB269 -S11346C8002B06D0BB6803F5806319683B790B435C -S11346D807E0BB6803F5806319683B796FEA030355 -S11346E80B401360BB6803F584631A463B6803F008 -S11346F80203002B06D0BB6803F5846319683B7971 -S11347080B4307E0BB6803F5846319683B796FEAD8 -S113471803030B40136007F10C07BD4680BD00BFBF -S113472880B584B000AFF8607A603B600B463B729A -S1134738F868FFF70BFF0346002B07D146F2CC10AD -S1134748C0F200004FF4DD71FFF794FE7B68012B83 -S113475810D07B68022B0DD07B68042B0AD07B68B1 -S11347680C2B07D046F2CC10C0F200004FF4DF71D6 -S1134778FFF780FE3B68082B19D03B680A2B16D03C -S11347883B680C2B13D03B68092B10D03B680B2BD0 -S11347980DD03B680D2B0AD03B68002B07D046F29E -S11347A8CC10C0F2000040F2C511FFF763FEFB68AD -S11347B803F5A0631A467B6803F00103DBB2002B00 -S11347C806D0FB6803F5A06319683B7A0B4307E03E -S11347D8FB6803F5A06319683B7A6FEA03030B408F -S11347E81360FB6803F5A06303F104031A467B68AE -S11347F803F00203002B08D0FB6803F5A06303F160 -S1134808040319683B7A0B4309E0FB6803F5A063CA -S113481803F1040319683B7A6FEA03030B4013603E -S1134828FB6803F5A1631A467B6803F00403002BB5 -S113483806D0FB6803F5A16319683B7A0B4307E0CC -S1134848FB6803F5A16319683B7A6FEA03030B401D -S11348581360FB6803F5A3631A467B6803F0080337 -S1134868002B06D0FB6803F5A36319683B7A0B4356 -S113487807E0FB6803F5A36319683B7A6FEA03034F -S11348880B401360FB6803F5A06303F10C031A469D -S11348983B6803F00103DBB2002B08D0FB6803F587 -S11348A8A06303F10C0319683B7A0B4309E0FB6826 -S11348B803F5A06303F10C0319683B7A6FEA030359 -S11348C80B401360FB6803F5A2631A463B6803F0C8 -S11348D80203002B06D0FB6803F5A26319683B7A30 -S11348E80B4307E0FB6803F5A26319683B7A6FEA98 -S11348F803030B401360FB6803F5A26303F104038D -S11349081A463B6803F00403002B08D0FB6803F540 -S1134918A26303F1040319683B7A0B4309E0FB68BB -S113492803F5A26303F1040319683B7A6FEA0303EE -S11349380B401360FB6803F5A26303F10C031A46EA -S11349483B6803F00803002B08D0FB6803F5A26357 -S113495803F10C0319683B7A0B4309E0FB6803F580 -S1134968A26303F10C0319683B7A6FEA03030B4053 -S11349781360FB6803F5A5631A463B68002B06D150 -S1134988FB6803F5A56319683B7A0B4307E0FB68EA -S113499803F5A56319683B7A6FEA03030B401360B8 -S11349A807F11007BD4680BD80B583B000AFB8607D -S11349B813460A463A713B70B868FFF7C7FD0346C9 -S11349C8002B07D146F2CC10C0F200004FF451710D -S11349D8FFF750FD3B794FEA83031A46BB68D318A7 -S11349E83A781A6007F10C07BD4680BD80B582B0DD -S11349F800AF78600B463B707868FFF7A7FD034665 -S1134A08002B07D146F2CC10C0F2000040F204415A -S1134A18FFF730FD3B78786819464FF00102FFF73D -S1134A2821FE3B78786819464FF001024FF00803DD -S1134A38FFF776FE07F10807BD4680BD80B582B052 -S1134A4800AF78600B463B707868FFF77FFD03463C -S1134A58002B07D146F2CC10C0F2000040F21F51DF -S1134A68FFF708FD3B78786819464FF00202FFF714 -S1134A78F9FD3B78786819464FF001024FF00803B6 -S1134A88FFF74EFE07F10807BD4680BD80B500AFAD -S1134A98FFF756FD0346DBB2184680BD80B481B0EB -S1134AA800AF38603A684FF00103C0F210039A422D -S1134AB800F02B813A684FF00203C0F210039A42C7 -S1134AC800F023813A684FF48073C0F210039A42CD -S1134AD800F01B813A684FF40073C0F210039A4245 -S1134AE800F013813A684FF48063C0F210039A42CD -S1134AF800F00B813A684FF48073C1F210039A42B4 -S1134B0800F003813A684FF40073C1F210039A422B -S1134B1800F0FB803A684FF48063C1F210039A42B4 -S1134B2800F0F3803A684FF48043C1F210039A42CC -S1134B3800F0EB803A684FF4A043C2F210039A42A3 -S1134B4800F0E3803A684FF00103C2F200039A428E -S1134B5800F0DB803A684FF00203C2F200039A4285 -S1134B6800F0D3803A684FF00403C2F200039A427B -S1134B7800F0CB803A684FF00803C2F200039A426F -S1134B8800F0C3803A684FF01003C2F200039A425F -S1134B9800F0BB803A684FF02003C2F200039A4247 -S1134BA800F0B3803A684FF04003C2F200039A421F -S1134BB800F0AB803A684FF08003C2F200039A42D7 -S1134BC800F0A3803A684FF48073C2F200039A425B -S1134BD800F09B803B68402B00F097803B68B3F162 -S1134BE8102F00F092803A684FF48043C1F200031A -S1134BF89A4200F08A803A684FF48053C1F2100355 -S1134C089A4200F082803A684FF48073C2F210032B -S1134C189A427AD03A684FF08003C3F200039A426A -S1134C2873D03A684FF01003C3F200039A426CD071 -S1134C383B68B3F1101F68D03A684FF48073C1F22F -S1134C4800039A4261D03A684FF40073C1F200033A -S1134C589A425AD03A684FF01003C1F200039A42BC -S1134C6853D03A684FF02003C1F200039A424CD063 -S1134C783A684FF02003C3F200039A4245D03A68D9 -S1134C884FF00103C1F210039A423ED03A684FF044 -S1134C980203C1F210039A4237D03A684FF0040372 -S1134CA8C1F210039A4230D03A684FF00803C1F2B7 -S1134CB810039A4229D03A684FF00103C1F2000365 -S1134CC89A4222D03A684FF00203C1F200039A4292 -S1134CD81BD03A684FF00403C1F200039A4214D07F -S1134CE83B68B3F1202F10D03A684FF00103C2F2A9 -S1134CF810039A4209D03B68082B06D03A684FF44F -S1134D088053C0F210039A4202D14FF0010301E02C -S1134D184FF00003DBB2184607F10407BD4680BC18 -S1134D28704700BF80B581B000AF38603868FFF7BE -S1134D38B5FE0346002B07D146F2A420C0F20000BA -S1134D484FF4FC71FFF796FB3B684FEA137246F287 -S1134D583C23C0F2000353F822301A463B684FEA5A -S1134D68137146F23C23C0F2000353F8213019684A -S1134D783B684FEA03434FEA1343386800F4F810DA -S1134D884FEA104003FA00F30B43136007F10407DA -S1134D98BD4680BD0138FDD1704700BF80B584B0E1 -S1134DA800AF38604FF46043C4F20F031B6803F08C -S1134DB8E043002B0CD04FF46043C4F20F031A688D -S1134DC84FF00003C7F2FF031340B3F1805F03D130 -S1134DD83B68002BC0F217814EF26003C4F20F0344 -S1134DE81B68BB604EF27003C4F20F031B687B6040 -S1134DF8BB6843F40063BB60BB6823F48003BB60F7 -S1134E087B6843F400637B604EF26003C4F20F03D3 -S1134E18BA681A604EF27003C4F20F037A681A6013 -S1134E28BB6803F00203002B04D03B6803F00203C1 -S1134E38002B0AD0BB6803F00103DBB2002B2ED091 -S1134E483B6803F00103002B29D13B6863F003039B -S1134E58BA681340BB604EF26003C4F20F03BA6829 -S1134E681A607B68002B09DA7B6803F07003302B27 -S1134E780CD07B6803F07003702B07D07B68002B81 -S1134E8809DBBB6803F03003302B04D14FF48050A6 -S1134E98FFF780FF03E04FF40020FFF77BFFBB68B8 -S1134EA823F45E5323F07003BB603A6843F2F07353 -S1134EB81340BA681343BB607A684DF68F73C7F61C -S1134EC8FF7313407B603A6842F23003C8F2000370 -S1134ED813407A6813437B603B6803F008034FEA86 -S1134EE8C3037A6813437B604EF25803C4F20F037A -S1134EF84FF040021A607B68002B0CDA4EF2700304 -S1134F08C4F20F037A681A604EF26003C4F20F0306 -S1134F18BA681A600BE04EF26003C4F20F03BA6871 -S1134F281A604EF27003C4F20F037A681A604FF0E5 -S1134F381000FFF72FFFBB6823F0F86323F0030387 -S1134F48BB603A684FF00303C0F2C0731340BA68F9 -S1134F581343BB607B6823F0FC537B603B6803F01E -S1134F68FC537A6813437B603B6803F08043002B4F -S1134F7811D0BB6843F48003BB607B6823F48003CF -S1134F887B603A684FF00003C4F2400313407A6828 -S1134F9813437B6003E07B6823F080437B603B68BA -S1134FA803F40063002B1DD14FF40043FB600CE0B5 -S1134FB84EF25003C4F20F031B6803F04003002BA6 -S1134FC807D1FB6803F1FF33FB60FB68002BEFD1CB -S1134FD800E000BFBB6823F40063BB607B6823F474 -S1134FE800637B604EF26003C4F20F03BA681A6070 -S1134FF84EF27003C4F20F037A681A604FF010007F -S1135008FFF7C8FE00E000BF07F11007BD4680BDEA -S113501880B484B000AF4EF26003C4F20F031B687F -S1135028FB604EF27003C4F20F031B687B607B685D -S1135038002B03DA7B6803F0700302E0FB6803F0DB -S11350483003202B7CD0202B04D8002B0CD0102B21 -S113505817D0E0E0602B00F0D680702B00F0D780EA -S1135068302B00F0CC80D6E0FB6803F4F8634FEAF9 -S1135078931246F24823C0F2000353F82230BB606F -S1135088CCE04FF46043C4F20F031B6803F0E04321 -S1135098002B0CD04FF46043C4F20F031A684FF08E -S11350A80003C7F2FF031340B3F1805F05D14EF24A -S11350B8C013C0F2E403BB6041E04FF46043C4F2A0 -S11350C80F031A684FF00003C7F2FF0313404FF0B1 -S11350D80002C1F2010293420AD14FF46043C4F2C0 -S11350E80F031B684FEA03434FEA1343022B1AD0FA -S11350F84FF46043C4F20F031A684FF00003C7F279 -S1135108FF0313404FF00002C1F20302934210D18F -S11351184FF46043C4F20F031B684FEA03434FEA9A -S11351281343002B05D14FF4D853C0F2B703BB6027 -S113513805E04FF41053C0F2F403BB606EE06DE079 -S11351484FF46043C4F20F031B6803F0E043002BE1 -S11351580CD04FF46043C4F20F031A684FF00003F5 -S1135168C7F2FF031340B3F1805F05D143F6700320 -S1135178C0F23903BB6041E04FF46043C4F20F034B -S11351881A684FF00003C7F2FF0313404FF0000200 -S1135198C1F2010293420AD14FF46043C4F20F03EF -S11351A81B684FEA03434FEA1343022B1AD04FF408 -S11351B86043C4F20F031A684FF00003C7F2FF03F9 -S11351C813404FF00002C1F20302934210D14FF48E -S11351D86043C4F20F031B684FEA03434FEA1343C7 -S11351E8002B05D14CF2C063C0F22D03BB6005E06F -S11351F84FF41063C0F23D03BB600FE00EE047F2CA -S11352083053BB600AE04FF48003BB6006E04FF400 -S11352180043BB6002E04FF00003ABE07B68002B67 -S113522804DA7B6803F40063002B07D07B68002B47 -S11352385DDBFB6803F40063002B58D14EF2640372 -S1135248C4F20F031B683B604FF46043C4F20F03BE -S11352581B6803F0E043002B0CD04FF46043C4F206 -S11352680F031A684FF00003C7F2FF031340B3F1AA -S1135278805F13D13A6843F6E07313404FEA53133F -S113528803F10203BA6802FB03F23B6803F01F034D -S113529803F10203B2FBF3F3BB6012E03A6843F68E -S11352A8E07313404FEA5313BA6802FB03F23B68F6 -S11352B803F01F0303F101034FEA4303B2FBF3F3C3 -S11352C8BB603B6803F48043002B03D0BB684FEA00 -S11352D85303BB603B6803F40043002B03D0BB6853 -S11352E84FEA9303BB60FB6843F48003FB60FB68ED -S11352F803F48003002B3CD07B68002B2EDA7B68F8 -S113530803F08043002B1DD07B68002B04DA7B68F4 -S113531803F40063002B07D07B68002B12DBFB68C7 -S113532803F40063002B0DD1BB684FEA43027B688A -S113533803F0FE534FEA935303F10103B2FBF3F373 -S1135348BB6016E07B6803F0FC534FEAD35303F1C8 -S11353580103BA68B2FBF3F3BB600AE0FB6803F02D -S1135368F0634FEAD35303F10103BA68B2FBF3F3D2 -S1135378BB60BB68184607F11007BD4680BC704780 -S113538880B400AF4EF21003CEF200034EF21002C6 -S1135398CEF20002126842F005021A60BD4680BCD3 -S11353A8704700BF80B400AF4EF21003CEF2000382 -S11353B84EF21002CEF20002126822F001021A60C4 -S11353C8BD4680BC704700BF80B400AF4EF21003E6 -S11353D8CEF200034EF21002CEF20002126842F03E -S11353E802021A60BD4680BC704700BF80B400AF9B -S11353F84EF21003CEF200034EF21002CEF2000277 -S1135408126822F002021A60BD4680BC704700BFD1 -S113541880B581B000AF38603B68002B03D03B688F -S1135428B3F1807F07D946F21830C0F200004FF07C -S1135438D001FFF71FF84EF21403CEF200033A68C6 -S113544802F1FF321A6007F10407BD4680BD00BFB0 -S113545880B481B000AF38603A684FF44043C4F276 -S113546800039A420DD03A684FF45043C4F2000343 -S11354789A4206D03A684FF46043C4F200039A4251 -S113548802D14FF0010301E04FF00003DBB21846EC -S113549807F10407BD4680BC704700BF80B585B0DE -S11354A800AFF860B9607A603B60F868FFF7D0FF36 -S11354B80346002B07D146F28C30C0F2000040F2BC -S11354C80D11FEF7D7FF7B68002B07D146F28C300D -S11354D8C0F200004FF48771FEF7CCFF4FF460432D -S11354E8C4F20F031B6803F0E043002B42D04FF4CF -S11354F86043C4F20F031A684FF00003C7F2FF03B6 -S11355081340B3F1805F35D04FF46043C4F20F0306 -S11355181A684FF00003C7F2FF0313404FF000026C -S1135528C1F2010293420AD14FF46043C4F20F035B -S11355381B684FEA03434FEA1343022B1AD04FF474 -S11355486043C4F20F031A684FF00003C7F2FF0365 -S113555813404FF00002C1F2030293420DD14FF4FD -S11355686043C4F20F031B684FEA03434FEA134333 -S1135578002B02D14FF0100301E04FF008037A68C2 -S113558802FB03F2BB689A4207D946F28C30C0F298 -S1135598000040F20F11FEF76DFFF86800F078F88C -S11355A87B684FEA0312BB689A420ED9FB6803F181 -S11355B83003FA6802F13002126842F020021A60DD -S11355C87B684FEA53037B6009E0FB6803F130030F -S11355D8FA6802F13002126822F020021A60BB68ED -S11355E84FEAC3027B68B2FBF3F303F101034FEA0A -S11355F853033B61FB6803F124033A694FEA9212AF -S11356081A60FB6803F128033A6902F03F021A6042 -S1135618FB6803F12C033A681A60FB6803F118036A -S11356284FF000021A60F86800F004F807F1140754 -S1135638BD4680BD80B581B000AF38603868FFF7DB -S113564807FF0346002B07D146F28C30C0F2000056 -S11356584FF4CF71FEF70EFF3B6803F12C033A6851 -S113566802F12C02126842F010021A603B6803F13E -S113567830031A463B6803F130031B6843F4407354 -S113568843F00103136007F10407BD4680BD00BF62 -S113569880B581B000AF38603868FFF7D9FE03469B -S11356A8002B07D146F28C30C0F200004FF4DF71B2 -S11356B8FEF7E0FE00BF3B6803F118031B6803F024 -S11356C80803002BF7D13B6803F12C033A6802F175 -S11356D82C02126822F010021A603B6803F13003AE -S11356E81A463B6803F130031B6823F4407323F024 -S11356F80103136007F10407BD4680BD80B581B07E -S113570800AF38603868FFF7A3FE0346002B07D1C3 -S113571846F28C30C0F2000040F20941FEF7AAFEBE -S11357283B6803F118031B6803F01003002B02D134 -S11357383B681B6801E04FF0FF33184607F1040784 -S1135748BD4680BD2DE9F04F86B006460D4602924F -S11357584FF00003036046F2FC38C0F2000846F23A -S11357680C49C0F20009D3E105F10105252904BF5C -S11357782B46002203D0304600F0B6FCC8E11C4694 -S113578813F8010B1D46A0F120010B2913D8DFE8FB -S113579801F0061212091212120C1212120F42F020 -S11357A84002ECE742F08002E9E742F40042E6E70F -S11357B842F02002E3E7134668280AD16078682893 -S11357C803BF42F00802A078E51CA51C18BF43F0EB -S11357D8040278287AD8DFE810F0A9017900790062 -S11357E879007900790079007900790079007900E5 -S11357F879007900790079007900790079007900D5 -S113580879007900790079007900790079007900C4 -S113581879007900790079007900790079007900B4 -S11358287900790089007900790079007900790094 -S11358387900790079007900790079007900790094 -S11358487900790079007900790079007900790084 -S11358587900790079007900790079007900790074 -S11358687900790079007900790079007900790064 -S11358787900790079007900790079007900790054 -S113588879007900790079007900C30079007900FA -S11358987900790079007900790079007900790034 -S11358A88F00D7007900790079007900D700790052 -S11358B87900790079009800D000B5007900790062 -S11358C8A4007900DC0079007900C50040F2600387 -S11358D8C2F200031C68002C00F01A814FF0FF3359 -S11358E8009302A901913146A04711E130464FF0D7 -S11358F8250100F0F9FB0BE1029B03F1040202927B -S11359081978304600F0F0FB02E112F0080F029B10 -S113591803F1040202921B68326814BF1A701A60F9 -S1135928F6E0029B03F1040202921C682178002924 -S113593800F0EE80304600F0D7FB14F8011F002970 -S1135948F8D1E5E0029B03F1040102911B6802F01F -S11359588007002F14BF2327002742F480726CE0CD -S113596842F4005243F2780343F25807782808BFF8 -S11359781F4612F0800F11D10EE002F08007002FAD -S113598814BF3027002709E042F480424FF0000793 -S113599804E04FF0000701E04FF0000712F4804FD5 -S11359A81BD0029B03F1040102911B6812F0040F3F -S11359B818BF1BB203D112F0080F18BFDBB2002BBB -S11359C8BCBF5B422D2719DB02F04001002918BF38 -S11359D8202712F0200F11D00EE0029B03F10401DE -S11359E802911B6812F0040F18BF9BB206D112F083 -S11359F8080F18BFDBB201E04FF02B07A0F15800E5 -S1135A0820286CD8DFE800F0196B6B6B6B6B6B6B41 -S1135A186B6B6B6B156B6B6B6B156B6B6B6B6B11D0 -S1135A28196B6B6B6B156B6B19004FF00004FBB9AA -S1135A3857E04FF0000443BB53E04FF00004002B41 -S1135A484FD04FF0000402F4005232B103F00F01BA -S1135A5819F8010003A9605405E003F00F0118F8D0 -S1135A68010003A9605404F101041B09EDD138E0D5 -S1135A784FF0000403F0070101F1300103AAA15417 -S1135A8804F10104DB08F5D12BE04FF0000402F423 -S1135A9800424FF02C0B4CF6CD4ACCF6CC4A52B10E -S1135AA804F00301032901BF0DF1180C0CEB0401E8 -S1135AB801F80CBC013406A90819AAFB03C14FEA72 -S1135AC8D10101EB810CA3EB4C0303F1300300F883 -S1135AD80C3C04F101040B460029E0D101E04FF02D -S1135AE80004FF2F04D9C7F30721304600F0FCFA5D -S1135AF81FB1F9B2304600F0F7FA012C08D403AF0D -S1135B083C1914F8011D304600F0EEFABC42F8D1F5 -S1135B18297800297FF428AEB3682BB132687168FC -S1135B288A423CBF00219954306801E04FF0FF30AD -S1135B3806B0BDE8F08F00BF10B504460B783BB142 -S1135B48B0F1FF3F06D04B6803F1FF334B6001E02F -S1135B588B689847204610BD2DE9F04F82468B4646 -S1135B6817469846099E4FF0FF3900E0A94609F107 -S1135B780105504600F0A4FA044600F007FB00288B -S1135B88F4D12346B4F1FF3F08BF4FF0FF3500F0CE -S1135B989C8027F4C067002E4EDD17F0800F0DD0CF -S1135BA82B2C03D02D2C09D147F4806709F1020569 -S1135BB8504600F085FA044606F1FF36302C14BF2F -S1135BC800230123002ED4BF002303F00103002B7C -S1135BD832D047F4007706F1FF3605F10109504643 -S1135BE800F06EFA0446002E20DD582814BF002366 -S1135BF80123782808BF43F00103BBB1B8F1100FA3 -S1135C0814BF00230123B8F1000F08BF43F00103B8 -S1135C1863B127F4007706F1FF3605F1020950460F -S1135C2800F04EFA04464FF0100851E0B8F1000FA6 -S1135C3808BF4FF008084BE0B8F1000F08BF4FF059 -S1135C480A08002ED8BF4FF000090EDC15E047F40F -S1135C58007706F1FF3608FB090905F101055046EE -S1135C6800F02EFA044616B907E04FF00009204662 -S1135C78414600F06DFA0028E9DA20465146FFF75C -S1135C885BFF17F4007F08BF6FF001051DD017F004 -S1135C98010F1AD1DBF8003003F10402CBF800201D -S1135CA81B6807F49062B2F5906F08BFC9F1000948 -S1135CB817F0100F18BF83F8009006D117F0080FDB -S1135CC814BFA3F80090C3F800902846BDE8F08FED -S1135CD84D46B6E72DE9F04F85B001908A46049207 -S1135CE84FF0000BCDF808B04CF6CC49C0F6CC49BF -S1135CF8544614F8015B002D00F0DE81252D3BD0BD -S1135D08284600F043FA08B918E02C4604F10105C6 -S1135D18207800F03BFA0028F7D101E00BF1010BE1 -S1135D28019800F0CDF9054600F030FA0028F5D1C5 -S1135D3828460199FFF700FFA246D9E7019800F029 -S1135D48BFF90646A84203D10BF1010BA246CFE7DF -S1135D580199FFF7F1FE029AD2F1010338BF00233B -S1135D68B6F1FF3F14BF002603F00106002E18BF4A -S1135D784FF0FF3202929FE19AF801302A2B06BFB6 -S1135D880AF102044FF001084FF000084FF0000533 -S1135D980CE04D4500F3908105EB8505A6F130062E -S1135DA816EB450500F1888148F02008274604F1E0 -S1135DB801043E78A246304600F0C2F90028E8D132 -S1135DC8414608F02002002A08BF6FF000454C2E17 -S1135DD805D17E7807F1020A48F044080EE0682EDF -S1135DE80CD17E78682E03BF48F01008BE7807F1FE -S1135DF8030A07F1020A18BF41F00808A6F12506AC -S1135E08532E00F25981DFE816F054005701570168 -S1135E1857015701570157015701570157015701B6 -S1135E2857015701570157015701570157015701A6 -S1135E385701570157015701570157015701570196 -S1135E485701570157015701570157015701570186 -S1135E585701570157015701570157015701570176 -S1135E685701570157015701570157015701570166 -S1135E78330157015701570157015701570157017A -S1135E8857015701570170009F00570157015701E7 -S1135E985701AA005701570157015701B500CD0012 -S1135EA8D80057015701E30057012801570157014A -S1135EB83301019800F004F90446252802D10BF1B6 -S1135EC8010B15E70199FFF737FE029A131C18BF57 -S1135ED80123B4F1FF3F0CBF1C4643F00104002C1E -S1135EE808BF4FF0FF320292E6E008F02003002BCF -S1135EF808BF012518F0010401BF049B1A1D049270 -S1135F081E6818BF0026002D00F0D680002D13DD72 -S1135F18019800F0D5F8B0F1FF3F06D1029B002BA1 -S1135F2808BF4FF0FF330293C6E00CB906F8010B23 -S1135F380BF1010B013DEBD1002C7FF4D9AE029B90 -S1135F4803F101030293D3E648F080020095019817 -S1135F5804A94FF00A03FFF7FFFD044692E048F056 -S1135F6880020095019804A94FF00003FFF7F4FD9F -S1135F78044687E018F0010F7FF4BAAE049B03F1DE -S1135F88040204921B6818F0100F18BF83F800B0BD -S1135F987FF4AEAE18F0080F14BFA3F800B0C3F82E -S1135FA800B0A5E648F080020095019804A94FF0D6 -S1135FB80803FFF7D1FD044664E028F01E020095AB -S1135FC8019804A94FF01003FFF7C6FD044659E0F1 -S1135FD84FF0FF3404F10104019800F071F806460B -S1135FE800F0D4F80028F5D1B6F1FF3F08BF4FF010 -S1135FF8FF3447D018F0010701BF049B1A1D04920F -S11360081B680EBF039300220392002D16DC1AE0CE -S113601805F1FF351FB9039B03F8016B039304F1E2 -S11360280104019800F04CF80646431C18BF0123EC -S1136038002DD4BF002303F0010323B1304600F040 -S1136048A5F80028E4D030460199FFF775FDCFB9CB -S11360584FF00002039B1A7014E048F08002009588 -S1136068019804A94FF00A03FFF776FD044609E0F6 -S113607848F080020095019804A94FF01003FFF737 -S11360886BFD0446002C0FDA029A131C18BF012377 -S1136098B4F1FF3F0CBF1C4643F00104002C08BFB9 -S11360A84FF0FF32029207E018F0010F02BF029B83 -S11360B801330293A3441BE6029805B0BDE8F08FB0 -S11360C800B5034602783AB14268107840B102F14B -S11360D801025A605DF804FB436898475DF804FBC5 -S11360E84FF0FF305DF804FB30B50446C8B2A16830 -S11360F849B12368626803F10105954208BF00208D -S1136108934238BFC854E3682BB12168626891424E -S113611801D221469847236803F10103236030BD67 -S1136128A0F1410019288CBF00200120704700BF4E -S1136138A0F1610019288CBF00200120704700BF1E -S1136148A0F1300009288CBF00200120704700BF4F -S113615830B504460D46FFF7F3FF10B1A4F1300043 -S11361680FE02046FFF7E4FF10B1A4F1570008E060 -S11361782046FFF7D5FF10B1A4F1370001E04FF036 -S1136188FF30A842A8BF4FF0FF3030BDA0F109038B -S1136198202814BF00200120042B98BF40F00100E0 -S11361A8704700BF00B503B400F008F803BC02B49C -S11361B8694609BE00F004F801BC00BD704700BF81 -S10761C8704700BF59 -S11361CC443A2F7573722F6665617365722F736F02 -S11361DC6674776172652F4F70656E424C542F5400 -S11361EC61726765742F44656D6F2F41524D434D39 -S11361FC335F4C4D33535F454B5F4C4D3353363902 -S113620C36355F43726F7373776F726B732F507283 -S113621C6F672F6964652F2E2E2F6C69622F647241 -S113622C697665726C69622F6770696F2E63000002 -S113623C00E10F4004E10F4008E10F4040420F0021 -S113624C00201C0080841E0000802500999E3600CE -S113625C0040380000093D0000803E0000004B0067 -S113626C404B4C0000204E00808D5B0000C05D0054 -S113627C0080700000127A0000007D008096980067 -S113628C001BB7000080BB00C0E8CE00647ADA00C3 -S113629C0024F4000000FA00443A2F7573722F6640 -S11362AC65617365722F736F6674776172652F4FB6 -S11362BC70656E424C542F5461726765742F44653B -S11362CC6D6F2F41524D434D335F4C4D33535F45EE -S11362DC4B5F4C4D3353363936355F43726F7373A2 -S11362EC776F726B732F50726F672F6964652F2EE3 -S11362FC2E2F6C69622F6472697665726C69622FD9 -S113630C73797363746C2E6300000000443A2F7528 -S113631C73722F6665617365722F736F6674776120 -S113632C72652F4F70656E424C542F5461726765C1 -S113633C742F44656D6F2F41524D434D335F4C4D5B -S113634C33535F454B5F4C4D3353363936355F43CE -S113635C726F7373776F726B732F50726F672F69D1 -S113636C64652F2E2E2F6C69622F647269766572A8 -S113637C6C69622F7379737469636B2E630000000C -S113638C443A2F7573722F6665617365722F736F40 -S113639C6674776172652F4F70656E424C542F543E -S11363AC61726765742F44656D6F2F41524D434D77 -S11363BC335F4C4D33535F454B5F4C4D3353363940 -S11363CC36355F43726F7373776F726B732F5072C2 -S11363DC6F672F6964652F2E2E2F6C69622F647280 -S11363EC697665726C69622F756172742E63000034 -S11363FC303132333435363738396162636465662B -S113640C30313233343536373839414243444546DA +S113420880B581B000AF44F29153C0F200039847DF +S11342184FF0F1033B603B68984707F10407BD463C +S113422880BD00BF90B500AF4FF00100C1F200009F +S113423844F65963C0F2000398474FF00100C2F2F4 +S1134248000044F65963C0F2000398474FF0402039 +S11342584FF0030144F65133C0F20003984745F286 +S11342686913C0F20003984703464FF44040C4F270 +S1134278000019464FF461424FF0600345F2F954C7 +S1134288C0F20004A04790BD80B500AF40F200031F +S1134298C2F200031B78002B1AD140F20400C2F2C8 +S11342A8000044F26D33C0F2000398470346012B23 +S11342B856D140F20003C2F200034FF001021A7013 +S11342C840F24803C2F200034FF000021A7047E0BC +S11342D840F24803C2F200031B7803F1010240F2E2 +S11342E80403C2F20003D318184644F26D33C0F233 +S11342F8000398470346012B32D140F24803C2F227 +S113430800031B7803F10103DAB240F24803C2F256 +S113431800031A7040F20403C2F200031A7840F250 +S11343284803C2F200031B789A4219D140F20003F1 +S1134338C2F200034FF000021A7040F20403C2F202 +S113434800035B78FF2B0BD140F20403C2F2000395 +S11343589B78002B04D144F20923C0F20003984748 +S113436880BD00BF80B582B000AF38604FF44040D4 +S1134378C4F2000045F69503C0F2000398470346CB +S11343887B607B68B3F1FF3F06D07B68DAB23B6899 +S11343981A704FF0010301E04FF00003184607F1CB +S11343A80807BD4680BD00BF80B500AF44F6B933E9 +S11343B8C0F20003984780BD80B500AF4FF02000DD +S11343C8C2F2000044F65963C0F2000398474FF460 +S11343D8A040C4F202004FF0010144F6E923C0F200 +S11343E8000398474FF4A040C4F202004FF00101C3 +S11343F84FF0000244F69923C0F20003984780BDA9 +S113440880B581B000AF44F2CD53C0F200039847A1 +S113441803463B6040F24C03C2F200031B683A684F +S1134428D21A40F2F3139A4236D940F25003C2F238 +S113443800031B78002B14D140F25003C2F200038E +S11344484FF001021A704FF4A040C4F202004FF07A +S113445801014FF0010244F69923C0F20003984782 +S113446813E040F25003C2F200034FF000021A7046 +S11344784FF4A040C4F202004FF001014FF00002D3 +S113448844F69923C0F20003984740F24C03C2F261 +S113449800033A681A6000E000BF07F10407BD464C +S11344A880BD00BF80B500AF44F2DD43C0F2000315 +S11344B8984744F22D23C0F20003984744F2094375 +S11344C8C0F20003984744F29123C0F200039847CE +S11344D8F4E700BF80B500AF4FF46070C0F2C010BD +S11344E844F6DD63C0F20003984744F2C133C0F2D6 +S11344F80003984744F24153C0F20003984744F23A +S1134508B133C0F20003984780BD00BF80B482B0C5 +S113451800AF7860396040F25403C2F200037A684D +S11345281A6040F25803C2F200033A681A60FEE7C0 +S113453880B400AFFEE700BF80B500AF45F2691351 +S1134548C0F200039847024644F6D353C1F262030B +S1134558A3FB02134FEA9313184645F26953C0F2BA +S11345680003984745F2D943C0F20003984745F23F +S11345782153C0F2000398474FF0000044F2AD53B2 +S1134588C0F20003984780BD80B500AF45F245539B +S1134598C0F20003984745F2FD43C0F20003984770 +S11345A880BD00BF80B481B000AF386040F25C03C6 +S11345B8C2F200033A681A6007F10407BD4680BCDA +S11345C8704700BF80B400AF40F25C03C2F200033E +S11345D81B681846BD4680BC704700BF80B400AF56 +S11345E840F25C03C2F200031B6803F1010240F2CB +S11345F85C03C2F200031A60BD4680BC704700BF6A +S1134608EFF3108062B670472346184680B481B031 +S113461800AF38603B68B3F1402F76D03A684FF466 +S11346280043C4F205039A426FD03A684FF4A0439A +S1134638C4F200039A4268D03A684FF41043C4F2B3 +S113464805039A4261D03A684FF4C043C4F20003A8 +S11346589A425AD03A684FF42043C4F205039A4266 +S113466853D03A684FF4E043C4F200039A424CD062 +S11346783A684FF43043C4F205039A4245D03A6885 +S11346884FF48043C4F202039A423ED03A684FF48E +S11346984043C4F205039A4237D03A684FF4A04322 +S11346A8C4F202039A4230D03A684FF45043C4F239 +S11346B805039A4229D03A684FF4C043C4F202036E +S11346C89A4222D03A684FF46043C4F205039A42EE +S11346D81BD03A684FF4E043C4F202039A4214D060 +S11346E83A684FF47043C4F205039A420DD03A680D +S11346F84FF45043C4F203039A4206D03A684FF089 +S11347080003C4F206039A4202D14FF0010301E008 +S11347184FF00003DBB2184607F10407BD4680BC1E +S1134728704700BF80B583B000AFB8600B463A60ED +S11347383B71B86844F21563C0F200039847034616 +S1134748002B0AD146F26830C0F200004FF0E401B1 +S113475844F21553C0F2000398473B68002B10D06D +S11347683B68012B0DD03B68022B0AD046F2683017 +S1134778C0F200004FF0E60144F21553C0F2000302 +S11347889847BB6803F580631A463B6803F0010346 +S1134798DBB2002B06D0BB6803F5806319683B794C +S11347A80B4307E0BB6803F5806319683B796FEA3C +S11347B803030B401360BB6803F584631A463B6824 +S11347C803F00203002B06D0BB6803F58463196861 +S11347D83B790B4307E0BB6803F5846319683B79AD +S11347E86FEA03030B40136007F10C07BD4680BD55 +S11347F880B584B000AFF8607A603B600B463B72CA +S1134808F86844F21563C0F2000398470346002B86 +S11348180AD146F26830C0F200004FF4DD7144F268 +S11348281553C0F2000398477B68012B13D07B68AB +S1134838022B10D07B68042B0DD07B680C2B0AD07C +S113484846F26830C0F200004FF4DF7144F21553A9 +S1134858C0F2000398473B68082B1CD03B680A2B1E +S113486819D03B680C2B16D03B68092B13D03B6836 +S11348780B2B10D03B680D2B0DD03B68002B0AD0B6 +S113488846F26830C0F2000040F2C51144F21553F4 +S1134898C0F200039847FB6803F5A0631A467B68D7 +S11348A803F00103DBB2002B06D0FB6803F5A06319 +S11348B819683B7A0B4307E0FB6803F5A0631968A2 +S11348C83B7A6FEA03030B401360FB6803F5A063AC +S11348D803F104031A467B6803F00203002B08D093 +S11348E8FB6803F5A06303F1040319683B7A0B43DF +S11348F809E0FB6803F5A06303F1040319683B7A34 +S11349086FEA03030B401360FB6803F5A1631A46BF +S11349187B6803F00403002B06D0FB6803F5A1634E +S113492819683B7A0B4307E0FB6803F5A163196830 +S11349383B7A6FEA03030B401360FB6803F5A36338 +S11349481A467B6803F00803002B06D0FB6803F5BE +S1134958A36319683B7A0B4307E0FB6803F5A36379 +S113496819683B7A6FEA03030B401360FB6803F58D +S1134978A06303F10C031A463B6803F00103DBB29E +S1134988002B08D0FB6803F5A06303F10C03196836 +S11349983B7A0B4309E0FB6803F5A06303F10C03BE +S11349A819683B7A6FEA03030B401360FB6803F54D +S11349B8A2631A463B6803F00203002B06D0FB6887 +S11349C803F5A26319683B7A0B4307E0FB6803F518 +S11349D8A26319683B7A6FEA03030B401360FB6810 +S11349E803F5A26303F104031A463B6803F00403C6 +S11349F8002B08D0FB6803F5A26303F104031968CC +S1134A083B7A0B4309E0FB6803F5A26303F1040353 +S1134A1819683B7A6FEA03030B401360FB6803F5DC +S1134A28A26303F10C031A463B6803F00803002B46 +S1134A3808D0FB6803F5A26303F10C0319683B7AF9 +S1134A480B4309E0FB6803F5A26303F10C0319683F +S1134A583B7A6FEA03030B401360FB6803F5A56315 +S1134A681A463B68002B06D1FB6803F5A563196851 +S1134A783B7A0B4307E0FB6803F5A56319683B7AA7 +S1134A886FEA03030B40136007F11007BD4680BDAE +S1134A9880B583B000AFB86013460A463A713B70DC +S1134AA8B86844F21563C0F2000398470346002B24 +S1134AB80AD146F26830C0F200004FF4517144F252 +S1134AC81553C0F2000398473B794FEA83031A460B +S1134AD8BB68D3183A781A6007F10C07BD4680BD45 +S1134AE890B582B000AF78600B463B70786844F2AA +S1134AF81563C0F2000398470346002B0AD146F217 +S1134B086830C0F2000040F2044144F21553C0F288 +S1134B18000398473B78786819464FF0010244F23D +S1134B282D73C0F2000398473B78786819464FF014 +S1134B3801024FF0080344F2F974C0F20004A047DC +S1134B4807F10807BD4690BD90B582B000AF786004 +S1134B580B463B70786844F21563C0F2000398472B +S1134B680346002B0AD146F26830C0F2000040F236 +S1134B781F5144F21553C0F2000398473B787868F4 +S1134B8819464FF0020244F22D73C0F2000398470D +S1134B983B78786819464FF001024FF0080344F255 +S1134BA8F974C0F20004A04707F10807BD4690BD98 +S1134BB880B500AF44F20963C0F200039847034686 +S1134BC8DBB2184680BD00BF80B481B000AF386046 +S1134BD83A684FF00103C0F210039A4200F02B81A7 +S1134BE83A684FF00203C0F210039A4200F023819E +S1134BF83A684FF48073C0F210039A4200F01B81A4 +S1134C083A684FF40073C0F210039A4200F013811B +S1134C183A684FF48063C0F210039A4200F00B81A3 +S1134C283A684FF48073C1F210039A4200F003818A +S1134C383A684FF40073C1F210039A4200F0FB8003 +S1134C483A684FF48063C1F210039A4200F0F3808B +S1134C583A684FF48043C1F210039A4200F0EB80A3 +S1134C683A684FF4A043C2F210039A4200F0E3807A +S1134C783A684FF00103C2F200039A4200F0DB8065 +S1134C883A684FF00203C2F200039A4200F0D3805C +S1134C983A684FF00403C2F200039A4200F0CB8052 +S1134CA83A684FF00803C2F200039A4200F0C38046 +S1134CB83A684FF01003C2F200039A4200F0BB8036 +S1134CC83A684FF02003C2F200039A4200F0B3801E +S1134CD83A684FF04003C2F200039A4200F0AB80F6 +S1134CE83A684FF08003C2F200039A4200F0A380AE +S1134CF83A684FF48073C2F200039A4200F09B8032 +S1134D083B68402B00F097803B68B3F1102F00F00C +S1134D1892803A684FF48043C1F200039A4200F04B +S1134D288A803A684FF48053C1F210039A4200F023 +S1134D3882803A684FF48073C2F210039A427AD0A0 +S1134D483A684FF08003C3F200039A4273D03A687A +S1134D584FF01003C3F200039A426CD03B68B3F1DE +S1134D68101F68D03A684FF48073C1F200039A4266 +S1134D7861D03A684FF40073C1F200039A425AD0E2 +S1134D883A684FF01003C1F200039A4253D03A68CC +S1134D984FF02003C1F200039A424CD03A684FF016 +S1134DA82003C3F200039A4245D03A684FF0010346 +S1134DB8C1F210039A423ED03A684FF00203C1F29E +S1134DC810039A4237D03A684FF00403C1F2100333 +S1134DD89A4230D03A684FF00803C1F210039A425D +S1134DE829D03A684FF00103C1F200039A4222D055 +S1134DF83A684FF00203C1F200039A421BD03A68A2 +S1134E084FF00403C1F200039A4214D03B68B3F193 +S1134E18202F10D03A684FF00103C2F210039A42CF +S1134E2809D03B68082B06D03A684FF48053C0F287 +S1134E3810039A4202D14FF0010301E04FF000033E +S1134E48DBB2184607F10407BD4680BC704700BFB3 +S1134E5880B581B000AF3860386844F6D133C0F209 +S1134E68000398470346002B0AD146F24040C0F29B +S1134E7800004FF4FC7144F21553C0F20003984744 +S1134E883B684FEA137246F2D833C0F2000353F872 +S1134E9822301A463B684FEA137146F2D833C0F2FF +S1134EA8000353F8213019683B684FEA03434FEA7B +S1134EB81343386800F4F8104FEA104003FA00F37B +S1134EC80B43136007F10407BD4680BD0138FDD1CB +S1134ED8704700BF80B584B000AF38604FF46043BA +S1134EE8C4F20F031B6803F0E043002B0CD04FF40B +S1134EF86043C4F20F031A684FF00003C7F2FF03BC +S1134F081340B3F1805F03D13B68002BC0F22381C7 +S1134F184EF26003C4F20F031B68BB604EF27003C9 +S1134F28C4F20F031B687B60BB6843F40063BB6077 +S1134F38BB6823F48003BB607B6843F400637B6035 +S1134F484EF26003C4F20F03BA681A604EF270039B +S1134F58C4F20F037A681A60BB6803F00203002BDB +S1134F6804D03B6803F00203002B0AD0BB6803F0AB +S1134F780103DBB2002B34D03B6803F00103002BA0 +S1134F882FD13B6863F00303BA681340BB604EF249 +S1134F986003C4F20F03BA681A607B68002B09DA4D +S1134FA87B6803F07003302B0CD07B6803F070032C +S1134FB8702B07D07B68002B0CDBBB6803F0300335 +S1134FC8302B07D14FF4805044F6D563C0F2000368 +S1134FD8984706E04FF4002044F6D563C0F2000376 +S1134FE89847BB6823F45E5323F07003BB603A68A8 +S1134FF843F2F0731340BA681343BB607A684DF602 +S11350088F73C7F6FF7313407B603A6842F230032C +S1135018C8F2000313407A6813437B603B6803F0CB +S113502808034FEAC3037A6813437B604EF25803BC +S1135038C4F20F034FF040021A607B68002B0CDAAD +S11350484EF27003C4F20F037A681A604EF26003DA +S1135058C4F20F03BA681A600BE04EF26003C4F29C +S11350680F03BA681A604EF27003C4F20F037A6829 +S11350781A604FF0100044F6D563C0F20003984755 +S1135088BB6823F0F86323F00303BB603A684FF06E +S11350980303C0F2C0731340BA681343BB607B6850 +S11350A823F0FC537B603B6803F0FC537A6813439A +S11350B87B603B6803F08043002B11D0BB6843F44A +S11350C88003BB607B6823F480037B603A684FF0FD +S11350D80003C4F2400313407A6813437B6003E07F +S11350E87B6823F080437B603B6803F40063002BF8 +S11350F81DD14FF40043FB600CE04EF25003C4F2A0 +S11351080F031B6803F04003002B07D1FB6803F16E +S1135118FF33FB60FB68002BEFD100E000BFBB68E6 +S113512823F40063BB607B6823F400637B604EF266 +S11351386003C4F20F03BA681A604EF27003C4F233 +S11351480F037A681A604FF0100044F6D563C0F272 +S11351580003984700E000BF07F11007BD4680BD73 +S113516880B484B000AF4EF26003C4F20F031B682E +S1135178FB604EF27003C4F20F031B687B607B680C +S1135188002B03DA7B6803F0700302E0FB6803F08A +S11351983003202B7CD0202B04D8002B0CD0102BD0 +S11351A817D0E0E0602B00F0D680702B00F0D78099 +S11351B8302B00F0CC80D6E0FB6803F4F8634FEAA8 +S11351C8931246F2E433C0F2000353F82230BB6072 +S11351D8CCE04FF46043C4F20F031B6803F0E043D0 +S11351E8002B0CD04FF46043C4F20F031A684FF03D +S11351F80003C7F2FF031340B3F1805F05D14EF2F9 +S1135208C013C0F2E403BB6041E04FF46043C4F24E +S11352180F031A684FF00003C7F2FF0313404FF05F +S11352280002C1F2010293420AD14FF46043C4F26E +S11352380F031B684FEA03434FEA1343022B1AD0A8 +S11352484FF46043C4F20F031A684FF00003C7F227 +S1135258FF0313404FF00002C1F20302934210D13E +S11352684FF46043C4F20F031B684FEA03434FEA49 +S11352781343002B05D14FF4D853C0F2B703BB60D6 +S113528805E04FF41053C0F2F403BB606EE06DE028 +S11352984FF46043C4F20F031B6803F0E043002B90 +S11352A80CD04FF46043C4F20F031A684FF00003A4 +S11352B8C7F2FF031340B3F1805F05D143F67003CF +S11352C8C0F23903BB6041E04FF46043C4F20F03FA +S11352D81A684FF00003C7F2FF0313404FF00002AF +S11352E8C1F2010293420AD14FF46043C4F20F039E +S11352F81B684FEA03434FEA1343022B1AD04FF4B7 +S11353086043C4F20F031A684FF00003C7F2FF03A7 +S113531813404FF00002C1F20302934210D14FF43C +S11353286043C4F20F031B684FEA03434FEA134375 +S1135338002B05D14CF2C063C0F22D03BB6005E01D +S11353484FF41063C0F23D03BB600FE00EE047F278 +S11353583053BB600AE04FF48003BB6006E04FF4AF +S11353680043BB6002E04FF00003ABE07B68002B16 +S113537804DA7B6803F40063002B07D07B68002BF6 +S11353885DDBFB6803F40063002B58D14EF2640321 +S1135398C4F20F031B683B604FF46043C4F20F036D +S11353A81B6803F0E043002B0CD04FF46043C4F2B5 +S11353B80F031A684FF00003C7F2FF031340B3F159 +S11353C8805F13D13A6843F6E07313404FEA5313EE +S11353D803F10203BA6802FB03F23B6803F01F03FC +S11353E803F10203B2FBF3F3BB6012E03A6843F63D +S11353F8E07313404FEA5313BA6802FB03F23B68A5 +S113540803F01F0303F101034FEA4303B2FBF3F371 +S1135418BB603B6803F48043002B03D0BB684FEAAE +S11354285303BB603B6803F40043002B03D0BB6801 +S11354384FEA9303BB60FB6843F48003FB60FB689B +S113544803F48003002B3CD07B68002B2EDA7B68A6 +S113545803F08043002B1DD07B68002B04DA7B68A3 +S113546803F40063002B07D07B68002B12DBFB6876 +S113547803F40063002B0DD1BB684FEA43027B6839 +S113548803F0FE534FEA935303F10103B2FBF3F322 +S1135498BB6016E07B6803F0FC534FEAD35303F177 +S11354A80103BA68B2FBF3F3BB600AE0FB6803F0DC +S11354B8F0634FEAD35303F10103BA68B2FBF3F381 +S11354C8BB60BB68184607F11007BD4680BC70472F +S11354D880B400AF4EF21003CEF200034EF2100275 +S11354E8CEF20002126842F005021A60BD4680BC82 +S11354F8704700BF80B400AF4EF21003CEF2000331 +S11355084EF21002CEF20002126822F001021A6072 +S1135518BD4680BC704700BF80B400AF4EF2100394 +S1135528CEF200034EF21002CEF20002126842F0EC +S113553802021A60BD4680BC704700BF80B400AF49 +S11355484EF21003CEF200034EF21002CEF2000225 +S1135558126822F002021A60BD4680BC704700BF80 +S113556880B581B000AF38603B68002B03D03B683E +S1135578B3F1807F0AD946F2B440C0F200004FF07C +S1135588D00144F21553C0F2000398474EF21403B5 +S1135598CEF200033A6802F1FF321A6007F10407F9 +S11355A8BD4680BD80B481B000AF38603A684FF41E +S11355B84043C4F200039A420DD03A684FF4504372 +S11355C8C4F200039A4206D03A684FF46043C4F226 +S11355D800039A4202D14FF0010301E04FF00003A7 +S11355E8DBB2184607F10407BD4680BC704700BF0C +S11355F880B585B000AFF860B9607A603B60F86840 +S113560845F2AD53C0F2000398470346002B0AD174 +S113561846F22850C0F2000040F20D1144F215532E +S1135628C0F2000398477B68002B0AD146F2285041 +S1135638C0F200004FF4877144F21553C0F200031E +S113564898474FF46043C4F20F031B6803F0E04328 +S1135658002B42D04FF46043C4F20F031A684FF092 +S11356680003C7F2FF031340B3F1805F35D04FF452 +S11356786043C4F20F031A684FF00003C7F2FF0334 +S113568813404FF00002C1F2010293420AD14FF4D1 +S11356986043C4F20F031B684FEA03434FEA134302 +S11356A8022B1AD04FF46043C4F20F031A684FF068 +S11356B80003C7F2FF0313404FF00002C1F20302D4 +S11356C893420DD14FF46043C4F20F031B684FEAB1 +S11356D803434FEA1343002B02D14FF0100301E0B8 +S11356E84FF008037A6802FB03F2BB689A420AD9AE +S11356F846F22850C0F2000040F20F1144F215534C +S1135708C0F200039847F86845F61D03C0F2000389 +S113571898477B684FEA0312BB689A420ED9FB6824 +S113572803F13003FA6802F13002126842F02002F1 +S11357381A607B684FEA53037B6009E0FB6803F156 +S11357483003FA6802F13002126822F020021A606B +S1135758BB684FEAC3027B68B2FBF3F303F10103AE +S11357684FEA53033B61FB6803F124033A694FEAA8 +S113577892121A60FB6803F128033A6902F03F02A7 +S11357881A60FB6803F12C033A681A60FB6803F19A +S113579818034FF000021A60F86845F2B573C0F2B6 +S11357A80003984707F11407BD4680BD80B581B052 +S11357B800AF3860386845F2AD53C0F2000398472B +S11357C80346002B0AD146F22850C0F200004FF4D9 +S11357D8CF7144F21553C0F2000398473B6803F1B4 +S11357E82C033A6802F12C02126842F010021A6083 +S11357F83B6803F130031A463B6803F130031B6826 +S113580843F4407343F00103136007F10407BD46F2 +S113581880BD00BF80B581B000AF3860386845F2FC +S1135828AD53C0F2000398470346002B0AD146F251 +S11358382850C0F200004FF4DF7144F21553C0F24F +S11358480003984700BF3B6803F118031B6803F083 +S11358580803002BF7D13B6803F12C033A6802F1E3 +S11358682C02126822F010021A603B6803F130031C +S11358781A463B6803F130031B6823F4407323F092 +S11358880103136007F10407BD4680BD80B581B0EC +S113589800AF3860386845F2AD53C0F2000398474A +S11358A80346002B0AD146F22850C0F2000040F209 +S11358B8094144F21553C0F2000398473B6803F1C9 +S11358C818031B6803F01003002B02D13B681B6804 +S11358D801E04FF0FF33184607F10407BD4680BDC9 +S11358E82DE9F04F86B006460D4602924FF00003AC +S11358F8036046F29858C0F2000846F2A859C0F26C +S11359080009D3E105F10105252904BF2B4600222E +S113591803D0304600F0B6FCC8E11C4613F8010B6E +S11359281D46A0F120010B2913D8DFE801F0061267 +S113593812091212120C1212120F42F04002ECE772 +S113594842F08002E9E742F40042E6E742F020022E +S1135958E3E7134668280AD16078682803BF42F051 +S11359680802A078E51CA51C18BF43F00402782897 +S11359787AD8DFE810F0A901790079007900790074 +S11359887900790079007900790079007900790043 +S11359987900790079007900790079007900790033 +S11359A87900790079007900790079007900790023 +S11359B87900790079007900790079007900790013 +S11359C889007900790079007900790079007900F3 +S11359D879007900790079007900790079007900F3 +S11359E879007900790079007900790079007900E3 +S11359F879007900790079007900790079007900D3 +S1135A0879007900790079007900790079007900C2 +S1135A1879007900790079007900790079007900B2 +S1135A28790079007900C300790079007900790058 +S1135A387900790079007900790079008F00D7001E +S1135A487900790079007900D70079007900790024 +S1135A5879009800D000B50079007900A400790095 +S1135A68DC0079007900C50040F26003C2F200034B +S1135A781C68002C00F01A814FF0FF33009302A930 +S1135A8801913146A04711E130464FF0250100F05D +S1135A98F9FB0BE1029B03F10402029219783046E8 +S1135AA800F0F0FB02E112F0080F029B03F104027C +S1135AB802921B68326814BF1A701A60F6E0029BDF +S1135AC803F1040202921C682178002900F0EE8098 +S1135AD8304600F0D7FB14F8011F0029F8D1E5E09F +S1135AE8029B03F1040102911B6802F08007002F56 +S1135AF814BF2327002742F480726CE042F400525A +S1135B0843F2780343F25807782808BF1F4612F077 +S1135B18800F11D10EE002F08007002F14BF302748 +S1135B28002709E042F480424FF0000704E04FF0F8 +S1135B38000701E04FF0000712F4804F1BD0029BCE +S1135B4803F1040102911B6812F0040F18BF1BB281 +S1135B5803D112F0080F18BFDBB2002BBCBF5B42A5 +S1135B682D2719DB02F04001002918BF202712F065 +S1135B78200F11D00EE0029B03F1040102911B686F +S1135B8812F0040F18BF9BB206D112F0080F18BF09 +S1135B98DBB201E04FF02B07A0F1580020286CD8A5 +S1135BA8DFE800F0196B6B6B6B6B6B6B6B6B6B6B80 +S1135BB8156B6B6B6B156B6B6B6B6B11196B6B6B81 +S1135BC86B156B6B19004FF00004FBB957E04FF0ED +S1135BD8000443BB53E04FF00004002B4FD04FF0B8 +S1135BE8000402F4005232B103F00F0119F8010065 +S1135BF803A9605405E003F00F0118F8010003A994 +S1135C08605404F101041B09EDD138E04FF000049D +S1135C1803F0070101F1300103AAA15404F10104BE +S1135C28DB08F5D12BE04FF0000402F400424FF0FA +S1135C382C0B4CF6CD4ACCF6CC4A52B104F00301F5 +S1135C48032901BF0DF1180C0CEB040101F80CBC7D +S1135C58013406A90819AAFB03C14FEAD10101EBD3 +S1135C68810CA3EB4C0303F1300300F80C3C04F162 +S1135C7801040B460029E0D101E04FF00004FF2F96 +S1135C8804D9C7F30721304600F0FCFA1FB1F9B272 +S1135C98304600F0F7FA012C08D403AF3C1914F885 +S1135CA8011D304600F0EEFABC42F8D129780029EB +S1135CB87FF428AEB3682BB1326871688A423CBF5E +S1135CC800219954306801E04FF0FF3006B0BDE878 +S1135CD8F08F00BF10B504460B783BB1B0F1FF3F1D +S1135CE806D04B6803F1FF334B6001E08B6898479B +S1135CF8204610BD2DE9F04F82468B46174698463C +S1135D08099E4FF0FF3900E0A94609F10105504604 +S1135D1800F0A4FA044600F007FB0028F4D1234657 +S1135D28B4F1FF3F08BF4FF0FF3500F09C8027F423 +S1135D38C067002E4EDD17F0800F0DD02B2C03D03A +S1135D482D2C09D147F4806709F10205504600F06B +S1135D5885FA044606F1FF36302C14BF00230123CC +S1135D68002ED4BF002303F00103002B32D047F4E4 +S1135D78007706F1FF3605F10109504600F06EFA86 +S1135D880446002E20DD582814BF00230123782858 +S1135D9808BF43F00103BBB1B8F1100F14BF0023CF +S1135DA80123B8F1000F08BF43F0010363B127F4DE +S1135DB8007706F1FF3605F10209504600F04EFA65 +S1135DC804464FF0100851E0B8F1000F08BF4FF037 +S1135DD808084BE0B8F1000F08BF4FF00A08002E7E +S1135DE8D8BF4FF000090EDC15E047F4007706F140 +S1135DF8FF3608FB090905F10105504600F02EFAA3 +S1135E08044616B907E04FF000092046414600F061 +S1135E186DFA0028E9DA20465146FFF75BFF17F4CC +S1135E28007F08BF6FF001051DD017F0010F1AD1CC +S1135E38DBF8003003F10402CBF800201B6807F4F8 +S1135E489062B2F5906F08BFC9F1000917F0100FFE +S1135E5818BF83F8009006D117F0080F14BFA3F8F1 +S1135E680090C3F800902846BDE8F08F4D46B6E789 +S1135E782DE9F04F85B001908A4604924FF0000B4B +S1135E88CDF808B04CF6CC49C0F6CC49544614F8C1 +S1135E98015B002D00F0DE81252D3BD0284600F063 +S1135EA843FA08B918E02C4604F10105207800F0FB +S1135EB83BFA0028F7D101E00BF1010B019800F03F +S1135EC8CDF9054600F030FA0028F5D128460199A5 +S1135ED8FFF700FFA246D9E7019800F0BFF906468C +S1135EE8A84203D10BF1010BA246CFE70199FFF7B2 +S1135EF8F1FE029AD2F1010338BF0023B6F1FF3F45 +S1135F0814BF002603F00106002E18BF4FF0FF321D +S1135F1802929FE19AF801302A2B06BF0AF1020483 +S1135F284FF001084FF000084FF000050CE04D4514 +S1135F3800F3908105EB8505A6F1300616EB4505BF +S1135F4800F1888148F02008274604F101043E78CE +S1135F58A246304600F0C2F90028E8D1414608F0CC +S1135F682002002A08BF6FF000454C2E05D17E7828 +S1135F7807F1020A48F044080EE0682E0CD17E7836 +S1135F88682E03BF48F01008BE7807F1030A07F12A +S1135F98020A18BF41F00808A6F12506532E00F29C +S1135FA85981DFE816F0540057015701570157018A +S1135FB85701570157015701570157015701570115 +S1135FC85701570157015701570157015701570105 +S1135FD857015701570157015701570157015701F5 +S1135FE857015701570157015701570157015701E5 +S1135FF857015701570157015701570157015701D5 +S113600857015701570157015701570133015701E8 +S113601857015701570157015701570157015701B4 +S1136028570170009F005701570157015701AA00F3 +S11360385701570157015701B500CD00D800570142 +S11360485701E3005701280157015701330101980B +S113605800F004F90446252802D10BF1010B15E7D9 +S11360680199FFF737FE029A131C18BF0123B4F1F4 +S1136078FF3F0CBF1C4643F00104002C08BF4FF03F +S1136088FF320292E6E008F02003002B08BF012546 +S113609818F0010401BF049B1A1D04921E6818BF5E +S11360A80026002D00F0D680002D13DD019800F0A5 +S11360B8D5F8B0F1FF3F06D1029B002B08BF4FF083 +S11360C8FF330293C6E00CB906F8010B0BF1010B80 +S11360D8013DEBD1002C7FF4D9AE029B03F10103FF +S11360E80293D3E648F080020095019804A94FF082 +S11360F80A03FFF7FFFD044692E048F0800200958A +S1136108019804A94FF00003FFF7F4FD044687E063 +S113611818F0010F7FF4BAAE049B03F10402049251 +S11361281B6818F0100F18BF83F800B07FF4AEAEE8 +S113613818F0080F14BFA3F800B0C3F800B0A5E620 +S113614848F080020095019804A94FF00803FFF76E +S1136158D1FD044664E028F01E020095019804A9C4 +S11361684FF01003FFF7C6FD044659E04FF0FF3423 +S113617804F10104019800F071F8064600F0D4F81F +S11361880028F5D1B6F1FF3F08BF4FF0FF3447D0E0 +S113619818F0010701BF049B1A1D04921B680EBF67 +S11361A8039300220392002D16DC1AE005F1FF3553 +S11361B81FB9039B03F8016B039304F101040198CD +S11361C800F04CF80646431C18BF0123002DD4BF29 +S11361D8002303F0010323B1304600F0A5F800289A +S11361E8E4D030460199FFF775FDCFB94FF00002AE +S11361F8039B1A7014E048F080020095019804A9E2 +S11362084FF00A03FFF776FD044609E048F08002E0 +S11362180095019804A94FF01003FFF76BFD04469D +S1136228002C0FDA029A131C18BF0123B4F1FF3FA4 +S11362380CBF1C4643F00104002C08BF4FF0FF328A +S1136248029207E018F0010F02BF029B0133029388 +S1136258A3441BE6029805B0BDE8F08F00B50346D9 +S113626802783AB14268107840B102F101025A60EA +S11362785DF804FB436898475DF804FB4FF0FF3072 +S11362885DF804FB30B50446C8B2A16849B1236877 +S1136298626803F10105954208BF0020934238BFA4 +S11362A8C854E3682BB121686268914201D221463F +S11362B89847236803F10103236030BDA0F141002E +S11362C819288CBF00200120704700BFA0F161008D +S11362D819288CBF00200120704700BFA0F13000AE +S11362E809288CBF00200120704700BF30B5044640 +S11362F80D46FFF7F3FF10B1A4F130000FE020467C +S1136308FFF7E4FF10B1A4F1570008E02046FFF7B7 +S1136318D5FF10B1A4F1370001E04FF0FF30A842D7 +S1136328A8BF4FF0FF3030BDA0F10903202814BFE7 +S113633800200120042B98BF40F00100704700BFE3 +S113634800B503B400F008F803BC02B4694609BEFA +S113635800F004F801BC00BD704700BF704700BFDF +S1136368443A2F7573722F6665617365722F736F64 +S11363786674776172652F4F70656E424C542F5462 +S113638861726765742F44656D6F2F41524D434D9B +S1136398335F4C4D33535F454B5F4C4D3353363964 +S11363A836355F43726F7373776F726B732F5072E6 +S11363B86F672F6964652F2E2E2F6C69622F6472A4 +S11363C8697665726C69622F6770696F2E63000065 +S11363D800E10F4004E10F4008E10F4040420F0084 +S11363E800201C0080841E0000802500999E360031 +S11363F80040380000093D0000803E0000004B00CA +S1136408404B4C0000204E00808D5B0000C05D00B6 +S11364180080700000127A0000007D0080969800C9 +S1136428001BB7000080BB00C0E8CE00647ADA0025 +S11364380024F4000000FA00443A2F7573722F66A2 +S113644865617365722F736F6674776172652F4F18 +S113645870656E424C542F5461726765742F44659D +S11364686D6F2F41524D434D335F4C4D33535F4550 +S11364784B5F4C4D3353363936355F43726F737304 +S1136488776F726B732F50726F672F6964652F2E45 +S11364982E2F6C69622F6472697665726C69622F3B +S11364A873797363746C2E6300000000443A2F758B +S11364B873722F6665617365722F736F6674776183 +S11364C872652F4F70656E424C542F546172676524 +S11364D8742F44656D6F2F41524D434D335F4C4DBE +S11364E833535F454B5F4C4D3353363936355F4331 +S11364F8726F7373776F726B732F50726F672F6934 +S113650864652F2E2E2F6C69622F6472697665720A +S11365186C69622F7379737469636B2E630000006E +S1136528443A2F7573722F6665617365722F736FA2 +S11365386674776172652F4F70656E424C542F54A0 +S113654861726765742F44656D6F2F41524D434DD9 +S1136558335F4C4D33535F454B5F4C4D33533639A2 +S113656836355F43726F7373776F726B732F507224 +S11365786F672F6964652F2E2E2F6C69622F6472E2 +S1136588697665726C69622F756172742E63000096 +S1136598303132333435363738396162636465668D +S11365A8303132333435363738394142434445463D S903419724 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzp b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzp index 74026033..a3a16e8a 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzp +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzs b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzs index 05fc6b0c..14dd326d 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzs +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Prog/ide/lm3s6965_crossworks.hzs @@ -23,7 +23,6 @@ - @@ -57,8 +56,8 @@ - - + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.bin b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.bin index 93a8f9b7..c0585e79 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.bin and b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.bin differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.elf index adb5005f..fa799b62 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.map index 9f6b06d5..7acdab50 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/bin/openbtl_ek_lm3s6965.map @@ -7,47 +7,44 @@ start address 0x00000000 Program Header: LOAD off 0x00008000 vaddr 0x00000000 paddr 0x00000000 align 2**15 - filesz 0x000036ae memsz 0x000036ae flags r-x - LOAD off 0x00010000 vaddr 0x20000000 paddr 0x000036ae align 2**15 - filesz 0x0000011c memsz 0x00000708 flags rw- + filesz 0x000016ba memsz 0x000016ba flags r-x + LOAD off 0x00010000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x000005ec flags rw- private flags = 5000000: [Version5 EABI] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000036ae 00000000 00000000 00008000 2**2 + 0 .text 000016ba 00000000 00000000 00008000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 0000011c 20000000 000036ae 00010000 2**2 - CONTENTS, ALLOC, LOAD, DATA - 2 .bss 000005ec 2000011c 000037ca 0001011c 2**2 + 1 .bss 000005ec 20000000 20000000 00010000 2**2 ALLOC - 3 .debug_abbrev 00001319 00000000 00000000 0001011c 2**0 + 2 .debug_abbrev 00001319 00000000 00000000 000096ba 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 00003c91 00000000 00000000 00011435 2**0 + 3 .debug_info 00003c91 00000000 00000000 0000a9d3 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 000023cc 00000000 00000000 000150c6 2**0 + 4 .debug_line 000023cf 00000000 00000000 0000e664 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_pubtypes 000003ef 00000000 00000000 00017492 2**0 + 5 .debug_pubtypes 000003ef 00000000 00000000 00010a33 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_str 000017f3 00000000 00000000 00017881 2**0 + 6 .debug_str 000017f3 00000000 00000000 00010e22 2**0 CONTENTS, READONLY, DEBUGGING - 8 .comment 0000002a 00000000 00000000 00019074 2**0 + 7 .comment 0000002a 00000000 00000000 00012615 2**0 CONTENTS, READONLY - 9 .ARM.attributes 00000031 00000000 00000000 0001909e 2**0 + 8 .ARM.attributes 00000031 00000000 00000000 0001263f 2**0 CONTENTS, READONLY - 10 .debug_loc 000036c2 00000000 00000000 000190cf 2**0 + 9 .debug_loc 0000370f 00000000 00000000 00012670 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_pubnames 000010f0 00000000 00000000 0001c791 2**0 + 10 .debug_pubnames 000010f0 00000000 00000000 00015d7f 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_aranges 00000878 00000000 00000000 0001d881 2**0 + 11 .debug_aranges 00000878 00000000 00000000 00016e6f 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_ranges 00000768 00000000 00000000 0001e0f9 2**0 + 12 .debug_ranges 00000768 00000000 00000000 000176e7 2**0 CONTENTS, READONLY, DEBUGGING - 14 .debug_frame 000016d0 00000000 00000000 0001e864 2**2 + 13 .debug_frame 000016d0 00000000 00000000 00017e50 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 00000000 l d .text 00000000 .text -20000000 l d .data 00000000 .data -2000011c l d .bss 00000000 .bss +20000000 l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -63,272 +60,121 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 vectors.c 00000000 l df *ABS* 00000000 cstart.c 0000011a l F .text 00000000 zero_loop2 -00003366 l F .text 00000000 zero_loop -00000000 l df *ABS* 00000000 hooks.c +0000148e l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 main.c -00000000 l df *ABS* 00000000 cpulib.c 00000000 l df *ABS* 00000000 flashlib.c -00003388 l O .text 00000010 g_pulFMPPERegs -000033b4 l O .text 00000010 g_pulFMPRERegs -000033c4 l O .text 00000003 CSWTCH.4 00000000 l df *ABS* 00000000 sysctl.c -00000664 l F .text 00000168 SysCtlPeripheralValid -000033c8 l O .text 00000010 g_pulDCRegs -000033d8 l O .text 0000005c g_pulXtals -00003450 l O .text 0000000c g_pulDCGCRegs -0000345c l O .text 0000000c g_pulRCGCRegs -00003468 l O .text 0000000c g_pulSCGCRegs -00003474 l O .text 0000000c g_pulSRCRRegs -00000000 l df *ABS* 00000000 interrupt.c -000012d0 l F .text 00000002 IntDefaultHandler -20000000 l O .data 0000011c g_pfnRAMVectors -0000349c l O .text 00000020 g_pulPriority -000034bc l O .text 00000048 g_pulRegs +00000298 l F .text 00000168 SysCtlPeripheralValid +000014cc l O .text 0000005c g_pulXtals +00001544 l O .text 0000000c g_pulRCGCRegs 00000000 l df *ABS* 00000000 gpio.c -00001628 l F .text 000000c4 GPIOBaseValid -000016ec l F .text 000000f4 GPIOGetIntNumber -0000351c l O .text 00000048 g_pulGPIOBaseAddrs +00000774 l F .text 000000c4 GPIOBaseValid 00000000 l df *ABS* 00000000 uartlib.c -00002044 l F .text 0000002c UARTBaseValid +000009e0 l F .text 0000002c UARTBaseValid 00000000 l df *ABS* 00000000 boot.c 00000000 l df *ABS* 00000000 com.c -2000011c l O .bss 00000001 comEntryStateConnect -2000011d l O .bss 00000040 xcpCtoReqPacket.1375 +20000000 l O .bss 00000001 comEntryStateConnect +20000001 l O .bss 00000040 xcpCtoReqPacket.1375 00000000 l df *ABS* 00000000 xcp.c -00002b48 l F .text 0000000c XcpProtectResources -00002b54 l F .text 00000014 XcpSetCtoError -0000357e l O .text 00000008 xcpStationId -20000160 l O .bss 0000004c xcpInfo +00000c68 l F .text 0000000c XcpProtectResources +00000c74 l F .text 00000014 XcpSetCtoError +00001581 l O .text 00000008 xcpStationId +20000044 l O .bss 0000004c xcpInfo 00000000 l df *ABS* 00000000 backdoor.c -200001ac l O .bss 00000001 backdoorOpen +20000090 l O .bss 00000001 backdoorOpen 00000000 l df *ABS* 00000000 cop.c 00000000 l df *ABS* 00000000 assert.c -200001b0 l O .bss 00000004 assert_failure_file -200001b4 l O .bss 00000004 assert_failure_line +20000094 l O .bss 00000004 assert_failure_file +20000098 l O .bss 00000004 assert_failure_line 00000000 l df *ABS* 00000000 cpu.c 00000000 l df *ABS* 00000000 uart.c -00002e38 l F .text 00000020 UartReceiveByte -00002e58 l F .text 00000024 UartTransmitByte -200001b8 l O .bss 00000041 xcpCtoReqPacket.1577 -200001f9 l O .bss 00000001 xcpCtoRxLength.1578 -200001fa l O .bss 00000001 xcpCtoRxInProgress.1579 +00000f58 l F .text 00000020 UartReceiveByte +00000f78 l F .text 00000024 UartTransmitByte +2000009c l O .bss 00000041 xcpCtoReqPacket.1577 +200000dd l O .bss 00000001 xcpCtoRxLength.1578 +200000de l O .bss 00000001 xcpCtoRxInProgress.1579 00000000 l df *ABS* 00000000 nvm.c 00000000 l df *ABS* 00000000 timer.c -200001fc l O .bss 00000002 millisecond_counter +200000e0 l O .bss 00000002 millisecond_counter 00000000 l df *ABS* 00000000 flash.c -00002fe4 l F .text 00000038 FlashGetSector -0000301c l F .text 00000030 FlashGetSectorBaseAddr -0000304c l F .text 0000004e FlashWriteBlock -0000309a l F .text 00000026 FlashInitBlock -000030c0 l F .text 00000040 FlashSwitchBlock -00003100 l F .text 00000080 FlashAddToBlock -000035ac l O .text 000000d8 flashLayout -20000200 l O .bss 00000204 bootBlockInfo -20000404 l O .bss 00000204 blockInfo -000020b0 g F .text 00000020 UARTParityModeGet -00002ac4 g F .text 0000002c ComInit -00003198 g F .text 00000048 FlashWrite -00000b88 g F .text 0000000c SysCtlLDOGet -00000b3c g F .text 00000018 SysCtlIntStatus -00002dd8 g F .text 00000018 AssertFailure -00001cfc g F .text 00000034 GPIOPinTypeGPIOInput -00001e34 g F .text 00000034 GPIOPinTypeSSI -00002a38 g F .text 00000024 UARTDMADisable -00003348 g F .text 00000038 reset_handler -00001158 g F .text 0000005c SysCtlGPIOAHBDisable -0000106c g F .text 0000002c SysCtlADCSpeedGet -00001bec g F .text 00000030 GPIOPortIntUnregister -00002f88 g F .text 0000001c TimerUpdate -00002b94 g F .text 00000010 XcpPacketTransmitted -000029ac g F .text 00000024 UARTIntDisable -00002af0 g F .text 0000001c ComTask -000029f4 g F .text 00000020 UARTIntClear -00000c3c g F .text 00000006 SysCtlDelay -00000630 g F .text 00000010 FlashIntDisable -00002b20 g F .text 0000000c ComSetConnectEntryState -00000fdc g F .text 00000034 SysCtlPWMClockGet -00002a9c g F .text 00000016 BootInit -00000620 g F .text 00000010 FlashIntEnable -00001bb8 g F .text 00000034 GPIOPortIntRegister -00002dbc g F .text 00000018 BackDoorInit -00002dd6 g F .text 00000002 CopService -000036ae g .text 00000000 _etext -0000091c g F .text 00000054 SysCtlPeripheralReset -00000bc4 g F .text 00000004 SysCtlSleep -00000be8 g F .text 0000000c SysCtlResetCauseGet -000013fc g F .text 00000034 IntPriorityGet -00001398 g F .text 00000024 IntPriorityGroupingGet -00001b20 g F .text 00000028 GPIOPinIntEnable -000028a8 g F .text 00000034 UARTBreakCtl -00001c3c g F .text 00000024 GPIOPinWrite -0000019c g F .text 00000006 CPUbasepriGet -000027e0 g F .text 00000028 UARTSpaceAvail -00000a58 g F .text 00000038 SysCtlPeripheralDeepSleepEnable -00001540 g F .text 00000078 IntPendSet -00002f7c g F .text 0000000c TimerReset -000028fc g F .text 00000048 UARTIntRegister -00002854 g F .text 0000002c UARTCharPutNonBlocking -00002ab2 g F .text 00000012 BootTask -00002988 g F .text 00000024 UARTIntEnable -0000327c g F .text 00000044 FlashWriteChecksum -00002b0e g F .text 00000010 ComTransmitPacket -0000234c g F .text 00000024 UARTDisableSIR -00001a7c g F .text 000000a4 GPIOPadConfigGet -000025f0 g F .text 00000078 UARTModemStatusGet -00001dcc g F .text 00000034 GPIOPinTypePWM -000009e4 g F .text 00000038 SysCtlPeripheralSleepEnable -00000970 g F .text 00000038 SysCtlPeripheralEnable -00002880 g F .text 00000028 UARTCharPut -00002370 g F .text 00000080 UARTSmartCardEnable -00001620 g F .text 00000004 IntPriorityMaskSet -00002b84 g F .text 00000010 XcpIsConnected -00002144 g F .text 00000044 UARTConfigGetExpClk -00002f58 g F .text 00000004 NvmInit -00000bb4 g F .text 00000010 SysCtlReset -00003180 g F .text 00000018 FlashInit -00001b48 g F .text 00000028 GPIOPinIntDisable -00002464 g F .text 0000008c UARTModemControlSet -20000608 g .bss 00000000 _ebss -00000b20 g F .text 00000010 SysCtlIntDisable -000007e0 g F .text 00000014 SysCtlFlashSizeGet +00001104 l F .text 00000038 FlashGetSector +0000113c l F .text 00000030 FlashGetSectorBaseAddr +0000116c l F .text 0000004e FlashWriteBlock +000011ba l F .text 00000026 FlashInitBlock +000011e0 l F .text 00000040 FlashSwitchBlock +00001220 l F .text 00000080 FlashAddToBlock +000015ac l O .text 000000e4 flashLayout +200000e4 l O .bss 00000204 bootBlockInfo +200002e8 l O .bss 00000204 blockInfo +00000000 l df *ABS* 00000000 hooks.c +00000000 l df *ABS* 00000000 cpulib.c +00000000 l df *ABS* 00000000 interrupt.c +00000bfc g F .text 0000002c ComInit +000012b8 g F .text 00000048 FlashWrite +00000ef8 g F .text 00000018 AssertFailure +00001470 g F .text 00000038 reset_handler +000010a8 g F .text 0000001c TimerUpdate +00000cb4 g F .text 00000010 XcpPacketTransmitted +00000c28 g F .text 0000001c ComTask +00000438 g F .text 00000006 SysCtlDelay +00000c58 g F .text 0000000c ComSetConnectEntryState +00000bd4 g F .text 00000016 BootInit +00000edc g F .text 00000018 BackDoorInit +00000ef6 g F .text 00000002 CopService +000016ba g .text 00000000 _etext +00000b58 g F .text 00000028 UARTSpaceAvail +0000109c g F .text 0000000c TimerReset +00000ba8 g F .text 0000002c UARTCharPutNonBlocking +00000bea g F .text 00000012 BootTask +000013a4 g F .text 00000044 FlashWriteChecksum +00000c46 g F .text 00000010 ComTransmitPacket +00000400 g F .text 00000038 SysCtlPeripheralEnable +00000ca4 g F .text 00000010 XcpIsConnected +00001078 g F .text 00000004 NvmInit +000012a0 g F .text 00000018 FlashInit +200004ec g .bss 00000000 _ebss 00000100 g *ABS* 00000000 __STACKSIZE__ -00000bf4 g F .text 00000010 SysCtlResetCauseClear -0000333c g F .text 0000000c UnusedISR -00001f04 g F .text 00000034 GPIOPinTypeUSBAnalog -000007cc g F .text 00000014 SysCtlSRAMSizeGet -00001c1c g F .text 00000020 GPIOPinRead -00002b0c g F .text 00000002 ComFree -00000a1c g F .text 0000003c SysCtlPeripheralSleepDisable -00001f6c g F .text 00000034 GPIOPinTypeEthernetLED -00001834 g F .text 0000004c GPIODirModeGet -00001c60 g F .text 00000034 GPIOPinTypeADC -00002668 g F .text 00000088 UARTFlowControlSet -000010fc g F .text 0000005c SysCtlGPIOAHBEnable -00000acc g F .text 0000001c SysCtlPeripheralClockGating -000027b8 g F .text 00000028 UARTCharsAvail -00002e7c g F .text 00000028 UartInit -000007f4 g F .text 000000cc SysCtlPinPresent -000023f0 g F .text 00000074 UARTSmartCardDisable -00002f60 g F .text 00000004 NvmErase -00001d98 g F .text 00000034 GPIOPinTypeI2C -00002808 g F .text 00000028 UARTCharGetNonBlocking -000015b8 g F .text 00000068 IntPendClear -00001d64 g F .text 00000034 GPIOPinTypeGPIOOutputOD -2000011c g .bss 00000000 _bss -00002ba4 g F .text 000001e8 XcpPacketReceived -000022f8 g F .text 00000024 UARTFIFODisable -00000b94 g F .text 00000020 SysCtlLDOConfigSet -00000554 g F .text 0000003c FlashUserSet -00003308 g F .text 00000034 FlashDone -00001e00 g F .text 00000034 GPIOPinTypeQEI -00002b2c g F .text 0000000c ComSetDisconnectEntryState +00001464 g F .text 0000000c UnusedISR +00000c44 g F .text 00000002 ComFree +00000f9c g F .text 00000028 UartInit +00001080 g F .text 00000004 NvmErase +00000b80 g F .text 00000028 UARTCharGetNonBlocking +20000000 g .bss 00000000 _bss +00000cc4 g F .text 000001e8 XcpPacketReceived +00001430 g F .text 00000034 FlashDone 000000f0 g F .text 0000004c EntryFromProg -00001364 g F .text 00000034 IntPriorityGroupingSet -00002b38 g F .text 0000000c ComIsConnectEntryState -00001880 g F .text 00000080 GPIOIntTypeSet -000001a4 g F .text 0000000c FlashUsecGet -000024f0 g F .text 0000008c UARTModemControlClear -0000017c g F .text 00000008 CPUcpsid -00000658 g F .text 0000000c FlashIntClear -00000192 g F .text 00000004 CPUwfi -00000bc8 g F .text 00000020 SysCtlDeepSleep -00000184 g F .text 00000006 CPUprimask -0000257c g F .text 00000074 UARTModemControlGet -0000020c g F .text 000000cc FlashProgram -00002b68 g F .text 0000001c XcpInit -00002118 g F .text 0000002c UARTFIFOLevelGet -0000049c g F .text 00000050 FlashProtectSave -000031e0 g F .text 0000009c FlashErase -00000b54 g F .text 00000034 SysCtlLDOSet +000001cc g F .text 000000cc FlashProgram +00000c88 g F .text 0000001c XcpInit +00001300 g F .text 000000a4 FlashErase 00000150 g F .text 0000002c main -00000d9c g F .text 000001dc SysCtlClockGet -000011d4 g F .text 000000fc SysCtlI2SMClkSet -00001098 g F .text 0000001c SysCtlIOSCVerificationSet -0000060c g F .text 00000012 FlashIntUnregister -00002760 g F .text 00000038 UARTTxIntModeSet -000021b8 g F .text 00000038 UARTDisable -00002f68 g F .text 00000012 NvmDone -00002ea4 g F .text 00000050 UartTransmitPacket -00002f64 g F .text 00000004 NvmVerifyChecksum -00002e14 g F .text 00000020 CpuMemCopy -00000ae8 g F .text 00000014 SysCtlIntRegister -00002fa4 g F .text 0000000c TimerSet -000011b4 g F .text 00000010 SysCtlUSBPLLEnable -0000133c g F .text 00000028 IntUnregister -00001c94 g F .text 00000034 GPIOPinTypeCAN -00000afc g F .text 00000012 SysCtlIntUnregister -00001fa0 g F .text 00000034 GPIOPinTypeEPI -00000640 g F .text 00000018 FlashIntStatus -000029d0 g F .text 00000024 UARTIntStatus -00001f38 g F .text 00000034 GPIOPinTypeI2S -000012d2 g F .text 0000000a IntMasterEnable -00002ef4 g F .text 00000064 UartReceivePacket -000012e8 g F .text 00000054 IntRegister -00002a5c g F .text 00000020 UARTRxErrorGet -00001010 g F .text 0000005c SysCtlADCSpeedSet -00000c04 g F .text 00000038 SysCtlBrownOutConfigSet -000012dc g F .text 0000000a IntMasterDisable -00001ed0 g F .text 00000034 GPIOPinTypeUSBDigital -000014b8 g F .text 00000088 IntDisable -000013bc g F .text 00000040 IntPrioritySet -00001b98 g F .text 00000020 GPIOPinIntClear -000005f8 g F .text 00000014 FlashIntRegister -20000000 g .data 00000000 _data -00002dd4 g F .text 00000002 CopInit -00002e34 g F .text 00000004 CpuReset -00002830 g F .text 00000024 UARTCharGet -000020d0 g F .text 00000048 UARTFIFOLevelSet -00002f5c g F .text 00000004 NvmWrite -000022d4 g F .text 00000024 UARTFIFOEnable -00000590 g F .text 00000068 FlashUserSave -00002df0 g F .text 00000024 CpuStartUserProgram -000010b4 g F .text 0000001c SysCtlMOSCVerificationSet -00000b10 g F .text 00000010 SysCtlIntEnable -000026f0 g F .text 00000070 UARTFlowControlGet -20000708 g .bss 00000000 _estack -00002798 g F .text 00000020 UARTTxIntModeGet -000032c0 g F .text 00000046 FlashVerifyChecksum -2000011c g .data 00000000 _edata -000001b0 g F .text 0000000c FlashUsecSet +00000598 g F .text 000001dc SysCtlClockGet +00000a3c g F .text 00000038 UARTDisable +00001088 g F .text 00000012 NvmDone +00000fc4 g F .text 00000050 UartTransmitPacket +00001084 g F .text 00000004 NvmVerifyChecksum +00000f34 g F .text 00000020 CpuMemCopy +000010c4 g F .text 0000000c TimerSet +00001014 g F .text 00000064 UartReceivePacket +20000000 g .text 00000000 _data +00000ef4 g F .text 00000002 CopInit +00000f54 g F .text 00000004 CpuReset +0000107c g F .text 00000004 NvmWrite +00000f10 g F .text 00000024 CpuStartUserProgram +200005ec g .bss 00000000 _estack +000013e8 g F .text 00000046 FlashVerifyChecksum +20000000 g .text 00000000 _edata 00000000 g O .text 000000f0 _vectab -000004ec g F .text 00000068 FlashUserGet -00001624 g F .text 00000004 IntPriorityMaskGet -00001e68 g F .text 00000034 GPIOPinTypeTimer -000010d0 g F .text 0000001c SysCtlPLLVerificationSet -00001e9c g F .text 00000034 GPIOPinTypeUART -00001cc8 g F .text 00000034 GPIOPinTypeComparator -00000196 g F .text 00000006 CPUbasepriSet -00001d30 g F .text 00000034 GPIOPinTypeGPIOOutput -00000f78 g F .text 00000064 SysCtlPWMClockSet -000002d8 g F .text 0000009c FlashProtectGet -00002b44 g F .text 00000004 ComIsConnected -00000b30 g F .text 0000000c SysCtlIntClear -00001430 g F .text 00000088 IntEnable -000028dc g F .text 00000020 UARTBusy -00001fd4 g F .text 00000070 GPIOPinConfigure -000010ec g F .text 00000010 SysCtlClkVerificationClear -0000018a g F .text 00000008 CPUcpsie -000017e0 g F .text 00000054 GPIODirModeSet -00002944 g F .text 00000044 UARTIntUnregister -00002d8c g F .text 00000030 BackDoorCheck -00000a90 g F .text 0000003c SysCtlPeripheralDeepSleepDisable -20000608 g .bss 00000000 _stack -00001900 g F .text 0000005c GPIOIntTypeGet -00000374 g F .text 00000128 FlashProtectSet -00002fd4 g F .text 00000010 TimerGet -00002a7c g F .text 00000020 UARTRxErrorClear -000009a8 g F .text 0000003c SysCtlPeripheralDisable -00002a14 g F .text 00000024 UARTDMAEnable -000021f0 g F .text 000000e4 UARTConfigSetExpClk -00001b70 g F .text 00000028 GPIOPinIntStatus -000011c4 g F .text 00000010 SysCtlUSBPLLDisable -00000c44 g F .text 00000158 SysCtlClockSet -000008c0 g F .text 0000005c SysCtlPeripheralPresent -0000195c g F .text 00000120 GPIOPadConfigSet -00002fb0 g F .text 00000024 TimerInit -0000231c g F .text 00000030 UARTEnableSIR -000001bc g F .text 00000050 FlashClear -00002188 g F .text 00000030 UARTEnable -00002070 g F .text 00000040 UARTParityModeSet +000009ac g F .text 00000034 GPIOPinTypeUART +00000c64 g F .text 00000004 ComIsConnected +00000838 g F .text 00000054 GPIODirModeSet +00000eac g F .text 00000030 BackDoorCheck +200004ec g .bss 00000000 _stack +000010f4 g F .text 00000010 TimerGet +00000a74 g F .text 000000e4 UARTConfigSetExpClk +00000440 g F .text 00000158 SysCtlClockSet +0000088c g F .text 00000120 GPIOPadConfigSet +000010d0 g F .text 00000024 TimerInit +0000017c g F .text 00000050 FlashClear +00000a0c g F .text 00000030 UARTEnable diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/makefile b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/makefile index 589eae5a..4ccf6b91 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/makefile +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Boot/makefile @@ -1,11 +1,11 @@ #**************************************************************************************** -#| Description: Makefile for STM32 using CodeSourcery GNU GCC compiler toolset +#| Description: Makefile for LM3S using CodeSourcery GNU GCC compiler toolset #| File Name: makefile #| #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2012 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -128,7 +128,7 @@ CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) CFLAGS += -ffunction-sections -fdata-sections $(INC_PATH) -D DEBUG -D gcc CFLAGS += -Wa,-adhlns="$(OBJ_PATH)/$(subst .o,.lst,$@)" LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O binary ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.elf index fd5db3e6..7bd2761e 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.map index 6a8a9bd2..ebf23d4f 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.map @@ -3,51 +3,48 @@ bin/demoprog_ek_lm3s6965.elf: file format elf32-littlearm bin/demoprog_ek_lm3s6965.elf architecture: arm, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED -start address 0x00004000 +start address 0x00002000 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**15 - filesz 0x00010584 memsz 0x00010584 flags r-x - LOAD off 0x00018000 vaddr 0x20000000 paddr 0x00010584 align 2**15 - filesz 0x0000011c memsz 0x00000284 flags rw- + filesz 0x00003514 memsz 0x00003514 flags r-x + LOAD off 0x00008000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x0000015c flags rw- private flags = 5000002: [Version5 EABI] [has entry point] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 0000c584 00004000 00004000 00004000 2**2 + 0 .text 00001514 00002000 00002000 00002000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 0000011c 20000000 00010584 00018000 2**2 - CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000168 2000011c 000106a0 0001811c 2**2 + 1 .bss 0000015c 20000000 20000000 00008000 2**2 ALLOC - 3 .debug_abbrev 00001afb 00000000 00000000 0001811c 2**0 + 2 .debug_abbrev 00001afb 00000000 00000000 00003514 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 00008981 00000000 00000000 00019c17 2**0 + 3 .debug_info 00008981 00000000 00000000 0000500f 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 0000565e 00000000 00000000 00022598 2**0 + 4 .debug_line 00005665 00000000 00000000 0000d990 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_loc 0000bd77 00000000 00000000 00027bf6 2**0 + 5 .debug_loc 0000bd77 00000000 00000000 00012ff5 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_pubnames 0000305b 00000000 00000000 0003396d 2**0 + 6 .debug_pubnames 0000305b 00000000 00000000 0001ed6c 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_pubtypes 00000326 00000000 00000000 000369c8 2**0 + 7 .debug_pubtypes 00000326 00000000 00000000 00021dc7 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_aranges 00001440 00000000 00000000 00036cee 2**0 + 8 .debug_aranges 00001440 00000000 00000000 000220ed 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_ranges 00001270 00000000 00000000 0003812e 2**0 + 9 .debug_ranges 00001270 00000000 00000000 0002352d 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 00003310 00000000 00000000 0003939e 2**0 + 10 .debug_str 00003310 00000000 00000000 0002479d 2**0 CONTENTS, READONLY, DEBUGGING - 12 .comment 0000002a 00000000 00000000 0003c6ae 2**0 + 11 .comment 0000002a 00000000 00000000 00027aad 2**0 CONTENTS, READONLY - 13 .ARM.attributes 00000031 00000000 00000000 0003c6d8 2**0 + 12 .ARM.attributes 00000031 00000000 00000000 00027ad7 2**0 CONTENTS, READONLY - 14 .debug_frame 00003904 00000000 00000000 0003c70c 2**2 + 13 .debug_frame 00003908 00000000 00000000 00027b08 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: -00004000 l d .text 00000000 .text -20000000 l d .data 00000000 .data -2000011c l d .bss 00000000 .bss +00002000 l d .text 00000000 .text +20000000 l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -62,626 +59,90 @@ SYMBOL TABLE: 00000000 l d .debug_frame 00000000 .debug_frame 00000000 l df *ABS* 00000000 vectors.c 00000000 l df *ABS* 00000000 boot.c -000040f4 l F .text 0000001e UartReceiveByte -2000011c l O .bss 00000001 xcpCtoRxInProgress.1651 -2000011d l O .bss 00000001 xcpCtoRxLength.1650 -20000120 l O .bss 00000041 xcpCtoReqPacket.1649 +000020f4 l F .text 00000024 UartReceiveByte +20000000 l O .bss 00000001 xcpCtoRxInProgress.1651 +20000001 l O .bss 00000001 xcpCtoRxLength.1650 +20000004 l O .bss 00000041 xcpCtoReqPacket.1649 00000000 l df *ABS* 00000000 cstart.c -0000424e l F .text 00000000 zero_loop +00002276 l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 irq.c -20000164 l O .bss 00000001 interruptNesting 00000000 l df *ABS* 00000000 led.c -20000168 l O .bss 00000004 timer_counter_last.1643 -2000016c l O .bss 00000001 led_toggle_state.1642 +20000048 l O .bss 00000004 timer_counter_last.1643 +2000004c l O .bss 00000001 led_toggle_state.1642 00000000 l df *ABS* 00000000 main.c -20000170 l O .bss 00000004 assert_failure_file.1649 -20000174 l O .bss 00000004 assert_failure_line.1650 +20000050 l O .bss 00000004 assert_failure_file.1649 +20000054 l O .bss 00000004 assert_failure_line.1650 00000000 l df *ABS* 00000000 time.c -20000178 l O .bss 00000004 millisecond_counter -00000000 l df *ABS* 00000000 adc.c -2000017c l O .bss 00000003 g_pucOversampleFactor -00000000 l df *ABS* 00000000 comp.c +20000058 l O .bss 00000004 millisecond_counter 00000000 l df *ABS* 00000000 cpu.c +00000000 l df *ABS* 00000000 gpio.c +00002474 l F .text 00000188 GPIOBaseValid +00000000 l df *ABS* 00000000 interrupt.c +00000000 l df *ABS* 00000000 sysctl.c +000028d4 l F .text 0000039c SysCtlPeripheralValid +00003464 l O .text 0000005c g_pulXtals +000034d8 l O .text 0000000c g_pulRCGCRegs +00000000 l df *ABS* 00000000 systick.c +00000000 l df *ABS* 00000000 uart.c +00003200 l F .text 0000003c UARTBaseValid +00000000 l df *ABS* 00000000 adc.c +00000000 l df *ABS* 00000000 comp.c 00000000 l df *ABS* 00000000 epi.c 00000000 l df *ABS* 00000000 ethernet.c -00005c4c l F .text 000000b6 EthernetPacketGetInternal -00005d04 l F .text 00000094 EthernetPacketPutInternal 00000000 l df *ABS* 00000000 flash.c -00010290 l O .text 00000010 g_pulFMPPERegs -000102b8 l O .text 00000010 g_pulFMPRERegs -00000000 l df *ABS* 00000000 gpio.c -00006a5c l F .text 00000188 GPIOBaseValid -00006be4 l F .text 00000172 GPIOGetIntNumber -000102e0 l O .text 00000048 g_pulGPIOBaseAddrs 00000000 l df *ABS* 00000000 hibernate.c -20000180 l O .bss 00000004 g_ulWriteDelay 00000000 l df *ABS* 00000000 i2c.c 00000000 l df *ABS* 00000000 i2s.c -00000000 l df *ABS* 00000000 interrupt.c -00008af4 l F .text 00000002 IntDefaultHandler -20000000 l O .data 0000011c g_pfnRAMVectors -00010388 l O .text 00000020 g_pulPriority -000103a8 l O .text 00000048 g_pulRegs 00000000 l df *ABS* 00000000 mpu.c 00000000 l df *ABS* 00000000 pwm.c -000090fc l F .text 0000002e PWMGenValid -0000912c l F .text 0000005c PWMOutValid 00000000 l df *ABS* 00000000 qei.c 00000000 l df *ABS* 00000000 ssi.c -00000000 l df *ABS* 00000000 sysctl.c -0000a86c l F .text 0000039c SysCtlPeripheralValid -00010440 l O .text 00000010 g_pulDCRegs -00010450 l O .text 0000005c g_pulXtals -000104c4 l O .text 0000000c g_pulRCGCRegs -000104d0 l O .text 0000000c g_pulSCGCRegs -000104dc l O .text 0000000c g_pulSRCRRegs -000104e8 l O .text 0000000c g_pulDCGCRegs -00000000 l df *ABS* 00000000 systick.c 00000000 l df *ABS* 00000000 timer.c -0000bc1c l F .text 0000004e TimerBaseValid -00000000 l df *ABS* 00000000 uart.c -0000c608 l F .text 0000003c UARTBaseValid 00000000 l df *ABS* 00000000 udma.c 00000000 l df *ABS* 00000000 usb.c -0000d994 l F .text 00000066 USBIndexRead -0000d9fc l F .text 00000072 USBIndexWrite 00000000 l df *ABS* 00000000 watchdog.c -0000ed50 g F .text 0000012e USBFIFOConfigGet -0000c6a8 g F .text 00000022 UARTParityModeGet -00007fec g F .text 0000004e I2CMasterIntStatus -0000b0f8 g F .text 0000000c SysCtlLDOGet -0000feac g F .text 0000003a WatchdogResetEnable -0000437c g F .text 00000016 __error__ -0000eec8 g F .text 000000f6 USBEndpointDataAvail -0000b080 g F .text 0000001a SysCtlIntStatus -00007d6c g F .text 0000004a I2CSlaveDisable -00004f88 g F .text 00000074 ADCComparatorReset -0000db0c g F .text 00000044 USBHostSpeedGet -00007360 g F .text 0000003a GPIOPinTypeGPIOInput -000074c8 g F .text 0000003a GPIOPinTypeSSI -0000d2b8 g F .text 00000026 UARTDMADisable -0000518c g F .text 0000003e ADCReferenceGet -0000d440 g F .text 0000000c uDMAControlAlternateBaseGet -00009818 g F .text 00000064 PWMGenIntTrigDisable -0000d654 g F .text 00000140 uDMAChannelTransferSet -00004208 g F .text 00000056 reset_handler -0000de5c g F .text 0000003c USBIntEnableEndpoint -0000b94c g F .text 000000b2 SysCtlGPIOAHBDisable -0000a710 g F .text 00000046 SSIDataGet -0000b7d8 g F .text 00000032 SysCtlADCSpeedGet -00005b40 g F .text 00000030 EPIIntStatus -00009308 g F .text 00000044 PWMGenDisable -00007234 g F .text 0000002e GPIOPortIntUnregister -00009a38 g F .text 000000a4 PWMGenFaultConfigure -0000ddbc g F .text 00000062 USBIntStatusControl -0000d5fc g F .text 00000058 uDMAChannelControlSet -0000e480 g F .text 00000120 USBDevEndpointStall -0000eea4 g F .text 00000024 USBEndpointDMADisable -0000d854 g F .text 0000005e uDMAChannelSizeGet -0000def8 g F .text 00000030 USBIntUnregister -000099fc g F .text 0000003c PWMFaultIntClearExt -000056ac g F .text 00000072 EPIConfigGPModeSet -0000e398 g F .text 000000e8 USBEndpointDataToggleClear -0000fb84 g F .text 00000036 USBHostPwrFaultDisable -0000a578 g F .text 00000042 SSIIntDisable -0000d220 g F .text 00000026 UARTIntDisable -0000d270 g F .text 00000020 UARTIntClear -0000a408 g F .text 00000040 SSIEnable -00009e7c g F .text 0000004a QEIConfigure -000085cc g F .text 0000003a I2STxFIFOLimitSet -00007cd4 g F .text 00000058 I2CSlaveInit -0000b1c8 g F .text 00000006 SysCtlDelay -00009f40 g F .text 00000048 QEIDirectionGet -00007a04 g F .text 0000008c HibernateDataSet -00006a20 g F .text 00000012 FlashIntDisable -0000426c g F .text 00000008 IrqInterruptEnable -0000d390 g F .text 0000002c uDMAChannelDisable -00007c88 g F .text 0000004a I2CSlaveEnable -00009bcc g F .text 00000082 PWMGenFaultTriggerGet -00004914 g F .text 0000005c ADCSequenceOverflow -0000803c g F .text 0000004e I2CSlaveIntStatus -00005fcc g F .text 0000002c EthernetPacketAvail -00009f88 g F .text 0000003e QEIErrorGet -0000c540 g F .text 00000026 TimerIntDisable -0000bfe0 g F .text 00000080 TimerControlWaitOnTrigger -0000b708 g F .text 00000046 SysCtlPWMClockGet -0000d354 g F .text 00000010 uDMAErrorStatusClear -00007a90 g F .text 0000004c HibernateDataGet -00008ff0 g F .text 00000068 MPURegionSet -0000862c g F .text 00000024 I2STxFIFOLevelGet -00006a0c g F .text 00000012 FlashIntEnable -00007200 g F .text 00000032 GPIOPortIntRegister -0000f700 g F .text 0000002a USBHostRequestStatus -00007860 g F .text 0000003c HibernateLowBatSet -0000808c g F .text 0000007a I2CSlaveIntStatusEx -0000d794 g F .text 000000c0 uDMAChannelScatterGatherSet -0000a7e8 g F .text 00000042 SSIDMADisable -0000a2b0 g F .text 00000158 SSIConfigSetExpClk -0000a6a4 g F .text 0000006a SSIDataPutNonBlocking -0000bf70 g F .text 0000006e TimerControlStall -000086ec g F .text 0000003a I2SRxDataGetNonBlocking -0000d44c g F .text 0000002c uDMAChannelRequest -0000530c g F .text 0000005a ComparatorIntRegister -000096fc g F .text 00000052 PWMGenIntUnregister -00010018 g F .text 00000034 WatchdogReloadGet -000099a8 g F .text 00000028 PWMFaultIntClear -000043a0 g F .text 0000000c TimeSet -00009188 g F .text 0000006c PWMGenConfigure -0000987c g F .text 00000048 PWMGenIntStatus -00005514 g F .text 0000004c EPIModeSet -00008514 g F .text 0000002c I2STxDataPut -00010584 g .text 00000000 _etext -000087a8 g F .text 0000003c I2SRxFIFOLimitSet -0000ae20 g F .text 00000064 SysCtlPeripheralReset -000058b4 g F .text 00000024 EPINonBlockingReadAvail -00009784 g F .text 00000030 PWMFaultIntUnregister -0000b13c g F .text 00000008 SysCtlSleep -0000b164 g F .text 0000000c SysCtlResetCauseGet -00008c88 g F .text 0000003e IntPriorityGet -0000c5b0 g F .text 00000056 TimerQuiesce -0000d504 g F .text 0000008c uDMAChannelAttributeDisable -00008c00 g F .text 00000038 IntPriorityGroupingGet -00008148 g F .text 0000003e I2CSlaveIntClear -000084b0 g F .text 00000034 I2STxEnable -00008a7c g F .text 00000046 I2SIntRegister -00007158 g F .text 0000002a GPIOPinIntEnable -0000d108 g F .text 00000038 UARTBreakCtl -0000ffe0 g F .text 00000036 WatchdogReloadSet -00007288 g F .text 00000024 GPIOPinWrite -00005720 g F .text 0000003a EPIAddressMapSet -0000a82c g F .text 0000003e SSIBusy -00008a3c g F .text 00000040 I2SIntClear -00004b04 g F .text 00000068 ADCProcessorTrigger -0000d590 g F .text 0000006a uDMAChannelAttributeGet -0000f90c g F .text 000000f0 USBHostHubAddrSet -00007b48 g F .text 00000016 HibernateIntRegister -0000f9fc g F .text 000000f0 USBHostHubAddrGet -0000bf08 g F .text 00000068 TimerControlEvent -0000fe20 g F .text 0000000a USBPHYPowerOff -00007b60 g F .text 00000014 HibernateIntUnregister -0000550c g F .text 00000006 CPUbasepriGet -00008f64 g F .text 00000012 MPUDisable -0000446c g F .text 0000006e ADCIntUnregister -0000d038 g F .text 00000028 UARTSpaceAvail -00005588 g F .text 0000004a EPIConfigSDRAMSet -0000934c g F .text 00000070 PWMPulseWidthSet -0000af7c g F .text 0000003c SysCtlPeripheralDeepSleepEnable -00008e18 g F .text 00000092 IntPendSet -000061b0 g F .text 00000046 EthernetIntRegister -000055d4 g F .text 0000006c EPIConfigHB8Set -0000d164 g F .text 0000004c UARTIntRegister -000078ac g F .text 00000044 HibernateRTCSet -0000d0b4 g F .text 0000002c UARTCharPutNonBlocking -0000da70 g F .text 0000002a USBHostSuspend -0000fe70 g F .text 0000003a WatchdogEnable -0000a1ec g F .text 00000042 QEIIntDisable -0000bb74 g F .text 0000001e SysTickIntRegister -0000772c g F .text 00000010 HibernateWriteComplete -00009554 g F .text 0000004a PWMOutputState -00007fa8 g F .text 00000042 I2CSlaveIntDisableEx -00004ffc g F .text 0000005e ADCComparatorIntDisable -0000d1f8 g F .text 00000026 UARTIntEnable -00004624 g F .text 00000058 ADCIntClear -00004a7c g F .text 00000086 ADCSequenceDataGet -00007d2c g F .text 00000040 I2CMasterDisable -0000d8b4 g F .text 00000066 uDMAChannelModeGet -0000efc0 g F .text 0000012c USBEndpointDataGet -000101f4 g F .text 0000003e WatchdogStallDisable -00005d98 g F .text 00000036 EthernetInitExpClk -0000c9d4 g F .text 00000024 UARTDisableSIR -0000d91c g F .text 00000012 uDMAChannelSelectSecondary -00007090 g F .text 000000c8 GPIOPadConfigGet -00007940 g F .text 0000000c HibernateRTCMatch0Get -0000a1a8 g F .text 00000042 QEIIntEnable -000101b4 g F .text 0000003e WatchdogStallEnable -0000cd8c g F .text 000000ac UARTModemStatusGet -0000d338 g F .text 00000010 uDMADisable -000088a4 g F .text 0000008c I2STxRxConfigSet -000052c4 g F .text 00000046 ComparatorValueGet -00007450 g F .text 0000003a GPIOPinTypePWM -00005408 g F .text 00000048 ComparatorIntDisable -000093bc g F .text 0000005a PWMPulseWidthGet -0000a4e0 g F .text 00000054 SSIIntUnregister -0000bcc8 g F .text 0000005a TimerDisable -0000467c g F .text 0000005c ADCSequenceEnable -0000608c g F .text 0000005e EthernetPacketGet -00008930 g F .text 0000004c I2SMasterClockSelect -0000af00 g F .text 0000003c SysCtlPeripheralSleepEnable -00008688 g F .text 0000002e I2SRxDisable -00006150 g F .text 0000005e EthernetPacketPut -00005640 g F .text 0000006c EPIConfigHB16Set -000081c4 g F .text 00000058 I2CMasterSlaveAddrSet -0000832c g F .text 00000056 I2CMasterErr -0000ae84 g F .text 0000003c SysCtlPeripheralEnable -0000d0e0 g F .text 00000028 UARTCharPut -0000fc24 g F .text 00000026 USBFrameNumberGet -00009494 g F .text 00000048 PWMDeadBandDisable -0000be28 g F .text 0000006e TimerControlLevel -0000c9f8 g F .text 000000b2 UARTSmartCardEnable -0001017c g F .text 00000038 WatchdogIntClear -00009cf0 g F .text 0000010c PWMGenFaultClear -00008f28 g F .text 00000008 IntPriorityMaskSet -0000fc98 g F .text 0000002a USBModeGet -000057cc g F .text 0000005a EPINonBlockingReadStart -00008f38 g F .text 0000002a MPUEnable -00005954 g F .text 0000007a EPINonBlockingReadGet16 -00008874 g F .text 0000002e I2STxRxDisable -0000d3bc g F .text 00000034 uDMAChannelIsEnabled -00009278 g F .text 0000004c PWMGenPeriodGet -0000c770 g F .text 0000004a UARTConfigGetExpClk -00004738 g F .text 000000c0 ADCSequenceConfigure -00007f28 g F .text 0000003e I2CMasterIntDisable -0000bc6c g F .text 0000005a TimerEnable -0000b128 g F .text 00000014 SysCtlReset -000083fc g F .text 0000003a I2CSlaveStatus -00005870 g F .text 00000042 EPINonBlockingReadCount -0000fe2c g F .text 0000000a USBPHYPowerOn -000077bc g F .text 0000003a HibernateClockSelect -0000c0a8 g F .text 00000070 TimerPrescaleSet -00008188 g F .text 0000003c I2CSlaveIntClearEx -00004970 g F .text 00000058 ADCSequenceOverflowClear -00004ef0 g F .text 00000098 ADCComparatorRegionSet -00007184 g F .text 0000002a GPIOPinIntDisable -000063b0 g F .text 00000020 EthernetPHYPowerOff -0000cb54 g F .text 000000c6 UARTModemControlSet -0000dd50 g F .text 0000006a USBIntEnableControl -0000ff24 g F .text 0000003a WatchdogLock -20000184 g .bss 00000000 _ebss -0000bb60 g F .text 00000012 SysTickDisable -000059d0 g F .text 00000078 EPINonBlockingReadGet8 -00009f04 g F .text 0000003c QEIPositionSet -00008438 g F .text 0000003c I2CSlaveDataPut -0000505c g F .text 0000005c ADCComparatorIntEnable -0000bc00 g F .text 00000010 SysTickPeriodGet -0000f72c g F .text 000000f0 USBHostAddrSet -0000b060 g F .text 00000012 SysCtlIntDisable -0000d478 g F .text 0000008c uDMAChannelAttributeEnable -0000ac20 g F .text 00000016 SysCtlFlashSizeGet -00005ab8 g F .text 00000044 EPIIntEnable -00008fbc g F .text 00000034 MPURegionDisable -00007ea4 g F .text 00000040 I2CSlaveIntEnable +000023c0 g F .text 00000016 __error__ +00002230 g F .text 0000005c reset_handler +00002cb8 g F .text 00000006 SysCtlDelay +00002298 g F .text 0000000e IrqInterruptEnable +000023f0 g F .text 0000000c TimeSet +00003514 g .text 00000000 _etext +000027ec g F .text 00000030 GPIOPinWrite +00002c70 g F .text 00000048 SysCtlPeripheralEnable +2000005c g .bss 00000000 _ebss +00003194 g F .text 00000012 SysTickDisable 00000100 g *ABS* 00000000 __STACKSIZE__ -00010140 g F .text 0000003c WatchdogIntStatus -0000b170 g F .text 00000012 SysCtlResetCauseClear -000043f8 g F .text 00000002 UnusedISR -00006028 g F .text 00000064 EthernetPacketGetNonBlocking -000075b8 g F .text 0000003a GPIOPinTypeUSBAnalog -00004e98 g F .text 00000058 ADCComparatorConfigure -0000ac08 g F .text 00000018 SysCtlSRAMSizeGet -000042b4 g F .text 00000030 LedInit -00007264 g F .text 00000022 GPIOPinRead -0000a048 g F .text 00000076 QEIVelocityConfigure -00010080 g F .text 00000044 WatchdogIntRegister -0000dc54 g F .text 00000092 USBIntEnable -0000c28c g F .text 0000004a TimerLoadGet -0000c380 g F .text 0000004a TimerMatchGet -000078fc g F .text 00000044 HibernateRTCMatch0Set -0000af3c g F .text 0000003e SysCtlPeripheralSleepDisable -000043e4 g F .text 00000012 TimeISRHandler -00007630 g F .text 0000003a GPIOPinTypeEthernetLED -00006db8 g F .text 00000058 GPIODirModeGet -000072ac g F .text 0000003a GPIOPinTypeADC -0000fc4c g F .text 00000040 USBOTGSessionRequest -0000c1dc g F .text 00000054 TimerPrescaleMatchGet -000058d8 g F .text 0000007a EPINonBlockingReadGet32 -00005ee4 g F .text 0000005e EthernetMACAddrGet -00007f68 g F .text 00000040 I2CSlaveIntDisable -0000ce38 g F .text 000000c2 UARTFlowControlSet -00007af0 g F .text 0000002a HibernateIntEnable -0000b89c g F .text 000000b0 SysCtlGPIOAHBEnable -0000bc10 g F .text 0000000c SysTickValueGet -00004a24 g F .text 00000058 ADCSequenceUnderflowClear -0000aff8 g F .text 00000026 SysCtlPeripheralClockGating -0000a488 g F .text 00000058 SSIIntRegister -00010104 g F .text 0000003a WatchdogIntEnable -00007990 g F .text 0000000c HibernateRTCMatch1Get -0000d010 g F .text 00000028 UARTCharsAvail -00006228 g F .text 00000042 EthernetIntEnable -000078f0 g F .text 0000000c HibernateRTCGet -0000ac38 g F .text 00000188 SysCtlPinPresent -0000caac g F .text 000000a6 UARTSmartCardDisable -00007850 g F .text 00000010 HibernateWakeGet -0000c324 g F .text 0000005c TimerMatchSet -00008608 g F .text 00000024 I2STxFIFOLimitGet -0000c084 g F .text 00000024 TimerRTCDisable -000077f8 g F .text 00000012 HibernateRTCEnable -00007414 g F .text 0000003a GPIOPinTypeI2C -0000575c g F .text 0000006e EPINonBlockingReadConfigure -00004298 g F .text 0000001c IrqInterruptRestore -00008108 g F .text 00000040 I2CMasterIntClear -0000c518 g F .text 00000026 TimerIntEnable -0000d060 g F .text 0000002a UARTCharGetNonBlocking -00009c50 g F .text 0000009e PWMGenFaultStatus -00008eac g F .text 0000007c IntPendClear -0000a63c g F .text 00000066 SSIDataPut -000073d8 g F .text 0000003a GPIOPinTypeGPIOOutputOD -00005b70 g F .text 00000026 EPIIntErrorStatus -2000011c g .bss 00000000 _bss -0000c118 g F .text 00000054 TimerPrescaleGet -000050b8 g F .text 0000003a ADCComparatorIntStatus -00008474 g F .text 0000003a I2CSlaveDataGet -0000e754 g F .text 00000024 USBDevAddrGet -00007adc g F .text 00000012 HibernateRequest -0000f3f0 g F .text 000000fe USBEndpointDataSend -000044dc g F .text 0000005e ADCIntDisable -0000c97c g F .text 00000024 UARTFIFODisable -0000b104 g F .text 00000024 SysCtlLDOConfigSet -00008f78 g F .text 00000010 MPURegionCountGet -0000fbbc g F .text 00000030 USBHostPwrEnable -00007b98 g F .text 0000002a HibernateIntClear -000068e8 g F .text 00000052 FlashUserSet -0000dbc0 g F .text 00000092 USBIntDisable -0000dec4 g F .text 00000034 USBIntRegister -00005b98 g F .text 0000003c EPIIntErrorClear -0000748c g F .text 0000003a GPIOPinTypeQEI -0000bbc4 g F .text 00000012 SysTickIntDisable -00008ac4 g F .text 00000030 I2SIntUnregister -0000829c g F .text 00000090 I2CMasterControl -000047f8 g F .text 0000011c ADCSequenceStepConfigure -00009518 g F .text 0000003c PWMSyncTimeBase -00009ec8 g F .text 0000003a QEIPositionGet -0000a5bc g F .text 00000042 SSIIntStatus -00008bc8 g F .text 00000038 IntPriorityGroupingSet -00005368 g F .text 00000058 ComparatorIntUnregister -0000453c g F .text 0000005e ADCIntEnable -0000bbd8 g F .text 00000028 SysTickPeriodSet -00006e10 g F .text 000000aa GPIOIntTypeSet -000063f0 g F .text 00000010 FlashUsecGet -000061f8 g F .text 00000030 EthernetIntUnregister -000089c4 g F .text 00000048 I2SIntDisable -0000cc1c g F .text 000000c6 UARTModemControlClear -0000db50 g F .text 00000070 USBIntStatus -000054e8 g F .text 00000008 CPUcpsid -000099d0 g F .text 0000002c PWMIntStatus -0000773c g F .text 0000006c HibernateEnableExpClk -0000d984 g F .text 00000010 uDMAIntUnregister -0000d944 g F .text 00000040 uDMAIntRegister -0000e254 g F .text 00000142 USBHostEndpointDataToggle -00006a50 g F .text 0000000c FlashIntClear -00005500 g F .text 00000004 CPUwfi -00005a90 g F .text 00000026 EPIWriteFIFOCountGet -0000c2d8 g F .text 0000004a TimerValueGet -0000f0ec g F .text 000000f8 USBDevEndpointDataAck -000094dc g F .text 0000003c PWMSyncUpdate -0000d434 g F .text 0000000c uDMAControlBaseGet -0000b144 g F .text 00000020 SysCtlDeepSleep -0000e940 g F .text 00000154 USBDevEndpointConfigSet -00009fc8 g F .text 00000040 QEIVelocityEnable -000054f0 g F .text 00000006 CPUprimask -0000a274 g F .text 0000003c QEIIntClear -0000cce4 g F .text 000000a8 UARTModemControlGet -0000c060 g F .text 00000024 TimerRTCEnable -00006484 g F .text 00000120 FlashProgram -000063d0 g F .text 00000020 EthernetPHYPowerOn -0000825c g F .text 0000003e I2CMasterBusBusy -00004d1c g F .text 000000d4 ADCSoftwareOversampleDataGet -00005f88 g F .text 00000042 EthernetDisable -0000a154 g F .text 00000054 QEIIntUnregister -0000c740 g F .text 0000002e UARTFIFOLevelGet -000062b0 g F .text 0000002c EthernetIntStatus -0000f81c g F .text 000000f0 USBHostAddrGet -00009920 g F .text 00000042 PWMIntEnable -0000a600 g F .text 0000003c SSIIntClear -0000fbec g F .text 00000036 USBHostPwrDisable -000067f8 g F .text 0000006e FlashProtectSave -0000c3cc g F .text 000000a8 TimerIntRegister -00006410 g F .text 00000072 FlashErase -000079f8 g F .text 0000000c HibernateRTCTrimGet -0000b09c g F .text 0000005c SysCtlLDOSet -000051cc g F .text 00000050 ADCPhaseDelaySet -00005258 g F .text 00000044 ComparatorConfigure -00005c1c g F .text 00000030 EPIIntUnregister -00004354 g F .text 00000028 main -000084e4 g F .text 0000002e I2STxDisable -00005afc g F .text 00000044 EPIIntDisable -0000b394 g F .text 000002e2 SysCtlClockGet -0000a7a4 g F .text 00000042 SSIDMAEnable -00007b74 g F .text 00000024 HibernateIntStatus -00005450 g F .text 00000052 ComparatorIntStatus -0000883c g F .text 00000038 I2STxRxEnable -000054a4 g F .text 00000042 ComparatorIntClear -0000c230 g F .text 0000005c TimerLoadSet -0000ba28 g F .text 00000122 SysCtlI2SMClkSet -0000d3f0 g F .text 00000042 uDMAControlBaseSet -0000b80c g F .text 00000026 SysCtlIOSCVerificationSet -000069f8 g F .text 00000014 FlashIntUnregister -000060ec g F .text 00000064 EthernetPacketPutNonBlocking -0000cfa0 g F .text 0000004c UARTTxIntModeSet -0000c7ec g F .text 00000038 UARTDisable -000050f4 g F .text 0000003c ADCComparatorIntClear -00005f44 g F .text 00000042 EthernetEnable -0000fcc4 g F .text 00000102 USBEndpointDMAChannel -000092c4 g F .text 00000044 PWMGenEnable -0000897c g F .text 00000048 I2SIntEnable -0000b020 g F .text 00000016 SysCtlIntRegister -00008f88 g F .text 00000034 MPURegionEnable -00008384 g F .text 0000003c I2CMasterDataPut -0000ba00 g F .text 00000012 SysCtlUSBPLLEnable -00008b98 g F .text 0000002e IntUnregister -000072e8 g F .text 0000003a GPIOPinTypeCAN -0000b038 g F .text 00000014 SysCtlIntUnregister -00008728 g F .text 0000007e I2SRxConfigSet -0000766c g F .text 0000003a GPIOPinTypeEPI -0000f1e4 g F .text 000000f6 USBHostEndpointDataAck -00004114 g F .text 00000046 BootComInit -000053c0 g F .text 00000046 ComparatorIntEnable -00005bd4 g F .text 00000046 EPIIntRegister -0000521c g F .text 0000003a ADCPhaseDelayGet -0000de20 g F .text 0000003c USBIntDisableEndpoint -00009658 g F .text 0000004a PWMOutputFault -00008814 g F .text 00000026 I2SRxFIFOLevelGet -00006a34 g F .text 0000001a FlashIntStatus -0000d248 g F .text 00000026 UARTIntStatus -00009e3c g F .text 00000040 QEIDisable -00004b6c g F .text 000000a6 ADCSoftwareOversampleConfigure -00009418 g F .text 0000007a PWMDeadBandEnable -000075f4 g F .text 0000003a GPIOPinTypeI2S -0000a758 g F .text 0000004a SSIDataGetNonBlocking -00008af8 g F .text 0000000a IntMasterEnable -0000dce8 g F .text 00000068 USBIntDisableControl -000043ac g F .text 0000002c TimeInit -00008b10 g F .text 00000086 IntRegister -0000c590 g F .text 00000020 TimerIntClear -0000fe38 g F .text 00000038 WatchdogRunning -00005e78 g F .text 0000006c EthernetMACAddrSet -000095a0 g F .text 0000004a PWMOutputInvert -0000d2e0 g F .text 00000022 UARTRxErrorGet -00009750 g F .text 00000034 PWMFaultIntRegister -0000b750 g F .text 00000086 SysCtlADCSpeedSet -0000780c g F .text 00000012 HibernateRTCDisable -000095ec g F .text 0000006a PWMOutputFaultLevel -0000b184 g F .text 00000042 SysCtlBrownOutConfigSet -0000459c g F .text 00000086 ADCIntStatus -00005a48 g F .text 00000048 EPIFIFOConfig -0000d348 g F .text 0000000c uDMAErrorStatusGet -00008b04 g F .text 0000000a IntMasterDisable -0000e6d4 g F .text 0000002a USBDevConnect -0000757c g F .text 0000003a GPIOPinTypeUSBDigital -00008d70 g F .text 000000a8 IntDisable -0000ee80 g F .text 00000024 USBEndpointDMAEnable -00008c38 g F .text 00000050 IntPrioritySet -000071dc g F .text 00000022 GPIOPinIntClear -000069e0 g F .text 00000016 FlashIntRegister -00004394 g F .text 0000000c TimeDeinit -20000000 g .data 00000000 _data -00006364 g F .text 0000004a EthernetPHYRead -000042e4 g F .text 0000006e LedToggle -0000d328 g F .text 00000010 uDMAEnable -0000a534 g F .text 00000042 SSIIntEnable -0000a008 g F .text 00000040 QEIVelocityDisable -0000d08c g F .text 00000026 UARTCharGet -000043fc g F .text 0000006e ADCIntRegister -0000c6cc g F .text 00000074 UARTFIFOLevelSet -0000f4f0 g F .text 00000122 USBFIFOFlush -0000a448 g F .text 00000040 SSIDisable -00007e10 g F .text 00000054 I2CIntUnregister -00005560 g F .text 00000026 EPIDividerSet -0000d930 g F .text 00000012 uDMAChannelSelectDefault -0000c958 g F .text 00000024 UARTFIFOEnable -0000693c g F .text 000000a2 FlashUserSave -0000fdc8 g F .text 0000002a USBHostMode -000097b4 g F .text 00000064 PWMGenIntTrigEnable -00007db8 g F .text 00000058 I2CIntRegister -00007820 g F .text 0000002e HibernateWakeSet -0000b834 g F .text 00000026 SysCtlMOSCVerificationSet -0000dad4 g F .text 00000038 USBHostResume -0000b04c g F .text 00000012 SysCtlIntEnable -00005130 g F .text 0000005a ADCReferenceSet -0000cefc g F .text 000000a4 UARTFlowControlGet -00009dfc g F .text 00000040 QEIEnable -20000284 g .bss 00000000 _estack -0000a0fc g F .text 00000058 QEIIntRegister -00009964 g F .text 00000042 PWMIntDisable -0000e014 g F .text 00000106 USBHostEndpointStatusClear -00005dd0 g F .text 0000006e EthernetConfigSet -0000cfec g F .text 00000022 UARTTxIntModeGet -00007c14 g F .text 00000072 I2CMasterInitExpClk -000086b8 g F .text 00000034 I2SRxDataGet -2000011c g .data 00000000 _edata -0000df28 g F .text 000000ea USBEndpointStatus -0000ff60 g F .text 0000003e WatchdogUnlock -0000ea94 g F .text 00000184 USBDevEndpointConfigGet -00006400 g F .text 00000010 FlashUsecSet -0000ffa0 g F .text 0000003e WatchdogLockState -000083c0 g F .text 0000003a I2CMasterDataGet -0000529c g F .text 00000026 ComparatorRefSet -0000faec g F .text 00000066 USBHostPwrConfig -00009058 g F .text 00000064 MPURegionGet -00004000 g O .text 000000f4 _vectab -00007bc4 g F .text 00000010 HibernateIsActive -00007ee4 g F .text 00000042 I2CSlaveIntEnableEx -0000fdf4 g F .text 0000002a USBDevMode -00006868 g F .text 00000080 FlashUserGet -0000c568 g F .text 00000026 TimerIntStatus -00008f30 g F .text 00000008 IntPriorityMaskGet -00007504 g F .text 0000003a GPIOPinTypeTimer -00008a0c g F .text 00000030 I2SIntStatus -0000b85c g F .text 00000026 SysCtlPLLVerificationSet -000046d8 g F .text 0000005e ADCSequenceDisable -00007540 g F .text 0000003a GPIOPinTypeUART -00007324 g F .text 0000003a GPIOPinTypeComparator -000091f4 g F .text 00000082 PWMGenPeriodSet -0000d364 g F .text 0000002c uDMAChannelEnable -00005ff8 g F .text 0000002e EthernetSpaceAvail -000098c4 g F .text 0000005a PWMGenIntClear -000077a8 g F .text 00000012 HibernateDisable -0000bb94 g F .text 0000001c SysTickIntUnregister -00005504 g F .text 00000006 CPUbasepriSet -0000c16c g F .text 00000070 TimerPrescaleMatchSet -00007bd4 g F .text 00000040 I2CMasterEnable -0000739c g F .text 0000003a GPIOPinTypeGPIOOutput -0000b678 g F .text 0000008e SysCtlPWMClockSet -0000de98 g F .text 0000002c USBIntStatusEndpoint -0000fc8c g F .text 0000000a USBFIFOAddrGet -000065a4 g F .text 000000c4 FlashProtectGet -00007b1c g F .text 0000002c HibernateIntDisable -0000799c g F .text 0000005c HibernateRTCTrimSet -00004274 g F .text 00000024 IrqInterruptDisable -0000fee8 g F .text 0000003a WatchdogResetDisable -000090e8 g F .text 00000014 MPUIntUnregister -0000626c g F .text 00000042 EthernetIntDisable -0000b074 g F .text 0000000c SysCtlIntClear -0000c474 g F .text 000000a2 TimerIntUnregister -00005e40 g F .text 00000038 EthernetConfigGet -00008cc8 g F .text 000000a8 IntEnable -0000415c g F .text 000000ac BootComCheckActivationRequest -0000e72c g F .text 00000028 USBDevAddrSet -000062dc g F .text 0000003c EthernetIntClear -0000e11c g F .text 00000138 USBDevEndpointStatusClear -0000d140 g F .text 00000022 UARTBusy -0000ec18 g F .text 00000136 USBFIFOConfigSet -0000794c g F .text 00000044 HibernateRTCMatch1Set -000043d8 g F .text 0000000c TimeGet -0000e778 g F .text 000001c6 USBHostEndpointConfig -000100c4 g F .text 00000040 WatchdogIntUnregister -00007e64 g F .text 0000003e I2CMasterIntEnable -00006318 g F .text 0000004c EthernetPHYWrite -000076a8 g F .text 00000084 GPIOPinConfigure -00008570 g F .text 0000005a I2STxConfigSet -0000b884 g F .text 00000016 SysCtlClkVerificationClear -000054f8 g F .text 00000008 CPUcpsie -00006d58 g F .text 0000005e GPIODirModeSet -0000d1b0 g F .text 00000048 UARTIntUnregister -00004df0 g F .text 000000a6 ADCHardwareOversampleConfigure -0000afb8 g F .text 0000003e SysCtlPeripheralDeepSleepDisable -20000184 g .bss 00000000 _stack -0000fb54 g F .text 00000030 USBHostPwrFaultEnable -0000a0c0 g F .text 0000003a QEIVelocityGet -000049c8 g F .text 0000005c ADCSequenceUnderflow -00009adc g F .text 000000f0 PWMGenFaultTriggerSet -00006ebc g F .text 0000006a GPIOIntTypeGet -0000bb4c g F .text 00000012 SysTickEnable -00006668 g F .text 00000190 FlashProtectSet -0000d304 g F .text 00000022 UARTRxErrorClear -00008540 g F .text 00000030 I2STxDataPutNonBlocking -0000aec0 g F .text 0000003e SysCtlPeripheralDisable -0000f2dc g F .text 00000114 USBEndpointDataPut -0000da9c g F .text 00000038 USBHostReset -0000789c g F .text 00000010 HibernateLowBatGet -0000bbb0 g F .text 00000012 SysTickIntEnable -0000d290 g F .text 00000026 UARTDMAEnable -0000c824 g F .text 00000134 UARTConfigSetExpClk -0000f614 g F .text 000000ec USBHostRequestIN -000087e4 g F .text 0000002e I2SRxFIFOLimitGet -0000821c g F .text 0000003e I2CMasterBusy -000071b0 g F .text 0000002a GPIOPinIntStatus -00005828 g F .text 00000046 EPINonBlockingReadStop -0000ba14 g F .text 00000012 SysCtlUSBPLLDisable -0000e700 g F .text 0000002a USBDevDisconnect -0000b1d0 g F .text 000001c2 SysCtlClockSet -0000bd24 g F .text 00000104 TimerConfigure -0000be98 g F .text 0000006e TimerControlTrigger -0000adc0 g F .text 00000060 SysCtlPeripheralPresent -00006f28 g F .text 00000168 GPIOPadConfigSet -0000c9a0 g F .text 00000032 UARTEnableSIR -000090bc g F .text 0000002a MPUIntRegister -00004c14 g F .text 00000108 ADCSoftwareOversampleStepConfigure -0000e5a0 g F .text 00000132 USBDevEndpointStallClear -0000a230 g F .text 00000042 QEIIntStatus -0000c7bc g F .text 00000030 UARTEnable -00008650 g F .text 00000036 I2SRxEnable -0000c644 g F .text 00000064 UARTParityModeSet -0001004c g F .text 00000034 WatchdogValueGet -000096a4 g F .text 00000056 PWMGenIntRegister +00002468 g F .text 00000002 UnusedISR +000022a8 g F .text 00000042 LedInit +00002454 g F .text 00000012 TimeISRHandler +00003414 g F .text 00000036 UARTCharGetNonBlocking +20000000 g .bss 00000000 _bss +000031bc g F .text 00000012 SysTickIntDisable +000031d0 g F .text 0000002e SysTickPeriodSet +0000236c g F .text 00000052 main +00002e9c g F .text 000002e2 SysCtlClockGet +00003278 g F .text 00000044 UARTDisable +00002118 g F .text 0000005c BootComInit +000028c4 g F .text 00000010 IntMasterEnable +000023fc g F .text 0000004a TimeInit +000023d8 g F .text 00000018 TimeDeinit +20000000 g .text 00000000 _data +000022ec g F .text 00000080 LedToggle +2000015c g .bss 00000000 _estack +20000000 g .text 00000000 _edata +00002000 g O .text 000000f4 _vectab +00002870 g F .text 00000052 GPIOPinTypeUART +0000281c g F .text 00000052 GPIOPinTypeGPIOOutput +00002174 g F .text 000000bc BootComCheckActivationRequest +00002448 g F .text 0000000c TimeGet +0000246c g F .text 00000008 CPUcpsie +000025fc g F .text 00000070 GPIODirModeSet +2000005c g .bss 00000000 _stack +00003180 g F .text 00000012 SysTickEnable +000031a8 g F .text 00000012 SysTickIntEnable +000032bc g F .text 00000158 UARTConfigSetExpClk +00002cc0 g F .text 000001da SysCtlClockSet +0000266c g F .text 00000180 GPIOPadConfigSet +0000323c g F .text 0000003c UARTEnable diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.srec index a0136dfc..c756bdff 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.srec +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/bin/demoprog_ek_lm3s6965.srec @@ -1,3181 +1,340 @@ S020000062696E2F64656D6F70726F675F656B5F6C6D3373363936352E7372656358 -S2140040008402002009420000F9430000F943000042 -S214004010F9430000F9430000F9430000F9430000AB -S214004020F9430000F9430000F9430000F94300009B -S214004030F9430000F9430000F9430000E54300009F -S214004040F9430000F9430000F9430000F94300007B -S214004050F9430000F9430000F9430000F94300006B -S214004060F9430000F9430000F9430000F94300005B -S214004070F9430000F9430000F9430000F94300004B -S214004080F9430000F9430000F9430000F94300003B -S214004090F9430000F9430000F9430000F94300002B -S2140040A0F9430000F9430000F9430000F94300001B -S2140040B0F9430000F9430000F9430000F94300000B -S2140040C0F9430000F9430000F9430000F9430000FB -S2140040D0F9430000F9430000F9430000F9430000EB -S2140040E0F9430000F9430000F9430000F9430000DB -S2140040F0EE11AA5510B504464FF44040C4F2000035 -S21400410008F0AEFFB0F1FF3F1ABF2070012000207C -S21400411010BD00BF08B54FF00100C1F2000006F068 -S214004120B1FE4FF00100C2F2000006F0ABFE4FF405 -S2140041308040C4F200004FF0030103F001FA07F0DC -S21400414029F901464FF44040C4F200004FF46142A2 -S2140041504FF0600308F066FB08BD00BF08B540F2EC -S2140041601C13C2F200031B78B3B940F22010C2F24F -S2140041700000FFF7BFFF012842D140F21C13C2F235 -S21400418000034FF001021A7040F21D13C2F2000342 -S2140041904FF000021A7008BD40F21D13C2F2000371 -S2140041A01878184BC018FFF7A5FF012828D140F251 -S2140041B01D13C2F200031A7802F10102D2B21A707D -S2140041C040F22013C2F200031B78934218D140F24B -S2140041D01C13C2F200034FF000021A7040F22013C4 -S2140041E0C2F200035B78FF2B0AD140F22013C2F222 -S2140041F000039B7823B900F0CDF84FF0F103984701 -S21400420008BD00BF2101002008B515498D4640F2C3 -S2140042100002C2F2000240F21C13C2F200039A42ED -S21400422011D240F28452C0F2010240F20003C2F200 -S214004230000340F21C10C2F2000052F8041B43F8C0 -S214004240041B8342F9D3074807494FF0000288420F -S214004250B8BF40F8042BFADB00F07CF808BD00007D -S214004260840200201C0100208401002008B504F010 -S21400427043FC08BD08B540F26413C2F200031B7885 -S2140042800BB904F03FFC40F26413C2F200031A7844 -S21400429002F101021A7008BD08B540F26413C2F2BA -S2140042A000031A7802F1FF32D2B21A700AB904F08B -S2140042B023FC08BD10B54FF02000C2F2000006F047 -S2140042C0E1FD4FF4A044C4F2020420464FF0010181 -S2140042D003F064F820464FF001014FF0000202F0B0 -S2140042E0D3FF10BD10B500F077F8044640F268130F -S2140042F0C2F200031B68C31AB3F5FA7F28D340F254 -S2140043006C13C2F200031B7873B940F26C13C2F24E -S21400431000034FF001021A704FF4A040C4F20200EE -S214004320114602F0B1FF0EE040F26C13C2F2000339 -S2140043304FF000021A704FF4A040C4F202004FF093 -S214004340010102F0A1FF40F26813C2F200031C60F4 -S21400435010BD00BF08B54FF46070C0F2C01006F084 -S21400436037FFFFF7A7FF00F021F8FFF77FFFFFF703 -S214004370D1FEFFF7B7FFFFF7F1FEFAE740F2701342 -S214004380C2F20003186040F27413C2F20003196010 -S214004390FEE700BF08B507F015FC07F0E1FB08BD17 -S2140043A040F27813C2F200031860704708B506F0B2 -S2140043B0F1FF44F6D353C1F26203A3FB00204FEA99 -S2140043C0901007F009FC07F0C1FB07F0F1FB4FF077 -S2140043D00000FFF7E5FF08BD40F27813C2F20003C5 -S2140043E01868704740F27813C2F200031A6802F1A8 -S2140043F001021A60704700BFFEE700BF70B50446B2 -S2140044000D4616464FF40043C4F203034FF4104221 -S214004410C4F20302821A18BF012298420CBF00237E -S21400442002F001033BB140F23420C0F201004FF02D -S2140044305D01FFF7A3FF032D07D940F23420C0F239 -S21400444001004FF05E01FFF799FF4FF40043C4F2FE -S21400445003039C420CBF1E3540352846314604F007 -S21400446057FB284604F030FC70BD00BF38B5044644 -S2140044700D464FF40043C4F203034FF41042C4F257 -S2140044800302821A18BF012298420CBF002302F0D2 -S21400449001033BB140F23420C0F201004FF08A0124 -S2140044A0FFF76CFF032D07D940F23420C0F201005D -S2140044B04FF08B01FFF762FF4FF40043C4F2030393 -S2140044C09C420CBF05F11E0405F14004204604F092 -S2140044D04FFC204604F060FB38BD00BF38B50446EC -S2140044E00D464FF40043C4F203034FF41042C4F2E7 -S2140044F00302821A18BF012298420CBF002302F062 -S21400450001033BB140F23420C0F201004FF0B0018D -S214004510FFF734FF032D07D940F23420C0F2010024 -S2140045204FF0B101FFF72AFFA3684FF0010202FA2D -S21400453005F523EA0505A56038BD00BF38B5044675 -S2140045400D464FF40043C4F203034FF41042C4F286 -S2140045500302821A18BF012298420CBF002302F001 -S21400456001033BB140F23420C0F201004FF0CD0110 -S214004570FFF704FF032D07D940F23420C0F20100F4 -S2140045804FF0CE01FFF7FAFE4FF0010303FA05F5F0 -S214004590E560A3681D43A56038BD00BF70B504463E -S2140045A00D4616464FF40043C4F203034FF4104280 -S2140045B0C4F20302821A18BF012298420CBF0023DD -S2140045C002F001033BB140F23420C0F201004FF08C -S2140045D0F401FFF7D3FE032D07D940F23420C0F2D2 -S2140045E001004FF0F501FFF7C9FE3EB1E3684FF05A -S2140045F0011000FA05F505EA030070BD63684FF088 -S214004600010000FA05F040F48030184010F4803FB6 -S2140046101FBF4FF4803303FA05F540F47020A8431B -S21400462070BD00BF38B504460D464FF40043C4F2D3 -S21400463003034FF41042C4F20302821A18BF012289 -S21400464098420CBF002302F001033BB140F2342035 -S214004650C0F2010040F23111FFF790FE032D07D99A -S21400466040F23420C0F201004FF49971FFF786FE45 -S2140046704FF0010303FA05F5E56038BD38B504468A -S2140046800D464FF40043C4F203034FF41042C4F245 -S2140046900302821A18BF012298420CBF002302F0C0 -S2140046A001033BB140F23420C0F2010040F24D114C -S2140046B0FFF764FE032D07D940F23420C0F2010054 -S2140046C04FF4A771FFF75AFE23684FF0010202FA73 -S2140046D005F51D43256038BD38B504460D464FF434 -S2140046E00043C4F203034FF41042C4F20302821ADA -S2140046F018BF012298420CBF002302F001033BB111 -S21400470040F23420C0F2010040F26911FFF736FE95 -S214004710032D07D940F23420C0F201004FF4B571E2 -S214004720FFF72CFE23684FF0010202FA05F523EA94 -S2140047300505256038BD00BFF8B504460E4615468B -S2140047401F464FF40043C4F203034FF41042C4F272 -S2140047500302821A18BF012298420CBF002302F0FF -S21400476001033BB140F23420C0F201004FF4D8718F -S214004770FFF704FE032E07D940F23420C0F20100F2 -S21400478040F2B111FFF7FAFDB5F10F0318BF012390 -S214004790092D94BF002303F001033BB140F23420FF -S2140047A0C0F201004FF4DE71FFF7E8FD032F07D9D2 -S2140047B040F23420C0F2010040F2BD11FFF7DEFDEA -S2140047C062694FEA86064FF00F0303FA06F36FEAB4 -S2140047D0030303EA020205F00F0505FA06F542EAAE -S2140047E005056561226A134007F0030707FA06F617 -S2140047F043EA06062662F8BDF8B504460D46174697 -S2140048001E464FF40043C4F203034FF41042C4F2B2 -S2140048100302821A18BF012298420CBF002302F03E -S21400482001033BB140F23420C0F201004FF40471A2 -S214004830FFF7A4FD032D07D940F23420C0F2010093 -S21400484040F21121FFF79AFD072F94BF00230123A2 -S214004850002D18BF43F00103F3B1032F94BF0023CC -S2140048600123012D0CBF1A4643F00102A2B1022D0E -S21400487018BF43F001037BB13B1E18BF0123032D75 -S21400488018BF43F001033BB140F23420C0F20100F0 -S21400489040F21521FFF772FD05F102054FEA4515B6 -S2140048A02B1928594FEA87074FF00F0202FA07F232 -S2140048B06FEA020202EA000006F00F0101FA07F1B1 -S2140048C040EA0101295158681040C6F3031101FA65 -S2140048D007F140EA0101596016F4702F11D05969AA -S2140048E001EA0202C6F3024606FA07F632435A61A6 -S2140048F01A694FF0010101FA07F742EA07071F613C -S214004900F8BD1A694FF0010101FA07F722EA070716 -S2140049101F61F8BD38B504460D464FF40043C4F297 -S21400492003034FF41042C4F20302821A18BF012296 -S21400493098420CBF002302F001033BB140F2342042 -S214004940C0F201004FF41971FFF718FD032D07D9C7 -S21400495040F23420C0F2010040F26521FFF70EFD60 -S21400496023694FF0010202FA05F505EA030038BD97 -S21400497038B504460D464FF40043C4F203034FF423 -S2140049801042C4F20302821A18BF012298420CBFDA -S214004990002302F001033BB140F23420C0F20100D4 -S2140049A040F28121FFF7EAFC032D07D940F23420BC -S2140049B0C0F2010040F28221FFF7E0FC4FF0010355 -S2140049C003FA05F5256138BD38B504460D464FF4A3 -S2140049D00043C4F203034FF41042C4F20302821AE7 -S2140049E018BF012298420CBF002302F001033BB11E -S2140049F040F23420C0F2010040F29E21FFF7BEFCD8 -S214004A00032D07D940F23420C0F2010040F29F2166 -S214004A10FFF7B4FCA3694FF0010202FA05F505EAB8 -S214004A20030038BD38B504460D464FF40043C4F2C3 -S214004A3003034FF41042C4F20302821A18BF012285 -S214004A4098420CBF002302F001033BB140F2342031 -S214004A50C0F2010040F2BB21FFF790FC032D07D9FE -S214004A6040F23420C0F201004FF42F71FFF786FCAD -S214004A704FF0010303FA05F5A56138BD70B505468C -S214004A800E4614464FF40043C4F203034FF410429C -S214004A90C4F20302821A18BF012298420CBF0023F8 -S214004AA002F001033BB140F23420C0F2010040F2B4 -S214004AB0DF21FFF763FC032E07D940F23420C0F253 -S214004AC001004FF43871FFF759FC06F102064FEA71 -S214004AD04616751905F10C02EB6813F4807F0DD1AC -S214004AE04FF00000AB6844F8043B00F10100136887 -S214004AF013F4807F04D10828F4D170BD4FF0000075 -S214004B0070BD00BF38B504460D464FF40043C4F2EE -S214004B1003034FF41042C4F20302821A18BF0122A4 -S214004B2098420CBF002302F001033BB140F2342050 -S214004B30C0F2010040F21731FFF720FC05F00F032A -S214004B40032B07D940F23420C0F201004FF446711F -S214004B50FFF714FC05F00F034FF0010202FA03F30F -S214004B604FEA154543EA0545A56238BD38B50D46FA -S214004B7014464FF40043C4F203034FF41042C4F249 -S214004B800302821A18BF012298420CBF002202F0CC -S214004B9001023AB140F23420C0F2010040F2423144 -S214004BA0FFF7ECFB022D07D940F23420C0F20100DB -S214004BB040F24331FFF7E2FB231F18BF0123022C0C -S214004BC00CBF002303F001030BB1082C09D1082CFD -S214004BD014BF00230123002D0CBF002303F00103A4 -S214004BE03BB140F23420C0F2010040F24531FFF7FD -S214004BF0C5FB640808BF002305D04FF0000303F18F -S214004C0001036408FBD140F27C12C2F20002535545 -S214004C1038BD00BF2DE9F04105460C4616461F4636 -S214004C204FF40043C4F203034FF41042C4F20302ED -S214004C30821A18BF012298420CBF002302F001031B -S214004C403BB140F23420C0F2010040F26E31FFF773 -S214004C5095FB022C07D940F23420C0F2010040F246 -S214004C606F31FFF78BFB54B940F27C13C2F200039E -S214004C701B784FF0080242FA03F3B34212D840F210 -S214004C807C13C2F200031B5D4FF0040242FA03F3EA -S214004C909E4207D340F23420C0F2010040F2723147 -S214004CA0FFF76CFB04F102034FEA43135D1940F271 -S214004CB07C13C2F200031A5D4FF0010393402BD021 -S214004CC04FF0040101FA02F206FB02F6C7F30314E2 -S214004CD04FF00F0007404FF0060C296800FA06F266 -S214004CE06FEA020202EA010107FA06F841EA080141 -S214004CF0296069680A4004FA06F10A436A60012BD3 -S214004D000AD06A680CFA06F122EA01026A60013BE0 -S214004D1002D006F10406E0E7BDE8F0812DE9F04197 -S214004D2006460D4617461C464FF40043C4F20303DE -S214004D304FF41042C4F20302821A18BF01229842AE -S214004D400CBF002302F001033BB140F23420C0F256 -S214004D5001004FF46F71FFF711FB022D07D940F2E7 -S214004D603420C0F2010040F2BD31FFF707FB55B911 -S214004D7040F27C13C2F200031B784FF0080242FA9E -S214004D8003F3A34212D840F27C13C2F200035B5D29 -S214004D904FF0040242FA03F39C4207D340F2342059 -S214004DA0C0F201004FF47071FFF7E8FA05F1020354 -S214004DB04FEA43139E19CCB140F27C13C2F20003B3 -S214004DC05D5D4FF0010000FA05F04FF0000C8046E4 -S214004DD0624628B143466246B1685218013BFBD191 -S214004DE022FA05F247F8042B013CF1D1BDE8F08128 -S214004DF038B505460C464FF40043C4F203034FF49F -S214004E001042C4F20302821A18BF012298420CBF55 -S214004E10002302F001033BB140F23420C0F201004F -S214004E2040F20441FFF7AAFAA31E18BF0123002C84 -S214004E300CBF002303F00103EBB1B4F1080318BF65 -S214004E400123042C0CBF002303F001039BB1B4F133 -S214004E50200318BF0123102C0CBF002303F001030E -S214004E604BB1402C12D040F23420C0F2010040F288 -S214004E700741FFF783FA640808BF002308D103E060 -S214004E8003F101036408FBD12B6338BD4FF0200407 -S214004E904FF00003F4E700BF70B504460D46164613 -S214004EA04FF40043C4F203034FF41042C4F203026B -S214004EB0821A18BF012298420CBF002302F0010399 -S214004EC03BB140F23420C0F2010040F26441FFF7EB -S214004ED055FA072D07D940F23420C0F2010040F2FF -S214004EE06541FFF74BFA04F5606444F8256070BD31 -S214004EF0F8B505460F4616461C464FF40043C4F266 -S214004F0003034FF41042C4F20302821A18BF0122B0 -S214004F1098420CBF002302F001033BB140F234205C -S214004F20C0F201004FF49161FFF728FA072F07D966 -S214004F3040F23420C0F2010040F28941FFF71EFA29 -S214004F40A64294BF00230123B6F5806F28BF43F026 -S214004F5001033BB140F23420C0F2010040F28A4126 -S214004F60FFF70CFAB4F5806F07D340F23420C0F296 -S214004F70010040F28B41FFF701FA05F5646546EA49 -S214004F80044445F82740F8BDF8B504460D461646D5 -S214004F901F464FF40043C4F203034FF41042C4F21A -S214004FA00302821A18BF012298420CBF002302F0A7 -S214004FB001033BB140F23420C0F2010040F2AC41A4 -S214004FC0FFF7DCF9072D07D940F23420C0F20100C4 -S214004FD040F2AD41FFF7D2F905F110034FF00102A0 -S214004FE002FA03F30EB94FF0000327B14FF00102A7 -S214004FF002FA05F52B43C4F8003DF8BD38B5044663 -S2140050000D464FF40043C4F203034FF41042C4F2BB -S2140050100302821A18BF012298420CBF002302F036 -S21400502001033BB140F23420C0F2010040F2D1410E -S214005030FFF7A4F9032D07D940F23420C0F201008F -S21400504040F2D241FFF79AF9A3684FF4803202FA91 -S21400505005F523EA0505A56038BD00BF38B504464A -S2140050600D464FF40043C4F203034FF41042C4F25B -S2140050700302821A18BF012298420CBF002302F0D6 -S21400508001033BB140F23420C0F2010040F2EC4193 -S214005090FFF774F9032D07D940F23420C0F201005F -S2140050A040F2ED41FFF76AF9A3684FF4803202FA46 -S2140050B005F51D43A56038BD10B504464FF4004302 -S2140050C0C4F203034FF41042C4F20302821A18BF5C -S2140050D0012298420CBF002302F001033BB140F2CC -S2140050E03420C0F2010040F20751FFF747F9606B29 -S2140050F010BD00BF38B504460D464FF40043C4F259 -S21400510003034FF41042C4F20302821A18BF0122AE -S21400511098420CBF002302F001033BB140F234205A -S214005120C0F2010040F22151FFF728F9656338BD4F -S21400513038B504460D464FF40043C4F203034FF45B -S2140051401042C4F20302821A18BF012298420CBF12 -S214005150002302F001033BB140F23420C0F201000C -S21400516040F24351FFF70AF9012D07D940F23420E7 -S214005170C0F2010040F24451FFF700F9A36B23F0A0 -S214005180010343EA0505A56338BD00BF10B5044614 -S2140051904FF40043C4F203034FF41042C4F2030278 -S2140051A0821A18BF012298420CBF002302F00103A6 -S2140051B03BB140F23420C0F2010040F26351FFF7E9 -S2140051C0DDF8A06B00F0010010BD00BF38B5044646 -S2140051D00D464FF40043C4F203034FF41042C4F2EA -S2140051E00302821A18BF012298420CBF002302F065 -S2140051F001033BB140F23420C0F2010040F28B5173 -S214005200FFF7BCF80F2D07D940F23420C0F201009A -S21400521040F29351FFF7B2F8656238BD10B5044608 -S2140052204FF40043C4F203034FF41042C4F20302E7 -S214005230821A18BF012298420CBF002302F0010315 -S2140052403BB140F23420C0F2010040F2B151FFF70A -S21400525095F8606A10BD00BF70B505460C46164648 -S2140052604FF44043C4F20303984207D040F248206C -S214005270C0F201004FF06801FFF780F8022C07D952 -S21400528040F24820C0F201004FF06901FFF776F8BF -S21400529005F124054FEA44142E5170BD38B5044676 -S2140052A00D464FF44043C4F20303984207D040F241 -S2140052B04820C0F201004FF0A201FFF75FF8256119 -S2140052C038BD00BF38B505460C464FF44043C4F21F -S2140052D00303984207D040F24820C0F201004FF086 -S2140052E0BD01FFF74BF8022C07D940F24820C0F268 -S2140052F001004FF0BE01FFF741F805F120054FEA27 -S21400530044142859C0F3400038BD00BFF8B506461F -S2140053100C4617464FF44043C4F20303984207D0A6 -S21400532040F24820C0F201004FF0E901FFF726F8EE -S214005330022C07D940F24820C0F201004FF0EA01E3 -S214005340FFF71CF804F129052846394603F0E0FB70 -S214005350284603F0B9FCB3684FF0010202FA04F4E1 -S2140053601C43B460F8BD00BF38B505460C464FF484 -S2140053704043C4F20303984207D040F24820C0F2EC -S214005380010040F21311FEF7F9FF022C07D940F294 -S2140053904820C0F201004FF48A71FEF7EFFFAA68BA -S2140053A04FF0010303FA04F322EA0303AB6004F1AF -S2140053B02904204603F0DCFC204603F0EDFB38BD54 -S2140053C038B504460D464FF44043C4F203039842F2 -S2140053D007D040F24820C0F201004FF49D71FEF75E -S2140053E0CDFF022D07D940F24820C0F2010040F25E -S2140053F03B11FEF7C3FFA3684FF0010202FA05F562 -S2140054001D43A56038BD00BF38B504460D464FF4B1 -S2140054104043C4F20303984207D040F24820C0F24B -S214005420010040F25711FEF7A9FF022D07D940F2FE -S2140054304820C0F201004FF4AC71FEF79FFFA3684E -S2140054404FF0010202FA05F523EA0505A56038BD0E -S21400545070B505460C4616464FF44043C4F20303A7 -S214005460984207D040F24820C0F2010040F277117F -S214005470FEF784FF022C07D940F24820C0F2010054 -S2140054804FF4BC71FEF77AFF2EB1286820FA04F4B8 -S21400549004F0010070BD686820FA04F404F001000E -S2140054A070BD00BF38B504460D464FF44043C4F205 -S2140054B00303984207D040F24820C0F201004FF4A0 -S2140054C0D371FEF75BFF022D07D940F24820C0F2E9 -S2140054D0010040F2A711FEF751FF4FF0010303FA57 -S2140054E005F5256038BD00BFEFF3108072B6704733 -S2140054F0EFF31080704700BFEFF3108062B670477E -S21400550030BF704780F31188704700BFEFF31180FB -S214005510704700BF38B505460C464FF00003C4F28E -S2140055200D03984207D040F26020C0F201004FF011 -S2140055304401FEF723FFA4F11002231E18BF012327 -S214005540032A94BF002303F001033BB140F260201E -S214005550C0F201004FF04901FEF710FF2C6038BD85 -S21400556038B504460D464FF00003C4F20D039842CA -S21400557007D040F26020C0F201004FF07201FEF743 -S214005580FDFE656038BD00BF70B504460E46154684 -S2140055904FF00003C4F20D03984207D040F260209B -S2140055A0C0F201004FF0A601FEF7E8FEB5F5006F69 -S2140055B007D340F26020C0F201004FF0A701FEF7CB -S2140055C0DDFE26F0FE6626F4702646EA05452561D1 -S2140055D070BD00BF70B505460C4616464FF000037A -S2140055E0C4F20D03984207D040F26020C0F20100DA -S2140055F04FF0F401FEF7C2FEFF2E07D940F26020FE -S214005600C0F201004FF0F501FEF7B8FE04F4807119 -S214005610002914BF4FF00041002104F40062002A64 -S21400562014BF4FF08062002204F4C06341EAC33323 -S21400563013436B6124F47F4444EA06262E6170BD52 -S21400564070B505460C4616464FF00003C4F20D032F -S214005650984207D040F26020C0F2010040F24D119F -S214005660FEF78CFEFF2E07D940F26020C0F2010044 -S2140056704FF4A771FEF782FE04F48071002914BF70 -S2140056804FF00041002104F40062002A14BF4FF0DE -S2140056908062002204F4C06341EAC33313436B61A3 -S2140056A024F47F4444EA06262E6170BDF8B504460D -S2140056B00D4616461F464FF00003C4F20D039842EF -S2140056C007D040F26020C0F201004FF4D371FEF71D -S2140056D055FE0F2E07D940F26020C0F2010040F2BE -S2140056E0A711FEF74BFEFF2F07D940F26020C0F24D -S2140056F001004FF4D471FEF741FE05F48073002BD1 -S21400570014BF4FF000430023636125F0707545EA2F -S214005710865626F47F4646EA07272761F8BD00BF6F -S21400572038B504460D464FF00003C4F20D03984208 -S21400573007D040F26020C0F2010040F2E511FEF70B -S2140057401DFEFF2D07D940F26020C0F201004FF485 -S214005750F371FEF713FEE56138BD00BFF8B50446E9 -S2140057600D4616461F464FF00003C4F20D0398423E -S21400577007D040F26020C0F2010040F21521FEF78B -S214005780FDFD012D07D940F26020C0F2010040F275 -S2140057901621FEF7F3FD032E07D940F26020C0F273 -S2140057A0010040F21721FEF7E9FDB7F1005F07D3CD -S2140057B040F26020C0F201004FF40671FEF7DEFDF5 -S2140057C004EB051426626762F8BD00BF70B5054697 -S2140057D00C4616464FF00003C4F20D03984207D05D -S2140057E040F26020C0F2010040F24921FEF7C6FDFB -S2140057F0012C07D940F26020C0F2010040F24A2195 -S214005800FEF7BCFDB6F5805F07D340F26020C0F21D -S214005810010040F24B21FEF7B1FD05F128054FEAE5 -S21400582004142E5170BD00BF38B505460C464FF027 -S2140058300003C4F20D03984207D040F26020C0F285 -S214005840010040F26D21FEF799FD012C07D940F2C8 -S2140058506020C0F2010040F26E21FEF78FFD05F1D8 -S21400586028054FEA04144FF000032B5138BD00BF43 -S21400587038B505460C464FF00003C4F20D039842B7 -S21400588007D040F26020C0F201004FF42471FEF70A -S21400589075FD012C07D940F26020C0F2010040F2ED -S2140058A09121FEF76BFD05F128054FEA04142859EF -S2140058B038BD00BF10B504464FF00003C4F20D0318 -S2140058C0984207D040F26020C0F2010040F2B221B8 -S2140058D0FEF754FDE06E10BD70B505460E46144644 -S2140058E04FF00003C4F20D03984207D040F2602048 -S2140058F0C0F2010040F2D521FEF740FDB6F5805F0C -S21400590007D340F26020C0F2010040F2D621FEF735 -S21400591035FD3CB940F26020C0F2010040F2D721CC -S214005920FEF72CFD05F16C02EB6E63B176B14FF01D -S21400593000002B6F44F8043B00F1010013683BB1F4 -S2140059408642F6D170BD4FF0000070BD4FF00000EB -S21400595070BD00BF70B505460E4614464FF00003F6 -S214005960C4F20D03984207D040F26020C0F2010056 -S2140059704FF44371FEF702FDB6F5805F07D340F2A1 -S2140059806020C0F2010040F20D31FEF7F7FC3CB992 -S21400599040F26020C0F2010040F20E31FEF7EEFC4D -S2140059A005F16C02EB6E63B176B14FF000002B6F21 -S2140059B024F8023B00F1010013683BB18642F6D1A1 -S2140059C070BD4FF0000070BD4FF0000070BD00BF0E -S2140059D070B504460D4616464FF00003C4F20D039C -S2140059E0984207D040F26020C0F2010040F24331F6 -S2140059F0FEF7C4FCB5F5805F07D340F26020C0F226 -S214005A0001004FF45171FEF7B9FC3EB940F2602038 -S214005A10C0F2010040F24531FEF7B0FC04F16C0222 -S214005A20E36E5BB16DB14FF00000236F335400F1AD -S214005A30010013683BB18542F7D170BD4FF00000FE -S214005A4070BD4FF0000070BD38B505460C464FF0EF -S214005A500003C4F20D03984207D040F26020C0F263 -S214005A60010040F27F31FEF789FC4FF07703C0F269 -S214005A70030304EA0303A34207D040F26020C0F207 -S214005A8001004FF46071FEF779FCC5F8004238BD9E -S214005A9010B504464FF00003C4F20D03984207D039 -S214005AA040F26020C0F2010040F29B31FEF766FC37 -S214005AB0D4F8040210BD00BF38B504460D464FF0BA -S214005AC00003C4F20D03984207D040F26020C0F2F3 -S214005AD0010040F2BB31FEF751FC0F2D07D940F212 -S214005AE06020C0F201004FF46F71FEF747FCD4F857 -S214005AF0103243EA0505C4F8105238BD38B50446DE -S214005B000D464FF00003C4F20D03984207D040F252 -S214005B106020C0F2010040F2D931FEF72FFC0F2DB5 -S214005B2007D940F26020C0F2010040F2DA31FEF7F9 -S214005B3025FCD4F8103223EA0505C4F8105238BD07 -S214005B4038B504460D464FF00003C4F20D039842E4 -S214005B5007D040F26020C0F201004FF47E71FEF7DD -S214005B600DFC15B1D4F8180238BDD4F8140238BDAF -S214005B7010B504464FF00003C4F20D03984207D058 -S214005B8040F26020C0F2010040F22641FEF7F6FB2C -S214005B90D4F81C0210BD00BF38B504460D464FF0C1 -S214005BA00003C4F20D03984207D040F26020C0F212 -S214005BB0010040F24241FEF7E1FB0F2D07D940F20B -S214005BC06020C0F2010040F24341FEF7D7FBC4F864 -S214005BD01C5238BD10B50C464FF00003C4F20D033E -S214005BE0984207D040F26020C0F2010040F26341C4 -S214005BF0FEF7C4FB3CB940F26020C0F2010040F260 -S214005C006441FEF7BBFB4FF04500214602F080FFE3 -S214005C104FF0450003F058F810BD00BF08B54FF030 -S214005C200003C4F20D03984207D040F26020C0F291 -S214005C30010040F28641FEF7A1FB4FF0450003F05D -S214005C4097F84FF0450002F0A7FF08BD2DE9F001D8 -S214005C50034600F1100500691FFA80F84FEA104469 -S214005C600C704FEA10604870A8F106009042B4BF6E -S214005C7084469446ACF10407012FD8BF022407DD02 -S214005C804FF002042E680E5104F10404BC42F9DD04 -S214005C90A44527DD1E69ACF10303A3420DD1CE5403 -S214005CA0ACF102034FEA1624CC5403F101044FEA88 -S214005CB016460E5503F1030414E0ACF10203A342AA -S214005CC008D1CE540CF1FF344FEA16260E550CF1CF -S214005CD0020407E00CF1FF3CA44504BF01F80C6089 -S214005CE00CF10404A8F10203A34204DD296804F1C0 -S214005CF00404A342FADC9042C8BF4042BDE8F0016B -S214005D00704700BFF0B4034640F2FE708242C8BF40 -S214005D1052423EDCA2F10E000C7840EA04404C7879 -S214005D2040EA046003F110071861A2F10406012E90 -S214005D30D8BF022407DD4FF002040D593D6004F180 -S214005D400404B442F9DD944220D0A2F10300A0423C -S214005D500BD10C5CA2F102000D5C44EA0524081885 -S214005D60417844EA0141196110E0A2F10200A04224 -S214005D7006D10C5C0918497844EA0121196105E04E -S214005D8002F1FF30A04204BF095C19614FF0010127 -S214005D9099631046F0BC704738B504460D464FF47C -S214005DA00043C4F20403984207D040F27420C0F2C5 -S214005DB001004FF04E01FEF7E1FA4CF66B23C6F6F3 -S214005DC05F33A3FB0523C3F34753636238BD00BFAD -S214005DD038B504460D464FF40043C4F20403984217 -S214005DE007D040F27420C0F201004FF09501FEF794 -S214005DF0C5FA4FF2E913CFF6FE7305EA03033BB18B -S214005E0040F27420C0F201004FF09901FEF7B6FA96 -S214005E10E36823F0160305F0FF021343E360A3686C -S214005E2023F00E03C5F307221343A360E36B23F0AE -S214005E300103C5F3074543EA0505E56338BD00BF22 -S214005E4010B504464FF40043C4F20403984207D04A -S214005E5040F27420C0F201004FF0CB01FEF78EFA3C -S214005E60E26BA068E36823F0010343EA024320F0F4 -S214005E70010043EA002010BD30B583B005460C464D -S214005E804FF40043C4F20403984207D040F2742053 -S214005E90C0F201004FF48171FEF770FA3CB940F28F -S214005EA07420C0F2010040F20311FEF767FA23786F -S214005EB08DF8043063788DF80530A3788DF80630B9 -S214005EC0E3788DF80730019B6B614FF00003019378 -S214005ED023798DF8043063798DF80530019BAB612A -S214005EE003B030BD30B583B005460C464FF40043D2 -S214005EF0C4F20403984207D040F27420C0F20100B6 -S214005F0040F22F11FEF73AFA3CB940F27420C0F284 -S214005F1001004FF49871FEF731FA6B690193237014 -S214005F20C3F3072363709DF80630A3709DF807300F -S214005F30E370AB69019323719DF80530637103B07C -S214005F4030BD00BF10B504464FF40043C4F204034E -S214005F50984207D040F27420C0F201004FF4AC71B2 -S214005F60FEF70CFAA36843F01003A360A36843F09F -S214005F700103A360E36843F00103E360A36843F012 -S214005F801003A36010BD00BF10B504464FF40043D5 -S214005F90C4F20403984207D040F27420C0F2010015 -S214005FA04FF4C171FEF7EAF9A36843F01003A3604B -S214005FB0E36823F00103E360A36823F00103A36012 -S214005FC0A36843F01003A36010BD00BF10B50446DD -S214005FD04FF40043C4F20403984207D040F2742002 -S214005FE0C0F2010040F2B111FEF7C8F9606B10F084 -S214005FF03F0018BF012010BD10B504464FF4004303 -S214006000C4F20403984207D040F27420C0F20100A4 -S2140060104FF4E871FEF7B2F9A36B13F0010F14BF4B -S2140060200020012010BD00BF70B504460D46164680 -S2140060304FF40043C4F20403984207D040F27420A1 -S214006040C0F2010040F27F21FEF798F93DB940F218 -S2140060507420C0F201004FF42071FEF78FF9002E75 -S21400606007DC40F27420C0F2010040F28121FEF706 -S21400607085F9636B13F03F0F05D02046294632465C -S214006080FFF7E4FD70BD4FF0000070BD70B504462C -S2140060900D4616464FF40043C4F20403984207D058 -S2140060A040F27420C0F201004FF42C71FEF766F93E -S2140060B03DB940F27420C0F2010040F2B121FEF773 -S2140060C05DF9002E07DC40F27420C0F2010040F2B9 -S2140060D0B221FEF753F9636B13F03F0FFBD0204657 -S2140060E029463246FFF7B2FD70BD00BF70B50446C4 -S2140060F00D4616464FF40043C4F20403984207D0F8 -S21400610040F27420C0F2010040F25D31FEF736F92D -S2140061103DB940F27420C0F2010040F25E31FEF755 -S2140061202DF9002E07DC40F27420C0F2010040F288 -S2140061305F31FEF723F9A36B13F0010F05D120465C -S21400614029463246FFF7DEFD70BD4FF0000070BDF9 -S21400615070B504460D4616464FF40043C4F20403D9 -S214006160984207D040F27420C0F2010040F28E310F -S214006170FEF704F93DB940F27420C0F2010040F287 -S2140061808F31FEF7FBF8002E07DC40F27420C0F2D9 -S21400619001004FF46471FEF7F1F8A36B13F0010FE2 -S2140061A0FBD1204629463246FFF7ACFD70BD00BF46 -S2140061B010B50C464FF40043C4F20403984207D0CF -S2140061C040F27420C0F201004FF46E71FEF7D6F86C -S2140061D03CB940F27420C0F2010040F2B931FEF73B -S2140061E0CDF84FF03A00214602F092FC4FF03A000C -S2140061F002F06AFD10BD00BF08B54FF40043C4F2BC -S2140062000403984207D040F27420C0F201004FF415 -S2140062107771FEF7B3F84FF03A0002F0A9FD4FF0A1 -S2140062203A0002F0B9FC08BD38B504460D464FF4F6 -S2140062300043C4F20403984207D040F27420C0F230 -S214006240010040F21341FEF799F835F07F0307D0BE -S21400625040F27420C0F2010040F21641FEF78EF8BC -S214006260636843EA0505656038BD00BF38B5044677 -S2140062700D464FF40043C4F20403984207D040F2A0 -S2140062807420C0F2010040F23541FEF777F835F091 -S2140062907F0307D040F27420C0F201004FF48761FC -S2140062A0FEF76CF8636823EA0505656038BD00BF35 -S2140062B038B504460D464FF40043C4F20403984232 -S2140062C007D040F27420C0F201004FF48B61FEF755 -S2140062D055F820680DB16368184038BD38B50446D7 -S2140062E00D464FF40043C4F20403984207D040F230 -S2140062F07420C0F2010040F28D41FEF73FF835F001 -S2140063007F0307D040F27420C0F201004FF4926180 -S214006310FEF734F8256038BD70B504460E461546BF -S2140063204FF40043C4F20403984207D040F27420AE -S214006330C0F2010040F2AD41FEF720F804F1200360 -S214006340226A12F0010FF9D1ADB2E5624FEAC60635 -S21400635006F0FF0646F003061E601A6812F0010FEC -S214006360FBD170BD38B504460D464FF40043C4F269 -S2140063700403984207D040F27420C0F2010040F2B5 -S214006380DC41FDF7FBFF04F12003226A12F0010F47 -S214006390F9D14FEAC50505F0FF0545F001051D607A -S2140063A01A6812F0010FFBD1206B80B238BD00BF17 -S2140063B010B504464FF00001FFF7D4FF20F4C0529A -S2140063C020464FF0000142F40062FFF7A5FF10BD23 -S2140063D010B504464FF00001FFF7C4FF20F4C0528A -S2140063E020464FF0000142F48052FFF795FF10BDA3 -S2140063F04EF24013C4F20F03186800F10100704714 -S21400640000F1FF304EF24013C4F20F0318607047DD -S21400641010B504464FEA80534FEA93533BB140F21F -S214006420A020C0F201004FF08401FDF7A7FF4DF257 -S2140064301403C4F20F034FF001021A604FF45043E6 -S214006440C4F20F031C604DF20803C4F20F034FF0B2 -S2140064500202CAF242421A604DF20802C4F20F0269 -S214006460136813F0020FFBD14DF20C03C4F20F03B6 -S214006470186800F00100002814BF4FF0FF3000201D -S21400648010BD00BF2DE9F04106460C46154611F03A -S214006490030F07D040F2A020C0F201004FF0C80161 -S2140064A0FDF76CFF15F0030F07D040F2A020C0F2F6 -S2140064B001004FF0C901FDF761FF4DF21403C4F26D -S2140064C00F034FF001021A604EF2A013C4F20F033E -S2140064D01B6813F0010F33D1002D37D154E04FF471 -S2140064E05048C4F20F084DF23000C4F20F004FF4CB -S2140064F05141C4F20F014DF22007C4F20F074FF0CE -S214006500010CCAF2424C24F07F03C8F8003006E0C3 -S21400651056F8042B5A5004F10404A5F1040514F0AF -S2140065207C0301D102681AB9002DF1D12A4600E099 -S2140065302A46C7F800C03B6813F0010FFBD102E003 -S214006540002DCCD120E0002ADDD11DE04FF45047CD -S214006550C4F20F074DF20400C4F20F004DF2080219 -S214006560C4F20F024FF00101CAF242413C6056F8F5 -S214006570043B03601160136813F0010FFBD1043D68 -S21400658002D004F10404F1E74DF20C03C4F20F0349 -S214006590186800F00100002814BF4FF0FF300020FC -S2140065A0BDE8F08110B504464FEA40534FEA535316 -S2140065B03BB140F2A020C0F2010040F23F11FDF7CF -S2140065C0DDFEC4F30142A4B240F2B823C0F20103D8 -S2140065D053F82230196840F29023C0F2010353F8B2 -S2140065E022301A684FF46043C4F20F031B6813F09E -S2140065F0E04F0DD04FF46043C4F20F0318684FF01D -S2140066000003C7F2FF0300EA0303B3F1805F15D16E -S2140066104FF46043C4F20F03186880B240F20123BF -S214006620984209D04FF46043C4F20F03186880B252 -S21400663040F20223984201D141F040414FEAD4246F -S21400664021FA04F000F0010022FA04F404F0010438 -S21400665044EA4000012804D9022814BF0020012083 -S21400666010BD4FF0020010BDF8B504460D464FEAC7 -S21400667040534FEA53533BB140F2A020C0F2010012 -S21400668040F2A311FDF77AFE022D07D940F2A020B2 -S214006690C0F2010040F2A511FDF770FEC4F30141FF -S2140066A0C4F3C42440F2B823C0F2010353F8210017 -S2140066B0026840F29023C0F2010353F821100E68DE -S2140066C04FF46043C4F20F031B6813F0E04F0DD085 -S2140066D04FF46043C4F20F031F684FF00003C7F285 -S2140066E0FF0307EA0303B3F1805F1ED14FF4604354 -S2140066F0C4F20F031F68BFB240F201239F4209D0C5 -S2140067004FF46043C4F20F031F68BFB240F2022387 -S2140067109F420AD1022D14BF002301231D2C94BFD3 -S214006720002303F00103002B5DD1012D0BD0022DB9 -S21400673015D14FF0010303FA04F46FEA0404224073 -S21400674004EA06061AE022FA04F313F0010F4DD00D -S2140067504FF0010303FA04F426EA04060EE022FAD8 -S21400676004F212F0010F44D026FA04F000F0010003 -S21400677000280CBF4FF0FF300020F8BD4FF46043F8 -S214006780C4F20F031B6813F0E04F0DD04FF46043C4 -S214006790C4F20F031C684FF00003C7F2FF0304EABD -S2140067A00303B3F1805F19D14FF46043C4F20F03C3 -S2140067B01C68A4B240F201239C4209D04FF4604307 -S2140067C0C4F20F031C68A4B240F202239C4205D117 -S2140067D022F04042036803F040431A4302600E6012 -S2140067E04FF00000F8BD4FF0FF30F8BD4FF0FF301F -S2140067F0F8BD4FF0FF30F8BD30B44FF46043C4F23C -S2140068000F031B6813F0E04F08BF02200FD04FF4B1 -S2140068106043C4F20F031B684FF00000C7F2FF008E -S21400682003EA0000B0F1805F14BF082002204FF09A -S21400683000014FF45045C4F20F054DF20802C4F2B1 -S2140068400F024FF00804CAF242442960146013682D -S21400685013F0080FFBD101F101018842F5DC4FF07F -S214006860000030BC704700BF38B50C46054638B946 -S21400687040F2A020C0F2010040F26B21FDF77EFD41 -S2140068803CB940F2A020C0F201004FF41B71FDF7A6 -S21400689075FD4FF46043C4F20F031B6813F0E04F1E -S2140068A01CD04FF46043C4F20F031A684FF0000385 -S2140068B0C7F2FF0302EA0303B3F1805F11D04EF282 -S2140068C0E013C4F20F031B682B604EF2E413C4F20D -S2140068D00F031B6823604FF0000038BD4FF0FF30F9 -S2140068E038BD4FF0FF3038BD4FF46043C4F20F039D -S2140068F01B6813F0E04F1AD04FF46043C4F20F0346 -S2140069001A684FF00003C7F2FF0302EA0303B3F16D -S214006910805F0FD04EF2E013C4F20F0318604EF201 -S214006920E413C4F20F0319604FF0000070474FF0F5 -S214006930FF3070474FF0FF30704700BF4FF46043A2 -S214006940C4F20F031B6813F0E04F42D04FF46043CD -S214006950C4F20F031A684FF00003C7F2FF0302EAFF -S2140069600303B3F1805F37D04FF45043C4F20F03F4 -S2140069704FF000421A604DF20803C4F20F034FF0C6 -S2140069800802CAF242421A604DF20802C4F20F022E -S214006990136813F0080FFBD14FF45043C4F20F03F3 -S2140069A04FF00102C8F200021A604DF20803C4F26A -S2140069B00F034FF00802CAF242421A604DF2080274 -S2140069C0C4F20F02136813F0080FFBD14FF000005B -S2140069D070474FF0FF3070474FF0FF30704700BFF2 -S2140069E008B501464FF02D0002F092F84FF02D004A -S2140069F002F06AF908BD00BF08B54FF02D0002F09E -S214006A00B7F94FF02D0002F0C7F808BD4DF210039D -S214006A10C4F20F031A6840EA02021A60704700BF09 -S214006A204DF21003C4F20F031A6822EA00021A603D -S214006A30704700BF28B14DF21403C4F20F03186864 -S214006A4070474DF20C03C4F20F031868704700BF7E -S214006A504DF21403C4F20F03186070474FF48043DE -S214006A60C4F200034FF40042C4F20502904214BF81 -S214006A7000220122984214BF134642F00103002B65 -S214006A8040F098804FF4A043C4F200034FF4104245 -S214006A90C4F20502904214BF00220122984214BF9D -S214006AA0134642F00103002B40F087804FF4C043AA -S214006AB0C4F200034FF42042C4F20502904214BF11 -S214006AC000220122984214BF134642F00103002B15 -S214006AD076D14FF4E043C4F200034FF43042C4F2E0 -S214006AE00502904214BF00220122984214BF1346AA -S214006AF042F00103002B66D14FF48043C4F2020338 -S214006B004FF44042C4F20502904214BF0022012214 -S214006B10984214BF134642F00103002B56D14FF49F -S214006B20A043C4F202034FF45042C4F2050290425E -S214006B3014BF00220122984214BF134642F00103FC -S214006B40002B46D14FF4C043C4F202034FF4604218 -S214006B50C4F20502904214BF00220122984214BFDC -S214006B60134642F00103002B36D14FF4E043C4F243 -S214006B7002034FF47042C4F20502904214BF002292 -S214006B800122984214BF134642F00103002B26D17F -S214006B904FF45043C4F203034FF00002C4F206025F -S214006BA0904214BF00220122984214BF104642F0C1 -S214006BB0010070474FF0010070474FF0010070472A -S214006BC04FF0010070474FF0010070474FF0010092 -S214006BD070474FF0010070474FF0010070474FF0CC -S214006BE0010070474FF45043C4F20303984200F08C -S214006BF0A9804FF45043C4F20303984241D84FF49F -S214006C00E043C4F20003984200F08D804FF4E04366 -S214006C10C4F20003984214D84FF4A043C4F2000311 -S214006C20984200F092804FF4C043C4F200039842AA -S214006C3076D04FF48043C4F20003984240F0888038 -S214006C406BE04FF4A043C4F20203984271D04FF4B5 -S214006C50A043C4F20203984206D84FF48043C4F21D -S214006C600203984274D161E04FF4C043C4F20203B9 -S214006C70984261D04FF4E043C4F20203984267D1D1 -S214006C805DE04FF44043C4F2050398424ED04FF403 -S214006C904043C4F2050398421FD84FF41043C4F291 -S214006CA00503984251D04FF41043C4F205039842AE -S214006CB006D84FF40043C4F20503984248D12CE0AE -S214006CC04FF42043C4F20503984229D04FF43043D2 -S214006CD0C4F2050398423BD125E04FF46043C4F26A -S214006CE00503984228D04FF46043C4F20503984247 -S214006CF006D84FF45043C4F20503984228D118E052 -S214006D004FF47043C4F20503984218D04FF00003C6 -S214006D10C4F2060398421BD114E04FF010007047EF -S214006D204FF0120070474FF0130070474FF01400FA -S214006D3070474FF02E0070474FF02F0070474FF00F -S214006D40300070474FF0460070474FF01100704714 -S214006D504FF0FF30704700BF70B504460E4615462C -S214006D60FFF77CFE38B940F2C820C0F201004FF0B1 -S214006D70E401FDF703FB022D07D940F2C820C0F25C -S214006D8001004FF0E601FDF7F9FA15F0010F04F5E2 -S214006D908063D4F8002414BF3243B2431A6015F05F -S214006DA0020F04F58463D4F8202414BF164322EAA5 -S214006DB006061E6070BD00BF38B504460D46FFF7D8 -S214006DC04DFE38B940F2C820C0F201004FF486717B -S214006DD0FDF7D4FA072D07D940F2C820C0F201000B -S214006DE040F20D11FDF7CAFA4FF0010303FA05F55C -S214006DF0D4F80034D4F82004EDB21D420CBF0023B2 -S214006E0001230540002D14BF02200020184338BD82 -S214006E1070B505460E461446FFF720FE38B940F218 -S214006E20C820C0F201004FF4A371FDF7A7FA231F94 -S214006E3018BF0123002C0CBF002303F0010393B1FD -S214006E40A31E18BF0123012C0CBF002303F001036F -S214006E504BB1072C0AD040F2C820C0F2010040F225 -S214006E604911FDF78BFA14F0010F05D005F5816383 -S214006E70D5F80824324305E005F58163D5F80824E3 -S214006E8022EA06021A6014F0020F05F5806303F189 -S214006E900403D5F8042414BF3243B2431A6014F036 -S214006EA0040F05F5806303F10C03D5F80C2414BF1A -S214006EB0164322EA06061E6070BD00BF38B50446BB -S214006EC00D46FFF7CBFD38B940F2C820C0F20100EE -S214006ED04FF4B971FDF752FA072D07D940F2C820D2 -S214006EE0C0F2010040F27311FDF748FA4FF00103BB -S214006EF003FA05F5D4F80824D4F80404D4F80C34BE -S214006F00EDB215420CBF0022012205EA000000285F -S214006F1014BF0220002010431D40002D14BF04257E -S214006F200025284338BD00BFF8B504460D46174671 -S214006F301E46FFF793FD38B940F2C820C0F20100A4 -S214006F404FF4DD71FDF71AFA07F1FF323B1F18BF49 -S214006F500123012A94BF002303F001034BB10C2F39 -S214006F6007D040F2C820C0F201004FF4DF71FDF7F1 -S214006F7005FAB6F10A0318BF0123082E0CBF00233A -S214006F8003F00103E3B1B6F1090318BF01230C2E89 -S214006F900CBF002303F0010393B1B6F10D0318BF35 -S214006FA001230B2E0CBF002303F0010343B13EB1B7 -S214006FB040F2C820C0F2010040F2C511FDF7DEF92C -S214006FC017F0010F04F5A063D4F8002514BF2A4378 -S214006FD0AA431A6017F0020F04F5A06303F1040336 -S214006FE0D4F8042514BF2A43AA431A6017F0040FE6 -S214006FF004F5A163D4F8082514BF2A43AA431A60EF -S21400700017F0080F04F5A363D4F8182514BF2A4315 -S214007010AA431A6016F0010F04F5A06303F10C03EF -S214007020D4F80C2514BF2A43AA431A6016F0020FA0 -S21400703004F5A263D4F8102514BF2A43AA431A60A5 -S21400704016F0040F04F5A26303F10403D4F8142524 -S21400705014BF2A43AA431A6016F0080F04F5A26369 -S21400706003F10C03D4F81C2514BF2A43AA431A6064 -S21400707036B904F5A563D4F8282542EA050505E0E7 -S21400708004F5A563D4F8282522EA05051D60F8BD99 -S214007090F8B504460D4616461F46FFF7DFFC38B91E -S2140070A040F2C820C0F2010040F20E21FDF766F95A -S2140070B0072D07D940F2C820C0F2010040F20F2188 -S2140070C0FDF75CF94FF0010303FA05F5D4F8000567 -S2140070D0D4F80435D4F80815D4F81825EDB20542CE -S2140070E00CBF0020012005EA0303002B14BF022377 -S2140070F00023034305EA0101002914BF04210021EF -S2140071000B4305EA0202002A14BF0822002213439A -S2140071103360D4F80C05D4F81035D4F81415D4F828 -S2140071201C2505420CBF0020012005EA0303002BA6 -S21400713014BF02230023034305EA0101002914BFFC -S214007140042100210B431540002D14BF08250025FF -S21400715043EA05053D60F8BD38B504460D46FFF721 -S2140071607DFC38B940F2C820C0F2010040F241214F -S214007170FDF704F9D4F8103443EA0505C4F81054B2 -S21400718038BD00BF38B504460D46FFF767FC38B972 -S21400719040F2C820C0F2010040F25F21FDF7EEF891 -S2140071A0D4F8103423EA0505C4F8105438BD00BFDF -S2140071B038B504460D46FFF751FC38B940F2C820F2 -S2140071C0C0F2010040F27E21FDF7D8F815B1D4F8E0 -S2140071D0180438BDD4F8140438BD00BF38B50446CA -S2140071E00D46FFF73BFC38B940F2C820C0F201005C -S2140071F04FF42B71FDF7C2F8C4F81C5438BD00BF1D -S21400720038B504460D46FFF729FC38B940F2C820C9 -S214007210C0F2010040F2CE21FDF7B0F82046FFF79D -S214007220E1FC0446294601F073FC204601F04CFDC3 -S21400723038BD00BF10B50446FFF710FC38B940F261 -S214007240C820C0F2010040F2F721FDF797F820466B -S214007250FFF7C8FC044601F08BFD204601F09CFCBD -S21400726010BD00BF38B504460D46FFF7F7FB38B92A -S21400727040F2C820C0F201004FF44971FDF77EF8D5 -S21400728054F8250038BD00BF70B506460C461546B6 -S214007290FFF7E4FB38B940F2C820C0F201004FF413 -S2140072A05171FDF76BF846F8245070BD38B50546A9 -S2140072B00C46FFF7D3FB38B940F2C820C0F20100F5 -S2140072C040F26731FDF75AF8284621464FF0000293 -S2140072D0FFF742FD284621464FF001024FF000031B -S2140072E0FFF722FE38BD00BF38B505460C46FFF74F -S2140072F0B5FB38B940F2C820C0F201004FF4647103 -S214007300FDF73CF8284621464FF00202FFF724FD21 -S214007310284621464FF004024FF00803FFF704FE0C -S21400732038BD00BF38B505460C46FFF797FB38B9A1 -S21400733040F2C820C0F201004FF46E71FDF71EF84F -S214007340284621464FF00002FFF706FD2846214654 -S2140073504FF001024FF00003FFF7E6FD38BD00BF17 -S21400736038B505460C46FFF779FB38B940F2C82019 -S214007370C0F2010040F2DE31FDF700F82846214653 -S2140073804FF00002FFF7E8FC284621464FF00102C6 -S2140073904FF00803FFF7C8FD38BD00BF38B50546F7 -S2140073A00C46FFF75BFB38B940F2C820C0F201007C -S2140073B040F20441FCF7E2FF284621464FF0010266 -S2140073C0FFF7CAFC284621464FF001024FF008039B -S2140073D0FFF7AAFD38BD00BF38B505460C46FFF7D7 -S2140073E03DFB38B940F2C820C0F2010040F22A4105 -S2140073F0FCF7C4FF284621464FF00102FFF7ACFC1D -S214007400284621464FF001024FF00903FFF78CFD96 -S21400741038BD00BF38B505460C46FFF71FFB38B928 -S21400742040F2C820C0F2010040F25241FCF7A6FF2D -S214007430284621464FF00202FFF78EFC28462146DA -S2140074404FF001024FF00B03FFF76EFD38BD00BF93 -S21400745038B505460C46FFF701FB38B940F2C820A0 -S214007460C0F2010040F27B41FCF788FF2846214627 -S2140074704FF00202FFF770FC284621464FF001024B -S2140074804FF00803FFF750FD38BD00BF38B505467E -S2140074900C46FFF7E3FA38B940F2C820C0F2010004 -S2140074A040F2A441FCF76AFF284621464FF002024C -S2140074B0FFF752FC284621464FF001024FF00A0320 -S2140074C0FFF732FD38BD00BF38B505460C46FFF75E -S2140074D0C5FA38B940F2C820C0F2010040F2CD41EA -S2140074E0FCF74CFF284621464FF00202FFF734FC1B -S2140074F0284621464FF001024FF00803FFF714FD1F -S21400750038BD00BF38B505460C46FFF7A7FA38B9B0 -S21400751040F2C820C0F2010040F2F641FCF72EFF10 -S214007520284621464FF00202FFF716FC2846214661 -S2140075304FF001024FF00803FFF7F6FC38BD00BF1E -S21400754038B505460C46FFF789FA38B940F2C82028 -S214007550C0F2010040F21F51FCF710FF28462146FA -S2140075604FF00202FFF7F8FB284621464FF00102D3 -S2140075704FF00803FFF7D8FC38BD00BF38B5054606 -S2140075800C46FFF76BFA38B940F2C820C0F201008B -S21400759040F24C51FCF7F2FE284621464FF002021C -S2140075A0FFF7DAFB284621464FF001024FF00803AA -S2140075B0FFF7BAFC38BD00BF38B505460C46FFF7E6 -S2140075C04DFA38B940F2C820C0F2010040F27551B9 -S2140075D0FCF7D4FE284621464FF00002FFF7BCFB1E -S2140075E0284621464FF001024FF00003FFF79CFCAF -S2140075F038BD00BF38B505460C46FFF72FFA38B938 -S21400760040F2C820C0F2010040F29E51FCF7B6FEE0 -S214007610284621464FF00202FFF79EFB28462146E9 -S2140076204FF001024FF00803FFF77EFC38BD00BFA5 -S21400763038B505460C46FFF711FA38B940F2C820AF -S214007640C0F2010040F2C651FCF798FE28462146DB -S2140076504FF00202FFF780FB284621464FF0040257 -S2140076604FF00803FFF760FC38BD00BF38B505468D -S2140076700C46FFF7F3F938B940F2C820C0F2010013 -S21400768040F2F151FCF77AFE284621464FF00202FE -S214007690FFF762FB284621464FF004024FF008032E -S2140076A0FFF742FC38BD00BF70B50446C0F307457F -S2140076B0082D07D940F2C820C0F201004FF4C3617C -S2140076C0FCF75CFE4FEA142616F0E30F07D040F2F4 -S2140076D0C820C0F2010040F21961FCF74FFE4EF2DE -S2140076E06C03C4F20F031B684FF0010202FA05F2A6 -S2140076F01A4240F2E023C0F201031ABF03EBC505AD -S2140077006B6853F83530D3F82C1506F0FF064FF0AB -S2140077100F0202FA06F221EA020204F00F0404FA4B -S21400772006F642EA0606C3F82C6570BD4CF2100257 -S214007730C4F20F021368002BFCDA70474CF21003F9 -S214007740C4F20F031A6842F040021A604FF4604316 -S214007750C4F20F031A684FF00003C7F2FF0302EAF1 -S21400776003034FF00002C1F2010293421BD140F224 -S2140077708013C2F2000344F6D352C1F26202A2FBA7 -S21400778000104FEA901000EB40024FEA4212101A27 -S21400779041F6F112C0F27652A2FB00124FEA9212A4 -S2140077A002F101021A6070474CF21003C4F20F0394 -S2140077B01A6822F040021A60704700BF10B50446EF -S2140077C0031E18BF012304280CBF002303F0010387 -S2140077D03BB140F22830C0F201004FF0B101FCF797 -S2140077E0CDFD4CF21003C4F20F031A6822F0040217 -S2140077F014431C6010BD00BF4CF21003C4F20F030C -S2140078001A6842F001021A60704700BF4CF210037B -S214007810C4F20F031A6822F001021A60704700BF14 -S21400782010B5044630F0180307D040F22830C0F2F6 -S21400783001004FF0F701FCF7A1FD4CF21003C4F273 -S2140078400F031A6822F0180214431C6010BD00BF14 -S2140078504CF21003C4F20F03186800F018007047CB -S21400786010B50446B0F1A00318BF012320280CBFB2 -S214007870002303F001033BB140F22830C0F20100C0 -S2140078804FF49A71FCF77AFD4CF21003C4F20F0322 -S2140078901A6822F0A00214431C6010BD4CF21003BC -S2140078A0C4F20F03186800F0A000704708B54CF249 -S2140078B00C03C4F20F0318604FF46043C4F20F03C6 -S2140078C01A684FF00003C7F2FF0302EA03034FF003 -S2140078D00002C1F20102934207D140F28013C2F2C5 -S2140078E00003186803F070FC08BDFFF71FFF08BD13 -S2140078F04FF44043C4F20F031868704708B54CF2C3 -S2140079000403C4F20F0318604FF46043C4F20F037D -S2140079101A684FF00003C7F2FF0302EA03034FF0B2 -S2140079200002C1F20102934207D140F28013C2F274 -S2140079300003186803F048FC08BDFFF7F7FE08BD13 -S2140079404CF20403C4F20F031868704708B54CF2F3 -S2140079500803C4F20F0318604FF46043C4F20F0329 -S2140079601A684FF00003C7F2FF0302EA03034FF062 -S2140079700002C1F20102934207D140F28013C2F224 -S2140079800003186803F020FC08BDFFF7CFFE08BD13 -S2140079904CF20803C4F20F031868704710B504468B -S2140079A0B0F5803F07D340F22830C0F2010040F225 -S2140079B01F21FCF7E3FC4CF22403C4F20F031C6007 -S2140079C04FF46043C4F20F031A684FF00003C7F287 -S2140079D0FF0302EA03034FF00002C1F201029342E2 -S2140079E007D140F28013C2F20003186803F0ECFBE4 -S2140079F010BDFFF79BFE10BD4CF22403C4F20F032C -S214007A00186870472DE9F04706468946402907D989 -S214007A1040F22830C0F201004FF41A71FCF7AEFCB9 -S214007A203EB940F22830C0F2010040F26921FCF76E -S214007A30A5FCB9F1000F29D04CF23004C4F20F04B3 -S214007A404FF000054FF46047C4F20F07A846C7F290 -S214007A50FF0840F2801AC2F2000A56F8043B236080 -S214007A603A6802EA08024FF00003C1F201039A42A4 -S214007A7004D1DAF8000003F0A7FB01E0FFF756FE9A -S214007A8005F1010504F10404A945E6D8BDE8F08730 -S214007A9038B505460C46402907D940F22830C0F2D2 -S214007AA0010040F2A121FCF769FC3DB940F2283004 -S214007AB0C0F2010040F2A221FCF760FC6CB14CF26F -S214007AC03002C4F20F024FF0000352F8041B45F8D0 -S214007AD0041B03F101039C42F7D838BD4CF2100397 -S214007AE0C4F20F031A6842F002021A60704700BF21 -S214007AF010B5044630F00F0307D040F22830C0F22D -S214007B00010040F2F721FCF739FC4CF21403C4F2F2 -S214007B100F031A6814431C6010BD00BF10B504465E -S214007B2030F00F0307D040F22830C0F2010040F2D8 -S214007B301531FCF723FC4CF21403C4F20F031A6849 -S214007B4022EA04041C6010BD08B501464FF03B0055 -S214007B5000F0DEFF4FF03B0001F0B6F808BD00BFB6 -S214007B6008B54FF03B0001F003F94FF03B0001F081 -S214007B7013F808BD012801BF4CF21C03C4F20F0322 -S214007B80186800F00F001FBF4CF21803C4F20F0372 -S214007B90186800F00F00704710B5044630F00F0369 -S214007BA007D040F22830C0F2010040F29731FCF7CF -S214007BB0E5FB4CF22003C4F20F031A6814431C6062 -S214007BC010BD00BF4CF21003C4F20F031868C0F3D8 -S214007BD08010704710B504464FF00003C4F202034D -S214007BE04FF48052C4F20202821A18BF0122984251 -S214007BF00CBF002302F001033BB140F24430C0F258 -S214007C0001004FF0A201FCF7B9FB236A43F0100312 -S214007C10236210BD70B504460E4615464FF00003AD -S214007C20C4F202034FF48052C4F20202821A18BF52 -S214007C30012298420CBF002302F001033BB140F240 -S214007C404430C0F201004FF04F01FCF797FB20468E -S214007C50FFF7C0FF48F2A062C0F201024FF4D4530F -S214007C60C0F20603012D14BF15461D4605EB85051B -S214007C704FEA850506F1FF367619B6FBF5F505F1F0 -S214007C80FF35E56070BD00BF10B504464FF40063D5 -S214007C90C4F202034FF4C052C4F20202821A18BFA2 -S214007CA0012298420CBF002302F001033BB140F2D0 -S214007CB04430C0F201004FF0BB01FCF75FFBA4F5B7 -S214007CC0FC631A6842F020021A604FF001036360FA -S214007CD010BD00BF38B504460D464FF40063C4F22D -S214007CE002034FF4C052C4F20202821A18BF0122E5 -S214007CF098420CBF002302F001033BB140F244302F -S214007D00C0F201004FF08301FCF738FB15F0800F3E -S214007D1007D040F24430C0F201004FF08401FCF777 -S214007D202DFB2046FFF7B0FF256038BD10B5044692 -S214007D304FF00003C4F202034FF48052C4F2020272 -S214007D40821A18BF012298420CBF002302F00103DA -S214007D503BB140F24430C0F201004FF0DA01FCF7CC -S214007D600DFB236A23F01003236210BD10B50446F2 -S214007D704FF40063C4F202034FF4C052C4F202028E -S214007D80821A18BF012298420CBF002302F001039A -S214007D903BB140F24430C0F201004FF0F301FCF773 -S214007DA0EDFA4FF000036360A4F5FC64236823F04B -S214007DB02003236010BD00BF38B504460D464FF0C3 -S214007DC00003C4F202034FF48052C4F20202821A85 -S214007DD018BF012298420CBF002302F001033BB1FA -S214007DE040F24430C0F201004FF48F71FCF7C6FA3F -S214007DF04FF00003C4F202039C4214BF352418243B -S214007E002046294600F084FE204600F05DFF38BD7F -S214007E1010B504464FF00003C4F202034FF480523C -S214007E20C4F20202821A18BF012298420CBF002335 -S214007E3002F001033BB140F24430C0F201004FF4BF -S214007E40A471FCF79BFA4FF00003C4F202039C42B5 -S214007E5014BF35241824204600F08AFF204600F080 -S214007E609BFE10BD10B504464FF00003C4F202039B -S214007E704FF48052C4F20202821A18BF01229842BE -S214007E800CBF002302F001033BB140F24430C0F2C5 -S214007E90010040F26B11FCF771FA4FF00103236109 -S214007EA010BD00BF10B504464FF40063C4F20203D1 -S214007EB04FF4C052C4F20202821A18BF012298423E -S214007EC00CBF002302F001033BB140F24430C0F285 -S214007ED001004FF4C271FCF751FAE36843F0010366 -S214007EE0E36010BD38B504460D464FF40063C4F297 -S214007EF002034FF4C052C4F20202821A18BF0122D3 -S214007F0098420CBF002302F001033BB140F244301C -S214007F10C0F201004FF4D371FCF730FAE36843EA8D -S214007F200505E56038BD00BF10B504464FF00003F8 -S214007F30C4F202034FF48052C4F20202821A18BF3F -S214007F40012298420CBF002302F001033BB140F22D -S214007F504430C0F2010040F2BF11FCF70FFA4FF0B8 -S214007F600003236110BD00BF10B504464FF4006344 -S214007F70C4F202034FF4C052C4F20202821A18BFBF -S214007F80012298420CBF002302F001033BB140F2ED -S214007F904430C0F201004FF4EC71FCF7EFF9E368EF -S214007FA023F00103E36010BD38B504460D464FF4D8 -S214007FB00063C4F202034FF4C052C4F20202821AF3 -S214007FC018BF012298420CBF002302F001033BB108 -S214007FD040F24430C0F2010040F2F711FCF7CEF94F -S214007FE0E36823EA0505E56038BD00BF38B50446FA -S214007FF00D464FF00003C4F202034FF48052C4F261 -S2140080000202821A18BF012298420CBF002302F017 -S21400801001033BB140F24430C0F2010040F21521AA -S214008020FCF7ACF925B1A069003818BF012038BDAF -S2140080306069003818BF012038BD00BF38B5044657 -S2140080400D464FF40063C4F202034FF4C052C4F26C -S2140080500202821A18BF012298420CBF002302F0C7 -S21400806001033BB140F24430C0F2010040F23B2134 -S214008070FCF784F925B16069003818BF012038BDC7 -S2140080802069003818BF012038BD00BF38B5044647 -S2140080900D464FF40063C4F202034FF4C052C4F21C -S2140080A00202821A18BF012298420CBF002302F077 -S2140080B001033BB140F24430C0F2010040F26321BC -S2140080C0FCF75CF9EDB14FF46043C4F20F031A6895 -S2140080D04FF00003C7F2FF0302EA03034FF000026B -S2140080E0C1F2030293420AD14FF46043C4F20F0375 -S2140080F01B689BB21BB92369E068184038BD6069ED -S21400810038BD206938BD00BF10B504464FF00003E7 -S214008110C4F202034FF48052C4F20202821A18BF5D -S214008120012298420CBF002302F001033BB140F24B -S2140081304430C0F2010040F29B21FCF71FF94FF0DB -S2140081400103E361A36110BD10B504464FF400635C -S214008150C4F202034FF4C052C4F20202821A18BFDD -S214008160012298420CBF002302F001033BB140F20B -S2140081704430C0F2010040F2C621FCF7FFF84FF091 -S2140081800103A36110BD00BF38B504460D464FF489 -S2140081900063C4F202034FF4C052C4F20202821A11 -S2140081A018BF012298420CBF002302F001033BB126 -S2140081B040F24430C0F2010040F2EE21FCF7DEF857 -S2140081C0A56138BD70B504460D4616464FF000034F -S2140081D0C4F202034FF48052C4F20202821A18BF9D -S2140081E0012298420CBF002302F001033BB140F28B -S2140081F04430C0F2010040F20E31FCF7BFF815F033 -S214008200800F07D040F24430C0F2010040F20F3138 -S214008210FCF7B4F846EA4505256070BD10B504467F -S2140082204FF00003C4F202034FF48052C4F202027D -S214008230821A18BF012298420CBF002302F00103E5 -S2140082403BB140F24430C0F2010040F22A31FCF764 -S21400825095F8606800F0010010BD00BF10B5044638 -S2140082604FF00003C4F202034FF48052C4F202023D -S214008270821A18BF012298420CBF002302F00103A5 -S2140082803BB140F24430C0F2010040F24D31FCF701 -S21400829075F86068C0F3801010BD00BF38B505469D -S2140082A00C464FF00003C4F202034FF48052C4F2AF -S2140082B00202821A18BF012298420CBF002302F065 -S2140082C001033BB140F24430C0F2010040F27B3182 -S2140082D0FCF754F8E31E18BF0123072C0CBF00233D -S2140082E003F0010303B3631F18BF0123012C0CBF67 -S2140082F0002203F00102BAB1221F18BF01220B2C84 -S2140083000CBF002102F0010171B1092C0CBF002343 -S21400831003F0010343B13AB140F24430C0F2010029 -S21400832040F28531FCF72AF86C6038BD10B504467B -S2140083304FF00003C4F202034FF48052C4F202026C -S214008340821A18BF012298420CBF002302F00103D4 -S2140083503BB140F24430C0F2010040F2A331FCF7DA -S2140083600DF8606810F0010F05D110F0120F05D05F -S21400837000F01C0010BD4FF0000010BD4FF00000D4 -S21400838010BD00BF38B504460D464FF00003C4F2DA -S21400839002034FF48052C4F20202821A18BF01226E -S2140083A098420CBF002302F001033BB140F2443078 -S2140083B0C0F2010040F2D231FBF7E0FFA56038BD05 -S2140083C010B504464FF00003C4F202034FF4805287 -S2140083D0C4F20202821A18BF012298420CBF002380 -S2140083E002F001033BB140F24430C0F201004FF40A -S2140083F07B71FBF7C3FFA06810BD00BF10B5044635 -S2140084004FF40063C4F202034FF4C052C4F20202F7 -S214008410821A18BF012298420CBF002302F0010303 -S2140084203BB140F24430C0F2010040F21141FBF78C -S214008430A5FF606810BD00BF38B504460D464FF472 -S2140084400063C4F202034FF4C052C4F20202821A5E -S21400845018BF012298420CBF002302F001033BB173 -S21400846040F24430C0F2010040F22B41FBF786FF99 -S214008470A56038BD10B504464FF40063C4F202038D -S2140084804FF4C052C4F20202821A18BF0122984268 -S2140084900CBF002302F001033BB140F24430C0F2AF -S2140084A0010040F24541FBF769FFA06810BD00BF20 -S2140084B010B504464FF48043C4F20503984207D033 -S2140084C040F25830C0F201004FF03B01FBF756FF78 -S2140084D04FF001032361D4F8003C43F00103C4F8D5 -S2140084E0003C10BD10B504464FF48043C4F20503AB -S2140084F0984207D040F25830C0F201004FF05B01BE -S214008500FBF73CFFD4F8003C23F00103C4F8003C22 -S21400851010BD00BF38B504460D464FF48043C4F284 -S2140085200503984207D040F25830C0F201004FF0E1 -S2140085308801FBF723FFA3690F2BFCD8256038BD05 -S21400854038B504460D464FF48043C4F205039842FE -S21400855007D040F25830C0F201004FF0BC01FBF7E4 -S2140085600DFFA3690F2B9ABF25600120002038BDA0 -S21400857038B505460C464FF48043C4F205039842CE -S21400858007D040F25830C0F201004FF0F301FBF77D -S214008590F5FE4FF6F073C3F6C07304EA0303A34276 -S2140085A007D040F25830C0F201004FF0F701FBF759 -S2140085B0E5FE04F04073B3F1407F06BF24F000747C -S2140085C0022300236B60AC6038BD00BF38B504469C -S2140085D00D464FF48043C4F20503984207D040F29C -S2140085E05830C0F2010040F23911FBF7C7FE102DDB -S2140085F007D940F25830C0F201004FF49D71FBF7E6 -S214008600BDFEE56038BD00BF10B504464FF480439C -S214008610C4F20503984207D040F25830C0F2010079 -S21400862040F25511FBF7AAFEE06810BD10B50446EF -S2140086304FF48043C4F20503984207D040F2583006 -S214008640C0F201004FF4BC71FBF798FEA06910BDA4 -S21400865010B504464FF48043C4F20503984207D091 -S21400866040F25830C0F2010040F29311FBF786FE4C -S2140086704FF00103C4F81038D4F8003C43F002036E -S214008680C4F8003C10BD00BF10B504464FF480434C -S214008690C4F20503984207D040F25830C0F20100F9 -S2140086A040F2B311FBF76AFED4F8003C23F0020355 -S2140086B0C4F8003C10BD00BF38B504460D464FF464 -S2140086C08043C4F20503984207D040F25830C0F207 -S2140086D001004FF4F071FBF751FE04F50062936958 -S2140086E0002BFCD0D4F800382B6038BD38B50446D3 -S2140086F00D464FF48043C4F20503984207D040F27B -S2140087005830C0F201004FF40571FBF737FED4F87D -S21400871018382BB1D4F800382B604FF0010038BD64 -S2140087204FF0000038BD00BF38B504460D464FF484 -S2140087308043C4F20503984207D040F25830C0F296 -S21400874001004FF41271FBF719FE4FF6F073C3F6F3 -S214008750407305EA0303AB4207D040F25830C0F23C -S214008760010040F24B21FBF709FE4FF00003C4F86E -S214008770043805F04073B3F1007F06D1D4F804380E -S21400878043F00403C4F8043808E0B3F1407F02BFA6 -S214008790D4F8043843F00203C4F8043825F0007512 -S2140087A0C4F8085838BD00BF38B504460D464FF427 -S2140087B08043C4F20503984207D040F25830C0F216 -S2140087C0010040F29321FBF7D9FD102D07D940F2A6 -S2140087D05830C0F201004FF42571FBF7CFFDC4F806 -S2140087E00C5838BD10B504464FF48043C4F2050358 -S2140087F0984207D040F25830C0F2010040F2AF2154 -S214008800FBF7BCFDD4F80C384FF6FE7003EA000008 -S21400881010BD00BF10B504464FF48043C4F20503F4 -S214008820984207D040F25830C0F2010040F2D321FF -S214008830FBF7A4FDD4F8180810BD00BF10B5044619 -S2140088404FF48043C4F20503984207D040F25830F4 -S214008850C0F2010040F2EF21FBF790FD4FF001035C -S2140088602361C4F81038D4F8003C43F00303C4F87E -S214008870003C10BD10B504464FF48043C4F2050317 -S214008880984207D040F25830C0F201004FF44571CC -S214008890FBF774FDD4F8003C23F00303C4F8003C57 -S2140088A010BD00BF38B504460D464FF48043C4F2F1 -S2140088B00503984207D040F25830C0F2010040F25B -S2140088C04331FBF75BFD4FF6F073C3F6C07305EA62 -S2140088D00303AB4207D040F25830C0F2010040F22A -S2140088E04731FBF74BFD4FF000036360C4F80438D4 -S2140088F005F04073B3F1007F01BFD4F8043843F0AD -S2140089000403C4F8043825F0007505F04073B3F18D -S214008910407F09D1636843F002036360D4F80438EB -S21400892043F00203C4F80438A560C4F8085838BDFC -S21400893038B504460D464FF48043C4F2050398420A -S21400894007D040F25830C0F2010040F28631FBF703 -S21400895015FD05F03003AB4207D040F25830C0F2A8 -S214008960010040F28731FBF709FDD4F8003C23F004 -S214008970300343EA0505C4F8005C38BD38B5044644 -S2140089800D464FF48043C4F20503984207D040F2E8 -S2140089905830C0F2010040F2AA31FBF7EFFC05F0B8 -S2140089A03303AB4207D040F25830C0F201004FF418 -S2140089B06B71FBF7E3FCD4F8103C43EA0505C4F8FA -S2140089C0105C38BD38B504460D464FF48043C4F2FB -S2140089D00503984207D040F25830C0F2010040F23A -S2140089E0C931FBF7CBFC05F03303AB4207D040F2AE -S2140089F05830C0F2010040F2CB31FBF7BFFCD4F890 -S214008A00103C23EA0505C4F8105C38BD38B50446AA -S214008A100D464FF48043C4F20503984207D040F257 -S214008A205830C0F2010040F2E931FBF7A7FC15B15F -S214008A30D4F8180C38BDD4F8140C38BD38B5054633 -S214008A400C464FF48043C4F20503984207D040F228 -S214008A505830C0F201004FF48361FBF78FFC04F03E -S214008A603303A34207D040F25830C0F2010040F270 -S214008A701A41FBF783FCC5F81C4C38BD10B50C46F4 -S214008A804FF48043C4F20503984207D040F25830B2 -S214008A90C0F2010040F23B41FBF770FC3CB940F2EB -S214008AA05830C0F2010040F23C41FBF767FC4FF043 -S214008AB04400214600F02CF84FF0440000F004F982 -S214008AC010BD00BF08B54FF48043C4F205039842BA -S214008AD007D040F25830C0F2010040F25E41FBF78A -S214008AE04DFC4FF0440000F043F94FF0440000F016 -S214008AF053F808BDFEE700BF08B5FCF7FDFCC0B2A2 -S214008B0008BD00BF08B5FCF7EFFCC0B208BD00BF4B -S214008B1070B505460E46462807D940F26C30C0F2BE -S214008B2001004FF0C901FBF729FC40F20004C2F235 -S214008B3000044FEA84534FEA93533BB140F26C3043 -S214008B40C0F201004FF0CE01FBF718FC4EF60853BA -S214008B50CEF200031B689C4216D04EF60853CEF2A7 -S214008B60000318684FF0000340F20001C2F2000153 -S214008B701A58CA5003F10403B3F58E7FF8D14EF6A7 -S214008B800853CEF200031C6040F20003C2F200035A -S214008B9043F8256070BD00BF10B50446462807D9C7 -S214008BA040F26C30C0F201004FF48171FBF7E6FB37 -S214008BB040F20003C2F2000348F6F522C0F20002BB -S214008BC043F8242010BD00BF10B50446072807D977 -S214008BD040F26C30C0F201004FF49071FBF7CEFB10 -S214008BE040F28833C0F2010353F8242042F0BE62FC -S214008BF042F420224EF60C53CEF200031A6010BD4B -S214008C004EF60C53CEF20003196801F4E061B1F59C -S214008C10E06F0ED040F28833C0F201034FF001003F -S214008C2053F8042F8A4206D000F101000828F7D135 -S214008C3070474FF00000704738B504460D46A0F167 -S214008C400403422B07D940F26C30C0F201004FF407 -S214008C50B871FBF793FB40F2A833C0F201034FEA6A -S214008C60940253F82230196804F003044FEAC4044F -S214008C704FF0FF0202FA04F221EA020205FA04F5B6 -S214008C8042EA05041C6038BD10B50446A0F1040392 -S214008C90422B07D940F26C30C0F201004FF4C77186 -S214008CA0FBF76CFB40F2A833C0F201034FEA9402D4 -S214008CB053F82230186804F003044FEAC40420FA7C -S214008CC004F0C0B210BD00BF10B50446462807D950 -S214008CD040F26C30C0F201004FF4D571FBF74EFB4A -S214008CE0042C08D14EF62453CEF200031A6842F440 -S214008CF080321A6010BD052C08D14EF62453CEF2F1 -S214008D0000031A6842F400321A6010BD062C08D11F -S214008D104EF62453CEF200031A6842F480221A60FC -S214008D2010BD0F2C08D14EF21003CEF200031A68C5 -S214008D3042F002021A6010BDA4F110031F2B09D8DE -S214008D404FF0010202FA03F34FF46142CEF2000242 -S214008D50136010BD2F2C0AD9A4F130044FF0010384 -S214008D6003FA04F44EF20413CEF200031C6010BDA6 -S214008D7010B50446462807D940F26C30C0F2010010 -S214008D804FF4F771FBF7FAFA042C08D14EF6245389 -S214008D90CEF200031A6822F480321A6010BD052C49 -S214008DA008D14EF62453CEF200031A6822F400329D -S214008DB01A6010BD062C08D14EF62453CEF20003DE -S214008DC01A6822F480221A6010BD0F2C08D14EF2C9 -S214008DD01003CEF200031A6822F002021A6010BDD9 -S214008DE0A4F110031F2B09D84FF0010202FA03F377 -S214008DF04EF28012CEF20002136010BD2F2C0AD95C -S214008E00A4F130044FF0010303FA04F44EF2841385 -S214008E10CEF200031C6010BD10B50446462807D9E4 -S214008E2040F26C30C0F2010040F23621FBF7A6FAA1 -S214008E30022C08D14EF60453CEF200031A6842F014 -S214008E4000421A6010BD0E2C08D14EF60453CEF226 -S214008E5000031A6842F080521A6010BD0F2C08D129 -S214008E604EF60453CEF200031A6842F080621A608F -S214008E7010BDA4F110031F2B09D84FF0010202FA0F -S214008E8003F34FF46242CEF20002136010BD2F2CA3 -S214008E900AD9A4F130044FF0010303FA04F44EF2A9 -S214008EA00423CEF200031C6010BD00BF10B50446BC -S214008EB0462807D940F26C30C0F201004FF41D710D -S214008EC0FBF75CFA0E2C08D14EF60453CEF20003E4 -S214008ED01A6842F000621A6010BD0F2C08D14EF6D8 -S214008EE00453CEF200031A6842F000721A6010BDF6 -S214008EF0A4F110031F2B09D84FF0010202FA03F366 -S214008F004EF28022CEF20002136010BD2F2C0AD93A -S214008F10A4F130044FF0010303FA04F44EF2842364 -S214008F20CEF200031C6010BD08B5FCF7EBFA08BDD6 -S214008F3008B5FCF7EBFA08BD10B5044630F006039A -S214008F4007D040F2F030C0F201004FF04F01FBF7BF -S214008F5015FA44F001044EF69453CEF200031C605A -S214008F6010BD00BF4EF69453CEF200031A6822F0EE -S214008F7001021A60704700BF4EF69053CEF200030F -S214008F801868C0F30720704710B50446072807D9AD -S214008F9040F2F030C0F201004FF09701FBF7EEF917 -S214008FA04EF69853CEF200031C604EF6A053CEF257 -S214008FB000031A6842F001021A6010BD10B504469C -S214008FC0072807D940F2F030C0F201004FF0B80190 -S214008FD0FBF7D4F94EF69853CEF200031C604EF61B -S214008FE0A053CEF200031A6822F001021A6010BDE8 -S214008FF070B505460C461646072807D940F2F030ED -S214009000C0F201004FF49C71FBF7B8F9C6F34403B5 -S21400901003F101034FF0FF3202FA03F32340A342A9 -S21400902007D040F2F030C0F201004FF49D71FBF71C -S214009030A5F945F0100545EA04044EF69C53CEF219 -S21400904000031C6026F47C1646F4A0264EF6A053B9 -S214009050CEF200031E6070BD70B505460C4616467F -S214009060072807D940F2F030C0F2010040F267113D -S214009070FBF784F93CB940F2F030C0F201004FF43F -S214009080B471FBF77BF93EB940F2F030C0F2010054 -S21400909040F26911FBF772F94EF69853CEF20003D0 -S2140090A01D604EF69C53CEF200031B6823604EF6FE -S2140090B0A053CEF200031B68336070BD10B50446A3 -S2140090C038B940F2F030C0F2010040F29111FBF7DF -S2140090D055F94FF004002146FFF71AFD4FF0040043 -S2140090E0FFF7F2FD10BD00BF08B54FF00400FFF714 -S2140090F03FFE4FF00400FFF74FFD08BD802814BF69 -S21400910000230123402808BF43F0010353B9B0F5FC -S214009110807F14BF00230123C02814BF184643F0E5 -S214009120010070474FF00100704700BFA0F14002F9 -S214009130822814BF00230123012A98BF43F00103AD -S214009140CBB9C42814BF00230123832808BF43F0EB -S21400915001039BB9B0F5837F14BF00230123C52804 -S21400916008BF43F0010363B940F20713984214BFE7 -S2140091700020012070474FF0010070474FF00100BB -S21400918070474FF00100704770B504460D4616460E -S2140091904FF40043C4F20203984207D040F2044062 -S2140091A0C0F201004FF0BD01FBF7E8F82846FFF7D4 -S2140091B0A5FF38B940F20440C0F201004FF0BE01EE -S2140091C0FBF7DCF82A1929594FF00103CFF6F8739C -S2140091D001EA030333432B5116F0020F1DBFB023E1 -S2140091E013624FF430638C2304BF136240F60C0303 -S2140091F0536270BDF8B504460D4616464FF400435C -S214009200C4F20203984207D040F20440C0F20100C4 -S2140092104FF48571FBF7B2F82846FFF76FFF38B9B1 -S21400922040F20440C0F2010040F20B11FBF7A6F832 -S2140092302F192B5913F0020F0ED0B6F5003F07D3A7 -S21400924040F20440C0F2010040F21B11FBF796F812 -S2140092504FEA56063E61F8BD06F1FF36B6F5803F8A -S21400926007D340F20440C0F201004FF49271FBF7BE -S21400927085F83E61F8BD00BF38B504460D464FF48C -S2140092800043C4F20203984207D040F20440C0F202 -S214009290010040F24311FBF771F82846FFF72EFF56 -S2140092A038B940F20440C0F201004FF4A271FBF757 -S2140092B065F82B192A5912F0020F186914BF4000DE -S2140092C0013038BD38B504460D464FF40043C4F2AD -S2140092D00203984207D040F20440C0F201004FF467 -S2140092E0B971FBF74BF82846FFF708FF38B940F28C -S2140092F00440C0F2010040F27311FBF73FF82B590F -S21400930043F001032B5138BD38B504460D464FF4E3 -S2140093100043C4F20203984207D040F20440C0F271 -S214009320010040F28F11FBF729F82846FFF7E6FE0A -S21400933038B940F20440C0F201004FF4C871FBF7A0 -S2140093401DF82B5923F001032B5138BDF8B50546FF -S2140093500E4614464FF40043C4F20203984207D068 -S21400936040F20440C0F201004FF4DA71FBF706F851 -S2140093703046FFF7DBFE38B940F20440C0F2010089 -S21400938040F2B511FAF7FAFF26F03F035F195B5972 -S21400939013F0020F18BF64083D69AC4207D340F2D1 -S2140093A00440C0F201004FF4E671FAF7E7FF2C1B09 -S2140093B016F0010F14BFFC61BC61F8BD38B5044659 -S2140093C00D464FF40043C4F20203984207D040F221 -S2140093D00440C0F201004FF4FD71FAF7CFFF2846B3 -S2140093E0FFF7A4FE38B940F20440C0F2010040F294 -S2140093F0FB11FAF7C3FF25F03F031A19106915F0A1 -S214009400010F14BFD2699269801A1B5913F0020F1C -S21400941018BF400038BD00BFF8B504460D461646D6 -S2140094201F464FF40043C4F20203984207D040F2AE -S2140094300440C0F201004FF40E71FAF79FFF284671 -S214009440FFF75CFE38B940F20440C0F2010040F27B -S2140094503921FAF793FFB6F5805F07D340F2044050 -S214009460C0F2010040F23A21FAF788FFB7F5805FB4 -S21400947007D340F20440C0F2010040F23B21FAF765 -S2140094807DFF2C19E6622763A36A43F00103A362FB -S214009490F8BD00BF38B505460C464FF40043C4F28D -S2140094A00203984207D040F20440C0F2010040F2A6 -S2140094B06221FAF763FF2046FFF720FE38B940F234 -S2140094C00440C0F2010040F26321FAF757FF05F1AD -S2140094D028052B5923F001032B5138BD38B5044617 -S2140094E00D464FF40043C4F20203984207D040F200 -S2140094F00440C0F2010040F28221FAF73FFF35F047 -S2140095000F0307D040F20440C0F201004FF421716F -S214009510FAF734FF256038BD38B504460D464FF4DB -S2140095200043C4F20203984207D040F20440C0F25F -S214009530010040F2A221FAF721FF35F00F0307D011 -S21400954040F20440C0F201004FF42971FAF716FF0A -S214009550656038BD70B504460D4616464FF40043A8 -S214009560C4F20203984207D040F20440C0F2010061 -S21400957040F2C921FAF702FF35F0FF0307D040F2A8 -S2140095800440C0F201004FF43371FAF7F7FE012EE3 -S214009590A3680CBF1D4323EA0505A56070BD00BF88 -S2140095A070B504460D4616464FF40043C4F2020357 -S2140095B0984207D040F20440C0F2010040F2F92180 -S2140095C0FAF7DCFE35F0FF0307D040F20440C0F2A5 -S2140095D001004FF43F71FAF7D1FE012EE3680CBF8D -S2140095E01D4323EA0505E56070BD00BF70B504465F -S2140095F00D4616464EF22003C4F20F031B6813F402 -S214009600001F07D140F20440C0F2010040F23131A1 -S214009610FAF7B4FE4FF40043C4F202039C4207D0AC -S21400962040F20440C0F2010040F23231FAF7A6FEE2 -S21400963035F0FF0307D040F20440C0F2010040F2CC -S2140096403531FAF79BFE012E636A0CBF1D4323EAF1 -S2140096500505656270BD00BF70B504460D4616462A -S2140096604FF40043C4F20203984207D040F204408D -S214009670C0F2010040F26731FAF780FE35F0FF03D2 -S21400968007D040F20440C0F2010040F26A31FAF717 -S21400969075FE012E23690CBF1D4323EA05052561CF -S2140096A070BD00BF38B50C4615464FF40043C4F2F3 -S2140096B00203984207D040F20440C0F2010040F294 -S2140096C09A31FAF75BFE2046FFF718FD38B940F2EC -S2140096D00440C0F2010040F29B31FAF74FFEB4F5A9 -S2140096E0807F1ABFA40919343D2420462946FFF777 -S2140096F00FFA2046FFF7E8FA38BD00BF10B50C4653 -S2140097004FF40043C4F20203984207D040F20440EC -S214009710C0F201004FF47471FAF730FE2046FFF7EE -S214009720EDFC38B940F20440C0F2010040F2D131FD -S214009730FAF724FEB4F5807F1ABFA40919343D2435 -S2140097402046FFF715FB2046FFF726FA10BD00BFA0 -S21400975010B50C464FF40043C4F20203984207D0FB -S21400976040F20440C0F2010040F20541FAF706FE5E -S2140097704FF019002146FFF7CBF94FF01900FFF71D -S214009780A3FA10BD08B54FF40043C4F20203984292 -S21400979007D040F20440C0F2010040F22941FAF737 -S2140097A0EDFD4FF01900FFF7E3FA4FF01900FFF751 -S2140097B0F3F908BD70B505460C4616464FF400434F -S2140097C0C4F20203984207D040F20440C0F20100FF -S2140097D040F25141FAF7D2FD2046FFF78FFC38B928 -S2140097E040F20440C0F2010040F25241FAF7C6FDD2 -S2140097F026F47C5333F03F0207D040F20440C0F218 -S214009800010040F25741FAF7B9FD05F104052B595E -S21400981043EA06062E5170BD70B505460C46164640 -S2140098204FF40043C4F20203984207D040F20440CB -S214009830C0F2010040F27A41FAF7A0FD2046FFF799 -S2140098405DFC38B940F20440C0F2010040F27B41B2 -S214009850FAF794FD26F47C5333F03F0207D040F22B -S2140098600440C0F201004FF49061FAF787FD05F15D -S21400987004052B5923EA06062E5170BD70B5044622 -S2140098800D4616464FF40043C4F20203984207D032 -S21400989040F20440C0F201004FF49461FAF76EFD06 -S2140098A02846FFF72BFC38B940F20440C0F201000E -S2140098B040F2A141FAF762FD2C19012E0CBFE068B8 -S2140098C0A06870BD70B505460E4614464FF40043BA -S2140098D0C4F20203984207D040F20440C0F20100EE -S2140098E040F2D741FAF74AFD3046FFF707FC38B991 -S2140098F040F20440C0F201004FF49B61FAF73EFDCF -S21400990034F03F0307D040F20440C0F2010040F2BA -S214009910DB41FAF733FD05F10C05AC5170BD00BF15 -S21400992038B504460D464FF40043C4F2020398428D -S21400993007D040F20440C0F2010040F2FA41FAF7C4 -S2140099401DFD35F00F1307D040F20440C0F20100B1 -S21400995040F2FD41FAF712FD636943EA05056561C9 -S21400996038BD00BF38B504460D464FF40043C4F278 -S2140099700203984207D040F20440C0F2010040F2D1 -S2140099801C51FAF7FBFC35F00F1307D040F20440E9 -S214009990C0F2010040F21F51FAF7F0FC636923EAB7 -S2140099A00505656138BD00BF10B504464FF4004399 -S2140099B0C4F20203984207D040F20440C0F201000D -S2140099C04FF4A961FAF7DAFC4FF48033E36110BD77 -S2140099D038B504460D464FF40043C4F202039842DD -S2140099E007D040F20440C0F2010040F26751FAF797 -S2140099F0C5FC012D0CBFE069A06938BD38B504462A -S214009A000D464FF40043C4F20203984207D040F2DA -S214009A100440C0F2010040F29C51FAF7AFFC35F466 -S214009A20702307D040F20440C0F2010040F29E517D -S214009A30FAF7A4FCE56138BDF8B505460C461646AF -S214009A401F464EF22003C4F20F031B6813F4001FD8 -S214009A5007D140F20440C0F2010040F2CA51FAF7C2 -S214009A608DFC4FF40043C4F202039D4207D040F23F -S214009A700440C0F2010040F2CB51FAF77FFC2046CA -S214009A80FFF73CFB38B940F20440C0F2010040F258 -S214009A90CC51FAF773FC4FF6FE739E4207D940F29C -S214009AA00440C0F2010040F2CD51FAF767FC37F0EF -S214009AB00F0307D040F20440C0F2010040F2D2513A -S214009AC0FAF75CFC05F13C031E5105F5006504F150 -S214009AD00044A4F1400445F81470F8BDF8B50746F4 -S214009AE00E4614461D464EF22003C4F20F031B68B2 -S214009AF013F4001F07D140F20440C0F2010040F208 -S214009B000A61FAF73BFC4FF40043C4F202039F429B -S214009B1007D040F20440C0F2010040F20B61FAF7B1 -S214009B202DFC3046FFF7EAFA38B940F20440C0F29E -S214009B30010040F20C61FAF721FC012C07D940F233 -S214009B400440C0F2010040F20D61FAF717FC1CB9A0 -S214009B5035F00F031FD127E040F20440C0F20100A9 -S214009B604FF4C261FAF70AFC012C03D135F0FF036B -S214009B7023D10CE040F20440C0F2010040F215612F -S214009B80FAF7FCFB1CB907F13407BD51F8BD07F125 -S214009B903807BD51F8BD40F20440C0F201004FF452 -S214009BA0C261FAF7EBFBE5E740F20440C0F20100C1 -S214009BB040F21561FAF7E2FBE5E740F20440C0F236 -S214009BC0010040F21561FAF7D9FBE0E770B50446EC -S214009BD00E4615464EF22003C4F20F031B6813F41C -S214009BE0001F07D140F20440C0F201004FF4C961E3 -S214009BF0FAF7C4FB4FF40043C4F202039C4207D0BA -S214009C0040F20440C0F2010040F24961FAF7B6FBA8 -S214009C103046FFF773FA38B940F20440C0F201004C -S214009C2040F24A61FAF7AAFB012D07D940F2044038 -S214009C30C0F2010040F24B61FAF7A0FB1DB904F137 -S214009C403404A05970BD04F13804A05970BD00BF9B -S214009C5070B504460E4615464EF22003C4F20F03B6 -S214009C601B6813F4001F07D140F20440C0F2010045 -S214009C7040F28361FAF782FB4FF40043C4F202031A -S214009C809C4207D040F20440C0F2010040F28461DA -S214009C90FAF774FB3046FFF731FA38B940F2044061 -S214009CA0C0F2010040F28561FAF768FB012D07D982 -S214009CB040F20440C0F2010040F28661FAF75EFB13 -S214009CC055B904F5006404F1040406F10046A6F153 -S214009CD0400654F8160070BD04F5006404F108044C -S214009CE006F10046A6F1400654F8160070BD00BF07 -S214009CF0F8B507460E4614461D464EF22003C4F23B -S214009D000F031B6813F4001F07D140F20440C0F293 -S214009D10010040F2B361FAF731FB4FF40043C4F29E -S214009D2002039F4207D040F20440C0F2010040F216 -S214009D30B461FAF723FB3046FFF7E0F938B940F292 -S214009D400440C0F2010040F2B561FAF717FB012C9F -S214009D5007D940F20440C0F2010040F2B661FAF7BB -S214009D600DFB1CB935F00F032DD135E040F2044051 -S214009D70C0F2010040F2B961FAF700FB012C03D1F2 -S214009D8035F0FF0331D113E040F20440C0F2010089 -S214009D9040F2BE61FAF7F2FA54B907F5006707F128 -S214009DA0040706F10046A6F1400647F81650F8BD2F -S214009DB007F5006707F1080706F10046A6F140061A -S214009DC047F81650F8BD40F20440C0F2010040F2D9 -S214009DD0B961FAF7D3FAD7E740F20440C0F20100BF -S214009DE040F2BE61FAF7CAFAD7E740F20440C0F282 -S214009DF0010040F2BE61FAF7C1FAD9E710B5044691 -S214009E004FF44043C4F202034FF45042C4F202023D -S214009E10821A18BF012298420CBF002302F00103E9 -S214009E203BB140F21840C0F201004FF03C01FAF797 -S214009E30A5FA236843F00103236010BD10B504465D -S214009E404FF44043C4F202034FF45042C4F20202FD -S214009E50821A18BF012298420CBF002302F00103A9 -S214009E603BB140F21840C0F201004FF05501FAF73E -S214009E7085FA236823F00103236010BD70B50446FD -S214009E800D4616464FF44043C4F202034FF45042C8 -S214009E90C4F20202821A18BF012298420CBF0023A5 -S214009EA002F001033BB140F21840C0F201004FF04F -S214009EB08301FAF763FA236823F01E0343EA0505D5 -S214009EC02560E66070BD00BF10B504464FF4404301 -S214009ED0C4F202034FF45042C4F20202821A18BFC0 -S214009EE0012298420CBF002302F001033BB140F26E -S214009EF01840C0F201004FF0A801FAF73FFAA06838 -S214009F0010BD00BF38B504460D464FF44043C4F2BA -S214009F1002034FF45042C4F20202821A18BF012212 -S214009F2098420CBF002302F001033BB140F21840F8 -S214009F30C0F201004FF0C301FAF720FAA56038BD61 -S214009F4010B504464FF44043C4F202034FF45042A7 -S214009F50C4F20202821A18BF012298420CBF0023E4 -S214009F6002F001033BB140F21840C0F201004FF08E -S214009F70DF01FAF703FA606800F0020000280CBF61 -S214009F8001204FF0FF3010BD10B504464FF440439B -S214009F90C4F202034FF45042C4F20202821A18BFFF -S214009FA0012298420CBF002302F001033BB140F2AD -S214009FB01840C0F201004FF0FA01FAF7DFF96068C6 -S214009FC000F0010010BD00BF10B504464FF440433A -S214009FD0C4F202034FF45042C4F20202821A18BFBF -S214009FE0012298420CBF002302F001033BB140F26D -S214009FF01840C0F2010040F21711FAF7BFF92368C3 -S21400A00043F02003236010BD10B504464FF44043D0 -S21400A010C4F202034FF45042C4F20202821A18BF7E -S21400A020012298420CBF002302F001033BB140F22C -S21400A0301840C0F2010040F23111FAF79FF9236888 -S21400A04023F02003236010BD70B504460D46164667 -S21400A0504FF44043C4F202034FF45042C4F20202EB -S21400A060821A18BF012298420CBF002302F0010397 -S21400A0703BB140F21840C0F2010040F25511FAF729 -S21400A0807DF935F4E07307D040F21840C0F20100C5 -S21400A0904FF4AB71FAF772F93EB940F21840C0F2CD -S21400A0A0010040F25711FAF769F9236823F4E073C8 -S21400A0B043EA0505256006F1FF36266170BD00BF40 -S21400A0C010B504464FF44043C4F202034FF4504226 -S21400A0D0C4F20202821A18BF012298420CBF002363 -S21400A0E002F001033BB140F21840C0F201004FF409 -S21400A0F0BD71FAF743F9E06910BD00BF38B50446F4 -S21400A1000D464FF44043C4F202034FF45042C4F2EB -S21400A1100202821A18BF012298420CBF002302F0E6 -S21400A12001033BB140F21840C0F201004FF4CF717A -S21400A130FAF724F94FF44043C4F202039C4214BFDA -S21400A14036241D2420462946FEF7E2FC2046FEF76C -S21400A150BBFD38BD10B504464FF44043C4F20203BD -S21400A1604FF45042C4F20202821A18BF01229842EB -S21400A1700CBF002302F001033BB140F21840C0F2CE -S21400A18001004FF4E471FAF7F9F84FF44043C4F2D3 -S21400A19002039C4214BF36241D242046FEF7E8FD29 -S21400A1A02046FEF7F9FC10BD38B504460D464FF4C0 -S21400A1B04043C4F202034FF45042C4F20202821A31 -S21400A1C018BF012298420CBF002302F001033BB1E6 -S21400A1D040F21840C0F201004FF4F871FAF7CEF8DA -S21400A1E0236A43EA0505256238BD00BF38B5044634 -S21400A1F00D464FF44043C4F202034FF45042C4F2FB -S21400A2000202821A18BF012298420CBF002302F0F5 -S21400A21001033BB140F21840C0F2010040F20E21AB -S21400A220FAF7ACF8236A23EA0505256238BD00BFB5 -S21400A23038B504460D464FF44043C4F202034FF4CB -S21400A2405042C4F20202821A18BF012298420CBF82 -S21400A250002302F001033BB140F21840C0F20100B7 -S21400A2604FF40B71FAF78AF80DB1A06A38BD606A30 -S21400A27038BD00BF38B504460D464FF44043C4F21F -S21400A28002034FF45042C4F20202821A18BF01229F -S21400A29098420CBF002302F001033BB140F2184085 -S21400A2A0C0F2010040F25B21FAF768F8A56238BDFB -S21400A2B02DE9F84306460C4615461F46DDF8208075 -S21400A2C0DDF824904FF40043C4F200034FF410422C -S21400A2D0C4F20002821A18BF012298420CBF002363 -S21400A2E002F001033BB140F22C40C0F201004FF0F7 -S21400A2F06F01FAF743F8AB1E18BF0123002D0CBF01 -S21400A300002303F00103D3B1EB1E18BF0123012D78 -S21400A3100CBF002303F001038BB1B5F1200318BF77 -S21400A3200123102D0CBF002303F001033BB140F2C4 -S21400A3302C40C0F201004FF07501FAF71FF8022F0B -S21400A34007D940F22C40C0F201004FF07801FAF72E -S21400A35015F81FB9B8EB540F09D810E04AF6AB232E -S21400A360CAF6AA23A3FB0423B8EBD30F07D940F2FF -S21400A3702C40C0F201004FF07A01F9F7FFFFB4FB62 -S21400A380F8F4B4F57E4F07D940F22C40C0F2010035 -S21400A3904FF07B01F9F7F2FFA9F104030C2B07D964 -S21400A3A040F22C40C0F201004FF07C01F9F7E6FFC6 -S21400A3B0022F03D04FF000032FB101E04FF0080347 -S21400A3C04FF0040202E04FF000031A461343736096 -S21400A3D04FF0000303F10203B4FBF3F202F1FF3285 -S21400A3E0FF2AF7D833614FEA851303F0FF0305F021 -S21400A3F0300543EA050509F1FF3945EA090949EA46 -S21400A40002223260BDE8F88310B504464FF40043DC -S21400A410C4F200034FF41042C4F20002821A18BFBE -S21400A420012298420CBF002302F001033BB140F228 -S21400A4302C40C0F201004FF0AD01F9F79FFF6368B2 -S21400A44043F00203636010BD10B504464FF40043AA -S21400A450C4F200034FF41042C4F20002821A18BF7E -S21400A460012298420CBF002302F001033BB140F2E8 -S21400A4702C40C0F201004FF0C601F9F77FFF636879 -S21400A48023F00203636010BD38B504460D464FF452 -S21400A4900043C4F200034FF41042C4F20002821AD2 -S21400A4A018BF012298420CBF002302F001033BB103 -S21400A4B040F22C40C0F201004FF0EA01F9F75EFFCF -S21400A4C04FF40043C4F200039C4214BF3224172406 -S21400A4D020462946FEF71CFB2046FEF7F5FB38BD56 -S21400A4E010B504464FF40043C4F200034FF4104284 -S21400A4F0C4F20002821A18BF012298420CBF002341 -S21400A50002F001033BB140F22C40C0F201004FF4D0 -S21400A5108A71F9F733FF4FF40043C4F200039C42FC -S21400A52014BF322417242046FEF722FC2046FEF7EE -S21400A53033FB10BD38B504460D464FF40043C4F255 -S21400A54000034FF41042C4F20002821A18BF012220 -S21400A55098420CBF002302F001033BB140F22C40AE -S21400A560C0F2010040F23B11F9F708FF636943EAC5 -S21400A5700505656138BD00BF38B504460D464FF485 -S21400A5800043C4F200034FF41042C4F20002821AE1 -S21400A59018BF012298420CBF002302F001033BB112 -S21400A5A040F22C40C0F2010040F25711F9F7E6FEE7 -S21400A5B0636923EA0505656138BD00BF38B5044602 -S21400A5C00D464FF40043C4F200034FF41042C4F2A9 -S21400A5D00002821A18BF012298420CBF002302F024 -S21400A5E001033BB140F22C40C0F2010040F275116D -S21400A5F0F9F7C4FE0DB1E06938BDA06938BD00BFEB -S21400A60038B504460D464FF40043C4F200034FF439 -S21400A6101042C4F20002821A18BF012298420CBFF0 -S21400A620002302F001033BB140F22C40C0F20100CF -S21400A6304FF4D271F9F7A2FE256238BD38B504464C -S21400A6400D464FF40043C4F200034FF41042C4F228 -S21400A6500002821A18BF012298420CBF002302F0A3 -S21400A66001033BB140F22C40C0F201004FF4E2710E -S21400A670F9F784FE236803F00F036FF0010202FA75 -S21400A68003F32B4207D040F22C40C0F201004FF4F7 -S21400A690E371F9F773FEE36813F0020FFBD0A560D1 -S21400A6A038BD00BF38B504460D464FF40043C4F22B -S21400A6B000034FF41042C4F20002821A18BF0122AF -S21400A6C098420CBF002302F001033BB140F22C403D -S21400A6D0C0F201004FF4F971F9F750FE236803F059 -S21400A6E00F036FF0010202FA03F32B4207D040F289 -S21400A6F02C40C0F201004FF4FA71F9F73FFEE36810 -S21400A70013F0020F1ABFA5600120002038BD00BF5D -S21400A71038B504460D464FF40043C4F200034FF428 -S21400A7201042C4F20002821A18BF012298420CBFDF -S21400A730002302F001033BB140F22C40C0F20100BE -S21400A74040F21F21F9F71AFEE36813F0040FFBD05E -S21400A750A3682B6038BD00BF38B504460D464FF4DD -S21400A7600043C4F200034FF41042C4F20002821AFF -S21400A77018BF012298420CBF002302F001033BB130 -S21400A78040F22C40C0F2010040F24E21F9F7F6FDEF -S21400A790E36813F0040F1DBFA3682B6001200020A0 -S21400A7A038BD00BF38B504460D464FF40043C4F22A -S21400A7B000034FF41042C4F20002821A18BF0122AE -S21400A7C098420CBF002302F001033BB140F22C403C -S21400A7D0C0F2010040F27921F9F7D0FD636A43EA3E -S21400A7E00505656238BD00BF38B504460D464FF412 -S21400A7F00043C4F200034FF41042C4F20002821A6F -S21400A80018BF012298420CBF002302F001033BB19F -S21400A81040F22C40C0F201004FF42671F9F7AEFD6D -S21400A820636A23EA0505656238BD00BF10B50446B5 -S21400A8304FF40043C4F200034FF41042C4F2000287 -S21400A840821A18BF012298420CBF002302F00103AF -S21400A8503BB140F22C40C0F2010040F2B521F9F7BE -S21400A8608DFDE068C0F3001010BD00BFA0F580139A -S21400A87003F1FF334FF48072C0F21002904214BF0F -S21400A88000220122012B8CBF134642F00103002B4D -S21400A89040F07E814FF40073C0F210034FF48062E4 -S21400A8A0C0F21002904214BF00220122984214BF48 -S21400A8B0134642F00103002B40F06D814FF4807385 -S21400A8C0C1F210034FF40072C1F21002904214BF9E -S21400A8D000220122984214BF134642F00103002BC7 -S21400A8E040F05C814FF48063C1F210034FF4804265 -S21400A8F0C1F21002904214BF00220122984214BFF7 -S21400A900134642F00103002B40F04B814FF4A04366 -S21400A910C2F210034FF00102C2F20002904214BFCE -S21400A92000220122984214BF134642F00103002B76 -S21400A93040F03A814FF00203C2F200034FF00402E7 -S21400A940C2F20002904214BF00220122984214BFB5 -S21400A950134642F00103002B40F029814FF0080314 -S21400A960C2F200034FF01002C2F20002904214BF7F -S21400A97000220122984214BF134642F00103002B26 -S21400A98040F018814FF02003C2F200034FF040025F -S21400A990C2F20002904214BF00220122984214BF65 -S21400A9A0134642F00103002B40F007814FF080036E -S21400A9B0C2F200034FF48072C2F20002904214BF4B -S21400A9C000220122984214BF134642F00103002BD6 -S21400A9D040F0F6804FF48053C1F20003984214BF53 -S21400A9E000230123402808BF43F00103002B40F05A -S21400A9F0EA804FF48043C1F200034FF48052C1F264 -S21400AA001002904214BF00220122984214BF13463F -S21400AA1042F00103002B40F0D9804FF48073C2F25D -S21400AA2010034FF08002C3F20002904214BF0022CF -S21400AA300122984214BF134642F00103002B40F057 -S21400AA40C8804FF01003C3F20003B0F1101F14BF0C -S21400AA5000220122984214BF134642F00103002B45 -S21400AA6040F0BA804FF48073C1F200034FF40072D6 -S21400AA70C1F20002904214BF00220122984214BF85 -S21400AA80134642F00103002B40F0A9804FF010035C -S21400AA90C1F200034FF02002C1F20002904214BF40 -S21400AAA000220122984214BF134642F00103002BF5 -S21400AAB040F0988003F12003C3F200034FF0010238 -S21400AAC0C1F21002904214BF00220122984214BF25 -S21400AAD0134642F00103002B40F0878003F1020387 -S21400AAE0C1F210034FF00402C1F21002904214BFEC -S21400AAF000220122984214BF134642F00103002BA5 -S21400AB0076D103F10803C1F210034FF00102C1F23F -S21400AB100002904214BF00220122984214BF13463E -S21400AB2042F00103002B66D103F10203C1F20003D9 -S21400AB304FF00402C1F20002904214BF002201222C -S21400AB40984214BF134642F00103002B56D14FF42F -S21400AB500053C2F200034FF00102C2F2100290420C -S21400AB6014BF00220122984214BF134642F001038C -S21400AB70002B46D14FF48053C0F21003984214BF06 -S21400AB8000230123082814BF184643F0010070472D -S21400AB904FF0010070474FF0010070474FF0010082 -S21400ABA070474FF0010070474FF0010070474FF0BC -S21400ABB0010070474FF0010070474FF001007047EA -S21400ABC04FF0010070474FF0010070474FF0010052 -S21400ABD070474FF0010070474FF0010070474FF08C -S21400ABE0010070474FF0010070474FF001007047BA -S21400ABF04FF0010070474FF0010070474FF0010022 -S21400AC0070474FF0010070474EF20803C4F20F037E -S21400AC1018684FEA10404FEA002000F58070704731 -S21400AC204EF20803C4F20F03186880B24FEAC02041 -S21400AC3000F50060704700BF10B5044600F1FF3213 -S21400AC40031F18BF0123012A94BF002303F001034A -S21400AC50002B00F0AB80B0F1100318BF01230828CA -S21400AC600CBF002303F00103002B00F09F80B0F11F -S21400AC70400318BF012320280CBF002303F0010364 -S21400AC80002B00F09380B0F5807318BF0123802856 -S21400AC900CBF002303F00103002B00F08780B0F503 -S21400ACA0806318BF0123B0F5007F0CBF002303F0BC -S21400ACB00103002B7AD0B0F5805318BF0123B0F5FE -S21400ACC0006F0CBF002303F00103002B6ED0B0F51D -S21400ACD0804318BF0123B0F5005F0CBF002303F0CC -S21400ACE00103002B62D0B0F5803318BF0123B0F506 -S21400ACF0004F0CBF002303F00103002B56D0B0F525 -S21400AD00802318BF0123B0F5003F0CBF002303F0DB -S21400AD100103002B4AD0B0F5801318BF0123B0F50D -S21400AD20002F0CBF002303F00103002B3ED0B0F52C -S21400AD30800318BF0123B0F5001F0CBF002303F0EB -S21400AD4001039BB3B0F1807318BF0123B0F5000F69 -S21400AD500CBF002303F0010343B3B0F1806318BFB8 -S21400AD600123B0F1007F0CBF002303F00103EBB119 -S21400AD70B0F1805318BF0123B0F1006F0CBF002361 -S21400AD8003F0010393B1B0F1004318BF0123B0F103 -S21400AD90005F0CBF002303F001033BB140F2AC4060 -S21400ADA0C0F2010040F24111F9F7E8FA4EF218033A -S21400ADB0C4F20F031B681C420CBF0020012010BD0C -S21400ADC010B50446FFF752FD38B940F2AC40C0F269 -S21400ADD0010040F27511F9F7D1FA4FF00103C2F203 -S21400ADE010039C4209D14EF22403C4F20F031868E4 -S21400ADF010F0030018BF012010BD40F24043C0F21F -S21400AE0001034FEA147253F822301B68A2B2C4F34F -S21400AE10044402FA04F41C420CBF0020012010BDBA -S21400AE2010B582B00446FFF721FD38B940F2AC40B9 -S21400AE30C0F2010040F2B911F9F7A0FA40F2DC4383 -S21400AE40C0F201034FEA147253F822201368A1B22D -S21400AE50C4F3044401FA04F444EA030313604FF015 -S21400AE6000030193019B0F2B06D8019B03F10103FE -S21400AE700193019B0F2BF8D9136823EA040414608E -S21400AE8002B010BD10B50446FFF7F0FC38B940F22A -S21400AE90AC40C0F201004FF4FC71F9F76FFA40F2D3 -S21400AEA0C443C0F201034FEA147253F822301A6802 -S21400AEB0A1B2C4F3044401FA04F414431C6010BDA8 -S21400AEC010B50446FFF7D2FC38B940F2AC40C0F2E9 -S21400AED0010040F22321F9F751FA40F2C443C0F2D0 -S21400AEE001034FEA147253F822301A68A1B2C4F371 -S21400AEF0044401FA04F422EA04041C6010BD00BFF6 -S21400AF0010B50446FFF7B2FC38B940F2AC40C0F2C8 -S21400AF10010040F25521F9F731FA40F2D043C0F271 -S21400AF2001034FEA147253F822301A68A1B2C4F330 -S21400AF30044401FA04F414431C6010BD10B5044622 -S21400AF40FFF794FC38B940F2AC40C0F201004FF471 -S21400AF502271F9F713FA40F2D043C0F201034FEA28 -S21400AF60147253F822301A68A1B2C4F3044401FAEA -S21400AF7004F422EA04041C6010BD00BF10B50446A9 -S21400AF80FFF774FC38B940F2AC40C0F201004FF451 -S21400AF902F71F9F7F3F940F2E843C0F201034FEAE4 -S21400AFA0147253F822301A68A1B2C4F3044401FAAA -S21400AFB004F414431C6010BD10B50446FFF756FC9D -S21400AFC038B940F2AC40C0F2010040F2F221F9F785 -S21400AFD0D5F940F2E843C0F201034FEA147253F881 -S21400AFE022301A68A1B2C4F3044401FA04F422EA37 -S21400AFF004041C6010BD00BF40B14EF26003C4F2F2 -S21400B0000F031A6842F000621A6070474EF260033F -S21400B010C4F20F031A6822F000621A60704700BF7D -S21400B02008B501464FF02C00FDF772FD4FF02C00DE -S21400B030FDF74AFE08BD00BF08B54FF02C00FDF72F -S21400B04097FE4FF02C00FDF7A7FD08BD4EF2540307 -S21400B050C4F20F031A6840EA02021A60704700BF83 -S21400B0604EF25403C4F20F031A6822EA00021A6072 -S21400B070704700BF4EF25803C4F20F0318607047C3 -S21400B08028B14EF25803C4F20F03186870474EF208 -S21400B0905003C4F20F031868704700BF10B504468B -S21400B0A0B0F11F0318BF0123052894BF002303F047 -S21400B0B00103DBB1B0F11D0318BF01231E280CBF2E -S21400B0C0002303F001038BB1B0F11B0318BF01236B -S21400B0D01C280CBF002303F001033BB140F2AC4038 -S21400B0E0C0F201004FF47D71F9F748F94EF23403CF -S21400B0F0C4F20F031C6010BD4EF23403C4F20F03FB -S21400B1001868704710B50446012807D940F2AC40CD -S21400B110C0F2010040F22941F9F730F94EF260130F -S21400B120C4F20F031C6010BD4EF60C53CEF20003A3 -S21400B1304FF00402C0F2FA521A60FEE708B5FAF7BA -S21400B140DFF908BD10B54EF61054CEF200042368A1 -S21400B15043F004032360FAF7D3F9236823F00403CB -S21400B160236010BD4EF25C03C4F20F0318687047EC -S21400B1704EF25C03C4F20F031A6822EA00021A6059 -S21400B180704700BF38B504460D4630F0030307D0BD -S21400B19040F2AC40C0F2010040F2D341F9F7EEF8BD -S21400B1A0B5F5005F07D340F2AC40C0F2010040F2B4 -S21400B1B0D441F9F7E3F844EA85044EF23003C4F2CA -S21400B1C00F031C6038BD00BF0138FDD1704700BFBB -S21400B1D0F8B504464FF46043C4F20F031B6813F03F -S21400B1E0E04F0DD04FF46043C4F20F031A684FF0DF -S21400B1F00003C7F2FF0302EA0303B3F1805F02D144 -S21400B200002CC0F2C5804EF26002C4F20F02116834 -S21400B2104EF27003C4F20F031E6841F4006121F47D -S21400B220800546F4006615601E6011F0020F02D01D -S21400B23014F0020F05D015F0010F26D014F0010F00 -S21400B24023D164F003031D404EF26003C4F20F03E3 -S21400B2501D60002E0CDA06F07003702B14BF00225F -S21400B2600122302B14BF134642F0010323B908E035 -S21400B27005F03003302B04D14FF48050FFF7A4FFC5 -S21400B28003E04FF40020FFF79FFF25F45E5727F0FA -S21400B290700743F2F07304EA03031F434DF68F73FF -S21400B2A0C7F6FF7306EA030342F23005C8F200054C -S21400B2B004EA05051D4304F008034EF25802C4F2E2 -S21400B2C00F024FF04001116055EAC3050AD54EF251 -S21400B2D07003C4F20F031D604EF26003C4F20F0346 -S21400B2E01F6009E04EF26003C4F20F031F604EF2C7 -S21400B2F07003C4F20F031D604FF01000FFF764FFE9 -S21400B30027F0F86727F003074FF00303C0F2C07377 -S21400B31004EA03031F4325F0FC5504F0FC531D43C9 -S21400B32014F0804F1FBF47F4800725F480000023E9 -S21400B330C4F240031ABF2340184325F0804014F49B -S21400B340006F17D14EF25003C4F20F031B6813F0C0 -S21400B350400F0BD147F6FF734EF25001C4F20F01B7 -S21400B3600A6812F0400F01D1013BF9D127F40067BB -S21400B37020F400604EF26003C4F20F031F604EF22A -S21400B3807003C4F20F0318604FF01000FFF71CFFA5 -S21400B390F8BD00BF30B44EF26003C4F20F031B6862 -S21400B3A04EF27002C4F20F021268002AB4BF02F016 -S21400B3B0700103F03001202900F0858004D881B1A7 -S21400B3C0102940F0548115E0602900F0E5807029CE -S21400B3D000F0DF80302908BF47F2305040F0478148 -S21400B3E0DCE040F25041C0F20101C3F3841051F892 -S21400B3F02000D3E04FF46041C4F20F01096811F059 -S21400B400E04F04BF4EF2C010C0F2E40000F0C68069 -S21400B4104FF46041C4F20F0108684FF00001C7F214 -S21400B420FF0100EA0101B1F1805F04BF4EF2C010D7 -S21400B430C0F2E40000F0B2804FF46041C4F20F01A5 -S21400B44008684FF00001C7F2FF0100EA01014FF063 -S21400B4500000C1F2010081420DD14FF46041C4F2F8 -S21400B4600F01096889B2022904BF4FF4D850C0F210 -S21400B470B70000F093804FF46041C4F20F010868F3 -S21400B4804FF00001C7F2FF0100EA01014FF0000093 -S21400B490C1F2030081421CBF4FF41050C0F2F4000A -S21400B4A07CD14FF46041C4F20F010C68A4B24FF493 -S21400B4B0D850C0F2B7004FF41051C0F2F401002C7F -S21400B4C018BF08466AE04FF46041C4F20F010968ED -S21400B4D011F0E04F04BF43F67000C0F239005DD0B3 -S21400B4E04FF46041C4F20F0108684FF00001C7F244 -S21400B4F0FF0100EA0101B1F1805F04BF43F670006E -S21400B500C0F239004AD04FF46041C4F20F01086817 -S21400B5104FF00001C7F2FF0100EA01014FF0000002 -S21400B520C1F2010081420CD14FF46041C4F20F0118 -S21400B530096889B2022904BF4CF2C060C0F22D002F -S21400B5402CD04FF46041C4F20F0108684FF00001A0 -S21400B550C7F2FF0100EA01014FF00000C1F203004C -S21400B56081421CBF4FF41060C0F23D0016D14FF46C -S21400B5706041C4F20F010C68A4B24CF2C060C0F285 -S21400B5802D004FF41061C0F23D01002C18BF084694 -S21400B59004E04FF4004001E04FF48000002A03DA94 -S21400B5A012F4006F03D040E013F4006F3DD14EF26A -S21400B5B06401C4F20F0109684FF46044C4F20F043A -S21400B5C0246814F0E04F0DD04FF46044C4F20F042A -S21400B5D025684FF00004C7F2FF0405EA0404B4F13E -S21400B5E0805F0CD1C1F3481404F1020404FB00F0A0 -S21400B5F001F01F0404F10204B0FBF4F00BE0C1F309 -S21400B600481404FB00F001F01F0404F101044FEAA3 -S21400B6104404B0FBF4F011F4804F18BF400811F456 -S21400B620004F18BF800843F4800313F4800F20D027 -S21400B630002A15DA12F0804F0BD012F4006F08D1F2 -S21400B6404FEA4000C2F3865202F10102B0FBF2F06C -S21400B6500FE0C2F3C55202F10102B0FBF2F008E0BF -S21400B660C3F3C35303F10103B0FBF3F001E04FF063 -S21400B670000030BC704700BF10B50446B0F580131C -S21400B68018BF012300280CBF002303F0010303B3F7 -S21400B690B0F5A01318BF0123B0F5901F0CBF002310 -S21400B6A003F00103ABB1B0F5C01318BF0123B0F52A -S21400B6B0B01F0CBF002303F0010353B1B0F5D01F39 -S21400B6C007D040F2AC40C0F2010040F22E71F8F70D -S21400B6D055FE4EF21003C4F20F031B6813F4801FCE -S21400B6E007D140F2AC40C0F2010040F23371F8F7E7 -S21400B6F045FE4EF26003C4F20F031A6822F4F012FD -S21400B70014431C6010BD00BF08B54EF21003C4F20F -S21400B7100F031B6813F4801F07D140F2AC40C0F241 -S21400B72001004FF4EA61F8F729FE4EF26003C4F216 -S21400B7300F031B6813F4801F1FBF4EF26003C4F292 -S21400B7400F03186800F4F01008BF002008BD00BF03 -S21400B75010B50446B0F5206318BF0123B0F5706F2E -S21400B7600CBF002303F001038BB1031E18BF012397 -S21400B770B0F5A06F0CBF002303F001033BB140F20D -S21400B780AC40C0F201004FF4F061F8F7F7FD4EF25E -S21400B7901003C4F20F031B6813F4803F07D140F276 -S21400B7A0AC40C0F2010040F28571F8F7E7FD4FF4B7 -S21400B7B06143C4F20F031A6822F4706244EA02027C -S21400B7C01A604EF21013C4F20F031A6822F4706265 -S21400B7D014431C6010BD00BF08B54EF21003C4F23F -S21400B7E00F031B6813F4803F07D140F2AC40C0F251 -S21400B7F0010040F2A171F8F7C1FD4FF46143C4F2B5 -S21400B8000F03186800F4706008BD00BF40B14EF228 -S21400B8106003C4F20F031A6842F008021A60704709 -S21400B8204EF26003C4F20F031A6822F008021A6090 -S21400B830704700BF40B14EF26003C4F20F031A68AF -S21400B84042F004021A6070474EF26003C4F20F031F -S21400B8501A6822F004021A60704700BF40B14EF228 -S21400B8606003C4F20F031A6842F480621A607047DD -S21400B8704EF26003C4F20F031A6822F480621A6064 -S21400B880704700BF4EF25013C4F20F034FF0010290 -S21400B8901A604FF000021A60704700BF10B50446E9 -S21400B8A000F1604303F1FF334FF00402C2F20002DE -S21400B8B0821A18BF0122012B94BF002302F0010355 -S21400B8C0002B3AD04FF00803C2F200034FF01002EC -S21400B8D0C2F20002821A18BF012298420CBF00234F -S21400B8E002F001034BB34FF02003C2F200034FF007 -S21400B8F04002C2F20002821A18BF012298420CBF10 -S21400B900002302F00103C3B14FF08003C2F200032C -S21400B9104FF48072C2F20002821A18BF01229842C7 -S21400B9200CBF002302F001033BB140F2AC40C0F272 -S21400B930010040F65601F8F721FD4EF26C03C4F202 -S21400B9400F031A68A4B214431C6010BD10B5044659 -S21400B95000F1604303F1FF334FF00402C2F200022D -S21400B960821A18BF0122012B94BF002302F00103A4 -S21400B970002B3AD04FF00803C2F200034FF010023B -S21400B980C2F20002821A18BF012298420CBF00239E -S21400B99002F001034BB34FF02003C2F200034FF056 -S21400B9A04002C2F20002821A18BF012298420CBF5F -S21400B9B0002302F00103C3B14FF08003C2F200037C -S21400B9C04FF48072C2F20002821A18BF0122984217 -S21400B9D00CBF002302F001033BB140F2AC40C0F2C2 -S21400B9E0010040F67E01F8F7C9FC4EF26C03C4F283 -S21400B9F00F031A68A4B222EA04041C6010BD00BF3C -S21400BA004EF27003C4F20F031A6822F480421A60E2 -S21400BA10704700BF4EF27003C4F20F031A6842F478 -S21400BA2080421A60704700BF38B505460C4639B9E3 -S21400BA304EF27013C4F20F034FF000021A6082E059 -S21400BA4018BB4EF26403C4F20F031B684EF260028A -S21400BA50C4F20F02106840F25042C0F20102C0F376 -S21400BA608410C3F3481152F8205005FB01F503F08B -S21400BA701F0202F10102B5FBF2F513F4804F18BF66 -S21400BA806D0813F4004F18BFAD08A54207D840F262 -S21400BA90AC40C0F2010040F60311F8F76FFC4FEA25 -S21400BAA0541101F1FF335D19B5FBF4F34FF4604216 -S21400BAB0C4F20F0210684FF00002C7F2FF0200EA5D -S21400BAC002024FF00000C1F2040082420ED14FF491 -S21400BAD06042C4F20F02106880B240F20112904237 -S21400BAE004D1FF2B84BF0F24FF230BD8B3F5806F40 -S21400BAF03DBF04FB13521201B2FBF4F40F2428BF1F -S21400BB0040F2FF3344F0004040F4004040EA035067 -S21400BB1040EA04404FEA031318434EF27012C4F290 -S21400BB200F021060C1F101014D191B19B5FBF3F2AC -S21400BB304FEA02124FEA121403FB14554FEA05159A -S21400BB40B5FBF3F39C18204638BD00BF4EF2100339 -S21400BB50CEF200031A6842F005021A60704700BF72 -S21400BB604EF21003CEF200031A6822F001021A60A9 -S21400BB70704700BF08B501464FF00F00FCF7C8FF3E -S21400BB804EF21003CEF200031A6842F002021A6068 -S21400BB9008BD00BF08B54EF21003CEF200031A68C7 -S21400BBA022F002021A604FF00F00FCF7F5FF08BD06 -S21400BBB04EF21003CEF200031A6842F002021A6038 -S21400BBC0704700BF4EF21003CEF200031A6822F050 -S21400BBD002021A60704700BF10B500F1FF34B4F1DE -S21400BBE0807F07D340F2F440C0F201004FF0D0014E -S21400BBF0F8F7C4FB4EF21403CEF200031C6010BD2F -S21400BC004EF21403CEF20003186800F101007047EC -S21400BC104EF21803CEF20003186870474FF0000388 -S21400BC20C4F203034FF48052C4F20302904214BFDE -S21400BC3000220122984214BF134642F001038BB93A -S21400BC404FF40053C4F203034FF44052C4F203020D -S21400BC50904214BF00220122984214BF104642F0C0 -S21400BC60010070474FF00100704700BF38B5054629 -S21400BC700C46FFF7D3FF38B940F20C50C0F2010073 -S21400BC804FF05201F8F77AFBB4F57F4318BF012353 -S21400BC90FF2C0CBF002303F001035BB14FF6FF73CC -S21400BCA09C4207D040F20C50C0F201004FF0540105 -S21400BCB0F8F764FBEA6840F2011304EA030342EA79 -S21400BCC00303EB6038BD00BF38B505460C46FFF7EA -S21400BCD0A5FF38B940F20C50C0F201004FF06F01DA -S21400BCE0F8F74CFBB4F57F4318BF0123FF2C0CBFBD -S21400BCF0002303F001035BB14FF6FF739C4207D0AD -S21400BD0040F20C50C0F201004FF07101F8F736FB1C -S21400BD10EA6840F2011304EA030322EA0303EB6035 -S21400BD2038BD00BF38B505460C46FFF777FF38B973 -S21400BD3040F20C50C0F201004FF0AB01F8F71EFBCA -S21400BD40B4F1110318BF0123012C0CBF002303F02C -S21400BD500103D3B1B4F1120318BF0123022C0CBFA8 -S21400BD60002303F0010383B1B4F1807F4CD004F0CC -S21400BD707F43B3F1806F0DD040F20C50C0F201004B -S21400BD804FF0B101F8F7FAFA3EE004F07F43B3F162 -S21400BD90806F39D104F0FF03B3F1110218BF0122FE -S21400BDA0012B0CBF002202F001024AB1022B07D081 -S21400BDB0122B05D0032B03D0072B01D00A2B1BD147 -S21400BDC004F47F43B3F5885218BF0122B3F5807F91 -S21400BDD00CBF002202F00102B2B1B3F5007F13D00F -S21400BDE0B3F5905F10D0B3F5407F0DD0B3F5E06F9C -S21400BDF00AD0B3F5206F07D040F20C50C0F2010015 -S21400BE004FF0C001F8F7BAFAEB6823F4807323F01A -S21400BE100103EB604FEA14632B6004F0FF036B60D2 -S21400BE20C4F30724AC6038BD70B505460C4616460C -S21400BE30FFF7F4FE38B940F20C50C0F201004FF0A4 -S21400BE40EB01F8F79BFAB4F57F4318BF0123FF2CEC -S21400BE500CBF002303F001035BB14FF6FF739C4257 -S21400BE6007D040F20C50C0F201004FF0ED01F8F799 -S21400BE7085FA44F2400304EA03032EB105F10C02EE -S21400BE80E96841EA030304E005F10C02E96821EAE7 -S21400BE900303136070BD00BF70B505460C4616461A -S21400BEA0FFF7BCFE38B940F20C50C0F2010040F279 -S21400BEB00F11F8F763FAB4F57F4318BF0123FF2C80 -S21400BEC00CBF002303F001035BB14FF6FF739C42E7 -S21400BED007D040F20C50C0F2010040F21111F8F702 -S21400BEE04DFA42F2200304EA03032EB105F10C02D8 -S21400BEF0E96841EA030304E005F10C02E96821EA77 -S21400BF000303136070BD00BF70B505460C461646A9 -S21400BF10FFF784FE38B940F20C50C0F201004FF42F -S21400BF209A71F8F72BFAB4F57F4318BF0123FF2C5C -S21400BF300CBF002303F001035BB14FF6FF739C4276 -S21400BF4007D040F20C50C0F201004FF49B71F8F796 -S21400BF5015FAEA6822F4406222F00C0240F60C431E -S21400BF6004EA030303EA060642EA0603EB6070BD32 -S21400BF7070B505460C461646FFF750FE38B940F237 -S21400BF800C50C0F2010040F25911F8F7F7F9B4F579 -S21400BF907F4318BF0123FF2C0CBF002303F00103CF -S21400BFA05BB14FF6FF739C4207D040F20C50C0F2D4 -S21400BFB0010040F25B11F8F7E1F940F2022304EACF -S21400BFC003032EB105F10C02E96841EA030304E01D -S21400BFD005F10C02E96821EA0303136070BD00BF97 -S21400BFE070B505460C461646FFF718FE38B940F2FF -S21400BFF00C50C0F201004FF4C071F8F7BFF9B4F569 -S21400C0007F4318BF0123FF2C0CBF002303F001035E -S21400C0105BB14FF6FF739C420AD040F20C50C0F260 -S21400C02001004FF4C171F8F7A9F914F0FF0F09D019 -S21400C03026B16B6843F040036B6003E06B6823F047 -S21400C04040036B6014F47F4F09D026B1AB6843F011 -S21400C0504003AB6070BDAB6823F04003AB6070BDBF -S21400C06010B50446FFF7DAFD38B940F20C50C0F2BE -S21400C070010040F2B511F8F781F9E36843F01003C8 -S21400C080E36010BD10B50446FFF7C8FD38B940F2AE -S21400C0900C50C0F201004FF4E771F8F76FF9E3684F -S21400C0A023F01003E36010BD70B506460C46154637 -S21400C0B0FFF7B4FD38B940F20C50C0F201004FF45F -S21400C0C0F771F8F75BF9B4F57F4318BF0123FF2C2F -S21400C0D00CBF002303F001035BB14FF6FF739C42D5 -S21400C0E007D040F20C50C0F201004FF4F871F8F798 -S21400C0F045F9FF2D07D940F20C50C0F2010040F27E -S21400C100F111F8F73BF914F0FF0F18BFB56314F4FC -S21400C1107F4F18BFF56370BD38B505460C46FFF770 -S21400C1207DFD38B940F20C50C0F2010040F21921F2 -S21400C130F8F724F9B4F57F4318BF0123FF2C0CBF92 -S21400C140002303F001035BB14FF6FF739C420BD054 -S21400C15040F20C50C0F2010040F21B21F8F70EF935 -S21400C160FF2C01D1A86B38BDE86B38BD70B506460C -S21400C1700C461546FFF752FD38B940F20C50C0F297 -S21400C180010040F23E21F8F7F9F8B4F57F4318BFF6 -S21400C1900123FF2C0CBF002303F001035BB14FF615 -S21400C1A0FF739C4207D040F20C50C0F201004FF4DF -S21400C1B01071F8F7E3F8FF2D07D940F20C50C0F2E3 -S21400C1C0010040F24121F8F7D9F814F0FF0F18BF2C -S21400C1D0356414F47F4F18BF756470BD38B50546D6 -S21400C1E00C46FFF71BFD38B940F20C50C0F20100B8 -S21400C1F040F26B21F8F7C2F8B4F57F4318BF01236D -S21400C200FF2C0CBF002303F001035BB14FF6FF7356 -S21400C2109C420BD040F20C50C0F2010040F26D215F -S21400C220F8F7ACF8FF2C01D1286C38BD686C38BD27 -S21400C23070B506460C461546FFF7F0FC38B940F2D6 -S21400C2400C50C0F2010040F28D21F8F797F8B4F5D3 -S21400C2507F4318BF0123FF2C0CBF002303F001030C -S21400C2605BB14FF6FF739C420AD040F20C50C0F20E -S21400C270010040F28F21F8F781F814F0FF0F00D08C -S21400C280B56214F47F4F18BFF56270BD38B5054629 -S21400C2900C46FFF7C3FC38B940F20C50C0F2010060 -S21400C2A040F2B721F8F76AF8B4F57F4318BF0123C8 -S21400C2B0FF2C0CBF002303F001033BB140F20C50EF -S21400C2C0C0F201004FF42E71F8F758F8FF2C0CBF9F -S21400C2D0A86AE86A38BD00BF38B505460C46FFF7C1 -S21400C2E09DFC38B940F20C50C0F2010040F2D52156 -S21400C2F0F8F744F8B4F57F4318BF0123FF2C0CBFB2 -S21400C300002303F001033BB140F20C50C0F20100E1 -S21400C31040F2D621F8F732F8FF2C0CBFA86CE86C78 -S21400C32038BD00BF70B506460C461546FFF776FCCE -S21400C33038B940F20C50C0F2010040F2F721F8F78D -S21400C3401DF8B4F57F4318BF0123FF2C0CBF002354 -S21400C35003F001035BB14FF6FF739C420AD040F234 -S21400C3600C50C0F2010040F2F921F8F707F814F07B -S21400C370FF0F00D0356314F47F4F18BF756370BD90 -S21400C38038B505460C46FFF749FC38B940F20C5064 -S21400C390C0F201004FF44871F7F7F0FFB4F57F43A1 -S21400C3A018BF0123FF2C0CBF002303F001033BB191 -S21400C3B040F20C50C0F2010040F22131F7F7DEFFE8 -S21400C3C0FF2C0CBF286B686B38BD00BF70B50546E8 -S21400C3D00C461646FFF722FC38B940F20C50C0F265 -S21400C3E0010040F24631F7F7C9FFB4F57F4318BFA6 -S21400C3F00123FF2C0CBF002303F001035BB14FF6B3 -S21400C400FF739C4207D040F20C50C0F201004FF47C -S21400C4105271F7F7B3FF4FF00003C4F203039D42D7 -S21400C42008BF23250FD04FF48053C4F203039D4268 -S21400C43008BF252507D04FF40053C4F203039D42DE -S21400C44014BF3325272514F0FF0F06D028463146A3 -S21400C450FCF75EFB2846FCF737FC14F47F4F08D049 -S21400C46005F1010528463146FCF752FB2846FCF745 -S21400C4702BFC70BD38B505460C46FFF7CFFB38B928 -S21400C48040F20C50C0F2010040F28A31F7F776FF16 -S21400C490B4F57F4318BF0123FF2C0CBF002303F025 -S21400C4A001035BB14FF6FF739C4207D040F20C507D -S21400C4B0C0F201004FF46371F7F760FF4FF000031E -S21400C4C0C4F203039D4208BF23250FD04FF48053C8 -S21400C4D0C4F203039D4208BF252507D04FF400533E -S21400C4E0C4F203039D4214BF3325272514F0FF0F23 -S21400C4F005D02846FCF73CFC2846FCF74DFB14F418 -S21400C5007F4F07D005F101052846FCF731FC284689 -S21400C510FCF742FB38BD00BF38B504460D46FFF7B2 -S21400C5207DFB38B940F20C50C0F2010040F2D53124 -S21400C530F7F724FFA36943EA0505A56138BD00BFE8 -S21400C54038B504460D46FFF769FB38B940F20C5083 -S21400C550C0F201004FF47D71F7F710FFA36923EADC -S21400C5600505A56138BD00BF38B504460D46FFF782 -S21400C57055FB38B940F20C50C0F2010040F21241AF -S21400C580F7F7FCFE0DB1206A38BDE06938BD00BF84 -S21400C59038B504460D46FFF741FB38B940F20C505B -S21400C5A0C0F2010040F23C41F7F7E8FE656238BD94 -S21400C5B070B50446FFF732FB38B940F20C50C0F2B3 -S21400C5C001004FF48B61F7F7D9FE4FF00005E560E8 -S21400C5D0A5614FF0FF36666220464FF6FF71FFF703 -S21400C5E049FF25606560A560E5612562A6624FF695 -S21400C5F0FF73E36226636363A563E563256465648E -S21400C600A664E36470BD00BF4FF44043C4F2000369 -S21400C6104FF45042C4F20002904214BF002201229E -S21400C620984214BF134642F0010343B94FF46043E7 -S21400C630C4F20003984214BF0020012070474FF058 -S21400C6400100704738B505460C46FFF7DDFF38B9E0 -S21400C65040F22450C0F201004FF06001F7F78EFE62 -S21400C660A31F18BF0123002C0CBF002303F00103F7 -S21400C6709BB1B4F1820318BF0123022C0CBF002328 -S21400C68003F001034BB1862C07D040F22450C0F2D1 -S21400C69001004FF06501F7F771FEEB6A23F08603A1 -S21400C6A043EA0404EC6238BD10B50446FFF7ACFF5D -S21400C6B038B940F22450C0F201004FF08301F7F77A -S21400C6C05DFEE06A00F0860010BD00BF70B506464D -S21400C6D00D461446FFF798FF38B940F22450C0F2D2 -S21400C6E001004FF0A501F7F749FE042D07D940F2E7 -S21400C6F02450C0F201004FF0AA01F7F73FFEB4F154 -S21400C700080318BF0123002C0CBF002303F001030D -S21400C7109BB1B4F1180318BF0123102C0CBF0023E3 -S21400C72003F001034BB1202C07D040F22450C0F296 -S21400C73001004FF0AF01F7F721FE2C43746370BD84 -S21400C74070B505460C461646FFF75EFF38B940F250 -S21400C7502450C0F201004FF0D201F7F70FFE6B6BCA -S21400C76003F00702226003F03803336070BD00BF99 -S21400C770F8B504460E4615461F46FFF745FF38B97E -S21400C78040F22450C0F2010040F26F11F7F7F6FDB8 -S21400C790636AA26A4FEA86064FEA83139B18B6FBC3 -S21400C7A0F3F62E60236B13F0200F1CBF76002E606E -S21400C7B0E36A03F0EE033B60F8BD00BF10B5044625 -S21400C7C0FFF722FF38B940F22450C0F201004FF4C0 -S21400C7D0CF71F7F7D3FDE36A43F01003E362236BF0 -S21400C7E043F4407343F00103236310BD10B50446C1 -S21400C7F0FFF70AFF38B940F22450C0F201004FF4A8 -S21400C800DF71F7F7BBFDA36913F0080FFBD1E36AEE -S21400C81023F01003E362236B23F4407323F0010339 -S21400C820236310BDF8B504460E4615461F46FFF7AF -S21400C830EBFE38B940F22450C0F2010040F20D1170 -S21400C840F7F79CFD3DB940F22450C0F201004FF4CA -S21400C8508771F7F793FD4FF46043C4F20F031B682C -S21400C86013F0E04F08BF102347D04FF46043C4F2E4 -S21400C8700F031A684FF00003C7F2FF0302EA030330 -S21400C880B3F1805F08BF102337D04FF46043C4F283 -S21400C8900F031A684FF00003C7F2FF0302EA030310 -S21400C8A04FF00002C1F20102934209D14FF46043F7 -S21400C8B0C4F20F031B689BB2022B08BF10231CD0C8 -S21400C8C04FF46043C4F20F031A684FF00003C7F238 -S21400C8D0FF0302EA03034FF00002C1F20302934291 -S21400C8E018BF082309D14FF46043C4F20F031B6836 -S21400C8F09BB2002B0CBF1023082305FB03F3B342A7 -S21400C90007D940F22450C0F2010040F20F11F7F7A9 -S21400C91035FD2046FFF76AFFB6EB051F236B3DBFCC -S21400C92043F0200323636D0823F0200328BF23630E -S21400C9304FEAC606B6FBF5F505F101054FEAD51335 -S21400C9406362C5F34505A562E7624FF00003A36185 -S21400C9502046FFF733FFF8BD10B50446FFF754FE38 -S21400C96038B940F22450C0F201004FF4F271F7F7E4 -S21400C97005FDE36A43F01003E36210BD10B50446FC -S21400C980FFF742FE38B940F22450C0F2010040F2F0 -S21400C990FD11F7F7F3FCE36A23F01003E36210BD22 -S21400C9A038B504460D46FFF72FFE38B940F224503E -S21400C9B0C0F2010040F21A21F7F7E0FC25B1236B24 -S21400C9C043F00603236338BD236B43F0020323635F -S21400C9D038BD00BF10B50446FFF716FE38B940F262 -S21400C9E02450C0F201004FF40F71F7F7C7FC236B19 -S21400C9F023F00603236310BD10B504464FF46043CE -S21400CA00C4F20F031B6813F0E04F2FD04FF46043BF -S21400CA10C4F20F031A684FF00003C7F2FF0302EADE -S21400CA200303B3F1805F21D04FF46043C4F20F03D9 -S21400CA301A684FF00003C7F2FF0302EA03034FF041 -S21400CA400002C1F20102934210D04FF46043C4F2D8 -S21400CA500F031A684FF00003C7F2FF0302EA03034E -S21400CA604FF00002C1F20302934207D140F2245075 -S21400CA70C0F2010040F25D21F7F780FC2046FFF788 -S21400CA80C3FD38B940F22450C0F2010040F25E21E6 -S21400CA90F7F774FCE36A23F0E60343F06E03E36201 -S21400CAA0236B43F00803236310BD00BF10B5044694 -S21400CAB04FF46043C4F20F031B6813F0E04F2FD00F -S21400CAC04FF46043C4F20F031A684FF00003C7F236 -S21400CAD0FF0302EA0303B3F1805F21D04FF4604303 -S21400CAE0C4F20F031A684FF00003C7F2FF0302EA0E -S21400CAF003034FF00002C1F20102934210D04FF43C -S21400CB006043C4F20F031A684FF00003C7F2FF0336 -S21400CB1002EA03034FF00002C1F20302934207D178 -S21400CB2040F22450C0F2010040F28621F7F726FCBE -S21400CB302046FFF769FD38B940F22450C0F20100E4 -S21400CB4040F28721F7F71AFC236B23F008032363D0 -S21400CB5010BD00BF38B504460D464FF46043C4F21E -S21400CB600F031B6813F0E04F2FD04FF46043C4F25E -S21400CB700F031A684FF00003C7F2FF0302EA03032D -S21400CB80B3F1805F21D04FF46043C4F20F031A68FC -S21400CB904FF00003C7F2FF0302EA03034FF0000260 -S21400CBA0C1F20102934210D04FF46043C4F20F0367 -S21400CBB01A684FF00003C7F2FF0302EA03034FF0C0 -S21400CBC00002C1F20302934207D140F22450C0F2A1 -S21400CBD0010040F2AD21F7F7D1FB4FF45043C4F209 -S21400CBE000039C4207D040F22450C0F2010040F2FD -S21400CBF0AE21F7F7C3FB35F4406307D040F224506C -S21400CC00C0F2010040F2AF21F7F7B8FB236B05F442 -S21400CC10406543EA0505256338BD00BF38B50446C0 -S21400CC200D464FF46043C4F20F031B6813F0E04F49 -S21400CC302FD04FF46043C4F20F031A684FF000037E -S21400CC40C7F2FF0302EA0303B3F1805F21D04FF47B -S21400CC506043C4F20F031A684FF00003C7F2FF03E5 -S21400CC6002EA03034FF00002C1F20102934210D021 -S21400CC704FF46043C4F20F031A684FF00003C7F284 -S21400CC80FF0302EA03034FF00002C1F203029342DD -S21400CC9007D140F22450C0F2010040F2D721F7F746 -S21400CCA06DFB4FF45043C4F200039C4207D040F2A1 -S21400CCB02450C0F201004FF43671F7F75FFB35F4ED -S21400CCC0406307D040F22450C0F2010040F2D92160 -S21400CCD0F7F754FB236B05F4406523EA0505256347 -S21400CCE038BD00BF10B504464FF46043C4F20F03CE -S21400CCF01B6813F0E04F2FD04FF46043C4F20F03CD -S21400CD001A684FF00003C7F2FF0302EA0303B3F109 -S21400CD10805F21D04FF46043C4F20F031A684FF0CF -S21400CD200003C7F2FF0302EA03034FF00002C1F25A -S21400CD300102934210D04FF46043C4F20F031A6806 -S21400CD404FF00003C7F2FF0302EA03034FF00002AE -S21400CD50C1F20302934207D140F22450C0F2010010 -S21400CD604FF43F71F7F70AFB4FF45043C4F2000349 -S21400CD709C4207D040F22450C0F2010040F2FD2150 -S21400CD80F7F7FCFA206B00F4406010BD10B50446BF -S21400CD904FF46043C4F20F031B6813F0E04F2FD02C -S21400CDA04FF46043C4F20F031A684FF00003C7F253 -S21400CDB0FF0302EA0303B3F1805F21D04FF4604320 -S21400CDC0C4F20F031A684FF00003C7F2FF0302EA2B -S21400CDD003034FF00002C1F20102934210D04FF459 -S21400CDE06043C4F20F031A684FF00003C7F2FF0354 -S21400CDF002EA03034FF00002C1F20302934207D196 -S21400CE0040F22450C0F2010040F21B31F7F7B6FAA8 -S21400CE104FF45043C4F200039C4207D040F2245023 -S21400CE20C0F201004FF44771F7F7A8FAA36940F281 -S21400CE30071003EA000010BD38B504460D464FF44F -S21400CE406043C4F20F031B6813F0E04F2FD04FF47B -S21400CE506043C4F20F031A684FF00003C7F2FF03E3 -S21400CE6002EA0303B3F1805F21D04FF46043C4F2BB -S21400CE700F031A684FF00003C7F2FF0302EA03032A -S21400CE804FF00002C1F20102934210D04FF460430B -S21400CE90C4F20F031A684FF00003C7F2FF0302EA5A -S21400CEA003034FF00002C1F20302934207D140F29F -S21400CEB02450C0F201004FF45071F7F75FFA204695 -S21400CEC0FFF7A2FB38B940F22450C0F2010040F24E -S21400CED04131F7F753FA35F4404307D040F2245077 -S21400CEE0C0F2010040F24231F7F748FA236B23F410 -S21400CEF0404343EA0505256338BD00BF10B5044628 -S21400CF004FF46043C4F20F031B6813F0E04F2FD0BA -S21400CF104FF46043C4F20F031A684FF00003C7F2E1 -S21400CF20FF0302EA0303B3F1805F21D04FF46043AE -S21400CF30C4F20F031A684FF00003C7F2FF0302EAB9 -S21400CF4003034FF00002C1F20102934210D04FF4E7 -S21400CF506043C4F20F031A684FF00003C7F2FF03E2 -S21400CF6002EA03034FF00002C1F20302934207D124 -S21400CF7040F22450C0F2010040F26531F7F7FEF9A6 -S21400CF802046FFF741FB38B940F22450C0F20100BA -S21400CF9040F26631F7F7F2F9206B00F4404010BD1E -S21400CFA038B505460C46FFF72FFB38B940F224503B -S21400CFB0C0F2010040F28B31F7F7E0F9231E18BFEC -S21400CFC00123102C0CBF002303F001033BB140F2F9 -S21400CFD02450C0F2010040F28D31F7F7CFF92B6BE9 -S21400CFE023F0100343EA04042C6338BD10B504464E -S21400CFF0FFF70AFB38B940F22450C0F2010040F2B5 -S21400D000B231F7F7BBF9206B00F0100010BD00BF7F -S21400D01010B50446FFF7F8FA38B940F22450C0F2CB -S21400D020010040F2CE31F7F7A9F9A36913F0100F0B -S21400D03014BF0020012010BD10B50446FFF7E4FA27 -S21400D04038B940F22450C0F2010040F2E931F7F757 -S21400D05095F9A36913F0200F14BF0020012010BD1E -S21400D06010B50446FFF7D0FA38B940F22450C0F2A3 -S21400D070010040F20941F7F781F9A36913F0100F98 -S21400D0800CBF20684FF0FF3010BD00BF10B504463F -S21400D090FFF7BAFA38B940F22450C0F2010040F265 -S21400D0A03241F7F76BF9A36913F0100FFBD1206834 -S21400D0B010BD00BF38B504460D46FFF7A5FA38B9CF -S21400D0C040F22450C0F2010040F25B41F7F756F9F7 -S21400D0D0A36913F0200F06BF25600120002038BD8D -S21400D0E038B504460D46FFF78FFA38B940F224509B -S21400D0F0C0F2010040F28941F7F740F9A36913F046 -S21400D100200FFBD1256038BD38B504460D46FFF725 -S21400D1107BFA38B940F22450C0F2010040F2AD412B -S21400D120F7F72CF92DB104F12C03E26A42F0010264 -S21400D13004E004F12C03E26A22F001021A6038BD12 -S21400D14010B50446FFF760FA38B940F22450C0F232 -S21400D150010040F2CD41F7F711F9A069C0F3C00015 -S21400D16010BD00BF38B504460D46FFF74DFA38B976 -S21400D17040F22450C0F201004FF49E61F7F7FEF82B -S21400D1804FF44043C4F200039C4208BF152407D066 -S21400D1904FF45043C4F200039C4214BF31241624BB -S21400D1A020462946FBF7B4FC2046FBF78DFD38BD2C -S21400D1B010B50446FFF728FA38B940F22450C0F2FA -S21400D1C0010040F21C51F7F7D9F84FF44043C4F27F -S21400D1D000039C4208BF152407D04FF45043C4F206 -S21400D1E000039C4214BF312416242046FBF7C0FDE2 -S21400D1F02046FBF7D1FC10BD38B504460D46FFF7B8 -S21400D20003FA38B940F22450C0F2010040F25151FE -S21400D210F7F7B4F8A36B43EA0505A56338BD00BF6E -S21400D22038B504460D46FFF7EFF938B940F22450FA -S21400D230C0F201004FF4AE61F7F7A0F8A36B23EA43 -S21400D2400505A56338BD00BF38B504460D46FFF793 -S21400D250DBF938B940F22450C0F2010040F28E519A -S21400D260F7F78CF80DB1206C38BDE06B38BD00BF09 -S21400D27038B504460D46FFF7C7F938B940F22450D2 -S21400D280C0F2010040F2BE51F7F778F8656438BD89 -S21400D29038B504460D46FFF7B7F938B940F22450C2 -S21400D2A0C0F2010040F2E251F7F768F8A36C43EAD7 -S21400D2B00505A56438BD00BF38B504460D46FFF722 -S21400D2C0A3F938B940F22450C0F2010040F20261DE -S21400D2D0F7F754F8A36C23EA0505A56438BD00BF2C -S21400D2E010B50446FFF790F938B940F22450C0F262 -S21400D2F0010040F22161F7F741F8606800F00F0086 -S21400D30010BD00BF10B50446FFF77EF938B940F2ED -S21400D3102450C0F2010040F23D61F7F72FF84FF0BD -S21400D3200003636010BD00BF4FF20403C4F20F0396 -S21400D3304FF001021A6070474FF20403C4F20F0365 -S21400D3404FF000021A6070474FF24C03C4F20F030E -S21400D350186870474FF24C03C4F20F034FF00102F7 -S21400D3601A60704710B504461F2807D940F23C5093 -S21400D370C0F201004FF08A01F7F700F84FF0010302 -S21400D38003FA04F44FF22803C4F20F031C6010BD26 -S21400D39010B504461F2807D940F23C50C0F20100E1 -S21400D3A04FF0A501F6F7EAFF4FF0010303FA04F485 -S21400D3B04FF22C03C4F20F031C6010BD10B50446D8 -S21400D3C01F2807D940F23C50C0F201004FF0C001C0 -S21400D3D0F6F7D4FF4FF22803C4F20F031B684FF092 -S21400D3E0010202FA04F41C420CBF0020012010BD0A -S21400D3F010B5044620F47E7323F00703984207D046 -S21400D40040F23C50C0F201004FF0E401F6F7B6FFE0 -S21400D410B4F1005F07D240F23C50C0F201004FF07A -S21400D420E501F6F7ABFF4FF20803C4F20F031C60EA -S21400D43010BD00BF4FF20803C4F20F031868704710 -S21400D4404FF20C03C4F20F031868704710B5044679 -S21400D4501F2807D940F23C50C0F2010040F23111BB -S21400D460F6F78CFF4FF0010303FA04F44FF21403AF -S21400D470C4F20F031C6010BD38B505460C461F28C5 -S21400D48007D940F23C50C0F2010040F25311F6F7C3 -S21400D49075FF34F00F0307D040F23C50C0F2010095 -S21400D4A040F25511F6F76AFF14F0010F1FBF012274 -S21400D4B0AA404FF21803C4F20F0318BF1A6014F004 -S21400D4C0020F1FBF0122AA404FF23003C4F20F031F -S21400D4D018BF1A6014F0040F1FBF0122AA404FF2B3 -S21400D4E03803C4F20F0318BF1A6014F0080F1FBFEA -S21400D4F0012303FA05F54FF22003C4F20F0318BF09 -S21400D5001D6038BD38B505460C461F2807D940F2C1 -S21400D5103C50C0F2010040F29511F6F72FFF34F0B0 -S21400D5200F0307D040F23C50C0F2010040F29711C2 -S21400D530F6F724FF14F0010F1FBF0122AA404FF296 -S21400D5401C03C4F20F0318BF1A6014F0020F1FBFAB -S21400D5500122AA404FF23403C4F20F0318BF1A6028 -S21400D56014F0040F1FBF0122AA404FF23C03C4F27E -S21400D5700F0318BF1A6014F0080F1FBF012303FA29 -S21400D58005F54FF22403C4F20F0318BF1D6038BD23 -S21400D59010B504461F2807D940F23C50C0F20100DF -S21400D5A040F2D711F6F7EAFE4FF21803C4F20F0363 -S21400D5B01B684FF0010202FA04F41C420CBF002064 -S21400D5C001204FF23003C4F20F031B681C4218BF41 -S21400D5D040F002004FF23803C4F20F031B681C42EF -S21400D5E018BF40F004004FF22003C4F20F031B687C -S21400D5F01C4218BF40F0080010BD00BF38B50446F6 -S21400D6000D463F2807D940F23C50C0F201004FF4C7 -S21400D6100E71F6F7B3FE4FF20803C4F20F031B6851 -S21400D6203BB940F23C50C0F2010040F23921F6F717 -S21400D630A5FE4FF20803C4F20F031B6803EB0414A5 -S21400D640A26843F6F773C0F2FC0302EA03031D4325 -S21400D650A56038BD2DE9F84F07460C4616461D4610 -S21400D660DDF828903F2807D940F23C50C0F2010070 -S21400D67040F2A121F6F782FE4FF20803C4F20F0330 -S21400D6801B683BB940F23C50C0F2010040F2A221B8 -S21400D690F6F774FE062C07D940F23C50C0F20100A3 -S21400D6A040F2A321F6F76AFEB246B6F1005F07D253 -S21400D6B040F23C50C0F201004FF42971F6F75EFECE -S21400D6C0AB46B5F1005F07D240F23C50C0F2010015 -S21400D6D040F2A521F6F752FE09F1FF38B8F5806F43 -S21400D6E007D340F23C50C0F2010040F2A621F6F704 -S21400D6F045FE4FF20803C4F20F031A684FEA0711FB -S21400D7005318986820F47E5020F0770017F0200F0A -S21400D7100ED0062C14BF4FF0000C4FF0010C042C5A -S21400D72008BF4CF0010CBCF1000F01D044F001041E -S21400D73040EA0810204300F0406CBCF1406F1FBF69 -S21400D7400AF1FF3A4FEA9C6C09FA0CFC0AEB0C064D -S21400D750565000F04041B1F1404F17D0062C14BF90 -S21400D76000250125042C14BF2C4645F0010447F083 -S21400D770200502EB051505F10C053CB90BF1FF3B46 -S21400D7804FEA917109FA01F90BEB09055D609860A3 -S21400D790BDE8F88FF8B505460C4616461F461F2806 -S21400D7A007D940F23C50C0F2010040F22E31F6F7A5 -S21400D7B0E5FD4FF20803C4F20F031B683BB940F2C5 -S21400D7C03C50C0F2010040F22F31F6F7D7FD3EB9CB -S21400D7D040F23C50C0F201004FF44C71F6F7CEFD1B -S21400D7E0B4F5806F07D940F23C50C0F2010040F219 -S21400D7F03131F6F7C3FD3CB940F23C50C0F20100AF -S21400D80040F23231F6F7BAFD4FF20803C4F20F03C6 -S21400D8101B684FEA05115A1804F1FF3006EB001694 -S21400D82006F10C065E5045F0200503EB051303F1E8 -S21400D8300C0353604FEA8414A4F11004002F0CBFAD -S21400D8400427062744F02A4444F4004444EA070721 -S21400D8509760F8BD10B504463F2807D940F23C5003 -S21400D860C0F201004FF45D71F6F788FD4FF2080331 -S21400D870C4F20F031B683BB940F23C50C0F20100F3 -S21400D88040F27531F6F77AFD4FF20803C4F20F0343 -S21400D8901B6803EB0414A36843F6F77003EA000062 -S21400D8A020B14FEA101000F1010010BD4FF000004B -S21400D8B010BD00BF10B504463F2807D940F23C50C3 -S21400D8C0C0F2010040F2B331F6F758FD4FF20803FC -S21400D8D0C4F20F031B683BB940F23C50C0F2010093 -S21400D8E04FF46D71F6F74AFD4FF20803C4F20F03CA -S21400D8F01B6803EB0414A36803F0070203F0060397 -S21400D900062B14BF00200120042B08BF40F00100A6 -S21400D910002814BF1846104610BD00BF4FF47543CC -S21400D920C4F20F031A6840EA02021A60704700BF8A -S21400D9304FF47543C4F20F031A6822EA00021A6015 -S21400D940704700BF38B504460D4639B940F23C5022 -S21400D950C0F201004FF48D61F6F710FDA4F13E030E -S21400D960012B07D940F23C50C0F2010040F2694159 -S21400D970F6F704FD20462946FBF7CAF82046FBF7D3 -S21400D980A3F938BD10B50446FBF7F2F92046FBF7BD -S21400D99003F910BDF8B504460D4617461E464FF06F -S21400D9A00003C4F20503984207D040F25450C0F278 -S21400D9B001004FF0A801F6F7E1FC032D07D940F26D -S21400D9C05450C0F201004FF0AA01F6F7D7FC06F15A -S21400D9D0FF33012B07D940F25450C0F201004FF03C -S21400D9E0AB01F6F7CBFCA37BEDB2A573012E0EBF01 -S21400D9F0385D385BC0B2A373F8BD00BF2DE9F041B7 -S21400DA0004460D4690461F46069E4FF00003C4F29D -S21400DA100503984207D040F25450C0F201004FF080 -S21400DA206801F6F7ABFC032D07D940F25450C0F25C -S21400DA3001004FF06A01F6F7A1FC06F1FF33012B57 -S21400DA4007D940F25450C0F201004FF06B01F6F7D0 -S21400DA5095FCA37BEDB2A573012E07BFFFB208F8B5 -S21400DA600470BFB228F80470A373BDE8F08100BF4D -S21400DA7010B504464FF00003C4F20503984207D0E1 -S21400DA8040F25450C0F201004FF0E801F6F776FC81 -S21400DA90637843F00203637010BD00BF38B50446D8 -S21400DAA00D464FF00003C4F20503984207D040F23B -S21400DAB05450C0F201004FF48471F6F75FFC25B1B4 -S21400DAC0637843F00803637038BD637803F0F703A8 -S21400DAD0637038BD38B504460D464FF00003C4F2F7 -S21400DAE00503984207D040F25450C0F2010040F2BD -S21400DAF03511F6F743FC25B1637843F004036370F1 -S21400DB0038BD637803F0FB03637038BD10B5044678 -S21400DB104FF00003C4F20503984207D040F2545079 -S21400DB20C0F201004FF4AC71F6F728FC94F86030B0 -S21400DB3013F0400F09D194F8600000F02000002890 -S21400DB400CBF4FF00040002010BD4FF0010010BD8C -S21400DB5010B504464FF00003C4F20503984207D000 -S21400DB6040F25450C0F2010040F29111F6F706FC64 -S21400DB70A3782279A07A4FEA006040EA0220184390 -S21400DB80D4F80C3413F0010F1FBF40F4803094F823 -S21400DB900C3443F0010384F80C3440F24C43C4F2D6 -S21400DBA005031B6813F0010F09D040F4003040F263 -S21400DBB04C43C4F205031A6842F001021A6010BD15 -S21400DBC038B505460C464FF00003C4F205039842EC -S21400DBD007D040F25450C0F201004FF4F271F6F74D -S21400DBE0CDFB4FF2F013C0F2FC0304EA03033BB193 -S21400DBF040F25450C0F2010040F2E511F6F7BEFBC9 -S21400DC0014F00F0F1FBFEB889BB204F00F02934374 -S21400DC1018BFEB8014F460631FBF2A8992B222EA11 -S21400DC2013232B8114F07F4F1EBFEB7A23EA146375 -S21400DC30EB7214F4803F1CBF0023C5F8083414F4BC -S21400DC40003F1FBF4FF48963C4F2050300221A6029 -S21400DC5038BD00BF38B505460C464FF00003C4F289 -S21400DC600503984207D040F25450C0F2010040F23B -S21400DC703B21F6F783FB4FF2F013C0F2FC0304EAF5 -S21400DC8003033BB140F25450C0F201004FF40F7151 -S21400DC90F6F774FB14F00F0F1FBFEB889BB204F06F -S21400DCA00F02134318BFEB8014F460631FBF2A896A -S21400DCB092B242EA13232B8114F07F4F1EBFEB7AF9 -S21400DCC043EA1463EB7214F4803F1CBF0123C5F8CB -S21400DCD0083414F4003F1FBF4FF48963C4F20503F1 -S21400DCE001221A6038BD00BF38B505460C464FF015 -S21400DCF00003C4F20503984207D040F25450C0F225 -S21400DD00010040F28521F6F739FB24F47E7333F0E8 -S21400DD10070207D040F25450C0F2010040F28621BC -S21400DD20F6F72CFB14F0FF0F1EBFEB7AA343EB7243 -S21400DD3014F4807F1CBF0023C5F8083414F4007F59 -S21400DD401FBF4FF48963C4F2050300221A6038BD72 -S21400DD5038B505460C464FF00003C4F2050398425A -S21400DD6007D040F25450C0F201004FF42E71F6F77F -S21400DD7005FB24F47E7333F0070207D040F25450BC -S21400DD80C0F2010040F2B921F6F7F8FA14F0FF0FDE -S21400DD901FBFEB7A2343DBB2EB7214F4807F1CBF09 -S21400DDA00123C5F8083414F4007F1FBF4FF48963BD -S21400DDB0C4F2050301221A6038BD00BF10B5044640 -S21400DDC04FF00003C4F20503984207D040F25450C7 -S21400DDD0C0F2010040F20731F6F7D0FAA07AD4F884 -S21400DDE00C3413F0010F1FBF40F4807094F80C340D -S21400DDF043F0010384F80C3440F24C43C4F20503AC -S21400DE001B6813F0010F09D040F4007040F24C4339 -S21400DE10C4F205031A6842F001021A6010BD00BF82 -S21400DE2038B504460D464FF00003C4F20503984289 -S21400DE3007D040F25450C0F201004FF45271F6F78A -S21400DE409DFAE3889BB223EA0503E38023899BB20D -S21400DE504FEA554523EA4505258138BD38B50446C1 -S21400DE600D464FF00003C4F20503984207D040F277 -S21400DE705450C0F201004FF45C71F6F77FFAE38865 -S21400DE8045EA03039BB2E38023899BB24FEA5545DC -S21400DE9043EA4505258138BD10B504464FF000031A -S21400DEA0C4F20503984207D040F25450C0F2010075 -S21400DEB040F29B31F6F762FA63889BB2A08843EA89 -S21400DEC0004010BD10B50C464FF00003C4F2050329 -S21400DED0984207D040F25450C0F2010040F2C531DB -S21400DEE0F6F74CFA4FF03C002146FAF711FE4FF0D9 -S21400DEF03C00FAF7E9FE10BD08B54FF00003C4F287 -S21400DF000503984207D040F25450C0F2010040F298 -S21400DF10E731F6F733FA4FF03C00FAF73DFE4FF0E4 -S21400DF203C00FAF725FF08BD38B505460C464FF00D -S21400DF300003C4F20503984207D040F25450C0F2E2 -S21400DF40010040F24341F6F719FAB4F1100318BF86 -S21400DF500123002C0CBF002303F00103002B4FD03D -S21400DF60B4F1300318BF0123202C0CBF002303F0AC -S21400DF700103002B44D0B4F1500318BF0123402CFA -S21400DF800CBF002303F00103002B39D0B4F170035B -S21400DF9018BF0123602C0CBF002303F001037BB3E2 -S21400DFA0B4F1900318BF0123802C0CBF002303F0AC -S21400DFB001032BB3B4F1B00318BF0123A02C0CBF90 -S21400DFC0002303F00103DBB1B4F1D00318BF012333 -S21400DFD0C02C0CBF002303F001038BB1B4F1F00397 -S21400DFE018BF0123E02C0CBF002303F001033BB154 -S21400DFF040F25450C0F2010040F24B41F6F7BEF931 -S21400E0006419B4F802319BB2B4F8060143EA004042 -S21400E01038BD00BF70B505460C4616464FF00003E7 -S21400E020C4F20503984207D040F25450C0F20100F3 -S21400E03040F27641F6F7A2F9B4F1100318BF0123B7 -S21400E040002C0CBF002303F00103002B4FD0B4F1CB -S21400E050300318BF0123202C0CBF002303F001035C -S21400E060002B44D0B4F1500318BF0123402C0CBF42 -S21400E070002303F00103002B39D0B4F1700318BF5E -S21400E0800123602C0CBF002303F001037BB3B4F123 -S21400E090900318BF0123802C0CBF002303F001035C -S21400E0A02BB3B4F1B00318BF0123A02C0CBF002380 -S21400E0B003F00103DBB1B4F1D00318BF0123C02C79 -S21400E0C00CBF002303F001038BB1B4F1F00318BFBB -S21400E0D00123E02C0CBF002303F001033BB140F208 -S21400E0E05450C0F2010040F27E41F6F747F934B9C9 -S21400E0F095F8023123EA060685F8026170BD6419B8 -S21400E10094F8023123EA060384F8023194F80631C3 -S21400E11023EA164684F8066170BD00BF70B5054652 -S21400E1200C4616464FF00003C4F20503984207D08B -S21400E13040F25450C0F2010040F2A741F6F71EF933 -S21400E140B4F1100318BF0123002C0CBF002303F00A -S21400E1500103002B4FD0B4F1300318BF0123202C4D -S21400E1600CBF002303F00103002B44D0B4F150038E -S21400E17018BF0123402C0CBF002303F00103002B23 -S21400E18039D0B4F1700318BF0123602C0CBF0023F4 -S21400E19003F001037BB3B4F1900318BF0123802C76 -S21400E1A00CBF002303F001032BB3B4F1B00318BF78 -S21400E1B00123A02C0CBF002303F00103DBB1B4F154 -S21400E1C0D00318BF0123C02C0CBF002303F00103AB -S21400E1D08BB1B4F1F00318BF0123E02C0CBF002371 -S21400E1E003F001033BB140F25450C0F2010040F28C -S21400E1F0AF41F6F7C3F8DCB916F0010F1EBF95F86D -S21400E200023143F0400385F8023116F0100F1EBFAE -S21400E21095F8023143F0800385F8023116F0040FBA -S21400E22017D095F8023103F0FB0385F8023170BD74 -S21400E230641994F8023106F0240223EA020384F8F3 -S21400E240023194F8063106F4980623EA164684F856 -S21400E250066170BDF8B505460C4616461F464FF0DB -S21400E2600003C4F20503984207D040F25450C0F2AF -S21400E270010040F20151F6F781F8B4F1100318BF1F -S21400E2800123002C0CBF002303F00103002B4FD00A -S21400E290B4F1300318BF0123202C0CBF002303F079 -S21400E2A00103002B44D0B4F1500318BF0123402CC7 -S21400E2B00CBF002303F00103002B39D0B4F1700328 -S21400E2C018BF0123602C0CBF002303F001037BB3AF -S21400E2D0B4F1900318BF0123802C0CBF002303F079 -S21400E2E001032BB3B4F1B00318BF0123A02C0CBF5D -S21400E2F0002303F00103DBB1B4F1D00318BF012300 -S21400E300C02C0CBF002303F001038BB1B4F1F00363 -S21400E31018BF0123E02C0CBF002303F001033BB120 -S21400E32040F25450C0F2010040F20951F6F726F8C8 -S21400E3303EB14FF002023CB1002F0CBF0223012376 -S21400E3400EE04FF000024CB995F8033103F0F903E4 -S21400E35043F00403134385F80331F8BD4FF0000380 -S21400E36067B905F5827505F103052A5D02F0F90225 -S21400E37042F0040242EA03032B55F8BD05F580750A -S21400E38005F103052A5D02F0FC0242F0020242EAB1 -S21400E39003032B55F8BD00BF70B505460C46164660 -S21400E3A04FF00003C4F20503984207D040F25450E1 -S21400E3B0C0F2010040F26251F5F7E0FFB4F120032D -S21400E3C018BF0123102C0CBF002303F00103002B01 -S21400E3D046D0B4F1400318BF0123302C0CBF0023F5 -S21400E3E003F00103002B3BD0B4F1600318BF0123F8 -S21400E3F0502C0CBF002303F001038BB3B4F1800351 -S21400E40018BF0123702C0CBF002303F001033BB39D -S21400E410B4F1A00318BF0123902C0CBF002303F017 -S21400E4200103EBB1B4F1C00318BF0123B02C0CBF3D -S21400E430002303F001039BB1B4F1E00318BF0123EE -S21400E440D02C0CBF002303F001034BB1F02C07D0F7 -S21400E45040F25450C0F2010040F26A51F5F78EFFC8 -S21400E46016F4005F1DBF05F581752B5D43F0400374 -S21400E47005F5837504BF2B5D43F080032B5570BDF7 -S21400E48070B505460C4616464FF00003C4F2050369 -S21400E490984207D040F25450C0F2010040F2955125 -S21400E4A0F5F76CFF36F4005307D040F25450C0F234 -S21400E4B0010040F29651F5F761FFB4F1100318BF62 -S21400E4C00123002C0CBF002303F00103002B4FD0C8 -S21400E4D0B4F1300318BF0123202C0CBF002303F037 -S21400E4E00103002B44D0B4F1500318BF0123402C85 -S21400E4F00CBF002303F00103002B39D0B4F17003E6 -S21400E50018BF0123602C0CBF002303F001037BB36C -S21400E510B4F1900318BF0123802C0CBF002303F036 -S21400E52001032BB3B4F1B00318BF0123A02C0CBF1A -S21400E530002303F00103DBB1B4F1D00318BF0123BD -S21400E540C02C0CBF002303F001038BB1B4F1F00321 -S21400E55018BF0123E02C0CBF002303F001033BB1DE -S21400E56040F25450C0F2010040F29E51F5F706FF0B -S21400E57034B995F8023143F0600385F8023170BD76 -S21400E580B6F5005F03BF05F581752B5D43F01003FC -S21400E59005F583751CBF2B5D43F020032B5570BD1E -S21400E5A070B505460C4616464FF00003C4F2050348 -S21400E5B0984207D040F25450C0F201004FF4BB61BD -S21400E5C0F5F7DCFEB4F1100318BF0123002C0CBFD6 -S21400E5D0002303F00103002B4FD0B4F1300318BF23 -S21400E5E00123202C0CBF002303F00103002B44D092 -S21400E5F0B4F1500318BF0123402C0CBF002303F0D6 -S21400E6000103002B39D0B4F1700318BF0123602C2E -S21400E6100CBF002303F001037BB3B4F1900318BFD3 -S21400E6200123802C0CBF002303F001032BB3B4F1AD -S21400E630B00318BF0123A02C0CBF002303F0010376 -S21400E640DBB1B4F1D00318BF0123C02C0CBF0023EC -S21400E65003F001038BB1B4F1F00318BF0123E02CE3 -S21400E6600CBF002303F001033BB140F25450C0F24C -S21400E67001004FF4BC61F5F781FE36F4005307D075 -S21400E68040F25450C0F2010040F2E151F5F776FE38 -S21400E69034B995F8023103F0FB0385F8023170BDFA -S21400E6A0B6F5005F0AD105F581752B5D03F0CF0343 -S21400E6B02B552B5D43F040032B5570BD05F5837538 -S21400E6C02B5D03F09F032B552B5D43F080032B55EA -S21400E6D070BD00BF10B504464FF00003C4F205033A -S21400E6E0984207D040F25450C0F2010040F21F6139 -S21400E6F0F5F744FE637843F04003637010BD00BF37 -S21400E70010B504464FF00003C4F20503984207D044 -S21400E71040F25450C0F2010040F23C61F5F72EFE84 -S21400E720637803F0BF03637010BD00BF38B50446BE -S21400E7300D464FF00003C4F20503984207D040F29E -S21400E7405450C0F2010040F25961F5F717FEEDB2E1 -S21400E750257038BD10B504464FF00003C4F205031B -S21400E760984207D040F25450C0F2010040F2756162 -S21400E770F5F704FE207810BD2DE9F84305460C4653 -S21400E78090461F46DDF82090099E4FF00003C4F225 -S21400E7900503984207D040F25450C0F2010040F200 -S21400E7A0CE61F5F7EBFDB4F1100318BF0123002C82 -S21400E7B00CBF002303F00103002B4FD0B4F130034D -S21400E7C018BF0123202C0CBF002303F00103002BED -S21400E7D044D0B4F1500318BF0123402C0CBF0023D3 -S21400E7E003F00103002B39D0B4F1700318BF0123E6 -S21400E7F0602C0CBF002303F001037BB3B4F190033D -S21400E80018BF0123802C0CBF002303F001032BB399 -S21400E810B4F1B00318BF0123A02C0CBF002303F0F3 -S21400E8200103DBB1B4F1D00318BF0123C02C0CBF29 -S21400E830002303F001038BB1B4F1F00318BF0123EA -S21400E840E02C0CBF002303F001033BB140F2545010 -S21400E850C0F2010040F2D661F5F790FD1F2F07D9F0 -S21400E86040F25450C0F2010040F2D761F5F786FD41 -S21400E87064B9FFB285F80B7106F48056002E0CBF03 -S21400E880C026802685F8FA60BDE8F88316F4805F17 -S21400E89014BF49F0800949F0C00906F44073B3F587 -S21400E8A0807F08BF49F0200908D0B3F5007F08BF75 -S21400E8B049F0300902D00BB949F0100916F4005F90 -S21400E8C01FD064195FFA89F984F80A91FFB284F8B8 -S21400E8D00B715FFA88F884F8008106F001034FEAAE -S21400E8E0C31316F0100F18BF43F0140304D116F02C -S21400E8F0080F18BF43F01003DBB284F80331BDE8FD -S21400E900F88364195FFA89F984F80C91FFB284F8E9 -S21400E9100D7106F00403002B14BF8023002316F0AD -S21400E920100F18BF43F0280304D116F0080F18BFC5 -S21400E93043F02003DBB284F80731BDE8F88300BF5C -S21400E940F8B506460C4617461D464FF00003C4F2BF -S21400E9500503984207D040F25450C0F2010040F23E -S21400E960C971F5F70BFDB4F1200318BF0123102C75 -S21400E9700CBF002303F00103002B46D0B4F1400384 -S21400E98018BF0123302C0CBF002303F00103002B1B -S21400E9903BD0B4F1600318BF0123502C0CBF0023FA -S21400E9A003F001038BB3B4F1800318BF0123702C6E -S21400E9B00CBF002303F001033BB3B4F1A00318BF60 -S21400E9C00123902C0CBF002303F00103EBB1B4F13C -S21400E9D0C00318BF0123B02C0CBF002303F00103B3 -S21400E9E09BB1B4F1E00318BF0123D02C0CBF002369 -S21400E9F003F001034BB1F02C07D040F25450C0F2A4 -S21400EA00010040F2D171F5F7B9FC15F4005F1FD094 -S21400EA10A419FFB284F8007105F001034FEAC3138E -S21400EA2015F0100F18BF43F0140304D115F0080FAB -S21400EA3018BF43F0100315F4407F08BF43F04003AF -S21400EA40DBB284F803314FF0400384F80231F8BD9E -S21400EA50A419FFB284F8047105F00403002B14BF58 -S21400EA608023002315F0100F18BF43F0280304D1AD -S21400EA7015F0080F18BF43F0200315F4407F08BFB9 -S21400EA8043F04003DBB284F807314FF0800384F88C -S21400EA900631F8BDF8B506460D4617461C464FF03B -S21400EAA00003C4F20503984207D040F25450C0F267 -S21400EAB0010040F66501F5F761FCD4F1010338BFAB -S21400EAC00023002F08BF43F001033BB140F254502F -S21400EAD0C0F2010040F66601F5F750FCB5F12003E0 -S21400EAE018BF0123102D0CBF002303F00103002BD9 -S21400EAF046D0B5F1400318BF0123302D0CBF0023CC -S21400EB0003F00103002B3BD0B5F1600318BF0123CF -S21400EB10502D0CBF002303F001038BB3B5F1800327 -S21400EB2018BF0123702D0CBF002303F001033BB375 -S21400EB30B5F1A00318BF0123902D0CBF002303F0EE -S21400EB400103EBB1B5F1C00318BF0123B02D0CBF14 -S21400EB50002303F001039BB1B5F1E00318BF0123C6 -S21400EB60D02D0CBF002303F001034BB1F02D07D0CE -S21400EB7040F25450C0F2010040F66E01F5F7FEFB7D -S21400EB80236813F4005F23D04FF400532360AD19BD -S21400EB9095F800313B6095F8033113F0800F1EBFE7 -S21400EBA0226842F00102226013F0100F08D013F022 -S21400EBB0040F226814BF42F0100242F008022260DE -S21400EBC013F0400F27D1236843F480732360F8BD09 -S21400EBD04FF000032360AD1995F804313B6095F8BB -S21400EBE0073113F0800F1EBF226842F00402226035 -S21400EBF013F0200F08D013F0080F226814BF42F05D -S21400EC00100242F00802226013F0400F02BF236891 -S21400EC1043F480732360F8BDF0B583B005460C4618 -S21400EC2017461E464FF00003C4F20503984207D06D -S21400EC3040F25450C0F201004FF41261F5F79EFB0B -S21400EC40B4F1200318BF0123102C0CBF002303F0DF -S21400EC500103002B46D0B4F1400318BF0123302C2B -S21400EC600CBF002303F00103002B3BD0B4F160037C -S21400EC7018BF0123502C0CBF002303F001038BB3F5 -S21400EC80B4F1800318BF0123702C0CBF002303F0DF -S21400EC9001033BB3B4F1A00318BF0123902C0CBFB3 -S21400ECA0002303F00103EBB1B4F1C00318BF012346 -S21400ECB0B02C0CBF002303F001039BB1B4F1E003BA -S21400ECC018BF0123D02C0CBF002303F001034BB167 -S21400ECD0F02C07D040F25450C0F2010040F6281144 -S21400ECE0F5F74CFB089B13F4005F17D04FEA14149B -S21400ECF04FF001030093284621464FF06202334648 -S21400ED00FEF77CFE4FF002030093284621464FF0A4 -S21400ED1064024FEAD703FEF771FE16E04FEA1414BA -S21400ED204FF001030093284621464FF06302334616 -S21400ED30FEF764FE4FF002030093284621464FF08C -S21400ED4066024FEAD703FEF759FE03B0F0BD00BFD8 -S21400ED50F8B505460C4616461F464FF00003C4F2AB -S21400ED600503984207D040F25450C0F201004FF419 -S21400ED701661F5F703FBB4F1200318BF0123102C2E -S21400ED800CBF002303F00103002B46D0B4F1400370 -S21400ED9018BF0123302C0CBF002303F00103002B07 -S21400EDA03BD0B4F1600318BF0123502C0CBF0023E6 -S21400EDB003F001038BB3B4F1800318BF0123702C5A -S21400EDC00CBF002303F001033BB3B4F1A00318BF4C -S21400EDD00123902C0CBF002303F00103EBB1B4F128 -S21400EDE0C00318BF0123B02C0CBF002303F001039F -S21400EDF09BB1B4F1E00318BF0123D02C0CBF002355 -S21400EE0003F001034BB1F02C07D040F25450C0F28F -S21400EE10010040F66811F5F7B1FA069B13F4005F9F -S21400EE2016D04FEA1414284621464FF064024FF0DD -S21400EE300203FEF7AFFD4FEAC000306028462146C9 -S21400EE404FF062024FF00103FEF7A4FD3860F8BDF4 -S21400EE504FEA1414284621464FF066024FF002038C -S21400EE60FEF798FD4FEAC0003060284621464FF076 -S21400EE7063024FF00103FEF78DFD3860F8BD00BF5A -S21400EE8012F4005F1FBF00F580700330435C43F050 -S21400EE90100301BF00F582700330435C43F020038B -S21400EEA04354704712F4005F1FBF00F580700330B4 -S21400EEB0435C03F0EF0301BF00F582700330435C50 -S21400EEC003F0DF034354704738B505460C464FF051 -S21400EED00003C4F20503984207D040F25450C0F233 -S21400EEE001004FF41F61F5F749FAB4F1100318BF9B -S21400EEF00123002C0CBF002303F00103002B4FD08E -S21400EF00B4F1300318BF0123202C0CBF002303F0FC -S21400EF100103002B44D0B4F1500318BF0123402C4A -S21400EF200CBF002303F00103002B39D0B4F17003AB -S21400EF3018BF0123602C0CBF002303F001037BB332 -S21400EF40B4F1900318BF0123802C0CBF002303F0FC -S21400EF5001032BB3B4F1B00318BF0123A02C0CBFE0 -S21400EF60002303F00103DBB1B4F1D00318BF012383 -S21400EF70C02C0CBF002303F001038BB1B4F1F003E7 -S21400EF8018BF0123E02C0CBF002303F001033BB1A4 -S21400EF9040F25450C0F2010040F6F811F5F7EEF9D1 -S21400EFA004F583730CB94FF481735B5B13F0010FA8 -S21400EFB01DBF05F58475285B80B2002038BD00BFF4 -S21400EFC0F8B506460D4614461F464FF00003C4F239 -S21400EFD00503984207D040F25450C0F2010040F6B4 -S21400EFE03521F5F7CBF9B5F1100318BF0123002D35 -S21400EFF00CBF002303F00103002B4FD0B5F1300304 -S21400F00018BF0123202D0CBF002303F00103002BA3 -S21400F01044D0B5F1500318BF0123402D0CBF002388 -S21400F02003F00103002B39D0B5F1700318BF01239C -S21400F030602D0CBF002303F001037BB3B5F19003F2 -S21400F04018BF0123802D0CBF002303F001032BB350 -S21400F050B5F1B00318BF0123A02D0CBF002303F0A9 -S21400F0600103DBB1B5F1D00318BF0123C02D0CBFDF -S21400F070002303F001038BB1B5F1F00318BF0123A1 -S21400F080E02D0CBF002303F001033BB140F25450C7 -S21400F090C0F2010040F63D21F5F770F905F58373DF -S21400F0A00DB94FF481739B5B13F0010F05D14FF040 -S21400F0B000033B604FF0FF30F8BD06F584735B5BE2 -S21400F0C09BB23A68934228BF13463B6006F120067F -S21400F0D006EB95053BB12A7804F8012B013BFAD1E3 -S21400F0E04FF00000F8BD4FF00000F8BD70B50546C3 -S21400F0F00C4616464FF00003C4F20503984207D0AC -S21400F10040F25450C0F2010040F69D21F5F736F962 -S21400F110B4F1100318BF0123002C0CBF002303F02A -S21400F1200103002B4FD0B4F1300318BF0123202C6D -S21400F1300CBF002303F00103002B44D0B4F15003AE -S21400F14018BF0123402C0CBF002303F00103002B43 -S21400F15039D0B4F1700318BF0123602C0CBF002314 -S21400F16003F001037BB3B4F1900318BF0123802C96 -S21400F1700CBF002303F001032BB3B4F1B00318BF98 -S21400F1800123A02C0CBF002303F00103DBB1B4F174 -S21400F190D00318BF0123C02C0CBF002303F00103CB -S21400F1A08BB1B4F1F00318BF0123E02C0CBF002391 -S21400F1B003F001033BB140F25450C0F2010040F6A8 -S21400F1C0A521F5F7DBF834B9002E0CBF40264826FB -S21400F1D085F8026170BD05F583752B5D03F0FE03AF -S21400F1E02B5570BD38B505460C464FF00003C4F2EB -S21400F1F00503984207D040F25450C0F2010040F692 -S21400F200D321F5F7BBF8B4F1100318BF0123002C87 -S21400F2100CBF002303F00103002B4FD0B4F13003E2 -S21400F22018BF0123202C0CBF002303F00103002B82 -S21400F23044D0B4F1500318BF0123402C0CBF002368 -S21400F24003F00103002B39D0B4F1700318BF01237B -S21400F250602C0CBF002303F001037BB3B4F19003D2 -S21400F26018BF0123802C0CBF002303F001032BB32F -S21400F270B4F1B00318BF0123A02C0CBF002303F089 -S21400F2800103DBB1B4F1D00318BF0123C02C0CBFBF -S21400F290002303F001038BB1B4F1F00318BF012380 -S21400F2A0E02C0CBF002303F001033BB140F25450A6 -S21400F2B0C0F2010040F6DB21F5F760F834B995F8A6 -S21400F2C0023103F0FE0385F8023138BD05F583757B -S21400F2D02B5D03F0FE032B5538BD00BFF8B507467F -S21400F2E00E4615461C464FF00003C4F2050398422E -S21400F2F007D040F25450C0F2010040F60931F5F74D -S21400F3003DF8B6F1100318BF0123002E0CBF0023F2 -S21400F31003F00103002B4FD0B6F1300318BF0123D2 -S21400F320202E0CBF002303F00103002B44D0B6F1BF -S21400F330500318BF0123402E0CBF002303F0010327 -S21400F340002B39D0B6F1700318BF0123602E0CBF16 -S21400F350002303F001037BB3B6F1900318BF01232B -S21400F360802E0CBF002303F001032BB3B6F1B003CD -S21400F37018BF0123A02E0CBF002303F00103DBB14E -S21400F380B6F1D00318BF0123C02E0CBF002303F034 -S21400F39001038BB1B6F1F00318BF0123E02E0CBFBA -S21400F3A0002303F001033BB140F25450C0F20100C9 -S21400F3B040F61131F4F7E2FF002E14BF01220222BC -S21400F3C007F581739B5D1A420CD107F1200707EB06 -S21400F3D0960654B115F8013B3370013CFAD14FF054 -S21400F3E00000F8BD4FF0FF30F8BD4FF00000F8BD4C -S21400F3F070B505460C4616464FF00003C4F20503EA -S21400F400984207D040F25450C0F2010040F65C31FA -S21400F410F4F7B4FFB4F1100318BF0123002C0CBF9F -S21400F420002303F00103002B4FD0B4F1300318BFC4 -S21400F4300123202C0CBF002303F00103002B44D033 -S21400F440B4F1500318BF0123402C0CBF002303F077 -S21400F4500103002B39D0B4F1700318BF0123602CD0 -S21400F4600CBF002303F001037BB3B4F1900318BF75 -S21400F4700123802C0CBF002303F001032BB3B4F14F -S21400F480B00318BF0123A02C0CBF002303F0010318 -S21400F490DBB1B4F1D00318BF0123C02C0CBF00238E -S21400F4A003F001038BB1B4F1F00318BF0123E02C85 -S21400F4B00CBF002303F001033BB140F25450C0F2EE -S21400F4C0010040F66431F4F759FF14B906F0FF0660 -S21400F4D001E0C6F3072605F581752B5D13F0020FD4 -S21400F4E003BFF6B22E5500204FF0FF3070BD00BFB0 -S21400F4F070B505460C4616464FF00003C4F20503E9 -S21400F500984207D040F25450C0F2010040F69C31B9 -S21400F510F4F734FFB4F1100318BF0123002C0CBF1E -S21400F520002303F00103002B4FD0B4F1300318BFC3 -S21400F5300123202C0CBF002303F00103002B44D032 -S21400F540B4F1500318BF0123402C0CBF002303F076 -S21400F5500103002B39D0B4F1700318BF0123602CCF -S21400F5600CBF002303F001037BB3B4F1900318BF74 -S21400F5700123802C0CBF002303F001032BB3B4F14E -S21400F580B00318BF0123A02C0CBF002303F0010317 -S21400F590DBB1B4F1D00318BF0123C02C0CBF00238D -S21400F5A003F001038BB1B4F1F00318BF0123E02C84 -S21400F5B00CBF002303F001033BB140F25450C0F2ED -S21400F5C0010040F6A431F4F7D9FE4CB995F80231A3 -S21400F5D013F0030F1CD04FF0010385F8033170BD04 -S21400F5E016F4005F0AD005F581752B5D13F0010F48 -S21400F5F00ED02B5D43F008032B5570BD05F58375C3 -S21400F6002B5D13F0010F1EBF2B5D43F010032B552F -S21400F61070BD00BF38B505460C464FF00003C4F277 -S21400F6200503984207D040F25450C0F2010040F65D -S21400F630F531F4F7A3FEB4F1100318BF0123002C34 -S21400F6400CBF002303F00103002B4FD0B4F13003AE -S21400F65018BF0123202C0CBF002303F00103002B4E -S21400F66044D0B4F1500318BF0123402C0CBF002334 -S21400F67003F00103002B39D0B4F1700318BF012347 -S21400F680602C0CBF002303F001037BB3B4F190039E -S21400F69018BF0123802C0CBF002303F001032BB3FB -S21400F6A0B4F1B00318BF0123A02C0CBF002303F055 -S21400F6B00103DBB1B4F1D00318BF0123C02C0CBF8B -S21400F6C0002303F001038BB1B4F1F00318BF01234C -S21400F6D0E02C0CBF002303F001033BB140F2545072 -S21400F6E0C0F2010040F6FD31F4F748FE14B104F50F -S21400F6F0837401E04FF481744FF02003635538BDE6 -S21400F70010B504464FF00003C4F20503984207D034 -S21400F71040F25450C0F2010040F62641F4F72EFEA7 -S21400F7204FF0600384F8023110BD00BFF8B50546FF -S21400F7300C4617461E464FF00003C4F205039842D7 -S21400F74007D040F25450C0F2010040F64A41F4F7A8 -S21400F75015FEB4F1100318BF0123002C0CBF0023C4 -S21400F76003F00103002B4FD0B4F1300318BF012380 -S21400F770202C0CBF002303F00103002B44D0B4F16F -S21400F780500318BF0123402C0CBF002303F00103D5 -S21400F790002B39D0B4F1700318BF0123602C0CBFC6 -S21400F7A0002303F001037BB3B4F1900318BF0123D9 -S21400F7B0802C0CBF002303F001032BB3B4F1B0037D -S21400F7C018BF0123A02C0CBF002303F00103DBB1FC -S21400F7D0B4F1D00318BF0123C02C0CBF002303F0E4 -S21400F7E001038BB1B4F1F00318BF0123E02C0CBF6A -S21400F7F0002303F001033BB140F25450C0F2010075 -S21400F80040F65241F4F7BAFD16F4005F14BF803597 -S21400F81084354FEA5404FFB22F55F8BD70B505463F -S21400F8200C4616464FF00003C4F20503984207D074 -S21400F83040F25450C0F2010040F67F41F4F79EFDBE -S21400F840B4F1100318BF0123002C0CBF002303F0F3 -S21400F8500103002B4FD0B4F1300318BF0123202C36 -S21400F8600CBF002303F00103002B44D0B4F1500377 -S21400F87018BF0123402C0CBF002303F00103002B0C -S21400F88039D0B4F1700318BF0123602C0CBF0023DD -S21400F89003F001037BB3B4F1900318BF0123802C5F -S21400F8A00CBF002303F001032BB3B4F1B00318BF61 -S21400F8B00123A02C0CBF002303F00103DBB1B4F13D -S21400F8C0D00318BF0123C02C0CBF002303F0010394 -S21400F8D08BB1B4F1F00318BF0123E02C0CBF00235A -S21400F8E003F001033BB140F25450C0F2010040F671 -S21400F8F08741F4F743FD16F4005F1DBF80356408AA -S21400F900285D843504BF6408285D70BDF8B50546DB -S21400F9100C4617461E464FF00003C4F205039842F5 -S21400F92007D040F25450C0F2010040F6B541F4F75B -S21400F93025FDB4F1100318BF0123002C0CBF0023D3 -S21400F94003F00103002B4FD0B4F1300318BF01239E -S21400F950202C0CBF002303F00103002B44D0B4F18D -S21400F960500318BF0123402C0CBF002303F00103F3 -S21400F970002B39D0B4F1700318BF0123602C0CBFE4 -S21400F980002303F001037BB3B4F1900318BF0123F7 -S21400F990802C0CBF002303F001032BB3B4F1B0039B -S21400F9A018BF0123A02C0CBF002303F00103DBB11A -S21400F9B0B4F1D00318BF0123C02C0CBF002303F002 -S21400F9C001038BB1B4F1F00318BF0123E02C0CBF88 -S21400F9D0002303F001033BB140F25450C0F2010093 -S21400F9E040F6BD41F4F7CAFC16F4005F14BF82353A -S21400F9F086354FEA5404FFB22F55F8BD70B505465C -S21400FA000C4616464FF00003C4F20503984207D092 -S21400FA1040F25450C0F2010040F6EB41F4F7AEFC61 -S21400FA20B4F1100318BF0123002C0CBF002303F011 -S21400FA300103002B4FD0B4F1300318BF0123202C54 -S21400FA400CBF002303F00103002B44D0B4F1500395 -S21400FA5018BF0123402C0CBF002303F00103002B2A -S21400FA6039D0B4F1700318BF0123602C0CBF0023FB -S21400FA7003F001037BB3B4F1900318BF0123802C7D -S21400FA800CBF002303F001032BB3B4F1B00318BF7F -S21400FA900123A02C0CBF002303F00103DBB1B4F15B -S21400FAA0D00318BF0123C02C0CBF002303F00103B2 -S21400FAB08BB1B4F1F00318BF0123E02C0CBF002378 -S21400FAC003F001033BB140F25450C0F2010040F68F -S21400FAD0F341F4F753FC16F4005F1DBF823564084B -S21400FAE0285D863504BF6408285D70BD38B50446B9 -S21400FAF00D464FF00003C4F20503984207D040F2CB -S21400FB005450C0F201004FF45561F4F737FC4FF63D -S21400FB109C43CFF6FE7305EA03033BB140F2545014 -S21400FB20C0F2010040F65351F4F728FC4FEA1543A3 -S21400FB30C4F83034B4F8003423F4587323F00303C5 -S21400FB404FEA03434FEA13432B439BB2A4F8003417 -S21400FB5038BD00BF10B504464FF00003C4F20503DD -S21400FB60984207D040F25450C0F2010040F6795156 -S21400FB70F4F704FCB4F800349BB243F01003A4F886 -S21400FB80003410BD10B504464FF00003C4F2050360 -S21400FB90984207D040F25450C0F2010040F694510B -S21400FBA0F4F7ECFBB4F8003423F010034FEA0343F9 -S21400FBB04FEA1343A4F8003410BD00BF10B5044646 -S21400FBC04FF00003C4F20503984207D040F25450A9 -S21400FBD0C0F201004FF45B61F4F7D0FBB4F80034D8 -S21400FBE09BB243F00403A4F8003410BD10B50446DD -S21400FBF04FF00003C4F20503984207D040F2545079 -S21400FC00C0F2010040F6CC51F4F7B8FBB4F800346B -S21400FC1023F004034FEA03434FEA1343A4F80034E7 -S21400FC2010BD00BF10B504464FF00003C4F2050334 -S21400FC30984207D040F25450C0F2010040F6E55119 -S21400FC40F4F79CFBA08980B210BD00BF38B504460F -S21400FC500D464FF00003C4F20503984207D040F269 -S21400FC605450C0F2010040F60161F4F787FB35B14D -S21400FC7094F8603043F0010384F8603038BD94F89F -S21400FC80603003F0FE0384F8603038BD00F12000D9 -S21400FC9000EB9100704700BF10B504464FF000031C -S21400FCA0C4F20503984207D040F25450C0F2010057 -S21400FCB040F66161F4F762FB94F8600000F09D0086 -S21400FCC010BD00BF70B505460C4616464FF0000343 -S21400FCD0C4F20503984207D040F25450C0F2010027 -S21400FCE040F69261F4F74AFBB4F1200318BF0123F3 -S21400FCF0102C0CBF002303F00103002B46D0B4F1F8 -S21400FD00400318BF0123302C0CBF002303F001036F -S21400FD10002B3BD0B4F1600318BF0123502C0CBF5E -S21400FD20002303F001038BB3B4F1800318BF012353 -S21400FD30702C0CBF002303F001033BB3B4F1A00307 -S21400FD4018BF0123902C0CBF002303F00103EBB176 -S21400FD50B4F1C00318BF0123B02C0CBF002303F07E -S21400FD6001039BB1B4F1E00318BF0123D02C0CBFF4 -S21400FD70002303F001034BB1F02C07D040F254509F -S21400FD80C0F2010040F69A61F4F7F8FA052E07D99A -S21400FD9040F25450C0F2010040F69B61F4F7EEFAD0 -S21400FDA04FEA8606D5F850244FF00F0303FA06F301 -S21400FDB022EA03034FEA141404FA06F643EA060698 -S21400FDC0C5F8506470BD00BF10B504464FF0000380 -S21400FDD0C4F20503984207D040F25450C0F2010026 -S21400FDE040F6C761F4F7CAFA4FF0020384F81C34F1 -S21400FDF010BD00BF10B504464FF00003C4F2050363 -S21400FE00984207D040F25450C0F2010040F6E56137 -S21400FE10F4F7B4FA4FF0030384F81C3410BD00BFA7 -S21400FE20437843F001034370704700BF437803F004 -S21400FE30FE034370704700BF10B504464FF480536E -S21400FE40C4F20003C31A18BF0123B0F1804F0CBFE1 -S21400FE50002303F001033BB140F26850C0F20100FA -S21400FE604FF03A01F4F78AFAA06800F0010010BDDE -S21400FE7010B504464FF48053C4F20003C31A18BFEB -S21400FE800123B0F1804F0CBF002303F001033BB108 -S21400FE9040F26850C0F201004FF05801F4F76EFAD5 -S21400FEA0A36843F00103A36010BD00BF10B504466D -S21400FEB04FF48053C4F20003C31A18BF0123B0F1F5 -S21400FEC0804F0CBF002303F001033BB140F26850A3 -S21400FED0C0F201004FF07701F4F750FAA36843F040 -S21400FEE00203A36010BD00BF10B504464FF4805354 -S21400FEF0C4F20003C31A18BF0123B0F1804F0CBF31 -S21400FF00002303F001033BB140F26850C0F2010049 -S21400FF104FF09601F4F732FAA36823F00203A360C9 -S21400FF2010BD00BF10B504464FF48053C4F2000362 -S21400FF30C31A18BF0123B0F1804F0CBF002303F093 -S21400FF4001033BB140F26850C0F201004FF0AF0130 -S21400FF50F4F714FA4FF00103C4F8003C10BD00BFDC -S21400FF6010B504464FF48053C4F20003C31A18BFFA -S21400FF700123B0F1804F0CBF002303F001033BB117 -S21400FF8040F26850C0F201004FF0C901F4F7F6F9EC -S21400FF904EF25153C1F6CC23C4F8003C10BD00BF4E -S21400FFA010B504464FF48053C4F20003C31A18BFBA -S21400FFB00123B0F1804F0CBF002303F001033BB1D7 -S21400FFC040F26850C0F201004FF0E301F4F7D6F9B2 -S21400FFD0D4F8000C012814BF0020012010BD00BF7B -S21400FFE038B504460D464FF48053C4F20003C31AD6 -S21400FFF018BF0123B0F1804F0CBF002303F00103AC -S2140100003BB140F26850C0F201004FF48371F4F73F -S214010010B5F9256038BD00BF10B504464FF48053CE -S214010020C4F20003C31A18BF0123B0F1804F0CBFFE -S214010030002303F001033BB140F26850C0F2010017 -S2140100404FF49171F4F79AF9206810BD10B5044683 -S2140100504FF48053C4F20003C31A18BF0123B0F152 -S214010060804F0CBF002303F001033BB140F2685000 -S214010070C0F2010040F23B11F4F780F9606810BD50 -S21401008010B50C464FF48053C4F20003C31A18BFD0 -S2140100900123B0F1804F0CBF002303F001033BB1F5 -S2140100A040F26850C0F2010040F25D11F4F766F9C3 -S2140100B04FF022002146F8F72BFD4FF02200F8F70B -S2140100C003FE10BD08B54FF48053C4F20003C31AF3 -S2140100D018BF0123B0F1804F0CBF002303F00103CA -S2140100E03BB140F26850C0F2010040F28111F4F7D2 -S2140100F045F94FF02200F8F73BFE4FF02200F8F7E3 -S2140101004BFD08BD10B504464FF48053C4F20003FE -S214010110C31A18BF0123B0F1804F0CBF002303F0B0 -S21401012001033BB140F26850C0F201004FF4D271B6 -S214010130F4F724F9A36843F00103A36010BD00BFE0 -S21401014038B504460D464FF48053C4F20003C31A73 -S21401015018BF0123B0F1804F0CBF002303F0010349 -S2140101603BB140F26850C0F201004FF4E171F4F780 -S21401017005F90DB1606938BD206938BD10B5044672 -S2140101804FF48053C4F20003C31A18BF0123B0F121 -S214010190804F0CBF002303F001033BB140F26850CF -S2140101A0C0F2010040F2ED11F4F7E8F84FF0010358 -S2140101B0E36010BD10B504464FF48053C4F200034B -S2140101C0C31A18BF0123B0F1804F0CBF002303F000 -S2140101D001033BB140F26850C0F201004FF40371D5 -S2140101E0F4F7CCF8D4F8183443F48073C4F8183410 -S2140101F010BD00BF10B504464FF48053C4F200038F -S214010200C31A18BF0123B0F1804F0CBF002303F0BF -S21401021001033BB140F26850C0F2010040F22721D1 -S214010220F4F7ACF8D4F8183423F48073C4F818340F -S21401023010BD00BF6C69622F6472697665726C6965 -S214010240622F6164632E63006C69622F6472697643 -S21401025065726C69622F636F6D702E63000000001B -S2140102606C69622F6472697665726C69622F65705B -S214010270692E63006C69622F6472697665726C69B7 -S214010280622F65746865726E65742E6300000000E7 -S21401029034E10F4004E40F4008E40F400CE40F4043 -S2140102A06C69622F6472697665726C69622F666C1E -S2140102B06173682E6300000030E10F4004E20F40D6 -S2140102C008E20F400CE20F406C69622F6472697697 -S2140102D065726C69622F6770696F2E63000000009B -S2140102E0004000400080054000500040009005405E -S2140102F00060004000A005400070004000B00540CE -S2140103000040024000C005400050024000D00540B9 -S2140103100060024000E005400070024000F0054029 -S21401032000D00340000006406C69622F6472697653 -S21401033065726C69622F68696265726E6174652E9A -S214010340630000006C69622F6472697665726C697D -S214010350622F6932632E63006C69622F647269765C -S21401036065726C69622F6932732E63006C69622F45 -S2140103706472697665726C69622F696E74657272F1 -S2140103807570742E63000000000700000006000070 -S2140103900005000000040000000300000002000049 -S2140103A000010000000000000000000018ED00E061 -S2140103B01CED00E020ED00E000E400E004E400E0D5 -S2140103C008E400E00CE400E010E400E014E400E0DF -S2140103D018E400E01CE400E020E400E024E400E08F -S2140103E028E400E02CE400E030E400E034E400E03F -S2140103F06C69622F6472697665726C69622F6D70C2 -S214010400752E63006C69622F6472697665726C6919 -S214010410622F70776D2E63006C69622F6472697645 -S21401042065726C69622F7165692E63006C69622F53 -S2140104306472697665726C69622F7373692E6300E4 -S21401044010E00F4014E00F401CE00F4010E00F409A -S21401045040420F0000201C0080841E000080250002 -S214010460999E36000040380000093D0000803E009D -S21401047000004B00404B4C0000204E00808D5B007E -S21401048000C05D000080700000127A0000007D0050 -S21401049080969800001BB7000080BB00C0E8CE0025 -S2140104A0647ADA000024F4000000FA006C69622F16 -S2140104B06472697665726C69622F73797363746CA2 -S2140104C02E63000000E10F4004E10F4008E10F40F9 -S2140104D010E10F4014E10F4018E10F4040E00F40DB -S2140104E044E00F4048E00F4020E10F4024E10F4078 -S2140104F028E10F406C69622F6472697665726C69D7 -S214010500622F7379737469636B2E63006C69622F53 -S2140105106472697665726C69622F74696D65722E94 -S214010520630000006C69622F6472697665726C699B -S214010530622F756172742E63000000006C69622F71 -S2140105406472697665726C69622F75646D612E637B -S214010550000000006C69622F6472697665726C69CE -S214010560622F7573622E63006C69622F64726976FE -S21401057065726C69622F7761746368646F672E6356 -S2080105800000000071 -S2140105840000000000000000000000000000000061 -S2140105940000000000000000000000000000000051 -S2140105A40000000000000000000000000000000041 -S2140105B40000000000000000000000000000000031 -S2140105C40000000000000000000000000000000021 -S2140105D40000000000000000000000000000000011 -S2140105E40000000000000000000000000000000001 -S2140105F400000000000000000000000000000000F1 -S21401060400000000000000000000000000000000E0 -S21401061400000000000000000000000000000000D0 -S21401062400000000000000000000000000000000C0 -S21401063400000000000000000000000000000000B0 -S21401064400000000000000000000000000000000A0 -S2140106540000000000000000000000000000000090 -S2140106640000000000000000000000000000000080 -S2140106740000000000000000000000000000000070 -S2140106840000000000000000000000000000000060 -S21001069400000000000000000000000054 -S804004000BB +S11320005C010020312200006924000069240000E2 +S11320106924000069240000692400006924000088 +S11320206924000069240000692400006924000078 +S1132030692400006924000069240000552400007C +S11320406924000069240000692400006924000058 +S11320506924000069240000692400006924000048 +S11320606924000069240000692400006924000038 +S11320706924000069240000692400006924000028 +S11320806924000069240000692400006924000018 +S11320906924000069240000692400006924000008 +S11320A069240000692400006924000069240000F8 +S11320B069240000692400006924000069240000E8 +S11320C069240000692400006924000069240000D8 +S11320D069240000692400006924000069240000C8 +S11320E069240000692400006924000069240000B8 +S11320F0EE11AA5510B504464FF44040C4F2000056 +S113210043F21543C0F200039847B0F1FF3F1ABFF2 +S113211020700120002010BD10B54FF00100C1F265 +S1132120000042F67144C0F20004A0474FF00100E1 +S1132130C2F20000A0474FF48040C4F200004FF008 +S1132140030142F67103C0F20003984742F69D630F +S1132150C0F20003984701464FF44040C4F2000027 +S11321604FF461424FF0600343F2BD24C0F2000417 +S1132170A04710BD08B540F20003C2F200031B786B +S1132180CBB940F20400C2F2000042F2F503C0F2FF +S113219000039847012848D140F20003C2F200032B +S11321A04FF001021A7040F20103C2F200034FF033 +S11321B000021A7008BD40F20103C2F2000318784D +S11321C01A4BC01842F2F503C0F2000398470128E5 +S11321D02BD140F20103C2F200031A7802F101028A +S11321E0D2B21A7040F20403C2F200031B78934285 +S11321F01BD140F20003C2F200034FF000021A7038 +S113220040F20403C2F200035B78FF2B0DD140F2CD +S11322100403C2F200039B783BB942F2D933C0F203 +S1132220000398474FF0F103984708BD05000020CC +S113223008B516498D4640F20002C2F2000240F28F +S11322400003C2F200039A4211D243F21452C0F2C4 +S1132250000240F20003C2F2000340F20000C2F2A6 +S1132260000052F8041B43F8041B8342F9D30848C6 +S113227008494FF000028842B8BF40F8042BFADB4B +S113228042F26D33C0F20003984708BD5C010020A0 +S1132290000000205C00002008B542F6C503C0F22F +S11322A00003984708BD00BF10B54FF02000C2F2EC +S11322B0000042F67143C0F2000398474FF4A04473 +S11322C0C4F2020420464FF0010142F61D03C0F29D +S11322D00003984720464FF001014FF0000242F2FC +S11322E0ED73C0F20003984710BD00BF10B542F271 +S11322F04943C0F200039847044640F24803C2F23F +S113230000031B68C31AB3F5FA7F2ED340F24C03C3 +S1132310C2F200031B788BB940F24C03C2F20003F3 +S11323204FF001021A704FF4A040C4F202001146AB +S113233042F2ED73C0F20003984711E040F24C03FF +S1132340C2F200034FF000021A704FF4A040C4F22E +S113235002004FF0010142F2ED73C0F2000398470E +S113236040F24803C2F200031C6010BD38B54FF4BC +S11323706070C0F2C01042F6C143C0F20003984737 +S113238042F2A923C0F20003984742F2FD33C0F29F +S11323900003984742F29923C0F20003984742F29F +S11323A01913C0F20003984742F2ED25C0F200056C +S11323B042F27514C0F20004A847A047FCE700BF2E +S11323C040F25003C2F20003186040F25403C2F218 +S11323D000031960FEE700BF08B543F2BD13C0F265 +S11323E00003984743F29513C0F20003984708BDD1 +S11323F040F25803C2F200031860704708B542F671 +S11324009D63C0F20003984744F6D353C1F26203BC +S1132410A3FB00204FEA901043F2D113C0F2000353 +S1132420984743F28113C0F20003984743F2A9137B +S1132430C0F2000398474FF0000042F2F133C0F2BB +S11324400003984708BD00BF40F25803C2F20003DE +S11324501868704740F25803C2F200031A6802F188 +S113246001021A60704700BFFEE700BFEFF310805F +S113247062B670474FF48043C4F200034FF4004245 +S1132480C4F20502904214BF00220122984214BFF4 +S1132490134642F00103002B40F098804FF4A04310 +S11324A0C4F200034FF41042C4F20502904214BF78 +S11324B000220122984214BF134642F00103002B6C +S11324C040F087804FF4C043C4F200034FF420422D +S11324D0C4F20502904214BF00220122984214BFA4 +S11324E0134642F00103002B76D14FF4E043C4F2CB +S11324F000034FF43042C4F20502904214BF00229C +S11325000122984214BF134642F00103002B66D106 +S11325104FF48043C4F202034FF44042C4F2050274 +S1132520904214BF00220122984214BF134642F085 +S11325300103002B56D14FF4A043C4F202034FF41D +S11325405042C4F20502904214BF00220122984274 +S113255014BF134642F00103002B46D14FF4C0438D +S1132560C4F202034FF46042C4F20502904214BF65 +S113257000220122984214BF134642F00103002BAB +S113258036D14FF4E043C4F202034FF47042C4F274 +S11325900502904214BF00220122984214BF134640 +S11325A042F00103002B26D14FF45043C4F203033D +S11325B04FF00002C4F20602904214BF002201222E +S11325C0984214BF104642F0010070474FF00100DA +S11325D070474FF0010070474FF0010070474FF013 +S11325E0010070474FF0010070474FF00100704741 +S11325F04FF0010070474FF00100704770B504467A +S11326000E46154642F27543C0F20003984750B98E +S113261043F24C40C0F200004FF0E40142F2C133F7 +S1132620C0F200039847022D0AD943F24C40C0F28D +S113263000004FF0E60142F2C133C0F200039847B4 +S113264015F0010F04F58063D4F8002414BF32435D +S1132650B2431A6015F0020F04F58463D4F8202401 +S113266014BF164322EA06061E6070BDF8B5044680 +S11326700D4617461E4642F27543C0F200039847C2 +S113268050B943F24C40C0F200004FF4DD7142F205 +S1132690C133C0F20003984707F1FF323B1F18BF54 +S11326A00123012A94BF002303F0010363B10C2F1B +S11326B00AD043F24C40C0F200004FF4DF7142F202 +S11326C0C133C0F200039847B6F10A0318BF0123CF +S11326D0082E0CBF002303F00103FBB1B6F109037C +S11326E018BF01230C2E0CBF002303F00103ABB170 +S11326F0B6F10D0318BF01230B2E0CBF002303F00A +S113270001035BB156B143F24C40C0F2000040F209 +S1132710C51142F2C133C0F20003984717F0010F0C +S113272004F5A063D4F8002514BF2A43AA431A6011 +S113273017F0020F04F5A06303F10403D4F8042591 +S113274014BF2A43AA431A6017F0040F04F5A163C7 +S1132750D4F8082514BF2A43AA431A6017F0080FB7 +S113276004F5A363D4F8182514BF2A43AA431A60B6 +S113277016F0010F04F5A06303F10C03D4F80C2543 +S113278014BF2A43AA431A6016F0020F04F5A26389 +S1132790D4F8102514BF2A43AA431A6016F0040F74 +S11327A004F5A26303F10403D4F8142514BF2A43E7 +S11327B0AA431A6016F0080F04F5A26303F10C0390 +S11327C0D4F81C2514BF2A43AA431A6036B904F569 +S11327D0A563D4F8282542EA050505E004F5A563B8 +S11327E0D4F8282522EA05051D60F8BD70B5064613 +S11327F00C46154642F27543C0F20003984750B99F +S113280043F24C40C0F200004FF4517142F2C13324 +S1132810C0F20003984746F8245070BD38B5054609 +S11328200C4642F27543C0F20003984750B943F294 +S11328304C40C0F2000040F2044142F2C133C0F205 +S113284000039847284621464FF0010242F2FD5307 +S1132850C0F200039847284621464FF001024FF08A +S1132860080342F26D64C0F20004A04738BD00BF03 +S113287038B505460C4642F27543C0F2000398474A +S113288050B943F24C40C0F2000040F21F5142F2F2 +S1132890C133C0F200039847284621464FF0020294 +S11328A042F2FD53C0F200039847284621464FF0F8 +S11328B001024FF0080342F26D64C0F20004A04725 +S11328C038BD00BF08B542F26D43C0F2000398471B +S11328D0C0B208BDA0F5801303F1FF334FF480723A +S11328E0C0F21002904214BF00220122012B8CBFBF +S11328F0134642F00103002B40F07E814FF4007335 +S1132900C0F210034FF48062C0F21002904214BF70 +S113291000220122984214BF134642F00103002B07 +S113292040F06D814FF48073C1F210034FF40072D4 +S1132930C1F21002904214BF00220122984214BF37 +S1132940134642F00103002B40F05C814FF4806396 +S1132950C1F210034FF48042C1F21002904214BF3E +S113296000220122984214BF134642F00103002BB7 +S113297040F04B814FF4A043C2F210034FF0010228 +S1132980C2F20002904214BF00220122984214BFF6 +S1132990134642F00103002B40F03A814FF002034A +S11329A0C2F200034FF00402C2F20002904214BFCC +S11329B000220122984214BF134642F00103002B67 +S11329C040F029814FF00803C2F200034FF01002D7 +S11329D0C2F20002904214BF00220122984214BFA6 +S11329E0134642F00103002B40F018814FF02003FE +S11329F0C2F200034FF04002C2F20002904214BF40 +S1132A0000220122984214BF134642F00103002B16 +S1132A1040F007814FF08003C2F200034FF480724C +S1132A20C2F20002904214BF00220122984214BF55 +S1132A30134642F00103002B40F0F6804FF480531C +S1132A40C1F20003984214BF00230123402808BFA9 +S1132A5043F00103002B40F0EA804FF48043C1F2BD +S1132A6000034FF48052C1F21002904214BF0022BE +S1132A700122984214BF134642F00103002B40F098 +S1132A80D9804FF48073C2F210034FF08002C3F276 +S1132A900002904214BF00220122984214BF134640 +S1132AA042F00103002B40F0C8804FF01003C3F242 +S1132AB00003B0F1101F14BF00220122984214BF7A +S1132AC0134642F00103002B40F0BA804FF48073A8 +S1132AD0C1F200034FF40072C1F20002904214BF2D +S1132AE000220122984214BF134642F00103002B36 +S1132AF040F0A9804FF01003C1F200034FF0200210 +S1132B00C1F20002904214BF00220122984214BF75 +S1132B10134642F00103002B40F0988003F1200398 +S1132B20C3F200034FF00102C1F21002904214BF3D +S1132B3000220122984214BF134642F00103002BE5 +S1132B4040F0878003F10203C1F210034FF0040246 +S1132B50C1F21002904214BF00220122984214BF15 +S1132B60134642F00103002B76D103F10803C1F2AE +S1132B7010034FF00102C1F20002904214BF002280 +S1132B800122984214BF134642F00103002B66D180 +S1132B9003F10203C1F200034FF00402C1F2000288 +S1132BA0904214BF00220122984214BF134642F0FF +S1132BB00103002B56D14FF40053C2F200034FF02F +S1132BC00102C2F21002904214BF00220122984274 +S1132BD014BF134642F00103002B46D14FF4805337 +S1132BE0C0F21003984214BF00230123082814BF25 +S1132BF0184643F0010070474FF0010070474FF052 +S1132C00010070474FF0010070474FF0010070471A +S1132C104FF0010070474FF0010070474FF0010082 +S1132C2070474FF0010070474FF0010070474FF0BC +S1132C30010070474FF0010070474FF001007047EA +S1132C404FF0010070474FF0010070474FF0010052 +S1132C5070474FF0010070474FF0010070474FF08C +S1132C60010070474FF0010070474FF001007047BA +S1132C7010B5044642F6D503C0F20003984750B994 +S1132C8043F2C040C0F200004FF4FC7142F2C13381 +S1132C90C0F20003984743F2D843C0F200034FEA5E +S1132CA0147253F822301A68A1B2C4F3044401FA2E +S1132CB004F414431C6010BD0138FDD1704700BFFB +S1132CC0F8B504464FF46043C4F20F031B6813F0D5 +S1132CD0E04F0DD04FF46043C4F20F031A684FF075 +S1132CE00003C7F2FF0302EA0303B3F1805F02D1DA +S1132CF0002CC0F2D1804EF26002C4F20F021168BF +S1132D004EF27003C4F20F031E6841F4006121F413 +S1132D10800546F4006615601E6011F0020F02D0B3 +S1132D2014F0020F05D015F0010F2CD014F0010F90 +S1132D3029D164F003031D404EF26003C4F20F0373 +S1132D401D60002E0CDA06F07003702B14BF0022F5 +S1132D500122302B14BF134642F0010323B90BE0C8 +S1132D6005F03003302B07D14FF4805042F6B943BD +S1132D70C0F20003984706E04FF4002042F6B9433E +S1132D80C0F20003984725F45E5727F0700743F21A +S1132D90F07304EA03031F434DF68F73C7F6FF7302 +S1132DA006EA030342F23005C8F2000504EA050509 +S1132DB01D4304F008034EF25802C4F20F024FF010 +S1132DC04001116055EAC3050AD54EF27003C4F2FE +S1132DD00F031D604EF26003C4F20F031F6009E08D +S1132DE04EF26003C4F20F031F604EF27003C4F28C +S1132DF00F031D604FF0100042F6B943C0F2000308 +S1132E00984727F0F86727F003074FF00303C0F251 +S1132E10C07304EA03031F4325F0FC5504F0FC537C +S1132E201D4314F0804F1FBF47F4800725F4800032 +S1132E300023C4F240031ABF2340184325F0804006 +S1132E4014F4006F17D14EF25003C4F20F031B6841 +S1132E5013F0400F0BD147F6FF734EF25001C4F24A +S1132E600F010A6812F0400F01D1013BF9D127F498 +S1132E70006720F400604EF26003C4F20F031F6089 +S1132E804EF27003C4F20F0318604FF0100042F6C4 +S1132E90B943C0F200039847F8BD00BF30B44EF206 +S1132EA06003C4F20F031B684EF27002C4F20F02F7 +S1132EB01268002AB4BF02F0700103F03001202927 +S1132EC000F0858004D881B1102940F0548115E0C8 +S1132ED0602900F0E580702900F0DF80302908BF08 +S1132EE047F2305040F04781DCE043F26441C0F2E5 +S1132EF00001C3F3841051F82000D3E04FF4604183 +S1132F00C4F20F01096811F0E04F04BF4EF2C01083 +S1132F10C0F2E40000F0C6804FF46041C4F20F0137 +S1132F2008684FF00001C7F2FF0100EA0101B1F1A6 +S1132F30805F04BF4EF2C010C0F2E40000F0B28023 +S1132F404FF46041C4F20F0108684FF00001C7F26A +S1132F50FF0100EA01014FF00000C1F201008142CB +S1132F600DD14FF46041C4F20F01096889B20229FE +S1132F7004BF4FF4D850C0F2B70000F093804FF470 +S1132F806041C4F20F0108684FF00001C7F2FF016D +S1132F9000EA01014FF00000C1F2030081421CBFAE +S1132FA04FF41050C0F2F4007CD14FF46041C4F2ED +S1132FB00F010C68A4B24FF4D850C0F2B7004FF41C +S1132FC01051C0F2F401002C18BF08466AE04FF417 +S1132FD06041C4F20F01096811F0E04F04BF43F6E9 +S1132FE07000C0F239005DD04FF46041C4F20F01AB +S1132FF008684FF00001C7F2FF0100EA0101B1F1D6 +S1133000805F04BF43F67000C0F239004AD04FF429 +S11330106041C4F20F0108684FF00001C7F2FF01DC +S113302000EA01014FF00000C1F2010081420CD11D +S11330304FF46041C4F20F01096889B2022904BF48 +S11330404CF2C060C0F22D002CD04FF46041C4F2A9 +S11330500F0108684FF00001C7F2FF0100EA010107 +S11330604FF00000C1F2030081421CBF4FF4106016 +S1133070C0F23D0016D14FF46041C4F20F010C6858 +S1133080A4B24CF2C060C0F22D004FF41061C0F243 +S11330903D01002C18BF084604E04FF4004001E055 +S11330A04FF48000002A03DA12F4006F03D040E0EA +S11330B013F4006F3DD14EF26401C4F20F010968AC +S11330C04FF46044C4F20F04246814F0E04F0DD0B0 +S11330D04FF46044C4F20F0425684FF00004C7F2B3 +S11330E0FF0405EA0404B4F1805F0CD1C1F3481471 +S11330F004F1020404FB00F001F01F0404F10204D3 +S1133100B0FBF4F00BE0C1F3481404FB00F001F051 +S11331101F0404F101044FEA4404B0FBF4F011F479 +S1133120804F18BF400811F4004F18BF800843F4C3 +S1133130800313F4800F20D0002A15DA12F0804F98 +S11331400BD012F4006F08D14FEA4000C2F386524C +S113315002F10102B0FBF2F00FE0C2F3C55202F13A +S11331600102B0FBF2F008E0C3F3C35303F101031F +S1133170B0FBF3F001E04FF0000030BC704700BF3B +S11331804EF21003CEF200031A6842F005021A60F0 +S1133190704700BF4EF21003CEF200031A6822F00B +S11331A001021A60704700BF4EF21003CEF2000312 +S11331B01A6842F002021A60704700BF4EF2100310 +S11331C0CEF200031A6822F002021A60704700BFB0 +S11331D010B500F1FF34B4F1807F0AD343F2E44028 +S11331E0C0F200004FF0D00142F2C133C0F200033C +S11331F098474EF21403CEF200031C6010BD00BFCA +S11332004FF44043C4F200034FF45042C4F20002AE +S1133210904214BF00220122984214BF134642F088 +S1133220010343B94FF46043C4F20003984214BF4E +S11332300020012070474FF00100704710B504468C +S113324043F20123C0F20003984750B943F2FC4013 +S1133250C0F200004FF4CF7142F2C133C0F2000358 +S11332609847E36A43F01003E362236B43F440732B +S113327043F00103236310BD10B5044643F2012358 +S1133280C0F20003984750B943F2FC40C0F200007A +S11332904FF4DF7142F2C133C0F200039847A369CF +S11332A013F0080FFBD1E36A23F01003E362236BEE +S11332B023F4407323F00103236310BDF8B50446DF +S11332C00E4615461F4643F20123C0F200039847F9 +S11332D050B943F2FC40C0F2000040F20D1142F23A +S11332E0C133C0F20003984755B943F2FC40C0F221 +S11332F000004FF4877142F2C133C0F200039847D3 +S11333004FF46043C4F20F031B6813F0E04F08BF8F +S1133310102347D04FF46043C4F20F031A684FF0F0 +S11333200003C7F2FF0302EA0303B3F1805F08BF9F +S1133330102337D04FF46043C4F20F031A684FF0E0 +S11333400003C7F2FF0302EA03034FF00002C1F2D5 +S11333500102934209D14FF46043C4F20F031B6886 +S11333609BB2022B08BF10231CD04FF46043C4F25D +S11333700F031A684FF00003C7F2FF0302EA0303C6 +S11333804FF00002C1F20302934218BF082309D18F +S11333904FF46043C4F20F031B689BB2002B0CBFB5 +S11333A01023082305FB03F3B3420AD943F2FC407C +S11333B0C0F2000040F20F1142F2C133C0F2000328 +S11333C09847204643F27923C0F200039847B6EBAE +S11333D0051F236B3DBF43F0200323636D0823F0D7 +S11333E0200328BF23634FEAC606B6FBF5F505F1B3 +S11333F001054FEAD5136362C5F34505A562E7628B +S11334004FF00003A361204643F23D23C0F20003C2 +S11334109847F8BD10B5044643F20123C0F20003F7 +S1133420984750B943F2FC40C0F2000040F2094111 +S113343042F2C133C0F200039847A36913F0100F9E +S11334400CBF20684FF0FF3010BD00BF6C69622FC5 +S11334506472697665726C69622F6770696F2E6336 +S11334600000000040420F0000201C0080841E0069 +S113347000802500999E36000040380000093D0078 +S113348000803E0000004B00404B4C0000204E00EA +S1133490808D5B0000C05D000080700000127A0027 +S11334A000007D0080969800001BB7000080BB00E0 +S11334B0C0E8CE00647ADA000024F4000000FA00C8 +S11334C06C69622F6472697665726C69622F7379B4 +S11334D07363746C2E63000000E10F4004E10F403D +S11334E008E10F406C69622F6472697665726C69D9 +S11334F0622F7379737469636B2E63006C69622F36 +S11335006472697665726C69622F756172742E6378 +S107351000000000B3 +S9032000DC diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/makefile b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/makefile index bf2b894e..28371fb8 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/makefile +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/makefile @@ -1,11 +1,11 @@ #**************************************************************************************** -#| Description: Makefile for STM32 using CodeSourcery GNU GCC compiler toolset +#| Description: Makefile for LM3S using CodeSourcery GNU GCC compiler toolset #| File Name: makefile #| #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2012 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -156,13 +156,13 @@ LIB_PATH = #|---------------------------------------------------------------------------------------| #| Options for compiler binaries | #|---------------------------------------------------------------------------------------| -CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -O1 -T memory.x +CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -mlong-calls -O1 -T memory.x CFLAGS += -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D sprintf=usprintf -Wno-main CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -D snprintf=usnprintf CFLAGS += -D printf=uipprintf -ffunction-sections -fdata-sections $(INC_PATH) CFLAGS += -D DEBUG -D gcc LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O srec ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/memory.x b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/memory.x index 2016bd61..61ad9d84 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/memory.x +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_GCC/Prog/memory.x @@ -1,6 +1,6 @@ MEMORY { - FLASH (rx) : ORIGIN = 0x00004000, LENGTH = 240K + FLASH (rx) : ORIGIN = 0x00002000, LENGTH = 248K SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K } diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.elf index 58832e0d..27616b8d 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.map index 68931b59..317b223c 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.map @@ -1,21 +1,3 @@ -Archive member included because of file (symbol) - -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - (__vfprintf_int_nwp) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - (__vfscanf_int) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) (__getc) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (memcpy) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__umoddi3) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - (__do_debug_operation_bkpt) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__errno) -C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) (__floatsisf) Discarded input sections @@ -23,125 +5,125 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .bss 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .text.SysCtlSRAMSizeGet - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlFlashSizeGet - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlPinPresent - 0x00000000 0x188 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x184 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralPresent - 0x00000000 0x60 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralReset - 0x00000000 0x64 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x50 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepEnable - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepEnable - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepDisable - 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralClockGating - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntRegister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x12 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntEnable 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntDisable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntClear 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlIntStatus - 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOSet - 0x00000000 0x5c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOGet 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOConfigSet - 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x20 THUMB Debug/../../obj/sysctl.o .text.SysCtlReset - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlSleep - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x4 THUMB Debug/../../obj/sysctl.o .text.SysCtlDeepSleep 0x00000000 0x20 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseGet 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseClear - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlBrownOutConfigSet - 0x00000000 0x44 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockSet - 0x00000000 0x90 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockGet - 0x00000000 0x48 THUMB Debug/../../obj/sysctl.o - .text.SysCtlADCSpeedSet - 0x00000000 0x84 THUMB Debug/../../obj/sysctl.o - .text.SysCtlADCSpeedGet 0x00000000 0x34 THUMB Debug/../../obj/sysctl.o + .text.SysCtlADCSpeedSet + 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + .text.SysCtlADCSpeedGet + 0x00000000 0x2c THUMB Debug/../../obj/sysctl.o .text.SysCtlIOSCVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlMOSCVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlPLLVerificationSet - 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1c THUMB Debug/../../obj/sysctl.o .text.SysCtlClkVerificationClear - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBEnable - 0x00000000 0xb0 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBDisable - 0x00000000 0xb4 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLEnable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLDisable - 0x00000000 0x14 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlI2SMClkSet - 0x00000000 0x11c THUMB Debug/../../obj/sysctl.o + 0x00000000 0xe8 THUMB Debug/../../obj/sysctl.o .rodata.g_pulDCRegs 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o + .rodata.g_pulDCGCRegs + 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulSCGCRegs 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulSRCRRegs 0x00000000 0xc THUMB Debug/../../obj/sysctl.o - .rodata.g_pulDCGCRegs - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o .text 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .data 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .bss 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .text.IntDefaultHandler - 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x2 THUMB Debug/../../obj/interrupt.o .text.IntMasterEnable 0x00000000 0xc THUMB Debug/../../obj/interrupt.o .text.IntMasterDisable 0x00000000 0xc THUMB Debug/../../obj/interrupt.o .text.IntRegister - 0x00000000 0x7c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o .text.IntUnregister - 0x00000000 0x30 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x28 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingSet - 0x00000000 0x38 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x34 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingGet - 0x00000000 0x38 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x24 THUMB Debug/../../obj/interrupt.o .text.IntPrioritySet - 0x00000000 0x50 THUMB Debug/../../obj/interrupt.o - .text.IntPriorityGet 0x00000000 0x40 THUMB Debug/../../obj/interrupt.o + .text.IntPriorityGet + 0x00000000 0x34 THUMB Debug/../../obj/interrupt.o .text.IntEnable - 0x00000000 0xa8 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x88 THUMB Debug/../../obj/interrupt.o .text.IntDisable - 0x00000000 0xa8 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x88 THUMB Debug/../../obj/interrupt.o .text.IntPendSet - 0x00000000 0x94 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x78 THUMB Debug/../../obj/interrupt.o .text.IntPendClear - 0x00000000 0x7c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x68 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskSet - 0x00000000 0xc THUMB Debug/../../obj/interrupt.o + 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskGet - 0x00000000 0xc THUMB Debug/../../obj/interrupt.o - .rodata.str1.4 + 0x00000000 0x4 THUMB Debug/../../obj/interrupt.o + .rodata.str1.1 0x00000000 0x74 THUMB Debug/../../obj/interrupt.o vtable 0x00000000 0x11c THUMB Debug/../../obj/interrupt.o .rodata.g_pulPriority @@ -154,235 +136,237 @@ Discarded input sections .text.CPUcpsid 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o .text.CPUprimask - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text.CPUcpsie 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o .text.CPUwfi 0x00000000 0x4 THUMB Debug/../../obj/cpulib.o .text.CPUbasepriSet - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text.CPUbasepriGet - 0x00000000 0x8 THUMB Debug/../../obj/cpulib.o + 0x00000000 0x6 THUMB Debug/../../obj/cpulib.o .text 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .data 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .bss 0x00000000 0x0 THUMB Debug/../../obj/gpio.o .text.GPIOGetIntNumber - 0x00000000 0x16c THUMB Debug/../../obj/gpio.o + 0x00000000 0xe0 THUMB Debug/../../obj/gpio.o .text.GPIODirModeGet - 0x00000000 0x58 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeSet - 0x00000000 0xac THUMB Debug/../../obj/gpio.o + 0x00000000 0x98 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeGet - 0x00000000 0x68 THUMB Debug/../../obj/gpio.o + 0x00000000 0x5c THUMB Debug/../../obj/gpio.o .text.GPIOPadConfigGet - 0x00000000 0xbc THUMB Debug/../../obj/gpio.o + 0x00000000 0xa4 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntEnable 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntDisable - 0x00000000 0x2c THUMB Debug/../../obj/gpio.o + 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntStatus - 0x00000000 0x2c THUMB Debug/../../obj/gpio.o + 0x00000000 0x28 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntClear - 0x00000000 0x24 THUMB Debug/../../obj/gpio.o + 0x00000000 0x20 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntRegister 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntUnregister 0x00000000 0x30 THUMB Debug/../../obj/gpio.o .text.GPIOPinRead - 0x00000000 0x24 THUMB Debug/../../obj/gpio.o + 0x00000000 0x20 THUMB Debug/../../obj/gpio.o .text.GPIOPinWrite 0x00000000 0x24 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeADC - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeCAN - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeComparator - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOInput - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutput - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutputOD - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2C - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypePWM - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeQEI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeSSI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeTimer - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBDigital - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBAnalog - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2S - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEthernetLED - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEPI - 0x00000000 0x3c THUMB Debug/../../obj/gpio.o + 0x00000000 0x34 THUMB Debug/../../obj/gpio.o .text.GPIOPinConfigure - 0x00000000 0x80 THUMB Debug/../../obj/gpio.o + 0x00000000 0x6c THUMB Debug/../../obj/gpio.o .rodata.g_pulGPIOBaseAddrs 0x00000000 0x48 THUMB Debug/../../obj/gpio.o .text 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .data 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .bss 0x00000000 0x0 THUMB Debug/../../obj/flashlib.o .text.FlashUsecGet - 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .text.FlashUsecSet - 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .text.FlashProtectGet - 0x00000000 0xc4 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x94 THUMB Debug/../../obj/flashlib.o .text.FlashProtectSet - 0x00000000 0x18c THUMB Debug/../../obj/flashlib.o + 0x00000000 0x12c THUMB Debug/../../obj/flashlib.o .text.FlashProtectSave - 0x00000000 0x6c THUMB Debug/../../obj/flashlib.o - .text.FlashUserGet - 0x00000000 0x80 THUMB Debug/../../obj/flashlib.o - .text.FlashUserSet 0x00000000 0x50 THUMB Debug/../../obj/flashlib.o + .text.FlashUserGet + 0x00000000 0x64 THUMB Debug/../../obj/flashlib.o + .text.FlashUserSet + 0x00000000 0x38 THUMB Debug/../../obj/flashlib.o .text.FlashUserSave - 0x00000000 0xa0 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x64 THUMB Debug/../../obj/flashlib.o .text.FlashIntRegister - 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x14 THUMB Debug/../../obj/flashlib.o .text.FlashIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x12 THUMB Debug/../../obj/flashlib.o .text.FlashIntEnable 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .text.FlashIntDisable - 0x00000000 0x14 THUMB Debug/../../obj/flashlib.o + 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .text.FlashIntStatus - 0x00000000 0x1c THUMB Debug/../../obj/flashlib.o + 0x00000000 0x18 THUMB Debug/../../obj/flashlib.o .text.FlashIntClear 0x00000000 0xc THUMB Debug/../../obj/flashlib.o .rodata.g_pulFMPPERegs 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o .rodata.g_pulFMPRERegs 0x00000000 0x10 THUMB Debug/../../obj/flashlib.o + .rodata.CSWTCH.4 + 0x00000000 0x3 THUMB Debug/../../obj/flashlib.o .text 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .data 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uartlib.o .text.UARTParityModeSet - 0x00000000 0x64 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x54 THUMB Debug/../../obj/uartlib.o .text.UARTParityModeGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOLevelSet - 0x00000000 0x74 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x60 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOLevelGet - 0x00000000 0x30 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x2c THUMB Debug/../../obj/uartlib.o .text.UARTConfigGetExpClk - 0x00000000 0x48 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTFIFOEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTFIFODisable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTEnableSIR - 0x00000000 0x34 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x2c THUMB Debug/../../obj/uartlib.o .text.UARTDisableSIR 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTSmartCardEnable - 0x00000000 0xac THUMB Debug/../../obj/uartlib.o + 0x00000000 0x78 THUMB Debug/../../obj/uartlib.o .text.UARTSmartCardDisable - 0x00000000 0xa0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTModemControlSet - 0x00000000 0xc0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x84 THUMB Debug/../../obj/uartlib.o .text.UARTModemControlClear - 0x00000000 0xc0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x84 THUMB Debug/../../obj/uartlib.o .text.UARTModemControlGet - 0x00000000 0xa4 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTModemStatusGet - 0x00000000 0xa4 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x70 THUMB Debug/../../obj/uartlib.o .text.UARTFlowControlSet - 0x00000000 0xbc THUMB Debug/../../obj/uartlib.o + 0x00000000 0x80 THUMB Debug/../../obj/uartlib.o .text.UARTFlowControlGet - 0x00000000 0xa0 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x6c THUMB Debug/../../obj/uartlib.o .text.UARTTxIntModeSet - 0x00000000 0x4c THUMB Debug/../../obj/uartlib.o + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTTxIntModeGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTCharsAvail 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o .text.UARTCharGet - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o - .text.UARTCharPut - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o - .text.UARTBreakCtl - 0x00000000 0x38 THUMB Debug/../../obj/uartlib.o - .text.UARTBusy 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + .text.UARTCharPut + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + .text.UARTBreakCtl + 0x00000000 0x30 THUMB Debug/../../obj/uartlib.o + .text.UARTBusy + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTIntRegister - 0x00000000 0x4c THUMB Debug/../../obj/uartlib.o - .text.UARTIntUnregister 0x00000000 0x48 THUMB Debug/../../obj/uartlib.o + .text.UARTIntUnregister + 0x00000000 0x44 THUMB Debug/../../obj/uartlib.o .text.UARTIntEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntDisable - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntStatus - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTIntClear 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTDMAEnable 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTDMADisable - 0x00000000 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o .text.UARTRxErrorGet - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text.UARTRxErrorClear - 0x00000000 0x24 THUMB Debug/../../obj/uartlib.o + 0x00000000 0x20 THUMB Debug/../../obj/uartlib.o .text 0x00000000 0x0 THUMB Debug/../../obj/canlib.o .data 0x00000000 0x0 THUMB Debug/../../obj/canlib.o .bss 0x00000000 0x0 THUMB Debug/../../obj/canlib.o .text.CANBaseValid - 0x00000000 0x3c THUMB Debug/../../obj/canlib.o + 0x00000000 0x34 THUMB Debug/../../obj/canlib.o .text.CANIntNumberGet - 0x00000000 0x38 THUMB Debug/../../obj/canlib.o + 0x00000000 0x2c THUMB Debug/../../obj/canlib.o .text.CANRegWrite - 0x00000000 0x24 THUMB Debug/../../obj/canlib.o + 0x00000000 0x18 THUMB Debug/../../obj/canlib.o .text.CANRegRead - 0x00000000 0x84 THUMB Debug/../../obj/canlib.o - .text.CANInit 0x00000000 0xb0 THUMB Debug/../../obj/canlib.o + 0x00000000 0x5c THUMB Debug/../../obj/canlib.o + .text.CANInit 0x00000000 0x98 THUMB Debug/../../obj/canlib.o .text.CANEnable 0x00000000 0x2c THUMB Debug/../../obj/canlib.o .text.CANDisable 0x00000000 0x2c THUMB Debug/../../obj/canlib.o .text.CANBitTimingGet - 0x00000000 0x74 THUMB Debug/../../obj/canlib.o + 0x00000000 0x64 THUMB Debug/../../obj/canlib.o .text.CANBitRateSet - 0x00000000 0x13c THUMB Debug/../../obj/canlib.o + 0x00000000 0xd0 THUMB Debug/../../obj/canlib.o .text.CANBitTimingSet - 0x00000000 0x114 THUMB Debug/../../obj/canlib.o + 0x00000000 0xdc THUMB Debug/../../obj/canlib.o .text.CANIntRegister 0x00000000 0x34 THUMB Debug/../../obj/canlib.o .text.CANIntUnregister 0x00000000 0x30 THUMB Debug/../../obj/canlib.o .text.CANIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/canlib.o + 0x00000000 0x40 THUMB Debug/../../obj/canlib.o .text.CANIntDisable - 0x00000000 0x44 THUMB Debug/../../obj/canlib.o + 0x00000000 0x40 THUMB Debug/../../obj/canlib.o .text.CANIntStatus 0x00000000 0x4c THUMB Debug/../../obj/canlib.o .text.CANIntClear - 0x00000000 0x90 THUMB Debug/../../obj/canlib.o + 0x00000000 0x7c THUMB Debug/../../obj/canlib.o .text.CANRetrySet 0x00000000 0x34 THUMB Debug/../../obj/canlib.o .text.CANRetryGet 0x00000000 0x2c THUMB Debug/../../obj/canlib.o .text.CANStatusGet - 0x00000000 0x90 THUMB Debug/../../obj/canlib.o + 0x00000000 0x7c THUMB Debug/../../obj/canlib.o .text.CANErrCntrGet - 0x00000000 0x38 THUMB Debug/../../obj/canlib.o + 0x00000000 0x34 THUMB Debug/../../obj/canlib.o .text.CANMessageSet - 0x00000000 0x288 THUMB Debug/../../obj/canlib.o + 0x00000000 0x1e0 THUMB Debug/../../obj/canlib.o .text.CANMessageGet - 0x00000000 0x200 THUMB Debug/../../obj/canlib.o + 0x00000000 0x1c0 THUMB Debug/../../obj/canlib.o .text.CANMessageClear - 0x00000000 0x78 THUMB Debug/../../obj/canlib.o - .rodata.str1.4 - 0x00000000 0x74 THUMB Debug/../../obj/canlib.o + 0x00000000 0x68 THUMB Debug/../../obj/canlib.o + .rodata.str1.1 + 0x00000000 0x71 THUMB Debug/../../obj/canlib.o .rodata.g_usCANBitValues 0x00000000 0x20 THUMB Debug/../../obj/canlib.o .text 0x00000000 0x0 THUMB Debug/../../obj/hooks.o @@ -413,6 +397,8 @@ Discarded input sections .text 0x00000000 0x0 THUMB Debug/../../obj/timer.o .data 0x00000000 0x0 THUMB Debug/../../obj/timer.o .bss 0x00000000 0x0 THUMB Debug/../../obj/timer.o + .text.TimerSet + 0x00000000 0xc THUMB Debug/../../obj/timer.o .text 0x00000000 0x0 THUMB Debug/../../obj/uart.o .data 0x00000000 0x0 THUMB Debug/../../obj/uart.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uart.o @@ -432,7 +418,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/com.o .bss 0x00000000 0x0 THUMB Debug/../../obj/com.o .text.ComSetDisconnectEntryState - 0x00000000 0x10 THUMB Debug/../../obj/com.o + 0x00000000 0xc THUMB Debug/../../obj/com.o .text.ComIsConnectEntryState 0x00000000 0xc THUMB Debug/../../obj/com.o .text 0x00000000 0x0 THUMB Debug/../../obj/cop.o @@ -441,552 +427,6 @@ Discarded input sections .text 0x00000000 0x0 THUMB Debug/../../obj/xcp.o .data 0x00000000 0x0 THUMB Debug/../../obj/xcp.o .bss 0x00000000 0x0 THUMB Debug/../../obj/xcp.o - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.twodigit - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.month_name - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.checked_day_name - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_ch - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_str - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_nstr - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_digit - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigit - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigits_leading_blank - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_twodigit2 - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.put_formatted - 0x00000000 0x410 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__pow10 - 0x00000000 0x70 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__stdin_ungetc - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__print_padding - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__pre_padding - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xlltoa - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xltoa - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__xtoa - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.abs - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.asctime_r - 0x00000000 0xfc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.asctime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atexit - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc._execute_at_exit_fns - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.bsearch - 0x00000000 0x64 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_is_exact_power_of_two - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_round_power_of_two - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_count_leading_zeroes - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctl_ilogb - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_alloc - 0x00000000 0x108 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_free - 0x00000000 0xf0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.buddy_heap_init - 0x00000000 0xc0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isalpha - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isxdigit - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__strtoull - 0x00000000 0x158 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.__strtoul - 0x00000000 0x104 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ispunct - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isalnum - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isprint - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isgraph - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.iscntrl - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.tolower - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.toupper - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.isblank - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.div - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.itoa - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.labs - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ldiv - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_init - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_alloc - 0x00000000 0xb0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_free - 0x00000000 0xd8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.linked_heap_realloc - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.llabs - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.lldiv - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.lltoa - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localeconv - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.setlocale - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ltoa - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.malloc - 0x00000000 0x90 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.calloc - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.free - 0x00000000 0xb0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.realloc - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memccpy - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memcmp - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.memmove - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.qsort - 0x00000000 0x264 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.rand - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.snprintf - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.sprintf - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.srand - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.sscanf - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcasecmp - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcat - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strchr - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strcspn - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strdup - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strftime - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncasecmp - 0x00000000 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncat - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncmp - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strncpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnlen - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strndup - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strnstr - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strpbrk - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strrchr - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strsep - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strspn - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strstr - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtod - 0x00000000 0x1c8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtof - 0x00000000 0x1a4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtok - 0x00000000 0x98 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtok_r - 0x00000000 0x84 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtol - 0x00000000 0x8c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atol - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atoi - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atof - 0x00000000 0x158 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoll - 0x00000000 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.atoll - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoul - 0x00000000 0x9c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.strtoull - 0x00000000 0xb4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localtime_r - 0x00000000 0x18c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.difftime - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.checktm - 0x00000000 0x19c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.mktime - 0x00000000 0x1bc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctime - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ctime_r - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gmtime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gmtime_r - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.localtime - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.gettimeofday - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.settimeofday - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ulltoa - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.ultoa - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.utoa - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsnprintf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsprintf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.vsscanf - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscat - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcschr - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscmp - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscpy - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcscspn - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcslen - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsdup - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncat - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnchr - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncmp - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsncpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnlen - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsnstr - 0x00000000 0x5c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcspbrk - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsrchr - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcssep - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsspn - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcsstr - 0x00000000 0x54 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcstok - 0x00000000 0x98 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wcstok_r - 0x00000000 0x84 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemcpy - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemmove - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemcmp - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemchr - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc.wmemset - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.heap - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__crt_get_time_of_day - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.year_lengths - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.mon_name - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__atexitfns - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.last.2559 - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.invalid - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.str1.4 - 0x00000000 0x138 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.__rand_next - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.last.3020 - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.mon_lengths - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.day_name - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.month_names - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.asctime_buf - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.power - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.__crt_set_time_of_day - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc.atexitfn_count - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc.__ungot - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .data.libc._lconv - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.__ctype - 0x00000000 0x104 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .bss.libc._tm 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .rodata.libc.day_names - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.longjmp - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy - 0x00000000 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy_fast - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memcpy_small - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.memset - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.setjmp - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strcpy - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strcmp - 0x00000000 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc.strlen - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .text.libc 0x00000000 0xa4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_umod - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_asr - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_div - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_lsl - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_lsr - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_mod - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_udivmod - 0x00000000 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_ldivmod - 0x00000000 0x58 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_cmp - 0x00000000 0x1c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int64_ucmp - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.muldi3 - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_umod - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_div - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_mod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__int32_udivmod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_uidivmod - 0x00000000 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.__aeabi_idivmod - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.ctl_count_leading_zeros_32 - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libc.ctl_count_leading_zeros_16 - 0x00000000 0x34 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .text.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .data.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .bss.libdebugio - 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_printf - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_fprintf - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_scanf - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text.libc.debug_fscanf - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__errno - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__heap_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__heap_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__printf_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__printf_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__scanf_lock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc.__scanf_unlock - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .bss.libc.errno - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .text.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .data.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .bss.libc 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int32_to_float32 - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int32_to_float64 - 0x00000000 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint32_to_float32 - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint32_to_float64 - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int64_to_float32 - 0x00000000 0x94 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__int64_to_float64 - 0x00000000 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint64_to_float32 - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__uint64_to_float64 - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_int32 - 0x00000000 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_int64 - 0x00000000 0x7c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_uint32 - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_uint64 - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_int32 - 0x00000000 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_int64 - 0x00000000 0x80 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_uint32 - 0x00000000 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_uint64 - 0x00000000 0x48 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_to_float64 - 0x00000000 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_to_float32 - 0x00000000 0x70 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_add - 0x00000000 0x138 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_mul - 0x00000000 0xd4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_div - 0x00000000 0x1e0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_cmp - 0x00000000 0x44 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpeq - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmplt - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmple - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpge - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_fcmpgt - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_add - 0x00000000 0x294 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_mul - 0x00000000 0x16c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_div - 0x00000000 0x214 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_cmp - 0x00000000 0x64 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpeq - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmplt - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmple - 0x00000000 0x14 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpge - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__aeabi_dcmpgt - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_signbit - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_signbit - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isinf - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isinf - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isnan - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isnan - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isfinite - 0x00000000 0xc C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isfinite - 0x00000000 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_isnormal - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_isnormal - 0x00000000 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float32_classify - 0x00000000 0x24 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .text.libc.__float64_classify - 0x00000000 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float32_infinity - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float32_nan - 0x00000000 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float64_infinity - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) - .rodata.libc.__float64_nan - 0x00000000 0x8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) Memory Configuration @@ -996,14 +436,11 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Peripherals 0x40020000 0x00100000 xw FiRM_Peripherals 0x40000000 0x00010000 xw SRAM 0x20000000 0x00001000 xw -FLASH 0x00000000 0x00004000 xr +FLASH 0x00000000 0x00002000 xr *default* 0x00000000 0xffffffff Linker script and memory map - 0x00002990 __do_debug_operation = __do_debug_operation_bkpt - 0x00001f30 __vfprintf = __vfprintf_int_nwp - 0x000024c0 __vfscanf = __vfscanf_int 0xe000e000 __CM3_System_Control_Space_segment_start__ = 0xe000e000 0xe000f000 __CM3_System_Control_Space_segment_end__ = 0xe000f000 0x40020000 __Peripherals_segment_start__ = 0x40020000 @@ -1013,7 +450,7 @@ Linker script and memory map 0x20000000 __SRAM_segment_start__ = 0x20000000 0x20001000 __SRAM_segment_end__ = 0x20001000 0x00000000 __FLASH_segment_start__ = 0x0 - 0x00004000 __FLASH_segment_end__ = 0x4000 + 0x00002000 __FLASH_segment_end__ = 0x2000 0x00000100 __STACKSIZE__ = 0x100 0x00000000 __STACKSIZE_PROCESS__ = 0x0 0x00000000 __STACKSIZE_IRQ__ = 0x0 @@ -1054,239 +491,190 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .init is too large to fit in FLASH memory segment) 0x00000288 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x00000288 0x2728 +.text 0x00000288 0x14c0 0x00000288 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs .glue_7t 0x00000000 0x0 linker stubs .text.SysCtlPeripheralValid - 0x00000288 0x390 THUMB Debug/../../obj/sysctl.o + 0x00000288 0x2a4 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralEnable - 0x00000618 0x3c THUMB Debug/../../obj/sysctl.o - 0x00000618 SysCtlPeripheralEnable + 0x0000052c 0x38 THUMB Debug/../../obj/sysctl.o + 0x0000052c SysCtlPeripheralEnable .text.SysCtlDelay - 0x00000654 0x8 THUMB Debug/../../obj/sysctl.o - 0x00000654 SysCtlDelay + 0x00000564 0x6 THUMB Debug/../../obj/sysctl.o + 0x00000564 SysCtlDelay + *fill* 0x0000056a 0x2 00 .text.SysCtlClockSet - 0x0000065c 0x1b8 THUMB Debug/../../obj/sysctl.o - 0x0000065c SysCtlClockSet + 0x0000056c 0x154 THUMB Debug/../../obj/sysctl.o + 0x0000056c SysCtlClockSet .text.SysCtlClockGet - 0x00000814 0x2d4 THUMB Debug/../../obj/sysctl.o - 0x00000814 SysCtlClockGet + 0x000006c0 0x1c0 THUMB Debug/../../obj/sysctl.o + 0x000006c0 SysCtlClockGet .text.GPIOBaseValid - 0x00000ae8 0x180 THUMB Debug/../../obj/gpio.o + 0x00000880 0x120 THUMB Debug/../../obj/gpio.o .text.GPIODirModeSet - 0x00000c68 0x60 THUMB Debug/../../obj/gpio.o - 0x00000c68 GPIODirModeSet + 0x000009a0 0x54 THUMB Debug/../../obj/gpio.o + 0x000009a0 GPIODirModeSet .text.GPIOPadConfigSet - 0x00000cc8 0x168 THUMB Debug/../../obj/gpio.o - 0x00000cc8 GPIOPadConfigSet + 0x000009f4 0x150 THUMB Debug/../../obj/gpio.o + 0x000009f4 GPIOPadConfigSet .text.GPIOPinTypeUART - 0x00000e30 0x3c THUMB Debug/../../obj/gpio.o - 0x00000e30 GPIOPinTypeUART + 0x00000b44 0x34 THUMB Debug/../../obj/gpio.o + 0x00000b44 GPIOPinTypeUART .text.FlashClear - 0x00000e6c 0x74 THUMB Debug/../../obj/flashlib.o - 0x00000e6c FlashClear + 0x00000b78 0x48 THUMB Debug/../../obj/flashlib.o + 0x00000b78 FlashClear .text.FlashProgram - 0x00000ee0 0x120 THUMB Debug/../../obj/flashlib.o - 0x00000ee0 FlashProgram + 0x00000bc0 0xdc THUMB Debug/../../obj/flashlib.o + 0x00000bc0 FlashProgram .text.UARTBaseValid - 0x00001000 0x3c THUMB Debug/../../obj/uartlib.o + 0x00000c9c 0x34 THUMB Debug/../../obj/uartlib.o .text.UARTEnable - 0x0000103c 0x30 THUMB Debug/../../obj/uartlib.o - 0x0000103c UARTEnable + 0x00000cd0 0x30 THUMB Debug/../../obj/uartlib.o + 0x00000cd0 UARTEnable .text.UARTDisable - 0x0000106c 0x38 THUMB Debug/../../obj/uartlib.o - 0x0000106c UARTDisable + 0x00000d00 0x34 THUMB Debug/../../obj/uartlib.o + 0x00000d00 UARTDisable .text.UARTConfigSetExpClk - 0x000010a4 0x130 THUMB Debug/../../obj/uartlib.o - 0x000010a4 UARTConfigSetExpClk + 0x00000d34 0xd8 THUMB Debug/../../obj/uartlib.o + 0x00000d34 UARTConfigSetExpClk .text.UARTSpaceAvail - 0x000011d4 0x28 THUMB Debug/../../obj/uartlib.o - 0x000011d4 UARTSpaceAvail + 0x00000e0c 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000e0c UARTSpaceAvail .text.UARTCharGetNonBlocking - 0x000011fc 0x2c THUMB Debug/../../obj/uartlib.o - 0x000011fc UARTCharGetNonBlocking + 0x00000e34 0x28 THUMB Debug/../../obj/uartlib.o + 0x00000e34 UARTCharGetNonBlocking .text.UARTCharPutNonBlocking - 0x00001228 0x2c THUMB Debug/../../obj/uartlib.o - 0x00001228 UARTCharPutNonBlocking - .text.main 0x00001254 0x30 THUMB Debug/../../obj/main.o - 0x00001254 main + 0x00000e5c 0x2c THUMB Debug/../../obj/uartlib.o + 0x00000e5c UARTCharPutNonBlocking + .text.startup.main + 0x00000e88 0x2c THUMB Debug/../../obj/main.o + 0x00000e88 main .text.UnusedISR - 0x00001284 0x18 THUMB Debug/../../obj/vectors.o - 0x00001284 UnusedISR + 0x00000eb4 0xc THUMB Debug/../../obj/vectors.o + 0x00000eb4 UnusedISR .text.CpuStartUserProgram - 0x0000129c 0x28 THUMB Debug/../../obj/cpu.o - 0x0000129c CpuStartUserProgram + 0x00000ec0 0x24 THUMB Debug/../../obj/cpu.o + 0x00000ec0 CpuStartUserProgram .text.CpuMemCopy - 0x000012c4 0x28 THUMB Debug/../../obj/cpu.o - 0x000012c4 CpuMemCopy + 0x00000ee4 0x20 THUMB Debug/../../obj/cpu.o + 0x00000ee4 CpuMemCopy .text.CpuReset - 0x000012ec 0xc THUMB Debug/../../obj/cpu.o - 0x000012ec CpuReset + 0x00000f04 0x4 THUMB Debug/../../obj/cpu.o + 0x00000f04 CpuReset .text.FlashGetSector - 0x000012f8 0x48 THUMB Debug/../../obj/flash.o - .text.FlashGetSectorBaseAddr - 0x00001340 0x40 THUMB Debug/../../obj/flash.o + 0x00000f08 0x38 THUMB Debug/../../obj/flash.o .text.FlashWriteBlock - 0x00001380 0x64 THUMB Debug/../../obj/flash.o - .text.FlashInitBlock - 0x000013e4 0x38 THUMB Debug/../../obj/flash.o + 0x00000f40 0x48 THUMB Debug/../../obj/flash.o .text.FlashSwitchBlock - 0x0000141c 0x4c THUMB Debug/../../obj/flash.o + 0x00000f88 0x50 THUMB Debug/../../obj/flash.o .text.FlashAddToBlock - 0x00001468 0xa0 THUMB Debug/../../obj/flash.o + 0x00000fd8 0x8a THUMB Debug/../../obj/flash.o + *fill* 0x00001062 0x2 00 .text.FlashInit - 0x00001508 0x1c THUMB Debug/../../obj/flash.o - 0x00001508 FlashInit + 0x00001064 0x18 THUMB Debug/../../obj/flash.o + 0x00001064 FlashInit .text.FlashWrite - 0x00001524 0x50 THUMB Debug/../../obj/flash.o - 0x00001524 FlashWrite + 0x0000107c 0x48 THUMB Debug/../../obj/flash.o + 0x0000107c FlashWrite .text.FlashErase - 0x00001574 0xf0 THUMB Debug/../../obj/flash.o - 0x00001574 FlashErase + 0x000010c4 0xf4 THUMB Debug/../../obj/flash.o + 0x000010c4 FlashErase .text.FlashWriteChecksum - 0x00001664 0x58 THUMB Debug/../../obj/flash.o - 0x00001664 FlashWriteChecksum + 0x000011b8 0x44 THUMB Debug/../../obj/flash.o + 0x000011b8 FlashWriteChecksum .text.FlashVerifyChecksum - 0x000016bc 0x48 THUMB Debug/../../obj/flash.o - 0x000016bc FlashVerifyChecksum + 0x000011fc 0x48 THUMB Debug/../../obj/flash.o + 0x000011fc FlashVerifyChecksum .text.FlashDone - 0x00001704 0x58 THUMB Debug/../../obj/flash.o - 0x00001704 FlashDone - .text.NvmInit 0x0000175c 0xc THUMB Debug/../../obj/nvm.o - 0x0000175c NvmInit + 0x00001244 0x34 THUMB Debug/../../obj/flash.o + 0x00001244 FlashDone + .text.NvmInit 0x00001278 0x4 THUMB Debug/../../obj/nvm.o + 0x00001278 NvmInit .text.NvmWrite - 0x00001768 0xc THUMB Debug/../../obj/nvm.o - 0x00001768 NvmWrite + 0x0000127c 0x4 THUMB Debug/../../obj/nvm.o + 0x0000127c NvmWrite .text.NvmErase - 0x00001774 0xc THUMB Debug/../../obj/nvm.o - 0x00001774 NvmErase + 0x00001280 0x4 THUMB Debug/../../obj/nvm.o + 0x00001280 NvmErase .text.NvmVerifyChecksum - 0x00001780 0xc THUMB Debug/../../obj/nvm.o - 0x00001780 NvmVerifyChecksum - .text.NvmDone 0x0000178c 0x18 THUMB Debug/../../obj/nvm.o - 0x0000178c NvmDone - .text.TimerReset - 0x000017a4 0x10 THUMB Debug/../../obj/timer.o - 0x000017a4 TimerReset - .text.TimerUpdate - 0x000017b4 0x24 THUMB Debug/../../obj/timer.o - 0x000017b4 TimerUpdate - .text.TimerSet - 0x000017d8 0xc THUMB Debug/../../obj/timer.o - 0x000017d8 TimerSet + 0x00001284 0x4 THUMB Debug/../../obj/nvm.o + 0x00001284 NvmVerifyChecksum + .text.NvmDone 0x00001288 0x14 THUMB Debug/../../obj/nvm.o + 0x00001288 NvmDone .text.TimerInit - 0x000017e4 0x28 THUMB Debug/../../obj/timer.o - 0x000017e4 TimerInit + 0x0000129c 0x20 THUMB Debug/../../obj/timer.o + 0x0000129c TimerInit + .text.TimerReset + 0x000012bc 0xc THUMB Debug/../../obj/timer.o + 0x000012bc TimerReset + .text.TimerUpdate + 0x000012c8 0x1c THUMB Debug/../../obj/timer.o + 0x000012c8 TimerUpdate .text.TimerGet - 0x0000180c 0x14 THUMB Debug/../../obj/timer.o - 0x0000180c TimerGet - .text.UartReceiveByte - 0x00001820 0x20 THUMB Debug/../../obj/uart.o - .text.UartTransmitByte - 0x00001840 0x38 THUMB Debug/../../obj/uart.o + 0x000012e4 0x14 THUMB Debug/../../obj/timer.o + 0x000012e4 TimerGet .text.UartInit - 0x00001878 0x2c THUMB Debug/../../obj/uart.o - 0x00001878 UartInit + 0x000012f8 0x28 THUMB Debug/../../obj/uart.o + 0x000012f8 UartInit .text.UartTransmitPacket - 0x000018a4 0x70 THUMB Debug/../../obj/uart.o - 0x000018a4 UartTransmitPacket + 0x00001320 0x74 THUMB Debug/../../obj/uart.o + 0x00001320 UartTransmitPacket .text.UartReceivePacket - 0x00001914 0xb0 THUMB Debug/../../obj/uart.o - 0x00001914 UartReceivePacket + 0x00001394 0x70 THUMB Debug/../../obj/uart.o + 0x00001394 UartReceivePacket .text.AssertFailure - 0x000019c4 0x1c THUMB Debug/../../obj/assert.o - 0x000019c4 AssertFailure + 0x00001404 0x18 THUMB Debug/../../obj/assert.o + 0x00001404 AssertFailure .text.BackDoorCheck - 0x000019e0 0x3c THUMB Debug/../../obj/backdoor.o - 0x000019e0 BackDoorCheck + 0x0000141c 0x30 THUMB Debug/../../obj/backdoor.o + 0x0000141c BackDoorCheck .text.BackDoorInit - 0x00001a1c 0x1c THUMB Debug/../../obj/backdoor.o - 0x00001a1c BackDoorInit + 0x0000144c 0x18 THUMB Debug/../../obj/backdoor.o + 0x0000144c BackDoorInit .text.BootInit - 0x00001a38 0x18 THUMB Debug/../../obj/boot.o - 0x00001a38 BootInit + 0x00001464 0x16 THUMB Debug/../../obj/boot.o + 0x00001464 BootInit .text.BootTask - 0x00001a50 0x14 THUMB Debug/../../obj/boot.o - 0x00001a50 BootTask - .text.ComInit 0x00001a64 0x34 THUMB Debug/../../obj/com.o - 0x00001a64 ComInit - .text.ComTask 0x00001a98 0x24 THUMB Debug/../../obj/com.o - 0x00001a98 ComTask - .text.ComFree 0x00001abc 0x4 THUMB Debug/../../obj/com.o - 0x00001abc ComFree + 0x0000147a 0x12 THUMB Debug/../../obj/boot.o + 0x0000147a BootTask + .text.ComInit 0x0000148c 0x2c THUMB Debug/../../obj/com.o + 0x0000148c ComInit + .text.ComTask 0x000014b8 0x20 THUMB Debug/../../obj/com.o + 0x000014b8 ComTask + .text.ComFree 0x000014d8 0x2 THUMB Debug/../../obj/com.o + 0x000014d8 ComFree .text.ComTransmitPacket - 0x00001ac0 0x10 THUMB Debug/../../obj/com.o - 0x00001ac0 ComTransmitPacket + 0x000014da 0x10 THUMB Debug/../../obj/com.o + 0x000014da ComTransmitPacket + *fill* 0x000014ea 0x2 00 .text.ComSetConnectEntryState - 0x00001ad0 0x10 THUMB Debug/../../obj/com.o - 0x00001ad0 ComSetConnectEntryState + 0x000014ec 0xc THUMB Debug/../../obj/com.o + 0x000014ec ComSetConnectEntryState .text.ComIsConnected - 0x00001ae0 0xc THUMB Debug/../../obj/com.o - 0x00001ae0 ComIsConnected - .text.CopInit 0x00001aec 0x4 THUMB Debug/../../obj/cop.o - 0x00001aec CopInit + 0x000014f8 0x4 THUMB Debug/../../obj/com.o + 0x000014f8 ComIsConnected + .text.CopInit 0x000014fc 0x2 THUMB Debug/../../obj/cop.o + 0x000014fc CopInit .text.CopService - 0x00001af0 0x4 THUMB Debug/../../obj/cop.o - 0x00001af0 CopService - .text.XcpProtectResources - 0x00001af4 0x10 THUMB Debug/../../obj/xcp.o + 0x000014fe 0x2 THUMB Debug/../../obj/cop.o + 0x000014fe CopService .text.XcpSetCtoError - 0x00001b04 0x1c THUMB Debug/../../obj/xcp.o - .text.XcpInit 0x00001b20 0x20 THUMB Debug/../../obj/xcp.o - 0x00001b20 XcpInit + 0x00001500 0x14 THUMB Debug/../../obj/xcp.o + .text.XcpInit 0x00001514 0x1c THUMB Debug/../../obj/xcp.o + 0x00001514 XcpInit .text.XcpIsConnected - 0x00001b40 0x14 THUMB Debug/../../obj/xcp.o - 0x00001b40 XcpIsConnected + 0x00001530 0x10 THUMB Debug/../../obj/xcp.o + 0x00001530 XcpIsConnected .text.XcpPacketTransmitted - 0x00001b54 0x14 THUMB Debug/../../obj/xcp.o - 0x00001b54 XcpPacketTransmitted + 0x00001540 0x10 THUMB Debug/../../obj/xcp.o + 0x00001540 XcpPacketTransmitted .text.XcpPacketReceived - 0x00001b68 0x3c8 THUMB Debug/../../obj/xcp.o - 0x00001b68 XcpPacketReceived - .text.libc.__vfprintf_int_nwp - 0x00001f30 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x00001f30 __vfprintf_int_nwp - .text.libc.__ungetc - 0x00002324 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc.rd_int - 0x00002344 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .text.libc.__vfscanf_int - 0x000024c0 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x000024c0 __vfscanf_int - .text.libc.__getc - 0x000028ac 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000028ac __getc - .text.libc.__putc - 0x000028d4 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000028d4 __putc - .text.libc.isupper - 0x0000290c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000290c isupper - .text.libc.islower - 0x0000291c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000291c islower - .text.libc.isdigit - 0x0000292c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000292c isdigit - .text.libc.__digit - 0x0000293c 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000293c __digit - .text.libc.isspace - 0x00002978 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002978 isspace - .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x00002990 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x00002990 __do_debug_operation_bkpt - .text.libc.__debug_io_lock - 0x000029a8 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000029a8 __debug_io_lock - .text.libc.__debug_io_unlock - 0x000029ac 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000029ac __debug_io_unlock - 0x000029b0 __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x000029b0 __text_load_end__ = __text_end__ + 0x00001550 0x1f8 THUMB Debug/../../obj/xcp.o + 0x00001550 XcpPacketReceived + 0x00001748 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00001748 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1294,87 +682,73 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .text is too large to fit in FLASH memory segment) - 0x000029b0 __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00001748 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x000029b0 0x0 - 0x000029b0 __dtors_start__ = . +.dtors 0x00001748 0x0 + 0x00001748 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x000029b0 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x000029b0 __dtors_load_end__ = __dtors_end__ + 0x00001748 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00001748 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .dtors is too large to fit in FLASH memory segment) - 0x000029b0 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00001748 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x000029b0 0x0 - 0x000029b0 __ctors_start__ = . +.ctors 0x00001748 0x0 + 0x00001748 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x000029b0 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x000029b0 __ctors_load_end__ = __ctors_end__ + 0x00001748 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00001748 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ctors is too large to fit in FLASH memory segment) - 0x000029b0 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00001748 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x000029b0 0x440 - 0x000029b0 __rodata_start__ = . +.rodata 0x00001748 0x425 + 0x00001748 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) .rodata.g_pulXtals - 0x000029b0 0x5c THUMB Debug/../../obj/sysctl.o - .rodata.str1.4 - 0x00002a0c 0x71 THUMB Debug/../../obj/sysctl.o - 0x74 (size before relaxing) - *fill* 0x00002a7d 0x3 00 + 0x00001748 0x5c THUMB Debug/../../obj/sysctl.o + .rodata.str1.1 + 0x000017a4 0x71 THUMB Debug/../../obj/sysctl.o + *fill* 0x00001815 0x3 00 .rodata.g_pulRCGCRegs - 0x00002a80 0xc THUMB Debug/../../obj/sysctl.o - .rodata.str1.4 - 0x00002a8c 0x6f THUMB Debug/../../obj/gpio.o - 0x70 (size before relaxing) - *fill* 0x00002afb 0x1 00 - .rodata.str1.4 - 0x00002afc 0x73 THUMB Debug/../../obj/flashlib.o - 0x74 (size before relaxing) - *fill* 0x00002b6f 0x1 00 - .rodata.str1.4 - 0x00002b70 0x72 THUMB Debug/../../obj/uartlib.o - 0x74 (size before relaxing) - *fill* 0x00002be2 0x2 00 - .rodata.str1.4 - 0x00002be4 0x8b THUMB Debug/../../obj/vectors.o - 0x8c (size before relaxing) - *fill* 0x00002c6f 0x1 00 + 0x00001818 0xc THUMB Debug/../../obj/sysctl.o + .rodata.str1.1 + 0x00001824 0x6f THUMB Debug/../../obj/gpio.o + .rodata.str1.1 + 0x00001893 0x73 THUMB Debug/../../obj/flashlib.o + .rodata.str1.1 + 0x00001906 0x72 THUMB Debug/../../obj/uartlib.o + .rodata.str1.1 + 0x00001978 0x8b THUMB Debug/../../obj/vectors.o + *fill* 0x00001a03 0x1 00 .rodata.flashLayout - 0x00002c70 0xd8 THUMB Debug/../../obj/flash.o - .rodata.str1.4 - 0x00002d48 0x80 THUMB Debug/../../obj/uart.o + 0x00001a04 0xe4 THUMB Debug/../../obj/flash.o + .rodata.str1.1 + 0x00001ae8 0x7d THUMB Debug/../../obj/uart.o .rodata.xcpStationId - 0x00002dc8 0x8 THUMB Debug/../../obj/xcp.o - .rodata.libc.__hex_lc - 0x00002dd0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002dd0 __hex_lc - .rodata.libc.__hex_uc - 0x00002de0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00002de0 __hex_uc - 0x00002df0 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x00002df0 __rodata_load_end__ = __rodata_end__ + 0x00001b65 0x8 THUMB Debug/../../obj/xcp.o + 0x00001b6d __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x00001b6d __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .rodata is too large to fit in FLASH memory segment) - 0x00002df0 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x00001b70 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x00002df0 0x0 - 0x00002df0 __ARM.exidx_start__ = . - 0x00002df0 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x00001b70 0x0 + 0x00001b70 __ARM.exidx_start__ = . + 0x00001b70 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x00002df0 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x00002df0 __exidx_end = __ARM.exidx_end__ - 0x00002df0 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x00001b70 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x00001b70 __exidx_end = __ARM.exidx_end__ + 0x00001b70 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x00002df0 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x00001b70 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x00002df0 +.fast 0x20000000 0x0 load address 0x00001b70 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x00002df0 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x00001b70 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x40000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -1383,13 +757,13 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __SRAM_segment_start__) && (__fast_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .fast_run is too large to fit in SRAM memory segment) - 0x00002df0 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x00001b70 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x0 load address 0x00002df0 +.data 0x20000000 0x0 load address 0x00001b70 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x20000000 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x00002df0 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x00001b70 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x40000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x20000000 0x0 @@ -1400,7 +774,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__data_run_end__ >= __SRAM_segment_start__) && (__data_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .data_run is too large to fit in SRAM memory segment) 0x20000000 __bss_load_start__ = ALIGN (__data_run_end__, 0x4) -.bss 0x20000000 0x4f0 +.bss 0x20000000 0x4e8 0x20000000 __bss_start__ = . *(.bss .bss.* .gnu.linkonce.b.*) .bss.bootBlockInfo @@ -1409,94 +783,90 @@ Linker script and memory map 0x20000204 0x204 THUMB Debug/../../obj/flash.o .bss.millisecond_counter 0x20000408 0x2 THUMB Debug/../../obj/timer.o - *fill* 0x2000040a 0x2 00 .bss.xcpCtoReqPacket.1061 - 0x2000040c 0x44 THUMB Debug/../../obj/uart.o + 0x2000040a 0x41 THUMB Debug/../../obj/uart.o .bss.xcpCtoRxLength.1062 - 0x20000450 0x1 THUMB Debug/../../obj/uart.o + 0x2000044b 0x1 THUMB Debug/../../obj/uart.o .bss.xcpCtoRxInProgress.1063 - 0x20000451 0x1 THUMB Debug/../../obj/uart.o - *fill* 0x20000452 0x2 00 + 0x2000044c 0x1 THUMB Debug/../../obj/uart.o + *fill* 0x2000044d 0x3 00 .bss.assert_failure_file - 0x20000454 0x4 THUMB Debug/../../obj/assert.o + 0x20000450 0x4 THUMB Debug/../../obj/assert.o .bss.assert_failure_line - 0x20000458 0x4 THUMB Debug/../../obj/assert.o + 0x20000454 0x4 THUMB Debug/../../obj/assert.o .bss.backdoorOpen - 0x2000045c 0x1 THUMB Debug/../../obj/backdoor.o + 0x20000458 0x1 THUMB Debug/../../obj/backdoor.o .bss.comEntryStateConnect - 0x2000045d 0x1 THUMB Debug/../../obj/com.o - *fill* 0x2000045e 0x2 00 + 0x20000459 0x1 THUMB Debug/../../obj/com.o .bss.xcpCtoReqPacket.859 - 0x20000460 0x40 THUMB Debug/../../obj/com.o - .bss.xcpInfo 0x200004a0 0x4c THUMB Debug/../../obj/xcp.o - .bss.libc.__format_extender - 0x200004ec 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x200004ec __format_extender + 0x2000045a 0x40 THUMB Debug/../../obj/com.o + *fill* 0x2000049a 0x2 00 + .bss.xcpInfo 0x2000049c 0x4c THUMB Debug/../../obj/xcp.o *(COMMON) - 0x200004f0 __bss_end__ = (__bss_start__ + SIZEOF (.bss)) - 0x200004f0 __bss_load_end__ = __bss_end__ + 0x200004e8 __bss_end__ = (__bss_start__ + SIZEOF (.bss)) + 0x200004e8 __bss_load_end__ = __bss_end__ 0x00000001 . = ASSERT (((__bss_end__ >= __SRAM_segment_start__) && (__bss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .bss is too large to fit in SRAM memory segment) - 0x200004f0 __non_init_load_start__ = ALIGN (__bss_end__, 0x4) + 0x200004e8 __non_init_load_start__ = ALIGN (__bss_end__, 0x4) -.non_init 0x200004f0 0x0 - 0x200004f0 __non_init_start__ = . +.non_init 0x200004e8 0x0 + 0x200004e8 __non_init_start__ = . *(.non_init .non_init.*) - 0x200004f0 __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) - 0x200004f0 __non_init_load_end__ = __non_init_end__ + 0x200004e8 __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) + 0x200004e8 __non_init_load_end__ = __non_init_end__ 0x00000001 . = ASSERT (((__non_init_end__ >= __SRAM_segment_start__) && (__non_init_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .non_init is too large to fit in SRAM memory segment) - 0x200004f0 __heap_load_start__ = ALIGN (__non_init_end__, 0x4) + 0x200004e8 __heap_load_start__ = ALIGN (__non_init_end__, 0x4) -.heap 0x200004f0 0x80 - 0x200004f0 __heap_start__ = . +.heap 0x200004e8 0x80 + 0x200004e8 __heap_start__ = . *(.heap .heap.*) - 0x20000570 . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) - *fill* 0x200004f0 0x80 00 - 0x20000570 __heap_end__ = (__heap_start__ + SIZEOF (.heap)) - 0x20000570 __heap_load_end__ = __heap_end__ + 0x20000568 . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) + *fill* 0x200004e8 0x80 00 + 0x20000568 __heap_end__ = (__heap_start__ + SIZEOF (.heap)) + 0x20000568 __heap_load_end__ = __heap_end__ 0x00000001 . = ASSERT (((__heap_end__ >= __SRAM_segment_start__) && (__heap_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .heap is too large to fit in SRAM memory segment) - 0x20000570 __stack_load_start__ = ALIGN (__heap_end__, 0x4) + 0x20000568 __stack_load_start__ = ALIGN (__heap_end__, 0x4) -.stack 0x20000570 0x100 - 0x20000570 __stack_start__ = . +.stack 0x20000568 0x100 + 0x20000568 __stack_start__ = . *(.stack .stack.*) - 0x20000670 . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) - *fill* 0x20000570 0x100 00 - 0x20000670 __stack_end__ = (__stack_start__ + SIZEOF (.stack)) - 0x20000670 __stack_load_end__ = __stack_end__ + 0x20000668 . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) + *fill* 0x20000568 0x100 00 + 0x20000668 __stack_end__ = (__stack_start__ + SIZEOF (.stack)) + 0x20000668 __stack_load_end__ = __stack_end__ 0x00000001 . = ASSERT (((__stack_end__ >= __SRAM_segment_start__) && (__stack_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .stack is too large to fit in SRAM memory segment) - 0x20000670 __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) + 0x20000668 __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) -.stack_process 0x20000670 0x0 - 0x20000670 __stack_process_start__ = . +.stack_process 0x20000668 0x0 + 0x20000668 __stack_process_start__ = . *(.stack_process .stack_process.*) - 0x20000670 . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) - 0x20000670 __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) - 0x20000670 __stack_process_load_end__ = __stack_process_end__ + 0x20000668 . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) + 0x20000668 __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) + 0x20000668 __stack_process_load_end__ = __stack_process_end__ 0x00000001 . = ASSERT (((__stack_process_end__ >= __SRAM_segment_start__) && (__stack_process_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .stack_process is too large to fit in SRAM memory segment) - 0x20000670 __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) + 0x20000668 __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) -.tbss 0x20000670 0x0 - 0x20000670 __tbss_start__ = . +.tbss 0x20000668 0x0 + 0x20000668 __tbss_start__ = . *(.tbss .tbss.*) - 0x20000670 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) - 0x20000670 __tbss_load_end__ = __tbss_end__ + 0x20000668 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) + 0x20000668 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __SRAM_segment_start__) && (__tbss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tbss is too large to fit in SRAM memory segment) - 0x00002df0 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x00001b70 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x20000670 0x0 load address 0x00002df0 - 0x20000670 __tdata_start__ = . +.tdata 0x20000668 0x0 load address 0x00001b70 + 0x20000668 __tdata_start__ = . *(.tdata .tdata.*) - 0x20000670 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x00002df0 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x00002df0 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x20000668 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) + 0x00001b70 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x00001b70 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x40000))), error: .tdata is too large to fit in FLASH memory segment) -.tdata_run 0x20000670 0x0 - 0x20000670 __tdata_run_start__ = . - 0x20000670 . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) - 0x20000670 __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) - 0x20000670 __tdata_run_load_end__ = __tdata_run_end__ - 0x20000670 __SRAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) +.tdata_run 0x20000668 0x0 + 0x20000668 __tdata_run_start__ = . + 0x20000668 . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) + 0x20000668 __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) + 0x20000668 __tdata_run_load_end__ = __tdata_run_end__ + 0x20000668 __SRAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) 0x00000001 . = ASSERT (((__tdata_run_end__ >= __SRAM_segment_start__) && (__tdata_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tdata_run is too large to fit in SRAM memory segment) START GROUP LOAD THUMB Debug/../../obj/sysctl.o @@ -1522,127 +892,101 @@ LOAD THUMB Debug/../../obj/boot.o LOAD THUMB Debug/../../obj/com.o LOAD THUMB Debug/../../obj/cop.o LOAD THUMB Debug/../../obj/xcp.o -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libcpp_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_targetio_impl_v7m_t_le.a -LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a END GROUP OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/../bin/openbtl_ek_lm3s8962.elf elf32-littlearm) -.debug_frame 0x00000000 0x36e4 - .debug_frame 0x00000000 0x414 THUMB Debug/../../obj/sysctl.o - .debug_frame 0x00000414 0x1a4 THUMB Debug/../../obj/interrupt.o - .debug_frame 0x000005b8 0x70 THUMB Debug/../../obj/cpulib.o - .debug_frame 0x00000628 0x434 THUMB Debug/../../obj/gpio.o - .debug_frame 0x00000a5c 0x184 THUMB Debug/../../obj/flashlib.o - .debug_frame 0x00000be0 0x4d8 THUMB Debug/../../obj/uartlib.o - .debug_frame 0x000010b8 0x2f4 THUMB Debug/../../obj/canlib.o - .debug_frame 0x000013ac 0x2c THUMB Debug/../../obj/main.o - .debug_frame 0x000013d8 0x2c THUMB Debug/../../obj/vectors.o - .debug_frame 0x00001404 0x68 THUMB Debug/../../obj/cpu.o - .debug_frame 0x0000146c 0x180 THUMB Debug/../../obj/flash.o - .debug_frame 0x000015ec 0x9c THUMB Debug/../../obj/nvm.o - .debug_frame 0x00001688 0x78 THUMB Debug/../../obj/timer.o - .debug_frame 0x00001700 0xa4 THUMB Debug/../../obj/uart.o - .debug_frame 0x000017a4 0x2c THUMB Debug/../../obj/assert.o - .debug_frame 0x000017d0 0x48 THUMB Debug/../../obj/backdoor.o - .debug_frame 0x00001818 0x48 THUMB Debug/../../obj/boot.o - .debug_frame 0x00001860 0xc4 THUMB Debug/../../obj/com.o - .debug_frame 0x00001924 0x30 THUMB Debug/../../obj/cop.o - .debug_frame 0x00001954 0x80 THUMB Debug/../../obj/xcp.o - .debug_frame 0x000019d4 0x40 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_frame 0x00001a14 0x88 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_frame 0x00001a9c 0x11a8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_frame 0x00002c44 0x100 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .debug_frame 0x00002d44 0x260 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .debug_frame 0x00002fa4 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .debug_frame 0x00003044 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .debug_frame 0x000030e4 0x600 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) +.debug_frame 0x00000000 0x18c0 + .debug_frame 0x00000000 0x404 THUMB Debug/../../obj/sysctl.o + .debug_frame 0x00000404 0x18c THUMB Debug/../../obj/interrupt.o + .debug_frame 0x00000590 0x70 THUMB Debug/../../obj/cpulib.o + .debug_frame 0x00000600 0x434 THUMB Debug/../../obj/gpio.o + .debug_frame 0x00000a34 0x18c THUMB Debug/../../obj/flashlib.o + .debug_frame 0x00000bc0 0x4d8 THUMB Debug/../../obj/uartlib.o + .debug_frame 0x00001098 0x2ec THUMB Debug/../../obj/canlib.o + .debug_frame 0x00001384 0x2c THUMB Debug/../../obj/main.o + .debug_frame 0x000013b0 0x20 THUMB Debug/../../obj/vectors.o + .debug_frame 0x000013d0 0x5c THUMB Debug/../../obj/cpu.o + .debug_frame 0x0000142c 0x13c THUMB Debug/../../obj/flash.o + .debug_frame 0x00001568 0x6c THUMB Debug/../../obj/nvm.o + .debug_frame 0x000015d4 0x6c THUMB Debug/../../obj/timer.o + .debug_frame 0x00001640 0x70 THUMB Debug/../../obj/uart.o + .debug_frame 0x000016b0 0x2c THUMB Debug/../../obj/assert.o + .debug_frame 0x000016dc 0x48 THUMB Debug/../../obj/backdoor.o + .debug_frame 0x00001724 0x48 THUMB Debug/../../obj/boot.o + .debug_frame 0x0000176c 0xb4 THUMB Debug/../../obj/com.o + .debug_frame 0x00001820 0x30 THUMB Debug/../../obj/cop.o + .debug_frame 0x00001850 0x70 THUMB Debug/../../obj/xcp.o -.debug_info 0x00000000 0x5490 - .debug_info 0x00000000 0x849 THUMB Debug/../../obj/sysctl.o - .debug_info 0x00000849 0x37b THUMB Debug/../../obj/interrupt.o - .debug_info 0x00000bc4 0x110 THUMB Debug/../../obj/cpulib.o - .debug_info 0x00000cd4 0x973 THUMB Debug/../../obj/gpio.o - .debug_info 0x00001647 0x41e THUMB Debug/../../obj/flashlib.o - .debug_info 0x00001a65 0x9ad THUMB Debug/../../obj/uartlib.o - .debug_info 0x00002412 0xa64 THUMB Debug/../../obj/canlib.o - .debug_info 0x00002e76 0x5a THUMB Debug/../../obj/hooks.o - .debug_info 0x00002ed0 0x90 THUMB Debug/../../obj/main.o - .debug_info 0x00002f60 0x107 THUMB Debug/../../obj/cstart.o - .debug_info 0x00003067 0xf1 THUMB Debug/../../obj/vectors.o - .debug_info 0x00003158 0x13a THUMB Debug/../../obj/cpu.o - .debug_info 0x00003292 0x5a3 THUMB Debug/../../obj/flash.o - .debug_info 0x00003835 0x15e THUMB Debug/../../obj/nvm.o - .debug_info 0x00003993 0x144 THUMB Debug/../../obj/timer.o - .debug_info 0x00003ad7 0x1ca THUMB Debug/../../obj/uart.o - .debug_info 0x00003ca1 0x5a THUMB Debug/../../obj/can.o - .debug_info 0x00003cfb 0xe4 THUMB Debug/../../obj/assert.o - .debug_info 0x00003ddf 0xa4 THUMB Debug/../../obj/backdoor.o - .debug_info 0x00003e83 0x88 THUMB Debug/../../obj/boot.o - .debug_info 0x00003f0b 0x1b4 THUMB Debug/../../obj/com.o - .debug_info 0x000040bf 0x86 THUMB Debug/../../obj/cop.o - .debug_info 0x00004145 0x60b THUMB Debug/../../obj/xcp.o - .debug_info 0x00004750 0x36 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_info 0x00004786 0x65 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_info 0x000047eb 0xbd8 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_info 0x000053c3 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_info 0x00000000 0x48af + .debug_info 0x00000000 0x844 THUMB Debug/../../obj/sysctl.o + .debug_info 0x00000844 0x379 THUMB Debug/../../obj/interrupt.o + .debug_info 0x00000bbd 0x110 THUMB Debug/../../obj/cpulib.o + .debug_info 0x00000ccd 0x96b THUMB Debug/../../obj/gpio.o + .debug_info 0x00001638 0x422 THUMB Debug/../../obj/flashlib.o + .debug_info 0x00001a5a 0x9ad THUMB Debug/../../obj/uartlib.o + .debug_info 0x00002407 0xa67 THUMB Debug/../../obj/canlib.o + .debug_info 0x00002e6e 0x5a THUMB Debug/../../obj/hooks.o + .debug_info 0x00002ec8 0x90 THUMB Debug/../../obj/main.o + .debug_info 0x00002f58 0x107 THUMB Debug/../../obj/cstart.o + .debug_info 0x0000305f 0xf0 THUMB Debug/../../obj/vectors.o + .debug_info 0x0000314f 0x139 THUMB Debug/../../obj/cpu.o + .debug_info 0x00003288 0x666 THUMB Debug/../../obj/flash.o + .debug_info 0x000038ee 0x15a THUMB Debug/../../obj/nvm.o + .debug_info 0x00003a48 0x183 THUMB Debug/../../obj/timer.o + .debug_info 0x00003bcb 0x26a THUMB Debug/../../obj/uart.o + .debug_info 0x00003e35 0x5a THUMB Debug/../../obj/can.o + .debug_info 0x00003e8f 0xe4 THUMB Debug/../../obj/assert.o + .debug_info 0x00003f73 0xa4 THUMB Debug/../../obj/backdoor.o + .debug_info 0x00004017 0x88 THUMB Debug/../../obj/boot.o + .debug_info 0x0000409f 0x1b3 THUMB Debug/../../obj/com.o + .debug_info 0x00004252 0x86 THUMB Debug/../../obj/cop.o + .debug_info 0x000042d8 0x5d7 THUMB Debug/../../obj/xcp.o -.debug_abbrev 0x00000000 0x1528 - .debug_abbrev 0x00000000 0x198 THUMB Debug/../../obj/sysctl.o - .debug_abbrev 0x00000198 0x15b THUMB Debug/../../obj/interrupt.o - .debug_abbrev 0x000002f3 0xa8 THUMB Debug/../../obj/cpulib.o - .debug_abbrev 0x0000039b 0x118 THUMB Debug/../../obj/gpio.o - .debug_abbrev 0x000004b3 0x1a3 THUMB Debug/../../obj/flashlib.o - .debug_abbrev 0x00000656 0x11e THUMB Debug/../../obj/uartlib.o - .debug_abbrev 0x00000774 0x1e2 THUMB Debug/../../obj/canlib.o - .debug_abbrev 0x00000956 0x28 THUMB Debug/../../obj/hooks.o - .debug_abbrev 0x0000097e 0x5f THUMB Debug/../../obj/main.o - .debug_abbrev 0x000009dd 0x14 THUMB Debug/../../obj/cstart.o - .debug_abbrev 0x000009f1 0xbe THUMB Debug/../../obj/vectors.o - .debug_abbrev 0x00000aaf 0xaf THUMB Debug/../../obj/cpu.o - .debug_abbrev 0x00000b5e 0x21c THUMB Debug/../../obj/flash.o - .debug_abbrev 0x00000d7a 0xa3 THUMB Debug/../../obj/nvm.o - .debug_abbrev 0x00000e1d 0xdf THUMB Debug/../../obj/timer.o - .debug_abbrev 0x00000efc 0xe8 THUMB Debug/../../obj/uart.o - .debug_abbrev 0x00000fe4 0x28 THUMB Debug/../../obj/can.o - .debug_abbrev 0x0000100c 0x7c THUMB Debug/../../obj/assert.o - .debug_abbrev 0x00001088 0x5b THUMB Debug/../../obj/backdoor.o - .debug_abbrev 0x000010e3 0x3f THUMB Debug/../../obj/boot.o - .debug_abbrev 0x00001122 0xe0 THUMB Debug/../../obj/com.o - .debug_abbrev 0x00001202 0x3f THUMB Debug/../../obj/cop.o - .debug_abbrev 0x00001241 0x1ba THUMB Debug/../../obj/xcp.o - .debug_abbrev 0x000013fb 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_abbrev 0x00001420 0x43 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_abbrev 0x00001463 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_abbrev 0x00001503 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_abbrev 0x00000000 0x155f + .debug_abbrev 0x00000000 0x1a5 THUMB Debug/../../obj/sysctl.o + .debug_abbrev 0x000001a5 0x172 THUMB Debug/../../obj/interrupt.o + .debug_abbrev 0x00000317 0xa8 THUMB Debug/../../obj/cpulib.o + .debug_abbrev 0x000003bf 0x125 THUMB Debug/../../obj/gpio.o + .debug_abbrev 0x000004e4 0x1a3 THUMB Debug/../../obj/flashlib.o + .debug_abbrev 0x00000687 0x11e THUMB Debug/../../obj/uartlib.o + .debug_abbrev 0x000007a5 0x1fa THUMB Debug/../../obj/canlib.o + .debug_abbrev 0x0000099f 0x28 THUMB Debug/../../obj/hooks.o + .debug_abbrev 0x000009c7 0x5f THUMB Debug/../../obj/main.o + .debug_abbrev 0x00000a26 0x14 THUMB Debug/../../obj/cstart.o + .debug_abbrev 0x00000a3a 0xbe THUMB Debug/../../obj/vectors.o + .debug_abbrev 0x00000af8 0xaf THUMB Debug/../../obj/cpu.o + .debug_abbrev 0x00000ba7 0x23d THUMB Debug/../../obj/flash.o + .debug_abbrev 0x00000de4 0xba THUMB Debug/../../obj/nvm.o + .debug_abbrev 0x00000e9e 0x138 THUMB Debug/../../obj/timer.o + .debug_abbrev 0x00000fd6 0x161 THUMB Debug/../../obj/uart.o + .debug_abbrev 0x00001137 0x28 THUMB Debug/../../obj/can.o + .debug_abbrev 0x0000115f 0x7c THUMB Debug/../../obj/assert.o + .debug_abbrev 0x000011db 0x5b THUMB Debug/../../obj/backdoor.o + .debug_abbrev 0x00001236 0x3f THUMB Debug/../../obj/boot.o + .debug_abbrev 0x00001275 0xe0 THUMB Debug/../../obj/com.o + .debug_abbrev 0x00001355 0x3f THUMB Debug/../../obj/cop.o + .debug_abbrev 0x00001394 0x1cb THUMB Debug/../../obj/xcp.o -.debug_loc 0x00000000 0x5a7b - .debug_loc 0x00000000 0x8eb THUMB Debug/../../obj/sysctl.o - .debug_loc 0x000008eb 0x3ac THUMB Debug/../../obj/interrupt.o - .debug_loc 0x00000c97 0xe93 THUMB Debug/../../obj/gpio.o - .debug_loc 0x00001b2a 0x3b0 THUMB Debug/../../obj/flashlib.o - .debug_loc 0x00001eda 0xd72 THUMB Debug/../../obj/uartlib.o - .debug_loc 0x00002c4c 0x1028 THUMB Debug/../../obj/canlib.o - .debug_loc 0x00003c74 0x20 THUMB Debug/../../obj/main.o - .debug_loc 0x00003c94 0x20 THUMB Debug/../../obj/vectors.o - .debug_loc 0x00003cb4 0x10f THUMB Debug/../../obj/cpu.o - .debug_loc 0x00003dc3 0x6c1 THUMB Debug/../../obj/flash.o - .debug_loc 0x00004484 0xff THUMB Debug/../../obj/nvm.o - .debug_loc 0x00004583 0x40 THUMB Debug/../../obj/timer.o - .debug_loc 0x000045c3 0x168 THUMB Debug/../../obj/uart.o - .debug_loc 0x0000472b 0x46 THUMB Debug/../../obj/assert.o - .debug_loc 0x00004771 0x40 THUMB Debug/../../obj/backdoor.o - .debug_loc 0x000047b1 0x40 THUMB Debug/../../obj/boot.o - .debug_loc 0x000047f1 0xb2 THUMB Debug/../../obj/com.o - .debug_loc 0x000048a3 0x1a7 THUMB Debug/../../obj/xcp.o - .debug_loc 0x00004a4a 0x2c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_loc 0x00004a76 0x6c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_loc 0x00004ae2 0xf99 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) +.debug_loc 0x00000000 0x4773 + .debug_loc 0x00000000 0x81a THUMB Debug/../../obj/sysctl.o + .debug_loc 0x0000081a 0x354 THUMB Debug/../../obj/interrupt.o + .debug_loc 0x00000b6e 0xe3e THUMB Debug/../../obj/gpio.o + .debug_loc 0x000019ac 0x431 THUMB Debug/../../obj/flashlib.o + .debug_loc 0x00001ddd 0xd99 THUMB Debug/../../obj/uartlib.o + .debug_loc 0x00002b76 0xfae THUMB Debug/../../obj/canlib.o + .debug_loc 0x00003b24 0x20 THUMB Debug/../../obj/main.o + .debug_loc 0x00003b44 0xbf THUMB Debug/../../obj/cpu.o + .debug_loc 0x00003c03 0x680 THUMB Debug/../../obj/flash.o + .debug_loc 0x00004283 0x7f THUMB Debug/../../obj/nvm.o + .debug_loc 0x00004302 0x20 THUMB Debug/../../obj/timer.o + .debug_loc 0x00004322 0x190 THUMB Debug/../../obj/uart.o + .debug_loc 0x000044b2 0x46 THUMB Debug/../../obj/assert.o + .debug_loc 0x000044f8 0x40 THUMB Debug/../../obj/backdoor.o + .debug_loc 0x00004538 0x40 THUMB Debug/../../obj/boot.o + .debug_loc 0x00004578 0x86 THUMB Debug/../../obj/com.o + .debug_loc 0x000045fe 0x175 THUMB Debug/../../obj/xcp.o -.debug_aranges 0x00000000 0xec0 +.debug_aranges 0x00000000 0x918 .debug_aranges 0x00000000 0x178 THUMB Debug/../../obj/sysctl.o .debug_aranges @@ -1666,90 +1010,74 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossw .debug_aranges 0x000006a0 0x30 THUMB Debug/../../obj/cpu.o .debug_aranges - 0x000006d0 0x78 THUMB Debug/../../obj/flash.o + 0x000006d0 0x68 THUMB Debug/../../obj/flash.o .debug_aranges - 0x00000748 0x40 THUMB Debug/../../obj/nvm.o + 0x00000738 0x40 THUMB Debug/../../obj/nvm.o .debug_aranges - 0x00000788 0x40 THUMB Debug/../../obj/timer.o + 0x00000778 0x40 THUMB Debug/../../obj/timer.o .debug_aranges - 0x000007c8 0x40 THUMB Debug/../../obj/uart.o + 0x000007b8 0x30 THUMB Debug/../../obj/uart.o .debug_aranges - 0x00000808 0x20 THUMB Debug/../../obj/assert.o + 0x000007e8 0x20 THUMB Debug/../../obj/assert.o .debug_aranges - 0x00000828 0x28 THUMB Debug/../../obj/backdoor.o + 0x00000808 0x28 THUMB Debug/../../obj/backdoor.o .debug_aranges - 0x00000850 0x28 THUMB Debug/../../obj/boot.o + 0x00000830 0x28 THUMB Debug/../../obj/boot.o .debug_aranges - 0x00000878 0x58 THUMB Debug/../../obj/com.o + 0x00000858 0x58 THUMB Debug/../../obj/com.o .debug_aranges - 0x000008d0 0x28 THUMB Debug/../../obj/cop.o + 0x000008b0 0x28 THUMB Debug/../../obj/cop.o .debug_aranges - 0x000008f8 0x48 THUMB Debug/../../obj/xcp.o - .debug_aranges - 0x00000940 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_aranges - 0x00000960 0x30 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_aranges - 0x00000990 0x4d0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_aranges - 0x00000e60 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x000008d8 0x40 THUMB Debug/../../obj/xcp.o -.debug_ranges 0x00000000 0xdc0 +.debug_ranges 0x00000000 0x8f8 .debug_ranges 0x00000000 0x168 THUMB Debug/../../obj/sysctl.o .debug_ranges 0x00000168 0x80 THUMB Debug/../../obj/interrupt.o .debug_ranges 0x000001e8 0x38 THUMB Debug/../../obj/cpulib.o .debug_ranges 0x00000220 0x118 THUMB Debug/../../obj/gpio.o .debug_ranges 0x00000338 0x88 THUMB Debug/../../obj/flashlib.o .debug_ranges 0x000003c0 0x150 THUMB Debug/../../obj/uartlib.o - .debug_ranges 0x00000510 0x130 THUMB Debug/../../obj/canlib.o - .debug_ranges 0x00000640 0x10 THUMB Debug/../../obj/main.o - .debug_ranges 0x00000650 0x10 THUMB Debug/../../obj/vectors.o - .debug_ranges 0x00000660 0x20 THUMB Debug/../../obj/cpu.o - .debug_ranges 0x00000680 0x98 THUMB Debug/../../obj/flash.o - .debug_ranges 0x00000718 0x30 THUMB Debug/../../obj/nvm.o - .debug_ranges 0x00000748 0x30 THUMB Debug/../../obj/timer.o - .debug_ranges 0x00000778 0x30 THUMB Debug/../../obj/uart.o - .debug_ranges 0x000007a8 0x10 THUMB Debug/../../obj/assert.o - .debug_ranges 0x000007b8 0x18 THUMB Debug/../../obj/backdoor.o - .debug_ranges 0x000007d0 0x18 THUMB Debug/../../obj/boot.o - .debug_ranges 0x000007e8 0x48 THUMB Debug/../../obj/com.o - .debug_ranges 0x00000830 0x18 THUMB Debug/../../obj/cop.o - .debug_ranges 0x00000848 0x38 THUMB Debug/../../obj/xcp.o - .debug_ranges 0x00000880 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_ranges 0x00000890 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_ranges 0x000008b0 0x4c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_ranges 0x00000d70 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_ranges 0x00000510 0xf0 THUMB Debug/../../obj/canlib.o + .debug_ranges 0x00000600 0x10 THUMB Debug/../../obj/main.o + .debug_ranges 0x00000610 0x10 THUMB Debug/../../obj/vectors.o + .debug_ranges 0x00000620 0x20 THUMB Debug/../../obj/cpu.o + .debug_ranges 0x00000640 0x70 THUMB Debug/../../obj/flash.o + .debug_ranges 0x000006b0 0x30 THUMB Debug/../../obj/nvm.o + .debug_ranges 0x000006e0 0x48 THUMB Debug/../../obj/timer.o + .debug_ranges 0x00000728 0xa0 THUMB Debug/../../obj/uart.o + .debug_ranges 0x000007c8 0x10 THUMB Debug/../../obj/assert.o + .debug_ranges 0x000007d8 0x18 THUMB Debug/../../obj/backdoor.o + .debug_ranges 0x000007f0 0x18 THUMB Debug/../../obj/boot.o + .debug_ranges 0x00000808 0x48 THUMB Debug/../../obj/com.o + .debug_ranges 0x00000850 0x18 THUMB Debug/../../obj/cop.o + .debug_ranges 0x00000868 0x90 THUMB Debug/../../obj/xcp.o -.debug_line 0x00000000 0x393a - .debug_line 0x00000000 0x751 THUMB Debug/../../obj/sysctl.o - .debug_line 0x00000751 0x2a2 THUMB Debug/../../obj/interrupt.o - .debug_line 0x000009f3 0x105 THUMB Debug/../../obj/cpulib.o - .debug_line 0x00000af8 0x571 THUMB Debug/../../obj/gpio.o - .debug_line 0x00001069 0x39a THUMB Debug/../../obj/flashlib.o - .debug_line 0x00001403 0x6d8 THUMB Debug/../../obj/uartlib.o - .debug_line 0x00001adb 0x604 THUMB Debug/../../obj/canlib.o - .debug_line 0x000020df 0x1d THUMB Debug/../../obj/hooks.o - .debug_line 0x000020fc 0x9d THUMB Debug/../../obj/main.o - .debug_line 0x00002199 0x155 THUMB Debug/../../obj/cstart.o - .debug_line 0x000022ee 0x13d THUMB Debug/../../obj/vectors.o - .debug_line 0x0000242b 0xee THUMB Debug/../../obj/cpu.o - .debug_line 0x00002519 0x264 THUMB Debug/../../obj/flash.o - .debug_line 0x0000277d 0x10a THUMB Debug/../../obj/nvm.o - .debug_line 0x00002887 0x108 THUMB Debug/../../obj/timer.o - .debug_line 0x0000298f 0x140 THUMB Debug/../../obj/uart.o - .debug_line 0x00002acf 0x1d THUMB Debug/../../obj/can.o - .debug_line 0x00002aec 0x12a THUMB Debug/../../obj/assert.o - .debug_line 0x00002c16 0x142 THUMB Debug/../../obj/backdoor.o - .debug_line 0x00002d58 0xb9 THUMB Debug/../../obj/boot.o - .debug_line 0x00002e11 0x1a7 THUMB Debug/../../obj/com.o - .debug_line 0x00002fb8 0xb1 THUMB Debug/../../obj/cop.o - .debug_line 0x00003069 0x225 THUMB Debug/../../obj/xcp.o - .debug_line 0x0000328e 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_line 0x00003303 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_line 0x00003377 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_line 0x000038c6 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_line 0x00000000 0x341a + .debug_line 0x00000000 0x786 THUMB Debug/../../obj/sysctl.o + .debug_line 0x00000786 0x2c2 THUMB Debug/../../obj/interrupt.o + .debug_line 0x00000a48 0x105 THUMB Debug/../../obj/cpulib.o + .debug_line 0x00000b4d 0x5a4 THUMB Debug/../../obj/gpio.o + .debug_line 0x000010f1 0x3ea THUMB Debug/../../obj/flashlib.o + .debug_line 0x000014db 0x74d THUMB Debug/../../obj/uartlib.o + .debug_line 0x00001c28 0x61e THUMB Debug/../../obj/canlib.o + .debug_line 0x00002246 0x1d THUMB Debug/../../obj/hooks.o + .debug_line 0x00002263 0x9d THUMB Debug/../../obj/main.o + .debug_line 0x00002300 0x155 THUMB Debug/../../obj/cstart.o + .debug_line 0x00002455 0x13e THUMB Debug/../../obj/vectors.o + .debug_line 0x00002593 0xeb THUMB Debug/../../obj/cpu.o + .debug_line 0x0000267e 0x25b THUMB Debug/../../obj/flash.o + .debug_line 0x000028d9 0x10a THUMB Debug/../../obj/nvm.o + .debug_line 0x000029e3 0x117 THUMB Debug/../../obj/timer.o + .debug_line 0x00002afa 0x13c THUMB Debug/../../obj/uart.o + .debug_line 0x00002c36 0x1d THUMB Debug/../../obj/can.o + .debug_line 0x00002c53 0x12c THUMB Debug/../../obj/assert.o + .debug_line 0x00002d7f 0x149 THUMB Debug/../../obj/backdoor.o + .debug_line 0x00002ec8 0xb9 THUMB Debug/../../obj/boot.o + .debug_line 0x00002f81 0x1af THUMB Debug/../../obj/com.o + .debug_line 0x00003130 0xb1 THUMB Debug/../../obj/cop.o + .debug_line 0x000031e1 0x239 THUMB Debug/../../obj/xcp.o -.debug_str 0x00000000 0x2abf +.debug_str 0x00000000 0x23bf .debug_str 0x00000000 0x53a THUMB Debug/../../obj/sysctl.o 0x561 (size before relaxing) .debug_str 0x0000053a 0x1ab THUMB Debug/../../obj/interrupt.o @@ -1794,14 +1122,6 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossw 0xea (size before relaxing) .debug_str 0x00002157 0x268 THUMB Debug/../../obj/xcp.o 0x30c (size before relaxing) - .debug_str 0x000023bf 0x68 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x74 (size before relaxing) - .debug_str 0x00002427 0x7c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x88 (size before relaxing) - .debug_str 0x000024a3 0x54a C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x5d3 (size before relaxing) - .debug_str 0x000029ed 0xd2 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0xde (size before relaxing) .comment 0x00000000 0x11 .comment 0x00000000 0x11 THUMB Debug/../../obj/sysctl.o @@ -1827,10 +1147,6 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossw .comment 0x00000000 0x12 THUMB Debug/../../obj/com.o .comment 0x00000000 0x12 THUMB Debug/../../obj/cop.o .comment 0x00000000 0x12 THUMB Debug/../../obj/xcp.o - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .comment 0x00000000 0x12 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .ARM.attributes 0x00000000 0x10 @@ -1880,19 +1196,3 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossw 0x00000150 0x10 THUMB Debug/../../obj/cop.o .ARM.attributes 0x00000160 0x10 THUMB Debug/../../obj/xcp.o - .ARM.attributes - 0x00000170 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .ARM.attributes - 0x00000180 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .ARM.attributes - 0x00000190 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .ARM.attributes - 0x000001a0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2_asm.o) - .ARM.attributes - 0x000001b0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc_asm.o) - .ARM.attributes - 0x000001c0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .ARM.attributes - 0x000001d0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - .ARM.attributes - 0x000001e0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libm_v7m_t_le.a(libm_asm.o) diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.srec index 9316bea8..edf6f56a 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.srec +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/bin/openbtl_ek_lm3s8962.srec @@ -1,19 +1,19 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S1130000700600207B0100008512000085120000AC -S11300108512000085120000851200008512000080 -S11300208512000085120000851200008512000070 -S11300308512000085120000851200008512000060 -S11300408512000085120000851200008512000050 -S11300508512000085120000851200008512000040 -S11300608512000085120000851200008512000030 -S11300708512000085120000851200008512000020 -S11300808512000085120000851200008512000010 -S11300908512000085120000851200008512000000 -S11300A085120000851200008512000085120000F0 -S11300B085120000851200008512000085120000E0 -S11300C085120000851200008512000085120000D0 -S11300D085120000851200008512000085120000C0 -S11300E085120000851200008512000085120000B0 +S1130000680600207B010000B50E0000B50E00005C +S1130010B50E0000B50E0000B50E0000B50E0000D0 +S1130020B50E0000B50E0000B50E0000B50E0000C0 +S1130030B50E0000B50E0000B50E0000B50E0000B0 +S1130040B50E0000B50E0000B50E0000B50E0000A0 +S1130050B50E0000B50E0000B50E0000B50E000090 +S1130060B50E0000B50E0000B50E0000B50E000080 +S1130070B50E0000B50E0000B50E0000B50E000070 +S1130080B50E0000B50E0000B50E0000B50E000060 +S1130090B50E0000B50E0000B50E0000B50E000050 +S11300A0B50E0000B50E0000B50E0000B50E000040 +S11300B0B50E0000B50E0000B50E0000B50E000030 +S11300C0B50E0000B50E0000B50E0000B50E000020 +S11300D0B50E0000B50E0000B50E0000B50E000010 +S11300E0B50E0000B50E0000B50E0000B50E000000 S11300F072B64B484B4901604B498D464B484C49BD S11301004C4A00F07BF84C484C494D4A00F076F8D4 S11301104C484D494D4A00F071F84D484D494E4AFE @@ -22,7 +22,7 @@ S11301304E494F4A00F062F84E484F49002200F001 S113014068F84E484E49091A082903DB0022026068 S1130150043001603F484049884205D002680430B9 S113016003B4904703BCF7E700208646EC4601F051 -S1130170AFFC00200021434A904772B62A498D46BD +S1130170BDF900200021434A904772B62A498D46B2 S11301802A482B492B4A00F039F82B482B492C4A92 S113019000F034F82B482C492C4A00F02FF82C4856 S11301A02C492D4A00F02AF82C482D492D4A00F0FC @@ -33,706 +33,410 @@ S11301E00268043003B4904703BCF7E70020864656 S11301F0EC4600200021234A9047FEE7884207D0BE S1130200521A05D0037801300B700131013AF9D14B S11302107047884202D002700130FAE7704700004C -S113022008ED00E00000000070060020F02D000042 +S113022008ED00E00000000068060020701B0000DC S11302300000002000000020880200008802000066 -S1130240B0290000F02D0000000000200000002074 -S1130250B0290000B0290000B0290000B029000036 -S1130260B0290000B0290000B0290000B029000026 -S1130270F02D000000000020F0040020F004002015 -S10B0280700500205512000076 -S1130288A0F5801303F1FF334FF48072C0F210021B -S1130298904214BF00220122012B8CBF134642F066 -S11302A80103002B40F077814FF40073C0F2100370 -S11302B84FF48062C0F21002904214BF002201225F -S11302C8984214BF134642F00103002B40F06681A4 -S11302D84FF48073C1F210034FF40072C1F210029C -S11302E8904214BF00220122984214BF134642F0E0 -S11302F80103002B40F055814FF48063C1F21003D1 -S11303084FF48042C1F21002904214BF002201222D -S1130318984214BF134642F00103002B40F0448175 -S11303284FF4A043C2F210034FF00102C2F20002DC -S1130338904214BF00220122984214BF134642F08F -S11303480103002B40F033814FF00203C2F2000393 -S11303584FF00402C2F20002904214BF00220122AC -S1130368984214BF134642F00103002B40F0228147 -S11303784FF00803C2F200034FF01002C2F2000269 -S1130388904214BF00220122984214BF134642F03F -S11303980103002B40F011814FF02003C2F2000347 -S11303A84FF04002C2F20002904214BF0022012220 -S11303B8984214BF134642F00103002B40F0008119 -S11303C84FF08003C2F200034FF48072C2F20002BD -S11303D8904214BF00220122984214BF134642F0EF -S11303E80103002B40F0EF80B0F1102F14BF00235D -S11303F80123402808BF43F00103002B40F0E680A6 -S11304084FF48043C1F200034FF48052C1F210024A -S1130418904214BF00220122984214BF134642F0AE -S11304280103002B40F0D5804FF48073C2F210030F -S11304384FF08002C3F20002904214BF002201224E -S1130448984214BF134642F00103002B40F0C480C5 -S11304584FF01003C3F20003B0F1101F14BF0022C1 -S11304680122984214BF134642F00103002B40F0C6 -S1130478B6804FF48073C1F200034FF40072C1F2E6 -S11304880002904214BF00220122984214BF13466E -S113049842F00103002B40F0A5804FF01003C1F295 -S11304A800034FF02002C1F20002904214BF002260 -S11304B80122984214BF134642F00103002B40F076 -S11304C894804FF02003C3F200034FF00102C1F2FD -S11304D81002904214BF00220122984214BF13460E -S11304E842F00103002B40F083804FF00203C1F275 -S11304F810034FF00402C1F21002904214BF00220C -S11305080122984214BF134642F00103002B72D112 -S11305184FF00803C1F210034FF00102C1F20002C8 -S1130528904214BF00220122984214BF134642F09D -S11305380103002B62D14FF00203C1F200034FF014 -S11305480402C1F20002904214BF00220122984220 -S113055814BF134642F00103002B52D14FF001039C -S1130568C2F21003984214BF00230123B0F1202FD4 -S113057808BF43F00103002B46D14FF48053C0F267 -S11305881003984214BF00230123082814BF1846F7 -S113059843F0010070474FF0010070474FF001002D -S11305A870474FF0010070474FF0010070474FF05B -S11305B8010070474FF0010070474FF00100704789 -S11305C84FF0010070474FF0010070474FF00100F1 -S11305D870474FF0010070474FF0010070474FF02B -S11305E8010070474FF0010070474FF00100704759 -S11305F84FF0010070474FF0010070474FF00100C1 -S113060870474FF0010070474FF00100704700BF7A -S113061810B50446FFF734FE38B942F60C20C0F290 -S113062800004FF4FC7101F0C9F942F68023C0F2CE -S113063800034FEA147253F822301A68A1B2C4F3C3 -S1130648044401FA04F414431C6010BD0138FDD1BC -S1130658704700BFF0B504464FF46043C4F20F037B -S11306681B6813F0E04F0CD04FF46043C4F20F033F -S11306781A684FF00003C7F2FF031340B3F1805F19 -S113068802D1002CC0F2C1804EF26002C4F20F0203 -S113069811684EF27003C4F20F031E6841F400613E -S11306A821F4800546F4006615601E6011F0020FFF -S11306B802D014F0020F05D015F0010F26D014F063 -S11306C8010F23D164F003031D404EF26003C4F20A -S11306D80F031D60002E0CDA06F07003702B14BF94 -S11306E800220122302B14BF134642F0010323B920 -S11306F808E005F03003302B04D14FF48050FFF7A5 -S1130708A5FF03E04FF40020FFF7A0FF25F45E5790 -S113071827F0700743F2F07323401F434DF68F739D -S1130728C7F6FF73334042F23005C8F2000525408E -S11307381D4304F008034EF25802C4F20F024FF0AE -S11307484001116055EAC3050AD54EF27003C4F29C -S11307580F031D604EF26003C4F20F031F6009E02B -S11307684EF26003C4F20F031F604EF27003C4F22A -S11307780F031D604FF01000FFF768FF27F0F867BC -S113078827F003074FF00303C0F2C07323401F434D -S113079825F0FC5504F0FC531D4314F0804F1FBF93 -S11307A847F4800725F480000023C4F240031ABFED -S11307B82340184325F0804014F4006F17D14EF2FB -S11307C85003C4F20F031B6813F0400F0BD147F614 -S11307D8FF734EF25001C4F20F010A6812F0400F81 -S11307E801D1013BF9D127F4006720F400604EF2EF -S11307F86003C4F20F031F604EF27003C4F20F03C8 -S113080818604FF01000FFF721FFF0BD30B44EF22E -S11308186003C4F20F031B684EF27002C4F20F02A5 -S11308281268002AB4BF02F0700103F030012029D5 -S113083800F0828004D881B1102940F04D8115E080 -S1130848602900F0DF80702900F0D980302908BFC2 -S113085847F2305040F04081D6E042F6B011C0F281 -S11308680001C3F3841051F82000CDE04FF4604137 -S1130878C4F20F01096811F0E04F04BF4EF2C01032 -S1130888C0F2E40000F0C0804FF46041C4F20F01EC -S113089808684FF00001C7F2FF010140B1F1805F21 -S11308A804BF4EF2C010C0F2E40000F0AD804FF473 -S11308B86041C4F20F0108684FF00001C7F2FF015C -S11308C801404FF00000C1F2010081420DD14FF404 -S11308D86041C4F20F01096889B2022904BF4FF4C8 -S11308E8D850C0F2B70000F08F804FF46041C4F2D2 -S11308F80F0108684FF00001C7F2FF0101404FF0F3 -S11309080000C1F2030081421CBF4FF41050C0F232 -S1130918F40079D14FF46041C4F20F010C68A4B219 -S11309284FF4D850C0F2B7004FF41051C0F2F4019C -S1130938002C18BF084667E04FF46041C4F20F0169 -S1130948096811F0E04F04BF43F67000C0F23900A3 -S11309585AD04FF46041C4F20F0108684FF0000107 -S1130968C7F2FF010140B1F1805F04BF43F6700094 -S1130978C0F2390048D04FF46041C4F20F0108684E -S11309884FF00001C7F2FF0101404FF00000C1F22F -S1130998010081420CD14FF46041C4F20F0109688F -S11309A889B2022904BF4CF2C060C0F22D002BD0DA -S11309B84FF46041C4F20F0108684FF00001C7F218 -S11309C8FF0101404FF00000C1F2030081421CBF47 -S11309D84FF41060C0F23D0016D14FF46041C4F2E8 -S11309E80F010C68A4B24CF2C060C0F22D004FF4A1 -S11309F81061C0F23D01002C18BF084604E04FF412 -S1130A08004001E04FF48000002A03DA12F4006F7A -S1130A1803D03FE013F4006F3CD14EF26401C4F2FA -S1130A280F0109684FF46044C4F20F04246814F0F9 -S1130A38E04F0CD04FF46044C4F20F0425684FF023 -S1130A480004C7F2FF042C40B4F1805F0CD1C1F359 -S1130A58481404F1020404FB00F001F01F0404F13B -S1130A680204B0FBF4F00BE0C1F3481404FB00F0FB -S1130A7801F01F0404F101044FEA4404B0FBF4F04C -S1130A8811F4804F18BF400811F4004F18BF8008B4 -S1130A9843F4800313F4800F20D0002A15DA12F0EF -S1130AA8804F0BD012F4006F08D14FEA4000C2F314 -S1130AB8865202F10102B0FBF2F00FE0C2F3C55214 -S1130AC802F10102B0FBF2F008E0C3F3C35303F1EF -S1130AD80103B0FBF3F001E04FF0000030BC7047B5 -S1130AE84FF40043C4F20503984214BF00230123C2 -S1130AF8B0F1402F08BF43F00103002B40F0988069 -S1130B084FF4A043C4F200034FF41042C4F20502A8 -S1130B18904214BF00220122984214BF134642F0A7 -S1130B280103002B40F087804FF4C043C4F2000354 -S1130B384FF42042C4F20502904214BF002201225D -S1130B48984214BF134642F00103002B76D14FF4A8 -S1130B58E043C4F200034FF43042C4F20502904269 -S1130B6814BF00220122984214BF134642F0010325 -S1130B78002B66D14FF48043C4F202034FF4404281 -S1130B88C4F20502904214BF00220122984214BF05 -S1130B98134642F00103002B56D14FF4A043C4F28C -S1130BA802034FF45042C4F20502904214BF0022DB -S1130BB80122984214BF134642F00103002B46D188 -S1130BC84FF4C043C4F202034FF46042C4F2050276 -S1130BD8904214BF00220122984214BF134642F0E7 -S1130BE80103002B36D14FF4E043C4F202034FF45F -S1130BF87042C4F20502904214BF002201229842B6 -S1130C0814BF134642F00103002B26D14FF450437E -S1130C18C4F203034FF00002C4F20602904214BF68 -S1130C2800220122984214BF104642F00100704786 -S1130C384FF0010070474FF0010070474FF001007A -S1130C4870474FF0010070474FF0010070474FF0B4 -S1130C58010070474FF0010070474FF001007047E2 -S1130C6870B504461546CEB2FFF73AFF38B942F6D6 -S1130C788C20C0F200004FF0E40100F09FFE022D2A -S1130C8807D942F68C20C0F200004FF0E60100F0CC -S1130C9895FE15F0010F04F58063D4F8002414BF01 -S1130CA83243B2431A6015F0020F04F58463D4F892 -S1130CB8202414BF164322EA06061E6070BD00BF36 -S1130CC8F0B5044617461E46CDB2FFF709FF38B9FA -S1130CD842F68C20C0F200004FF4DD7100F06EFE85 -S1130CE807F1FF323B1F18BF0123012A94BF0023D9 -S1130CF803F001034BB10C2F07D042F68C20C0F24D -S1130D0800004FF4DF7100F059FEB6F10A0318BF72 -S1130D180123082E0CBF002303F00103E3B1B6F14D -S1130D28090318BF01230C2E0CBF002303F0010391 -S1130D3893B1B6F10D0318BF01230B2E0CBF00238A -S1130D4803F0010343B13EB142F68C20C0F2000027 -S1130D5840F2C51100F032FE17F0010F04F5A0634C -S1130D68D4F8002514BF2A43AA431A6017F0020FC7 -S1130D7804F5A06303F10403D4F8042514BF2A433B -S1130D88AA431A6017F0040F04F5A163D4F80825E0 -S1130D9814BF2A43AA431A6017F0080F04F5A36383 -S1130DA8D4F8182514BF2A43AA431A6016F0010F71 -S1130DB804F5A06303F10C03D4F80C2514BF2A43EB -S1130DC8AA431A6016F0020F04F5A263D4F810259A -S1130DD814BF2A43AA431A6016F0040F04F5A26349 -S1130DE803F10403D4F8142514BF2A43AA431A6050 -S1130DF816F0080F04F5A26303F10C03D4F81C25BC -S1130E0814BF2A43AA431A602EB904F5A563D4F87B -S1130E182825154305E004F5A563D4F8282522EA16 -S1130E2805051D60F0BD00BF30B50446CDB2FFF71F -S1130E3857FE38B942F68C20C0F2000040F21F5128 -S1130E4800F0BCFD204629464FF00202FFF708FFD8 -S1130E58204629464FF001024FF00803FFF730FF00 -S1130E6830BD00BF10B504464FEA80534FEA935390 -S1130E783BB142F6FC20C0F200004FF0840100F0C0 -S1130E889DFD4DF21403C4F20F034FF001021A60E2 -S1130E984FF45043C4F20F031C604DF20803C4F22C -S1130EA80F034FF00202CAF242421A604DF20802DE -S1130EB8C4F20F02136813F0020FFBD14DF20C03B6 -S1130EC8C4F20F03186800F00100002814BF4FF0A3 -S1130ED8FF30002010BD00BF2DE9F04106460C4646 -S1130EE8154611F0030F07D042F6FC20C0F20000AB -S1130EF84FF0C80100F062FD15F0030F07D042F669 -S1130F08FC20C0F200004FF0C90100F057FD4DF27B -S1130F181403C4F20F034FF001021A604EF2A01337 -S1130F28C4F20F031B6813F0010F33D1002D37D11E -S1130F3853E04FF45048C4F20F084DF23000C4F2A5 -S1130F480F004FF45141C4F20F014DF22007C4F2CF -S1130F580F074FF0010CCAF2424C24F07F03C8F883 -S1130F68003006E056F8042B5A5004F10404A5F1A5 -S1130F78040514F07C0301D102681AB9002DF1D1DB -S1130F882A4600E02A46C7F800C03B6813F0010F60 -S1130F98FBD102E0002DCCD11FE0002ADDD11CE0FA -S1130FA84FF45047C4F20F074DF20400C4F20F0087 -S1130FB84DF20802C4F20F024FF00101CAF2424195 -S1130FC83C6056F8043B03601160136813F0010F8A -S1130FD8FBD104F10404043DF2D14DF20C03C4F234 -S1130FE80F03186800F00100002814BF4FF0FF3009 -S1130FF80020BDE8F08100BF4FF44043C4F2000371 -S11310084FF45042C4F20002904214BF002201225D -S1131018984214BF134642F0010343B94FF46043A6 -S1131028C4F20003984214BF0020012070474FF017 -S11310380100704710B50446FFF7DEFF38B942F6E1 -S11310487030C0F200004FF4CF7100F0B7FCE36ACF -S113105843F01003E362236B43F4407343F001034A -S1131068236310BD10B50446FFF7C6FF38B942F62E -S11310787030C0F200004FF4DF7100F09FFCA369E8 -S113108813F0080FFBD1E36A23F01003E362236B28 -S113109823F4407323F00103236310BDF0B5044621 -S11310A80E4615461F46FFF7A7FF38B942F67030BB -S11310B8C0F2000040F20D1100F080FC3DB942F688 -S11310C87030C0F200004FF4877100F077FC4FF4E1 -S11310D86043C4F20F031B6813F0E04F08BF1023EA -S11310E844D04FF46043C4F20F031A684FF000036E -S11310F8C7F2FF031340B3F1805F08BF102335D054 -S11311084FF46043C4F20F031A684FF00003C7F2A8 -S1131118FF0313404FF00002C1F20102934209D1C8 -S11311284FF46043C4F20F031B689BB2022B08BF41 -S113113810231BD04FF46043C4F20F031A684FF016 -S11311480003C7F2FF0313404FF00002C1F2030289 -S1131158934218BF082309D14FF46043C4F20F0324 -S11311681B689BB2002B0CBF1023082305FB03F359 -S1131178B34207D942F67030C0F2000040F20F11B2 -S113118800F01CFC2046FFF76DFFB6EB051F236B30 -S11311983DBF43F0200323636D0823F0200328BFD9 -S11311A823634FEAC606B6FBF5F505F101054FEAD8 -S11311B8D5136362C5F34505A562E7624FF00003E2 -S11311C8A3612046FFF736FFF0BD00BF10B5044603 -S11311D8FFF712FF38B942F67030C0F2000040F24F -S11311E8E93100F0EBFBA36913F0200F14BF0020D2 -S11311F8012010BD10B50446FFF7FEFE38B942F6CB -S11312087030C0F2000040F2094100F0D7FBA36936 -S113121813F0100F0CBF20684FF0FF3010BD00BF53 -S113122830B50446CDB2FFF7E7FE38B942F6703060 -S1131238C0F2000040F25B4100F0C0FBA36913F068 -S1131248200F06BF25600120002030BD00B54FF4F3 -S11312586070C0F2C010FFF7FDF94FF00100C2F250 -S11312680000FFF7D5F94FF040204FF00301FFF7D6 -S1131278DBFD00F0DDFB00F0E7FBFCE700B542F620 -S1131288E430C0F200004FF03C0100F097FB5DF839 -S113129804FB00BF00B500F06FFA60B100F00AFC6F -S11312A84EF60853CEF200034FF480421A6044F21B -S11312B804031B6898475DF804FB00BF70B50E462D -S11312C892B272B1044600F1010002F1FF3292B207 -S11312D8851816F8013B04F8013B00F005FCAC4204 -S11312E8F7D170BD00B5FEF744FF5DF804FB00BFFD -S11312F870B5064642F67045C0F200054FF000048A -S113130800F0F2FB2B68B3420DD869685B189E4263 -S113131809D242F67043C0F2000304EB440203EB23 -S11313288203187A70BD04F1010405F10C05122C2E -S1131338E6D14FF0FF0070BD70B5C6B242F67045F5 -S1131348C0F200054FF0000400F0CEFB2B7AB34244 -S113135808D142F67043C0F2000304EB440253F888 -S1131368220070BD04F1010405F10C05122CEBD127 -S11313784FF0FF3070BD00BF2DE9F04181B0054644 -S11313880068FFF7B5FFFF2808BF002022D04FF000 -S113139800044FF004082E68A71904F10403EB585D -S11313A8009300F0A1FB684639464246FFF794FDD6 -S11313B858B9A259009B9A420AD104F10404B4F51D -S11313C8007FE8D14FF0010004E04FF0000001E095 -S11313D84FF0000001B0BDE8F08100BF00B54FEA4E -S11313E8C1534FEAD35363B903688B420DD040F815 -S11313F8041B4FF40072FFF761FF4FF001005DF822 -S113140804FB4FF000005DF804FB4FF001005DF8A9 -S113141804FB00BF30B504460D4640F20003C2F297 -S11314280003984206D0B1F5804F08D0FFF7A4FF17 -S113143848B910E040F20424C2F2000403E040F288 -S11314480004C2F2000420462946FFF7C7FF00281B -S113145808BF002401E04FF00004204630BD00BF5F -S11314682DE9F04305460C4616469FB24FEA51292A -S11314784FEA49290368B3F1FF3F04D14946FFF70E -S1131488ADFF002830D02B684B4505D02846494687 -S1131498FFF7C0FF054658B32B68E41A04F10404A7 -S11314A82C1906F1010807F1FF37BFB2B84440F21E -S11314B8FF1709F5007900F017FB05F10403E31A97 -S11314C8BB4207D928464946FFF7A4FF054698B109 -S11314D800F1040416F8013B04F8013B4645EAD13F -S11314E84FF00100BDE8F0834FF00000BDE8F08341 -S11314F84FF00000BDE8F0834FF00000BDE8F08332 -S113150840F20423C2F200034FF0FF321A6040F2A3 -S11315180003C2F200031A60704700BF70B50446A6 -S11315280D461646FFF7E4FEFF2818D004F1FF30F5 -S11315384019FFF7DDFEFF2814D04FEA5423202B6F -S113154807BF40F20000C2F2000040F20420C2F2D9 -S11315580000ABB221463246FFF782FF70BD4FF060 -S1131568000070BD4FF0000070BD00BF2DE9F041D0 -S113157804460E46FFF7BCFE054604F1FF34A019E5 -S1131588FFF7B6FE04460646FF2814BF00230123CE -S1131598FF2D08BF43F00103002B5BD1854245D8DA -S11315A8012D47D9132849D82846FFF7C5FE074611 -S11315B82046FFF7C1FE804642F67045C0F200059A -S11315C84FF0000400F090FA2B7AB34209D142F6A6 -S11315D87043C0F2000304EB440203EB82035B682C -S11315E807E004F1010405F10C05122CEAD14FF0CF -S11315F80003C7EB08084344C3F38F2313B303F171 -S1131608FF35ADB205F101054FEA85254FF0000419 -S113161800F06AFAE019FFF725FCB8B904F580640C -S1131628AC42F5D14FF00100BDE8F0814FF0000065 -S1131638BDE8F0814FF00000BDE8F0814FF00000F4 -S1131648BDE8F0814FF00100BDE8F0814FF00000E3 -S1131658BDE8F0814FF00000BDE8F08100B581B02D -S113166840F20003C2F200031B68B3F1FF3F08BF56 -S113167801201CD040F20003C2F2000399685A68A2 -S11316888918DA6889181A6989185A6989189A693F -S11316988918DA698B18C3F1000301AA42F8043DDA -S11316A844F2F0004FF004016A46FFF737FF01B037 -S11316B800BD00BF44F2040318684FF480431B685C -S11316C8C01844F208031B68C01844F20C031B68D2 -S11316D8C01844F210031B68C01844F214031B68B2 -S11316E8C01844F218031B68C01844F2F0031B68BE -S11316F8C018D0F1010038BF0020704700B540F28F -S11317080003C2F200031B68B3F1FF3F06D040F2A6 -S11317180000C2F20000FFF72FFE90B140F204234C -S1131728C2F200031B68B3F1FF3F0ED040F204205D -S1131738C2F20000FFF720FE003018BF01205DF858 -S113174804FB4FF000005DF804FB4FF001005DF866 -S113175804FB00BF00B5FFF7D3FE5DF804FB00BF30 -S113176800B5FFF7DBFE5DF804FB00BF00B5FFF72B -S1131778FDFE5DF804FB00BF00B5FFF79BFF5DF8B5 -S113178804FB00BF00B5FFF769FF18B1FFF7B6FF08 -S11317985DF804FB4FF000005DF804FB4EF2100303 -S11317A8CEF200034FF000021A6070474EF21003A5 -S11317B8CEF200031B6813F4803F1FBF40F20843B6 -S11317C8C2F200031A88013218BF1A80704700BF9A -S11317D840F20843C2F200031880704700B5FFF7CF -S11317E8DDFF4EF21003CEF200034CF24F325A6082 -S11317F84FF0000098604FF005021A60FFF7E8FF09 -S11318085DF804FB00B5FFF7D1FF40F20843C2F2CC -S1131818000318885DF804FB10B504464FF44040F3 -S1131828C4F20000FFF7E6FCB0F1FF3F1ABF2070D6 -S11318380120002010BD00BF10B5C1B24FF44040D4 -S1131848C4F20000FFF7ECFC18B90EE000F04CF904 -S113185803E04FF44044C4F200042046FFF7B6FC0A -S11318680028F3D04FF0010010BD4FF0000010BD68 -S113187800B54FF00100C1F20000FEF7C9FEFEF703 -S1131888C5FF01464FF44040C4F200004FF46142E2 -S11318984FF06003FFF702FC5DF804FB2DE9F0410B -S11318A80546CCB2402C07D942F64850C0F2000095 -S11318B84FF0570100F082F82046FFF7BDFF0128DA -S11318C807D042F64850C0F200004FF05A0100F029 -S11318D875F82646BCB14FF0000442F64857C0F2EA -S11318E800074FF0620800F0FFF8285DFFF7A4FF37 -S11318F8012803D03846414600F060F804F1010499 -S1131908A3B2B342EFD3BDE8F08100BF10B50446DB -S113191840F25143C2F200031B78B3B940F20C40C1 -S1131928C2F20000FFF778FF01283CD140F251438E -S1131938C2F200034FF001021A7040F25043C2F29F -S113194800034FF00000187010BD40F20C43C2F2BF -S1131958000340F25042C2F20002107800F1010084 -S11319681818FFF759FF012820D140F25043C2F25A -S113197800031A7802F10102D2B21A7040F20C4341 -S1131988C2F200031B78934213D120460A49FFF799 -S113199895FC40F25143C2F200034FF000021A7062 -S11319A84FF0010010BD4FF0000010BD4FF00000D3 -S11319B810BD4FF0000010BD0D04002000B540F22A -S11319C85443C2F20003186040F25843C2F20003C1 -S11319D8196000F089F8FCE700B500F07DF80128EB -S11319E815D040F25C43C2F200031B78012B0ED1E0 -S11319F8FFF708FF31280AD940F25C43C2F200031A -S1131A084FF000021A70FFF7C9FEFFF743FC5DF8B8 -S1131A1804FB00BF00B540F25C43C2F200034FF080 -S1131A2801021A70FFF7DAFEFFF7D6FF5DF804FB30 -S1131A3800B500F057F8FFF7EDFFFFF78BFE00F055 -S1131A480DF85DF804FB00BF00B500F04DF800F098 -S1131A581FF8FFF7C1FF5DF804FB00BF00B581B0B4 -S1131A684FF0FF038DF800304FF000038DF801307C -S1131A7800F052F8FFF7FCFE40F25D43C2F20003A7 -S1131A881B78012B02D1684600F06AF801B000BD4A -S1131A9800B540F26040C2F20000FFF737FF0128AA -S1131AA805D140F26040C2F2000000F059F85DF838 -S1131AB804FB00BF704700BF00B5C9B2FFF7EEFED4 -S1131AC800F044F85DF804FB40F25D43C2F2000301 -S1131AD84FF001021A70704700B500F02DF85DF858 -S1131AE804FB00BF704700BF704700BF40F2A0432B -S1131AF8C2F200034FF000025A70704740F2A0434C -S1131B08C2F200034FF0FE02DA7018714FF00202BD -S1131B18A3F84420704700BF40F2A043C2F2000378 -S1131B284FF000021A709A6483F84320A3F8442003 -S1131B389A705A70704700BF40F2A043C2F2000383 -S1131B481878003018BF0120704700BF40F2A04346 -S1131B58C2F200034FF0000283F84320704700BF2D -S1131B6830B504460278FF2A1DD1FFF7BFFF40F2C3 -S1131B78A043C2F200034FF001021A704FF0FF01B4 -S1131B88D9704FF0100119714FF0000159714FF0DD -S1131B9840009871D87119725A729A724FF00802FB -S1131BA8A3F84420A4E140F2A043C2F200031B7846 -S1131BB8012B40F0B781A2F1C902352A00F29481C1 -S1131BC8DFE812F0F800920192018D01920192016E -S1131BD87F01190165014F0192019201920192015D -S1131BE89201920192019201920192019201920151 -S1131BF89201920192019201920192019201920141 -S1131C089201920192019201920192019201920130 -S1131C1892019201920192018200540036007400EC -S1131C28920192019201B2009201CE00D300E70022 -S1131C3842783F2A04D94FF02200FFF75FFF57E1AB -S1131C4840F2A045C2F2000505F10400A96CFFF7B3 -S1131C5835FB4FF0FF03EB706278AB6CD318AB64C1 -S1131C68637803F10103A5F8443041E143783F2B3D -S1131C7804D94FF02200FFF741FF39E1416840F2EF -S1131C88A045C2F20005A96405F104006278FFF7D3 -S1131C9815FB4FF0FF03EB706278AB6CD318AB64A1 -S1131CA8637803F10103A5F8443021E140F2A0432D -S1131CB8C2F200034FF0FF02DA7042689A644FF0F0 -S1131CC80102A3F8442013E140F2A043C2F2000346 -S1131CD84FF0FF02DA70996C43684FF000023BB191 -S1131CE84FF0000211F8010B1218D2B2013BF9D1DE -S1131CF840F2A043C2F200034FF00001DA714FEA48 -S1131D081220C0B218724FEA1240C0B258724FEA99 -S1131D1812629A724FF001021A71597199714FF057 -S1131D280802A3F84420E3E040F2A043C2F200030F -S1131D384FF0FF02DA7042F6C852C0F200029A6409 -S1131D484FF000021A715A719A714FF00701D97154 -S1131D581A725A729A724FF00802A3F84420C7E024 -S1131D684FF00000FFF7CAFEC2E040F2A043C2F2FF -S1131D7800034FF0FF02DA704FF000021A7159782D -S1131D8859719A71DA711A724FF00602A3F8442055 -S1131D98AEE040F2A044C2F200044FF00003237006 -S1131DA8FFF7A4FE4FF0FF03E3704FF00103A4F81C -S1131DB844309DE040F2A043C2F20003986C04F161 -S1131DC801024FF03F01FFF7CBFC20B94FF031007F -S1131DD8FFF794FE8CE040F2A043C2F200034FF0F8 -S1131DE8FF02DA709A6C02F13F029A644FF0010222 -S1131DF8A3F844207CE043783E2B04D94FF022001A -S1131E08FFF77CFE74E040F2A043C2F200034FF0F7 -S1131E18FF02DA704FF00102A3F84420417841B977 -S1131E28FFF7B0FC002863D14FF03100FFF766FEDE -S1131E385EE040F2A043C2F20003986C04F102028F -S1131E48FFF78EFC20B94FF03100FFF757FE4FE043 -S1131E5840F2A043C2F2000361789A6C8A189A642B -S1131E6846E040F2A043C2F200034FF0FF02DA70EA -S1131E784FF000021A715A714FF040019971DA71EA -S1131E881A725A724FF00702A3F8442030E040F265 -S1131E98A043C2F20003986C6168FFF767FC20B99D -S1131EA84FF03100FFF72AFE22E040F2A043C2F2CD -S1131EB800034FF0FF02DA704FF00102A3F8442048 -S1131EC816E0FFF70FFA40F2A043C2F200034FF006 -S1131ED8FF02DA704FF00102A3F8442008E04FF043 -S1131EE83100FFF70BFE03E04FF02000FFF706FE7A -S1131EF840F2A043C2F2000393F84330012B03D10C -S1131F084FF01000FFF7FAFD40F2A043C2F20003BD -S1131F184FF0010283F8432003F10300B3F844109F -S1131F28FFF7CAFD30BD00BF2DE9F04F86B0064665 -S1131F380D4602924FF00003036042F6D058C0F2F7 -S1131F48000842F6E059C0F20009D3E105F10105A1 -S1131F58252904BF2B46002203D0304600F0B6FCE6 -S1131F68C8E11C4613F8010B1D46A0F120010B29FA -S1131F7813D8DFE801F0061212091212120C121219 -S1131F88120F42F04002ECE742F08002E9E742F423 -S1131F980042E6E742F02002E3E7134668280AD144 -S1131FA86078682803BF42F00802A078E51CA51CE5 -S1131FB818BF43F0040278287AD8DFE810F0A901A2 -S1131FC8790079007900790079007900790079003D -S1131FD8790079007900790079007900790079002D -S1131FE8790079007900790079007900790079001D -S1131FF8790079007900790079007900790079000D -S113200879007900790079008900790079007900EC -S113201879007900790079007900790079007900EC -S113202879007900790079007900790079007900DC -S113203879007900790079007900790079007900CC -S113204879007900790079007900790079007900BC -S113205879007900790079007900790079007900AC -S11320687900790079007900790079007900C30052 -S1132078790079007900790079007900790079008C -S1132088790079008F00D700790079007900790008 -S1132098D70079007900790079009800D000B5005C -S11320A879007900A4007900DC0079007900C50082 -S11320B840F2EC43C2F200031C68002C00F01A81C1 -S11320C84FF0FF33009302A901913146A04711E173 -S11320D830464FF0250100F0F9FB0BE1029B03F1B8 -S11320E8040202921978304600F0F0FB02E112F083 -S11320F8080F029B03F1040202921B68326814BFA2 -S11321081A701A60F6E0029B03F1040202921C683A -S11321182178002900F0EE80304600F0D7FB14F84F -S1132128011F0029F8D1E5E0029B03F104010291A3 -S11321381B6802F08007002F14BF2327002742F4EE -S113214880726CE042F4005243F2780343F2580779 -S1132158782808BF1F4612F0800F11D10EE002F054 -S11321688007002F14BF3027002709E042F480427B -S11321784FF0000704E04FF0000701E04FF00007BC -S113218812F4804F1BD0029B03F1040102911B68D7 -S113219812F0040F18BF1BB203D112F0080F18BFB6 -S11321A8DBB2002BBCBF5B422D2719DB02F04001D8 -S11321B8002918BF202712F0200F11D00EE0029B2F -S11321C803F1040102911B6812F0040F18BF9BB2BB -S11321D806D112F0080F18BFDBB201E04FF02B074D -S11321E8A0F1580020286CD8DFE800F0196B6B6B5D -S11321F86B6B6B6B6B6B6B6B156B6B6B6B156B6BCF -S11322086B6B6B11196B6B6B6B156B6B19004FF068 -S11322180004FBB957E04FF0000443BB53E04FF010 -S11322280004002B4FD04FF0000402F4005232B1E6 -S113223803F00F0119F8010003A9605405E003F045 -S11322480F0118F8010003A9605404F101041B09E3 -S1132258EDD138E04FF0000403F0070101F130013B -S113226803AAA15404F10104DB08F5D12BE04FF0D3 -S1132278000402F400424FF02C0B4CF6CD4ACCF685 -S1132288CC4A52B104F00301032901BF0DF1180C23 -S11322980CEB040101F80CBC013406A90819AAFBCB -S11322A803C14FEAD10101EB810CA3EB4C0303F109 -S11322B8300300F80C3C04F101040B460029E0D17A -S11322C801E04FF00004FF2F04D9C7F3072130467B -S11322D800F0FCFA1FB1F9B2304600F0F7FA012C0D -S11322E808D403AF3C1914F8011D304600F0EEFA87 -S11322F8BC42F8D1297800297FF428AEB3682BB101 -S1132308326871688A423CBF00219954306801E000 -S11323184FF0FF3006B0BDE8F08F00BF10B504469B -S11323280B783BB1B0F1FF3F06D04B6803F1FF33A4 -S11323384B6001E08B689847204610BD2DE9F04FAB -S113234882468B4617469846099E4FF0FF3900E0AF -S1132358A94609F10105504600F0A4FA044600F024 -S113236807FB0028F4D12346B4F1FF3F08BF4FF020 -S1132378FF3500F09C8027F4C067002E4EDD17F06F -S1132388800F0DD02B2C03D02D2C09D147F4806756 -S113239809F10205504600F085FA044606F1FF36B5 -S11323A8302C14BF00230123002ED4BF002303F0D4 -S11323B80103002B32D047F4007706F1FF3605F10C -S11323C80109504600F06EFA0446002E20DD582814 -S11323D814BF00230123782808BF43F00103BBB1CD -S11323E8B8F1100F14BF00230123B8F1000F08BF80 -S11323F843F0010363B127F4007706F1FF3605F1D2 -S11324080209504600F04EFA04464FF0100851E015 -S1132418B8F1000F08BF4FF008084BE0B8F1000FFF -S113242808BF4FF00A08002ED8BF4FF000090EDC91 -S113243815E047F4007706F1FF3608FB090905F1B2 -S11324480105504600F02EFA044616B907E04FF08D -S113245800092046414600F06DFA0028E9DA2046D2 -S11324685146FFF75BFF17F4007F08BF6FF00105C3 -S11324781DD017F0010F1AD1DBF8003003F1040264 -S1132488CBF800201B6807F49062B2F5906F08BF80 -S1132498C9F1000917F0100F18BF83F8009006D18E -S11324A817F0080F14BFA3F80090C3F8009028464B -S11324B8BDE8F08F4D46B6E72DE9F04F85B00190A1 -S11324C88A4604924FF0000BCDF808B04CF6CC497C -S11324D8C0F6CC49544614F8015B002D00F0DE81A7 -S11324E8252D3BD0284600F043FA08B918E02C46BD -S11324F804F10105207800F03BFA0028F7D101E047 -S11325080BF1010B019800F0CDF9054600F030FA03 -S11325180028F5D128460199FFF700FFA246D9E71C -S1132528019800F0BFF90646A84203D10BF1010B4C -S1132538A246CFE70199FFF7F1FE029AD2F101030F -S113254838BF0023B6F1FF3F14BF002603F001068D -S1132558002E18BF4FF0FF3202929FE19AF8013023 -S11325682A2B06BF0AF102044FF001084FF00008B5 -S11325784FF000050CE04D4500F3908105EB85050F -S1132588A6F1300616EB450500F1888148F02008CD -S1132598274604F101043E78A246304600F0C2F909 -S11325A80028E8D1414608F02002002A08BF6FF04D -S11325B800454C2E05D17E7807F1020A48F04408FC -S11325C80EE0682E0CD17E78682E03BF48F0100800 -S11325D8BE7807F1030A07F1020A18BF41F0080898 -S11325E8A6F12506532E00F25981DFE816F05400AF -S11325F8570157015701570157015701570157010F -S113260857015701570157015701570157015701FE -S113261857015701570157015701570157015701EE -S113262857015701570157015701570157015701DE -S113263857015701570157015701570157015701CE -S113264857015701570157015701570157015701BE -S113265857015701330157015701570157015701D2 -S11326685701570157015701570170009F0057013F -S1132678570157015701AA0057015701570157013C -S1132688B500CD00D80057015701E30057012801D0 -S1132698570157013301019800F004F9044625282D -S11326A802D10BF1010B15E70199FFF737FE029AE6 -S11326B8131C18BF0123B4F1FF3F0CBF1C4643F0A1 -S11326C80104002C08BF4FF0FF320292E6E008F044 -S11326D82003002B08BF012518F0010401BF049B47 -S11326E81A1D04921E6818BF0026002D00F0D6801B -S11326F8002D13DD019800F0D5F8B0F1FF3F06D1A5 -S1132708029B002B08BF4FF0FF330293C6E00CB9BD -S113271806F8010B0BF1010B013DEBD1002C7FF402 -S1132728D9AE029B03F101030293D3E648F0800279 -S11327380095019804A94FF00A03FFF7FFFD04462A -S113274892E048F080020095019804A94FF0000334 -S1132758FFF7F4FD044687E018F0010F7FF4BAAEE2 -S1132768049B03F1040204921B6818F0100F18BFAD -S113277883F800B07FF4AEAE18F0080F14BFA3F8C6 -S113278800B0C3F800B0A5E648F0800200950198AF -S113279804A94FF00803FFF7D1FD044664E028F0CC -S11327A81E020095019804A94FF01003FFF7C6FD17 -S11327B8044659E04FF0FF3404F10104019800F095 -S11327C871F8064600F0D4F80028F5D1B6F1FF3FB9 -S11327D808BF4FF0FF3447D018F0010701BF049B2E -S11327E81A1D04921B680EBF039300220392002D46 -S11327F816DC1AE005F1FF351FB9039B03F8016BDA -S1132808039304F10104019800F04CF80646431CB4 -S113281818BF0123002DD4BF002303F0010323B103 -S1132828304600F0A5F80028E4D030460199FFF7B7 -S113283875FDCFB94FF00002039B1A7014E048F0FD -S113284880020095019804A94FF00A03FFF776FD6A -S1132858044609E048F080020095019804A94FF065 -S11328681003FFF76BFD0446002C0FDA029A131CC1 -S113287818BF0123B4F1FF3F0CBF1C4643F0010409 -S1132888002C08BF4FF0FF32029207E018F0010F46 -S113289802BF029B01330293A3441BE6029805B0CE -S11328A8BDE8F08F00B5034602783AB14268107863 -S11328B840B102F101025A605DF804FB436898478D -S11328C85DF804FB4FF0FF305DF804FB30B50446B7 -S11328D8C8B2A16849B12368626803F10105954249 -S11328E808BF0020934238BFC854E3682BB121685D -S11328F86268914201D221469847236803F1010393 -S1132908236030BDA0F1410019288CBF00200120AC -S1132918704700BFA0F1610019288CBF0020012076 -S1132928704700BFA0F1300009288CBF00200120A7 -S1132938704700BF30B504460D46FFF7F3FF10B1EA -S1132948A4F130000FE02046FFF7E4FF10B1A4F132 -S1132958570008E02046FFF7D5FF10B1A4F137006F -S113296801E04FF0FF30A842A8BF4FF0FF3030BD60 -S1132978A0F10903202814BF00200120042B98BFCC -S113298840F00100704700BF00B503B400F008F838 -S113299803BC02B4694609BE00F004F801BC00BDDA -S10B29A8704700BF704700BF37 -S11329B040420F0000201C0080841E00008025007F -S11329C0999E36000040380000093D0000803E001A -S11329D000004B00404B4C0000204E00808D5B00FB -S11329E000C05D000080700000127A0000007D00CD -S11329F080969800001BB7000080BB00C0E8CE00A2 -S1132A00647ADA000024F4000000FA00443A2F75D6 -S1132A1073722F6665617365722F736F6674776165 -S1132A2072652F4F70656E424C542F546172676506 -S1132A30742F44656D6F2F41524D434D335F4C4DA0 -S1132A4033535F454B5F4C4D3353383936325F4314 -S1132A50726F7373776F726B732F426F6F742F691A -S1132A6064652F2E2E2F6C69622F647269766572ED -S1132A706C69622F73797363746C2E6300000000B9 -S1132A8000E10F4004E10F4008E10F40443A2F7584 -S1132A9073722F6665617365722F736F66747761E5 -S1132AA072652F4F70656E424C542F546172676586 -S1132AB0742F44656D6F2F41524D434D335F4C4D20 -S1132AC033535F454B5F4C4D3353383936325F4394 -S1132AD0726F7373776F726B732F426F6F742F699A -S1132AE064652F2E2E2F6C69622F6472697665726D -S1132AF06C69622F6770696F2E630000443A2F750A -S1132B0073722F6665617365722F736F6674776174 -S1132B1072652F4F70656E424C542F546172676515 -S1132B20742F44656D6F2F41524D434D335F4C4DAF -S1132B3033535F454B5F4C4D3353383936325F4323 -S1132B40726F7373776F726B732F426F6F742F6929 -S1132B5064652F2E2E2F6C69622F647269766572FC -S1132B606C69622F666C6173686C69622E63000025 -S1132B70443A2F7573722F6665617365722F736F94 -S1132B806674776172652F4F70656E424C542F5492 -S1132B9061726765742F44656D6F2F41524D434DCB -S1132BA0335F4C4D33535F454B5F4C4D3353383992 -S1132BB036325F43726F7373776F726B732F426F2A -S1132BC06F742F6964652F2E2E2F6C69622F6472C7 -S1132BD0697665726C69622F756172746C69622EB4 -S1132BE063000000443A2F7573722F666561736544 -S1132BF0722F736F6674776172652F4F70656E42C2 -S1132C004C542F5461726765742F44656D6F2F4166 -S1132C10524D434D335F4C4D33535F454B5F4C4DE9 -S1132C203353383936325F43726F7373776F726B15 -S1132C30732F426F6F742F6964652F2E2E2F2E2EE3 -S1132C402F2E2E2F2E2E2F536F757263652F415208 -S1132C504D434D335F4C4D33532F43726F73737732 -S1132C606F726B732F766563746F72732E630000DB -S1132C70004000000020000002000000006000008E -S1132C80002000000300000000800000002000007D -S1132C900400000000A00000002000000500000067 -S1132CA000C00000002000000600000000E000005A -S1132CB000200000070000000000010000200000C8 -S1132CC008000000002001000020000009000000AE -S1132CD000400100002000000A0000000060010024 -S1132CE0002000000B000000008001000020000014 -S1132CF00C00000000A00100002000000D000000F6 -S1132D0000C00100002000000E00000000E00100EF -S1132D10002000000F0000000000020000800000FE -S1132D20100000000080020000800000110000007C -S1132D300000030000800000120000000080030077 -S1132D400080000013000000443A2F7573722F6650 -S1132D5065617365722F736F6674776172652F4F47 -S1132D6070656E424C542F5461726765742F4465CC -S1132D706D6F2F41524D434D335F4C4D33535F457F -S1132D804B5F4C4D3353383936325F43726F737334 -S1132D90776F726B732F426F6F742F6964652F2E78 -S1132DA02E2F2E2E2F2E2E2F2E2E2F536F75726315 -S1132DB0652F41524D434D335F4C4D33532F756155 -S1132DC072742E63000000004F70656E424C540014 -S1132DD0303132333435363738396162636465668D -S1132DE0303132333435363738394142434445463D +S113024048170000701B0000000000200000002080 +S1130250481700004817000048170000481700001E +S1130260481700004817000048170000481700000E +S11302706D1B000000000020E8040020E8040020BA +S10B028068050020890E00004E +S11302888C4AA0F58013811A013B4A4242EB0102D1 +S1130298012B8CBF134642F00103002B40F006816A +S11302A8854BC21A534243EB0203844A904208BF67 +S11302B843F00103002B40F0F980814B814AC3EBE2 +S11302C8000CDCF1000343EB0C03904208BF43F03D +S11302D80103002B40F0EA807B4B02F57852C11AE7 +S11302E84B4243EB0103904208BF43F00103002B48 +S11302F840F0DC80754BC21A534243EB0203744A44 +S1130308904208BF43F00103002B40F0CF80714BAB +S1130318C3EB000CDCF1000343EB0C030332904203 +S113032808BF43F00103002B40F0C0806A4BC11A98 +S11303384B4243EB01030C32904208BF43F00103E4 +S1130348002B40F0B380654BC3EB000CDCF10003D9 +S113035843EB0C033032904208BF43F00103002BF7 +S113036840F0A4805E4BC11A4B4243EB0103C032F8 +S1130378904208BF43F00103002B40F09780A0F19E +S11303884002534243EB0203B0F1102F08BF43F07D +S11303980103002B40F08A80524B534AC3EB000CF4 +S11303A8DCF1000343EB0C03904208BF43F0010364 +S11303B8002B7BD14D4B4E4AC11A4B4243EB0103F0 +S11303C8904208BF43F00103002B6FD1494BC21A76 +S11303D8534243EB0203B0F1101F08BF43F001037B +S11303E8002B63D1444B454AC3EB000CDCF10003FA +S11303F843EB0C03904208BF43F00103002B55D193 +S11304083F4BA2F5F072C11A4B4243EB01039042F1 +S113041808BF43F00103002B48D13A4B3A4AC3EBD7 +S1130428000CDCF1000343EB0C03904208BF43F0DB +S11304380103002B3AD1354BC11A4B4243EB01035C +S11304480332904208BF43F00103002B2ED1304BF6 +S1130458C21A534243EB02032E4A904208BF43F0A8 +S113046801031BBB2C4BC3EB000CDCF1000343EB77 +S11304780C030332904208BF43F00103B3B9A0F15F +S113048820214B42254A43EB0103904208BF43F025 +S113049801036BB9A0F10802534243EB0203204A5B +S11304A8904214BF184643F001007047012070477A +S11304B80120704700011000000210000004100021 +S11304C80001101000021010000410100050102039 +S11304D80100002002000020080000202000002065 +S11304E880000020004000100010101000011020AF +S11304F880000030100000300001001000020010DD +S1130508100000102000003001001010020010102C +S11305180800101001000010020000100100102053 +S11305280010100010B50446FFF7AAFE20B90948C8 +S11305384FF4FC7100F062FF220FA1B2C4F304442B +S113054811FA04F4044B53F822301A6814431C605B +S113055810BD00BFA4170000181800000138FDD111 +S1130568704700004A4B70B51A68044612F0E04F11 +S113057805D01A68474B1340B3F1805F02D1002CB1 +S1130588C0F284804449454A0B68166843F4006302 +S113059823F4800546F4006698070D60166001D5BB +S11305A8A10703D5EB0721D5E0071FD464F00303A3 +S11305B81D40394B002E1D600DDA06F07003A3F1BF +S11305C830014A4242EB0102702B14BF134642F039 +S11305D8010323B906E005F03003302B02D14FF4B0 +S11305E8805001E04FF40020FFF7B8FF25F45E5572 +S11305F843F2F073234025F070051D43284B294A24 +S11306083340294E402126401E4304F0080356EA8D +S1130618C306224B116002F108024BBF1E6015602D +S113062815601E601020FFF799FF204B25F0F86530 +S1130638234025F00305620045EA030526F0FC562D +S113064804F0FC5346EA030641BF194B26F480061E +S1130658234045F480054CBF1E4326F080462305FD +S11306680BD4144A4FF400431168480601D4013BE3 +S1130678FAD125F4006526F40066074B10201D60A6 +S113068810331E60BDE87040FFF768BF70BD00BF3F +S113069800E00F400000FF7060E00F4070E00F4082 +S11306A88FDFFF7F58E00F40302000800300C00731 +S11306B80000404050E00F40624B70B51A68103398 +S11306C81B68002BB4BF03F0700102F0300120292D +S11306D83BD004D871B1102940F0B28010E06029F1 +S11306E85FD070295AD0302908BF47F2305040F003 +S11306F8A7805CE05449C2F3841051F8200056E006 +S11307085249086810F0E04F4ED00C685048204019 +S1130718B0F1805F48D00C684D4820404D4CA04251 +S113072805D1096889B2022908BF4B483FD0474818 +S1130738474904682140494CA14218BF484836D16A +S11307480068474980B2444C23E04049086810F0E7 +S1130758E04F2BD00C683E482040B0F1805F25D094 +S11307680C683B4820403B4CA04205D1096889B23B +S1130778022908BF3B481AD0344835490468214047 +S1130788364CA14218BF384811D100683649354C57 +S113079880B200280CBF2046084608E04FF4004009 +S11307A805E04FF4800002E0304800E03048002BB8 +S11307B802DA13F4006F01E012F4006F28D12D4916 +S11307C8224D09682C6814F0E04F43F6E07401EAFE +S11307D804044FEA541405D02E681D4D3540B5F174 +S11307E8805F05D1023401F01F056043023504E03F +S11307F8604301F01F0501356D00B0FBF5F011F4FD +S1130808804F18BF4008090448BF800842F480029A +S1130818510216D5002B0DDA590005D51A0503D453 +S11308284000C3F3865301E0C3F3C5530133B0FB5F +S1130838F3F070BDC2F3C3520132B0FBF2F070BDE5 +S1130848002070BD60E00F404817000000E00F4032 +S11308580000FF7000000110001BB7000000031027 +S11308680024F400C0C62D0000093D00C0E1E400E6 +S11308787038390064E00F40A0F14022534243EB42 +S113088802033C4A904208BF43F00103002B6CD199 +S1130898394B02F58052C3EB000CDCF1000343EB47 +S11308A80C03904208BF43F00103002B5DD1334B86 +S11308B802F58052C11A4B4243EB0103904208BF30 +S11308C843F00103002B50D12D4B02F58052C3EBAA +S11308D8000CDCF1000343EB0C03904208BF43F027 +S11308E80103002B41D1274B02F58052C11A4B4218 +S11308F843EB0103904208BF43F00103002B34D1BA +S1130908214B02F58052C3EB000CDCF1000343EBEE +S11309180C03904208BF43F0010333BB1B4B02F5A1 +S11309288052C11A4B4243EB0103904208BF43F083 +S11309380103D3B9164B02F58052C3EB000CDCF16A +S1130948000343EB0C03904208BF43F0010373B95F +S1130958104B02F58052C11A4B4243EB01039042FB +S113096814BF184643F00100704701207047012066 +S1130978704700BF00800540005000400060004000 +S113098800700040004002400050024000600240F5 +S11309980070024000D0034070B504461646CDB23C +S11309A8FFF76AFF18B91048E42100F027FD022E6A +S11309B803D90D48E62100F021FDD4F8003416F0DF +S11309C8010F14BF2B43AB4304F580621360D4F8C2 +S11309D8202416F0020F04F5846314BF154322EA99 +S11309E805051D6070BD00BF24180000F0B504465D +S11309F815461F46CEB2FFF73FFF20B94E484FF4C5 +S1130A08DD7100F0FBFC6A1E2B1F18BF0123012AAD +S1130A1894BF002303F0010333B10C2D04D04648DE +S1130A284FF4DF7100F0EAFCB7F1080318BF0123A3 +S1130A380A2F0CBF002303F00103CBB1B7F10C0359 +S1130A4818BF0123092F0CBF002303F001037BB156 +S1130A58B7F10B0318BF01230D2F0CBF002303F0BC +S1130A6801032BB127B1344840F2C51100F0C6FC8C +S1130A78D4F8003515F0010F14BF3343B34304F51C +S1130A88A0621360D4F8042515F0020F04F5A063DE +S1130A9814BF3243B24303F104031A60D4F808358F +S1130AA815F0040F14BF3343B34304F5A162136074 +S1130AB8D4F8183515F0080F14BF3343B34304F5BD +S1130AC8A3621360D4F80C2517F0010F04F5A06392 +S1130AD814BF3243B24303F10C031A60D4F810353F +S1130AE817F0020F14BF3343B34304F5A262136033 +S1130AF8D4F8142517F0040F04F5A26314BF324385 +S1130B08B24303F104031A60D4F81C2517F0080F44 +S1130B1804F5A26303F10C0314BF3243B2431A6011 +S1130B28D4F8282504F5A5630FB9164301E022EA91 +S1130B3806061E60F0BD00BF2418000030B5044648 +S1130B48CDB2FFF799FE20B9084840F21F5100F0D2 +S1130B5855FC204629460222FFF71EFF2046294657 +S1130B6801220823BDE83040FFF740BF24180000E5 +S1130B78830510B5044603D00B48842100F03EFCDD +S1130B880A4B01221A6043F8144C094A143B0833EF +S1130B981A601A689207FCD4064B186810F0010012 +S1130BA818BF4FF0FF3010BD9318000014D00F4049 +S1130BB8020042A40CD00F402DE9F04105468807F5 +S1130BC80C46164603D02848C82100F017FCB10784 +S1130BD803D02548C92100F011FC244B01221A60D6 +S1130BE8234B1B68DA071ED4224B234F234824497E +S1130BF81A462EE024F07F03CCF8003007E0214B9E +S1130C080434434455F8048B043EC3F8008014F0BC +S1130C187C0801D13B680BB9002EF0D110600B6839 +S1130C28DB07FCD405E0184ADFF84CC0174F14481A +S1130C381146002EDED10EE03C6055F804CBC0F816 +S1130C4800C01960D2F800C01CF0010FFAD10434B6 +S1130C58043E002EF0D10E4B186810F0010018BFA6 +S1130C684FF0FF30BDE8F0819318000014D00F4016 +S1130C78A0E10F4008D00F4000D00F4004D00F402F +S1130C88010042A400D10F4020D00F4030D00F40C3 +S1130C980CD00F40094BC21A534243EB0203084AD3 +S1130CA8904208BF43F001032BB9064BC31A5842BC +S1130CB840EB030070470120704700BF00C00040AC +S1130CC800D0004000E0004010B50446FFF7E2FF02 +S1130CD820B908484FF4CF7100F090FBE36A43F061 +S1130CE81003E362236B43F4407343F0010323636B +S1130CF810BD00BF0619000010B50446FFF7CAFF6F +S1130D0820B909484FF4DF7100F078FBA36918078C +S1130D18FCD4E36A23F01003E362236B23F44073E7 +S1130D2823F00103236310BD06190000F0B504463F +S1130D380D4616461F46FFF7ADFF20B92C4840F272 +S1130D480D1100F05BFB26B929484FF4877100F0B8 +S1130D5855FB284B1A6812F0E04F1DD01968264A33 +S1130D680A40B2F1805F17D01968234A0A40234920 +S1130D788A4203D11B689BB2022B0DD01D4A1E4B1D +S1130D8811680B401E498B4208D113689BB2002B93 +S1130D980CBF1023082302E0102300E00823734348 +S1130DA89D4204D2124840F20F1100F027FB20465E +S1130DB8FFF7A2FF236BB5EB061F2BBF23F020031D +S1130DC843F020032363236338BF7608ED00B5FBA3 +S1130DD8F6F60136F3096362C6F345060023204696 +S1130DE8A662E762A361BDE8F040FFF76DBF00BFEC +S1130DF80619000000E00F400000FF700000011019 +S1130E080000031010B50446FFF744FF20B9064854 +S1130E1840F2E93100F0F2FAA36913F0200F14BF8D +S1130E280020012010BD00BF0619000010B50446BB +S1130E38FFF730FF20B9064840F2094100F0DEFA16 +S1130E48A369DB0654BF20684FF0FF3010BD00BF14 +S1130E580619000030B50446CDB2FFF71BFF20B9D0 +S1130E68064840F25B4100F0C9FAA369990602D426 +S1130E782560012030BD002030BD00BF06190000E8 +S1130E8800B50848FFF76EFB0748FFF74BFB4FF028 +S1130E9840200321FFF752FE00F0E0FA00F0E9FADF +S1130EA8FCE700BF8003C0010100002001483C2189 +S1130EB800F0A4BA7819000000B500F0DFF948B1D1 +S1130EC800F006FB044B4FF400521A6042F204038C +S1130ED81B6898475DF804FB08ED00E070B50C4604 +S1130EE895B2064607E014F8013B013D06F8013BBC +S1130EF800F001FBADB2002DF5D170BDFFF739B993 +S1130F0870B50C4D0646002400F0F5FA2B689E4295 +S1130F1809D36A689B189E4205D2064B0C2202FB31 +S1130F280434207A70BD01340C35132CECD1FF2025 +S1130F3870BD00BF041A00002DE9F14105460068A0 +S1130F48FFF7DEFFFF2818D000242F68261DAB59B1 +S1130F5804EB0708009300F0CEFA684641460422E1 +S1130F68FFF72AFE48B9E259009B9A4206D1B6F522 +S1130F78007F3446E9D1012000E00020BDE8F88173 +S1130F88114B30B5984204460D4606D0B1F5005FC2 +S1130F9805D0FFF7D1FF18B910E00C4C00E01C464F +S1130FA8EB050DD12368AB420BD0204640F8045B17 +S1130FB829464FF40072FFF791FF02E0044600E06F +S1130FC80024204630BD00BF000000200402002099 +S1130FD82DE9F0431FFA83F8036821F4FE770133FF +S1130FE804460D46164627F0030706D140F8047B4D +S1130FF839464FF40072FFF771FF2368BB4205D0EE +S113100820463946FFF7BCFF044610B3236840F274 +S1131018FF19ED1A0435651907F5007700F06BFA26 +S1131028231DEB1A4B4506D920463946FFF7A8FF7E +S1131038044680B1051D16F8013B08F1FF381FFA74 +S113104888F805F8013BB8F1000FE7D10120BDE8A5 +S1131058F083BDE8F083BDE8F0830000034A4FF055 +S1131068FF331360024A1360704700BF0402002074 +S11310780000002070B504460E461546FFF740FFF1 +S1131088FF2815D0601E8019FFF73AFFFF280FD0FC +S113109824F4FE7323F00303B3F5005F0CBF054883 +S11310A80548B3B221462A46BDE87040FFF790BF11 +S11310B8002070BD00000020040200202DE9F0414A +S11310C80E460446FFF71CFF013C0546A019FFF72E +S11310D817FFA5F1FF030746584240EB0300FF2F13 +S11310E808BF40F0010000285DD1BD425CD8002D46 +S11310F853D0132F58D82D4E0446B04600F0FBF9B0 +S113110898F80830AB4204D10C204443274B1C59AF +S113111806E00134132C08F10C08EFD14FF0FF342A +S1131128DFF88880002500F0E6F998F80830BB421B +S113113805D10C235D431D4B53F8058006E00135AA +S1131148132D08F10C08EED14FF0FF38002500F0FC +S1131158D2F9337ABB4205D1144B0C2202FB053574 +S11311686B6804E001350C36132DF0D10023C4EB71 +S11311780806F618C6F38F26002509E000F0BBF927 +S11311882046FFF7F5FC04F5806448B90135ADB293 +S1131198B542F3D30120BDE8F0812846BDE8F081CB +S11311A80020BDE8F0810020BDE8F081041A0000A9 +S11311B80F4B01B51A68013217D05A68996842F280 +S11311C8F0008918DA6889181A6989185A69891817 +S11311D89A698918DA698B185B4201AA42F8043DB6 +S11311E804216A46FFF746FF00E0012008BD00BF5E +S11311F80000002042F2040318684FF400531B68EF +S1131208C01842F208031B68C01842F20C031B689A +S1131218C01842F210031B68C01842F214031B687A +S1131228C01842F218031B68C01842F2F0031B6886 +S1131238C018D0F1010038BF002070470A4800B533 +S11312480368013302D0FFF777FE58B107480368F3 +S1131258013306D0FFF770FE003018BF01205DF897 +S113126804FB01205DF804FB0000002004020020B8 +S1131278FFF7F4BEFFF7FEBEFFF720BFFFF7BABFC4 +S113128800B5FFF795FF18B15DF804EBFFF7D6BF7B +S11312985DF804FB054B00224CF24F311A6059608B +S11312A805219A601960024B1A80704710E000E02B +S11312B808040020014B00221A60704710E000E087 +S11312C8044B1B68DB0303D5034B1A8801321A80CD +S11312D8704700BF10E000E00804002000B5FFF7E5 +S11312E8EFFF024B18885DF804FB00BF08040020D8 +S11312F800B50748FFF716F9FFF7DEF90146054878 +S11313084FF4614260235DF804EBFFF70FBD00BFA3 +S11313180100001000C0004070B5CDB2402D064653 +S113132803D91848572100F069F817482946FFF7E8 +S113133891FD40B101E000F0DEF81348FFF762FDCB +S11313480028F8D003E00F485A2100F057F8002489 +S113135814E000F0D0F8315D0B48FFF77BFD40B195 +S113136801E000F0C8F80848FFF74CFD0028F8D061 +S113137803E00448622100F041F80134A3B2AB420F +S1131388E7D370BDE81A000000C00040F0B5174C60 +S1131398064625785DB91648FFF748FD421C1FD05C +S11313A8144B187001232370134B1D7018E0124D51 +S11313B80F482F78FFF73AFD431C13D00D492B78BB +S11313C8CF19787001330A78DBB29A422B700BD1AB +S11313D830460131FFF782FD002323700120F0BD60 +S11313E82846F0BD0020F0BD0020F0BD4C040020CC +S11313F800C000400A0400204B040020034B00B541 +S11314081860034B196000F076F8FCE750040020DC +S11314185404002010B500F06BF801280FD0084CD4 +S11314282378012B0BD1FFF759FF312807D9002363 +S11314382370FFF73FFFBDE81040FFF73DBD10BD27 +S113144858040020044B012200B51A70FFF722FF4C +S11314585DF804EBFFF7DEBF5804002000B500F088 +S113146849F8FFF7EFFFFFF703FF5DF804EB00F01F +S113147809B800B500F03FF800F01AF85DF804EB7D +S1131488FFF7C8BF01B5FF238DF8003000238DF89E +S1131498013000F03BF8FFF72BFF044B1B78012BBE +S11314A802D1684600F050F808BD00BF5904002076 +S11314B800B50648FFF76AFF012804D103485DF820 +S11314C804EB00F041B85DF804FB00BF5A040020A7 +S11314D8704700B5C9B2FFF71FFF5DF804EB00F0D1 +S11314E82BB80000014B01221A70704759040020E0 +S11314F800F01AB870477047034BFE22DA700222D4 +S11315081871A3F8442070479C040020054B00225E +S11315181A709A6483F84320A3F844209A705A7086 +S1131528704700BF9C040020024B1878003018BF95 +S1131538012070479C040020024B002283F84320BA +S1131548704700BF9C04002070B503780546FF2B44 +S1131558784C0FD1E370102301220021237140231A +S113156822706272A27261706171A371E371217257 +S113157808227DE02678012E40F0DB80F32B40D052 +S113158811D8CF2B00F0B78005D8C92B77D0CC2B36 +S113159840F0BA80B6E0D12B00F0A7807CD3D22BE0 +S11315A840F0B28093E0FA2B47D006D8F52B0CD044 +S11315B811D3F62B40F0A8801FE0FD2B4ED0FE2B54 +S11315C859D0FC2B40F0A08046E042783F2A66D8E8 +S11315D8201DA16C06E043783F2B60D84168A164C4 +S11315E84278201DFFF77AFCFF23E3706A78A36C26 +S11315F8D318A3646B78013374E0FF23E370436862 +S113160848E0FF23E3700023A06C69681A4603E0EE +S11316181C5C01331219D2B28B42F9D1454B00211B +S1131628DA71120E9A7201221A7108221972597209 +S113163859719971A3F8442069E0FF23E3703E4B84 +S11316480722A364002323716371A3712372637255 +S1131658A372E271082345E0002056E0FF23627874 +S1131668E370002362712371A371E371237206226C +S1131678A4F844204BE00023237063703DE0421C2F +S11316883F21A06CFFF7F6FD00283BD0FF23E37051 +S1131698A36C3F33A36432E043783E2B01D9222064 +S11316A833E0FF23E370A4F84460417821B9FFF7DD +S11316B8E7FD00282BD125E01E4C821CA06CFFF707 +S11316C8D9FDF8B16A78A36CD318A3641FE0FF238B +S11316D8E3704022002323716371E3712372637200 +S11316E8A2710723A4F8443011E0A06C6968FFF7DD +S11316F8C3FD10B906E0FFF701FCFF23E370A4F86B +S1131708446004E0312000E02020FFF7F5FE094C96 +S113171894F84330012B02D11020FFF7EDFEB4F802 +S113172844100648012384F84330BDE87040FFF7AD +S1131738D0BE70BD9C040020651B00009F040020DF +S113174840420F0000201C0080841E0000802500F9 +S1131758999E36000040380000093D0000803E0094 +S113176800004B00404B4C0000204E00808D5B0075 +S113177800C05D000080700000127A0000007D0047 +S113178880969800001BB7000080BB00C0E8CE001C +S1131798647ADA000024F4000000FA00443A2F7551 +S11317A873722F6665617365722F736F66747761E0 +S11317B872652F4F70656E424C542F546172676581 +S11317C8742F44656D6F2F41524D434D335F4C4D1B +S11317D833535F454B5F4C4D3353383936325F438F +S11317E8726F7373776F726B732F426F6F742F6995 +S11317F864652F2E2E2F6C69622F64726976657268 +S11318086C69622F73797363746C2E630000000033 +S113181800E10F4004E10F4008E10F40443A2F75FE +S113182873722F6665617365722F736F667477615F +S113183872652F4F70656E424C542F546172676500 +S1131848742F44656D6F2F41524D434D335F4C4D9A +S113185833535F454B5F4C4D3353383936325F430E +S1131868726F7373776F726B732F426F6F742F6914 +S113187864652F2E2E2F6C69622F647269766572E7 +S11318886C69622F6770696F2E6300443A2F757311 +S1131898722F6665617365722F736F6674776172F0 +S11318A8652F4F70656E424C542F5461726765748E +S11318B82F44656D6F2F41524D434D335F4C4D336B +S11318C8535F454B5F4C4D3353383936325F43725F +S11318D86F7373776F726B732F426F6F742F6964B2 +S11318E8652F2E2E2F6C69622F6472697665726C6F +S11318F869622F666C6173686C69622E6300443A8E +S11319082F7573722F6665617365722F736F6674B2 +S1131918776172652F4F70656E424C542F54617213 +S11319286765742F44656D6F2F41524D434D335F86 +S11319384C4D33535F454B5F4C4D33533839363236 +S11319485F43726F7373776F726B732F426F6F7429 +S11319582F6964652F2E2E2F6C69622F6472697645 +S113196865726C69622F756172746C69622E6300AA +S1131978443A2F7573722F6665617365722F736F9E +S11319886674776172652F4F70656E424C542F549C +S113199861726765742F44656D6F2F41524D434DD5 +S11319A8335F4C4D33535F454B5F4C4D335338399C +S11319B836325F43726F7373776F726B732F426F34 +S11319C86F742F6964652F2E2E2F2E2E2F2E2E2FF7 +S11319D82E2E2F536F757263652F41524D434D332D +S11319E85F4C4D33532F43726F7373776F726B73FE +S11319F82F766563746F72732E63000000200000F5 +S1131A080020000001000000004000000020000049 +S1131A180200000000600000002000000300000035 +S1131A2800800000002000000400000000A0000066 +S1131A38002000000500000000C000000020000095 +S1131A480600000000E0000000200000070000007D +S1131A580000010000200000080000000020010030 +S1131A6800200000090000000040010000200000E0 +S1131A780A00000000600100002000000B000000C4 +S1131A8800800100002000000C00000000A00100FC +S1131A98002000000D00000000C00100002000002C +S1131AA80E00000000E00100002000000F0000000C +S1131AB80000020000800000100000000080020006 +S1131AC800800000110000000000030000800000F6 +S1131AD812000000008003000080000013000000D2 +S1131AE8443A2F7573722F6665617365722F736F2D +S1131AF86674776172652F4F70656E424C542F542B +S1131B0861726765742F44656D6F2F41524D434D63 +S1131B18335F4C4D33535F454B5F4C4D335338392A +S1131B2836325F43726F7373776F726B732F426FC2 +S1131B386F742F6964652F2E2E2F2E2E2F2E2E2F85 +S1131B482E2E2F536F757263652F41524D434D33BB +S1131B585F4C4D33532F756172742E63004F70655B +S1081B686E424C540024 S903017B80 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzp b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzp index b69127ae..515850d5 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzp +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzs b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzs index e7b59212..6ecce5ff 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzs +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/ide/lm3s8962_crossworks.hzs @@ -26,7 +26,6 @@ - @@ -58,7 +57,9 @@ - + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.elf index 002f8eaa..9d0c4064 100644 Binary files a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.elf and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.map index a3e687ae..62a62d1e 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.map +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.map @@ -35,9 +35,9 @@ Discarded input sections .bss.interruptNesting 0x00000000 0x1 THUMB Debug/../../obj/irq.o .text.IrqInterruptDisable - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text.IrqInterruptRestore - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text 0x00000000 0x0 THUMB Debug/../../obj/led.o .data 0x00000000 0x0 THUMB Debug/../../obj/led.o .bss 0x00000000 0x0 THUMB Debug/../../obj/led.o @@ -57,89 +57,89 @@ Discarded input sections 0x00000000 0x4 THUMB Debug/../../obj/adc.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/adc.o .text.ADCIntRegister - 0x00000000 0x84 THUMB Debug/../../obj/adc.o + 0x00000000 0x9c THUMB Debug/../../obj/adc.o .text.ADCIntUnregister - 0x00000000 0x80 THUMB Debug/../../obj/adc.o - .text.ADCIntDisable - 0x00000000 0x74 THUMB Debug/../../obj/adc.o - .text.ADCIntEnable - 0x00000000 0x84 THUMB Debug/../../obj/adc.o - .text.ADCIntStatus - 0x00000000 0xbc THUMB Debug/../../obj/adc.o - .text.ADCIntClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceEnable - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceDisable - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceConfigure - 0x00000000 0x124 THUMB Debug/../../obj/adc.o - .text.ADCSequenceStepConfigure - 0x00000000 0x1a0 THUMB Debug/../../obj/adc.o - .text.ADCSequenceOverflow - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceOverflowClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceUnderflow - 0x00000000 0x6c THUMB Debug/../../obj/adc.o - .text.ADCSequenceUnderflowClear - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCSequenceDataGet - 0x00000000 0xa4 THUMB Debug/../../obj/adc.o - .text.ADCProcessorTrigger - 0x00000000 0x7c THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleConfigure - 0x00000000 0xbc THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleStepConfigure - 0x00000000 0x188 THUMB Debug/../../obj/adc.o - .text.ADCSoftwareOversampleDataGet - 0x00000000 0x130 THUMB Debug/../../obj/adc.o - .text.ADCHardwareOversampleConfigure - 0x00000000 0xa8 THUMB Debug/../../obj/adc.o - .text.ADCComparatorConfigure - 0x00000000 0x68 THUMB Debug/../../obj/adc.o - .text.ADCComparatorRegionSet - 0x00000000 0xb0 THUMB Debug/../../obj/adc.o - .text.ADCComparatorReset 0x00000000 0x98 THUMB Debug/../../obj/adc.o + .text.ADCIntDisable + 0x00000000 0x80 THUMB Debug/../../obj/adc.o + .text.ADCIntEnable + 0x00000000 0x90 THUMB Debug/../../obj/adc.o + .text.ADCIntStatus + 0x00000000 0xc8 THUMB Debug/../../obj/adc.o + .text.ADCIntClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceEnable + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceDisable + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceConfigure + 0x00000000 0x13c THUMB Debug/../../obj/adc.o + .text.ADCSequenceStepConfigure + 0x00000000 0x1b0 THUMB Debug/../../obj/adc.o + .text.ADCSequenceOverflow + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceOverflowClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceUnderflow + 0x00000000 0x78 THUMB Debug/../../obj/adc.o + .text.ADCSequenceUnderflowClear + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCSequenceDataGet + 0x00000000 0xb0 THUMB Debug/../../obj/adc.o + .text.ADCProcessorTrigger + 0x00000000 0x88 THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleConfigure + 0x00000000 0xd0 THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleStepConfigure + 0x00000000 0x19c THUMB Debug/../../obj/adc.o + .text.ADCSoftwareOversampleDataGet + 0x00000000 0x144 THUMB Debug/../../obj/adc.o + .text.ADCHardwareOversampleConfigure + 0x00000000 0xb4 THUMB Debug/../../obj/adc.o + .text.ADCComparatorConfigure + 0x00000000 0x74 THUMB Debug/../../obj/adc.o + .text.ADCComparatorRegionSet + 0x00000000 0xc8 THUMB Debug/../../obj/adc.o + .text.ADCComparatorReset + 0x00000000 0xa4 THUMB Debug/../../obj/adc.o .text.ADCComparatorIntDisable - 0x00000000 0x74 THUMB Debug/../../obj/adc.o + 0x00000000 0x80 THUMB Debug/../../obj/adc.o .text.ADCComparatorIntEnable - 0x00000000 0x70 THUMB Debug/../../obj/adc.o + 0x00000000 0x7c THUMB Debug/../../obj/adc.o .text.ADCComparatorIntStatus - 0x00000000 0x48 THUMB Debug/../../obj/adc.o - .text.ADCComparatorIntClear - 0x00000000 0x48 THUMB Debug/../../obj/adc.o - .text.ADCReferenceSet - 0x00000000 0x74 THUMB Debug/../../obj/adc.o - .text.ADCReferenceGet 0x00000000 0x4c THUMB Debug/../../obj/adc.o + .text.ADCComparatorIntClear + 0x00000000 0x50 THUMB Debug/../../obj/adc.o + .text.ADCReferenceSet + 0x00000000 0x80 THUMB Debug/../../obj/adc.o + .text.ADCReferenceGet + 0x00000000 0x50 THUMB Debug/../../obj/adc.o .text.ADCPhaseDelaySet - 0x00000000 0xb8 THUMB Debug/../../obj/adc.o + 0x00000000 0xc4 THUMB Debug/../../obj/adc.o .text.ADCPhaseDelayGet - 0x00000000 0x48 THUMB Debug/../../obj/adc.o + 0x00000000 0x4c THUMB Debug/../../obj/adc.o .text 0x00000000 0x0 THUMB Debug/../../obj/comp.o .data 0x00000000 0x0 THUMB Debug/../../obj/comp.o .bss 0x00000000 0x0 THUMB Debug/../../obj/comp.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/comp.o .text.ComparatorConfigure - 0x00000000 0x5c THUMB Debug/../../obj/comp.o - .text.ComparatorRefSet - 0x00000000 0x3c THUMB Debug/../../obj/comp.o - .text.ComparatorValueGet - 0x00000000 0x6c THUMB Debug/../../obj/comp.o - .text.ComparatorIntRegister - 0x00000000 0x80 THUMB Debug/../../obj/comp.o - .text.ComparatorIntUnregister - 0x00000000 0x80 THUMB Debug/../../obj/comp.o - .text.ComparatorIntEnable - 0x00000000 0x64 THUMB Debug/../../obj/comp.o - .text.ComparatorIntDisable 0x00000000 0x68 THUMB Debug/../../obj/comp.o + .text.ComparatorRefSet + 0x00000000 0x40 THUMB Debug/../../obj/comp.o + .text.ComparatorValueGet + 0x00000000 0x78 THUMB Debug/../../obj/comp.o + .text.ComparatorIntRegister + 0x00000000 0x98 THUMB Debug/../../obj/comp.o + .text.ComparatorIntUnregister + 0x00000000 0x98 THUMB Debug/../../obj/comp.o + .text.ComparatorIntEnable + 0x00000000 0x70 THUMB Debug/../../obj/comp.o + .text.ComparatorIntDisable + 0x00000000 0x74 THUMB Debug/../../obj/comp.o .text.ComparatorIntStatus - 0x00000000 0x7c THUMB Debug/../../obj/comp.o + 0x00000000 0x88 THUMB Debug/../../obj/comp.o .text.ComparatorIntClear - 0x00000000 0x54 THUMB Debug/../../obj/comp.o + 0x00000000 0x60 THUMB Debug/../../obj/comp.o .text 0x00000000 0x0 THUMB Debug/../../obj/cpu.o .data 0x00000000 0x0 THUMB Debug/../../obj/cpu.o .bss 0x00000000 0x0 THUMB Debug/../../obj/cpu.o @@ -157,107 +157,107 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/epi.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/epi.o .text.EPIModeSet - 0x00000000 0x64 THUMB Debug/../../obj/epi.o - .text.EPIDividerSet - 0x00000000 0x3c THUMB Debug/../../obj/epi.o - .text.EPIConfigSDRAMSet 0x00000000 0x70 THUMB Debug/../../obj/epi.o - .text.EPIConfigHB8Set - 0x00000000 0xa8 THUMB Debug/../../obj/epi.o - .text.EPIConfigHB16Set - 0x00000000 0xa8 THUMB Debug/../../obj/epi.o - .text.EPIConfigGPModeSet - 0x00000000 0xb0 THUMB Debug/../../obj/epi.o - .text.EPIAddressMapSet - 0x00000000 0x50 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadConfigure - 0x00000000 0xa0 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadStart - 0x00000000 0x78 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadStop - 0x00000000 0x60 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadCount - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadAvail - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet32 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet16 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPINonBlockingReadGet8 - 0x00000000 0xb4 THUMB Debug/../../obj/epi.o - .text.EPIFIFOConfig - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPIWriteFIFOCountGet - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPIIntEnable - 0x00000000 0x5c THUMB Debug/../../obj/epi.o - .text.EPIIntDisable - 0x00000000 0x60 THUMB Debug/../../obj/epi.o - .text.EPIIntStatus - 0x00000000 0x4c THUMB Debug/../../obj/epi.o - .text.EPIIntErrorStatus - 0x00000000 0x38 THUMB Debug/../../obj/epi.o - .text.EPIIntErrorClear - 0x00000000 0x50 THUMB Debug/../../obj/epi.o - .text.EPIIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/epi.o - .text.EPIIntUnregister + .text.EPIDividerSet 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIConfigSDRAMSet + 0x00000000 0x7c THUMB Debug/../../obj/epi.o + .text.EPIConfigHB8Set + 0x00000000 0xb4 THUMB Debug/../../obj/epi.o + .text.EPIConfigHB16Set + 0x00000000 0xb4 THUMB Debug/../../obj/epi.o + .text.EPIConfigGPModeSet + 0x00000000 0xc4 THUMB Debug/../../obj/epi.o + .text.EPIAddressMapSet + 0x00000000 0x5c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadConfigure + 0x00000000 0xb8 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadStart + 0x00000000 0x8c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadStop + 0x00000000 0x6c THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadCount + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadAvail + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet32 + 0x00000000 0xc4 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet16 + 0x00000000 0xc8 THUMB Debug/../../obj/epi.o + .text.EPINonBlockingReadGet8 + 0x00000000 0xc8 THUMB Debug/../../obj/epi.o + .text.EPIFIFOConfig + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPIWriteFIFOCountGet + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIIntEnable + 0x00000000 0x68 THUMB Debug/../../obj/epi.o + .text.EPIIntDisable + 0x00000000 0x6c THUMB Debug/../../obj/epi.o + .text.EPIIntStatus + 0x00000000 0x54 THUMB Debug/../../obj/epi.o + .text.EPIIntErrorStatus + 0x00000000 0x40 THUMB Debug/../../obj/epi.o + .text.EPIIntErrorClear + 0x00000000 0x5c THUMB Debug/../../obj/epi.o + .text.EPIIntRegister + 0x00000000 0x70 THUMB Debug/../../obj/epi.o + .text.EPIIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/epi.o .text 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .data 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .bss 0x00000000 0x0 THUMB Debug/../../obj/ethernet.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/ethernet.o .text.EthernetInitExpClk - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o .text.EthernetConfigSet - 0x00000000 0xcc THUMB Debug/../../obj/ethernet.o + 0x00000000 0xd8 THUMB Debug/../../obj/ethernet.o .text.EthernetConfigGet - 0x00000000 0x68 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetMACAddrSet - 0x00000000 0xa8 THUMB Debug/../../obj/ethernet.o + 0x00000000 0xb4 THUMB Debug/../../obj/ethernet.o .text.EthernetMACAddrGet - 0x00000000 0xa4 THUMB Debug/../../obj/ethernet.o + 0x00000000 0xb0 THUMB Debug/../../obj/ethernet.o .text.EthernetEnable - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o .text.EthernetDisable - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketAvail - 0x00000000 0x48 THUMB Debug/../../obj/ethernet.o - .text.EthernetSpaceAvail 0x00000000 0x4c THUMB Debug/../../obj/ethernet.o + .text.EthernetSpaceAvail + 0x00000000 0x54 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGetInternal 0x00000000 0x1b0 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGetNonBlocking - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x9c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketGet - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x98 THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPutInternal 0x00000000 0x17c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPutNonBlocking - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x9c THUMB Debug/../../obj/ethernet.o .text.EthernetPacketPut - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x98 THUMB Debug/../../obj/ethernet.o .text.EthernetIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o .text.EthernetIntEnable - 0x00000000 0x60 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x6c THUMB Debug/../../obj/ethernet.o .text.EthernetIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x70 THUMB Debug/../../obj/ethernet.o .text.EthernetIntStatus - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x58 THUMB Debug/../../obj/ethernet.o .text.EthernetIntClear - 0x00000000 0x50 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x5c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYWrite - 0x00000000 0x84 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x8c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYRead - 0x00000000 0x80 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x88 THUMB Debug/../../obj/ethernet.o .text.EthernetPHYPowerOff - 0x00000000 0x30 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x3c THUMB Debug/../../obj/ethernet.o .text.EthernetPHYPowerOn - 0x00000000 0x30 THUMB Debug/../../obj/ethernet.o + 0x00000000 0x3c THUMB Debug/../../obj/ethernet.o .text 0x00000000 0x0 THUMB Debug/../../obj/flash.o .data 0x00000000 0x0 THUMB Debug/../../obj/flash.o .bss 0x00000000 0x0 THUMB Debug/../../obj/flash.o @@ -271,25 +271,25 @@ Discarded input sections 0x00000000 0x24 THUMB Debug/../../obj/flash.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/flash.o .text.FlashErase - 0x00000000 0x90 THUMB Debug/../../obj/flash.o + 0x00000000 0x94 THUMB Debug/../../obj/flash.o .text.FlashProgram - 0x00000000 0x17c THUMB Debug/../../obj/flash.o + 0x00000000 0x188 THUMB Debug/../../obj/flash.o .text.FlashProtectGet - 0x00000000 0x114 THUMB Debug/../../obj/flash.o + 0x00000000 0x11c THUMB Debug/../../obj/flash.o .text.FlashProtectSet - 0x00000000 0x23c THUMB Debug/../../obj/flash.o + 0x00000000 0x248 THUMB Debug/../../obj/flash.o .text.FlashProtectSave 0x00000000 0x98 THUMB Debug/../../obj/flash.o .text.FlashUserGet - 0x00000000 0x94 THUMB Debug/../../obj/flash.o + 0x00000000 0xa0 THUMB Debug/../../obj/flash.o .text.FlashUserSet 0x00000000 0x64 THUMB Debug/../../obj/flash.o .text.FlashUserSave 0x00000000 0xb0 THUMB Debug/../../obj/flash.o .text.FlashIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/flash.o + 0x00000000 0x30 THUMB Debug/../../obj/flash.o .text.FlashIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/flash.o + 0x00000000 0x24 THUMB Debug/../../obj/flash.o .text.FlashIntEnable 0x00000000 0x2c THUMB Debug/../../obj/flash.o .text.FlashIntDisable @@ -306,59 +306,59 @@ Discarded input sections .text.GPIOGetIntNumber 0x00000000 0x194 THUMB Debug/../../obj/gpio.o .text.GPIODirModeGet - 0x00000000 0x8c THUMB Debug/../../obj/gpio.o + 0x00000000 0xa0 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeSet - 0x00000000 0x110 THUMB Debug/../../obj/gpio.o + 0x00000000 0x124 THUMB Debug/../../obj/gpio.o .text.GPIOIntTypeGet - 0x00000000 0xb4 THUMB Debug/../../obj/gpio.o + 0x00000000 0xc8 THUMB Debug/../../obj/gpio.o .text.GPIOPadConfigGet - 0x00000000 0x164 THUMB Debug/../../obj/gpio.o + 0x00000000 0x174 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/gpio.o + 0x00000000 0x50 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/gpio.o + 0x00000000 0x54 THUMB Debug/../../obj/gpio.o .text.GPIOPinIntStatus - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x5c THUMB Debug/../../obj/gpio.o .text.GPIOPinIntClear - 0x00000000 0x40 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOPortIntRegister - 0x00000000 0x48 THUMB Debug/../../obj/gpio.o + 0x00000000 0x64 THUMB Debug/../../obj/gpio.o .text.GPIOPortIntUnregister - 0x00000000 0x44 THUMB Debug/../../obj/gpio.o + 0x00000000 0x60 THUMB Debug/../../obj/gpio.o .text.GPIOPinRead - 0x00000000 0x40 THUMB Debug/../../obj/gpio.o + 0x00000000 0x4c THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeADC - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeCAN - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeComparator - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOInput - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeGPIOOutputOD - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2C - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypePWM - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeQEI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeSSI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeTimer - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBDigital - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeUSBAnalog - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeI2S - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEthernetLED - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinTypeEPI - 0x00000000 0x50 THUMB Debug/../../obj/gpio.o + 0x00000000 0x68 THUMB Debug/../../obj/gpio.o .text.GPIOPinConfigure - 0x00000000 0xe0 THUMB Debug/../../obj/gpio.o + 0x00000000 0xec THUMB Debug/../../obj/gpio.o .text 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o .data 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o .bss 0x00000000 0x0 THUMB Debug/../../obj/hibernate.o @@ -372,53 +372,53 @@ Discarded input sections 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/hibernate.o .text.HibernateClockSelect - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x50 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCEnable 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCDisable 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateWakeSet - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x4c THUMB Debug/../../obj/hibernate.o .text.HibernateWakeGet 0x00000000 0x1c THUMB Debug/../../obj/hibernate.o .text.HibernateLowBatSet - 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x50 THUMB Debug/../../obj/hibernate.o .text.HibernateLowBatGet 0x00000000 0x1c THUMB Debug/../../obj/hibernate.o .text.HibernateRTCSet - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCGet 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch0Set - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch0Get 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch1Set - 0x00000000 0x54 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x60 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCMatch1Get 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCTrimSet - 0x00000000 0x6c THUMB Debug/../../obj/hibernate.o + 0x00000000 0x80 THUMB Debug/../../obj/hibernate.o .text.HibernateRTCTrimGet 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o .text.HibernateDataSet - 0x00000000 0xac THUMB Debug/../../obj/hibernate.o + 0x00000000 0xc4 THUMB Debug/../../obj/hibernate.o .text.HibernateDataGet - 0x00000000 0x74 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x80 THUMB Debug/../../obj/hibernate.o .text.HibernateRequest 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/hibernate.o - .text.HibernateIntDisable 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o + .text.HibernateIntDisable + 0x00000000 0x4c THUMB Debug/../../obj/hibernate.o .text.HibernateIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x30 THUMB Debug/../../obj/hibernate.o .text.HibernateIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text.HibernateIntStatus 0x00000000 0x3c THUMB Debug/../../obj/hibernate.o .text.HibernateIntClear - 0x00000000 0x44 THUMB Debug/../../obj/hibernate.o + 0x00000000 0x48 THUMB Debug/../../obj/hibernate.o .text.HibernateIsActive 0x00000000 0x24 THUMB Debug/../../obj/hibernate.o .text 0x00000000 0x0 THUMB Debug/../../obj/i2c.o @@ -426,121 +426,121 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/i2c.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/i2c.o .text.I2CMasterInitExpClk - 0x00000000 0xa0 THUMB Debug/../../obj/i2c.o + 0x00000000 0xac THUMB Debug/../../obj/i2c.o .text.I2CSlaveInit - 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o .text.I2CMasterEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveEnable - 0x00000000 0x5c THUMB Debug/../../obj/i2c.o - .text.I2CMasterDisable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveDisable - 0x00000000 0x5c THUMB Debug/../../obj/i2c.o - .text.I2CIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/i2c.o - .text.I2CIntUnregister 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + .text.I2CMasterDisable + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveDisable + 0x00000000 0x64 THUMB Debug/../../obj/i2c.o + .text.I2CIntRegister + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o + .text.I2CIntUnregister + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o .text.I2CMasterIntEnable - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntEnableEx - 0x00000000 0x54 THUMB Debug/../../obj/i2c.o + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CMasterIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntDisable 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntDisable + 0x00000000 0x58 THUMB Debug/../../obj/i2c.o .text.I2CSlaveIntDisableEx - 0x00000000 0x58 THUMB Debug/../../obj/i2c.o - .text.I2CMasterIntStatus - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntStatus - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntStatusEx - 0x00000000 0xa8 THUMB Debug/../../obj/i2c.o - .text.I2CMasterIntClear - 0x00000000 0x54 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntClear - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveIntClearEx - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CMasterSlaveAddrSet - 0x00000000 0x6c THUMB Debug/../../obj/i2c.o - .text.I2CMasterBusy 0x00000000 0x5c THUMB Debug/../../obj/i2c.o + .text.I2CMasterIntStatus + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntStatus + 0x00000000 0x74 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntStatusEx + 0x00000000 0xb0 THUMB Debug/../../obj/i2c.o + .text.I2CMasterIntClear + 0x00000000 0x5c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntClear + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CSlaveIntClearEx + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o + .text.I2CMasterSlaveAddrSet + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o + .text.I2CMasterBusy + 0x00000000 0x60 THUMB Debug/../../obj/i2c.o .text.I2CMasterBusBusy - 0x00000000 0x58 THUMB Debug/../../obj/i2c.o + 0x00000000 0x60 THUMB Debug/../../obj/i2c.o .text.I2CMasterControl - 0x00000000 0x94 THUMB Debug/../../obj/i2c.o + 0x00000000 0xa0 THUMB Debug/../../obj/i2c.o .text.I2CMasterErr - 0x00000000 0x70 THUMB Debug/../../obj/i2c.o + 0x00000000 0x78 THUMB Debug/../../obj/i2c.o .text.I2CMasterDataPut - 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CMasterDataGet - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveStatus - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o - .text.I2CSlaveDataPut 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveStatus + 0x00000000 0x4c THUMB Debug/../../obj/i2c.o + .text.I2CSlaveDataPut + 0x00000000 0x50 THUMB Debug/../../obj/i2c.o .text.I2CSlaveDataGet - 0x00000000 0x48 THUMB Debug/../../obj/i2c.o + 0x00000000 0x4c THUMB Debug/../../obj/i2c.o .text 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .data 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .bss 0x00000000 0x0 THUMB Debug/../../obj/i2s.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/i2s.o .text.I2STxEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o .text.I2STxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o .text.I2STxDataPut - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + 0x00000000 0x4c THUMB Debug/../../obj/i2s.o .text.I2STxDataPutNonBlocking - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o .text.I2STxConfigSet - 0x00000000 0x8c THUMB Debug/../../obj/i2s.o + 0x00000000 0x98 THUMB Debug/../../obj/i2s.o .text.I2STxFIFOLimitSet - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o + 0x00000000 0x5c THUMB Debug/../../obj/i2s.o .text.I2STxFIFOLimitGet - 0x00000000 0x38 THUMB Debug/../../obj/i2s.o - .text.I2STxFIFOLevelGet - 0x00000000 0x38 THUMB Debug/../../obj/i2s.o - .text.I2SRxEnable - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o - .text.I2SRxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2SRxDataGet - 0x00000000 0x50 THUMB Debug/../../obj/i2s.o - .text.I2SRxDataGetNonBlocking - 0x00000000 0x58 THUMB Debug/../../obj/i2s.o - .text.I2SRxConfigSet - 0x00000000 0xd0 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLimitSet - 0x00000000 0x54 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLimitGet - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2SRxFIFOLevelGet - 0x00000000 0x3c THUMB Debug/../../obj/i2s.o - .text.I2STxRxEnable - 0x00000000 0x5c THUMB Debug/../../obj/i2s.o - .text.I2STxRxDisable - 0x00000000 0x44 THUMB Debug/../../obj/i2s.o - .text.I2STxRxConfigSet - 0x00000000 0xf8 THUMB Debug/../../obj/i2s.o - .text.I2SMasterClockSelect - 0x00000000 0x68 THUMB Debug/../../obj/i2s.o - .text.I2SIntEnable - 0x00000000 0x60 THUMB Debug/../../obj/i2s.o - .text.I2SIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/i2s.o - .text.I2SIntStatus - 0x00000000 0x54 THUMB Debug/../../obj/i2s.o - .text.I2SIntClear - 0x00000000 0x5c THUMB Debug/../../obj/i2s.o - .text.I2SIntRegister - 0x00000000 0x58 THUMB Debug/../../obj/i2s.o - .text.I2SIntUnregister 0x00000000 0x40 THUMB Debug/../../obj/i2s.o + .text.I2STxFIFOLevelGet + 0x00000000 0x40 THUMB Debug/../../obj/i2s.o + .text.I2SRxEnable + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o + .text.I2SRxDisable + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2SRxDataGet + 0x00000000 0x54 THUMB Debug/../../obj/i2s.o + .text.I2SRxDataGetNonBlocking + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2SRxConfigSet + 0x00000000 0xdc THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLimitSet + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLimitGet + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2SRxFIFOLevelGet + 0x00000000 0x44 THUMB Debug/../../obj/i2s.o + .text.I2STxRxEnable + 0x00000000 0x60 THUMB Debug/../../obj/i2s.o + .text.I2STxRxDisable + 0x00000000 0x48 THUMB Debug/../../obj/i2s.o + .text.I2STxRxConfigSet + 0x00000000 0x104 THUMB Debug/../../obj/i2s.o + .text.I2SMasterClockSelect + 0x00000000 0x74 THUMB Debug/../../obj/i2s.o + .text.I2SIntEnable + 0x00000000 0x6c THUMB Debug/../../obj/i2s.o + .text.I2SIntDisable + 0x00000000 0x70 THUMB Debug/../../obj/i2s.o + .text.I2SIntStatus + 0x00000000 0x5c THUMB Debug/../../obj/i2s.o + .text.I2SIntClear + 0x00000000 0x68 THUMB Debug/../../obj/i2s.o + .text.I2SIntRegister + 0x00000000 0x70 THUMB Debug/../../obj/i2s.o + .text.I2SIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/i2s.o .text 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .data 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o .bss 0x00000000 0x0 THUMB Debug/../../obj/interrupt.o @@ -552,54 +552,54 @@ Discarded input sections 0x00000000 0x8 THUMB Debug/../../obj/interrupt.o vtable 0x00000000 0x11c THUMB Debug/../../obj/interrupt.o .text.IntMasterDisable - 0x00000000 0x10 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x18 THUMB Debug/../../obj/interrupt.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/interrupt.o .text.IntRegister - 0x00000000 0xc4 THUMB Debug/../../obj/interrupt.o + 0x00000000 0xd0 THUMB Debug/../../obj/interrupt.o .text.IntUnregister - 0x00000000 0x3c THUMB Debug/../../obj/interrupt.o + 0x00000000 0x44 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingSet - 0x00000000 0x48 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x4c THUMB Debug/../../obj/interrupt.o .text.IntPriorityGroupingGet 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o .text.IntPrioritySet - 0x00000000 0x90 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x94 THUMB Debug/../../obj/interrupt.o .text.IntPriorityGet - 0x00000000 0x54 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x58 THUMB Debug/../../obj/interrupt.o .text.IntEnable - 0x00000000 0xec THUMB Debug/../../obj/interrupt.o + 0x00000000 0xf0 THUMB Debug/../../obj/interrupt.o .text.IntDisable - 0x00000000 0xec THUMB Debug/../../obj/interrupt.o + 0x00000000 0xf0 THUMB Debug/../../obj/interrupt.o .text.IntPendSet - 0x00000000 0xcc THUMB Debug/../../obj/interrupt.o + 0x00000000 0xd0 THUMB Debug/../../obj/interrupt.o .text.IntPendClear - 0x00000000 0xac THUMB Debug/../../obj/interrupt.o + 0x00000000 0xb0 THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskSet - 0x00000000 0x18 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x1c THUMB Debug/../../obj/interrupt.o .text.IntPriorityMaskGet - 0x00000000 0x10 THUMB Debug/../../obj/interrupt.o + 0x00000000 0x14 THUMB Debug/../../obj/interrupt.o .text 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .data 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .bss 0x00000000 0x0 THUMB Debug/../../obj/mpu.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/mpu.o .text.MPUEnable - 0x00000000 0x3c THUMB Debug/../../obj/mpu.o + 0x00000000 0x40 THUMB Debug/../../obj/mpu.o .text.MPUDisable 0x00000000 0x24 THUMB Debug/../../obj/mpu.o .text.MPURegionCountGet 0x00000000 0x20 THUMB Debug/../../obj/mpu.o .text.MPURegionEnable - 0x00000000 0x4c THUMB Debug/../../obj/mpu.o + 0x00000000 0x50 THUMB Debug/../../obj/mpu.o .text.MPURegionDisable - 0x00000000 0x4c THUMB Debug/../../obj/mpu.o + 0x00000000 0x50 THUMB Debug/../../obj/mpu.o .text.MPURegionSet - 0x00000000 0x84 THUMB Debug/../../obj/mpu.o + 0x00000000 0x90 THUMB Debug/../../obj/mpu.o .text.MPURegionGet - 0x00000000 0x80 THUMB Debug/../../obj/mpu.o + 0x00000000 0x90 THUMB Debug/../../obj/mpu.o .text.MPUIntRegister - 0x00000000 0x38 THUMB Debug/../../obj/mpu.o + 0x00000000 0x4c THUMB Debug/../../obj/mpu.o .text.MPUIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/mpu.o + 0x00000000 0x24 THUMB Debug/../../obj/mpu.o .text 0x00000000 0x0 THUMB Debug/../../obj/pwm.o .data 0x00000000 0x0 THUMB Debug/../../obj/pwm.o .bss 0x00000000 0x0 THUMB Debug/../../obj/pwm.o @@ -609,144 +609,144 @@ Discarded input sections 0x00000000 0x58 THUMB Debug/../../obj/pwm.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/pwm.o .text.PWMGenConfigure - 0x00000000 0xa8 THUMB Debug/../../obj/pwm.o + 0x00000000 0xbc THUMB Debug/../../obj/pwm.o .text.PWMGenPeriodSet - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xdc THUMB Debug/../../obj/pwm.o .text.PWMGenPeriodGet - 0x00000000 0x7c THUMB Debug/../../obj/pwm.o + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o .text.PWMGenEnable - 0x00000000 0x60 THUMB Debug/../../obj/pwm.o + 0x00000000 0x74 THUMB Debug/../../obj/pwm.o .text.PWMGenDisable - 0x00000000 0x60 THUMB Debug/../../obj/pwm.o + 0x00000000 0x74 THUMB Debug/../../obj/pwm.o .text.PWMPulseWidthSet - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xd4 THUMB Debug/../../obj/pwm.o .text.PWMPulseWidthGet - 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o + 0x00000000 0xb8 THUMB Debug/../../obj/pwm.o .text.PWMDeadBandEnable - 0x00000000 0xb4 THUMB Debug/../../obj/pwm.o + 0x00000000 0xd4 THUMB Debug/../../obj/pwm.o .text.PWMDeadBandDisable - 0x00000000 0x68 THUMB Debug/../../obj/pwm.o + 0x00000000 0x7c THUMB Debug/../../obj/pwm.o .text.PWMSyncUpdate - 0x00000000 0x50 THUMB Debug/../../obj/pwm.o + 0x00000000 0x5c THUMB Debug/../../obj/pwm.o .text.PWMSyncTimeBase - 0x00000000 0x54 THUMB Debug/../../obj/pwm.o - .text.PWMOutputState - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMOutputInvert - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMOutputFaultLevel - 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o - .text.PWMOutputFault - 0x00000000 0x84 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntRegister - 0x00000000 0x78 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntUnregister - 0x00000000 0x74 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntRegister - 0x00000000 0x44 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntTrigEnable - 0x00000000 0x88 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntTrigDisable - 0x00000000 0x8c THUMB Debug/../../obj/pwm.o - .text.PWMGenIntStatus - 0x00000000 0x74 THUMB Debug/../../obj/pwm.o - .text.PWMGenIntClear - 0x00000000 0x78 THUMB Debug/../../obj/pwm.o - .text.PWMIntEnable 0x00000000 0x60 THUMB Debug/../../obj/pwm.o - .text.PWMIntDisable - 0x00000000 0x64 THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntClear - 0x00000000 0x3c THUMB Debug/../../obj/pwm.o - .text.PWMIntStatus - 0x00000000 0x4c THUMB Debug/../../obj/pwm.o - .text.PWMFaultIntClearExt + .text.PWMOutputState + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMOutputInvert + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMOutputFaultLevel + 0x00000000 0xb8 THUMB Debug/../../obj/pwm.o + .text.PWMOutputFault + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntRegister + 0x00000000 0x98 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntUnregister + 0x00000000 0x94 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntRegister 0x00000000 0x54 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntTrigEnable + 0x00000000 0xa0 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntTrigDisable + 0x00000000 0xa4 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntStatus + 0x00000000 0x84 THUMB Debug/../../obj/pwm.o + .text.PWMGenIntClear + 0x00000000 0x90 THUMB Debug/../../obj/pwm.o + .text.PWMIntEnable + 0x00000000 0x6c THUMB Debug/../../obj/pwm.o + .text.PWMIntDisable + 0x00000000 0x70 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntClear + 0x00000000 0x40 THUMB Debug/../../obj/pwm.o + .text.PWMIntStatus + 0x00000000 0x54 THUMB Debug/../../obj/pwm.o + .text.PWMFaultIntClearExt + 0x00000000 0x60 THUMB Debug/../../obj/pwm.o .text.PWMGenFaultConfigure - 0x00000000 0xc8 THUMB Debug/../../obj/pwm.o + 0x00000000 0xec THUMB Debug/../../obj/pwm.o .text.PWMGenFaultTriggerSet - 0x00000000 0xf4 THUMB Debug/../../obj/pwm.o + 0x00000000 0x11c THUMB Debug/../../obj/pwm.o .text.PWMGenFaultTriggerGet - 0x00000000 0xb0 THUMB Debug/../../obj/pwm.o + 0x00000000 0xcc THUMB Debug/../../obj/pwm.o .text.PWMGenFaultStatus - 0x00000000 0xbc THUMB Debug/../../obj/pwm.o + 0x00000000 0xd8 THUMB Debug/../../obj/pwm.o .text.PWMGenFaultClear - 0x00000000 0x100 THUMB Debug/../../obj/pwm.o + 0x00000000 0x128 THUMB Debug/../../obj/pwm.o .text 0x00000000 0x0 THUMB Debug/../../obj/qei.o .data 0x00000000 0x0 THUMB Debug/../../obj/qei.o .bss 0x00000000 0x0 THUMB Debug/../../obj/qei.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/qei.o .text.QEIEnable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIDisable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIConfigure - 0x00000000 0x5c THUMB Debug/../../obj/qei.o - .text.QEIPositionGet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIPositionSet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIDirectionGet - 0x00000000 0x58 THUMB Debug/../../obj/qei.o - .text.QEIErrorGet 0x00000000 0x50 THUMB Debug/../../obj/qei.o - .text.QEIVelocityEnable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIVelocityDisable - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIVelocityConfigure - 0x00000000 0x90 THUMB Debug/../../obj/qei.o - .text.QEIVelocityGet - 0x00000000 0x48 THUMB Debug/../../obj/qei.o - .text.QEIIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/qei.o - .text.QEIIntUnregister - 0x00000000 0x64 THUMB Debug/../../obj/qei.o - .text.QEIIntEnable + .text.QEIDisable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIConfigure + 0x00000000 0x60 THUMB Debug/../../obj/qei.o + .text.QEIPositionGet + 0x00000000 0x4c THUMB Debug/../../obj/qei.o + .text.QEIPositionSet + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIDirectionGet + 0x00000000 0x60 THUMB Debug/../../obj/qei.o + .text.QEIErrorGet 0x00000000 0x54 THUMB Debug/../../obj/qei.o - .text.QEIIntDisable + .text.QEIVelocityEnable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIVelocityDisable + 0x00000000 0x50 THUMB Debug/../../obj/qei.o + .text.QEIVelocityConfigure + 0x00000000 0xa0 THUMB Debug/../../obj/qei.o + .text.QEIVelocityGet + 0x00000000 0x4c THUMB Debug/../../obj/qei.o + .text.QEIIntRegister + 0x00000000 0x78 THUMB Debug/../../obj/qei.o + .text.QEIIntUnregister + 0x00000000 0x74 THUMB Debug/../../obj/qei.o + .text.QEIIntEnable 0x00000000 0x58 THUMB Debug/../../obj/qei.o - .text.QEIIntStatus + .text.QEIIntDisable 0x00000000 0x5c THUMB Debug/../../obj/qei.o + .text.QEIIntStatus + 0x00000000 0x60 THUMB Debug/../../obj/qei.o .text.QEIIntClear - 0x00000000 0x48 THUMB Debug/../../obj/qei.o + 0x00000000 0x50 THUMB Debug/../../obj/qei.o .text 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .data 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .bss 0x00000000 0x0 THUMB Debug/../../obj/ssi.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/ssi.o .text.SSIConfigSetExpClk - 0x00000000 0x1ac THUMB Debug/../../obj/ssi.o + 0x00000000 0x1d0 THUMB Debug/../../obj/ssi.o .text.SSIEnable - 0x00000000 0x50 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIDisable - 0x00000000 0x50 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIIntRegister - 0x00000000 0x68 THUMB Debug/../../obj/ssi.o + 0x00000000 0x78 THUMB Debug/../../obj/ssi.o .text.SSIIntUnregister - 0x00000000 0x64 THUMB Debug/../../obj/ssi.o + 0x00000000 0x74 THUMB Debug/../../obj/ssi.o .text.SSIIntEnable - 0x00000000 0x54 THUMB Debug/../../obj/ssi.o + 0x00000000 0x58 THUMB Debug/../../obj/ssi.o .text.SSIIntDisable - 0x00000000 0x58 THUMB Debug/../../obj/ssi.o + 0x00000000 0x5c THUMB Debug/../../obj/ssi.o .text.SSIIntStatus - 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + 0x00000000 0x60 THUMB Debug/../../obj/ssi.o .text.SSIIntClear - 0x00000000 0x48 THUMB Debug/../../obj/ssi.o + 0x00000000 0x50 THUMB Debug/../../obj/ssi.o .text.SSIDataPut - 0x00000000 0x84 THUMB Debug/../../obj/ssi.o + 0x00000000 0x90 THUMB Debug/../../obj/ssi.o .text.SSIDataPutNonBlocking - 0x00000000 0x8c THUMB Debug/../../obj/ssi.o + 0x00000000 0x98 THUMB Debug/../../obj/ssi.o .text.SSIDataGet - 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + 0x00000000 0x64 THUMB Debug/../../obj/ssi.o .text.SSIDataGetNonBlocking - 0x00000000 0x68 THUMB Debug/../../obj/ssi.o + 0x00000000 0x6c THUMB Debug/../../obj/ssi.o .text.SSIDMAEnable - 0x00000000 0x54 THUMB Debug/../../obj/ssi.o - .text.SSIDMADisable 0x00000000 0x58 THUMB Debug/../../obj/ssi.o - .text.SSIBusy 0x00000000 0x54 THUMB Debug/../../obj/ssi.o + .text.SSIDMADisable + 0x00000000 0x5c THUMB Debug/../../obj/ssi.o + .text.SSIBusy 0x00000000 0x5c THUMB Debug/../../obj/ssi.o .text 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .data 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o .bss 0x00000000 0x0 THUMB Debug/../../obj/sysctl.o @@ -763,27 +763,27 @@ Discarded input sections .text.SysCtlFlashSizeGet 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o .text.SysCtlPinPresent - 0x00000000 0x128 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x12c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralPresent - 0x00000000 0x98 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa4 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralReset - 0x00000000 0xd0 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xdc THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepEnable - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x7c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralSleepDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepEnable - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x7c THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralDeepSleepDisable - 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x80 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralClockGating 0x00000000 0x4c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntRegister - 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x30 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntUnregister - 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlIntEnable 0x00000000 0x2c THUMB Debug/../../obj/sysctl.o .text.SysCtlIntDisable @@ -793,31 +793,31 @@ Discarded input sections .text.SysCtlIntStatus 0x00000000 0x34 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOSet - 0x00000000 0x70 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x74 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOGet 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlLDOConfigSet - 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlReset 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlSleep - 0x00000000 0xc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x10 THUMB Debug/../../obj/sysctl.o .text.SysCtlDeepSleep - 0x00000000 0x3c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseGet 0x00000000 0x18 THUMB Debug/../../obj/sysctl.o .text.SysCtlResetCauseClear 0x00000000 0x30 THUMB Debug/../../obj/sysctl.o .text.SysCtlBrownOutConfigSet - 0x00000000 0x5c THUMB Debug/../../obj/sysctl.o + 0x00000000 0x68 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockSet - 0x00000000 0x94 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa0 THUMB Debug/../../obj/sysctl.o .text.SysCtlPWMClockGet - 0x00000000 0x50 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x58 THUMB Debug/../../obj/sysctl.o .text.SysCtlADCSpeedSet - 0x00000000 0x98 THUMB Debug/../../obj/sysctl.o + 0x00000000 0xa4 THUMB Debug/../../obj/sysctl.o .text.SysCtlADCSpeedGet - 0x00000000 0x38 THUMB Debug/../../obj/sysctl.o + 0x00000000 0x40 THUMB Debug/../../obj/sysctl.o .text.SysCtlIOSCVerificationSet 0x00000000 0x4c THUMB Debug/../../obj/sysctl.o .text.SysCtlMOSCVerificationSet @@ -827,22 +827,22 @@ Discarded input sections .text.SysCtlClkVerificationClear 0x00000000 0x28 THUMB Debug/../../obj/sysctl.o .text.SysCtlGPIOAHBEnable - 0x00000000 0xc0 THUMB Debug/../../obj/sysctl.o - .text.SysCtlGPIOAHBDisable 0x00000000 0xc4 THUMB Debug/../../obj/sysctl.o + .text.SysCtlGPIOAHBDisable + 0x00000000 0xc8 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLEnable 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlUSBPLLDisable 0x00000000 0x24 THUMB Debug/../../obj/sysctl.o .text.SysCtlI2SMClkSet - 0x00000000 0x1cc THUMB Debug/../../obj/sysctl.o + 0x00000000 0x1d0 THUMB Debug/../../obj/sysctl.o .text 0x00000000 0x0 THUMB Debug/../../obj/systick.o .data 0x00000000 0x0 THUMB Debug/../../obj/systick.o .bss 0x00000000 0x0 THUMB Debug/../../obj/systick.o .text.SysTickIntRegister - 0x00000000 0x34 THUMB Debug/../../obj/systick.o + 0x00000000 0x38 THUMB Debug/../../obj/systick.o .text.SysTickIntUnregister - 0x00000000 0x28 THUMB Debug/../../obj/systick.o + 0x00000000 0x2c THUMB Debug/../../obj/systick.o .text.SysTickPeriodGet 0x00000000 0x1c THUMB Debug/../../obj/systick.o .text.SysTickValueGet @@ -854,132 +854,132 @@ Discarded input sections 0x00000000 0x58 THUMB Debug/../../obj/timer.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/timer.o .text.TimerEnable - 0x00000000 0x74 THUMB Debug/../../obj/timer.o - .text.TimerDisable - 0x00000000 0x78 THUMB Debug/../../obj/timer.o - .text.TimerConfigure - 0x00000000 0x154 THUMB Debug/../../obj/timer.o - .text.TimerControlLevel - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerControlTrigger - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerControlEvent 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerDisable + 0x00000000 0x88 THUMB Debug/../../obj/timer.o + .text.TimerConfigure + 0x00000000 0x16c THUMB Debug/../../obj/timer.o + .text.TimerControlLevel + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o + .text.TimerControlTrigger + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o + .text.TimerControlEvent + 0x00000000 0x98 THUMB Debug/../../obj/timer.o .text.TimerControlStall - 0x00000000 0x94 THUMB Debug/../../obj/timer.o + 0x00000000 0xa4 THUMB Debug/../../obj/timer.o .text.TimerControlWaitOnTrigger - 0x00000000 0xcc THUMB Debug/../../obj/timer.o + 0x00000000 0xe0 THUMB Debug/../../obj/timer.o .text.TimerRTCEnable - 0x00000000 0x40 THUMB Debug/../../obj/timer.o - .text.TimerRTCDisable - 0x00000000 0x40 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleSet - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleGet - 0x00000000 0x70 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleMatchSet - 0x00000000 0x94 THUMB Debug/../../obj/timer.o - .text.TimerPrescaleMatchGet - 0x00000000 0x70 THUMB Debug/../../obj/timer.o - .text.TimerLoadSet - 0x00000000 0x80 THUMB Debug/../../obj/timer.o - .text.TimerLoadGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerValueGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerMatchSet - 0x00000000 0x80 THUMB Debug/../../obj/timer.o - .text.TimerMatchGet - 0x00000000 0x68 THUMB Debug/../../obj/timer.o - .text.TimerIntRegister - 0x00000000 0xd4 THUMB Debug/../../obj/timer.o - .text.TimerIntUnregister - 0x00000000 0xd0 THUMB Debug/../../obj/timer.o - .text.TimerIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/timer.o - .text.TimerIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/timer.o - .text.TimerIntStatus 0x00000000 0x4c THUMB Debug/../../obj/timer.o + .text.TimerRTCDisable + 0x00000000 0x4c THUMB Debug/../../obj/timer.o + .text.TimerPrescaleSet + 0x00000000 0xac THUMB Debug/../../obj/timer.o + .text.TimerPrescaleGet + 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerPrescaleMatchSet + 0x00000000 0xac THUMB Debug/../../obj/timer.o + .text.TimerPrescaleMatchGet + 0x00000000 0x84 THUMB Debug/../../obj/timer.o + .text.TimerLoadSet + 0x00000000 0x90 THUMB Debug/../../obj/timer.o + .text.TimerLoadGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerValueGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerMatchSet + 0x00000000 0x90 THUMB Debug/../../obj/timer.o + .text.TimerMatchGet + 0x00000000 0x78 THUMB Debug/../../obj/timer.o + .text.TimerIntRegister + 0x00000000 0x100 THUMB Debug/../../obj/timer.o + .text.TimerIntUnregister + 0x00000000 0xf8 THUMB Debug/../../obj/timer.o + .text.TimerIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/timer.o + .text.TimerIntDisable + 0x00000000 0x54 THUMB Debug/../../obj/timer.o + .text.TimerIntStatus + 0x00000000 0x58 THUMB Debug/../../obj/timer.o .text.TimerIntClear - 0x00000000 0x38 THUMB Debug/../../obj/timer.o + 0x00000000 0x44 THUMB Debug/../../obj/timer.o .text.TimerQuiesce - 0x00000000 0x10c THUMB Debug/../../obj/timer.o + 0x00000000 0x11c THUMB Debug/../../obj/timer.o .text 0x00000000 0x0 THUMB Debug/../../obj/uart.o .data 0x00000000 0x0 THUMB Debug/../../obj/uart.o .bss 0x00000000 0x0 THUMB Debug/../../obj/uart.o .text.UARTParityModeSet - 0x00000000 0x74 THUMB Debug/../../obj/uart.o + 0x00000000 0x88 THUMB Debug/../../obj/uart.o .text.UARTParityModeGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o + 0x00000000 0x48 THUMB Debug/../../obj/uart.o .text.UARTFIFOLevelSet - 0x00000000 0x9c THUMB Debug/../../obj/uart.o + 0x00000000 0xb4 THUMB Debug/../../obj/uart.o .text.UARTFIFOLevelGet - 0x00000000 0x50 THUMB Debug/../../obj/uart.o - .text.UARTConfigGetExpClk - 0x00000000 0x8c THUMB Debug/../../obj/uart.o - .text.UARTFIFOEnable - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTFIFODisable - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTEnableSIR - 0x00000000 0x60 THUMB Debug/../../obj/uart.o - .text.UARTDisableSIR - 0x00000000 0x40 THUMB Debug/../../obj/uart.o - .text.UARTSmartCardEnable - 0x00000000 0xe0 THUMB Debug/../../obj/uart.o - .text.UARTSmartCardDisable - 0x00000000 0xbc THUMB Debug/../../obj/uart.o - .text.UARTModemControlSet - 0x00000000 0xe8 THUMB Debug/../../obj/uart.o - .text.UARTModemControlClear - 0x00000000 0xec THUMB Debug/../../obj/uart.o - .text.UARTModemControlGet - 0x00000000 0xb8 THUMB Debug/../../obj/uart.o - .text.UARTModemStatusGet - 0x00000000 0xbc THUMB Debug/../../obj/uart.o - .text.UARTFlowControlSet - 0x00000000 0xdc THUMB Debug/../../obj/uart.o - .text.UARTFlowControlGet - 0x00000000 0xb8 THUMB Debug/../../obj/uart.o - .text.UARTTxIntModeSet - 0x00000000 0x64 THUMB Debug/../../obj/uart.o - .text.UARTTxIntModeGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o - .text.UARTCharsAvail - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTSpaceAvail - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTCharGet - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTCharPutNonBlocking - 0x00000000 0x54 THUMB Debug/../../obj/uart.o - .text.UARTCharPut - 0x00000000 0x48 THUMB Debug/../../obj/uart.o - .text.UARTBreakCtl 0x00000000 0x5c THUMB Debug/../../obj/uart.o - .text.UARTBusy - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTIntRegister - 0x00000000 0x6c THUMB Debug/../../obj/uart.o - .text.UARTIntUnregister - 0x00000000 0x68 THUMB Debug/../../obj/uart.o - .text.UARTIntEnable - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTIntDisable - 0x00000000 0x48 THUMB Debug/../../obj/uart.o - .text.UARTIntStatus + .text.UARTConfigGetExpClk + 0x00000000 0x98 THUMB Debug/../../obj/uart.o + .text.UARTFIFOEnable 0x00000000 0x4c THUMB Debug/../../obj/uart.o - .text.UARTIntClear - 0x00000000 0x38 THUMB Debug/../../obj/uart.o - .text.UARTDMAEnable - 0x00000000 0x44 THUMB Debug/../../obj/uart.o - .text.UARTDMADisable + .text.UARTFIFODisable + 0x00000000 0x4c THUMB Debug/../../obj/uart.o + .text.UARTEnableSIR + 0x00000000 0x6c THUMB Debug/../../obj/uart.o + .text.UARTDisableSIR + 0x00000000 0x4c THUMB Debug/../../obj/uart.o + .text.UARTSmartCardEnable + 0x00000000 0xf4 THUMB Debug/../../obj/uart.o + .text.UARTSmartCardDisable + 0x00000000 0xd0 THUMB Debug/../../obj/uart.o + .text.UARTModemControlSet + 0x00000000 0xf8 THUMB Debug/../../obj/uart.o + .text.UARTModemControlClear + 0x00000000 0xfc THUMB Debug/../../obj/uart.o + .text.UARTModemControlGet + 0x00000000 0xc4 THUMB Debug/../../obj/uart.o + .text.UARTModemStatusGet + 0x00000000 0xc8 THUMB Debug/../../obj/uart.o + .text.UARTFlowControlSet + 0x00000000 0xf4 THUMB Debug/../../obj/uart.o + .text.UARTFlowControlGet + 0x00000000 0xc8 THUMB Debug/../../obj/uart.o + .text.UARTTxIntModeSet + 0x00000000 0x74 THUMB Debug/../../obj/uart.o + .text.UARTTxIntModeGet 0x00000000 0x48 THUMB Debug/../../obj/uart.o + .text.UARTCharsAvail + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTSpaceAvail + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTCharGet + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTCharPutNonBlocking + 0x00000000 0x60 THUMB Debug/../../obj/uart.o + .text.UARTCharPut + 0x00000000 0x54 THUMB Debug/../../obj/uart.o + .text.UARTBreakCtl + 0x00000000 0x68 THUMB Debug/../../obj/uart.o + .text.UARTBusy + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTIntRegister + 0x00000000 0x84 THUMB Debug/../../obj/uart.o + .text.UARTIntUnregister + 0x00000000 0x80 THUMB Debug/../../obj/uart.o + .text.UARTIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTIntDisable + 0x00000000 0x54 THUMB Debug/../../obj/uart.o + .text.UARTIntStatus + 0x00000000 0x58 THUMB Debug/../../obj/uart.o + .text.UARTIntClear + 0x00000000 0x44 THUMB Debug/../../obj/uart.o + .text.UARTDMAEnable + 0x00000000 0x50 THUMB Debug/../../obj/uart.o + .text.UARTDMADisable + 0x00000000 0x54 THUMB Debug/../../obj/uart.o .text.UARTRxErrorGet - 0x00000000 0x3c THUMB Debug/../../obj/uart.o + 0x00000000 0x48 THUMB Debug/../../obj/uart.o .text.UARTRxErrorClear - 0x00000000 0x38 THUMB Debug/../../obj/uart.o + 0x00000000 0x44 THUMB Debug/../../obj/uart.o .text 0x00000000 0x0 THUMB Debug/../../obj/udma.o .data 0x00000000 0x0 THUMB Debug/../../obj/udma.o .bss 0x00000000 0x0 THUMB Debug/../../obj/udma.o @@ -993,167 +993,167 @@ Discarded input sections 0x00000000 0x18 THUMB Debug/../../obj/udma.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/udma.o .text.uDMAChannelEnable - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelDisable - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelIsEnabled - 0x00000000 0x48 THUMB Debug/../../obj/udma.o + 0x00000000 0x50 THUMB Debug/../../obj/udma.o .text.uDMAControlBaseSet - 0x00000000 0x58 THUMB Debug/../../obj/udma.o + 0x00000000 0x64 THUMB Debug/../../obj/udma.o .text.uDMAControlBaseGet 0x00000000 0x18 THUMB Debug/../../obj/udma.o .text.uDMAControlAlternateBaseGet 0x00000000 0x18 THUMB Debug/../../obj/udma.o .text.uDMAChannelRequest - 0x00000000 0x3c THUMB Debug/../../obj/udma.o + 0x00000000 0x40 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeEnable - 0x00000000 0xbc THUMB Debug/../../obj/udma.o + 0x00000000 0xc8 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeDisable - 0x00000000 0xbc THUMB Debug/../../obj/udma.o + 0x00000000 0xc8 THUMB Debug/../../obj/udma.o .text.uDMAChannelAttributeGet - 0x00000000 0xb8 THUMB Debug/../../obj/udma.o + 0x00000000 0xc0 THUMB Debug/../../obj/udma.o .text.uDMAChannelControlSet - 0x00000000 0x78 THUMB Debug/../../obj/udma.o - .text.uDMAChannelTransferSet - 0x00000000 0x1b0 THUMB Debug/../../obj/udma.o - .text.uDMAChannelScatterGatherSet - 0x00000000 0x110 THUMB Debug/../../obj/udma.o - .text.uDMAChannelSizeGet - 0x00000000 0x7c THUMB Debug/../../obj/udma.o - .text.uDMAChannelModeGet 0x00000000 0x84 THUMB Debug/../../obj/udma.o + .text.uDMAChannelTransferSet + 0x00000000 0x1d4 THUMB Debug/../../obj/udma.o + .text.uDMAChannelScatterGatherSet + 0x00000000 0x12c THUMB Debug/../../obj/udma.o + .text.uDMAChannelSizeGet + 0x00000000 0x88 THUMB Debug/../../obj/udma.o + .text.uDMAChannelModeGet + 0x00000000 0x90 THUMB Debug/../../obj/udma.o .text.uDMAChannelSelectSecondary 0x00000000 0x2c THUMB Debug/../../obj/udma.o .text.uDMAChannelSelectDefault 0x00000000 0x30 THUMB Debug/../../obj/udma.o .text.uDMAIntRegister - 0x00000000 0x54 THUMB Debug/../../obj/udma.o + 0x00000000 0x6c THUMB Debug/../../obj/udma.o .text.uDMAIntUnregister - 0x00000000 0x1c THUMB Debug/../../obj/udma.o + 0x00000000 0x28 THUMB Debug/../../obj/udma.o .text 0x00000000 0x0 THUMB Debug/../../obj/usb.o .data 0x00000000 0x0 THUMB Debug/../../obj/usb.o .bss 0x00000000 0x0 THUMB Debug/../../obj/usb.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/usb.o .text.USBIndexWrite - 0x00000000 0xbc THUMB Debug/../../obj/usb.o + 0x00000000 0xd0 THUMB Debug/../../obj/usb.o .text.USBIndexRead - 0x00000000 0xbc THUMB Debug/../../obj/usb.o - .text.USBHostSuspend - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBHostReset - 0x00000000 0x6c THUMB Debug/../../obj/usb.o - .text.USBHostResume - 0x00000000 0x6c THUMB Debug/../../obj/usb.o - .text.USBHostSpeedGet - 0x00000000 0x64 THUMB Debug/../../obj/usb.o - .text.USBIntStatus - 0x00000000 0xdc THUMB Debug/../../obj/usb.o - .text.USBIntDisable - 0x00000000 0x110 THUMB Debug/../../obj/usb.o - .text.USBIntEnable - 0x00000000 0xfc THUMB Debug/../../obj/usb.o - .text.USBIntDisableControl - 0x00000000 0xa4 THUMB Debug/../../obj/usb.o - .text.USBIntEnableControl - 0x00000000 0xa0 THUMB Debug/../../obj/usb.o - .text.USBIntStatusControl - 0x00000000 0xb4 THUMB Debug/../../obj/usb.o - .text.USBIntDisableEndpoint - 0x00000000 0x80 THUMB Debug/../../obj/usb.o - .text.USBIntEnableEndpoint - 0x00000000 0x74 THUMB Debug/../../obj/usb.o - .text.USBIntStatusEndpoint - 0x00000000 0x54 THUMB Debug/../../obj/usb.o - .text.USBIntRegister - 0x00000000 0x44 THUMB Debug/../../obj/usb.o - .text.USBIntUnregister - 0x00000000 0x40 THUMB Debug/../../obj/usb.o - .text.USBEndpointStatus 0x00000000 0xcc THUMB Debug/../../obj/usb.o - .text.USBHostEndpointStatusClear - 0x00000000 0x120 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStatusClear - 0x00000000 0x170 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointDataToggle - 0x00000000 0x184 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataToggleClear - 0x00000000 0xe8 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStall - 0x00000000 0x128 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointStallClear - 0x00000000 0x168 THUMB Debug/../../obj/usb.o - .text.USBDevConnect - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBDevDisconnect - 0x00000000 0x48 THUMB Debug/../../obj/usb.o - .text.USBDevAddrSet - 0x00000000 0x38 THUMB Debug/../../obj/usb.o - .text.USBDevAddrGet - 0x00000000 0x38 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointConfig - 0x00000000 0x260 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointConfigSet - 0x00000000 0x1b4 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointConfigGet - 0x00000000 0x1f0 THUMB Debug/../../obj/usb.o - .text.USBFIFOConfigSet + .text.USBHostSuspend + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBHostReset + 0x00000000 0x70 THUMB Debug/../../obj/usb.o + .text.USBHostResume + 0x00000000 0x70 THUMB Debug/../../obj/usb.o + .text.USBHostSpeedGet + 0x00000000 0x6c THUMB Debug/../../obj/usb.o + .text.USBIntStatus + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o + .text.USBIntDisable 0x00000000 0x11c THUMB Debug/../../obj/usb.o + .text.USBIntEnable + 0x00000000 0x108 THUMB Debug/../../obj/usb.o + .text.USBIntDisableControl + 0x00000000 0xb0 THUMB Debug/../../obj/usb.o + .text.USBIntEnableControl + 0x00000000 0xac THUMB Debug/../../obj/usb.o + .text.USBIntStatusControl + 0x00000000 0xb8 THUMB Debug/../../obj/usb.o + .text.USBIntDisableEndpoint + 0x00000000 0x84 THUMB Debug/../../obj/usb.o + .text.USBIntEnableEndpoint + 0x00000000 0x78 THUMB Debug/../../obj/usb.o + .text.USBIntStatusEndpoint + 0x00000000 0x58 THUMB Debug/../../obj/usb.o + .text.USBIntRegister + 0x00000000 0x54 THUMB Debug/../../obj/usb.o + .text.USBIntUnregister + 0x00000000 0x50 THUMB Debug/../../obj/usb.o + .text.USBEndpointStatus + 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + .text.USBHostEndpointStatusClear + 0x00000000 0x12c THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStatusClear + 0x00000000 0x17c THUMB Debug/../../obj/usb.o + .text.USBHostEndpointDataToggle + 0x00000000 0x190 THUMB Debug/../../obj/usb.o + .text.USBEndpointDataToggleClear + 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStall + 0x00000000 0x138 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointStallClear + 0x00000000 0x178 THUMB Debug/../../obj/usb.o + .text.USBDevConnect + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBDevDisconnect + 0x00000000 0x4c THUMB Debug/../../obj/usb.o + .text.USBDevAddrSet + 0x00000000 0x40 THUMB Debug/../../obj/usb.o + .text.USBDevAddrGet + 0x00000000 0x3c THUMB Debug/../../obj/usb.o + .text.USBHostEndpointConfig + 0x00000000 0x274 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointConfigSet + 0x00000000 0x1c0 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointConfigGet + 0x00000000 0x204 THUMB Debug/../../obj/usb.o + .text.USBFIFOConfigSet + 0x00000000 0x140 THUMB Debug/../../obj/usb.o .text.USBFIFOConfigGet - 0x00000000 0x124 THUMB Debug/../../obj/usb.o + 0x00000000 0x148 THUMB Debug/../../obj/usb.o .text.USBEndpointDMAEnable 0x00000000 0x78 THUMB Debug/../../obj/usb.o .text.USBEndpointDMADisable 0x00000000 0x78 THUMB Debug/../../obj/usb.o .text.USBEndpointDataAvail - 0x00000000 0xe0 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataGet - 0x00000000 0x138 THUMB Debug/../../obj/usb.o - .text.USBDevEndpointDataAck - 0x00000000 0xe8 THUMB Debug/../../obj/usb.o - .text.USBHostEndpointDataAck - 0x00000000 0xe0 THUMB Debug/../../obj/usb.o - .text.USBEndpointDataPut - 0x00000000 0x10c THUMB Debug/../../obj/usb.o - .text.USBEndpointDataSend 0x00000000 0xec THUMB Debug/../../obj/usb.o + .text.USBEndpointDataGet + 0x00000000 0x144 THUMB Debug/../../obj/usb.o + .text.USBDevEndpointDataAck + 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + .text.USBHostEndpointDataAck + 0x00000000 0xec THUMB Debug/../../obj/usb.o + .text.USBEndpointDataPut + 0x00000000 0x118 THUMB Debug/../../obj/usb.o + .text.USBEndpointDataSend + 0x00000000 0xf8 THUMB Debug/../../obj/usb.o .text.USBFIFOFlush - 0x00000000 0x148 THUMB Debug/../../obj/usb.o + 0x00000000 0x154 THUMB Debug/../../obj/usb.o .text.USBHostRequestIN - 0x00000000 0xc4 THUMB Debug/../../obj/usb.o + 0x00000000 0xd0 THUMB Debug/../../obj/usb.o .text.USBHostRequestStatus - 0x00000000 0x3c THUMB Debug/../../obj/usb.o + 0x00000000 0x40 THUMB Debug/../../obj/usb.o .text.USBHostAddrSet - 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + 0x00000000 0xe4 THUMB Debug/../../obj/usb.o .text.USBHostAddrGet - 0x00000000 0xd4 THUMB Debug/../../obj/usb.o + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o .text.USBHostHubAddrSet - 0x00000000 0xd8 THUMB Debug/../../obj/usb.o + 0x00000000 0xe4 THUMB Debug/../../obj/usb.o .text.USBHostHubAddrGet - 0x00000000 0xd4 THUMB Debug/../../obj/usb.o + 0x00000000 0xe0 THUMB Debug/../../obj/usb.o .text.USBHostPwrConfig - 0x00000000 0x84 THUMB Debug/../../obj/usb.o + 0x00000000 0x90 THUMB Debug/../../obj/usb.o .text.USBHostPwrFaultEnable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrFaultDisable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrEnable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBHostPwrDisable - 0x00000000 0x48 THUMB Debug/../../obj/usb.o + 0x00000000 0x4c THUMB Debug/../../obj/usb.o .text.USBFrameNumberGet - 0x00000000 0x3c THUMB Debug/../../obj/usb.o + 0x00000000 0x40 THUMB Debug/../../obj/usb.o .text.USBOTGSessionRequest - 0x00000000 0x6c THUMB Debug/../../obj/usb.o + 0x00000000 0x70 THUMB Debug/../../obj/usb.o .text.USBFIFOAddrGet 0x00000000 0x24 THUMB Debug/../../obj/usb.o .text.USBModeGet - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBEndpointDMAChannel - 0x00000000 0xf4 THUMB Debug/../../obj/usb.o + 0x00000000 0x108 THUMB Debug/../../obj/usb.o .text.USBHostMode - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBDevMode - 0x00000000 0x40 THUMB Debug/../../obj/usb.o + 0x00000000 0x44 THUMB Debug/../../obj/usb.o .text.USBPHYPowerOff 0x00000000 0x2c THUMB Debug/../../obj/usb.o .text.USBPHYPowerOn @@ -1163,39 +1163,39 @@ Discarded input sections .bss 0x00000000 0x0 THUMB Debug/../../obj/watchdog.o .rodata 0x00000000 0x74 THUMB Debug/../../obj/watchdog.o .text.WatchdogRunning - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogResetEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogResetDisable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogLock - 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o .text.WatchdogUnlock - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogLockState - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogReloadSet - 0x00000000 0x40 THUMB Debug/../../obj/watchdog.o - .text.WatchdogReloadGet - 0x00000000 0x3c THUMB Debug/../../obj/watchdog.o - .text.WatchdogValueGet - 0x00000000 0x40 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntRegister - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntUnregister - 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntStatus - 0x00000000 0x54 THUMB Debug/../../obj/watchdog.o - .text.WatchdogIntClear 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + .text.WatchdogReloadGet + 0x00000000 0x44 THUMB Debug/../../obj/watchdog.o + .text.WatchdogValueGet + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntRegister + 0x00000000 0x5c THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntUnregister + 0x00000000 0x58 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntEnable + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntStatus + 0x00000000 0x5c THUMB Debug/../../obj/watchdog.o + .text.WatchdogIntClear + 0x00000000 0x48 THUMB Debug/../../obj/watchdog.o .text.WatchdogStallEnable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text.WatchdogStallDisable - 0x00000000 0x4c THUMB Debug/../../obj/watchdog.o + 0x00000000 0x50 THUMB Debug/../../obj/watchdog.o .text 0x00000000 0x0 THUMB Debug/../../obj/can.o .data 0x00000000 0x0 THUMB Debug/../../obj/can.o .bss 0x00000000 0x0 THUMB Debug/../../obj/can.o @@ -1207,50 +1207,50 @@ Discarded input sections 0x00000000 0x5c THUMB Debug/../../obj/can.o .rodata 0x00000000 0x70 THUMB Debug/../../obj/can.o .text.CANRegRead - 0x00000000 0x94 THUMB Debug/../../obj/can.o + 0x00000000 0xac THUMB Debug/../../obj/can.o .text.CANRegWrite 0x00000000 0x30 THUMB Debug/../../obj/can.o .text.CANDataRegWrite - 0x00000000 0x6c THUMB Debug/../../obj/can.o + 0x00000000 0x70 THUMB Debug/../../obj/can.o .text.CANDataRegRead - 0x00000000 0x6c THUMB Debug/../../obj/can.o - .text.CANInit 0x00000000 0x118 THUMB Debug/../../obj/can.o + 0x00000000 0x74 THUMB Debug/../../obj/can.o + .text.CANInit 0x00000000 0x164 THUMB Debug/../../obj/can.o .text.CANEnable - 0x00000000 0x40 THUMB Debug/../../obj/can.o + 0x00000000 0x58 THUMB Debug/../../obj/can.o .text.CANDisable - 0x00000000 0x40 THUMB Debug/../../obj/can.o + 0x00000000 0x58 THUMB Debug/../../obj/can.o .text.CANBitTimingGet - 0x00000000 0xb0 THUMB Debug/../../obj/can.o + 0x00000000 0xd0 THUMB Debug/../../obj/can.o .text.CANBitRateSet - 0x00000000 0x174 THUMB Debug/../../obj/can.o + 0x00000000 0x1b4 THUMB Debug/../../obj/can.o .text.CANBitTimingSet - 0x00000000 0x17c THUMB Debug/../../obj/can.o + 0x00000000 0x1c4 THUMB Debug/../../obj/can.o .text.CANIntRegister - 0x00000000 0x48 THUMB Debug/../../obj/can.o + 0x00000000 0x64 THUMB Debug/../../obj/can.o .text.CANIntUnregister - 0x00000000 0x44 THUMB Debug/../../obj/can.o - .text.CANIntEnable - 0x00000000 0x5c THUMB Debug/../../obj/can.o - .text.CANIntDisable 0x00000000 0x60 THUMB Debug/../../obj/can.o + .text.CANIntEnable + 0x00000000 0x7c THUMB Debug/../../obj/can.o + .text.CANIntDisable + 0x00000000 0x80 THUMB Debug/../../obj/can.o .text.CANIntStatus - 0x00000000 0x8c THUMB Debug/../../obj/can.o - .text.CANIntClear - 0x00000000 0xbc THUMB Debug/../../obj/can.o - .text.CANRetrySet - 0x00000000 0x5c THUMB Debug/../../obj/can.o - .text.CANRetryGet - 0x00000000 0x48 THUMB Debug/../../obj/can.o - .text.CANStatusGet - 0x00000000 0xf8 THUMB Debug/../../obj/can.o - .text.CANErrCntrGet - 0x00000000 0x6c THUMB Debug/../../obj/can.o - .text.CANMessageSet - 0x00000000 0x354 THUMB Debug/../../obj/can.o - .text.CANMessageGet - 0x00000000 0x2f0 THUMB Debug/../../obj/can.o - .text.CANMessageClear 0x00000000 0xa8 THUMB Debug/../../obj/can.o + .text.CANIntClear + 0x00000000 0xec THUMB Debug/../../obj/can.o + .text.CANRetrySet + 0x00000000 0x74 THUMB Debug/../../obj/can.o + .text.CANRetryGet + 0x00000000 0x5c THUMB Debug/../../obj/can.o + .text.CANStatusGet + 0x00000000 0x134 THUMB Debug/../../obj/can.o + .text.CANErrCntrGet + 0x00000000 0x80 THUMB Debug/../../obj/can.o + .text.CANMessageSet + 0x00000000 0x3a4 THUMB Debug/../../obj/can.o + .text.CANMessageGet + 0x00000000 0x348 THUMB Debug/../../obj/can.o + .text.CANMessageClear + 0x00000000 0xd8 THUMB Debug/../../obj/can.o .text 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) .data 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) .bss 0x00000000 0x0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) @@ -1806,14 +1806,14 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Peripherals 0x40020000 0x00100000 xw FiRM_Peripherals 0x40000000 0x00010000 xw SRAM 0x20000000 0x00010000 xw -FLASH 0x00004000 0x0003c000 xr +FLASH 0x00002000 0x0003e000 xr *default* 0x00000000 0xffffffff Linker script and memory map - 0x000061ac __do_debug_operation = __do_debug_operation_bkpt - 0x0000574c __vfprintf = __vfprintf_int_nwp - 0x00005cdc __vfscanf = __vfscanf_int + 0x00004348 __do_debug_operation = __do_debug_operation_bkpt + 0x000038e8 __vfprintf = __vfprintf_int_nwp + 0x00003e78 __vfscanf = __vfscanf_int 0xe000e000 __CM3_System_Control_Space_segment_start__ = 0xe000e000 0xe000f000 __CM3_System_Control_Space_segment_end__ = 0xe000f000 0x40020000 __Peripherals_segment_start__ = 0x40020000 @@ -1822,7 +1822,7 @@ Linker script and memory map 0x40010000 __FiRM_Peripherals_segment_end__ = 0x40010000 0x20000000 __SRAM_segment_start__ = 0x20000000 0x20010000 __SRAM_segment_end__ = 0x20010000 - 0x00004000 __FLASH_segment_start__ = 0x4000 + 0x00002000 __FLASH_segment_start__ = 0x2000 0x00040000 __FLASH_segment_end__ = 0x40000 0x00000100 __STACKSIZE__ = 0x100 0x00000000 __STACKSIZE_PROCESS__ = 0x0 @@ -1840,183 +1840,183 @@ Linker script and memory map 0x20000000 __vectors_ram_end__ = (__vectors_ram_start__ + SIZEOF (.vectors_ram)) 0x20000000 __vectors_ram_load_end__ = __vectors_ram_end__ 0x00000001 . = ASSERT (((__vectors_ram_end__ >= __SRAM_segment_start__) && (__vectors_ram_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .vectors_ram is too large to fit in SRAM memory segment) - 0x00004000 __vectors_load_start__ = ALIGN (__FLASH_segment_start__, 0x100) + 0x00002000 __vectors_load_start__ = ALIGN (__FLASH_segment_start__, 0x100) -.vectors 0x00004000 0xf4 - 0x00004000 __vectors_start__ = . +.vectors 0x00002000 0xf4 + 0x00002000 __vectors_start__ = . *(.vectors .vectors.*) - .vectors 0x00004000 0xf4 THUMB Debug/../../obj/vectors.o - 0x00004000 _vectors - 0x000040f4 __vectors_end__ = (__vectors_start__ + SIZEOF (.vectors)) - 0x000040f4 __vectors_load_end__ = __vectors_end__ + .vectors 0x00002000 0xf4 THUMB Debug/../../obj/vectors.o + 0x00002000 _vectors + 0x000020f4 __vectors_end__ = (__vectors_start__ + SIZEOF (.vectors)) + 0x000020f4 __vectors_load_end__ = __vectors_end__ 0x00000001 . = ASSERT (((__vectors_end__ >= __FLASH_segment_start__) && (__vectors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .vectors is too large to fit in FLASH memory segment) - 0x000040f4 __init_load_start__ = ALIGN (__vectors_end__, 0x4) + 0x000020f4 __init_load_start__ = ALIGN (__vectors_end__, 0x4) -.init 0x000040f4 0x114 - 0x000040f4 __init_start__ = . +.init 0x000020f4 0x114 + 0x000020f4 __init_start__ = . *(.init .init.*) - .init 0x000040f4 0x114 THUMB Debug/../../obj/cstart.o - 0x000040f4 _start - 0x00004172 exit - 0x00004196 reset_handler - 0x00004208 __init_end__ = (__init_start__ + SIZEOF (.init)) - 0x00004208 __init_load_end__ = __init_end__ + .init 0x000020f4 0x114 THUMB Debug/../../obj/cstart.o + 0x000020f4 _start + 0x00002172 exit + 0x00002196 reset_handler + 0x00002208 __init_end__ = (__init_start__ + SIZEOF (.init)) + 0x00002208 __init_load_end__ = __init_end__ 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .init is too large to fit in FLASH memory segment) - 0x00004208 __text_load_start__ = ALIGN (__init_end__, 0x4) + 0x00002208 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x00004208 0x1fc4 - 0x00004208 __text_start__ = . +.text 0x00002208 0x2160 + 0x00002208 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs .glue_7t 0x00000000 0x0 linker stubs .text.BootActivate - 0x00004208 0x1c THUMB Debug/../../obj/boot.o + 0x00002208 0x24 THUMB Debug/../../obj/boot.o .text.BootComInit - 0x00004224 0x48 THUMB Debug/../../obj/boot.o - 0x00004224 BootComInit + 0x0000222c 0x64 THUMB Debug/../../obj/boot.o + 0x0000222c BootComInit .text.BootComCheckActivationRequest - 0x0000426c 0xc8 THUMB Debug/../../obj/boot.o - 0x0000426c BootComCheckActivationRequest + 0x00002290 0xdc THUMB Debug/../../obj/boot.o + 0x00002290 BootComCheckActivationRequest .text.UartReceiveByte - 0x00004334 0x3c THUMB Debug/../../obj/boot.o + 0x0000236c 0x44 THUMB Debug/../../obj/boot.o .text.IrqInterruptEnable - 0x00004370 0xc THUMB Debug/../../obj/irq.o - 0x00004370 IrqInterruptEnable - .text.LedInit 0x0000437c 0x38 THUMB Debug/../../obj/led.o - 0x0000437c LedInit + 0x000023b0 0x10 THUMB Debug/../../obj/irq.o + 0x000023b0 IrqInterruptEnable + .text.LedInit 0x000023c0 0x48 THUMB Debug/../../obj/led.o + 0x000023c0 LedInit .text.LedToggle - 0x000043b4 0x90 THUMB Debug/../../obj/led.o - 0x000043b4 LedToggle - .text.main 0x00004444 0x18 THUMB Debug/../../obj/main.o - 0x00004444 main - .text.Init 0x0000445c 0x20 THUMB Debug/../../obj/main.o + 0x00002408 0xa4 THUMB Debug/../../obj/led.o + 0x00002408 LedToggle + .text.main 0x000024ac 0x30 THUMB Debug/../../obj/main.o + 0x000024ac main + .text.Init 0x000024dc 0x38 THUMB Debug/../../obj/main.o .text.__error__ - 0x0000447c 0x24 THUMB Debug/../../obj/main.o - 0x0000447c __error__ + 0x00002514 0x24 THUMB Debug/../../obj/main.o + 0x00002514 __error__ .text.UnusedISR - 0x000044a0 0x8 THUMB Debug/../../obj/vectors.o - 0x000044a0 UnusedISR + 0x00002538 0x8 THUMB Debug/../../obj/vectors.o + 0x00002538 UnusedISR .text.TimeInit - 0x000044a8 0x34 THUMB Debug/../../obj/time.o - 0x000044a8 TimeInit + 0x00002540 0x50 THUMB Debug/../../obj/time.o + 0x00002540 TimeInit .text.TimeDeinit - 0x000044dc 0x10 THUMB Debug/../../obj/time.o - 0x000044dc TimeDeinit - .text.TimeSet 0x000044ec 0x20 THUMB Debug/../../obj/time.o - 0x000044ec TimeSet - .text.TimeGet 0x0000450c 0x18 THUMB Debug/../../obj/time.o - 0x0000450c TimeGet + 0x00002590 0x1c THUMB Debug/../../obj/time.o + 0x00002590 TimeDeinit + .text.TimeSet 0x000025ac 0x20 THUMB Debug/../../obj/time.o + 0x000025ac TimeSet + .text.TimeGet 0x000025cc 0x18 THUMB Debug/../../obj/time.o + 0x000025cc TimeGet .text.TimeISRHandler - 0x00004524 0x24 THUMB Debug/../../obj/time.o - 0x00004524 TimeISRHandler + 0x000025e4 0x24 THUMB Debug/../../obj/time.o + 0x000025e4 TimeISRHandler .text.CPUcpsie - 0x00004548 0xc THUMB Debug/../../obj/cpu.o - 0x00004548 CPUcpsie + 0x00002608 0xc THUMB Debug/../../obj/cpu.o + 0x00002608 CPUcpsie .text.GPIOBaseValid - 0x00004554 0x118 THUMB Debug/../../obj/gpio.o + 0x00002614 0x118 THUMB Debug/../../obj/gpio.o .text.GPIODirModeSet - 0x0000466c 0xbc THUMB Debug/../../obj/gpio.o - 0x0000466c GPIODirModeSet + 0x0000272c 0xcc THUMB Debug/../../obj/gpio.o + 0x0000272c GPIODirModeSet .text.GPIOPadConfigSet - 0x00004728 0x288 THUMB Debug/../../obj/gpio.o - 0x00004728 GPIOPadConfigSet + 0x000027f8 0x2a0 THUMB Debug/../../obj/gpio.o + 0x000027f8 GPIOPadConfigSet .text.GPIOPinWrite - 0x000049b0 0x44 THUMB Debug/../../obj/gpio.o - 0x000049b0 GPIOPinWrite + 0x00002a98 0x50 THUMB Debug/../../obj/gpio.o + 0x00002a98 GPIOPinWrite .text.GPIOPinTypeGPIOOutput - 0x000049f4 0x50 THUMB Debug/../../obj/gpio.o - 0x000049f4 GPIOPinTypeGPIOOutput + 0x00002ae8 0x68 THUMB Debug/../../obj/gpio.o + 0x00002ae8 GPIOPinTypeGPIOOutput .text.GPIOPinTypeUART - 0x00004a44 0x50 THUMB Debug/../../obj/gpio.o - 0x00004a44 GPIOPinTypeUART + 0x00002b50 0x68 THUMB Debug/../../obj/gpio.o + 0x00002b50 GPIOPinTypeUART .text.IntMasterEnable - 0x00004a94 0x10 THUMB Debug/../../obj/interrupt.o - 0x00004a94 IntMasterEnable + 0x00002bb8 0x18 THUMB Debug/../../obj/interrupt.o + 0x00002bb8 IntMasterEnable .text.SysCtlPeripheralValid - 0x00004aa4 0x288 THUMB Debug/../../obj/sysctl.o + 0x00002bd0 0x288 THUMB Debug/../../obj/sysctl.o .text.SysCtlPeripheralEnable - 0x00004d2c 0x70 THUMB Debug/../../obj/sysctl.o - 0x00004d2c SysCtlPeripheralEnable + 0x00002e58 0x7c THUMB Debug/../../obj/sysctl.o + 0x00002e58 SysCtlPeripheralEnable .text.SysCtlDelay - 0x00004d9c 0x8 THUMB Debug/../../obj/sysctl.o - 0x00004d9c SysCtlDelay + 0x00002ed4 0x8 THUMB Debug/../../obj/sysctl.o + 0x00002ed4 SysCtlDelay .text.SysCtlClockSet - 0x00004da4 0x274 THUMB Debug/../../obj/sysctl.o - 0x00004da4 SysCtlClockSet + 0x00002edc 0x28c THUMB Debug/../../obj/sysctl.o + 0x00002edc SysCtlClockSet .text.SysCtlClockGet - 0x00005018 0x370 THUMB Debug/../../obj/sysctl.o - 0x00005018 SysCtlClockGet + 0x00003168 0x370 THUMB Debug/../../obj/sysctl.o + 0x00003168 SysCtlClockGet .text.SysTickEnable - 0x00005388 0x24 THUMB Debug/../../obj/systick.o - 0x00005388 SysTickEnable + 0x000034d8 0x24 THUMB Debug/../../obj/systick.o + 0x000034d8 SysTickEnable .text.SysTickDisable - 0x000053ac 0x24 THUMB Debug/../../obj/systick.o - 0x000053ac SysTickDisable + 0x000034fc 0x24 THUMB Debug/../../obj/systick.o + 0x000034fc SysTickDisable .text.SysTickIntEnable - 0x000053d0 0x24 THUMB Debug/../../obj/systick.o - 0x000053d0 SysTickIntEnable + 0x00003520 0x24 THUMB Debug/../../obj/systick.o + 0x00003520 SysTickIntEnable .text.SysTickIntDisable - 0x000053f4 0x24 THUMB Debug/../../obj/systick.o - 0x000053f4 SysTickIntDisable + 0x00003544 0x24 THUMB Debug/../../obj/systick.o + 0x00003544 SysTickIntDisable .text.SysTickPeriodSet - 0x00005418 0x40 THUMB Debug/../../obj/systick.o - 0x00005418 SysTickPeriodSet + 0x00003568 0x44 THUMB Debug/../../obj/systick.o + 0x00003568 SysTickPeriodSet .text.UARTBaseValid - 0x00005458 0x4c THUMB Debug/../../obj/uart.o + 0x000035ac 0x4c THUMB Debug/../../obj/uart.o .text.UARTConfigSetExpClk - 0x000054a4 0x198 THUMB Debug/../../obj/uart.o - 0x000054a4 UARTConfigSetExpClk + 0x000035f8 0x1bc THUMB Debug/../../obj/uart.o + 0x000035f8 UARTConfigSetExpClk .text.UARTEnable - 0x0000563c 0x5c THUMB Debug/../../obj/uart.o - 0x0000563c UARTEnable + 0x000037b4 0x68 THUMB Debug/../../obj/uart.o + 0x000037b4 UARTEnable .text.UARTDisable - 0x00005698 0x6c THUMB Debug/../../obj/uart.o - 0x00005698 UARTDisable + 0x0000381c 0x78 THUMB Debug/../../obj/uart.o + 0x0000381c UARTDisable .text.UARTCharGetNonBlocking - 0x00005704 0x48 THUMB Debug/../../obj/uart.o - 0x00005704 UARTCharGetNonBlocking + 0x00003894 0x54 THUMB Debug/../../obj/uart.o + 0x00003894 UARTCharGetNonBlocking .text.libc.__vfprintf_int_nwp - 0x0000574c 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - 0x0000574c __vfprintf_int_nwp + 0x000038e8 0x3f4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) + 0x000038e8 __vfprintf_int_nwp .text.libc.__ungetc - 0x00005b40 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00003cdc 0x20 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.rd_int - 0x00005b60 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00003cfc 0x17c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) .text.libc.__vfscanf_int - 0x00005cdc 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - 0x00005cdc __vfscanf_int + 0x00003e78 0x3ec C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + 0x00003e78 __vfscanf_int .text.libc.__getc - 0x000060c8 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000060c8 __getc + 0x00004264 0x28 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00004264 __getc .text.libc.__putc - 0x000060f0 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000060f0 __putc + 0x0000428c 0x38 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x0000428c __putc .text.libc.isupper - 0x00006128 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006128 isupper + 0x000042c4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000042c4 isupper .text.libc.islower - 0x00006138 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006138 islower + 0x000042d4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000042d4 islower .text.libc.isdigit - 0x00006148 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006148 isdigit + 0x000042e4 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000042e4 isdigit .text.libc.__digit - 0x00006158 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006158 __digit + 0x000042f4 0x3c C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000042f4 __digit .text.libc.isspace - 0x00006194 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x00006194 isspace + 0x00004330 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00004330 isspace .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x000061ac 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x000061ac __do_debug_operation_bkpt + 0x00004348 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x00004348 __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x000061c4 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000061c4 __debug_io_lock + 0x00004360 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00004360 __debug_io_lock .text.libc.__debug_io_unlock - 0x000061c8 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x000061c8 __debug_io_unlock - 0x000061cc __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x000061cc __text_load_end__ = __text_end__ + 0x00004364 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00004364 __debug_io_unlock + 0x00004368 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x00004368 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -2024,65 +2024,65 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .text is too large to fit in FLASH memory segment) - 0x000061cc __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x00004368 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x000061cc 0x0 - 0x000061cc __dtors_start__ = . +.dtors 0x00004368 0x0 + 0x00004368 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x000061cc __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x000061cc __dtors_load_end__ = __dtors_end__ + 0x00004368 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x00004368 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .dtors is too large to fit in FLASH memory segment) - 0x000061cc __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x00004368 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x000061cc 0x0 - 0x000061cc __ctors_start__ = . +.ctors 0x00004368 0x0 + 0x00004368 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x000061cc __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x000061cc __ctors_load_end__ = __ctors_end__ + 0x00004368 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x00004368 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ctors is too large to fit in FLASH memory segment) - 0x000061cc __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x00004368 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x000061cc 0x250 - 0x000061cc __rodata_start__ = . +.rodata 0x00004368 0x250 + 0x00004368 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) - .rodata 0x000061cc 0x70 THUMB Debug/../../obj/gpio.o + .rodata 0x00004368 0x70 THUMB Debug/../../obj/gpio.o .rodata.g_pulRCGCRegs - 0x0000623c 0xc THUMB Debug/../../obj/sysctl.o + 0x000043d8 0xc THUMB Debug/../../obj/sysctl.o .rodata.g_pulXtals - 0x00006248 0x5c THUMB Debug/../../obj/sysctl.o - .rodata 0x000062a4 0x74 THUMB Debug/../../obj/sysctl.o - .rodata 0x00006318 0x74 THUMB Debug/../../obj/systick.o - .rodata 0x0000638c 0x70 THUMB Debug/../../obj/uart.o + 0x000043e4 0x5c THUMB Debug/../../obj/sysctl.o + .rodata 0x00004440 0x74 THUMB Debug/../../obj/sysctl.o + .rodata 0x000044b4 0x74 THUMB Debug/../../obj/systick.o + .rodata 0x00004528 0x70 THUMB Debug/../../obj/uart.o .rodata.libc.__hex_lc - 0x000063fc 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x000063fc __hex_lc + 0x00004598 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x00004598 __hex_lc .rodata.libc.__hex_uc - 0x0000640c 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - 0x0000640c __hex_uc - 0x0000641c __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x0000641c __rodata_load_end__ = __rodata_end__ + 0x000045a8 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + 0x000045a8 __hex_uc + 0x000045b8 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x000045b8 __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .rodata is too large to fit in FLASH memory segment) - 0x0000641c __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x000045b8 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x0000641c 0x0 - 0x0000641c __ARM.exidx_start__ = . - 0x0000641c __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x000045b8 0x0 + 0x000045b8 __ARM.exidx_start__ = . + 0x000045b8 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x0000641c __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x0000641c __exidx_end = __ARM.exidx_end__ - 0x0000641c __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x000045b8 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x000045b8 __exidx_end = __ARM.exidx_end__ + 0x000045b8 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x40000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x0000641c __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x000045b8 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x0000641c +.fast 0x20000000 0x0 load address 0x000045b8 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x0000641c __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x000045b8 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x40000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -2091,13 +2091,13 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __SRAM_segment_start__) && (__fast_run_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .fast_run is too large to fit in SRAM memory segment) - 0x0000641c __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x000045b8 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x0 load address 0x0000641c +.data 0x20000000 0x0 load address 0x000045b8 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x20000000 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x0000641c __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x000045b8 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x40000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x20000000 0x0 @@ -2182,14 +2182,14 @@ Linker script and memory map 0x200001e4 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) 0x200001e4 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __SRAM_segment_start__) && (__tbss_end__ <= (__SRAM_segment_start__ + 0x10000))), error: .tbss is too large to fit in SRAM memory segment) - 0x0000641c __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x000045b8 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x200001e4 0x0 load address 0x0000641c +.tdata 0x200001e4 0x0 load address 0x000045b8 0x200001e4 __tdata_start__ = . *(.tdata .tdata.*) 0x200001e4 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x0000641c __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x0000641c __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x000045b8 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x000045b8 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x40000))), error: .tdata is too large to fit in FLASH memory segment) .tdata_run 0x200001e4 0x0 @@ -2488,41 +2488,41 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossw .debug_ranges 0x00001370 0x4c0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) .debug_ranges 0x00001830 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_line 0x00000000 0x81e3 - .debug_line 0x00000000 0xe2 THUMB Debug/../../obj/boot.o - .debug_line 0x000000e2 0xeb THUMB Debug/../../obj/cstart.o - .debug_line 0x000001cd 0xb9 THUMB Debug/../../obj/irq.o - .debug_line 0x00000286 0xb1 THUMB Debug/../../obj/led.o - .debug_line 0x00000337 0xcd THUMB Debug/../../obj/main.o - .debug_line 0x00000404 0x98 THUMB Debug/../../obj/vectors.o - .debug_line 0x0000049c 0xde THUMB Debug/../../obj/time.o - .debug_line 0x0000057a 0x7a7 THUMB Debug/../../obj/adc.o - .debug_line 0x00000d21 0x231 THUMB Debug/../../obj/comp.o - .debug_line 0x00000f52 0x109 THUMB Debug/../../obj/cpu.o - .debug_line 0x0000105b 0x518 THUMB Debug/../../obj/epi.o - .debug_line 0x00001573 0x4b3 THUMB Debug/../../obj/ethernet.o - .debug_line 0x00001a26 0x396 THUMB Debug/../../obj/flash.o - .debug_line 0x00001dbc 0x783 THUMB Debug/../../obj/gpio.o - .debug_line 0x0000253f 0x3a0 THUMB Debug/../../obj/hibernate.o - .debug_line 0x000028df 0x54a THUMB Debug/../../obj/i2c.o - .debug_line 0x00002e29 0x425 THUMB Debug/../../obj/i2s.o - .debug_line 0x0000324e 0x2d8 THUMB Debug/../../obj/interrupt.o - .debug_line 0x00003526 0x182 THUMB Debug/../../obj/mpu.o - .debug_line 0x000036a8 0x6ef THUMB Debug/../../obj/pwm.o - .debug_line 0x00003d97 0x372 THUMB Debug/../../obj/qei.o - .debug_line 0x00004109 0x3ff THUMB Debug/../../obj/ssi.o - .debug_line 0x00004508 0x7f3 THUMB Debug/../../obj/sysctl.o - .debug_line 0x00004cfb 0x142 THUMB Debug/../../obj/systick.o - .debug_line 0x00004e3d 0x6cc THUMB Debug/../../obj/timer.o - .debug_line 0x00005509 0x74a THUMB Debug/../../obj/uart.o - .debug_line 0x00005c53 0x421 THUMB Debug/../../obj/udma.o - .debug_line 0x00006074 0x1180 THUMB Debug/../../obj/usb.o - .debug_line 0x000071f4 0x315 THUMB Debug/../../obj/watchdog.o - .debug_line 0x00007509 0x62e THUMB Debug/../../obj/can.o - .debug_line 0x00007b37 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) - .debug_line 0x00007bac 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) - .debug_line 0x00007c20 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) - .debug_line 0x0000816f 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) +.debug_line 0x00000000 0x81e9 + .debug_line 0x00000000 0xe3 THUMB Debug/../../obj/boot.o + .debug_line 0x000000e3 0xeb THUMB Debug/../../obj/cstart.o + .debug_line 0x000001ce 0xb9 THUMB Debug/../../obj/irq.o + .debug_line 0x00000287 0xb1 THUMB Debug/../../obj/led.o + .debug_line 0x00000338 0xcd THUMB Debug/../../obj/main.o + .debug_line 0x00000405 0x98 THUMB Debug/../../obj/vectors.o + .debug_line 0x0000049d 0xdf THUMB Debug/../../obj/time.o + .debug_line 0x0000057c 0x7a7 THUMB Debug/../../obj/adc.o + .debug_line 0x00000d23 0x231 THUMB Debug/../../obj/comp.o + .debug_line 0x00000f54 0x109 THUMB Debug/../../obj/cpu.o + .debug_line 0x0000105d 0x518 THUMB Debug/../../obj/epi.o + .debug_line 0x00001575 0x4b3 THUMB Debug/../../obj/ethernet.o + .debug_line 0x00001a28 0x396 THUMB Debug/../../obj/flash.o + .debug_line 0x00001dbe 0x783 THUMB Debug/../../obj/gpio.o + .debug_line 0x00002541 0x3a0 THUMB Debug/../../obj/hibernate.o + .debug_line 0x000028e1 0x54a THUMB Debug/../../obj/i2c.o + .debug_line 0x00002e2b 0x425 THUMB Debug/../../obj/i2s.o + .debug_line 0x00003250 0x2d8 THUMB Debug/../../obj/interrupt.o + .debug_line 0x00003528 0x182 THUMB Debug/../../obj/mpu.o + .debug_line 0x000036aa 0x6ef THUMB Debug/../../obj/pwm.o + .debug_line 0x00003d99 0x372 THUMB Debug/../../obj/qei.o + .debug_line 0x0000410b 0x3ff THUMB Debug/../../obj/ssi.o + .debug_line 0x0000450a 0x7f3 THUMB Debug/../../obj/sysctl.o + .debug_line 0x00004cfd 0x142 THUMB Debug/../../obj/systick.o + .debug_line 0x00004e3f 0x6cc THUMB Debug/../../obj/timer.o + .debug_line 0x0000550b 0x74a THUMB Debug/../../obj/uart.o + .debug_line 0x00005c55 0x421 THUMB Debug/../../obj/udma.o + .debug_line 0x00006076 0x1184 THUMB Debug/../../obj/usb.o + .debug_line 0x000071fa 0x315 THUMB Debug/../../obj/watchdog.o + .debug_line 0x0000750f 0x62e THUMB Debug/../../obj/can.o + .debug_line 0x00007b3d 0x75 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfprintf_int_nwp.o) + .debug_line 0x00007bb2 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(__vfscanf_int.o) + .debug_line 0x00007c26 0x54f C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_v7m_t_le.a(libc2.o) + .debug_line 0x00008175 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .debug_str 0x00000000 0x4838 .debug_str 0x00000000 0x12d THUMB Debug/../../obj/boot.o diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.srec index 9c458cd4..2f12c881 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.srec +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/bin/demoprog_ek_lm3s8962.srec @@ -1,582 +1,607 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S1134000E401002097410000A1440000A144000005 -S1134010A1440000A1440000A1440000A144000008 -S1134020A1440000A1440000A1440000A1440000F8 -S1134030A1440000A1440000A14400002545000063 -S1134040A1440000A1440000A1440000A1440000D8 -S1134050A1440000A1440000A1440000A1440000C8 -S1134060A1440000A1440000A1440000A1440000B8 -S1134070A1440000A1440000A1440000A1440000A8 -S1134080A1440000A1440000A1440000A144000098 -S1134090A1440000A1440000A1440000A144000088 -S11340A0A1440000A1440000A1440000A144000078 -S11340B0A1440000A1440000A1440000A144000068 -S11340C0A1440000A1440000A1440000A144000058 -S11340D0A1440000A1440000A1440000A144000048 -S11340E0A1440000A1440000A1440000A144000038 -S10740F0EE11AA55CA -S11340F42A498D462A482B492B4A00F039F82B4883 -S11341042B492C4A00F034F82B482C492C4A00F053 -S11341142FF82C482C492D4A00F02AF82C482D4914 -S11341242D4A00F025F82D482D492E4A00F020F898 -S11341342D482E49002200F026F82D482D49091A4D -S1134144082903DB00220260043001601E481F4971 -S1134154884205D00268043003B4904703BCF7E7EF -S113416400208646EC4600200021234A9047FEE7BF -S1134174884207D0521A05D0037801300B700131FC -S1134184013AF9D17047884202D002700130FAE74B -S113419470471A481A490160AAE70000E4010020A4 -S11341A41C640000000000200000002008420000FD -S11341B408420000CC6100001C64000000000020E0 -S11341C400000020CC610000CC610000CC61000040 -S11341D4CC610000CC610000CC610000CC61000023 -S11341E4CC6100001C640000000000206400002076 -S11341F464000020E40000204544000008ED00E0D1 -S10742040040000072 -S113420880B581B000AF00F065F94FF0F1033B6071 -S11342183B68984707F10407BD4680BD80B500AFE9 -S11342284FF00100C1F2000000F07CFD4FF00100E6 -S1134238C2F2000000F076FD4FF040204FF0030179 -S113424800F0FCFB00F0E4FE03464FF44040C4F2E7 -S1134258000019464FF461424FF0600301F01EF963 -S113426880BD00BF80B500AF40F20003C2F2000376 -S11342781B78002B17D140F20400C2F2000000F0B2 -S113428855F80346012B50D140F20003C2F2000353 -S11342984FF001021A7040F24803C2F200034FF0D3 -S11342A800021A7041E040F24803C2F200031B788E -S11342B803F1010240F20403C2F20003D3181846C2 -S11342C800F034F80346012B2FD140F24803C2F220 -S11342D800031B7803F10103DAB240F24803C2F287 -S11342E800031A7040F20403C2F200031A7840F281 -S11342F84803C2F200031B789A4216D140F2000325 -S1134308C2F200034FF000021A7040F20403C2F232 -S113431800035B78FF2B08D140F20403C2F20003C8 -S11343289B78002B01D1FFF76BFF80BD80B582B06D -S113433800AF38604FF44040C4F2000001F0DEF9E9 -S113434803467B607B68B3F1FF3F06D07B68DAB233 -S11343583B681A704FF0010301E04FF00003184660 -S113436807F10807BD4680BD80B500AF00F08EFB9D -S113437880BD00BF80B500AF4FF02000C2F200003E -S113438800F0D0FC4FF4A040C4F202004FF0010149 -S113439800F02CFB4FF4A040C4F202004FF00101DE -S11343A84FF0000200F000FB80BD00BF80B581B073 -S11343B800AF00F0A7F803463B6040F24C03C2F29A -S11343C800031B683A68D21A40F2F3139A4230D9B0 -S11343D840F25003C2F200031B78002B11D140F2C3 -S11343E85003C2F200034FF001021A704FF4A040C8 -S11343F8C4F202004FF001014FF0010200F0D4FAB8 -S113440810E040F25003C2F200034FF000021A70A9 -S11344184FF4A040C4F202004FF001014FF0000233 -S113442800F0C2FA40F24C03C2F200033A681A6080 -S113443800E000BF07F10407BD4680BD80B500AFAA -S113444800F008F8FFF7EAFEFFF7B0FFFFF70AFFEE -S1134458FAE700BF80B500AF4FF46070C0F2C01037 -S113446800F09CFCFFF786FF00F01AF8FFF77CFFCA -S113447880BD00BF80B482B000AF7860396040F27C -S11344885403C2F200037A681A6040F25803C2F275 -S113449800033A681A60FEE780B400AFFEE700BF85 -S11344A880B500AF00F0B4FD024644F6D353C1F220 -S11344B86203A3FB02134FEA9313184600F0A8FF04 -S11344C800F05EFF00F080FF4FF0000000F00AF8F3 -S11344D880BD00BF80B500AF00F088FF00F062FF28 -S11344E880BD00BF80B481B000AF386040F25C0387 -S11344F8C2F200033A681A6007F10407BD4680BC9B -S1134508704700BF80B400AF40F25C03C2F20003FE -S11345181B681846BD4680BC704700BF80B400AF16 -S113452840F25C03C2F200031B6803F1010240F28B -S11345385C03C2F200031A60BD4680BC704700BF2A -S1134548EFF3108062B670472346184680B481B0F2 -S113455800AF38603B68B3F1402F76D03A684FF427 -S11345680043C4F205039A426FD03A684FF4A0435B -S1134578C4F200039A4268D03A684FF41043C4F274 -S113458805039A4261D03A684FF4C043C4F2000369 -S11345989A425AD03A684FF42043C4F205039A4227 -S11345A853D03A684FF4E043C4F200039A424CD023 -S11345B83A684FF43043C4F205039A4245D03A6846 -S11345C84FF48043C4F202039A423ED03A684FF44F -S11345D84043C4F205039A4237D03A684FF4A043E3 -S11345E8C4F202039A4230D03A684FF45043C4F2FA -S11345F805039A4229D03A684FF4C043C4F202032F -S11346089A4222D03A684FF46043C4F205039A42AE -S11346181BD03A684FF4E043C4F202039A4214D020 -S11346283A684FF47043C4F205039A420DD03A68CD -S11346384FF45043C4F203039A4206D03A684FF049 -S11346480003C4F206039A4202D14FF0010301E0C9 -S11346584FF00003DBB2184607F10407BD4680BCDF -S1134668704700BF80B583B000AFB8600B463A60AE -S11346783B71B868FFF76AFF0346002B07D146F27F -S1134688CC10C0F200004FF0E401FFF7F3FE3B68E2 -S1134698002B0DD03B68012B0AD03B68022B07D0B6 -S11346A846F2CC10C0F200004FF0E601FFF7E2FE3C -S11346B8BB6803F580631A463B6803F00103DBB269 -S11346C8002B06D0BB6803F5806319683B790B435C -S11346D807E0BB6803F5806319683B796FEA030355 -S11346E80B401360BB6803F584631A463B6803F008 -S11346F80203002B06D0BB6803F5846319683B7971 -S11347080B4307E0BB6803F5846319683B796FEAD8 -S113471803030B40136007F10C07BD4680BD00BFBF -S113472880B584B000AFF8607A603B600B463B729A -S1134738F868FFF70BFF0346002B07D146F2CC10AD -S1134748C0F200004FF4DD71FFF794FE7B68012B83 -S113475810D07B68022B0DD07B68042B0AD07B68B1 -S11347680C2B07D046F2CC10C0F200004FF4DF71D6 -S1134778FFF780FE3B68082B19D03B680A2B16D03C -S11347883B680C2B13D03B68092B10D03B680B2BD0 -S11347980DD03B680D2B0AD03B68002B07D046F29E -S11347A8CC10C0F2000040F2C511FFF763FEFB68AD -S11347B803F5A0631A467B6803F00103DBB2002B00 -S11347C806D0FB6803F5A06319683B7A0B4307E03E -S11347D8FB6803F5A06319683B7A6FEA03030B408F -S11347E81360FB6803F5A06303F104031A467B68AE -S11347F803F00203002B08D0FB6803F5A06303F160 -S1134808040319683B7A0B4309E0FB6803F5A063CA -S113481803F1040319683B7A6FEA03030B4013603E -S1134828FB6803F5A1631A467B6803F00403002BB5 -S113483806D0FB6803F5A16319683B7A0B4307E0CC -S1134848FB6803F5A16319683B7A6FEA03030B401D -S11348581360FB6803F5A3631A467B6803F0080337 -S1134868002B06D0FB6803F5A36319683B7A0B4356 -S113487807E0FB6803F5A36319683B7A6FEA03034F -S11348880B401360FB6803F5A06303F10C031A469D -S11348983B6803F00103DBB2002B08D0FB6803F587 -S11348A8A06303F10C0319683B7A0B4309E0FB6826 -S11348B803F5A06303F10C0319683B7A6FEA030359 -S11348C80B401360FB6803F5A2631A463B6803F0C8 -S11348D80203002B06D0FB6803F5A26319683B7A30 -S11348E80B4307E0FB6803F5A26319683B7A6FEA98 -S11348F803030B401360FB6803F5A26303F104038D -S11349081A463B6803F00403002B08D0FB6803F540 -S1134918A26303F1040319683B7A0B4309E0FB68BB -S113492803F5A26303F1040319683B7A6FEA0303EE -S11349380B401360FB6803F5A26303F10C031A46EA -S11349483B6803F00803002B08D0FB6803F5A26357 -S113495803F10C0319683B7A0B4309E0FB6803F580 -S1134968A26303F10C0319683B7A6FEA03030B4053 -S11349781360FB6803F5A5631A463B68002B06D150 -S1134988FB6803F5A56319683B7A0B4307E0FB68EA -S113499803F5A56319683B7A6FEA03030B401360B8 -S11349A807F11007BD4680BD80B583B000AFB8607D -S11349B813460A463A713B70B868FFF7C7FD0346C9 -S11349C8002B07D146F2CC10C0F200004FF451710D -S11349D8FFF750FD3B794FEA83031A46BB68D318A7 -S11349E83A781A6007F10C07BD4680BD80B582B0DD -S11349F800AF78600B463B707868FFF7A7FD034665 -S1134A08002B07D146F2CC10C0F2000040F204415A -S1134A18FFF730FD3B78786819464FF00102FFF73D -S1134A2821FE3B78786819464FF001024FF00803DD -S1134A38FFF776FE07F10807BD4680BD80B582B052 -S1134A4800AF78600B463B707868FFF77FFD03463C -S1134A58002B07D146F2CC10C0F2000040F21F51DF -S1134A68FFF708FD3B78786819464FF00202FFF714 -S1134A78F9FD3B78786819464FF001024FF00803B6 -S1134A88FFF74EFE07F10807BD4680BD80B500AFAD -S1134A98FFF756FD0346DBB2184680BD80B481B0EB -S1134AA800AF38603A684FF00103C0F210039A422D -S1134AB800F02B813A684FF00203C0F210039A42C7 -S1134AC800F023813A684FF48073C0F210039A42CD -S1134AD800F01B813A684FF40073C0F210039A4245 -S1134AE800F013813A684FF48063C0F210039A42CD -S1134AF800F00B813A684FF48073C1F210039A42B4 -S1134B0800F003813A684FF40073C1F210039A422B -S1134B1800F0FB803A684FF48063C1F210039A42B4 -S1134B2800F0F3803A684FF48043C1F210039A42CC -S1134B3800F0EB803A684FF4A043C2F210039A42A3 -S1134B4800F0E3803A684FF00103C2F200039A428E -S1134B5800F0DB803A684FF00203C2F200039A4285 -S1134B6800F0D3803A684FF00403C2F200039A427B -S1134B7800F0CB803A684FF00803C2F200039A426F -S1134B8800F0C3803A684FF01003C2F200039A425F -S1134B9800F0BB803A684FF02003C2F200039A4247 -S1134BA800F0B3803A684FF04003C2F200039A421F -S1134BB800F0AB803A684FF08003C2F200039A42D7 -S1134BC800F0A3803A684FF48073C2F200039A425B -S1134BD800F09B803B68402B00F097803B68B3F162 -S1134BE8102F00F092803A684FF48043C1F200031A -S1134BF89A4200F08A803A684FF48053C1F2100355 -S1134C089A4200F082803A684FF48073C2F210032B -S1134C189A427AD03A684FF08003C3F200039A426A -S1134C2873D03A684FF01003C3F200039A426CD071 -S1134C383B68B3F1101F68D03A684FF48073C1F22F -S1134C4800039A4261D03A684FF40073C1F200033A -S1134C589A425AD03A684FF01003C1F200039A42BC -S1134C6853D03A684FF02003C1F200039A424CD063 -S1134C783A684FF02003C3F200039A4245D03A68D9 -S1134C884FF00103C1F210039A423ED03A684FF044 -S1134C980203C1F210039A4237D03A684FF0040372 -S1134CA8C1F210039A4230D03A684FF00803C1F2B7 -S1134CB810039A4229D03A684FF00103C1F2000365 -S1134CC89A4222D03A684FF00203C1F200039A4292 -S1134CD81BD03A684FF00403C1F200039A4214D07F -S1134CE83B68B3F1202F10D03A684FF00103C2F2A9 -S1134CF810039A4209D03B68082B06D03A684FF44F -S1134D088053C0F210039A4202D14FF0010301E02C -S1134D184FF00003DBB2184607F10407BD4680BC18 -S1134D28704700BF80B581B000AF38603868FFF7BE -S1134D38B5FE0346002B07D146F2A420C0F20000BA -S1134D484FF4FC71FFF796FB3B684FEA137246F287 -S1134D583C23C0F2000353F822301A463B684FEA5A -S1134D68137146F23C23C0F2000353F8213019684A -S1134D783B684FEA03434FEA1343386800F4F810DA -S1134D884FEA104003FA00F30B43136007F10407DA -S1134D98BD4680BD0138FDD1704700BF80B584B0E1 -S1134DA800AF38604FF46043C4F20F031B6803F08C -S1134DB8E043002B0CD04FF46043C4F20F031A688D -S1134DC84FF00003C7F2FF031340B3F1805F03D130 -S1134DD83B68002BC0F217814EF26003C4F20F0344 -S1134DE81B68BB604EF27003C4F20F031B687B6040 -S1134DF8BB6843F40063BB60BB6823F48003BB60F7 -S1134E087B6843F400637B604EF26003C4F20F03D3 -S1134E18BA681A604EF27003C4F20F037A681A6013 -S1134E28BB6803F00203002B04D03B6803F00203C1 -S1134E38002B0AD0BB6803F00103DBB2002B2ED091 -S1134E483B6803F00103002B29D13B6863F003039B -S1134E58BA681340BB604EF26003C4F20F03BA6829 -S1134E681A607B68002B09DA7B6803F07003302B27 -S1134E780CD07B6803F07003702B07D07B68002B81 -S1134E8809DBBB6803F03003302B04D14FF48050A6 -S1134E98FFF780FF03E04FF40020FFF77BFFBB68B8 -S1134EA823F45E5323F07003BB603A6843F2F07353 -S1134EB81340BA681343BB607A684DF68F73C7F61C -S1134EC8FF7313407B603A6842F23003C8F2000370 -S1134ED813407A6813437B603B6803F008034FEA86 -S1134EE8C3037A6813437B604EF25803C4F20F037A -S1134EF84FF040021A607B68002B0CDA4EF2700304 -S1134F08C4F20F037A681A604EF26003C4F20F0306 -S1134F18BA681A600BE04EF26003C4F20F03BA6871 -S1134F281A604EF27003C4F20F037A681A604FF0E5 -S1134F381000FFF72FFFBB6823F0F86323F0030387 -S1134F48BB603A684FF00303C0F2C0731340BA68F9 -S1134F581343BB607B6823F0FC537B603B6803F01E -S1134F68FC537A6813437B603B6803F08043002B4F -S1134F7811D0BB6843F48003BB607B6823F48003CF -S1134F887B603A684FF00003C4F2400313407A6828 -S1134F9813437B6003E07B6823F080437B603B68BA -S1134FA803F40063002B1DD14FF40043FB600CE0B5 -S1134FB84EF25003C4F20F031B6803F04003002BA6 -S1134FC807D1FB6803F1FF33FB60FB68002BEFD1CB -S1134FD800E000BFBB6823F40063BB607B6823F474 -S1134FE800637B604EF26003C4F20F03BA681A6070 -S1134FF84EF27003C4F20F037A681A604FF010007F -S1135008FFF7C8FE00E000BF07F11007BD4680BDEA -S113501880B484B000AF4EF26003C4F20F031B687F -S1135028FB604EF27003C4F20F031B687B607B685D -S1135038002B03DA7B6803F0700302E0FB6803F0DB -S11350483003202B7CD0202B04D8002B0CD0102B21 -S113505817D0E0E0602B00F0D680702B00F0D780EA -S1135068302B00F0CC80D6E0FB6803F4F8634FEAF9 -S1135078931246F24823C0F2000353F82230BB606F -S1135088CCE04FF46043C4F20F031B6803F0E04321 -S1135098002B0CD04FF46043C4F20F031A684FF08E -S11350A80003C7F2FF031340B3F1805F05D14EF24A -S11350B8C013C0F2E403BB6041E04FF46043C4F2A0 -S11350C80F031A684FF00003C7F2FF0313404FF0B1 -S11350D80002C1F2010293420AD14FF46043C4F2C0 -S11350E80F031B684FEA03434FEA1343022B1AD0FA -S11350F84FF46043C4F20F031A684FF00003C7F279 -S1135108FF0313404FF00002C1F20302934210D18F -S11351184FF46043C4F20F031B684FEA03434FEA9A -S11351281343002B05D14FF4D853C0F2B703BB6027 -S113513805E04FF41053C0F2F403BB606EE06DE079 -S11351484FF46043C4F20F031B6803F0E043002BE1 -S11351580CD04FF46043C4F20F031A684FF00003F5 -S1135168C7F2FF031340B3F1805F05D143F6700320 -S1135178C0F23903BB6041E04FF46043C4F20F034B -S11351881A684FF00003C7F2FF0313404FF0000200 -S1135198C1F2010293420AD14FF46043C4F20F03EF -S11351A81B684FEA03434FEA1343022B1AD04FF408 -S11351B86043C4F20F031A684FF00003C7F2FF03F9 -S11351C813404FF00002C1F20302934210D14FF48E -S11351D86043C4F20F031B684FEA03434FEA1343C7 -S11351E8002B05D14CF2C063C0F22D03BB6005E06F -S11351F84FF41063C0F23D03BB600FE00EE047F2CA -S11352083053BB600AE04FF48003BB6006E04FF400 -S11352180043BB6002E04FF00003ABE07B68002B67 -S113522804DA7B6803F40063002B07D07B68002B47 -S11352385DDBFB6803F40063002B58D14EF2640372 -S1135248C4F20F031B683B604FF46043C4F20F03BE -S11352581B6803F0E043002B0CD04FF46043C4F206 -S11352680F031A684FF00003C7F2FF031340B3F1AA -S1135278805F13D13A6843F6E07313404FEA53133F -S113528803F10203BA6802FB03F23B6803F01F034D -S113529803F10203B2FBF3F3BB6012E03A6843F68E -S11352A8E07313404FEA5313BA6802FB03F23B68F6 -S11352B803F01F0303F101034FEA4303B2FBF3F3C3 -S11352C8BB603B6803F48043002B03D0BB684FEA00 -S11352D85303BB603B6803F40043002B03D0BB6853 -S11352E84FEA9303BB60FB6843F48003FB60FB68ED -S11352F803F48003002B3CD07B68002B2EDA7B68F8 -S113530803F08043002B1DD07B68002B04DA7B68F4 -S113531803F40063002B07D07B68002B12DBFB68C7 -S113532803F40063002B0DD1BB684FEA43027B688A -S113533803F0FE534FEA935303F10103B2FBF3F373 -S1135348BB6016E07B6803F0FC534FEAD35303F1C8 -S11353580103BA68B2FBF3F3BB600AE0FB6803F02D -S1135368F0634FEAD35303F10103BA68B2FBF3F3D2 -S1135378BB60BB68184607F11007BD4680BC704780 -S113538880B400AF4EF21003CEF200034EF21002C6 -S1135398CEF20002126842F005021A60BD4680BCD3 -S11353A8704700BF80B400AF4EF21003CEF2000382 -S11353B84EF21002CEF20002126822F001021A60C4 -S11353C8BD4680BC704700BF80B400AF4EF21003E6 -S11353D8CEF200034EF21002CEF20002126842F03E -S11353E802021A60BD4680BC704700BF80B400AF9B -S11353F84EF21003CEF200034EF21002CEF2000277 -S1135408126822F002021A60BD4680BC704700BFD1 -S113541880B581B000AF38603B68002B03D03B688F -S1135428B3F1807F07D946F21830C0F200004FF07C -S1135438D001FFF71FF84EF21403CEF200033A68C6 -S113544802F1FF321A6007F10407BD4680BD00BFB0 -S113545880B481B000AF38603A684FF44043C4F276 -S113546800039A420DD03A684FF45043C4F2000343 -S11354789A4206D03A684FF46043C4F200039A4251 -S113548802D14FF0010301E04FF00003DBB21846EC -S113549807F10407BD4680BC704700BF80B585B0DE -S11354A800AFF860B9607A603B60F868FFF7D0FF36 -S11354B80346002B07D146F28C30C0F2000040F2BC -S11354C80D11FEF7D7FF7B68002B07D146F28C300D -S11354D8C0F200004FF48771FEF7CCFF4FF460432D -S11354E8C4F20F031B6803F0E043002B42D04FF4CF -S11354F86043C4F20F031A684FF00003C7F2FF03B6 -S11355081340B3F1805F35D04FF46043C4F20F0306 -S11355181A684FF00003C7F2FF0313404FF000026C -S1135528C1F2010293420AD14FF46043C4F20F035B -S11355381B684FEA03434FEA1343022B1AD04FF474 -S11355486043C4F20F031A684FF00003C7F2FF0365 -S113555813404FF00002C1F2030293420DD14FF4FD -S11355686043C4F20F031B684FEA03434FEA134333 -S1135578002B02D14FF0100301E04FF008037A68C2 -S113558802FB03F2BB689A4207D946F28C30C0F298 -S1135598000040F20F11FEF76DFFF86800F078F88C -S11355A87B684FEA0312BB689A420ED9FB6803F181 -S11355B83003FA6802F13002126842F020021A60DD -S11355C87B684FEA53037B6009E0FB6803F130030F -S11355D8FA6802F13002126822F020021A60BB68ED -S11355E84FEAC3027B68B2FBF3F303F101034FEA0A -S11355F853033B61FB6803F124033A694FEA9212AF -S11356081A60FB6803F128033A6902F03F021A6042 -S1135618FB6803F12C033A681A60FB6803F118036A -S11356284FF000021A60F86800F004F807F1140754 -S1135638BD4680BD80B581B000AF38603868FFF7DB -S113564807FF0346002B07D146F28C30C0F2000056 -S11356584FF4CF71FEF70EFF3B6803F12C033A6851 -S113566802F12C02126842F010021A603B6803F13E -S113567830031A463B6803F130031B6843F4407354 -S113568843F00103136007F10407BD4680BD00BF62 -S113569880B581B000AF38603868FFF7D9FE03469B -S11356A8002B07D146F28C30C0F200004FF4DF71B2 -S11356B8FEF7E0FE00BF3B6803F118031B6803F024 -S11356C80803002BF7D13B6803F12C033A6802F175 -S11356D82C02126822F010021A603B6803F13003AE -S11356E81A463B6803F130031B6823F4407323F024 -S11356F80103136007F10407BD4680BD80B581B07E -S113570800AF38603868FFF7A3FE0346002B07D1C3 -S113571846F28C30C0F2000040F20941FEF7AAFEBE -S11357283B6803F118031B6803F01003002B02D134 -S11357383B681B6801E04FF0FF33184607F1040784 -S1135748BD4680BD2DE9F04F86B006460D4602924F -S11357584FF00003036046F2FC38C0F2000846F23A -S11357680C49C0F20009D3E105F10105252904BF5C -S11357782B46002203D0304600F0B6FCC8E11C4694 -S113578813F8010B1D46A0F120010B2913D8DFE8FB -S113579801F0061212091212120C1212120F42F020 -S11357A84002ECE742F08002E9E742F40042E6E70F -S11357B842F02002E3E7134668280AD16078682893 -S11357C803BF42F00802A078E51CA51C18BF43F0EB -S11357D8040278287AD8DFE810F0A9017900790062 -S11357E879007900790079007900790079007900E5 -S11357F879007900790079007900790079007900D5 -S113580879007900790079007900790079007900C4 -S113581879007900790079007900790079007900B4 -S11358287900790089007900790079007900790094 -S11358387900790079007900790079007900790094 -S11358487900790079007900790079007900790084 -S11358587900790079007900790079007900790074 -S11358687900790079007900790079007900790064 -S11358787900790079007900790079007900790054 -S113588879007900790079007900C30079007900FA -S11358987900790079007900790079007900790034 -S11358A88F00D7007900790079007900D700790052 -S11358B87900790079009800D000B5007900790062 -S11358C8A4007900DC0079007900C50040F2600387 -S11358D8C2F200031C68002C00F01A814FF0FF3359 -S11358E8009302A901913146A04711E130464FF0D7 -S11358F8250100F0F9FB0BE1029B03F1040202927B -S11359081978304600F0F0FB02E112F0080F029B10 -S113591803F1040202921B68326814BF1A701A60F9 -S1135928F6E0029B03F1040202921C682178002924 -S113593800F0EE80304600F0D7FB14F8011F002970 -S1135948F8D1E5E0029B03F1040102911B6802F01F -S11359588007002F14BF2327002742F480726CE0CD -S113596842F4005243F2780343F25807782808BFF8 -S11359781F4612F0800F11D10EE002F08007002FAD -S113598814BF3027002709E042F480424FF0000793 -S113599804E04FF0000701E04FF0000712F4804FD5 -S11359A81BD0029B03F1040102911B6812F0040F3F -S11359B818BF1BB203D112F0080F18BFDBB2002BBB -S11359C8BCBF5B422D2719DB02F04001002918BF38 -S11359D8202712F0200F11D00EE0029B03F10401DE -S11359E802911B6812F0040F18BF9BB206D112F083 -S11359F8080F18BFDBB201E04FF02B07A0F15800E5 -S1135A0820286CD8DFE800F0196B6B6B6B6B6B6B41 -S1135A186B6B6B6B156B6B6B6B156B6B6B6B6B11D0 -S1135A28196B6B6B6B156B6B19004FF00004FBB9AA -S1135A3857E04FF0000443BB53E04FF00004002B41 -S1135A484FD04FF0000402F4005232B103F00F01BA -S1135A5819F8010003A9605405E003F00F0118F8D0 -S1135A68010003A9605404F101041B09EDD138E0D5 -S1135A784FF0000403F0070101F1300103AAA15417 -S1135A8804F10104DB08F5D12BE04FF0000402F423 -S1135A9800424FF02C0B4CF6CD4ACCF6CC4A52B10E -S1135AA804F00301032901BF0DF1180C0CEB0401E8 -S1135AB801F80CBC013406A90819AAFB03C14FEA72 -S1135AC8D10101EB810CA3EB4C0303F1300300F883 -S1135AD80C3C04F101040B460029E0D101E04FF02D -S1135AE80004FF2F04D9C7F30721304600F0FCFA5D -S1135AF81FB1F9B2304600F0F7FA012C08D403AF0D -S1135B083C1914F8011D304600F0EEFABC42F8D1F5 -S1135B18297800297FF428AEB3682BB132687168FC -S1135B288A423CBF00219954306801E04FF0FF30AD -S1135B3806B0BDE8F08F00BF10B504460B783BB142 -S1135B48B0F1FF3F06D04B6803F1FF334B6001E02F -S1135B588B689847204610BD2DE9F04F82468B4646 -S1135B6817469846099E4FF0FF3900E0A94609F107 -S1135B780105504600F0A4FA044600F007FB00288B -S1135B88F4D12346B4F1FF3F08BF4FF0FF3500F0CE -S1135B989C8027F4C067002E4EDD17F0800F0DD0CF -S1135BA82B2C03D02D2C09D147F4806709F1020569 -S1135BB8504600F085FA044606F1FF36302C14BF2F -S1135BC800230123002ED4BF002303F00103002B7C -S1135BD832D047F4007706F1FF3605F10109504643 -S1135BE800F06EFA0446002E20DD582814BF002366 -S1135BF80123782808BF43F00103BBB1B8F1100FA3 -S1135C0814BF00230123B8F1000F08BF43F00103B8 -S1135C1863B127F4007706F1FF3605F1020950460F -S1135C2800F04EFA04464FF0100851E0B8F1000FA6 -S1135C3808BF4FF008084BE0B8F1000F08BF4FF059 -S1135C480A08002ED8BF4FF000090EDC15E047F40F -S1135C58007706F1FF3608FB090905F101055046EE -S1135C6800F02EFA044616B907E04FF00009204662 -S1135C78414600F06DFA0028E9DA20465146FFF75C -S1135C885BFF17F4007F08BF6FF001051DD017F004 -S1135C98010F1AD1DBF8003003F10402CBF800201D -S1135CA81B6807F49062B2F5906F08BFC9F1000948 -S1135CB817F0100F18BF83F8009006D117F0080FDB -S1135CC814BFA3F80090C3F800902846BDE8F08FED -S1135CD84D46B6E72DE9F04F85B001908A46049207 -S1135CE84FF0000BCDF808B04CF6CC49C0F6CC49BF -S1135CF8544614F8015B002D00F0DE81252D3BD0BD -S1135D08284600F043FA08B918E02C4604F10105C6 -S1135D18207800F03BFA0028F7D101E00BF1010BE1 -S1135D28019800F0CDF9054600F030FA0028F5D1C5 -S1135D3828460199FFF700FFA246D9E7019800F029 -S1135D48BFF90646A84203D10BF1010BA246CFE7DF -S1135D580199FFF7F1FE029AD2F1010338BF00233B -S1135D68B6F1FF3F14BF002603F00106002E18BF4A -S1135D784FF0FF3202929FE19AF801302A2B06BFB6 -S1135D880AF102044FF001084FF000084FF0000533 -S1135D980CE04D4500F3908105EB8505A6F130062E -S1135DA816EB450500F1888148F02008274604F1E0 -S1135DB801043E78A246304600F0C2F90028E8D132 -S1135DC8414608F02002002A08BF6FF000454C2E17 -S1135DD805D17E7807F1020A48F044080EE0682EDF -S1135DE80CD17E78682E03BF48F01008BE7807F1FE -S1135DF8030A07F1020A18BF41F00808A6F12506AC -S1135E08532E00F25981DFE816F054005701570168 -S1135E1857015701570157015701570157015701B6 -S1135E2857015701570157015701570157015701A6 -S1135E385701570157015701570157015701570196 -S1135E485701570157015701570157015701570186 -S1135E585701570157015701570157015701570176 -S1135E685701570157015701570157015701570166 -S1135E78330157015701570157015701570157017A -S1135E8857015701570170009F00570157015701E7 -S1135E985701AA005701570157015701B500CD0012 -S1135EA8D80057015701E30057012801570157014A -S1135EB83301019800F004F90446252802D10BF1B6 -S1135EC8010B15E70199FFF737FE029A131C18BF57 -S1135ED80123B4F1FF3F0CBF1C4643F00104002C1E -S1135EE808BF4FF0FF320292E6E008F02003002BCF -S1135EF808BF012518F0010401BF049B1A1D049270 -S1135F081E6818BF0026002D00F0D680002D13DD72 -S1135F18019800F0D5F8B0F1FF3F06D1029B002BA1 -S1135F2808BF4FF0FF330293C6E00CB906F8010B23 -S1135F380BF1010B013DEBD1002C7FF4D9AE029B90 -S1135F4803F101030293D3E648F080020095019817 -S1135F5804A94FF00A03FFF7FFFD044692E048F056 -S1135F6880020095019804A94FF00003FFF7F4FD9F -S1135F78044687E018F0010F7FF4BAAE049B03F1DE -S1135F88040204921B6818F0100F18BF83F800B0BD -S1135F987FF4AEAE18F0080F14BFA3F800B0C3F82E -S1135FA800B0A5E648F080020095019804A94FF0D6 -S1135FB80803FFF7D1FD044664E028F01E020095AB -S1135FC8019804A94FF01003FFF7C6FD044659E0F1 -S1135FD84FF0FF3404F10104019800F071F806460B -S1135FE800F0D4F80028F5D1B6F1FF3F08BF4FF010 -S1135FF8FF3447D018F0010701BF049B1A1D04920F -S11360081B680EBF039300220392002D16DC1AE0CE -S113601805F1FF351FB9039B03F8016B039304F1E2 -S11360280104019800F04CF80646431C18BF0123EC -S1136038002DD4BF002303F0010323B1304600F040 -S1136048A5F80028E4D030460199FFF775FDCFB9CB -S11360584FF00002039B1A7014E048F08002009588 -S1136068019804A94FF00A03FFF776FD044609E0F6 -S113607848F080020095019804A94FF01003FFF737 -S11360886BFD0446002C0FDA029A131C18BF012377 -S1136098B4F1FF3F0CBF1C4643F00104002C08BFB9 -S11360A84FF0FF32029207E018F0010F02BF029B83 -S11360B801330293A3441BE6029805B0BDE8F08FB0 -S11360C800B5034602783AB14268107840B102F14B -S11360D801025A605DF804FB436898475DF804FBC5 -S11360E84FF0FF305DF804FB30B50446C8B2A16830 -S11360F849B12368626803F10105954208BF00208D -S1136108934238BFC854E3682BB12168626891424E -S113611801D221469847236803F10103236030BD67 -S1136128A0F1410019288CBF00200120704700BF4E -S1136138A0F1610019288CBF00200120704700BF1E -S1136148A0F1300009288CBF00200120704700BF4F -S113615830B504460D46FFF7F3FF10B1A4F1300043 -S11361680FE02046FFF7E4FF10B1A4F1570008E060 -S11361782046FFF7D5FF10B1A4F1370001E04FF036 -S1136188FF30A842A8BF4FF0FF3030BDA0F109038B -S1136198202814BF00200120042B98BF40F00100E0 -S11361A8704700BF00B503B400F008F803BC02B49C -S11361B8694609BE00F004F801BC00BD704700BF81 -S10761C8704700BF59 -S11361CC443A2F7573722F6665617365722F736F02 -S11361DC6674776172652F4F70656E424C542F5400 -S11361EC61726765742F44656D6F2F41524D434D39 -S11361FC335F4C4D33535F454B5F4C4D3353383900 -S113620C36325F43726F7373776F726B732F507286 -S113621C6F672F6964652F2E2E2F6C69622F647241 -S113622C697665726C69622F6770696F2E63000002 -S113623C00E10F4004E10F4008E10F4040420F0021 -S113624C00201C0080841E0000802500999E3600CE -S113625C0040380000093D0000803E0000004B0067 -S113626C404B4C0000204E00808D5B0000C05D0054 -S113627C0080700000127A0000007D008096980067 -S113628C001BB7000080BB00C0E8CE00647ADA00C3 -S113629C0024F4000000FA00443A2F7573722F6640 -S11362AC65617365722F736F6674776172652F4FB6 -S11362BC70656E424C542F5461726765742F44653B -S11362CC6D6F2F41524D434D335F4C4D33535F45EE -S11362DC4B5F4C4D3353383936325F43726F7373A3 -S11362EC776F726B732F50726F672F6964652F2EE3 -S11362FC2E2F6C69622F6472697665726C69622FD9 -S113630C73797363746C2E6300000000443A2F7528 -S113631C73722F6665617365722F736F6674776120 -S113632C72652F4F70656E424C542F5461726765C1 -S113633C742F44656D6F2F41524D434D335F4C4D5B -S113634C33535F454B5F4C4D3353383936325F43CF -S113635C726F7373776F726B732F50726F672F69D1 -S113636C64652F2E2E2F6C69622F647269766572A8 -S113637C6C69622F7379737469636B2E630000000C -S113638C443A2F7573722F6665617365722F736F40 -S113639C6674776172652F4F70656E424C542F543E -S11363AC61726765742F44656D6F2F41524D434D77 -S11363BC335F4C4D33535F454B5F4C4D335338393E -S11363CC36325F43726F7373776F726B732F5072C5 -S11363DC6F672F6964652F2E2E2F6C69622F647280 -S11363EC697665726C69622F756172742E63000034 -S11363FC303132333435363738396162636465662B -S113640C30313233343536373839414243444546DA -S903419724 +S1132000E401002097210000392500003925000053 +S11320103925000039250000392500003925000044 +S11320203925000039250000392500003925000034 +S1132030392500003925000039250000E525000078 +S11320403925000039250000392500003925000014 +S11320503925000039250000392500003925000004 +S113206039250000392500003925000039250000F4 +S113207039250000392500003925000039250000E4 +S113208039250000392500003925000039250000D4 +S113209039250000392500003925000039250000C4 +S11320A039250000392500003925000039250000B4 +S11320B039250000392500003925000039250000A4 +S11320C03925000039250000392500003925000094 +S11320D03925000039250000392500003925000084 +S11320E03925000039250000392500003925000074 +S10720F0EE11AA55EA +S11320F42A498D462A482B492B4A00F039F82B48A3 +S11321042B492C4A00F034F82B482C492C4A00F073 +S11321142FF82C482C492D4A00F02AF82C482D4934 +S11321242D4A00F025F82D482D492E4A00F020F8B8 +S11321342D482E49002200F026F82D482D49091A6D +S1132144082903DB00220260043001601E481F4991 +S1132154884205D00268043003B4904703BCF7E70F +S113216400208646EC4600200021234A9047FEE7DF +S1132174884207D0521A05D0037801300B7001311C +S1132184013AF9D17047884202D002700130FAE76B +S113219470471A481A490160AAE70000E4010020C4 +S11321A4B8450000000000200000002008220000C0 +S11321B40822000068430000B84500000000002025 +S11321C400000020684300006843000068430000E6 +S11321D4684300006843000068430000684300004B +S11321E468430000B845000000000020640000209B +S11321F464000020E4000020AD24000008ED00E0A9 +S107220400200000B2 +S113220880B581B000AF42F29153C0F20003984701 +S11322184FF0F1033B603B68984707F10407BD465C +S113222880BD00BF90B500AF4FF00100C1F20000BF +S113223842F65963C0F2000398474FF00100C2F216 +S1132248000042F65963C0F2000398474FF040205B +S11322584FF0030142F65133C0F20003984743F2AA +S11322686913C0F20003984703464FF44040C4F290 +S1132278000019464FF461424FF0600343F2F954E9 +S1132288C0F20004A04790BD80B500AF40F200033F +S1132298C2F200031B78002B1AD140F20400C2F2E8 +S11322A8000042F26D33C0F2000398470346012B45 +S11322B856D140F20003C2F200034FF001021A7033 +S11322C840F24803C2F200034FF000021A7047E0DC +S11322D840F24803C2F200031B7803F1010240F202 +S11322E80403C2F20003D318184642F26D33C0F255 +S11322F8000398470346012B32D140F24803C2F247 +S113230800031B7803F10103DAB240F24803C2F276 +S113231800031A7040F20403C2F200031A7840F270 +S11323284803C2F200031B789A4219D140F2000311 +S1132338C2F200034FF000021A7040F20403C2F222 +S113234800035B78FF2B0BD140F20403C2F20003B5 +S11323589B78002B04D142F20923C0F2000398476A +S113236880BD00BF80B582B000AF38604FF44040F4 +S1132378C4F2000043F69503C0F2000398470346ED +S11323887B607B68B3F1FF3F06D07B68DAB23B68B9 +S11323981A704FF0010301E04FF00003184607F1EB +S11323A80807BD4680BD00BF80B500AF42F6B9330B +S11323B8C0F20003984780BD80B500AF4FF02000FD +S11323C8C2F2000042F65963C0F2000398474FF482 +S11323D8A040C4F202004FF0010142F6E923C0F222 +S11323E8000398474FF4A040C4F202004FF00101E3 +S11323F84FF0000242F69923C0F20003984780BDCB +S113240880B581B000AF42F2CD53C0F200039847C3 +S113241803463B6040F24C03C2F200031B683A686F +S1132428D21A40F2F3139A4236D940F25003C2F258 +S113243800031B78002B14D140F25003C2F20003AE +S11324484FF001021A704FF4A040C4F202004FF09A +S113245801014FF0010242F69923C0F200039847A4 +S113246813E040F25003C2F200034FF000021A7066 +S11324784FF4A040C4F202004FF001014FF00002F3 +S113248842F69923C0F20003984740F24C03C2F283 +S113249800033A681A6000E000BF07F10407BD466C +S11324A880BD00BF80B500AF42F2DD43C0F2000337 +S11324B8984742F22D23C0F20003984742F2094399 +S11324C8C0F20003984742F29123C0F200039847F0 +S11324D8F4E700BF80B500AF4FF46070C0F2C010DD +S11324E842F6DD63C0F20003984742F2C133C0F2FA +S11324F80003984742F24153C0F20003984742F25E +S1132508B133C0F20003984780BD00BF80B482B0E5 +S113251800AF7860396040F25403C2F200037A686D +S11325281A6040F25803C2F200033A681A60FEE7E0 +S113253880B400AFFEE700BF80B500AF43F2691373 +S1132548C0F200039847024644F6D353C1F262032B +S1132558A3FB02134FEA9313184643F26953C0F2DC +S11325680003984743F2D943C0F20003984743F263 +S11325782153C0F2000398474FF0000042F2AD53D4 +S1132588C0F20003984780BD80B500AF43F24553BD +S1132598C0F20003984743F2FD43C0F20003984792 +S11325A880BD00BF80B481B000AF386040F25C03E6 +S11325B8C2F200033A681A6007F10407BD4680BCFA +S11325C8704700BF80B400AF40F25C03C2F200035E +S11325D81B681846BD4680BC704700BF80B400AF76 +S11325E840F25C03C2F200031B6803F1010240F2EB +S11325F85C03C2F200031A60BD4680BC704700BF8A +S1132608EFF3108062B670472346184680B481B051 +S113261800AF38603B68B3F1402F76D03A684FF486 +S11326280043C4F205039A426FD03A684FF4A043BA +S1132638C4F200039A4268D03A684FF41043C4F2D3 +S113264805039A4261D03A684FF4C043C4F20003C8 +S11326589A425AD03A684FF42043C4F205039A4286 +S113266853D03A684FF4E043C4F200039A424CD082 +S11326783A684FF43043C4F205039A4245D03A68A5 +S11326884FF48043C4F202039A423ED03A684FF4AE +S11326984043C4F205039A4237D03A684FF4A04342 +S11326A8C4F202039A4230D03A684FF45043C4F259 +S11326B805039A4229D03A684FF4C043C4F202038E +S11326C89A4222D03A684FF46043C4F205039A420E +S11326D81BD03A684FF4E043C4F202039A4214D080 +S11326E83A684FF47043C4F205039A420DD03A682D +S11326F84FF45043C4F203039A4206D03A684FF0A9 +S11327080003C4F206039A4202D14FF0010301E028 +S11327184FF00003DBB2184607F10407BD4680BC3E +S1132728704700BF80B583B000AFB8600B463A600D +S11327383B71B86842F21563C0F200039847034638 +S1132748002B0AD144F26830C0F200004FF0E401D3 +S113275842F21553C0F2000398473B68002B10D08F +S11327683B68012B0DD03B68022B0AD044F2683039 +S1132778C0F200004FF0E60142F21553C0F2000324 +S11327889847BB6803F580631A463B6803F0010366 +S1132798DBB2002B06D0BB6803F5806319683B796C +S11327A80B4307E0BB6803F5806319683B796FEA5C +S11327B803030B401360BB6803F584631A463B6844 +S11327C803F00203002B06D0BB6803F58463196881 +S11327D83B790B4307E0BB6803F5846319683B79CD +S11327E86FEA03030B40136007F10C07BD4680BD75 +S11327F880B584B000AFF8607A603B600B463B72EA +S1132808F86842F21563C0F2000398470346002BA8 +S11328180AD144F26830C0F200004FF4DD7142F28C +S11328281553C0F2000398477B68012B13D07B68CB +S1132838022B10D07B68042B0DD07B680C2B0AD09C +S113284844F26830C0F200004FF4DF7142F21553CD +S1132858C0F2000398473B68082B1CD03B680A2B3E +S113286819D03B680C2B16D03B68092B13D03B6856 +S11328780B2B10D03B680D2B0DD03B68002B0AD0D6 +S113288844F26830C0F2000040F2C51142F2155318 +S1132898C0F200039847FB6803F5A0631A467B68F7 +S11328A803F00103DBB2002B06D0FB6803F5A06339 +S11328B819683B7A0B4307E0FB6803F5A0631968C2 +S11328C83B7A6FEA03030B401360FB6803F5A063CC +S11328D803F104031A467B6803F00203002B08D0B3 +S11328E8FB6803F5A06303F1040319683B7A0B43FF +S11328F809E0FB6803F5A06303F1040319683B7A54 +S11329086FEA03030B401360FB6803F5A1631A46DF +S11329187B6803F00403002B06D0FB6803F5A1636E +S113292819683B7A0B4307E0FB6803F5A163196850 +S11329383B7A6FEA03030B401360FB6803F5A36358 +S11329481A467B6803F00803002B06D0FB6803F5DE +S1132958A36319683B7A0B4307E0FB6803F5A36399 +S113296819683B7A6FEA03030B401360FB6803F5AD +S1132978A06303F10C031A463B6803F00103DBB2BE +S1132988002B08D0FB6803F5A06303F10C03196856 +S11329983B7A0B4309E0FB6803F5A06303F10C03DE +S11329A819683B7A6FEA03030B401360FB6803F56D +S11329B8A2631A463B6803F00203002B06D0FB68A7 +S11329C803F5A26319683B7A0B4307E0FB6803F538 +S11329D8A26319683B7A6FEA03030B401360FB6830 +S11329E803F5A26303F104031A463B6803F00403E6 +S11329F8002B08D0FB6803F5A26303F104031968EC +S1132A083B7A0B4309E0FB6803F5A26303F1040373 +S1132A1819683B7A6FEA03030B401360FB6803F5FC +S1132A28A26303F10C031A463B6803F00803002B66 +S1132A3808D0FB6803F5A26303F10C0319683B7A19 +S1132A480B4309E0FB6803F5A26303F10C0319685F +S1132A583B7A6FEA03030B401360FB6803F5A56335 +S1132A681A463B68002B06D1FB6803F5A563196871 +S1132A783B7A0B4307E0FB6803F5A56319683B7AC7 +S1132A886FEA03030B40136007F11007BD4680BDCE +S1132A9880B583B000AFB86013460A463A713B70FC +S1132AA8B86842F21563C0F2000398470346002B46 +S1132AB80AD144F26830C0F200004FF4517142F276 +S1132AC81553C0F2000398473B794FEA83031A462B +S1132AD8BB68D3183A781A6007F10C07BD4680BD65 +S1132AE890B582B000AF78600B463B70786842F2CC +S1132AF81563C0F2000398470346002B0AD144F239 +S1132B086830C0F2000040F2044142F21553C0F2AA +S1132B18000398473B78786819464FF0010242F25F +S1132B282D73C0F2000398473B78786819464FF034 +S1132B3801024FF0080342F2F974C0F20004A047FE +S1132B4807F10807BD4690BD90B582B000AF786024 +S1132B580B463B70786842F21563C0F2000398474D +S1132B680346002B0AD144F26830C0F2000040F258 +S1132B781F5142F21553C0F2000398473B78786816 +S1132B8819464FF0020242F22D73C0F2000398472F +S1132B983B78786819464FF001024FF0080342F277 +S1132BA8F974C0F20004A04707F10807BD4690BDB8 +S1132BB880B500AF42F20963C0F2000398470346A8 +S1132BC8DBB2184680BD00BF80B481B000AF386066 +S1132BD83A684FF00103C0F210039A4200F02B81C7 +S1132BE83A684FF00203C0F210039A4200F02381BE +S1132BF83A684FF48073C0F210039A4200F01B81C4 +S1132C083A684FF40073C0F210039A4200F013813B +S1132C183A684FF48063C0F210039A4200F00B81C3 +S1132C283A684FF48073C1F210039A4200F00381AA +S1132C383A684FF40073C1F210039A4200F0FB8023 +S1132C483A684FF48063C1F210039A4200F0F380AB +S1132C583A684FF48043C1F210039A4200F0EB80C3 +S1132C683A684FF4A043C2F210039A4200F0E3809A +S1132C783A684FF00103C2F200039A4200F0DB8085 +S1132C883A684FF00203C2F200039A4200F0D3807C +S1132C983A684FF00403C2F200039A4200F0CB8072 +S1132CA83A684FF00803C2F200039A4200F0C38066 +S1132CB83A684FF01003C2F200039A4200F0BB8056 +S1132CC83A684FF02003C2F200039A4200F0B3803E +S1132CD83A684FF04003C2F200039A4200F0AB8016 +S1132CE83A684FF08003C2F200039A4200F0A380CE +S1132CF83A684FF48073C2F200039A4200F09B8052 +S1132D083B68402B00F097803B68B3F1102F00F02C +S1132D1892803A684FF48043C1F200039A4200F06B +S1132D288A803A684FF48053C1F210039A4200F043 +S1132D3882803A684FF48073C2F210039A427AD0C0 +S1132D483A684FF08003C3F200039A4273D03A689A +S1132D584FF01003C3F200039A426CD03B68B3F1FE +S1132D68101F68D03A684FF48073C1F200039A4286 +S1132D7861D03A684FF40073C1F200039A425AD002 +S1132D883A684FF01003C1F200039A4253D03A68EC +S1132D984FF02003C1F200039A424CD03A684FF036 +S1132DA82003C3F200039A4245D03A684FF0010366 +S1132DB8C1F210039A423ED03A684FF00203C1F2BE +S1132DC810039A4237D03A684FF00403C1F2100353 +S1132DD89A4230D03A684FF00803C1F210039A427D +S1132DE829D03A684FF00103C1F200039A4222D075 +S1132DF83A684FF00203C1F200039A421BD03A68C2 +S1132E084FF00403C1F200039A4214D03B68B3F1B3 +S1132E18202F10D03A684FF00103C2F210039A42EF +S1132E2809D03B68082B06D03A684FF48053C0F2A7 +S1132E3810039A4202D14FF0010301E04FF000035E +S1132E48DBB2184607F10407BD4680BC704700BFD3 +S1132E5880B581B000AF3860386842F6D133C0F22B +S1132E68000398470346002B0AD144F24040C0F2BD +S1132E7800004FF4FC7142F21553C0F20003984766 +S1132E883B684FEA137244F2D833C0F2000353F894 +S1132E9822301A463B684FEA137144F2D833C0F221 +S1132EA8000353F8213019683B684FEA03434FEA9B +S1132EB81343386800F4F8104FEA104003FA00F39B +S1132EC80B43136007F10407BD4680BD0138FDD1EB +S1132ED8704700BF80B584B000AF38604FF46043DA +S1132EE8C4F20F031B6803F0E043002B0CD04FF42B +S1132EF86043C4F20F031A684FF00003C7F2FF03DC +S1132F081340B3F1805F03D13B68002BC0F22381E7 +S1132F184EF26003C4F20F031B68BB604EF27003E9 +S1132F28C4F20F031B687B60BB6843F40063BB6097 +S1132F38BB6823F48003BB607B6843F400637B6055 +S1132F484EF26003C4F20F03BA681A604EF27003BB +S1132F58C4F20F037A681A60BB6803F00203002BFB +S1132F6804D03B6803F00203002B0AD0BB6803F0CB +S1132F780103DBB2002B34D03B6803F00103002BC0 +S1132F882FD13B6863F00303BA681340BB604EF269 +S1132F986003C4F20F03BA681A607B68002B09DA6D +S1132FA87B6803F07003302B0CD07B6803F070034C +S1132FB8702B07D07B68002B0CDBBB6803F0300355 +S1132FC8302B07D14FF4805042F6D563C0F200038A +S1132FD8984706E04FF4002042F6D563C0F2000398 +S1132FE89847BB6823F45E5323F07003BB603A68C8 +S1132FF843F2F0731340BA681343BB607A684DF622 +S11330088F73C7F6FF7313407B603A6842F230034C +S1133018C8F2000313407A6813437B603B6803F0EB +S113302808034FEAC3037A6813437B604EF25803DC +S1133038C4F20F034FF040021A607B68002B0CDACD +S11330484EF27003C4F20F037A681A604EF26003FA +S1133058C4F20F03BA681A600BE04EF26003C4F2BC +S11330680F03BA681A604EF27003C4F20F037A6849 +S11330781A604FF0100042F6D563C0F20003984777 +S1133088BB6823F0F86323F00303BB603A684FF08E +S11330980303C0F2C0731340BA681343BB607B6870 +S11330A823F0FC537B603B6803F0FC537A681343BA +S11330B87B603B6803F08043002B11D0BB6843F46A +S11330C88003BB607B6823F480037B603A684FF01D +S11330D80003C4F2400313407A6813437B6003E09F +S11330E87B6823F080437B603B6803F40063002B18 +S11330F81DD14FF40043FB600CE04EF25003C4F2C0 +S11331080F031B6803F04003002B07D1FB6803F18E +S1133118FF33FB60FB68002BEFD100E000BFBB6806 +S113312823F40063BB607B6823F400637B604EF286 +S11331386003C4F20F03BA681A604EF27003C4F253 +S11331480F037A681A604FF0100042F6D563C0F294 +S11331580003984700E000BF07F11007BD4680BD93 +S113316880B484B000AF4EF26003C4F20F031B684E +S1133178FB604EF27003C4F20F031B687B607B682C +S1133188002B03DA7B6803F0700302E0FB6803F0AA +S11331983003202B7CD0202B04D8002B0CD0102BF0 +S11331A817D0E0E0602B00F0D680702B00F0D780B9 +S11331B8302B00F0CC80D6E0FB6803F4F8634FEAC8 +S11331C8931244F2E433C0F2000353F82230BB6094 +S11331D8CCE04FF46043C4F20F031B6803F0E043F0 +S11331E8002B0CD04FF46043C4F20F031A684FF05D +S11331F80003C7F2FF031340B3F1805F05D14EF219 +S1133208C013C0F2E403BB6041E04FF46043C4F26E +S11332180F031A684FF00003C7F2FF0313404FF07F +S11332280002C1F2010293420AD14FF46043C4F28E +S11332380F031B684FEA03434FEA1343022B1AD0C8 +S11332484FF46043C4F20F031A684FF00003C7F247 +S1133258FF0313404FF00002C1F20302934210D15E +S11332684FF46043C4F20F031B684FEA03434FEA69 +S11332781343002B05D14FF4D853C0F2B703BB60F6 +S113328805E04FF41053C0F2F403BB606EE06DE048 +S11332984FF46043C4F20F031B6803F0E043002BB0 +S11332A80CD04FF46043C4F20F031A684FF00003C4 +S11332B8C7F2FF031340B3F1805F05D143F67003EF +S11332C8C0F23903BB6041E04FF46043C4F20F031A +S11332D81A684FF00003C7F2FF0313404FF00002CF +S11332E8C1F2010293420AD14FF46043C4F20F03BE +S11332F81B684FEA03434FEA1343022B1AD04FF4D7 +S11333086043C4F20F031A684FF00003C7F2FF03C7 +S113331813404FF00002C1F20302934210D14FF45C +S11333286043C4F20F031B684FEA03434FEA134395 +S1133338002B05D14CF2C063C0F22D03BB6005E03D +S11333484FF41063C0F23D03BB600FE00EE047F298 +S11333583053BB600AE04FF48003BB6006E04FF4CF +S11333680043BB6002E04FF00003ABE07B68002B36 +S113337804DA7B6803F40063002B07D07B68002B16 +S11333885DDBFB6803F40063002B58D14EF2640341 +S1133398C4F20F031B683B604FF46043C4F20F038D +S11333A81B6803F0E043002B0CD04FF46043C4F2D5 +S11333B80F031A684FF00003C7F2FF031340B3F179 +S11333C8805F13D13A6843F6E07313404FEA53130E +S11333D803F10203BA6802FB03F23B6803F01F031C +S11333E803F10203B2FBF3F3BB6012E03A6843F65D +S11333F8E07313404FEA5313BA6802FB03F23B68C5 +S113340803F01F0303F101034FEA4303B2FBF3F391 +S1133418BB603B6803F48043002B03D0BB684FEACE +S11334285303BB603B6803F40043002B03D0BB6821 +S11334384FEA9303BB60FB6843F48003FB60FB68BB +S113344803F48003002B3CD07B68002B2EDA7B68C6 +S113345803F08043002B1DD07B68002B04DA7B68C3 +S113346803F40063002B07D07B68002B12DBFB6896 +S113347803F40063002B0DD1BB684FEA43027B6859 +S113348803F0FE534FEA935303F10103B2FBF3F342 +S1133498BB6016E07B6803F0FC534FEAD35303F197 +S11334A80103BA68B2FBF3F3BB600AE0FB6803F0FC +S11334B8F0634FEAD35303F10103BA68B2FBF3F3A1 +S11334C8BB60BB68184607F11007BD4680BC70474F +S11334D880B400AF4EF21003CEF200034EF2100295 +S11334E8CEF20002126842F005021A60BD4680BCA2 +S11334F8704700BF80B400AF4EF21003CEF2000351 +S11335084EF21002CEF20002126822F001021A6092 +S1133518BD4680BC704700BF80B400AF4EF21003B4 +S1133528CEF200034EF21002CEF20002126842F00C +S113353802021A60BD4680BC704700BF80B400AF69 +S11335484EF21003CEF200034EF21002CEF2000245 +S1133558126822F002021A60BD4680BC704700BFA0 +S113356880B581B000AF38603B68002B03D03B685E +S1133578B3F1807F0AD944F2B440C0F200004FF09E +S1133588D00142F21553C0F2000398474EF21403D7 +S1133598CEF200033A6802F1FF321A6007F1040719 +S11335A8BD4680BD80B481B000AF38603A684FF43E +S11335B84043C4F200039A420DD03A684FF4504392 +S11335C8C4F200039A4206D03A684FF46043C4F246 +S11335D800039A4202D14FF0010301E04FF00003C7 +S11335E8DBB2184607F10407BD4680BC704700BF2C +S11335F880B585B000AFF860B9607A603B60F86860 +S113360843F2AD53C0F2000398470346002B0AD196 +S113361844F22850C0F2000040F20D1142F2155352 +S1133628C0F2000398477B68002B0AD144F2285063 +S1133638C0F200004FF4877142F21553C0F2000340 +S113364898474FF46043C4F20F031B6803F0E04348 +S1133658002B42D04FF46043C4F20F031A684FF0B2 +S11336680003C7F2FF031340B3F1805F35D04FF472 +S11336786043C4F20F031A684FF00003C7F2FF0354 +S113368813404FF00002C1F2010293420AD14FF4F1 +S11336986043C4F20F031B684FEA03434FEA134322 +S11336A8022B1AD04FF46043C4F20F031A684FF088 +S11336B80003C7F2FF0313404FF00002C1F20302F4 +S11336C893420DD14FF46043C4F20F031B684FEAD1 +S11336D803434FEA1343002B02D14FF0100301E0D8 +S11336E84FF008037A6802FB03F2BB689A420AD9CE +S11336F844F22850C0F2000040F20F1142F2155370 +S1133708C0F200039847F86843F61D03C0F20003AB +S113371898477B684FEA0312BB689A420ED9FB6844 +S113372803F13003FA6802F13002126842F0200211 +S11337381A607B684FEA53037B6009E0FB6803F176 +S11337483003FA6802F13002126822F020021A608B +S1133758BB684FEAC3027B68B2FBF3F303F10103CE +S11337684FEA53033B61FB6803F124033A694FEAC8 +S113377892121A60FB6803F128033A6902F03F02C7 +S11337881A60FB6803F12C033A681A60FB6803F1BA +S113379818034FF000021A60F86843F2B573C0F2D8 +S11337A80003984707F11407BD4680BD80B581B072 +S11337B800AF3860386843F2AD53C0F2000398474D +S11337C80346002B0AD144F22850C0F200004FF4FB +S11337D8CF7142F21553C0F2000398473B6803F1D6 +S11337E82C033A6802F12C02126842F010021A60A3 +S11337F83B6803F130031A463B6803F130031B6846 +S113380843F4407343F00103136007F10407BD4612 +S113381880BD00BF80B581B000AF3860386843F21E +S1133828AD53C0F2000398470346002B0AD144F273 +S11338382850C0F200004FF4DF7142F21553C0F271 +S11338480003984700BF3B6803F118031B6803F0A3 +S11338580803002BF7D13B6803F12C033A6802F103 +S11338682C02126822F010021A603B6803F130033C +S11338781A463B6803F130031B6823F4407323F0B2 +S11338880103136007F10407BD4680BD80B581B00C +S113389800AF3860386843F2AD53C0F2000398476C +S11338A80346002B0AD144F22850C0F2000040F22B +S11338B8094142F21553C0F2000398473B6803F1EB +S11338C818031B6803F01003002B02D13B681B6824 +S11338D801E04FF0FF33184607F10407BD4680BDE9 +S11338E82DE9F04F86B006460D4602924FF00003CC +S11338F8036044F29858C0F2000844F2A859C0F290 +S11339080009D3E105F10105252904BF2B4600224E +S113391803D0304600F0B6FCC8E11C4613F8010B8E +S11339281D46A0F120010B2913D8DFE801F0061287 +S113393812091212120C1212120F42F04002ECE792 +S113394842F08002E9E742F40042E6E742F020024E +S1133958E3E7134668280AD16078682803BF42F071 +S11339680802A078E51CA51C18BF43F004027828B7 +S11339787AD8DFE810F0A901790079007900790094 +S11339887900790079007900790079007900790063 +S11339987900790079007900790079007900790053 +S11339A87900790079007900790079007900790043 +S11339B87900790079007900790079007900790033 +S11339C88900790079007900790079007900790013 +S11339D87900790079007900790079007900790013 +S11339E87900790079007900790079007900790003 +S11339F879007900790079007900790079007900F3 +S1133A0879007900790079007900790079007900E2 +S1133A1879007900790079007900790079007900D2 +S1133A28790079007900C300790079007900790078 +S1133A387900790079007900790079008F00D7003E +S1133A487900790079007900D70079007900790044 +S1133A5879009800D000B50079007900A4007900B5 +S1133A68DC0079007900C50040F26003C2F200036B +S1133A781C68002C00F01A814FF0FF33009302A950 +S1133A8801913146A04711E130464FF0250100F07D +S1133A98F9FB0BE1029B03F1040202921978304608 +S1133AA800F0F0FB02E112F0080F029B03F104029C +S1133AB802921B68326814BF1A701A60F6E0029BFF +S1133AC803F1040202921C682178002900F0EE80B8 +S1133AD8304600F0D7FB14F8011F0029F8D1E5E0BF +S1133AE8029B03F1040102911B6802F08007002F76 +S1133AF814BF2327002742F480726CE042F400527A +S1133B0843F2780343F25807782808BF1F4612F097 +S1133B18800F11D10EE002F08007002F14BF302768 +S1133B28002709E042F480424FF0000704E04FF018 +S1133B38000701E04FF0000712F4804F1BD0029BEE +S1133B4803F1040102911B6812F0040F18BF1BB2A1 +S1133B5803D112F0080F18BFDBB2002BBCBF5B42C5 +S1133B682D2719DB02F04001002918BF202712F085 +S1133B78200F11D00EE0029B03F1040102911B688F +S1133B8812F0040F18BF9BB206D112F0080F18BF29 +S1133B98DBB201E04FF02B07A0F1580020286CD8C5 +S1133BA8DFE800F0196B6B6B6B6B6B6B6B6B6B6BA0 +S1133BB8156B6B6B6B156B6B6B6B6B11196B6B6BA1 +S1133BC86B156B6B19004FF00004FBB957E04FF00D +S1133BD8000443BB53E04FF00004002B4FD04FF0D8 +S1133BE8000402F4005232B103F00F0119F8010085 +S1133BF803A9605405E003F00F0118F8010003A9B4 +S1133C08605404F101041B09EDD138E04FF00004BD +S1133C1803F0070101F1300103AAA15404F10104DE +S1133C28DB08F5D12BE04FF0000402F400424FF01A +S1133C382C0B4CF6CD4ACCF6CC4A52B104F0030115 +S1133C48032901BF0DF1180C0CEB040101F80CBC9D +S1133C58013406A90819AAFB03C14FEAD10101EBF3 +S1133C68810CA3EB4C0303F1300300F80C3C04F182 +S1133C7801040B460029E0D101E04FF00004FF2FB6 +S1133C8804D9C7F30721304600F0FCFA1FB1F9B292 +S1133C98304600F0F7FA012C08D403AF3C1914F8A5 +S1133CA8011D304600F0EEFABC42F8D1297800290B +S1133CB87FF428AEB3682BB1326871688A423CBF7E +S1133CC800219954306801E04FF0FF3006B0BDE898 +S1133CD8F08F00BF10B504460B783BB1B0F1FF3F3D +S1133CE806D04B6803F1FF334B6001E08B689847BB +S1133CF8204610BD2DE9F04F82468B46174698465C +S1133D08099E4FF0FF3900E0A94609F10105504624 +S1133D1800F0A4FA044600F007FB0028F4D1234677 +S1133D28B4F1FF3F08BF4FF0FF3500F09C8027F443 +S1133D38C067002E4EDD17F0800F0DD02B2C03D05A +S1133D482D2C09D147F4806709F10205504600F08B +S1133D5885FA044606F1FF36302C14BF00230123EC +S1133D68002ED4BF002303F00103002B32D047F404 +S1133D78007706F1FF3605F10109504600F06EFAA6 +S1133D880446002E20DD582814BF00230123782878 +S1133D9808BF43F00103BBB1B8F1100F14BF0023EF +S1133DA80123B8F1000F08BF43F0010363B127F4FE +S1133DB8007706F1FF3605F10209504600F04EFA85 +S1133DC804464FF0100851E0B8F1000F08BF4FF057 +S1133DD808084BE0B8F1000F08BF4FF00A08002E9E +S1133DE8D8BF4FF000090EDC15E047F4007706F160 +S1133DF8FF3608FB090905F10105504600F02EFAC3 +S1133E08044616B907E04FF000092046414600F081 +S1133E186DFA0028E9DA20465146FFF75BFF17F4EC +S1133E28007F08BF6FF001051DD017F0010F1AD1EC +S1133E38DBF8003003F10402CBF800201B6807F418 +S1133E489062B2F5906F08BFC9F1000917F0100F1E +S1133E5818BF83F8009006D117F0080F14BFA3F811 +S1133E680090C3F800902846BDE8F08F4D46B6E7A9 +S1133E782DE9F04F85B001908A4604924FF0000B6B +S1133E88CDF808B04CF6CC49C0F6CC49544614F8E1 +S1133E98015B002D00F0DE81252D3BD0284600F083 +S1133EA843FA08B918E02C4604F10105207800F01B +S1133EB83BFA0028F7D101E00BF1010B019800F05F +S1133EC8CDF9054600F030FA0028F5D128460199C5 +S1133ED8FFF700FFA246D9E7019800F0BFF90646AC +S1133EE8A84203D10BF1010BA246CFE70199FFF7D2 +S1133EF8F1FE029AD2F1010338BF0023B6F1FF3F65 +S1133F0814BF002603F00106002E18BF4FF0FF323D +S1133F1802929FE19AF801302A2B06BF0AF10204A3 +S1133F284FF001084FF000084FF000050CE04D4534 +S1133F3800F3908105EB8505A6F1300616EB4505DF +S1133F4800F1888148F02008274604F101043E78EE +S1133F58A246304600F0C2F90028E8D1414608F0EC +S1133F682002002A08BF6FF000454C2E05D17E7848 +S1133F7807F1020A48F044080EE0682E0CD17E7856 +S1133F88682E03BF48F01008BE7807F1030A07F14A +S1133F98020A18BF41F00808A6F12506532E00F2BC +S1133FA85981DFE816F054005701570157015701AA +S1133FB85701570157015701570157015701570135 +S1133FC85701570157015701570157015701570125 +S1133FD85701570157015701570157015701570115 +S1133FE85701570157015701570157015701570105 +S1133FF857015701570157015701570157015701F5 +S11340085701570157015701570157013301570108 +S113401857015701570157015701570157015701D4 +S1134028570170009F005701570157015701AA0013 +S11340385701570157015701B500CD00D800570162 +S11340485701E3005701280157015701330101982B +S113405800F004F90446252802D10BF1010B15E7F9 +S11340680199FFF737FE029A131C18BF0123B4F114 +S1134078FF3F0CBF1C4643F00104002C08BF4FF05F +S1134088FF320292E6E008F02003002B08BF012566 +S113409818F0010401BF049B1A1D04921E6818BF7E +S11340A80026002D00F0D680002D13DD019800F0C5 +S11340B8D5F8B0F1FF3F06D1029B002B08BF4FF0A3 +S11340C8FF330293C6E00CB906F8010B0BF1010BA0 +S11340D8013DEBD1002C7FF4D9AE029B03F101031F +S11340E80293D3E648F080020095019804A94FF0A2 +S11340F80A03FFF7FFFD044692E048F080020095AA +S1134108019804A94FF00003FFF7F4FD044687E083 +S113411818F0010F7FF4BAAE049B03F10402049271 +S11341281B6818F0100F18BF83F800B07FF4AEAE08 +S113413818F0080F14BFA3F800B0C3F800B0A5E640 +S113414848F080020095019804A94FF00803FFF78E +S1134158D1FD044664E028F01E020095019804A9E4 +S11341684FF01003FFF7C6FD044659E04FF0FF3443 +S113417804F10104019800F071F8064600F0D4F83F +S11341880028F5D1B6F1FF3F08BF4FF0FF3447D000 +S113419818F0010701BF049B1A1D04921B680EBF87 +S11341A8039300220392002D16DC1AE005F1FF3573 +S11341B81FB9039B03F8016B039304F101040198ED +S11341C800F04CF80646431C18BF0123002DD4BF49 +S11341D8002303F0010323B1304600F0A5F80028BA +S11341E8E4D030460199FFF775FDCFB94FF00002CE +S11341F8039B1A7014E048F080020095019804A902 +S11342084FF00A03FFF776FD044609E048F0800200 +S11342180095019804A94FF01003FFF76BFD0446BD +S1134228002C0FDA029A131C18BF0123B4F1FF3FC4 +S11342380CBF1C4643F00104002C08BF4FF0FF32AA +S1134248029207E018F0010F02BF029B01330293A8 +S1134258A3441BE6029805B0BDE8F08F00B50346F9 +S113426802783AB14268107840B102F101025A600A +S11342785DF804FB436898475DF804FB4FF0FF3092 +S11342885DF804FB30B50446C8B2A16849B1236897 +S1134298626803F10105954208BF0020934238BFC4 +S11342A8C854E3682BB121686268914201D221465F +S11342B89847236803F10103236030BDA0F141004E +S11342C819288CBF00200120704700BFA0F16100AD +S11342D819288CBF00200120704700BFA0F13000CE +S11342E809288CBF00200120704700BF30B5044660 +S11342F80D46FFF7F3FF10B1A4F130000FE020469C +S1134308FFF7E4FF10B1A4F1570008E02046FFF7D7 +S1134318D5FF10B1A4F1370001E04FF0FF30A842F7 +S1134328A8BF4FF0FF3030BDA0F10903202814BF07 +S113433800200120042B98BF40F00100704700BF03 +S113434800B503B400F008F803BC02B4694609BE1A +S113435800F004F801BC00BD704700BF704700BFFF +S1134368443A2F7573722F6665617365722F736F84 +S11343786674776172652F4F70656E424C542F5482 +S113438861726765742F44656D6F2F41524D434DBB +S1134398335F4C4D33535F454B5F4C4D3353383982 +S11343A836325F43726F7373776F726B732F507209 +S11343B86F672F6964652F2E2E2F6C69622F6472C4 +S11343C8697665726C69622F6770696F2E63000085 +S11343D800E10F4004E10F4008E10F4040420F00A4 +S11343E800201C0080841E0000802500999E360051 +S11343F80040380000093D0000803E0000004B00EA +S1134408404B4C0000204E00808D5B0000C05D00D6 +S11344180080700000127A0000007D0080969800E9 +S1134428001BB7000080BB00C0E8CE00647ADA0045 +S11344380024F4000000FA00443A2F7573722F66C2 +S113444865617365722F736F6674776172652F4F38 +S113445870656E424C542F5461726765742F4465BD +S11344686D6F2F41524D434D335F4C4D33535F4570 +S11344784B5F4C4D3353383936325F43726F737325 +S1134488776F726B732F50726F672F6964652F2E65 +S11344982E2F6C69622F6472697665726C69622F5B +S11344A873797363746C2E6300000000443A2F75AB +S11344B873722F6665617365722F736F66747761A3 +S11344C872652F4F70656E424C542F546172676544 +S11344D8742F44656D6F2F41524D434D335F4C4DDE +S11344E833535F454B5F4C4D3353383936325F4352 +S11344F8726F7373776F726B732F50726F672F6954 +S113450864652F2E2E2F6C69622F6472697665722A +S11345186C69622F7379737469636B2E630000008E +S1134528443A2F7573722F6665617365722F736FC2 +S11345386674776172652F4F70656E424C542F54C0 +S113454861726765742F44656D6F2F41524D434DF9 +S1134558335F4C4D33535F454B5F4C4D33533839C0 +S113456836325F43726F7373776F726B732F507247 +S11345786F672F6964652F2E2E2F6C69622F647202 +S1134588697665726C69622F756172742E630000B6 +S113459830313233343536373839616263646566AD +S11345A8303132333435363738394142434445465D +S903219744 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzp b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzp index 64cf2682..75e75957 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzp +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzs b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzs index 698e1782..71577eac 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzs +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/ide/lm3s8962_crossworks.hzs @@ -56,9 +56,9 @@ - - - + + + - + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/memory.x b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/memory.x index b42de017..8b52905c 100644 --- a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/memory.x +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Prog/memory.x @@ -5,7 +5,7 @@ MEMORY Peripherals (wx) : ORIGIN = 0x40020000, LENGTH = 0x00100000 FiRM_Peripherals (wx) : ORIGIN = 0x40000000, LENGTH = 0x00010000 SRAM (wx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 - FLASH (rx) : ORIGIN = 0x00004000, LENGTH = 0x00040000 - 0x4000 + FLASH (rx) : ORIGIN = 0x00002000, LENGTH = 0x00040000 - 0x2000 } @@ -19,7 +19,7 @@ SECTIONS __FiRM_Peripherals_segment_end__ = 0x40010000; __SRAM_segment_start__ = 0x20000000; __SRAM_segment_end__ = 0x20010000; - __FLASH_segment_start__ = 0x00004000; + __FLASH_segment_start__ = 0x00002000; __FLASH_segment_end__ = 0x00040000; __STACKSIZE__ = 256; diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.bin b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.bin new file mode 100644 index 00000000..c0585e79 Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.bin differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.elf new file mode 100644 index 00000000..a75ce100 Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.map new file mode 100644 index 00000000..271cff48 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/bin/openbtl_ek_lm3s8962.map @@ -0,0 +1,182 @@ + +bin/openbtl_ek_lm3s8962.elf: file format elf32-littlearm +bin/openbtl_ek_lm3s8962.elf +architecture: arm, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x00000000 + +Program Header: + LOAD off 0x00008000 vaddr 0x00000000 paddr 0x00000000 align 2**15 + filesz 0x000016ba memsz 0x000016ba flags r-x + LOAD off 0x00010000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x000005ec flags rw- +private flags = 5000000: [Version5 EABI] + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000016ba 00000000 00000000 00008000 2**2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .bss 000005ec 20000000 20000000 00010000 2**2 + ALLOC + 2 .debug_abbrev 0000151a 00000000 00000000 000096ba 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 0000475c 00000000 00000000 0000abd4 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_line 00002941 00000000 00000000 0000f330 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_pubtypes 00000477 00000000 00000000 00011c71 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_str 00001cad 00000000 00000000 000120e8 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .comment 0000002a 00000000 00000000 00013d95 2**0 + CONTENTS, READONLY + 8 .ARM.attributes 00000031 00000000 00000000 00013dbf 2**0 + CONTENTS, READONLY + 9 .debug_loc 000046d2 00000000 00000000 00013df0 2**0 + CONTENTS, READONLY, DEBUGGING + 10 .debug_pubnames 0000124c 00000000 00000000 000184c2 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_aranges 00000948 00000000 00000000 0001970e 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_ranges 00000828 00000000 00000000 0001a056 2**0 + CONTENTS, READONLY, DEBUGGING + 13 .debug_frame 000019d4 00000000 00000000 0001a880 2**2 + CONTENTS, READONLY, DEBUGGING +SYMBOL TABLE: +00000000 l d .text 00000000 .text +20000000 l d .bss 00000000 .bss +00000000 l d .debug_abbrev 00000000 .debug_abbrev +00000000 l d .debug_info 00000000 .debug_info +00000000 l d .debug_line 00000000 .debug_line +00000000 l d .debug_pubtypes 00000000 .debug_pubtypes +00000000 l d .debug_str 00000000 .debug_str +00000000 l d .comment 00000000 .comment +00000000 l d .ARM.attributes 00000000 .ARM.attributes +00000000 l d .debug_loc 00000000 .debug_loc +00000000 l d .debug_pubnames 00000000 .debug_pubnames +00000000 l d .debug_aranges 00000000 .debug_aranges +00000000 l d .debug_ranges 00000000 .debug_ranges +00000000 l d .debug_frame 00000000 .debug_frame +00000000 l df *ABS* 00000000 vectors.c +00000000 l df *ABS* 00000000 cstart.c +0000011a l F .text 00000000 zero_loop2 +0000148e l F .text 00000000 zero_loop +00000000 l df *ABS* 00000000 main.c +00000000 l df *ABS* 00000000 flashlib.c +00000000 l df *ABS* 00000000 sysctl.c +00000298 l F .text 00000168 SysCtlPeripheralValid +000014cc l O .text 0000005c g_pulXtals +00001544 l O .text 0000000c g_pulRCGCRegs +00000000 l df *ABS* 00000000 gpio.c +00000774 l F .text 000000c4 GPIOBaseValid +00000000 l df *ABS* 00000000 uartlib.c +000009e0 l F .text 0000002c UARTBaseValid +00000000 l df *ABS* 00000000 boot.c +00000000 l df *ABS* 00000000 com.c +20000000 l O .bss 00000001 comEntryStateConnect +20000001 l O .bss 00000040 xcpCtoReqPacket.1375 +00000000 l df *ABS* 00000000 xcp.c +00000c68 l F .text 0000000c XcpProtectResources +00000c74 l F .text 00000014 XcpSetCtoError +00001581 l O .text 00000008 xcpStationId +20000044 l O .bss 0000004c xcpInfo +00000000 l df *ABS* 00000000 backdoor.c +20000090 l O .bss 00000001 backdoorOpen +00000000 l df *ABS* 00000000 cop.c +00000000 l df *ABS* 00000000 assert.c +20000094 l O .bss 00000004 assert_failure_file +20000098 l O .bss 00000004 assert_failure_line +00000000 l df *ABS* 00000000 cpu.c +00000000 l df *ABS* 00000000 uart.c +00000f58 l F .text 00000020 UartReceiveByte +00000f78 l F .text 00000024 UartTransmitByte +2000009c l O .bss 00000041 xcpCtoReqPacket.1577 +200000dd l O .bss 00000001 xcpCtoRxLength.1578 +200000de l O .bss 00000001 xcpCtoRxInProgress.1579 +00000000 l df *ABS* 00000000 nvm.c +00000000 l df *ABS* 00000000 timer.c +200000e0 l O .bss 00000002 millisecond_counter +00000000 l df *ABS* 00000000 flash.c +00001104 l F .text 00000038 FlashGetSector +0000113c l F .text 00000030 FlashGetSectorBaseAddr +0000116c l F .text 0000004e FlashWriteBlock +000011ba l F .text 00000026 FlashInitBlock +000011e0 l F .text 00000040 FlashSwitchBlock +00001220 l F .text 00000080 FlashAddToBlock +000015ac l O .text 000000e4 flashLayout +200000e4 l O .bss 00000204 bootBlockInfo +200002e8 l O .bss 00000204 blockInfo +00000000 l df *ABS* 00000000 hooks.c +00000000 l df *ABS* 00000000 cpulib.c +00000000 l df *ABS* 00000000 interrupt.c +00000000 l df *ABS* 00000000 canlib.c +00000000 l df *ABS* 00000000 can.c +00000bfc g F .text 0000002c ComInit +000012b8 g F .text 00000048 FlashWrite +00000ef8 g F .text 00000018 AssertFailure +00001470 g F .text 00000038 reset_handler +000010a8 g F .text 0000001c TimerUpdate +00000cb4 g F .text 00000010 XcpPacketTransmitted +00000c28 g F .text 0000001c ComTask +00000438 g F .text 00000006 SysCtlDelay +00000c58 g F .text 0000000c ComSetConnectEntryState +00000bd4 g F .text 00000016 BootInit +00000edc g F .text 00000018 BackDoorInit +00000ef6 g F .text 00000002 CopService +000016ba g .text 00000000 _etext +00000b58 g F .text 00000028 UARTSpaceAvail +0000109c g F .text 0000000c TimerReset +00000ba8 g F .text 0000002c UARTCharPutNonBlocking +00000bea g F .text 00000012 BootTask +000013a4 g F .text 00000044 FlashWriteChecksum +00000c46 g F .text 00000010 ComTransmitPacket +00000400 g F .text 00000038 SysCtlPeripheralEnable +00000ca4 g F .text 00000010 XcpIsConnected +00001078 g F .text 00000004 NvmInit +000012a0 g F .text 00000018 FlashInit +200004ec g .bss 00000000 _ebss +00000100 g *ABS* 00000000 __STACKSIZE__ +00001464 g F .text 0000000c UnusedISR +00000c44 g F .text 00000002 ComFree +00000f9c g F .text 00000028 UartInit +00001080 g F .text 00000004 NvmErase +00000b80 g F .text 00000028 UARTCharGetNonBlocking +20000000 g .bss 00000000 _bss +00000cc4 g F .text 000001e8 XcpPacketReceived +00001430 g F .text 00000034 FlashDone +000000f0 g F .text 0000004c EntryFromProg +000001cc g F .text 000000cc FlashProgram +00000c88 g F .text 0000001c XcpInit +00001300 g F .text 000000a4 FlashErase +00000150 g F .text 0000002c main +00000598 g F .text 000001dc SysCtlClockGet +00000a3c g F .text 00000038 UARTDisable +00001088 g F .text 00000012 NvmDone +00000fc4 g F .text 00000050 UartTransmitPacket +00001084 g F .text 00000004 NvmVerifyChecksum +00000f34 g F .text 00000020 CpuMemCopy +000010c4 g F .text 0000000c TimerSet +00001014 g F .text 00000064 UartReceivePacket +20000000 g .text 00000000 _data +00000ef4 g F .text 00000002 CopInit +00000f54 g F .text 00000004 CpuReset +0000107c g F .text 00000004 NvmWrite +00000f10 g F .text 00000024 CpuStartUserProgram +200005ec g .bss 00000000 _estack +000013e8 g F .text 00000046 FlashVerifyChecksum +20000000 g .text 00000000 _edata +00000000 g O .text 000000f0 _vectab +000009ac g F .text 00000034 GPIOPinTypeUART +00000c64 g F .text 00000004 ComIsConnected +00000838 g F .text 00000054 GPIODirModeSet +00000eac g F .text 00000030 BackDoorCheck +200004ec g .bss 00000000 _stack +000010f4 g F .text 00000010 TimerGet +00000a74 g F .text 000000e4 UARTConfigSetExpClk +00000440 g F .text 00000158 SysCtlClockSet +0000088c g F .text 00000120 GPIOPadConfigSet +000010d0 g F .text 00000024 TimerInit +0000017c g F .text 00000050 FlashClear +00000a0c g F .text 00000030 UARTEnable + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/build.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/build.bat new file mode 100644 index 00000000..44c0c1b8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/build.bat @@ -0,0 +1,2 @@ +@echo off +make --directory=../ all diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/clean.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/clean.bat new file mode 100644 index 00000000..32c4b5f2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/cmd/clean.bat @@ -0,0 +1,2 @@ +@echo off +make --directory=../ clean diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/config.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/config.h new file mode 100644 index 00000000..d9af1a1c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/config.h @@ -0,0 +1,128 @@ +/**************************************************************************************** +| Description: bootloader configuration header file +| File Name: config.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef CONFIG_H +#define CONFIG_H + +/**************************************************************************************** +* C P U D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* To properly initialize the baudrate clocks of the communication interface, typically + * the speed of the crystal oscillator and/or the speed at which the system runs is + * needed. Set these through configurables BOOT_CPU_XTAL_SPEED_KHZ and + * BOOT_CPU_SYSTEM_SPEED_KHZ, respectively. To enable data exchange with the host that is + * not dependent on the targets architecture, the byte ordering needs to be known. + * Setting BOOT_CPU_BYTE_ORDER_MOTOROLA to 1 selects little endian mode and 0 selects + * big endian mode. + */ +#define BOOT_CPU_XTAL_SPEED_KHZ (8000) +#define BOOT_CPU_SYSTEM_SPEED_KHZ (50000) +#define BOOT_CPU_BYTE_ORDER_MOTOROLA (0) + + +/**************************************************************************************** +* C O M M U N I C A T I O N I N T E R F A C E C O N F I G U R A T I O N +****************************************************************************************/ +/* The CAN communication interface is selected by setting the BOOT_COM_CAN_ENABLE + * configurable to 1. Configurable BOOT_COM_CAN_BAUDRATE selects the communication speed + * in bits/second. Two CAN messages are reserved for communication with the host. The + * message identifier for sending data from the target to the host is configured with + * BOOT_COM_CAN_TXMSG_ID. The one for receiving data from the host is configured with + * BOOT_COM_CAN_RXMSG_ID. The maximum amount of data bytes in a message for data + * transmission and reception is set through BOOT_COM_CAN_TX_MAX_DATA and + * BOOT_COM_CAN_RX_MAX_DATA, respectively. It is common for a microcontroller to have more + * than 1 CAN controller on board. The zero-based BOOT_COM_CAN_CHANNEL_INDEX selects the + * CAN controller channel. + * + */ +#define BOOT_COM_CAN_ENABLE (0) +#define BOOT_COM_CAN_BAUDRATE (500000) +#define BOOT_COM_CAN_TX_MSG_ID (0x7E1) +#define BOOT_COM_CAN_TX_MAX_DATA (8) +#define BOOT_COM_CAN_RX_MSG_ID (0x667) +#define BOOT_COM_CAN_RX_MAX_DATA (8) +#define BOOT_COM_CAN_CHANNEL_INDEX (0) + +/* The UART communication interface is selected by setting the BOOT_COM_UART_ENABLE + * configurable to 1. Configurable BOOT_COM_UART_BAUDRATE selects the communication speed + * in bits/second. The maximum amount of data bytes in a message for data transmission + * and reception is set through BOOT_COM_UART_TX_MAX_DATA and BOOT_COM_UART_RX_MAX_DATA, + * respectively. It is common for a microcontroller to have more than 1 UART interface + * on board. The zero-based BOOT_COM_UART_CHANNEL_INDEX selects the UART interface. + * + */ +#define BOOT_COM_UART_ENABLE (1) +#define BOOT_COM_UART_BAUDRATE (57600) +#define BOOT_COM_UART_TX_MAX_DATA (64) +#define BOOT_COM_UART_RX_MAX_DATA (64) +#define BOOT_COM_UART_CHANNEL_INDEX (0) + + +/**************************************************************************************** +* B A C K D O O R E N T R Y C O N F I G U R A T I O N +****************************************************************************************/ +/* It is possible to implement an application specific method to force the bootloader to + * stay active after a reset. Such a backdoor entry into the bootloader is desired in + * situations where the user program does not run properly and therefore cannot + * reactivate the bootloader. By enabling these hook functions, the application can + * implement the backdoor, which overrides the default backdoor entry that is programmed + * into the bootloader. When desired for security purposes, these hook functions can + * also be implemented in a way that disables the backdoor entry altogether. + */ +#define BOOT_BACKDOOR_HOOKS_ENABLE (0) + + +/**************************************************************************************** +* N O N - V O L A T I L E M E M O R Y D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* The NVM driver typically supports erase and program operations of the internal memory + * present on the microcontroller. Through these hook functions the NVM driver can be + * extended to support additional memory types such as external flash memory and serial + * eeproms. The size of the internal memory in kilobytes is specified with configurable + * BOOT_NVM_SIZE_KB. + */ +#define BOOT_NVM_HOOKS_ENABLE (0) +#define BOOT_NVM_SIZE_KB (256) + + +/**************************************************************************************** +* W A T C H D O G D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* The COP driver cannot be configured internally in the bootloader, because its use + * and configuration is application specific. The bootloader does need to service the + * watchdog in case it is used. When the application requires the use of a watchdog, + * set BOOT_COP_HOOKS_ENABLE to be able to initialize and service the watchdog through + * hook functions. + */ +#define BOOT_COP_HOOKS_ENABLE (0) + + +#endif /* CONFIG_H */ +/*********************************** end of config.h ***********************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/hooks.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/hooks.c new file mode 100644 index 00000000..9b0be4a5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/hooks.c @@ -0,0 +1,179 @@ +/**************************************************************************************** +| Description: bootloader callback source file +| File Name: hooks.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "boot.h" /* bootloader generic header */ + + +/**************************************************************************************** +* B A C K D O O R E N T R Y H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_BACKDOOR_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: BackDoorInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the backdoor entry option. +** +****************************************************************************************/ +void BackDoorInitHook(void) +{ +} /*** end of BackDoorInitHook ***/ + + +/**************************************************************************************** +** NAME: BackDoorEntryHook +** PARAMETER: none +** RETURN VALUE: BLT_TRUE if the backdoor entry is requested, BLT_FALSE otherwise. +** DESCRIPTION: Checks if a backdoor entry is requested. +** +****************************************************************************************/ +blt_bool BackDoorEntryHook(void) +{ + /* default implementation always activates the bootloader after a reset */ + return BLT_TRUE; +} /*** end of BackDoorEntryHook ***/ +#endif /* BOOT_BACKDOOR_HOOKS_ENABLE > 0 */ + + +/**************************************************************************************** +* N O N - V O L A T I L E M E M O R Y D R I V E R H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_NVM_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: NvmInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the start of the internal NVM driver +** initialization routine. +** +****************************************************************************************/ +void NvmInitHook(void) +{ +} /*** end of NvmInitHook ***/ + + +/**************************************************************************************** +** NAME: NvmWriteHook +** PARAMETER: addr start address +** len length in bytes +** data pointer to the data buffer. +** RETURN VALUE: BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is +** not within the supported memory range, or BLT_NVM_ERROR is the write +** operation failed. +** DESCRIPTION: Callback that gets called at the start of the NVM driver write +** routine. It allows additional memory to be operated on. If the address +** is not within the range of the additional memory, then +** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the data hasn't +** been written yet. +** +** +****************************************************************************************/ +blt_int8u NvmWriteHook(blt_addr addr, blt_int32u len, blt_int8u *data) +{ + return BLT_NVM_NOT_IN_RANGE; +} /*** end of NvmWriteHook ***/ + + +/**************************************************************************************** +** NAME: NvmEraseHook +** PARAMETER: addr start address +** len length in bytes +** RETURN VALUE: BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is +** not within the supported memory range, or BLT_NVM_ERROR is the erase +** operation failed. +** DESCRIPTION: Callback that gets called at the start of the NVM driver erase +** routine. It allows additional memory to be operated on. If the address +** is not within the range of the additional memory, then +** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the memory +** hasn't been erased yet. +** +****************************************************************************************/ +blt_int8u NvmEraseHook(blt_addr addr, blt_int32u len) +{ + return BLT_NVM_NOT_IN_RANGE; +} /*** end of NvmEraseHook ***/ + + +/**************************************************************************************** +** NAME: NvmDoneHook +** PARAMETER: none +** RETURN VALUE: BLT_TRUE is successful, BLT_FALSE otherwise. +** DESCRIPTION: Callback that gets called at the end of the NVM programming session. +** +****************************************************************************************/ +blt_bool NvmDoneHook(void) +{ + return BLT_TRUE; +} /*** end of NvmDoneHook ***/ +#endif /* BOOT_NVM_HOOKS_ENABLE > 0 */ + + +/**************************************************************************************** +* W A T C H D O G D R I V E R H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_COP_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: CopInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the end of the internal COP driver +** initialization routine. It can be used to configure and enable the +** watchdog. +** +****************************************************************************************/ +void CopInitHook(void) +{ +} /*** end of CopInitHook ***/ + + +/**************************************************************************************** +** NAME: CopServiceHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the end of the internal COP driver +** service routine. This gets called upon initialization and during +** potential long lasting loops and routine. It can be used to service +** the watchdog to prevent a watchdog reset. +** +****************************************************************************************/ +void CopServiceHook(void) +{ +} /*** end of CopServiceHook ***/ +#endif /* BOOT_COP_HOOKS_ENABLE > 0 */ + + +/*********************************** end of hooks.c ************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.project b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.project new file mode 100644 index 00000000..1f70a5df --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.project @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + break main +continue + + + + + + + make clean + make + + + + None + $(WorkspacePath)/.. + + + + + + + + + + + + + + + + + + + + + + + make clean + make + + + + None + $(WorkspacePath) + + + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.workspace b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.workspace new file mode 100644 index 00000000..7957a1d7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/DemoBoot.workspace @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/readme.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/readme.txt new file mode 100644 index 00000000..8a340a19 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/ide/readme.txt @@ -0,0 +1,4 @@ +Integrated Development Environment +---------------------------------- +Codelite was used as the editor during the development of this software program. This directory contains the Codelite +workspace and project files. Codelite is a cross platform open source C/C++ IDE, available at http://www.codelite.org/. \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/EULA.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/EULA.txt new file mode 100644 index 00000000..7c1cfc7a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/EULA.txt @@ -0,0 +1,400 @@ +License Agreement + +Important - This is a legally binding agreement. Read it carefully. After you +read the following terms, you will be asked whether you are authorized to +commit your company to abide by the following terms. THIS AGREEMENT IS +DISPLAYED FOR YOU TO READ PRIOR TO DOWNLOADING OR USING THE "LICENSED +MATERIALS". + +DO NOT DOWNLOAD OR INSTALL the software programs unless you agree on behalf of +yourself and your company to be bound by the terms of this License Agreement. + +DO NOT CLICK "I AGREE" UNLESS: + +1. YOU ARE AUTHORIZED TO AGREE TO THE TERMS OF THIS LICENSE ON BEHALF OF +YOURSELF AND YOUR COMPANY; AND + +2. YOU INTEND TO ENTER THIS LEGALLY BINDING AGREEMENT ON BEHALF OF YOURSELF AND +YOUR COMPANY. + +Important - Read carefully: This software license agreement ("Agreement") is a +legal agreement between you (either an individual or entity) and Texas +Instruments Incorporated ("TI"). The "Licensed Materials" subject to this +Agreement include the software programs TI has granted you access to download +and any "on-line" or electronic documentation associated with these programs, +or any portion thereof, and may also include hardware, reference designs and +associated documentation. The Licensed Materials are specifically designed and +licensed for use solely and exclusively with microprocessor/microcontroller +devices manufactured by or for TI ("TI Devices"). By installing, copying or +otherwise using the Licensed Materials you agree to abide by the provisions set +forth herein. This Agreement is displayed for you to read prior to using the +Licensed Materials. If you choose not to accept or agree with these provisions, +do not download or install the Licensed Materials. + +1. Delivery. TI may deliver the Licensed Materials, or portions thereof, to you +electronically. + +2. License Grant and Use Restrictions. + +a. Limited Source Code License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a limited, free, non-transferable, +non-exclusive, non-assignable, non-sub-licensable license to make copies, +prepare derivative works, display internally and use internally the Licensed +Materials provided to you in source code for the sole purposes of designing and +developing object and executable versions of such Licensed Materials or any +derivative thereof, that execute solely and exclusively on TI Devices used in +Customer Product(s), and maintaining and supporting such Licensed Materials, or +any derivative thereof, and Customer Product(s). "Customer Product" means a +final product distributed by or for you that consists of both hardware, +including one or more TI Devices, and software components, including only +executable versions of the Licensed Materials that execute solely and +exclusively on or with such TI Devices and not on devices manufactured by or +for an entity other than TI. + +b. Production and Distribution License. Subject to the terms of this Agreement, +and commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-exclusive, non-transferable, +non-assignable, worldwide license to: + +(i). Use object code versions of the Licensed Materials, or any derivative +thereof, to make copies, display internally, evaluate, test, distribute +internally and use internally for the sole purposes of designing and developing +Customer Product(s), and maintaining and supporting the Licensed Materials and +Customer Product(s); + +(ii). Make copies, use, sell, offer to sell, and otherwise distribute object +code and executable versions of the Licensed Materials, or any derivative +thereof, for use in or with Customer Product(s), provided that such Licensed +Materials are embedded in or only used with Customer Product(s), and provided +further that such Licensed Materials execute solely and exclusively on a TI +Device and not on any device manufactured by or for an entity other than TI. + +c. Demonstration License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to demonstrate to third +parties the Licensed Materials as they are used in Customer Products executing +solely and exclusively on TI Devices, provided that such Licensed Materials are +demonstrated in object or executable versions only. + +d. Reference Design Use License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to: + +(i). use the Licensed Materials to design, develop, manufacture or have +manufactured, sell, offer to sell, or otherwise distribute Customer Product(s) +or product designs, including portions or derivatives of the Licensed Materials +as they are incorporated in or used with Customer Product(s), provided such +Customer Products or product designs utilize a TI Device. + +e. Contractors and Suppliers. The licenses granted to you hereunder shall +include your on-site and off-site suppliers and independent contractors, while +such suppliers and independent contractors are performing work for or providing +services to you, provided that such suppliers and independent contractors have +executed work-for-hire agreements with you containing terms and conditions not +inconsistent with the terms and conditions set forth is this Agreement and +provided further that such contractors may provide work product to only you +under such work-for-hire agreements. + +f. No Other License. Notwithstanding anything to the contrary, nothing in this +Agreement shall be construed as a license to any intellectual property rights +of TI other than those rights embodied in the Licensed Materials provided to +you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY +ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED +HEREIN. + +g. Restrictions. You shall maintain the source code versions of the Licensed +Materials under password control protection and shall not disclose such source +code versions of the Licensed Materials, or any derivative thereof, to any +person other than your employees and contractors whose job performance requires +access. You shall not use the Licensed Materials with a processing device +manufactured by or for an entity other than TI, and you agree that any such +unauthorized use of the Licensed Materials is a material breach of this +Agreement. Except as expressly provided in this Agreement, you shall not copy, +publish, disclose, display, provide, transfer or make available the Licensed +Materials to any third party and you shall not sublicense, transfer, or assign +the Licensed Materials or your rights under this Agreement to any third party. +You shall not mortgage, pledge or encumber the Licensed Materials in any way. +You shall not (i) incorporate, combine, or distribute the Licensed Materials, +or any derivative thereof, with any Public Software, or (ii) use Public +Software in the development of any derivatives of the Licensed Materials, each +in such a way that would cause the Licensed Materials, or any derivative +thereof, to be subject to all or part of the license obligations or other +intellectual property related terms with respect to such Public Software, +including but not limited to, the obligations that the Licensed Materials, or +any derivative thereof, incorporated into, combined, or distributed with such +Public Software (x) be disclosed or distributed in source code form, be +licensed for the purpose of making derivatives of such software, or be +redistributed free of charge, contrary to the terms and conditions of this +Agreement, (y) be used with devices other than TI Devices, or (z) be otherwise +used or distributed in a manner contrary to the terms and conditions of this +Agreement. As used in this Section 2(g), "Public Software" means any software +that contains, or is derived in whole or in part from, any software distributed +as open source software, including but not limited to software licensed under +the following or similar models: (A) GNU's General Public License (GPL) or +Lesser/Library GPL (LGPL), (B) the Artistic License (e.g., PERL), (C) the +Mozilla Public License, (D) the Netscape Public License, (E) the Sun Community +Source License (SCSL), (F) the Sun Industry Standards Source License (SISL), +(G) the Apache Server license, (H) QT Free Edition License, (I) IBM Public +License, and (J) BitKeeper. + +h. Termination. This Agreement is effective until terminated. You may terminate +this Agreement at any time by written notice to TI. Without prejudice to any +other rights, if you fail to comply with the terms of this Agreement, TI may +terminate your right to use the Licensed Materials upon written notice to you. +Upon termination of this Agreement, you will destroy any and all copies of the +Licensed Materials in your possession, custody or control and provide to TI a +written statement signed by your authorized representative certifying such +destruction. The following sections will survive any expiration or termination +of this Agreement: 2(h) (Termination), 3 (Licensed Materials Ownership), 6 +(Warranties and Limitations), 7 (Indemnification Disclaimer), 10 (Export +Control), 11 (Governing Law and Severability), 12 (PRC Provisions), and 13 +(Entire Agreement). The obligations set forth in Section 5 (Confidential +Information) will survive any expiration or termination of this Agreement for +three (3) years after such expiration or termination. + +3. Licensed Materials Ownership. The Licensed Materials are licensed, not sold +to you, and can only be used in accordance with the terms of this Agreement. +Subject to the licenses granted to you pursuant to this Agreement, TI and TI's +licensors own and shall continue to own all right, title, and interest in and +to the Licensed Materials, including all copies thereof. The parties agree that +all fixes, modifications and improvements to the Licensed Materials conceived +of or made by TI that are based, either in whole or in part, on your feedback, +suggestions or recommendations are the exclusive property of TI and all right, +title and interest in and to such fixes, modifications or improvements to the +Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree +that when your independently developed software or hardware components are +combined, in whole or in part, with the Licensed Materials, your right to use +the Licensed Materials embodied in such resulting combined work shall remain +subject to the terms and conditions of this Agreement. + +4. Intellectual Property Rights. + +a. The Licensed Materials contain copyrighted material, trade secrets and other +proprietary information of TI and TI's licensors and are protected by copyright +laws, international copyright treaties, and trade secret laws, as well as other +intellectual property laws. To protect TI's and TI's licensors' rights in the +Licensed Materials, you agree, except as specifically permitted by statute by a +provision that cannot be waived by contract, not to "unlock", decompile, +reverse engineer, disassemble or otherwise translate any portions of the +Licensed Materials to a human-perceivable form nor to permit any person or +entity to do so. You shall not remove, alter, cover, or obscure any +confidentiality, trade secret, proprietary, or copyright notices, trade-marks, +proprietary, patent, or other identifying marks or designs from any component +of the Licensed Materials and you shall reproduce and include in all copies of +the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI +and TI's licensors as they appear in the Licensed Materials. TI reserves all +rights not specifically granted under this Agreement. + +b. Third parties may claim to own patents, copyrights, or other intellectual +property rights that cover the implementation of certain Licensed Materials. +Certain Licensed Materials may also be based on industry recognized standards, +including but not limited to specifically the ISO MPEG and ITU standards, and +software programs published by industry recognized standards bodies and certain +third parties claim to own patents, copyrights, and other intellectual property +rights that cover implementation of those standards. You acknowledge and agree +that this Agreement does not convey a license to any such third party patents, +copyrights, and other intellectual property rights and that you are solely +responsible for any patent, copyright, or other intellectual property right +claims that relate to your use and distribution of the Licensed Materials, and +your use and distribution of your products that include or incorporate the +Licensed Materials. + +5. Confidential Information. You acknowledge and agree that the Licensed +Materials contain trade secrets and other confidential information of TI and +TI's licensors. You agree to use the Licensed Materials solely within the scope +of the licenses set forth herein, to maintain the Licensed Materials in strict +confidence, to use at least the same procedures and degree of care that you use +to prevent disclosure of your own confidential information of like importance +but in no instance less than reasonable care, and to prevent disclosure of the +Licensed Materials to any third party, except as may be necessary and required +in connection with your rights and obligations hereunder. You agree to obtain +executed confidentiality agreements with your employees and contractors having +access to the Licensed Materials and to diligently take steps to enforce such +agreements in this respect. TI agrees that the employment agreements used in +the normal course of your business shall satisfy the requirements of this +section. TI may disclose your contact information to TI's applicable licensors. + +6. Warranties and Limitations. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED +MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN +IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU +ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR +CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY +OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR +DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU +WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED +MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR +FAILURES. + +THE LICENSED MATERIALS AND ANY REALTED DOCUMENTATION ARE PROVIDED "AS IS" AND +WITH ALL FAULTS. TI MAKES NO WARRANTY OR REPRESENTATION, WHETHER EXPRESS, +IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT +LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, +RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET +ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, +COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO +USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN +THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO +MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR +SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED. + +IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL, +INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY +THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE +USE OF THE LICENSED MATERIALS, REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, +COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF +DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR +INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS +AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE +HUNDRED U.S. DOLLARS (US$500). THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT +ENLARGE OR EXTEND THESE LIMITS. + +Because some jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages or limitation on how long an implied +warranty lasts, the above limitations or exclusions may not apply to you. + +7. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE +LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY +INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR +DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR +SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR +INCORPORATE THE LICENSED MATERIALS. + +You will defend and indemnify TI in the event of claim, liability or costs +(including reasonable attorney's fees related to Your use or any sub-licensee's +use of the Licensed Materials) relating in any way to Your violation of the +terms of the License Grants set forth in Section 2, or any other violation of +other terms and conditions of this Agreement. + +8. No Technical Support. TI and TI's licensors are under no obligation to +install, maintain or support the Licensed Materials. + +9. Notices. All notices to TI hereunder shall be delivered to Texas Instruments +Incorporated, AEC Software Operations, 12203 Southwest Freeway, Mail Station +701, Stafford, Texas 77477, Attention: Administrator, AEC Software Operations, +with a copy to Texas Instruments Incorporated, 12203 Southwest Freeway, Mail +Station 725, Stafford, Texas 77477, Attention: Legal Department. All notices +shall be deemed served when received by TI. + +10. Export Control. You hereby acknowledge that the Licensed Materials are +subject to export control under the U.S. Commerce Department's Export +Administration Regulations ("EAR"). You further hereby acknowledge and agree +that unless prior authorization is obtained from the U.S. Commerce Department, +neither you nor your customers will export, re-export, or release, directly or +indirectly, any technology, software, or software source code (as defined in +Part 772 of the EAR), received from TI, or export, directly or indirectly, any +direct product of such technology, software, or software source code (as +defined in Part 734 of the EAR), to any destination or country to which the +export, re-export, or release of the technology, software, or software source +code, or direct product is prohibited by the EAR. You agree that none of the +Licensed Materials may be downloaded or otherwise exported or reexported (i) +into (or to a national or resident of) Cuba, Iran, North Korea, Sudan and Syria +or any other country the U.S. has embargoed goods; or (ii) to anyone on the +U.S. Treasury Department's List of Specially Designated Nationals or the U.S. +Commerce Department's Denied Persons List or Entity List. You represent and +warrant that you are not located in, under the control of, or a national or +resident of any such country or on any such list and you will not use or +transfer the Licensed Materials for use in any sensitive nuclear, chemical or +biological weapons, or missile technology end-uses unless authorized by the +U.S. Government by regulation or specific license or for a military end-use in, +or by any military entity of Albania, Armenia, Azerbaijan, Belarus, Cambodia, +China, Georgia, Iran, Iraq, Kazakhstan, Kyrgyzstan, Laos, Libya, Macau, +Moldova, Mongolia, Russia, Tajikistan, Turkmenistan, Ukraine, Uzbekistan, and +Vietnam. Any software export classification made by TI shall be for TI's +internal use only and shall not be construed as a representation or warranty +regarding the proper export classification for such software or whether an +export license or other documentation is required for the exportation of such +software. + +11. Governing Law and Severability. This Agreement will be governed by and +interpreted in accordance with the laws of the State of Texas, without +reference to conflict of laws principles. If for any reason a court of +competent jurisdiction finds any provision of the Agreement to be +unenforceable, that provision will be enforced to the maximum extent possible +to effectuate the intent of the parties, and the remainder of the Agreement +shall continue in full force and effect. This Agreement shall not be governed +by the United Nations Convention on Contracts for the International Sale of +Goods, or by the Uniform Computer Information Transactions Act (UCITA), as it +may be enacted in the State of Texas. The parties agree that non-exclusive +jurisdiction for any dispute arising out of or relating to this Agreement lies +within the courts located in the State of Texas. Notwithstanding the foregoing, +any judgment may be enforced in any United States or foreign court, and either +party may seek injunctive relief in any United States or foreign court. + +12. PRC Provisions. If you are located in the People's Republic of China +("PRC") or if the Licensed Materials will be sent to the PRC, the following +provisions shall apply and shall supersede any other provisions in this +Agreement concerning the same subject matter as the following provisions: + +a. Registration Requirements. You shall be solely responsible for performing +all acts and obtaining all approvals that may be required in connection with +this Agreement by the government of the PRC, including but not limited to +registering pursuant to, and otherwise complying with, the PRC Measures on the +Administration of Software Products, Management Regulations on Technology +Import-Export, and Technology Import and Export Contract Registration +Management Rules. Upon receipt of such approvals from the government +authorities, you shall forward evidence of all such approvals to TI for its +records. In the event that you fail to obtain any such approval or +registration, you shall be solely responsible for any and all losses, damages +or costs resulting therefrom, and shall indemnify TI for all such losses, +damages or costs. + +b. Governing Language. This Agreement is written and executed in the English +language. If a translation of this Agreement is required for any purpose, +including but not limited to registration of the Agreement pursuant to any +governmental laws, regulations or rules, you shall be solely responsible for +creating such translation. Any translation of this Agreement into a language +other than English is intended solely in order to comply with such laws or for +reference purposes, and the English language version shall be authoritative and +controlling. + +c. Export Control. + +(i). Diversions of Technology. You hereby agree that unless prior authorization +is obtained from the U.S. Department of Commerce, neither you nor your +subsidiaries or affiliates shall knowingly export, re-export, or release, +directly or indirectly, any technology, software, or software source code (as +defined in Part 772 of the Export Administration Regulations of the U.S. +Department of Commerce ("EAR")), received from TI or any of its affiliated +companies, or export, directly or indirectly, any direct product of such +technology, software, or software source code (as defined in Part 734 of the +EAR), to any destination or country to which the export, re-export, or release +of the technology, software, software source code, or direct product is +prohibited by the EAR. + +(ii). Assurance of Compliance. You understand and acknowledge that products, +technology (regardless of the form in which it is provided), software or +software source code, received from TI or any of its affiliates under this +Agreement may be under export control of the United States or other countries. +You shall comply with the United States and other applicable non-U.S. laws and +regulations governing the export, re-export and release of any products, +technology, software, or software source code received under this Agreement +from TI or its affiliates. You shall not undertake any action that is +prohibited by the EAR. Without limiting the generality of the foregoing, you +specifically agree that you shall not transfer or release products, technology, +software, or software source code of TI or its affiliates to, or for use by, +military end users or for use in military, missile, nuclear, biological, or +chemical weapons end uses. + +(iii). Licenses. Each party shall secure at its own expense, such licenses and +export and import documents as are necessary for each respective party to +fulfill its obligations under this Agreement. If such licenses or government +approvals cannot be obtained, TI may terminate this Agreement, or shall +otherwise be excused from the performance of any obligations it may have under +this Agreement for which the licenses or government approvals are required. + +13. Entire Agreement. This is the entire Agreement between you and TI, and +absent a signed and effective software license agreement related to the subject +matter of this Agreement, this Agreement supersedes any prior agreement between +the parties related to the subject matter of this Agreement. Notwithstanding +the foregoing, any signed and effective software license agreement relating to +the subject matter hereof will supersede the terms of this Agreement. No +amendment or modification of this Agreement will be effective unless in writing +and signed by a duly authorized representative of TI. You hereby warrant and +represent that you have obtained all authorizations and other applicable +consents required empowering you to enter into this Agreement. + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.c new file mode 100644 index 00000000..c54e628f --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.c @@ -0,0 +1,2249 @@ +//***************************************************************************** +// +// can.c - Driver for the CAN module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_can.h" +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/canlib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is the maximum number that can be stored as an 11bit Message +// identifier. +// +//***************************************************************************** +#define CAN_MAX_11BIT_MSG_ID 0x7ff + +//***************************************************************************** +// +// This is used as the loop delay for accessing the CAN controller registers. +// +//***************************************************************************** +#define CAN_RW_DELAY 5 + +//***************************************************************************** +// +// The maximum CAN bit timing divisor is 19. +// +//***************************************************************************** +#define CAN_MAX_BIT_DIVISOR 19 + +//***************************************************************************** +// +// The minimum CAN bit timing divisor is 4. +// +//***************************************************************************** +#define CAN_MIN_BIT_DIVISOR 4 + +//***************************************************************************** +// +// The maximum CAN pre-divisor is 1024. +// +//***************************************************************************** +#define CAN_MAX_PRE_DIVISOR 1024 + +//***************************************************************************** +// +// The minimum CAN pre-divisor is 1. +// +//***************************************************************************** +#define CAN_MIN_PRE_DIVISOR 1 + +//***************************************************************************** +// +// Converts a set of CAN bit timing values into the value that needs to be +// programmed into the CAN_BIT register to achieve those timings. +// +//***************************************************************************** +#define CAN_BIT_VALUE(seg1, seg2, sjw) \ + ((((seg1 - 1) << CAN_BIT_TSEG1_S) & \ + CAN_BIT_TSEG1_M) | \ + (((seg2 - 1) << CAN_BIT_TSEG2_S) & \ + CAN_BIT_TSEG2_M) | \ + (((sjw - 1) << CAN_BIT_SJW_S) & \ + CAN_BIT_SJW_M)) + +//***************************************************************************** +// +// This table is used by the CANBitRateSet() API as the register defaults for +// the bit timing values. +// +//***************************************************************************** +static const unsigned short g_usCANBitValues[] = +{ + CAN_BIT_VALUE(2, 1, 1), // 4 clocks/bit + CAN_BIT_VALUE(3, 1, 1), // 5 clocks/bit + CAN_BIT_VALUE(3, 2, 2), // 6 clocks/bit + CAN_BIT_VALUE(4, 2, 2), // 7 clocks/bit + CAN_BIT_VALUE(4, 3, 3), // 8 clocks/bit + CAN_BIT_VALUE(5, 3, 3), // 9 clocks/bit + CAN_BIT_VALUE(5, 4, 4), // 10 clocks/bit + CAN_BIT_VALUE(6, 4, 4), // 11 clocks/bit + CAN_BIT_VALUE(6, 5, 4), // 12 clocks/bit + CAN_BIT_VALUE(7, 5, 4), // 13 clocks/bit + CAN_BIT_VALUE(7, 6, 4), // 14 clocks/bit + CAN_BIT_VALUE(8, 6, 4), // 15 clocks/bit + CAN_BIT_VALUE(8, 7, 4), // 16 clocks/bit + CAN_BIT_VALUE(9, 7, 4), // 17 clocks/bit + CAN_BIT_VALUE(9, 8, 4), // 18 clocks/bit + CAN_BIT_VALUE(10, 8, 4) // 19 clocks/bit +}; + +//***************************************************************************** +// +//! \internal +//! Checks a CAN base address. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! This function determines if a CAN controller base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +CANBaseValid(unsigned long ulBase) +{ + return((ulBase == CAN0_BASE) || (ulBase == CAN1_BASE) || + (ulBase == CAN2_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! +//! Returns the CAN controller interrupt number. +//! +//! \param ulBase is the base address of the selected CAN controller +//! +//! Given a CAN controller base address, returns the corresponding interrupt +//! number. +//! +//! This function replaces the original CANGetIntNumber() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return Returns a CAN interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +CANIntNumberGet(unsigned long ulBase) +{ + long lIntNumber; + + // + // Return the interrupt number for the given CAN controller. + // + switch(ulBase) + { + // + // Return the interrupt number for CAN 0 + // + case CAN0_BASE: + { + lIntNumber = INT_CAN0; + break; + } + + // + // Return the interrupt number for CAN 1 + // + case CAN1_BASE: + { + lIntNumber = INT_CAN1; + break; + } + + // + // Return the interrupt number for CAN 2 + // + case CAN2_BASE: + { + lIntNumber = INT_CAN2; + break; + } + + // + // Return -1 to indicate a bad address was passed in. + // + default: + { + lIntNumber = -1; + } + } + return(lIntNumber); +} + +//***************************************************************************** +// +//! \internal +//! +//! Reads a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be read. +//! +//! This function performs the necessary synchronization to read from a CAN +//! controller register. +//! +//! This function replaces the original CANReadReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note This function provides the delay required to access CAN registers. +//! This delay is required when accessing CAN registers directly. +//! +//! \return Returns the value read from the register. +// +//***************************************************************************** +static unsigned long +CANRegRead(unsigned long ulRegAddress) +{ + volatile int iDelay; + unsigned long ulRetVal; + unsigned long ulIntNumber; + unsigned long ulReenableInts; + + // + // Get the CAN interrupt number from the register base address. + // + ulIntNumber = CANIntNumberGet(ulRegAddress & 0xfffff000); + + // + // Make sure that the CAN base address was valid. + // + ASSERT(ulIntNumber != (unsigned long)-1); + + // + // Remember current state so that CAN interrupts are only re-enabled if + // they were already enabled. + // + ulReenableInts = HWREG(NVIC_EN1) & (1 << (ulIntNumber - 48)); + + // + // If the CAN interrupt was enabled then disable it. + // + if(ulReenableInts) + { + IntDisable(ulIntNumber); + } + + // + // Trigger the initial read to the CAN controller. The value returned at + // this point is not valid. + // + HWREG(ulRegAddress); + + // + // This delay is necessary for the CAN have the correct data on the bus. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } + + // + // Do the final read that has the valid value of the register. + // + ulRetVal = HWREG(ulRegAddress); + + // + // Enable CAN interrupts if they were enabled before this call. + // + if(ulReenableInts) + { + IntEnable(ulIntNumber); + } + + return(ulRetVal); +} + +//***************************************************************************** +// +//! \internal +//! +//! Writes a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be written. +//! \param ulRegValue is the value to write into the register specified by +//! \e ulRegAddress. +//! +//! This function takes care of the synchronization necessary to write to a +//! CAN controller register. +//! +//! This function replaces the original CANWriteReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note The delays in this function are required when accessing CAN registers +//! directly. +//! +//! \return None. +// +//***************************************************************************** +static void +CANRegWrite(unsigned long ulRegAddress, unsigned long ulRegValue) +{ + volatile int iDelay; + + // + // Trigger the initial write to the CAN controller. The value will not make + // it out to the CAN controller for CAN_RW_DELAY cycles. + // + HWREG(ulRegAddress) = ulRegValue; + + // + // Delay to allow the CAN controller to receive the new data. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the data to be written out to the CAN +//! controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 0, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy into the CAN controller. +//! +//! This function takes the steps necessary to copy data from a contiguous +//! buffer in memory into the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageSet() +//! function. +//! +//! This function replaces the original CANWriteDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegWrite(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + + // + // Write out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = pucData[iIdx++]; + + // + // Only write the second byte if needed otherwise it will be zero. + // + if(iIdx < iSize) + { + ulValue |= (pucData[iIdx++] << 8); + } + CANRegWrite((unsigned long)(pulRegister++), ulValue); + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the location to store the data read from the +//! CAN controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 1, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy from the CAN controller. +//! +//! This function takes the steps necessary to copy data to a contiguous buffer +//! in memory from the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageGet() +//! function. +//! +//! This function replaces the original CANReadDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegRead(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + // + // Read out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = CANRegRead((unsigned long)(pulRegister++)); + + // + // Store the first byte. + // + pucData[iIdx++] = (unsigned char)ulValue; + + // + // Only read the second byte if needed. + // + if(iIdx < iSize) + { + pucData[iIdx++] = (unsigned char)(ulValue >> 8); + } + } +} + +//***************************************************************************** +// +//! Initializes the CAN controller after reset. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! After reset, the CAN controller is left in the disabled state. However, +//! the memory used for message objects contains undefined values and must be +//! cleared prior to enabling the CAN controller the first time. This prevents +//! unwanted transmission or reception of data before the message objects are +//! configured. This function must be called before enabling the controller +//! the first time. +//! +//! \return None. +// +//***************************************************************************** +void +CANInit(unsigned long ulBase) +{ + int iMsg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Place CAN controller in init state, regardless of previous state. This + // will put controller in idle, and allow the message object RAM to be + // programmed. + // + CANRegWrite(ulBase + CAN_O_CTL, CAN_CTL_INIT); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid and is a "safe" condition to leave the message + // object. The same arb reg is used to program all the message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB | + CAN_IF1CMSK_CONTROL); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + CANRegWrite(ulBase + CAN_O_IF1MCTL, 0); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Make sure that the interrupt and new data flags are updated for the + // message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_NEWDAT | + CAN_IF1CMSK_CLRINTPND); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Acknowledge any pending status interrupts. + // + CANRegRead(ulBase + CAN_O_STS); +} + +//***************************************************************************** +// +//! Enables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to enable. +//! +//! Enables the CAN controller for message processing. Once enabled, the +//! controller will automatically transmit any pending frames, and process any +//! received frames. The controller can be stopped by calling CANDisable(). +//! Prior to calling CANEnable(), CANInit() should have been called to +//! initialize the controller and the CAN bus clock should be configured by +//! calling CANBitTimingSet(). +//! +//! \return None. +// +//***************************************************************************** +void +CANEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Clear the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Disables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to disable. +//! +//! Disables the CAN controller for message processing. When disabled, the +//! controller will no longer automatically process data on the CAN bus. The +//! controller can be restarted by calling CANEnable(). The state of the CAN +//! controller and the message objects in the controller are left as they were +//! before this call was made. +//! +//! \return None. +// +//***************************************************************************** +void +CANDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Set the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Reads the current settings for the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms is a pointer to a structure to hold the timing parameters. +//! +//! This function reads the current configuration of the CAN controller bit +//! clock timing, and stores the resulting information in the structure +//! supplied by the caller. Refer to CANBitTimingSet() for the meaning of the +//! values that are returned in the structure pointed to by \e pClkParms. +//! +//! This function replaces the original CANGetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // Read out all the bit timing values from the CAN controller registers. + // + uBitReg = CANRegRead(ulBase + CAN_O_BIT); + + // + // Set the phase 2 segment. + // + pClkParms->uPhase2Seg = + ((uBitReg & CAN_BIT_TSEG2_M) >> CAN_BIT_TSEG2_S) + 1; + + // + // Set the phase 1 segment. + // + pClkParms->uSyncPropPhase1Seg = + ((uBitReg & CAN_BIT_TSEG1_M) >> CAN_BIT_TSEG1_S) + 1; + + // + // Set the synchronous jump width. + // + pClkParms->uSJW = ((uBitReg & CAN_BIT_SJW_M) >> CAN_BIT_SJW_S) + 1; + + // + // Set the pre-divider for the CAN bus bit clock. + // + pClkParms->uQuantumPrescaler = + ((uBitReg & CAN_BIT_BRP_M) | + ((CANRegRead(ulBase + CAN_O_BRPE) & CAN_BRPE_BRPE_M) << 6)) + 1; +} + +//***************************************************************************** +// +//! This function is used to set the CAN bit timing values to a nominal setting +//! based on a desired bit rate. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulSourceClock is the system clock for the device in Hz. +//! \param ulBitRate is the desired bit rate. +//! +//! This function will set the CAN bit timing for the bit rate passed in the +//! \e ulBitRate parameter based on the \e ulSourceClock parameter. Since the +//! CAN clock is based off of the system clock the calling function should pass +//! in the source clock rate either by retrieving it from SysCtlClockGet() or +//! using a specific value in Hz. The CAN bit timing is calculated assuming a +//! minimal amount of propagation delay, which will work for most cases where +//! the network length is short. If tighter timing requirements or longer +//! network lengths are needed, then the CANBitTimingSet() function is +//! available for full customization of all of the CAN bit timing values. +//! Since not all bit rates can be matched exactly, the bit rate is set to the +//! value closest to the desired bit rate without being higher than the +//! \e ulBitRate value. +//! +//! \note On some devices the source clock is fixed at 8MHz so the +//! \e ulSourceClock should be set to 8000000. +//! +//! \return This function returns the bit rate that the CAN controller was +//! configured to use or it returns 0 to indicate that the bit rate was not +//! changed because the requested bit rate was not valid. +//! +//***************************************************************************** +unsigned long +CANBitRateSet(unsigned long ulBase, unsigned long ulSourceClock, + unsigned long ulBitRate) +{ + unsigned long ulDesiredRatio; + unsigned long ulCANBits; + unsigned long ulPreDivide; + unsigned long ulRegValue; + unsigned short usCANCTL; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(ulSourceClock != 0); + ASSERT(ulBitRate != 0); + + // + // Calculate the desired clock rate. + // + ulDesiredRatio = ulSourceClock / ulBitRate; + + // + // Make sure that the ratio of CAN bit rate to processor clock is not too + // small or too large. + // + ASSERT(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)); + ASSERT(ulDesiredRatio >= (CAN_MIN_PRE_DIVISOR * CAN_MIN_BIT_DIVISOR)); + + // + // Make sure that the Desired Ratio is not too large. This enforces the + // requirement that the bit rate is larger than requested. + // + if((ulSourceClock / ulDesiredRatio) > ulBitRate) + { + ulDesiredRatio += 1; + } + + // + // Check all possible values to find a matching value. + // + while(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)) + { + // + // Loop through all possible CAN bit divisors. + // + for(ulCANBits = CAN_MAX_BIT_DIVISOR; ulCANBits >= CAN_MIN_BIT_DIVISOR; + ulCANBits--) + { + // + // For a given CAN bit divisor save the pre divisor. + // + ulPreDivide = ulDesiredRatio / ulCANBits; + + // + // If the calculated divisors match the desired clock ratio then + // return these bit rate and set the CAN bit timing. + // + if((ulPreDivide * ulCANBits) == ulDesiredRatio) + { + // + // Start building the bit timing value by adding the bit timing + // in time quanta. + // + ulRegValue = g_usCANBitValues[ulCANBits - CAN_MIN_BIT_DIVISOR]; + + // + // To set the bit timing register, the controller must be placed + // in init mode (if not already), and also configuration change + // bit enabled. The state of the register should be saved + // so it can be restored. + // + usCANCTL = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, + usCANCTL | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Now add in the pre-scalar on the bit rate. + // + ulRegValue |= ((ulPreDivide - 1) & CAN_BIT_BRP_M); + + // + // Set the clock bits in the and the lower bits of the + // pre-scalar. + // + CANRegWrite(ulBase + CAN_O_BIT, ulRegValue); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((ulPreDivide - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Restore the saved CAN Control register. + // + CANRegWrite(ulBase + CAN_O_CTL, usCANCTL); + + // + // Return the computed bit rate. + // + return(ulSourceClock / ( ulPreDivide * ulCANBits)); + } + } + + // + // Move the divisor up one and look again. Only in rare cases are + // more than 2 loops required to find the value. + // + ulDesiredRatio++; + } + + // + // A valid combination could not be found, so return 0 to indicate that the + // bit rate was not changed. + // + return(0); +} + +//***************************************************************************** +// +//! Configures the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms points to the structure with the clock parameters. +//! +//! Configures the various timing parameters for the CAN bus bit timing: +//! Propagation segment, Phase Buffer 1 segment, Phase Buffer 2 segment, and +//! the Synchronization Jump Width. The values for Propagation and Phase +//! Buffer 1 segments are derived from the combination +//! \e pClkParms->uSyncPropPhase1Seg parameter. Phase Buffer 2 is determined +//! from the \e pClkParms->uPhase2Seg parameter. These two parameters, along +//! with \e pClkParms->uSJW are based in units of bit time quanta. The actual +//! quantum time is determined by the \e pClkParms->uQuantumPrescaler value, +//! which specifies the divisor for the CAN module clock. +//! +//! The total bit time, in quanta, will be the sum of the two Seg parameters, +//! as follows: +//! +//! bit_time_q = uSyncPropPhase1Seg + uPhase2Seg + 1 +//! +//! Note that the Sync_Seg is always one quantum in duration, and will be added +//! to derive the correct duration of Prop_Seg and Phase1_Seg. +//! +//! The equation to determine the actual bit rate is as follows: +//! +//! CAN Clock / +//! ((\e uSyncPropPhase1Seg + \e uPhase2Seg + 1) * (\e uQuantumPrescaler)) +//! +//! This means that with \e uSyncPropPhase1Seg = 4, \e uPhase2Seg = 1, +//! \e uQuantumPrescaler = 2 and an 8 MHz CAN clock, that the bit rate will be +//! (8 MHz) / ((5 + 2 + 1) * 2) or 500 Kbit/sec. +//! +//! This function replaces the original CANSetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + unsigned int uSavedInit; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // The phase 1 segment must be in the range from 2 to 16. + // + ASSERT((pClkParms->uSyncPropPhase1Seg >= 2) && + (pClkParms->uSyncPropPhase1Seg <= 16)); + + // + // The phase 2 segment must be in the range from 1 to 8. + // + ASSERT((pClkParms->uPhase2Seg >= 1) && (pClkParms->uPhase2Seg <= 8)); + + // + // The synchronous jump windows must be in the range from 1 to 4. + // + ASSERT((pClkParms->uSJW >= 1) && (pClkParms->uSJW <= 4)); + + // + // The CAN clock pre-divider must be in the range from 1 to 1024. + // + ASSERT((pClkParms->uQuantumPrescaler <= 1024) && + (pClkParms->uQuantumPrescaler >= 1)); + + // + // To set the bit timing register, the controller must be placed in init + // mode (if not already), and also configuration change bit enabled. State + // of the init bit should be saved so it can be restored at the end. + // + uSavedInit = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Set the bit fields of the bit timing register according to the parms. + // + uBitReg = (((pClkParms->uPhase2Seg - 1) << CAN_BIT_TSEG2_S) & + CAN_BIT_TSEG2_M); + uBitReg |= (((pClkParms->uSyncPropPhase1Seg - 1) << CAN_BIT_TSEG1_S) & + CAN_BIT_TSEG1_M); + uBitReg |= ((pClkParms->uSJW - 1) << CAN_BIT_SJW_S) & CAN_BIT_SJW_M; + uBitReg |= (pClkParms->uQuantumPrescaler - 1) & CAN_BIT_BRP_M; + CANRegWrite(ulBase + CAN_O_BIT, uBitReg); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((pClkParms->uQuantumPrescaler - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Clear the config change bit, and restore the init bit. + // + uSavedInit &= ~CAN_CTL_CCE; + + // + // If Init was not set before, then clear it. + // + if(uSavedInit & CAN_CTL_INIT) + { + uSavedInit &= ~CAN_CTL_INIT; + } + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled CAN interrupts occur. +//! +//! This function registers the interrupt handler in the interrupt vector +//! table, and enables CAN interrupts on the interrupt controller; specific CAN +//! interrupt sources must be enabled using CANIntEnable(). The interrupt +//! handler being registered must clear the source of the interrupt using +//! CANIntClear(). +//! +//! If the application is using a static interrupt vector table stored in +//! flash, then it is not necessary to register the interrupt handler this way. +//! Instead, IntEnable() should be used to enable CAN interrupts on the +//! interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntRegister(ulIntNumber, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(ulIntNumber); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the previously registered interrupt handler and +//! disables the interrupt on the interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntUnregister(unsigned long ulBase) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntUnregister(ulIntNumber); + + // + // Disable the CAN interrupt. + // + IntDisable(ulIntNumber); +} + +//***************************************************************************** +// +//! Enables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables specific interrupt sources of the CAN controller. Only enabled +//! sources will cause a processor interrupt. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b CAN_INT_ERROR - a controller error condition has occurred +//! - \b CAN_INT_STATUS - a message transfer has completed, or a bus error has +//! been detected +//! - \b CAN_INT_MASTER - allow CAN controller to generate interrupts +//! +//! In order to generate any interrupts, \b CAN_INT_MASTER must be enabled. +//! Further, for any particular transaction from a message object to generate +//! an interrupt, that message object must have interrupts enabled (see +//! CANMessageSet()). \b CAN_INT_ERROR will generate an interrupt if the +//! controller enters the ``bus off'' condition, or if the error counters reach +//! a limit. \b CAN_INT_STATUS will generate an interrupt under quite a few +//! status conditions and may provide more interrupts than the application +//! needs to handle. When an interrupt occurs, use CANIntStatus() to determine +//! the cause. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Enable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags); +} + +//***************************************************************************** +// +//! Disables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the specified CAN controller interrupt sources. Only enabled +//! interrupt sources can cause a processor interrupt. +//! +//! The \e ulIntFlags parameter has the same definition as in the +//! CANIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Disable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~(ulIntFlags)); +} + +//***************************************************************************** +// +//! Returns the current CAN controller interrupt status. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eIntStsReg indicates which interrupt status register to read +//! +//! Returns the value of one of two interrupt status registers. The interrupt +//! status register read is determined by the \e eIntStsReg parameter, which +//! can have one of the following values: +//! +//! - \b CAN_INT_STS_CAUSE - indicates the cause of the interrupt +//! - \b CAN_INT_STS_OBJECT - indicates pending interrupts of all message +//! objects +//! +//! \b CAN_INT_STS_CAUSE returns the value of the controller interrupt register +//! and indicates the cause of the interrupt. It will be a value of +//! \b CAN_INT_INTID_STATUS if the cause is a status interrupt. In this case, +//! the status register should be read with the CANStatusGet() function. +//! Calling this function to read the status will also clear the status +//! interrupt. If the value of the interrupt register is in the range 1-32, +//! then this indicates the number of the highest priority message object that +//! has an interrupt pending. The message object interrupt can be cleared by +//! using the CANIntClear() function, or by reading the message using +//! CANMessageGet() in the case of a received message. The interrupt handler +//! can read the interrupt status again to make sure all pending interrupts are +//! cleared before returning from the interrupt. +//! +//! \b CAN_INT_STS_OBJECT returns a bit mask indicating which message objects +//! have pending interrupts. This can be used to discover all of the pending +//! interrupts at once, as opposed to repeatedly reading the interrupt register +//! by using \b CAN_INT_STS_CAUSE. +//! +//! \return Returns the value of one of the interrupt status registers. +// +//***************************************************************************** +unsigned long +CANIntStatus(unsigned long ulBase, tCANIntStsReg eIntStsReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // See which status the caller is looking for. + // + switch(eIntStsReg) + { + // + // The caller wants the global interrupt status for the CAN controller + // specified by ulBase. + // + case CAN_INT_STS_CAUSE: + { + ulStatus = CANRegRead(ulBase + CAN_O_INT); + break; + } + + // + // The caller wants the current message status interrupt for all + // messages. + // + case CAN_INT_STS_OBJECT: + { + // + // Read and combine both 16 bit values into one 32bit status. + // + ulStatus = (CANRegRead(ulBase + CAN_O_MSG1INT) & + CAN_MSG1INT_INTPND_M); + ulStatus |= (CANRegRead(ulBase + CAN_O_MSG2INT) << 16); + break; + } + + // + // Request was for unknown status so just return 0. + // + default: + { + ulStatus = 0; + break; + } + } + + // + // Return the interrupt status value + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears a CAN interrupt source. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntClr is a value indicating which interrupt source to clear. +//! +//! This function can be used to clear a specific interrupt source. The +//! \e ulIntClr parameter should be one of the following values: +//! +//! - \b CAN_INT_INTID_STATUS - Clears a status interrupt. +//! - 1-32 - Clears the specified message object interrupt +//! +//! It is not necessary to use this function to clear an interrupt. This +//! should only be used if the application wants to clear an interrupt source +//! without taking the normal interrupt action. +//! +//! Normally, the status interrupt is cleared by reading the controller status +//! using CANStatusGet(). A specific message object interrupt is normally +//! cleared by reading the message object using CANMessageGet(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +CANIntClear(unsigned long ulBase, unsigned long ulIntClr) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntClr == CAN_INT_INTID_STATUS) || + ((ulIntClr>=1) && (ulIntClr <=32))); + + if(ulIntClr == CAN_INT_INTID_STATUS) + { + // + // Simply read and discard the status to clear the interrupt. + // + CANRegRead(ulBase + CAN_O_STS); + } + else + { + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Only change the interrupt pending state by setting only the + // CAN_IF1CMSK_CLRINTPND bit. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_CLRINTPND); + + // + // Send the clear pending interrupt command to the CAN controller. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulIntClr & CAN_IF1CRQ_MNUM_M); + + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + } +} + +//***************************************************************************** +// +//! Sets the CAN controller automatic retransmission behavior. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param bAutoRetry enables automatic retransmission. +//! +//! Enables or disables automatic retransmission of messages with detected +//! errors. If \e bAutoRetry is \b true, then automatic retransmission is +//! enabled, otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry) +{ + unsigned long ulCtlReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + ulCtlReg = CANRegRead(ulBase + CAN_O_CTL); + + // + // Conditionally set the DAR bit to enable/disable auto-retry. + // + if(bAutoRetry) + { + // + // Clearing the DAR bit tells the controller to not disable the + // auto-retry of messages which were not transmitted or received + // correctly. + // + ulCtlReg &= ~CAN_CTL_DAR; + } + else + { + // + // Setting the DAR bit tells the controller to disable the auto-retry + // of messages which were not transmitted or received correctly. + // + ulCtlReg |= CAN_CTL_DAR; + } + + CANRegWrite(ulBase + CAN_O_CTL, ulCtlReg); +} + +//***************************************************************************** +// +//! Returns the current setting for automatic retransmission. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! Reads the current setting for the automatic retransmission in the CAN +//! controller and returns it to the caller. +//! +//! \return Returns \b true if automatic retransmission is enabled, \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +CANRetryGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the disable automatic retry setting from the CAN controller. + // + if(CANRegRead(ulBase + CAN_O_CTL) & CAN_CTL_DAR) + { + // + // Automatic data retransmission is not enabled. + // + return(false); + } + + // + // Automatic data retransmission is enabled. + // + return(true); +} + +//***************************************************************************** +// +//! Reads one of the controller status registers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eStatusReg is the status register to read. +//! +//! Reads a status register of the CAN controller and returns it to the caller. +//! The different status registers are: +//! +//! - \b CAN_STS_CONTROL - the main controller status +//! - \b CAN_STS_TXREQUEST - bit mask of objects pending transmission +//! - \b CAN_STS_NEWDAT - bit mask of objects with new data +//! - \b CAN_STS_MSGVAL - bit mask of objects with valid configuration +//! +//! When reading the main controller status register, a pending status +//! interrupt will be cleared. This should be used in the interrupt handler +//! for the CAN controller if the cause is a status interrupt. The controller +//! status register fields are as follows: +//! +//! - \b CAN_STATUS_BUS_OFF - controller is in bus-off condition +//! - \b CAN_STATUS_EWARN - an error counter has reached a limit of at least 96 +//! - \b CAN_STATUS_EPASS - CAN controller is in the error passive state +//! - \b CAN_STATUS_RXOK - a message was received successfully (independent of +//! any message filtering). +//! - \b CAN_STATUS_TXOK - a message was successfully transmitted +//! - \b CAN_STATUS_LEC_MSK - mask of last error code bits (3 bits) +//! - \b CAN_STATUS_LEC_NONE - no error +//! - \b CAN_STATUS_LEC_STUFF - stuffing error detected +//! - \b CAN_STATUS_LEC_FORM - a format error occurred in the fixed format part +//! of a message +//! - \b CAN_STATUS_LEC_ACK - a transmitted message was not acknowledged +//! - \b CAN_STATUS_LEC_BIT1 - dominant level detected when trying to send in +//! recessive mode +//! - \b CAN_STATUS_LEC_BIT0 - recessive level detected when trying to send in +//! dominant mode +//! - \b CAN_STATUS_LEC_CRC - CRC error in received message +//! +//! The remaining status registers are 32-bit bit maps to the message objects. +//! They can be used to quickly obtain information about the status of all the +//! message objects without needing to query each one. They contain the +//! following information: +//! +//! - \b CAN_STS_TXREQUEST - if a message object's TxRequest bit is set, that +//! means that a transmission is pending on that object. The application can +//! use this to determine which objects are still waiting to send a message. +//! - \b CAN_STS_NEWDAT - if a message object's NewDat bit is set, that means +//! that a new message has been received in that object, and has not yet been +//! picked up by the host application +//! - \b CAN_STS_MSGVAL - if a message object's MsgVal bit is set, that means +//! it has a valid configuration programmed. The host application can use this +//! to determine which message objects are empty/unused. +//! +//! \return Returns the value of the status register. +// +//***************************************************************************** +unsigned long +CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + switch(eStatusReg) + { + // + // Just return the global CAN status register since that is what was + // requested. + // + case CAN_STS_CONTROL: + { + ulStatus = CANRegRead(ulBase + CAN_O_STS); + CANRegWrite(ulBase + CAN_O_STS, + ~(CAN_STS_RXOK | CAN_STS_TXOK | CAN_STS_LEC_M)); + break; + } + + // + // Combine the Transmit status bits into one 32bit value. + // + case CAN_STS_TXREQUEST: + { + ulStatus = CANRegRead(ulBase + CAN_O_TXRQ1); + ulStatus |= CANRegRead(ulBase + CAN_O_TXRQ2) << 16; + break; + } + + // + // Combine the New Data status bits into one 32bit value. + // + case CAN_STS_NEWDAT: + { + ulStatus = CANRegRead(ulBase + CAN_O_NWDA1); + ulStatus |= CANRegRead(ulBase + CAN_O_NWDA2) << 16; + break; + } + + // + // Combine the Message valid status bits into one 32bit value. + // + case CAN_STS_MSGVAL: + { + ulStatus = CANRegRead(ulBase + CAN_O_MSG1VAL); + ulStatus |= CANRegRead(ulBase + CAN_O_MSG2VAL) << 16; + break; + } + + // + // Unknown CAN status requested so return 0. + // + default: + { + ulStatus = 0; + break; + } + } + return(ulStatus); +} + +//***************************************************************************** +// +//! Reads the CAN controller error counter register. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pulRxCount is a pointer to storage for the receive error counter. +//! \param pulTxCount is a pointer to storage for the transmit error counter. +//! +//! Reads the error counter register and returns the transmit and receive error +//! counts to the caller along with a flag indicating if the controller receive +//! counter has reached the error passive limit. The values of the receive and +//! transmit error counters are returned through the pointers provided as +//! parameters. +//! +//! After this call, \e *pulRxCount will hold the current receive error count +//! and \e *pulTxCount will hold the current transmit error count. +//! +//! \return Returns \b true if the receive error count has reached the error +//! passive limit, and \b false if the error count is below the error passive +//! limit. +// +//***************************************************************************** +tBoolean +CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount) +{ + unsigned long ulCANError; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the current count of transmit/receive errors. + // + ulCANError = CANRegRead(ulBase + CAN_O_ERR); + + // + // Extract the error numbers from the register value. + // + *pulRxCount = (ulCANError & CAN_ERR_REC_M) >> CAN_ERR_REC_S; + *pulTxCount = (ulCANError & CAN_ERR_TEC_M) >> CAN_ERR_TEC_S; + + if(ulCANError & CAN_ERR_RP) + { + return(true); + } + return(false); +} + +//***************************************************************************** +// +//! Configures a message object in the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to configure (1-32). +//! \param pMsgObject is a pointer to a structure containing message object +//! settings. +//! \param eMsgType indicates the type of message for this object. +//! +//! This function is used to configure any one of the 32 message objects in the +//! CAN controller. A message object can be configured as any type of CAN +//! message object as well as several options for automatic transmission and +//! reception. This call also allows the message object to be configured to +//! generate interrupts on completion of message receipt or transmission. The +//! message object can also be configured with a filter/mask so that actions +//! are only taken when a message that meets certain parameters is seen on the +//! CAN bus. +//! +//! The \e eMsgType parameter must be one of the following values: +//! +//! - \b MSG_OBJ_TYPE_TX - CAN transmit message object. +//! - \b MSG_OBJ_TYPE_TX_REMOTE - CAN transmit remote request message object. +//! - \b MSG_OBJ_TYPE_RX - CAN receive message object. +//! - \b MSG_OBJ_TYPE_RX_REMOTE - CAN receive remote request message object. +//! - \b MSG_OBJ_TYPE_RXTX_REMOTE - CAN remote frame receive remote, then +//! transmit message object. +//! +//! The message object pointed to by \e pMsgObject must be populated by the +//! caller, as follows: +//! +//! - \e ulMsgID - contains the message ID, either 11 or 29 bits. +//! - \e ulMsgIDMask - mask of bits from \e ulMsgID that must match if +//! identifier filtering is enabled. +//! - \e ulFlags +//! - Set \b MSG_OBJ_TX_INT_ENABLE flag to enable interrupt on transmission. +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to enable interrupt on receipt. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable filtering based on the +//! identifier mask specified by \e ulMsgIDMask. +//! - \e ulMsgLen - the number of bytes in the message data. This should be +//! non-zero even for a remote frame; it should match the expected bytes of the +//! data responding data frame. +//! - \e pucMsgData - points to a buffer containing up to 8 bytes of data for a +//! data frame. +//! +//! \b Example: To send a data frame or remote frame(in response to a remote +//! request), take the following steps: +//! +//! -# Set \e eMsgType to \b MSG_OBJ_TYPE_TX. +//! -# Set \e pMsgObject->ulMsgID to the message ID. +//! -# Set \e pMsgObject->ulFlags. Make sure to set \b MSG_OBJ_TX_INT_ENABLE to +//! allow an interrupt to be generated when the message is sent. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the data frame. +//! -# Set \e pMsgObject->pucMsgData to point to an array containing the bytes +//! to send in the message. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! \b Example: To receive a specific data frame, take the following steps: +//! +//! -# Set \e eMsgObjType to \b MSG_OBJ_TYPE_RX. +//! -# Set \e pMsgObject->ulMsgID to the full message ID, or a partial mask to +//! use partial ID matching. +//! -# Set \e pMsgObject->ulMsgIDMask bits that should be used for masking +//! during comparison. +//! -# Set \e pMsgObject->ulFlags as follows: +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to be interrupted when the data frame +//! is received. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable identifier based filtering. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the expected data +//! frame. +//! -# The buffer pointed to by \e pMsgObject->pucMsgData is not used by this +//! call as no data is present at the time of the call. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! If you specify a message object buffer that already contains a message +//! definition, it will be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + tBoolean bTransferData; + tBoolean bUseExtendedID; + + bTransferData = 0; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + ASSERT((eMsgType == MSG_OBJ_TYPE_TX) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RX) || + (eMsgType == MSG_OBJ_TYPE_RX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RXTX_REMOTE)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // See if we need to use an extended identifier or not. + // + if((pMsgObject->ulMsgID > CAN_MAX_11BIT_MSG_ID) || + (pMsgObject->ulFlags & MSG_OBJ_EXTENDED_ID)) + { + bUseExtendedID = 1; + } + else + { + bUseExtendedID = 0; + } + + // + // This is always a write to the Message object as this call is setting a + // message object. This call will also always set all size bits so it sets + // both data bits. The call will use the CONTROL register to set control + // bits so this bit needs to be set as well. + // + usCmdMaskReg = (CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL); + + // + // Initialize the values to a known state before filling them in based on + // the type of message object that is being configured. + // + usArbReg0 = 0; + usArbReg1 = 0; + usMsgCtrl = 0; + usMaskReg0 = 0; + usMaskReg1 = 0; + + switch(eMsgType) + { + // + // Transmit message object. + // + case MSG_OBJ_TYPE_TX: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = CAN_IF1ARB2_DIR; + bTransferData = 1; + break; + } + + // + // Transmit remote request message object + // + case MSG_OBJ_TYPE_TX_REMOTE: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = 0; + break; + } + + // + // Receive message object. + // + case MSG_OBJ_TYPE_RX: + { + // + // This clears the DIR bit along with everything else. The TXRQST + // bit was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = 0; + break; + } + + // + // Receive remote request message object. + // + case MSG_OBJ_TYPE_RX_REMOTE: + { + // + // The DIR bit is set to one for remote receivers. The TXRQST bit + // was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object so that it only indicates that a remote frame + // was received and allow for software to handle it by sending back + // a data frame. + // + usMsgCtrl = CAN_IF1MCTL_UMASK; + + // + // Use the full Identifier by default. + // + usMaskReg0 = 0xffff; + usMaskReg1 = 0x1fff; + + // + // Make sure to send the mask to the message object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + break; + } + + // + // Remote frame receive remote, with auto-transmit message object. + // + case MSG_OBJ_TYPE_RXTX_REMOTE: + { + // + // Oddly the DIR bit is set to one for remote receivers. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object to auto answer if a matching identifier is seen. + // + usMsgCtrl = CAN_IF1MCTL_RMTEN | CAN_IF1MCTL_UMASK; + + // + // The data to be returned needs to be filled in. + // + bTransferData = 1; + break; + } + + // + // This case should never happen due to the ASSERT statement at the + // beginning of this function. + // + default: + { + return; + } + } + + // + // Configure the Mask Registers. + // + if(pMsgObject->ulFlags & MSG_OBJ_USE_ID_FILTER) + { + if(bUseExtendedID) + { + // + // Set the 29 bits of Identifier mask that were requested. + // + usMaskReg0 = pMsgObject->ulMsgIDMask & CAN_IF1MSK1_IDMSK_M; + usMaskReg1 = ((pMsgObject->ulMsgIDMask >> 16) & + CAN_IF1MSK2_IDMSK_M); + } + else + { + // + // Lower 16 bit are unused so set them to zero. + // + usMaskReg0 = 0; + + // + // Put the 11 bit Mask Identifier into the upper bits of the field + // in the register. + // + usMaskReg1 = ((pMsgObject->ulMsgIDMask << 2) & + CAN_IF1MSK2_IDMSK_M); + } + } + + // + // If the caller wants to filter on the extended ID bit then set it. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_EXT_FILTER) == + MSG_OBJ_USE_EXT_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MXTD; + } + + // + // The caller wants to filter on the message direction field. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_DIR_FILTER) == + MSG_OBJ_USE_DIR_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MDIR; + } + + if(pMsgObject->ulFlags & (MSG_OBJ_USE_ID_FILTER | MSG_OBJ_USE_DIR_FILTER | + MSG_OBJ_USE_EXT_FILTER)) + { + // + // Set the UMASK bit to enable using the mask register. + // + usMsgCtrl |= CAN_IF1MCTL_UMASK; + + // + // Set the MASK bit so that this gets transferred to the Message Object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + } + + // + // Set the Arb bit so that this gets transferred to the Message object. + // + usCmdMaskReg |= CAN_IF1CMSK_ARB; + + // + // Configure the Arbitration registers. + // + if(bUseExtendedID) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + usArbReg0 |= pMsgObject->ulMsgID & CAN_IF1ARB1_ID_M; + usArbReg1 |= (pMsgObject->ulMsgID >> 16) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid and set the extended ID bit. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL | CAN_IF1ARB2_XTD; + } + else + { + // + // Set the 11 bit version of the Identifier for this message object. + // The lower 18 bits are set to zero. + // + usArbReg1 |= (pMsgObject->ulMsgID << 2) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL; + } + + // + // Set the data length since this is set for all transfers. This is also a + // single transfer and not a FIFO transfer so set EOB bit. + // + usMsgCtrl |= (pMsgObject->ulMsgLen & CAN_IF1MCTL_DLC_M); + + // + // Mark this as the last entry if this is not the last entry in a FIFO. + // + if((pMsgObject->ulFlags & MSG_OBJ_FIFO) == 0) + { + usMsgCtrl |= CAN_IF1MCTL_EOB; + } + + // + // Enable transmit interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_TX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_TXIE; + } + + // + // Enable receive interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_RX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_RXIE; + } + + // + // Write the data out to the CAN Data registers if needed. + // + if(bTransferData) + { + CANDataRegWrite(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF1DA1), + pMsgObject->ulMsgLen); + } + + // + // Write out the registers to program the message object. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, usCmdMaskReg); + CANRegWrite(ulBase + CAN_O_IF1MSK1, usMaskReg0); + CANRegWrite(ulBase + CAN_O_IF1MSK2, usMaskReg1); + CANRegWrite(ulBase + CAN_O_IF1ARB1, usArbReg0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, usArbReg1); + CANRegWrite(ulBase + CAN_O_IF1MCTL, usMsgCtrl); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +//! Reads a CAN message from one of the message object buffers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to read (1-32). +//! \param pMsgObject points to a structure containing message object fields. +//! \param bClrPendingInt indicates whether an associated interrupt should be +//! cleared. +//! +//! This function is used to read the contents of one of the 32 message objects +//! in the CAN controller, and return it to the caller. The data returned is +//! stored in the fields of the caller-supplied structure pointed to by +//! \e pMsgObject. The data consists of all of the parts of a CAN message, +//! plus some control and status information. +//! +//! Normally this is used to read a message object that has received and stored +//! a CAN message with a certain identifier. However, this could also be used +//! to read the contents of a message object in order to load the fields of the +//! structure in case only part of the structure needs to be changed from a +//! previous setting. +//! +//! When using CANMessageGet, all of the same fields of the structure are +//! populated in the same way as when the CANMessageSet() function is used, +//! with the following exceptions: +//! +//! \e pMsgObject->ulFlags: +//! +//! - \b MSG_OBJ_NEW_DATA indicates if this is new data since the last time it +//! was read +//! - \b MSG_OBJ_DATA_LOST indicates that at least one message was received on +//! this message object, and not read by the host before being overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + + // + // This is always a read to the Message object as this call is setting a + // message object. + // + usCmdMaskReg = (CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL | CAN_IF1CMSK_MASK | CAN_IF1CMSK_ARB); + + // + // Clear a pending interrupt and new data in a message object. + // + if(bClrPendingInt) + { + usCmdMaskReg |= CAN_IF1CMSK_CLRINTPND; + } + + // + // Set up the request for data from the message object. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, usCmdMaskReg); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Read out the IF Registers. + // + usMaskReg0 = CANRegRead(ulBase + CAN_O_IF2MSK1); + usMaskReg1 = CANRegRead(ulBase + CAN_O_IF2MSK2); + usArbReg0 = CANRegRead(ulBase + CAN_O_IF2ARB1); + usArbReg1 = CANRegRead(ulBase + CAN_O_IF2ARB2); + usMsgCtrl = CANRegRead(ulBase + CAN_O_IF2MCTL); + + pMsgObject->ulFlags = MSG_OBJ_NO_FLAGS; + + // + // Determine if this is a remote frame by checking the TXRQST and DIR bits. + // + if((!(usMsgCtrl & CAN_IF1MCTL_TXRQST) && (usArbReg1 & CAN_IF1ARB2_DIR)) || + ((usMsgCtrl & CAN_IF1MCTL_TXRQST) && (!(usArbReg1 & CAN_IF1ARB2_DIR)))) + { + pMsgObject->ulFlags |= MSG_OBJ_REMOTE_FRAME; + } + + // + // Get the identifier out of the register, the format depends on size of + // the mask. + // + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + pMsgObject->ulMsgID = ((usArbReg1 & CAN_IF1ARB2_ID_M) << 16) | + usArbReg0; + + pMsgObject->ulFlags |= MSG_OBJ_EXTENDED_ID; + } + else + { + // + // The Identifier is an 11 bit value. + // + pMsgObject->ulMsgID = (usArbReg1 & CAN_IF1ARB2_ID_M) >> 2; + } + + // + // Indicate that we lost some data. + // + if(usMsgCtrl & CAN_IF1MCTL_MSGLST) + { + pMsgObject->ulFlags |= MSG_OBJ_DATA_LOST; + } + + // + // Set the flag to indicate if ID masking was used. + // + if(usMsgCtrl & CAN_IF1MCTL_UMASK) + { + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // The Identifier Mask is assumed to also be a 29 bit value. + // + pMsgObject->ulMsgIDMask = + ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) << 16) | usMaskReg0; + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x1fffffff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + else + { + // + // The Identifier Mask is assumed to also be an 11 bit value. + // + pMsgObject->ulMsgIDMask = ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) >> + 2); + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x7ff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + + // + // Indicate if the extended bit was used in filtering. + // + if(usMaskReg1 & CAN_IF1MSK2_MXTD) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_EXT_FILTER; + } + + // + // Indicate if direction filtering was enabled. + // + if(usMaskReg1 & CAN_IF1MSK2_MDIR) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_DIR_FILTER; + } + } + + // + // Set the interrupt flags. + // + if(usMsgCtrl & CAN_IF1MCTL_TXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_TX_INT_ENABLE; + } + if(usMsgCtrl & CAN_IF1MCTL_RXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_RX_INT_ENABLE; + } + + // + // See if there is new data available. + // + if(usMsgCtrl & CAN_IF1MCTL_NEWDAT) + { + // + // Get the amount of data needed to be read. + // + pMsgObject->ulMsgLen = (usMsgCtrl & CAN_IF1MCTL_DLC_M); + + // + // Don't read any data for a remote frame, there is nothing valid in + // that buffer anyway. + // + if((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0) + { + // + // Read out the data from the CAN registers. + // + CANDataRegRead(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF2DA1), + pMsgObject->ulMsgLen); + } + + // + // Now clear out the new data flag. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, CAN_IF1CMSK_NEWDAT); + + // + // Transfer the message object to the message object specified by + // ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Indicate that there is new data in this message. + // + pMsgObject->ulFlags |= MSG_OBJ_NEW_DATA; + } + else + { + // + // Along with the MSG_OBJ_NEW_DATA not being set the amount of data + // needs to be set to zero if none was available. + // + pMsgObject->ulMsgLen = 0; + } +} + +//***************************************************************************** +// +//! Clears a message object so that it is no longer used. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the message object number to disable (1-32). +//! +//! This function frees the specified message object from use. Once a message +//! object has been ``cleared,'' it will no longer automatically send or +//! receive messages, or generate interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageClear(unsigned long ulBase, unsigned long ulObjID) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID >= 1) && (ulObjID <= 32)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB); + CANRegWrite(ulBase + CAN_O_IF1ARB1, 0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.h new file mode 100644 index 00000000..39aa7055 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/canlib.h @@ -0,0 +1,450 @@ +//***************************************************************************** +// +// can.h - Defines and Macros for the CAN controller. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CAN_H__ +#define __CAN_H__ + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Miscellaneous defines for Message ID Types +// +//***************************************************************************** + +//***************************************************************************** +// +// These are the flags used by the tCANMsgObject.ulFlags value when calling the +// CANMessageSet() and CANMessageGet() functions. +// +//***************************************************************************** + +// +//! This definition is used with the tCANMsgObject ulFlags value and indicates +//! that transmit interrupts should be enabled, or are enabled. +// +#define MSG_OBJ_TX_INT_ENABLE 0x00000001 + +// +//! This indicates that receive interrupts should be enabled, or are +//! enabled. +// +#define MSG_OBJ_RX_INT_ENABLE 0x00000002 + +// +//! This indicates that a message object will use or is using an extended +//! identifier. +// +#define MSG_OBJ_EXTENDED_ID 0x00000004 + +// +//! This indicates that a message object will use or is using filtering +//! based on the object's message identifier. +// +#define MSG_OBJ_USE_ID_FILTER 0x00000008 + +// +//! This indicates that new data was available in the message object. +// +#define MSG_OBJ_NEW_DATA 0x00000080 + +// +//! This indicates that data was lost since this message object was last +//! read. +// +#define MSG_OBJ_DATA_LOST 0x00000100 + +// +//! This indicates that a message object will use or is using filtering +//! based on the direction of the transfer. If the direction filtering is +//! used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_DIR_FILTER (0x00000010 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object will use or is using message +//! identifier filtering based on the extended identifier. If the extended +//! identifier filtering is used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_EXT_FILTER (0x00000020 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object is a remote frame. +// +#define MSG_OBJ_REMOTE_FRAME 0x00000040 + +// +//! This indicates that this message object is part of a FIFO structure and +//! not the final message object in a FIFO. +// +#define MSG_OBJ_FIFO 0x00000200 + +// +//! This indicates that a message object has no flags set. +// +#define MSG_OBJ_NO_FLAGS 0x00000000 + +//***************************************************************************** +// +//! This define is used with the flag values to allow checking only status +//! flags and not configuration flags. +// +//***************************************************************************** +#define MSG_OBJ_STATUS_MASK (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST) + +//***************************************************************************** +// +//! The structure used for encapsulating all the items associated with a CAN +//! message object in the CAN controller. +// +//***************************************************************************** +typedef struct +{ + // + //! The CAN message identifier used for 11 or 29 bit identifiers. + // + unsigned long ulMsgID; + + // + //! The message identifier mask used when identifier filtering is enabled. + // + unsigned long ulMsgIDMask; + + // + //! This value holds various status flags and settings specified by + //! tCANObjFlags. + // + unsigned long ulFlags; + + // + //! This value is the number of bytes of data in the message object. + // + unsigned long ulMsgLen; + + // + //! This is a pointer to the message object's data. + // + unsigned char *pucMsgData; +} +tCANMsgObject; + +//***************************************************************************** +// +//! This structure is used for encapsulating the values associated with setting +//! up the bit timing for a CAN controller. The structure is used when calling +//! the CANGetBitTiming and CANSetBitTiming functions. +// +//***************************************************************************** +typedef struct +{ + // + //! This value holds the sum of the Synchronization, Propagation, and Phase + //! Buffer 1 segments, measured in time quanta. The valid values for this + //! setting range from 2 to 16. + // + unsigned int uSyncPropPhase1Seg; + + // + //! This value holds the Phase Buffer 2 segment in time quanta. The valid + //! values for this setting range from 1 to 8. + // + unsigned int uPhase2Seg; + + // + //! This value holds the Resynchronization Jump Width in time quanta. The + //! valid values for this setting range from 1 to 4. + // + unsigned int uSJW; + + // + //! This value holds the CAN_CLK divider used to determine time quanta. + //! The valid values for this setting range from 1 to 1023. + // + unsigned int uQuantumPrescaler; +} +tCANBitClkParms; + +//***************************************************************************** +// +//! This data type is used to identify the interrupt status register. This is +//! used when calling the CANIntStatus() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the CAN interrupt status information. + // + CAN_INT_STS_CAUSE, + + // + //! Read a message object's interrupt status. + // + CAN_INT_STS_OBJECT +} +tCANIntStsReg; + +//***************************************************************************** +// +//! This data type is used to identify which of several status registers to +//! read when calling the CANStatusGet() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the full CAN controller status. + // + CAN_STS_CONTROL, + + // + //! Read the full 32-bit mask of message objects with a transmit request + //! set. + // + CAN_STS_TXREQUEST, + + // + //! Read the full 32-bit mask of message objects with new data available. + // + CAN_STS_NEWDAT, + + // + //! Read the full 32-bit mask of message objects that are enabled. + // + CAN_STS_MSGVAL +} +tCANStsReg; + +//***************************************************************************** +// +// These definitions are used to specify interrupt sources to CANIntEnable() +// and CANIntDisable(). +// +//***************************************************************************** +// +//! This flag is used to allow a CAN controller to generate error +//! interrupts. +// +#define CAN_INT_ERROR 0x00000008 + +// +//! This flag is used to allow a CAN controller to generate status +//! interrupts. +// +#define CAN_INT_STATUS 0x00000004 + +// +//! This flag is used to allow a CAN controller to generate any CAN +//! interrupts. If this is not set, then no interrupts will be generated +//! by the CAN controller. +// +#define CAN_INT_MASTER 0x00000002 + +//***************************************************************************** +// +//! This definition is used to determine the type of message object that will +//! be set up via a call to the CANMessageSet() API. +// +//***************************************************************************** +typedef enum +{ + // + //! Transmit message object. + // + MSG_OBJ_TYPE_TX, + + // + //! Transmit remote request message object + // + MSG_OBJ_TYPE_TX_REMOTE, + + // + //! Receive message object. + // + MSG_OBJ_TYPE_RX, + + // + //! Receive remote request message object. + // + MSG_OBJ_TYPE_RX_REMOTE, + + // + //! Remote frame receive remote, with auto-transmit message object. + // + MSG_OBJ_TYPE_RXTX_REMOTE +} +tMsgObjType; + +//***************************************************************************** +// +// The following enumeration contains all error or status indicators that can +// be returned when calling the CANStatusGet() function. +// +//***************************************************************************** +// +//! CAN controller has entered a Bus Off state. +// +#define CAN_STATUS_BUS_OFF 0x00000080 + +// +//! CAN controller error level has reached warning level. +// +#define CAN_STATUS_EWARN 0x00000040 + +// +//! CAN controller error level has reached error passive level. +// +#define CAN_STATUS_EPASS 0x00000020 + +// +//! A message was received successfully since the last read of this status. +// +#define CAN_STATUS_RXOK 0x00000010 + +// +//! A message was transmitted successfully since the last read of this +//! status. +// +#define CAN_STATUS_TXOK 0x00000008 + +// +//! This is the mask for the last error code field. +// +#define CAN_STATUS_LEC_MSK 0x00000007 + +// +//! There was no error. +// +#define CAN_STATUS_LEC_NONE 0x00000000 + +// +//! A bit stuffing error has occurred. +// +#define CAN_STATUS_LEC_STUFF 0x00000001 + +// +//! A formatting error has occurred. +// +#define CAN_STATUS_LEC_FORM 0x00000002 + +// +//! An acknowledge error has occurred. +// +#define CAN_STATUS_LEC_ACK 0x00000003 + +// +//! The bus remained a bit level of 1 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT1 0x00000004 + +// +//! The bus remained a bit level of 0 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT0 0x00000005 + +// +//! A CRC error has occurred. +// +#define CAN_STATUS_LEC_CRC 0x00000006 + +// +//! This is the mask for the CAN Last Error Code (LEC). +// +#define CAN_STATUS_LEC_MASK 0x00000007 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern void CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern unsigned long CANBitRateSet(unsigned long ulBase, + unsigned long ulSourceClock, + unsigned long ulBitRate); +extern void CANDisable(unsigned long ulBase); +extern void CANEnable(unsigned long ulBase); +extern tBoolean CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount); +extern void CANInit(unsigned long ulBase); +extern void CANIntClear(unsigned long ulBase, unsigned long ulIntClr); +extern void CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern unsigned long CANIntStatus(unsigned long ulBase, + tCANIntStsReg eIntStsReg); +extern void CANIntUnregister(unsigned long ulBase); +extern void CANMessageClear(unsigned long ulBase, unsigned long ulObjID); +extern void CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt); +extern void CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType); +extern tBoolean CANRetryGet(unsigned long ulBase); +extern void CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry); +extern unsigned long CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg); + +//***************************************************************************** +// +// Several CAN APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define CANSetBitTiming(a, b) CANBitTimingSet(a, b) +#define CANGetBitTiming(a, b) CANBitTimingGet(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +#endif // __CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.c new file mode 100644 index 00000000..e3b6920c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.c @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// cpu.c - Instruction wrappers for special CPU instructions needed by the +// drivers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "driverlib/cpulib.h" + +//***************************************************************************** +// +// Wrapper function for the CPSID instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsid(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + cpsid i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function returning the state of PRIMASK (indicating whether +// interrupts are enabled or disabled). +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUprimask(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the CPSIE instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsie(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + mrs r0, PRIMASK; + cpsie i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the WFI instruction. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + wfi; + bx lr +} +#endif +#if defined(ccs) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for writing the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUbasepriSet(unsigned long ulNewBasepri) +{ + + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + msr BASEPRI, r0; + bx lr +} +#endif +#if defined(ccs) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for reading the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUbasepriGet(void) +{ + unsigned long ulRet; + + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + mrs r0, BASEPRI; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.h new file mode 100644 index 00000000..c0e073e1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/cpulib.h @@ -0,0 +1,60 @@ +//***************************************************************************** +// +// cpu.h - Prototypes for the CPU instruction wrapper functions. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CPU_H__ +#define __CPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes. +// +//***************************************************************************** +extern unsigned long CPUcpsid(void); +extern unsigned long CPUcpsie(void); +extern unsigned long CPUprimask(void); +extern void CPUwfi(void); +extern unsigned long CPUbasepriGet(void); +extern void CPUbasepriSet(unsigned long ulNewBasepri); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __CPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/debug.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/debug.h new file mode 100644 index 00000000..b94a8096 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/debug.h @@ -0,0 +1,58 @@ +//***************************************************************************** +// +// debug.h - Macros for assisting debug of the driver library. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + + +#include "boot.h" + +//***************************************************************************** +// +// Prototype for the function that is called when an invalid argument is passed +// to an API. This is only used when doing a DEBUG build. +// +//***************************************************************************** +#ifndef NDEBUG +extern void AssertFailure(blt_char *file, blt_int32u line); +#endif + +//***************************************************************************** +// +// The ASSERT macro, which does the actual assertion checking. Typically, this +// will be for procedure arguments. +// +//***************************************************************************** +#ifdef NDEBUG +#define ASSERT(expr) +#else +#define ASSERT(expr) { \ + if(!(expr)) \ + { \ + AssertFailure(__FILE__, __LINE__); \ + } \ + } +#endif + +#endif // __DEBUG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.c new file mode 100644 index 00000000..ff8024f8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.c @@ -0,0 +1,912 @@ +//***************************************************************************** +// +// flash.c - Driver for programming the on-chip flash. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup flash_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_flash.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/flashlib.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Program Enable (FMPPE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPPERegs[] = +{ + FLASH_FMPPE, + FLASH_FMPPE1, + FLASH_FMPPE2, + FLASH_FMPPE3 +}; + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Read Enable (FMPRE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPRERegs[] = +{ + FLASH_FMPRE, + FLASH_FMPRE1, + FLASH_FMPRE2, + FLASH_FMPRE3 +}; + +//***************************************************************************** +// +//! Gets the number of processor clocks per micro-second. +//! +//! This function returns the number of clocks per micro-second, as presently +//! known by the flash controller. +//! +//! \return Returns the number of processor clocks per micro-second. +// +//***************************************************************************** +unsigned long +FlashUsecGet(void) +{ + // + // Return the number of clocks per micro-second. + // + return(HWREG(FLASH_USECRL) + 1); +} + +//***************************************************************************** +// +//! Sets the number of processor clocks per micro-second. +//! +//! \param ulClocks is the number of processor clocks per micro-second. +//! +//! This function is used to tell the flash controller the number of processor +//! clocks per micro-second. This value must be programmed correctly or the +//! flash most likely will not program correctly; it has no affect on reading +//! flash. +//! +//! \return None. +// +//***************************************************************************** +void +FlashUsecSet(unsigned long ulClocks) +{ + // + // Set the number of clocks per micro-second. + // + HWREG(FLASH_USECRL) = ulClocks - 1; +} + +//***************************************************************************** +// +//! Erases a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be erased. +//! +//! This function will erase a 1 kB block of the on-chip flash. After erasing, +//! the block will be filled with 0xFF bytes. Read-only and execute-only +//! blocks cannot be erased. +//! +//! This function will not return until the block has been erased. +//! +//! \return Returns 0 on success, or -1 if an invalid block address was +//! specified or the block is write-protected. +// +//***************************************************************************** +long +FlashClear(unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & (FLASH_ERASE_SIZE - 1))); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // Erase the block. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_ERASE; + + // + // Wait until the block has been erased. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_ERASE) + { + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Programs flash. +//! +//! \param pulData is a pointer to the data to be programmed. +//! \param ulAddress is the starting address in flash to be programmed. Must +//! be a multiple of four. +//! \param ulCount is the number of bytes to be programmed. Must be a multiple +//! of four. +//! +//! This function will program a sequence of words into the on-chip flash. +//! Programming each location consists of the result of an AND operation +//! of the new data and the existing data; in other words bits that contain +//! 1 can remain 1 or be changed to 0, but bits that are 0 cannot be changed +//! to 1. Therefore, a word can be programmed multiple times as long as these +//! rules are followed; if a program operation attempts to change a 0 bit to +//! a 1 bit, that bit will not have its value changed. +//! +//! Since the flash is programmed one word at a time, the starting address and +//! byte count must both be multiples of four. It is up to the caller to +//! verify the programmed contents, if such verification is required. +//! +//! This function will not return until the data has been programmed. +//! +//! \return Returns 0 on success, or -1 if a programming error is encountered. +// +//***************************************************************************** +long +FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & 3)); + ASSERT(!(ulCount & 3)); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // See if this device has a write buffer. + // + if(HWREG(SYSCTL_NVMSTAT) & SYSCTL_NVMSTAT_FWB) + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Set the address of this block of words. + // + HWREG(FLASH_FMA) = ulAddress & ~(0x7f); + + // + // Loop over the words in this 32-word block. + // + while(((ulAddress & 0x7c) || (HWREG(FLASH_FWBVAL) == 0)) && + (ulCount != 0)) + { + // + // Write this word into the write buffer. + // + HWREG(FLASH_FWBN + (ulAddress & 0x7c)) = *pulData++; + ulAddress += 4; + ulCount -= 4; + } + + // + // Program the contents of the write buffer into flash. + // + HWREG(FLASH_FMC2) = FLASH_FMC2_WRKEY | FLASH_FMC2_WRBUF; + + // + // Wait until the write buffer has been programmed. + // + while(HWREG(FLASH_FMC2) & FLASH_FMC2_WRBUF) + { + } + } + } + else + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Program the next word. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMD) = *pulData; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_WRITE; + + // + // Wait until the word has been programmed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_WRITE) + { + } + + // + // Increment to the next word. + // + pulData++; + ulAddress += 4; + ulCount -= 4; + } + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be queried. +//! +//! This function will get the current protection for the specified 2 kB block +//! of flash. Each block can be read/write, read-only, or execute-only. +//! Read/write blocks can be read, executed, erased, and programmed. Read-only +//! blocks can be read and executed. Execute-only blocks can only be executed; +//! processor and debugger data reads are not allowed. +//! +//! \return Returns the protection setting for this block. See +//! FlashProtectSet() for possible values. +// +//***************************************************************************** +tFlashProtection +FlashProtectGet(unsigned long ulAddress) +{ + unsigned long ulFMPRE, ulFMPPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + + // + // Calculate the Flash Bank from Base Address, and mask off the Bank + // from ulAddress for subsequent reference. + // + ulBank = (((ulAddress / FLASH_PROTECT_SIZE) / 32) % 4); + ulAddress &= ((FLASH_PROTECT_SIZE * 32) - 1); + + // + // Read the appropriate flash protection registers for the specified + // flash bank. + // + ulFMPRE = HWREG(g_pulFMPRERegs[ulBank]); + ulFMPPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When Querying Block + // Protection, assume these bits are 1. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulFMPRE |= (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + } + + // + // Check the appropriate protection bits for the block of memory that + // is specified by the address. + // + switch((((ulFMPRE >> (ulAddress / FLASH_PROTECT_SIZE)) & + FLASH_FMP_BLOCK_0) << 1) | + ((ulFMPPE >> (ulAddress / FLASH_PROTECT_SIZE)) & FLASH_FMP_BLOCK_0)) + { + // + // This block is marked as execute only (that is, it can not be erased + // or programmed, and the only reads allowed are via the instruction + // fetch interface). + // + case 0: + case 1: + { + return(FlashExecuteOnly); + } + + // + // This block is marked as read only (that is, it can not be erased or + // programmed). + // + case 2: + { + return(FlashReadOnly); + } + + // + // This block is read/write; it can be read, erased, and programmed. + // + case 3: + default: + { + return(FlashReadWrite); + } + } +} + +//***************************************************************************** +// +//! Sets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be protected. +//! \param eProtect is the protection to be applied to the block. Can be one +//! of \b FlashReadWrite, \b FlashReadOnly, or \b FlashExecuteOnly. +//! +//! This function will set the protection for the specified 2 kB block of +//! flash. Blocks which are read/write can be made read-only or execute-only. +//! Blocks which are read-only can be made execute-only. Blocks which are +//! execute-only cannot have their protection modified. Attempts to make the +//! block protection less stringent (that is, read-only to read/write) will +//! result in a failure (and be prevented by the hardware). +//! +//! Changes to the flash protection are maintained only until the next reset. +//! This allows the application to be executed in the desired flash protection +//! environment to check for inappropriate flash access (via the flash +//! interrupt). To make the flash protection permanent, use the +//! FlashProtectSave() function. +//! +//! \return Returns 0 on success, or -1 if an invalid address or an invalid +//! protection was specified. +// +//***************************************************************************** +long +FlashProtectSet(unsigned long ulAddress, tFlashProtection eProtect) +{ + unsigned long ulProtectRE, ulProtectPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + ASSERT((eProtect == FlashReadWrite) || (eProtect == FlashReadOnly) || + (eProtect == FlashExecuteOnly)); + + // + // Convert the address into a block number. + // + ulAddress /= FLASH_PROTECT_SIZE; + + // + // ulAddress contains a "raw" block number. Derive the Flash Bank from + // the "raw" block number, and convert ulAddress to a "relative" + // block number. + // + ulBank = ((ulAddress / 32) % 4); + ulAddress %= 32; + + // + // Get the current protection for the specified flash bank. + // + ulProtectRE = HWREG(g_pulFMPRERegs[ulBank]); + ulProtectPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When setting protection, + // check to see if block 30 or 31 and protection is FlashExecuteOnly. If + // so, return an error condition. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + if((ulAddress >= 30) && (eProtect == FlashExecuteOnly)) + { + return(-1); + } + } + + // + // Set the protection based on the requested proection. + // + switch(eProtect) + { + // + // Make this block execute only. + // + case FlashExecuteOnly: + { + // + // Turn off the read and program bits for this block. + // + ulProtectRE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read only. + // + case FlashReadOnly: + { + // + // The block can not be made read only if it is execute only. + // + if(((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) + { + return(-1); + } + + // + // Make this block read only. + // + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read/write. + // + case FlashReadWrite: + default: + { + // + // The block can not be made read/write if it is not already + // read/write. + // + if((((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) || + (((ulProtectPE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0)) + { + return(-1); + } + + // + // The block is already read/write, so there is nothing to do. + // + return(0); + } + } + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG options, and are not + // available for the FLASH protection scheme. When setting block + // protection, ensure that these bits are not altered. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulProtectRE &= ~(FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + ulProtectRE |= (HWREG(g_pulFMPRERegs[ulBank]) & + (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30)); + } + + // + // Set the new protection for the specified flash bank. + // + HWREG(g_pulFMPRERegs[ulBank]) = ulProtectRE; + HWREG(g_pulFMPPERegs[ulBank]) = ulProtectPE; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the flash protection settings. +//! +//! This function will make the currently programmed flash protection settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change the flash protection. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashProtectSave(void) +{ + int ulTemp, ulLimit; + + // + // If running on a Sandstorm-class device, only trigger a save of the first + // two protection registers (FMPRE and FMPPE). Otherwise, save the + // entire bank of flash protection registers. + // + ulLimit = CLASS_IS_SANDSTORM ? 2 : 8; + for(ulTemp = 0; ulTemp < ulLimit; ulTemp++) + { + // + // Tell the flash controller to write the flash protection register. + // + HWREG(FLASH_FMA) = ulTemp; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the user registers. +//! +//! \param pulUser0 is a pointer to the location to store USER Register 0. +//! \param pulUser1 is a pointer to the location to store USER Register 1. +//! +//! This function will read the contents of user registers (0 and 1), and +//! store them in the specified locations. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1) +{ + // + // Verify that the pointers are valid. + // + ASSERT(pulUser0 != 0); + ASSERT(pulUser1 != 0); + + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Get and store the current value of the user registers. + // + *pulUser0 = HWREG(FLASH_USERREG0); + *pulUser1 = HWREG(FLASH_USERREG1); + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Sets the user registers. +//! +//! \param ulUser0 is the value to store in USER Register 0. +//! \param ulUser1 is the value to store in USER Register 1. +//! +//! This function will set the contents of the user registers (0 and 1) to +//! the specified values. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSet(unsigned long ulUser0, unsigned long ulUser1) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Save the new values into the user registers. + // + HWREG(FLASH_USERREG0) = ulUser0; + HWREG(FLASH_USERREG1) = ulUser1; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the user registers. +//! +//! This function will make the currently programmed user register settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change this setting. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSave(void) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Setting the MSB of FMA will trigger a permanent save of a USER + // register. Bit 0 will indicate User 0 (0) or User 1 (1). + // + HWREG(FLASH_FMA) = 0x80000000; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Tell the flash controller to write the USER1 Register. + // + HWREG(FLASH_FMA) = 0x80000001; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the flash interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the flash +//! interrupt occurs. +//! +//! This sets the handler to be called when the flash interrupt occurs. The +//! flash controller can generate an interrupt when an invalid flash access +//! occurs, such as trying to program or erase a read-only block, or trying to +//! read from an execute-only block. It can also generate an interrupt when a +//! program or erase operation has completed. The interrupt will be +//! automatically enabled when the handler is registered. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_FLASH, pfnHandler); + + // + // Enable the flash interrupt. + // + IntEnable(INT_FLASH); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the flash interrupt. +//! +//! This function will clear the handler to be called when the flash interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler is no longer called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_FLASH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_FLASH); +} + +//***************************************************************************** +// +//! Enables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Enables the indicated flash controller interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntEnable(unsigned long ulIntFlags) +{ + // + // Enable the specified interrupts. + // + HWREG(FLASH_FCIM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Disables the indicated flash controller interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntDisable(unsigned long ulIntFlags) +{ + // + // Disable the specified interrupts. + // + HWREG(FLASH_FCIM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the flash controller. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b FLASH_INT_PROGRAM and \b FLASH_INT_ACCESS. +// +//***************************************************************************** +unsigned long +FlashIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(FLASH_FCMISC)); + } + else + { + return(HWREG(FLASH_FCRIS)); + } +} + +//***************************************************************************** +// +//! Clears flash controller interrupt sources. +//! +//! \param ulIntFlags is the bit mask of the interrupt sources to be cleared. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_AMISC values. +//! +//! The specified flash controller interrupt sources are cleared, so that they +//! no longer assert. This must be done in the interrupt handler to keep it +//! from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntClear(unsigned long ulIntFlags) +{ + // + // Clear the flash interrupt. + // + HWREG(FLASH_FCMISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.h new file mode 100644 index 00000000..31e56412 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/flashlib.h @@ -0,0 +1,106 @@ +//***************************************************************************** +// +// flash.h - Prototypes for the flash driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __FLASH_H__ +#define __FLASH_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to FlashProtectSet(), and returned by +// FlashProtectGet(). +// +//***************************************************************************** +typedef enum +{ + FlashReadWrite, // Flash can be read and written + FlashReadOnly, // Flash can only be read + FlashExecuteOnly // Flash can only be executed +} +tFlashProtection; + +//***************************************************************************** +// +// Values passed to FlashIntEnable(), FlashIntDisable() and FlashIntClear() and +// returned from FlashIntStatus(). +// +//***************************************************************************** +#define FLASH_INT_PROGRAM 0x00000002 // Programming Interrupt Mask +#define FLASH_INT_ACCESS 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long FlashUsecGet(void); +extern void FlashUsecSet(unsigned long ulClocks); +extern long FlashClear(unsigned long ulAddress); +extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount); +extern tFlashProtection FlashProtectGet(unsigned long ulAddress); +extern long FlashProtectSet(unsigned long ulAddress, + tFlashProtection eProtect); +extern long FlashProtectSave(void); +extern long FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1); +extern long FlashUserSet(unsigned long ulUser0, unsigned long ulUser1); +extern long FlashUserSave(void); +extern void FlashIntRegister(void (*pfnHandler)(void)); +extern void FlashIntUnregister(void); +extern void FlashIntEnable(unsigned long ulIntFlags); +extern void FlashIntDisable(unsigned long ulIntFlags); +extern unsigned long FlashIntStatus(tBoolean bMasked); +extern void FlashIntClear(unsigned long ulIntFlags); + +//***************************************************************************** +// +// Deprecated function names. These definitions ensure backwards compatibility +// but new code should avoid using deprecated function names since these will +// be removed at some point in the future. +// +//***************************************************************************** +#ifndef DEPRECATED +#define FlashIntGetStatus FlashIntStatus +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.c new file mode 100644 index 00000000..4e5afa7c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.c @@ -0,0 +1,1600 @@ +//***************************************************************************** +// +// gpio.c - API for GPIO ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup gpio_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_gpio.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/gpio.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// The base addresses of all the GPIO modules. Both the APB and AHB apertures +// are provided. +// +//***************************************************************************** +static const unsigned long g_pulGPIOBaseAddrs[] = +{ + GPIO_PORTA_BASE, GPIO_PORTA_AHB_BASE, + GPIO_PORTB_BASE, GPIO_PORTB_AHB_BASE, + GPIO_PORTC_BASE, GPIO_PORTC_AHB_BASE, + GPIO_PORTD_BASE, GPIO_PORTD_AHB_BASE, + GPIO_PORTE_BASE, GPIO_PORTE_AHB_BASE, + GPIO_PORTF_BASE, GPIO_PORTF_AHB_BASE, + GPIO_PORTG_BASE, GPIO_PORTG_AHB_BASE, + GPIO_PORTH_BASE, GPIO_PORTH_AHB_BASE, + GPIO_PORTJ_BASE, GPIO_PORTJ_AHB_BASE, +}; + +//***************************************************************************** +// +//! \internal +//! Checks a GPIO base address. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function determines if a GPIO port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +GPIOBaseValid(unsigned long ulPort) +{ + return((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTA_AHB_BASE) || + (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTB_AHB_BASE) || + (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTC_AHB_BASE) || + (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTD_AHB_BASE) || + (ulPort == GPIO_PORTE_BASE) || (ulPort == GPIO_PORTE_AHB_BASE) || + (ulPort == GPIO_PORTF_BASE) || (ulPort == GPIO_PORTF_AHB_BASE) || + (ulPort == GPIO_PORTG_BASE) || (ulPort == GPIO_PORTG_AHB_BASE) || + (ulPort == GPIO_PORTH_BASE) || (ulPort == GPIO_PORTH_AHB_BASE) || + (ulPort == GPIO_PORTJ_BASE) || (ulPort == GPIO_PORTJ_AHB_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Gets the GPIO interrupt number. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! Given a GPIO base address, returns the corresponding interrupt number. +//! +//! \return Returns a GPIO interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +GPIOGetIntNumber(unsigned long ulPort) +{ + unsigned int ulInt; + + // + // Determine the GPIO interrupt number for the given module. + // + switch(ulPort) + { + case GPIO_PORTA_BASE: + case GPIO_PORTA_AHB_BASE: + { + ulInt = INT_GPIOA; + break; + } + + case GPIO_PORTB_BASE: + case GPIO_PORTB_AHB_BASE: + { + ulInt = INT_GPIOB; + break; + } + + case GPIO_PORTC_BASE: + case GPIO_PORTC_AHB_BASE: + { + ulInt = INT_GPIOC; + break; + } + + case GPIO_PORTD_BASE: + case GPIO_PORTD_AHB_BASE: + { + ulInt = INT_GPIOD; + break; + } + + case GPIO_PORTE_BASE: + case GPIO_PORTE_AHB_BASE: + { + ulInt = INT_GPIOE; + break; + } + + case GPIO_PORTF_BASE: + case GPIO_PORTF_AHB_BASE: + { + ulInt = INT_GPIOF; + break; + } + + case GPIO_PORTG_BASE: + case GPIO_PORTG_AHB_BASE: + { + ulInt = INT_GPIOG; + break; + } + + case GPIO_PORTH_BASE: + case GPIO_PORTH_AHB_BASE: + { + ulInt = INT_GPIOH; + break; + } + + case GPIO_PORTJ_BASE: + case GPIO_PORTJ_AHB_BASE: + { + ulInt = INT_GPIOJ; + break; + } + + default: + { + return(-1); + } + } + + // + // Return GPIO interrupt number. + // + return(ulInt); +} + +//***************************************************************************** +// +//! Sets the direction and mode of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulPinIO is the pin direction and/or mode. +//! +//! This function will set the specified pin(s) on the selected GPIO port +//! as either an input or output under software control, or it will set the +//! pin to be under hardware control. +//! +//! The parameter \e ulPinIO is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_DIR_MODE_IN +//! - \b GPIO_DIR_MODE_OUT +//! - \b GPIO_DIR_MODE_HW +//! +//! where \b GPIO_DIR_MODE_IN specifies that the pin will be programmed as +//! a software controlled input, \b GPIO_DIR_MODE_OUT specifies that the pin +//! will be programmed as a software controlled output, and +//! \b GPIO_DIR_MODE_HW specifies that the pin will be placed under +//! hardware control. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note GPIOPadConfigSet() must also be used to configure the corresponding +//! pad(s) in order for them to propagate the signal to/from the GPIO. +//! +//! \return None. +// +//***************************************************************************** +void +GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulPinIO == GPIO_DIR_MODE_IN) || (ulPinIO == GPIO_DIR_MODE_OUT) || + (ulPinIO == GPIO_DIR_MODE_HW)); + + // + // Set the pin direction and mode. + // + HWREG(ulPort + GPIO_O_DIR) = ((ulPinIO & 1) ? + (HWREG(ulPort + GPIO_O_DIR) | ucPins) : + (HWREG(ulPort + GPIO_O_DIR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_AFSEL) = ((ulPinIO & 2) ? + (HWREG(ulPort + GPIO_O_AFSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AFSEL) & + ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the direction and mode of a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the direction and control mode for a specified pin on +//! the selected GPIO port. The pin can be configured as either an input or +//! output under software control, or it can be under hardware control. The +//! type of control and direction are returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIODirModeSet(). +// +//***************************************************************************** +unsigned long +GPIODirModeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulDir, ulAFSEL; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin direction and mode. + // + ulDir = HWREG(ulPort + GPIO_O_DIR); + ulAFSEL = HWREG(ulPort + GPIO_O_AFSEL); + return(((ulDir & ucPin) ? 1 : 0) | ((ulAFSEL & ucPin) ? 2 : 0)); +} + +//***************************************************************************** +// +//! Sets the interrupt type for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulIntType specifies the type of interrupt trigger mechanism. +//! +//! This function sets up the various interrupt trigger mechanisms for the +//! specified pin(s) on the selected GPIO port. +//! +//! The parameter \e ulIntType is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_FALLING_EDGE +//! - \b GPIO_RISING_EDGE +//! - \b GPIO_BOTH_EDGES +//! - \b GPIO_LOW_LEVEL +//! - \b GPIO_HIGH_LEVEL +//! +//! where the different values describe the interrupt detection mechanism +//! (edge or level) and the particular triggering event (falling, rising, +//! or both edges for edge detect, low or high for level detect). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note In order to avoid any spurious interrupts, the user must +//! ensure that the GPIO inputs remain stable for the duration of +//! this function. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulIntType == GPIO_FALLING_EDGE) || + (ulIntType == GPIO_RISING_EDGE) || (ulIntType == GPIO_BOTH_EDGES) || + (ulIntType == GPIO_LOW_LEVEL) || (ulIntType == GPIO_HIGH_LEVEL)); + + // + // Set the pin interrupt type. + // + HWREG(ulPort + GPIO_O_IBE) = ((ulIntType & 1) ? + (HWREG(ulPort + GPIO_O_IBE) | ucPins) : + (HWREG(ulPort + GPIO_O_IBE) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IS) = ((ulIntType & 2) ? + (HWREG(ulPort + GPIO_O_IS) | ucPins) : + (HWREG(ulPort + GPIO_O_IS) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IEV) = ((ulIntType & 4) ? + (HWREG(ulPort + GPIO_O_IEV) | ucPins) : + (HWREG(ulPort + GPIO_O_IEV) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the interrupt type for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the interrupt type for a specified pin on the selected +//! GPIO port. The pin can be configured as a falling edge, rising edge, or +//! both edge detected interrupt, or it can be configured as a low level or +//! high level detected interrupt. The type of interrupt detection mechanism +//! is returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIOIntTypeSet(). +// +//***************************************************************************** +unsigned long +GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulIBE, ulIS, ulIEV; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin interrupt type. + // + ulIBE = HWREG(ulPort + GPIO_O_IBE); + ulIS = HWREG(ulPort + GPIO_O_IS); + ulIEV = HWREG(ulPort + GPIO_O_IEV); + return(((ulIBE & ucPin) ? 1 : 0) | ((ulIS & ucPin) ? 2 : 0) | + ((ulIEV & ucPin) ? 4 : 0)); +} + +//***************************************************************************** +// +//! Sets the pad configuration for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulStrength specifies the output drive strength. +//! \param ulPinType specifies the pin type. +//! +//! This function sets the drive strength and type for the specified pin(s) +//! on the selected GPIO port. For pin(s) configured as input ports, the +//! pad is configured as requested, but the only real effect on the input +//! is the configuration of the pull-up or pull-down termination. +//! +//! The parameter \e ulStrength can be one of the following values: +//! +//! - \b GPIO_STRENGTH_2MA +//! - \b GPIO_STRENGTH_4MA +//! - \b GPIO_STRENGTH_8MA +//! - \b GPIO_STRENGTH_8MA_SC +//! +//! where \b GPIO_STRENGTH_xMA specifies either 2, 4, or 8 mA output drive +//! strength, and \b GPIO_OUT_STRENGTH_8MA_SC specifies 8 mA output drive with +//! slew control. +//! +//! The parameter \e ulPinType can be one of the following values: +//! +//! - \b GPIO_PIN_TYPE_STD +//! - \b GPIO_PIN_TYPE_STD_WPU +//! - \b GPIO_PIN_TYPE_STD_WPD +//! - \b GPIO_PIN_TYPE_OD +//! - \b GPIO_PIN_TYPE_OD_WPU +//! - \b GPIO_PIN_TYPE_OD_WPD +//! - \b GPIO_PIN_TYPE_ANALOG +//! +//! where \b GPIO_PIN_TYPE_STD* specifies a push-pull pin, \b GPIO_PIN_TYPE_OD* +//! specifies an open-drain pin, \b *_WPU specifies a weak pull-up, \b *_WPD +//! specifies a weak pull-down, and \b GPIO_PIN_TYPE_ANALOG specifies an +//! analog input (for the comparators). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, unsigned long ulPinType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulStrength == GPIO_STRENGTH_2MA) || + (ulStrength == GPIO_STRENGTH_4MA) || + (ulStrength == GPIO_STRENGTH_8MA) || + (ulStrength == GPIO_STRENGTH_8MA_SC)); + ASSERT((ulPinType == GPIO_PIN_TYPE_STD) || + (ulPinType == GPIO_PIN_TYPE_STD_WPU) || + (ulPinType == GPIO_PIN_TYPE_STD_WPD) || + (ulPinType == GPIO_PIN_TYPE_OD) || + (ulPinType == GPIO_PIN_TYPE_OD_WPU) || + (ulPinType == GPIO_PIN_TYPE_OD_WPD) || + (ulPinType == GPIO_PIN_TYPE_ANALOG)) + + // + // Set the output drive strength. + // + HWREG(ulPort + GPIO_O_DR2R) = ((ulStrength & 1) ? + (HWREG(ulPort + GPIO_O_DR2R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR2R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR4R) = ((ulStrength & 2) ? + (HWREG(ulPort + GPIO_O_DR4R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR4R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR8R) = ((ulStrength & 4) ? + (HWREG(ulPort + GPIO_O_DR8R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR8R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_SLR) = ((ulStrength & 8) ? + (HWREG(ulPort + GPIO_O_SLR) | ucPins) : + (HWREG(ulPort + GPIO_O_SLR) & ~(ucPins))); + + // + // Set the pin type. + // + HWREG(ulPort + GPIO_O_ODR) = ((ulPinType & 1) ? + (HWREG(ulPort + GPIO_O_ODR) | ucPins) : + (HWREG(ulPort + GPIO_O_ODR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PUR) = ((ulPinType & 2) ? + (HWREG(ulPort + GPIO_O_PUR) | ucPins) : + (HWREG(ulPort + GPIO_O_PUR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PDR) = ((ulPinType & 4) ? + (HWREG(ulPort + GPIO_O_PDR) | ucPins) : + (HWREG(ulPort + GPIO_O_PDR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DEN) = ((ulPinType & 8) ? + (HWREG(ulPort + GPIO_O_DEN) | ucPins) : + (HWREG(ulPort + GPIO_O_DEN) & ~(ucPins))); + + // + // Set the analog mode select register. This register only appears in + // DustDevil-class (and later) devices, but is a harmless write on + // Sandstorm- and Fury-class devices. + // + HWREG(ulPort + GPIO_O_AMSEL) = + ((ulPinType == GPIO_PIN_TYPE_ANALOG) ? + (HWREG(ulPort + GPIO_O_AMSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AMSEL) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the pad configuration for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! \param pulStrength is a pointer to storage for the output drive strength. +//! \param pulPinType is a pointer to storage for the output drive type. +//! +//! This function gets the pad configuration for a specified pin on the +//! selected GPIO port. The values returned in \e pulStrength and +//! \e pulPinType correspond to the values used in GPIOPadConfigSet(). This +//! function also works for pin(s) configured as input pin(s); however, the +//! only meaningful data returned is whether the pin is terminated with a +//! pull-up or down resistor. +//! +//! \return None +// +//***************************************************************************** +void +GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, unsigned long *pulPinType) +{ + unsigned long ulTemp1, ulTemp2, ulTemp3, ulTemp4; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = (1 << ucPin); + + // + // Get the drive strength for this pin. + // + ulTemp1 = HWREG(ulPort + GPIO_O_DR2R); + ulTemp2 = HWREG(ulPort + GPIO_O_DR4R); + ulTemp3 = HWREG(ulPort + GPIO_O_DR8R); + ulTemp4 = HWREG(ulPort + GPIO_O_SLR); + *pulStrength = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); + + // + // Get the pin type. + // + ulTemp1 = HWREG(ulPort + GPIO_O_ODR); + ulTemp2 = HWREG(ulPort + GPIO_O_PUR); + ulTemp3 = HWREG(ulPort + GPIO_O_PDR); + ulTemp4 = HWREG(ulPort + GPIO_O_DEN); + *pulPinType = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); +} + +//***************************************************************************** +// +//! Enables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Unmasks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Enable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) |= ucPins; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Masks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Disable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) &= ~(ucPins); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns a bit-packed byte, where each bit that is set identifies +//! an active masked or raw interrupt, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the interrupt status. + // + if(bMasked) + { + return(HWREG(ulPort + GPIO_O_MIS)); + } + else + { + return(HWREG(ulPort + GPIO_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the interrupt for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Clears the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Clear the interrupts. + // + HWREG(ulPort + GPIO_O_ICR) = ucPins; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param pfnIntHandler is a pointer to the GPIO port interrupt handling +//! function. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected from the selected +//! GPIO port. This function will also enable the corresponding GPIO interrupt +//! in the interrupt controller; individual pin interrupts and interrupt +//! sources must be enabled with GPIOPinIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntRegister(unsigned long ulPort, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Register the interrupt handler. + // + IntRegister(ulPort, pfnIntHandler); + + // + // Enable the GPIO interrupt. + // + IntEnable(ulPort); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function will unregister the interrupt handler for the specified +//! GPIO port. This function will also disable the corresponding +//! GPIO port interrupt in the interrupt controller; individual GPIO interrupts +//! and interrupt sources must be disabled with GPIOPinIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntUnregister(unsigned long ulPort) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Disable the GPIO interrupt. + // + IntDisable(ulPort); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulPort); +} + +//***************************************************************************** +// +//! Reads the values present of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The values at the specified pin(s) are read, as specified by \e ucPins. +//! Values are returned for both input and output pin(s), and the value +//! for pin(s) that are not specified by \e ucPins are set to 0. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return Returns a bit-packed byte providing the state of the specified +//! pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents +//! GPIO port pin 1, and so on. Any bit that is not specified by \e ucPins +//! is returned as a 0. Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinRead(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the pin value(s). + // + return(HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2)))); +} + +//***************************************************************************** +// +//! Writes a value to the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ucVal is the value to write to the pin(s). +//! +//! Writes the corresponding bit values to the output pin(s) specified by +//! \e ucPins. Writing to a pin configured as an input pin has no effect. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Write the pins. + // + HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))) = ucVal; +} + +//***************************************************************************** +// +//! Configures pin(s) for use as analog-to-digital converter inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog-to-digital converter input pins must be properly configured +//! to function correctly on DustDevil-class devices. This function provides +//! the proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an ADC input; it only +//! configures an ADC input pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as a CAN device. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CAN pins must be properly configured for the CAN peripherals to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a CAN pin; it only +//! configures a CAN pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as an analog comparator input. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog comparator input pins must be properly configured for the analog +//! comparator to function correctly. This function provides the proper +//! configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an analog comparator input; +//! it only configures an analog comparator pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO inputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO open drain outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutputOD(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2C peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The I2C pins must be properly configured for the I2C peripheral to function +//! correctly. This function provides the proper configuration for those +//! pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an I2C pin; it only +//! configures an I2C pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for open-drain operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the PWM peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The PWM pins must be properly configured for the PWM peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a PWM pin; it only +//! configures a PWM pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the QEI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The QEI pins must be properly configured for the QEI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, not using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a QEI pin; it only +//! configures a QEI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the SSI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The SSI pins must be properly configured for the SSI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a SSI pin; it only +//! configures a SSI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Timer peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CCP pins must be properly configured for the timer peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a timer pin; it only +//! configures a timer pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the UART peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The UART pins must be properly configured for the UART peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a UART pin; it only +//! configures a UART pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB digital pins must be properly configured for the USB peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital USB pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! This function should only be used with EPEN and PFAULT pins as all other +//! USB pins are analog in nature or are not used in devices without OTG +//! functionality. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB analog pins must be properly configured for the USB peripheral to +//! function correctly. This function provides the proper configuration for +//! any USB pin(s). This can also be used to configure the EPEN and PFAULT pins +//! so that they are no longer used by the USB controller. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2S peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some I2S pins must be properly configured for the I2S peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital I2S pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a I2S pin; it only +//! configures a I2S pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Ethernet peripheral as LED signals. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The Ethernet peripheral provides two signals that can be used to drive +//! an LED (e.g. for link status/activity). This function provides a typical +//! configuration for the pins. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an Ethernet LED pin; it only +//! configures an Ethernet LED pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the external peripheral interface. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The external peripheral interface pins must be properly configured for the +//! external peripheral interface to function correctly. This function +//! provides a typica configuration for those pin(s); other configurations may +//! work as well depending upon the board setup (for exampe, using the on-chip +//! pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an external peripheral +//! interface pin; it only configures an external peripheral interface pin for +//! proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures the alternate function of a GPIO pin. +//! +//! \param ulPinConfig is the pin configuration value, specified as only one of +//! the \b GPIO_P??_??? values. +//! +//! This function configures the pin mux that selects the peripheral function +//! associated with a particular GPIO pin. Only one peripheral function at a +//! time can be associated with a GPIO pin, and each peripheral function should +//! only be associated with a single GPIO pin at a time (despite the fact that +//! many of them can be associated with more than one GPIO pin). +//! +//! \note This function is only valid on Tempest-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinConfigure(unsigned long ulPinConfig) +{ + unsigned long ulBase, ulShift; + + // + // Check the argument. + // + ASSERT(((ulPinConfig >> 16) & 0xff) < 9); + ASSERT(((ulPinConfig >> 8) & 0xe3) == 0); + + // + // Extract the base address index from the input value. + // + ulBase = (ulPinConfig >> 16) & 0xff; + + // + // Get the base address of the GPIO module, selecting either the APB or the + // AHB aperture as appropriate. + // + if(HWREG(SYSCTL_GPIOHBCTL) & (1 << ulBase)) + { + ulBase = g_pulGPIOBaseAddrs[(ulBase << 1) + 1]; + } + else + { + ulBase = g_pulGPIOBaseAddrs[ulBase << 1]; + } + + // + // Extract the shift from the input value. + // + ulShift = (ulPinConfig >> 8) & 0xff; + + // + // Write the requested pin muxing value for this GPIO pin. + // + HWREG(ulBase + GPIO_O_PCTL) = ((HWREG(ulBase + GPIO_O_PCTL) & + ~(0xf << ulShift)) | + ((ulPinConfig & 0xf) << ulShift)); + +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.h new file mode 100644 index 00000000..3b60fc77 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/gpio.h @@ -0,0 +1,767 @@ +//***************************************************************************** +// +// gpio.h - Defines and Macros for GPIO API. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __GPIO_H__ +#define __GPIO_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following values define the bit field for the ucPins argument to several +// of the APIs. +// +//***************************************************************************** +#define GPIO_PIN_0 0x00000001 // GPIO pin 0 +#define GPIO_PIN_1 0x00000002 // GPIO pin 1 +#define GPIO_PIN_2 0x00000004 // GPIO pin 2 +#define GPIO_PIN_3 0x00000008 // GPIO pin 3 +#define GPIO_PIN_4 0x00000010 // GPIO pin 4 +#define GPIO_PIN_5 0x00000020 // GPIO pin 5 +#define GPIO_PIN_6 0x00000040 // GPIO pin 6 +#define GPIO_PIN_7 0x00000080 // GPIO pin 7 + +//***************************************************************************** +// +// Values that can be passed to GPIODirModeSet as the ulPinIO parameter, and +// returned from GPIODirModeGet. +// +//***************************************************************************** +#define GPIO_DIR_MODE_IN 0x00000000 // Pin is a GPIO input +#define GPIO_DIR_MODE_OUT 0x00000001 // Pin is a GPIO output +#define GPIO_DIR_MODE_HW 0x00000002 // Pin is a peripheral function + +//***************************************************************************** +// +// Values that can be passed to GPIOIntTypeSet as the ulIntType parameter, and +// returned from GPIOIntTypeGet. +// +//***************************************************************************** +#define GPIO_FALLING_EDGE 0x00000000 // Interrupt on falling edge +#define GPIO_RISING_EDGE 0x00000004 // Interrupt on rising edge +#define GPIO_BOTH_EDGES 0x00000001 // Interrupt on both edges +#define GPIO_LOW_LEVEL 0x00000002 // Interrupt on low level +#define GPIO_HIGH_LEVEL 0x00000007 // Interrupt on high level + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulStrength parameter, +// and returned by GPIOPadConfigGet in the *pulStrength parameter. +// +//***************************************************************************** +#define GPIO_STRENGTH_2MA 0x00000001 // 2mA drive strength +#define GPIO_STRENGTH_4MA 0x00000002 // 4mA drive strength +#define GPIO_STRENGTH_8MA 0x00000004 // 8mA drive strength +#define GPIO_STRENGTH_8MA_SC 0x0000000C // 8mA drive with slew rate control + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulPadType parameter, +// and returned by GPIOPadConfigGet in the *pulPadType parameter. +// +//***************************************************************************** +#define GPIO_PIN_TYPE_STD 0x00000008 // Push-pull +#define GPIO_PIN_TYPE_STD_WPU 0x0000000A // Push-pull with weak pull-up +#define GPIO_PIN_TYPE_STD_WPD 0x0000000C // Push-pull with weak pull-down +#define GPIO_PIN_TYPE_OD 0x00000009 // Open-drain +#define GPIO_PIN_TYPE_OD_WPU 0x0000000B // Open-drain with weak pull-up +#define GPIO_PIN_TYPE_OD_WPD 0x0000000D // Open-drain with weak pull-down +#define GPIO_PIN_TYPE_ANALOG 0x00000000 // Analog comparator + +//***************************************************************************** +// +// Values that can be passed to GPIOPinConfigure as the ulPinConfig parameter. +// +//***************************************************************************** +// +// GPIO pin A0 +// +#define GPIO_PA0_U0RX 0x00000001 +#define GPIO_PA0_I2C1SCL 0x00000008 +#define GPIO_PA0_U1RX 0x00000009 + +// +// GPIO pin A1 +// +#define GPIO_PA1_U0TX 0x00000401 +#define GPIO_PA1_I2C1SDA 0x00000408 +#define GPIO_PA1_U1TX 0x00000409 + +// +// GPIO pin A2 +// +#define GPIO_PA2_SSI0CLK 0x00000801 +#define GPIO_PA2_PWM4 0x00000804 +#define GPIO_PA2_I2S0RXSD 0x00000809 + +// +// GPIO pin A3 +// +#define GPIO_PA3_SSI0FSS 0x00000c01 +#define GPIO_PA3_PWM5 0x00000c04 +#define GPIO_PA3_I2S0RXMCLK 0x00000c09 + +// +// GPIO pin A4 +// +#define GPIO_PA4_SSI0RX 0x00001001 +#define GPIO_PA4_PWM6 0x00001004 +#define GPIO_PA4_CAN0RX 0x00001005 +#define GPIO_PA4_I2S0TXSCK 0x00001009 + +// +// GPIO pin A5 +// +#define GPIO_PA5_SSI0TX 0x00001401 +#define GPIO_PA5_PWM7 0x00001404 +#define GPIO_PA5_CAN0TX 0x00001405 +#define GPIO_PA5_I2S0TXWS 0x00001409 + +// +// GPIO pin A6 +// +#define GPIO_PA6_I2C1SCL 0x00001801 +#define GPIO_PA6_CCP1 0x00001802 +#define GPIO_PA6_PWM0 0x00001804 +#define GPIO_PA6_PWM4 0x00001805 +#define GPIO_PA6_CAN0RX 0x00001806 +#define GPIO_PA6_USB0EPEN 0x00001808 +#define GPIO_PA6_U1CTS 0x00001809 + +// +// GPIO pin A7 +// +#define GPIO_PA7_I2C1SDA 0x00001c01 +#define GPIO_PA7_CCP4 0x00001c02 +#define GPIO_PA7_PWM1 0x00001c04 +#define GPIO_PA7_PWM5 0x00001c05 +#define GPIO_PA7_CAN0TX 0x00001c06 +#define GPIO_PA7_CCP3 0x00001c07 +#define GPIO_PA7_USB0PFLT 0x00001c08 +#define GPIO_PA7_U1DCD 0x00001c09 + +// +// GPIO pin B0 +// +#define GPIO_PB0_CCP0 0x00010001 +#define GPIO_PB0_PWM2 0x00010002 +#define GPIO_PB0_U1RX 0x00010005 + +// +// GPIO pin B1 +// +#define GPIO_PB1_CCP2 0x00010401 +#define GPIO_PB1_PWM3 0x00010402 +#define GPIO_PB1_CCP1 0x00010404 +#define GPIO_PB1_U1TX 0x00010405 + +// +// GPIO pin B2 +// +#define GPIO_PB2_I2C0SCL 0x00010801 +#define GPIO_PB2_IDX0 0x00010802 +#define GPIO_PB2_CCP3 0x00010804 +#define GPIO_PB2_CCP0 0x00010805 +#define GPIO_PB2_USB0EPEN 0x00010808 + +// +// GPIO pin B3 +// +#define GPIO_PB3_I2C0SDA 0x00010c01 +#define GPIO_PB3_FAULT0 0x00010c02 +#define GPIO_PB3_FAULT3 0x00010c04 +#define GPIO_PB3_USB0PFLT 0x00010c08 + +// +// GPIO pin B4 +// +#define GPIO_PB4_U2RX 0x00011004 +#define GPIO_PB4_CAN0RX 0x00011005 +#define GPIO_PB4_IDX0 0x00011006 +#define GPIO_PB4_U1RX 0x00011007 +#define GPIO_PB4_EPI0S23 0x00011008 + +// +// GPIO pin B5 +// +#define GPIO_PB5_C0O 0x00011401 +#define GPIO_PB5_CCP5 0x00011402 +#define GPIO_PB5_CCP6 0x00011403 +#define GPIO_PB5_CCP0 0x00011404 +#define GPIO_PB5_CAN0TX 0x00011405 +#define GPIO_PB5_CCP2 0x00011406 +#define GPIO_PB5_U1TX 0x00011407 +#define GPIO_PB5_EPI0S22 0x00011408 + +// +// GPIO pin B6 +// +#define GPIO_PB6_CCP1 0x00011801 +#define GPIO_PB6_CCP7 0x00011802 +#define GPIO_PB6_C0O 0x00011803 +#define GPIO_PB6_FAULT1 0x00011804 +#define GPIO_PB6_IDX0 0x00011805 +#define GPIO_PB6_CCP5 0x00011806 +#define GPIO_PB6_I2S0TXSCK 0x00011809 + +// +// GPIO pin B7 +// +#define GPIO_PB7_NMI 0x00011c04 + +// +// GPIO pin C0 +// +#define GPIO_PC0_TCK 0x00020003 + +// +// GPIO pin C1 +// +#define GPIO_PC1_TMS 0x00020403 + +// +// GPIO pin C2 +// +#define GPIO_PC2_TDI 0x00020803 + +// +// GPIO pin C3 +// +#define GPIO_PC3_TDO 0x00020c03 + +// +// GPIO pin C4 +// +#define GPIO_PC4_CCP5 0x00021001 +#define GPIO_PC4_PHA0 0x00021002 +#define GPIO_PC4_PWM6 0x00021004 +#define GPIO_PC4_CCP2 0x00021005 +#define GPIO_PC4_CCP4 0x00021006 +#define GPIO_PC4_EPI0S2 0x00021008 +#define GPIO_PC4_CCP1 0x00021009 + +// +// GPIO pin C5 +// +#define GPIO_PC5_CCP1 0x00021401 +#define GPIO_PC5_C1O 0x00021402 +#define GPIO_PC5_C0O 0x00021403 +#define GPIO_PC5_FAULT2 0x00021404 +#define GPIO_PC5_CCP3 0x00021405 +#define GPIO_PC5_USB0EPEN 0x00021406 +#define GPIO_PC5_EPI0S3 0x00021408 + +// +// GPIO pin C6 +// +#define GPIO_PC6_CCP3 0x00021801 +#define GPIO_PC6_PHB0 0x00021802 +#define GPIO_PC6_C2O 0x00021803 +#define GPIO_PC6_PWM7 0x00021804 +#define GPIO_PC6_U1RX 0x00021805 +#define GPIO_PC6_CCP0 0x00021806 +#define GPIO_PC6_USB0PFLT 0x00021807 +#define GPIO_PC6_EPI0S4 0x00021808 + +// +// GPIO pin C7 +// +#define GPIO_PC7_CCP4 0x00021c01 +#define GPIO_PC7_PHB0 0x00021c02 +#define GPIO_PC7_CCP0 0x00021c04 +#define GPIO_PC7_U1TX 0x00021c05 +#define GPIO_PC7_USB0PFLT 0x00021c06 +#define GPIO_PC7_C1O 0x00021c07 +#define GPIO_PC7_EPI0S5 0x00021c08 + +// +// GPIO pin D0 +// +#define GPIO_PD0_PWM0 0x00030001 +#define GPIO_PD0_CAN0RX 0x00030002 +#define GPIO_PD0_IDX0 0x00030003 +#define GPIO_PD0_U2RX 0x00030004 +#define GPIO_PD0_U1RX 0x00030005 +#define GPIO_PD0_CCP6 0x00030006 +#define GPIO_PD0_I2S0RXSCK 0x00030008 +#define GPIO_PD0_U1CTS 0x00030009 + +// +// GPIO pin D1 +// +#define GPIO_PD1_PWM1 0x00030401 +#define GPIO_PD1_CAN0TX 0x00030402 +#define GPIO_PD1_PHA0 0x00030403 +#define GPIO_PD1_U2TX 0x00030404 +#define GPIO_PD1_U1TX 0x00030405 +#define GPIO_PD1_CCP7 0x00030406 +#define GPIO_PD1_I2S0RXWS 0x00030408 +#define GPIO_PD1_U1DCD 0x00030409 +#define GPIO_PD1_CCP2 0x0003040a +#define GPIO_PD1_PHB1 0x0003040b + +// +// GPIO pin D2 +// +#define GPIO_PD2_U1RX 0x00030801 +#define GPIO_PD2_CCP6 0x00030802 +#define GPIO_PD2_PWM2 0x00030803 +#define GPIO_PD2_CCP5 0x00030804 +#define GPIO_PD2_EPI0S20 0x00030808 + +// +// GPIO pin D3 +// +#define GPIO_PD3_U1TX 0x00030c01 +#define GPIO_PD3_CCP7 0x00030c02 +#define GPIO_PD3_PWM3 0x00030c03 +#define GPIO_PD3_CCP0 0x00030c04 +#define GPIO_PD3_EPI0S21 0x00030c08 + +// +// GPIO pin D4 +// +#define GPIO_PD4_CCP0 0x00031001 +#define GPIO_PD4_CCP3 0x00031002 +#define GPIO_PD4_I2S0RXSD 0x00031008 +#define GPIO_PD4_U1RI 0x00031009 +#define GPIO_PD4_EPI0S19 0x0003100a + +// +// GPIO pin D5 +// +#define GPIO_PD5_CCP2 0x00031401 +#define GPIO_PD5_CCP4 0x00031402 +#define GPIO_PD5_I2S0RXMCLK 0x00031408 +#define GPIO_PD5_U2RX 0x00031409 +#define GPIO_PD5_EPI0S28 0x0003140a + +// +// GPIO pin D6 +// +#define GPIO_PD6_FAULT0 0x00031801 +#define GPIO_PD6_I2S0TXSCK 0x00031808 +#define GPIO_PD6_U2TX 0x00031809 +#define GPIO_PD6_EPI0S29 0x0003180a + +// +// GPIO pin D7 +// +#define GPIO_PD7_IDX0 0x00031c01 +#define GPIO_PD7_C0O 0x00031c02 +#define GPIO_PD7_CCP1 0x00031c03 +#define GPIO_PD7_I2S0TXWS 0x00031c08 +#define GPIO_PD7_U1DTR 0x00031c09 +#define GPIO_PD7_EPI0S30 0x00031c0a + +// +// GPIO pin E0 +// +#define GPIO_PE0_PWM4 0x00040001 +#define GPIO_PE0_SSI1CLK 0x00040002 +#define GPIO_PE0_CCP3 0x00040003 +#define GPIO_PE0_EPI0S8 0x00040008 +#define GPIO_PE0_USB0PFLT 0x00040009 + +// +// GPIO pin E1 +// +#define GPIO_PE1_PWM5 0x00040401 +#define GPIO_PE1_SSI1FSS 0x00040402 +#define GPIO_PE1_FAULT0 0x00040403 +#define GPIO_PE1_CCP2 0x00040404 +#define GPIO_PE1_CCP6 0x00040405 +#define GPIO_PE1_EPI0S9 0x00040408 + +// +// GPIO pin E2 +// +#define GPIO_PE2_CCP4 0x00040801 +#define GPIO_PE2_SSI1RX 0x00040802 +#define GPIO_PE2_PHB1 0x00040803 +#define GPIO_PE2_PHA0 0x00040804 +#define GPIO_PE2_CCP2 0x00040805 +#define GPIO_PE2_EPI0S24 0x00040808 + +// +// GPIO pin E3 +// +#define GPIO_PE3_CCP1 0x00040c01 +#define GPIO_PE3_SSI1TX 0x00040c02 +#define GPIO_PE3_PHA1 0x00040c03 +#define GPIO_PE3_PHB0 0x00040c04 +#define GPIO_PE3_CCP7 0x00040c05 +#define GPIO_PE3_EPI0S25 0x00040c08 + +// +// GPIO pin E4 +// +#define GPIO_PE4_CCP3 0x00041001 +#define GPIO_PE4_FAULT0 0x00041004 +#define GPIO_PE4_U2TX 0x00041005 +#define GPIO_PE4_CCP2 0x00041006 +#define GPIO_PE4_I2S0TXWS 0x00041009 + +// +// GPIO pin E5 +// +#define GPIO_PE5_CCP5 0x00041401 +#define GPIO_PE5_I2S0TXSD 0x00041409 + +// +// GPIO pin E6 +// +#define GPIO_PE6_PWM4 0x00041801 +#define GPIO_PE6_C1O 0x00041802 +#define GPIO_PE6_U1CTS 0x00041809 + +// +// GPIO pin E7 +// +#define GPIO_PE7_PWM5 0x00041c01 +#define GPIO_PE7_C2O 0x00041c02 +#define GPIO_PE7_U1DCD 0x00041c09 + +// +// GPIO pin F0 +// +#define GPIO_PF0_CAN1RX 0x00050001 +#define GPIO_PF0_PHB0 0x00050002 +#define GPIO_PF0_PWM0 0x00050003 +#define GPIO_PF0_I2S0TXSD 0x00050008 +#define GPIO_PF0_U1DSR 0x00050009 + +// +// GPIO pin F1 +// +#define GPIO_PF1_CAN1TX 0x00050401 +#define GPIO_PF1_IDX1 0x00050402 +#define GPIO_PF1_PWM1 0x00050403 +#define GPIO_PF1_I2S0TXMCLK 0x00050408 +#define GPIO_PF1_U1RTS 0x00050409 +#define GPIO_PF1_CCP3 0x0005040a + +// +// GPIO pin F2 +// +#define GPIO_PF2_LED1 0x00050801 +#define GPIO_PF2_PWM4 0x00050802 +#define GPIO_PF2_PWM2 0x00050804 +#define GPIO_PF2_SSI1CLK 0x00050809 + +// +// GPIO pin F3 +// +#define GPIO_PF3_LED0 0x00050c01 +#define GPIO_PF3_PWM5 0x00050c02 +#define GPIO_PF3_PWM3 0x00050c04 +#define GPIO_PF3_SSI1FSS 0x00050c09 + +// +// GPIO pin F4 +// +#define GPIO_PF4_CCP0 0x00051001 +#define GPIO_PF4_C0O 0x00051002 +#define GPIO_PF4_FAULT0 0x00051004 +#define GPIO_PF4_EPI0S12 0x00051008 +#define GPIO_PF4_SSI1RX 0x00051009 + +// +// GPIO pin F5 +// +#define GPIO_PF5_CCP2 0x00051401 +#define GPIO_PF5_C1O 0x00051402 +#define GPIO_PF5_EPI0S15 0x00051408 +#define GPIO_PF5_SSI1TX 0x00051409 + +// +// GPIO pin F6 +// +#define GPIO_PF6_CCP1 0x00051801 +#define GPIO_PF6_C2O 0x00051802 +#define GPIO_PF6_PHA0 0x00051804 +#define GPIO_PF6_I2S0TXMCLK 0x00051809 +#define GPIO_PF6_U1RTS 0x0005180a + +// +// GPIO pin F7 +// +#define GPIO_PF7_CCP4 0x00051c01 +#define GPIO_PF7_PHB0 0x00051c04 +#define GPIO_PF7_EPI0S12 0x00051c08 +#define GPIO_PF7_FAULT1 0x00051c09 + +// +// GPIO pin G0 +// +#define GPIO_PG0_U2RX 0x00060001 +#define GPIO_PG0_PWM0 0x00060002 +#define GPIO_PG0_I2C1SCL 0x00060003 +#define GPIO_PG0_PWM4 0x00060004 +#define GPIO_PG0_USB0EPEN 0x00060007 +#define GPIO_PG0_EPI0S13 0x00060008 + +// +// GPIO pin G1 +// +#define GPIO_PG1_U2TX 0x00060401 +#define GPIO_PG1_PWM1 0x00060402 +#define GPIO_PG1_I2C1SDA 0x00060403 +#define GPIO_PG1_PWM5 0x00060404 +#define GPIO_PG1_EPI0S14 0x00060408 + +// +// GPIO pin G2 +// +#define GPIO_PG2_PWM0 0x00060801 +#define GPIO_PG2_FAULT0 0x00060804 +#define GPIO_PG2_IDX1 0x00060808 +#define GPIO_PG2_I2S0RXSD 0x00060809 + +// +// GPIO pin G3 +// +#define GPIO_PG3_PWM1 0x00060c01 +#define GPIO_PG3_FAULT2 0x00060c04 +#define GPIO_PG3_FAULT0 0x00060c08 +#define GPIO_PG3_I2S0RXMCLK 0x00060c09 + +// +// GPIO pin G4 +// +#define GPIO_PG4_CCP3 0x00061001 +#define GPIO_PG4_FAULT1 0x00061004 +#define GPIO_PG4_EPI0S15 0x00061008 +#define GPIO_PG4_PWM6 0x00061009 +#define GPIO_PG4_U1RI 0x0006100a + +// +// GPIO pin G5 +// +#define GPIO_PG5_CCP5 0x00061401 +#define GPIO_PG5_IDX0 0x00061404 +#define GPIO_PG5_FAULT1 0x00061405 +#define GPIO_PG5_PWM7 0x00061408 +#define GPIO_PG5_I2S0RXSCK 0x00061409 +#define GPIO_PG5_U1DTR 0x0006140a + +// +// GPIO pin G6 +// +#define GPIO_PG6_PHA1 0x00061801 +#define GPIO_PG6_PWM6 0x00061804 +#define GPIO_PG6_FAULT1 0x00061808 +#define GPIO_PG6_I2S0RXWS 0x00061809 +#define GPIO_PG6_U1RI 0x0006180a + +// +// GPIO pin G7 +// +#define GPIO_PG7_PHB1 0x00061c01 +#define GPIO_PG7_PWM7 0x00061c04 +#define GPIO_PG7_CCP5 0x00061c08 +#define GPIO_PG7_EPI0S31 0x00061c09 + +// +// GPIO pin H0 +// +#define GPIO_PH0_CCP6 0x00070001 +#define GPIO_PH0_PWM2 0x00070002 +#define GPIO_PH0_EPI0S6 0x00070008 +#define GPIO_PH0_PWM4 0x00070009 + +// +// GPIO pin H1 +// +#define GPIO_PH1_CCP7 0x00070401 +#define GPIO_PH1_PWM3 0x00070402 +#define GPIO_PH1_EPI0S7 0x00070408 +#define GPIO_PH1_PWM5 0x00070409 + +// +// GPIO pin H2 +// +#define GPIO_PH2_IDX1 0x00070801 +#define GPIO_PH2_C1O 0x00070802 +#define GPIO_PH2_FAULT3 0x00070804 +#define GPIO_PH2_EPI0S1 0x00070808 + +// +// GPIO pin H3 +// +#define GPIO_PH3_PHB0 0x00070c01 +#define GPIO_PH3_FAULT0 0x00070c02 +#define GPIO_PH3_USB0EPEN 0x00070c04 +#define GPIO_PH3_EPI0S0 0x00070c08 + +// +// GPIO pin H4 +// +#define GPIO_PH4_USB0PFLT 0x00071004 +#define GPIO_PH4_EPI0S10 0x00071008 +#define GPIO_PH4_SSI1CLK 0x0007100b + +// +// GPIO pin H5 +// +#define GPIO_PH5_EPI0S11 0x00071408 +#define GPIO_PH5_FAULT2 0x0007140a +#define GPIO_PH5_SSI1FSS 0x0007140b + +// +// GPIO pin H6 +// +#define GPIO_PH6_EPI0S26 0x00071808 +#define GPIO_PH6_PWM4 0x0007180a +#define GPIO_PH6_SSI1RX 0x0007180b + +// +// GPIO pin H7 +// +#define GPIO_PH7_EPI0S27 0x00071c08 +#define GPIO_PH7_PWM5 0x00071c0a +#define GPIO_PH7_SSI1TX 0x00071c0b + +// +// GPIO pin J0 +// +#define GPIO_PJ0_EPI0S16 0x00080008 +#define GPIO_PJ0_PWM0 0x0008000a +#define GPIO_PJ0_I2C1SCL 0x0008000b + +// +// GPIO pin J1 +// +#define GPIO_PJ1_EPI0S17 0x00080408 +#define GPIO_PJ1_USB0PFLT 0x00080409 +#define GPIO_PJ1_PWM1 0x0008040a +#define GPIO_PJ1_I2C1SDA 0x0008040b + +// +// GPIO pin J2 +// +#define GPIO_PJ2_EPI0S18 0x00080808 +#define GPIO_PJ2_CCP0 0x00080809 +#define GPIO_PJ2_FAULT0 0x0008080a + +// +// GPIO pin J3 +// +#define GPIO_PJ3_EPI0S19 0x00080c08 +#define GPIO_PJ3_U1CTS 0x00080c09 +#define GPIO_PJ3_CCP6 0x00080c0a + +// +// GPIO pin J4 +// +#define GPIO_PJ4_EPI0S28 0x00081008 +#define GPIO_PJ4_U1DCD 0x00081009 +#define GPIO_PJ4_CCP4 0x0008100a + +// +// GPIO pin J5 +// +#define GPIO_PJ5_EPI0S29 0x00081408 +#define GPIO_PJ5_U1DSR 0x00081409 +#define GPIO_PJ5_CCP2 0x0008140a + +// +// GPIO pin J6 +// +#define GPIO_PJ6_EPI0S30 0x00081808 +#define GPIO_PJ6_U1RTS 0x00081809 +#define GPIO_PJ6_CCP1 0x0008180a + +// +// GPIO pin J7 +// +#define GPIO_PJ7_U1DTR 0x00081c09 +#define GPIO_PJ7_CCP0 0x00081c0a + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO); +extern unsigned long GPIODirModeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType); +extern unsigned long GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, + unsigned long ulPadType); +extern void GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, + unsigned long *pulPadType); +extern void GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins); +extern long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked); +extern void GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPortIntRegister(unsigned long ulPort, + void (*pfnIntHandler)(void)); +extern void GPIOPortIntUnregister(unsigned long ulPort); +extern long GPIOPinRead(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, + unsigned char ucVal); +extern void GPIOPinConfigure(unsigned long ulPinConfig); +extern void GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutputOD(unsigned long ulPort, + unsigned char ucPins); +extern void GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.c new file mode 100644 index 00000000..6f588ad7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.c @@ -0,0 +1,723 @@ +//***************************************************************************** +// +// interrupt.c - Driver for the NVIC Interrupt Controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup interrupt_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/cpulib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is a mapping between priority grouping encodings and the number of +// preemption priority bits. +// +//***************************************************************************** +static const unsigned long g_pulPriority[] = +{ + NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6, + NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3, + NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1 +}; + +//***************************************************************************** +// +// This is a mapping between interrupt number and the register that contains +// the priority encoding for that interrupt. +// +//***************************************************************************** +static const unsigned long g_pulRegs[] = +{ + 0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1, + NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7, + NVIC_PRI8, NVIC_PRI9, NVIC_PRI10, NVIC_PRI11, NVIC_PRI12, NVIC_PRI13 +}; + +//***************************************************************************** +// +//! \internal +//! The default interrupt handler. +//! +//! This is the default interrupt handler for all interrupts. It simply loops +//! forever so that the system state is preserved for observation by a +//! debugger. Since interrupts should be disabled before unregistering the +//! corresponding handler, this should never be called. +//! +//! \return None. +// +//***************************************************************************** +static void +IntDefaultHandler(void) +{ + // + // Go into an infinite loop. + // + while(1) + { + } +} + +//***************************************************************************** +// +// The processor vector table. +// +// This contains a list of the handlers for the various interrupt sources in +// the system. The layout of this list is defined by the hardware; assertion +// of an interrupt causes the processor to start executing directly at the +// address given in the corresponding location in this list. +// +//***************************************************************************** +#if defined(ewarm) +static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE"; +#elif defined(sourcerygxx) +static __attribute__((section(".cs3.region-head.ram"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#elif defined(ccs) +#pragma DATA_SECTION(g_pfnRAMVectors, ".vtable") +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#else +static __attribute__((section("vtable"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#endif + +//***************************************************************************** +// +//! Enables the processor interrupt. +//! +//! Allows the processor to respond to interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were disabled when the function was +//! called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterEnable(void) +{ + // + // Enable processor interrupts. + // + return(CPUcpsie()); +} + +//***************************************************************************** +// +//! Disables the processor interrupt. +//! +//! Prevents the processor from receiving interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were already disabled when the +//! function was called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterDisable(void) +{ + // + // Disable processor interrupts. + // + return(CPUcpsid()); +} + +//***************************************************************************** +// +//! Registers a function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param pfnHandler is a pointer to the function to be called. +//! +//! This function is used to specify the handler function to be called when the +//! given interrupt is asserted to the processor. When the interrupt occurs, +//! if it is enabled (via IntEnable()), the handler function will be called in +//! interrupt context. Since the handler function can preempt other code, care +//! must be taken to protect memory or peripherals that are accessed by the +//! handler and other non-handler code. +//! +//! \note The use of this function (directly or indirectly via a peripheral +//! driver interrupt register function) moves the interrupt vector table from +//! flash to SRAM. Therefore, care must be taken when linking the application +//! to ensure that the SRAM vector table is located at the beginning of SRAM; +//! otherwise NVIC will not look in the correct portion of memory for the +//! vector table (it requires the vector table be on a 1 kB memory alignment). +//! Normally, the SRAM vector table is so placed via the use of linker scripts. +//! See the discussion of compile-time versus run-time interrupt handler +//! registration in the introduction to this chapter. +//! +//! \return None. +// +//***************************************************************************** +void +IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)) +{ + unsigned long ulIdx, ulValue; + + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Make sure that the RAM vector table is correctly aligned. + // + ASSERT(((unsigned long)g_pfnRAMVectors & 0x000003ff) == 0); + + // + // See if the RAM vector table has been initialized. + // + if(HWREG(NVIC_VTABLE) != (unsigned long)g_pfnRAMVectors) + { + // + // Copy the vector table from the beginning of FLASH to the RAM vector + // table. + // + ulValue = HWREG(NVIC_VTABLE); + for(ulIdx = 0; ulIdx < NUM_INTERRUPTS; ulIdx++) + { + g_pfnRAMVectors[ulIdx] = (void (*)(void))HWREG((ulIdx * 4) + + ulValue); + } + + // + // Point NVIC at the RAM vector table. + // + HWREG(NVIC_VTABLE) = (unsigned long)g_pfnRAMVectors; + } + + // + // Save the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = pfnHandler; +} + +//***************************************************************************** +// +//! Unregisters the function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function is used to indicate that no handler should be called when the +//! given interrupt is asserted to the processor. The interrupt source will be +//! automatically disabled (via IntDisable()) if necessary. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +IntUnregister(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Reset the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = IntDefaultHandler; +} + +//***************************************************************************** +// +//! Sets the priority grouping of the interrupt controller. +//! +//! \param ulBits specifies the number of bits of preemptable priority. +//! +//! This function specifies the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. The range of +//! the grouping values are dependent upon the hardware implementation; on +//! the Stellaris family, three bits are available for hardware interrupt +//! prioritization and therefore priority grouping values of three through +//! seven have the same effect. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityGroupingSet(unsigned long ulBits) +{ + // + // Check the arguments. + // + ASSERT(ulBits < NUM_PRIORITY); + + // + // Set the priority grouping. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | g_pulPriority[ulBits]; +} + +//***************************************************************************** +// +//! Gets the priority grouping of the interrupt controller. +//! +//! This function returns the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. +//! +//! \return The number of bits of preemptable priority. +// +//***************************************************************************** +unsigned long +IntPriorityGroupingGet(void) +{ + unsigned long ulLoop, ulValue; + + // + // Read the priority grouping. + // + ulValue = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M; + + // + // Loop through the priority grouping values. + // + for(ulLoop = 0; ulLoop < NUM_PRIORITY; ulLoop++) + { + // + // Stop looping if this value matches. + // + if(ulValue == g_pulPriority[ulLoop]) + { + break; + } + } + + // + // Return the number of priority bits. + // + return(ulLoop); +} + +//***************************************************************************** +// +//! Sets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param ucPriority specifies the priority of the interrupt. +//! +//! This function is used to set the priority of an interrupt. When multiple +//! interrupts are asserted simultaneously, the ones with the highest priority +//! are processed before the lower priority interrupts. Smaller numbers +//! correspond to higher interrupt priorities; priority 0 is the highest +//! interrupt priority. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. The remaining bits can be +//! used to sub-prioritize the interrupt sources, and may be used by the +//! hardware priority mechanism on a future part. This arrangement allows +//! priorities to migrate to different NVIC implementations without changing +//! the gross prioritization of the interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +IntPrioritySet(unsigned long ulInterrupt, unsigned char ucPriority) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Set the interrupt priority. + // + ulTemp = HWREG(g_pulRegs[ulInterrupt >> 2]); + ulTemp &= ~(0xFF << (8 * (ulInterrupt & 3))); + ulTemp |= ucPriority << (8 * (ulInterrupt & 3)); + HWREG(g_pulRegs[ulInterrupt >> 2]) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function gets the priority of an interrupt. See IntPrioritySet() for +//! a definition of the priority value. +//! +//! \return Returns the interrupt priority, or -1 if an invalid interrupt was +//! specified. +// +//***************************************************************************** +long +IntPriorityGet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Return the interrupt priority. + // + return((HWREG(g_pulRegs[ulInterrupt >> 2]) >> (8 * (ulInterrupt & 3))) & + 0xFF); +} + +//***************************************************************************** +// +//! Enables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be enabled. +//! +//! The specified interrupt is enabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntEnable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to enable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Enable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM; + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Enable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS; + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Enable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Enable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Disables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be disabled. +//! +//! The specified interrupt is disabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntDisable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to disable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Disable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM); + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Disable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS); + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Disable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE); + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Disable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Pends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be pended. +//! +//! The specified interrupt is pended in the interrupt controller. This will +//! cause the interrupt controller to execute the corresponding interrupt +//! handler at the next available time, based on the current interrupt state +//! priorities. For example, if called by a higher priority interrupt handler, +//! the specified interrupt handler will not be called until after the current +//! interrupt handler has completed execution. The interrupt must have been +//! enabled for it to be called. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendSet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to pend. + // + if(ulInterrupt == FAULT_NMI) + { + // + // Pend the NMI interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_NMI_SET; + } + else if(ulInterrupt == FAULT_PENDSV) + { + // + // Pend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Pend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTSET; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Unpends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be unpended. +//! +//! The specified interrupt is unpended in the interrupt controller. This will +//! cause any previously generated interrupts that have not been handled yet +//! (due to higher priority interrupts or the interrupt no having been enabled +//! yet) to be discarded. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendClear(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to unpend. + // + if(ulInterrupt == FAULT_PENDSV) + { + // + // Unpend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_UNPEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Unpend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTCLR; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Sets the priority masking level +//! +//! \param ulPriorityMask is the priority level that will be masked. +//! +//! This function sets the interrupt priority masking level so that all +//! interrupts at the specified or lesser priority level is masked. This +//! can be used to globally disable a set of interrupts with priority below +//! a predetermined threshold. A value of 0 disables priority +//! masking. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityMaskSet(unsigned long ulPriorityMask) +{ + CPUbasepriSet(ulPriorityMask); +} + +//***************************************************************************** +// +//! Gets the priority masking level +//! +//! This function gets the current setting of the interrupt priority masking +//! level. The value returned is the priority level such that all interrupts +//! of that and lesser priority are masked. A value of 0 means that priority +//! masking is disabled. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return Returns the value of the interrupt priority level mask. +// +//***************************************************************************** +unsigned long +IntPriorityMaskGet(void) +{ + return(CPUbasepriGet()); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.h new file mode 100644 index 00000000..954f5775 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/interrupt.h @@ -0,0 +1,77 @@ +//***************************************************************************** +// +// interrupt.h - Prototypes for the NVIC Interrupt Controller Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __INTERRUPT_H__ +#define __INTERRUPT_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macro to generate an interrupt priority mask based on the number of bits +// of priority supported by the hardware. +// +//***************************************************************************** +#define INT_PRIORITY_MASK ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF) + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean IntMasterEnable(void); +extern tBoolean IntMasterDisable(void); +extern void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)); +extern void IntUnregister(unsigned long ulInterrupt); +extern void IntPriorityGroupingSet(unsigned long ulBits); +extern unsigned long IntPriorityGroupingGet(void); +extern void IntPrioritySet(unsigned long ulInterrupt, + unsigned char ucPriority); +extern long IntPriorityGet(unsigned long ulInterrupt); +extern void IntEnable(unsigned long ulInterrupt); +extern void IntDisable(unsigned long ulInterrupt); +extern void IntPendSet(unsigned long ulInterrupt); +extern void IntPendClear(unsigned long ulInterrupt); +extern void IntPriorityMaskSet(unsigned long ulPriorityMask); +extern unsigned long IntPriorityMaskGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __INTERRUPT_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.c new file mode 100644 index 00000000..0ac2747d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.c @@ -0,0 +1,2366 @@ +//***************************************************************************** +// +// sysctl.c - Driver for the system controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup sysctl_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/cpulib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// This macro extracts the array index out of the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_INDEX(a) (((a) >> 28) & 0xf) + +//***************************************************************************** +// +// This macro constructs the peripheral bit mask from the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_MASK(a) (((a) & 0xffff) << (((a) & 0x001f0000) >> 16)) + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL DC? register that +// contains the peripheral present bit for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCRegs[] = +{ + SYSCTL_DC1, + SYSCTL_DC2, + SYSCTL_DC4, + SYSCTL_DC1 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SRCR? register that +// controls the software reset for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSRCRRegs[] = +{ + SYSCTL_SRCR0, + SYSCTL_SRCR1, + SYSCTL_SRCR2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_RCGC? register that +// controls the run-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulRCGCRegs[] = +{ + SYSCTL_RCGC0, + SYSCTL_RCGC1, + SYSCTL_RCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SCGC? register that +// controls the sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSCGCRegs[] = +{ + SYSCTL_SCGC0, + SYSCTL_SCGC1, + SYSCTL_SCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_DCGC? register that +// controls the deep-sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCGCRegs[] = +{ + SYSCTL_DCGC0, + SYSCTL_DCGC1, + SYSCTL_DCGC2 +}; + +//***************************************************************************** +// +// An array that maps the crystal number in RCC to a frequency. +// +//***************************************************************************** +static const unsigned long g_pulXtals[] = +{ + 1000000, + 1843200, + 2000000, + 2457600, + 3579545, + 3686400, + 4000000, + 4096000, + 4915200, + 5000000, + 5120000, + 6000000, + 6144000, + 7372800, + 8000000, + 8192000, + 10000000, + 12000000, + 12288000, + 13560000, + 14318180, + 16000000, + 16384000 +}; + +//***************************************************************************** +// +//! \internal +//! Checks a peripheral identifier. +//! +//! \param ulPeripheral is the peripheral identifier. +//! +//! This function determines if a peripheral identifier is valid. +//! +//! \return Returns \b true if the peripheral identifier is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +SysCtlPeripheralValid(unsigned long ulPeripheral) +{ + return((ulPeripheral == SYSCTL_PERIPH_ADC0) || + (ulPeripheral == SYSCTL_PERIPH_ADC1) || + (ulPeripheral == SYSCTL_PERIPH_CAN0) || + (ulPeripheral == SYSCTL_PERIPH_CAN1) || + (ulPeripheral == SYSCTL_PERIPH_CAN2) || + (ulPeripheral == SYSCTL_PERIPH_COMP0) || + (ulPeripheral == SYSCTL_PERIPH_COMP1) || + (ulPeripheral == SYSCTL_PERIPH_COMP2) || + (ulPeripheral == SYSCTL_PERIPH_EPI0) || + (ulPeripheral == SYSCTL_PERIPH_ETH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOJ) || + (ulPeripheral == SYSCTL_PERIPH_HIBERNATE) || + (ulPeripheral == SYSCTL_PERIPH_I2C0) || + (ulPeripheral == SYSCTL_PERIPH_I2C1) || + (ulPeripheral == SYSCTL_PERIPH_I2S0) || + (ulPeripheral == SYSCTL_PERIPH_IEEE1588) || + (ulPeripheral == SYSCTL_PERIPH_MPU) || + (ulPeripheral == SYSCTL_PERIPH_PLL) || + (ulPeripheral == SYSCTL_PERIPH_PWM) || + (ulPeripheral == SYSCTL_PERIPH_QEI0) || + (ulPeripheral == SYSCTL_PERIPH_QEI1) || + (ulPeripheral == SYSCTL_PERIPH_SSI0) || + (ulPeripheral == SYSCTL_PERIPH_SSI1) || + (ulPeripheral == SYSCTL_PERIPH_TEMP) || + (ulPeripheral == SYSCTL_PERIPH_TIMER0) || + (ulPeripheral == SYSCTL_PERIPH_TIMER1) || + (ulPeripheral == SYSCTL_PERIPH_TIMER2) || + (ulPeripheral == SYSCTL_PERIPH_TIMER3) || + (ulPeripheral == SYSCTL_PERIPH_UART0) || + (ulPeripheral == SYSCTL_PERIPH_UART1) || + (ulPeripheral == SYSCTL_PERIPH_UART2) || + (ulPeripheral == SYSCTL_PERIPH_UDMA) || + (ulPeripheral == SYSCTL_PERIPH_USB0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG1)); +} +#endif + +//***************************************************************************** +// +//! Gets the size of the SRAM. +//! +//! This function determines the size of the SRAM on the Stellaris device. +//! +//! \return The total number of bytes of SRAM. +// +//***************************************************************************** +unsigned long +SysCtlSRAMSizeGet(void) +{ + // + // Compute the size of the SRAM. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_SRAMSZ_M) >> 8) + 0x100); +} + +//***************************************************************************** +// +//! Gets the size of the flash. +//! +//! This function determines the size of the flash on the Stellaris device. +//! +//! \return The total number of bytes of flash. +// +//***************************************************************************** +unsigned long +SysCtlFlashSizeGet(void) +{ + // + // Compute the size of the flash. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_M) << 11) + 0x800); +} + +//***************************************************************************** +// +//! Determines if a pin is present. +//! +//! \param ulPin is the pin in question. +//! +//! Determines if a particular pin is present in the device. The PWM, analog +//! comparators, ADC, and timers have a varying number of pins across members +//! of the Stellaris family; this will determine which are present on this +//! device. +//! +//! The \e ulPin argument must be only one of the following values: +//! \b SYSCTL_PIN_PWM0, \b SYSCTL_PIN_PWM1, \b SYSCTL_PIN_PWM2, +//! \b SYSCTL_PIN_PWM3, \b SYSCTL_PIN_PWM4, \b SYSCTL_PIN_PWM5, +//! \b SYSCTL_PIN_C0MINUS, \b SYSCTL_PIN_C0PLUS, \b SYSCTL_PIN_C0O, +//! \b SYSCTL_PIN_C1MINUS, \b SYSCTL_PIN_C1PLUS, \b SYSCTL_PIN_C1O, +//! \b SYSCTL_PIN_C2MINUS, \b SYSCTL_PIN_C2PLUS, \b SYSCTL_PIN_C2O, +//! \b SYSCTL_PIN_ADC0, \b SYSCTL_PIN_ADC1, \b SYSCTL_PIN_ADC2, +//! \b SYSCTL_PIN_ADC3, \b SYSCTL_PIN_ADC4, \b SYSCTL_PIN_ADC5, +//! \b SYSCTL_PIN_ADC6, \b SYSCTL_PIN_ADC7, \b SYSCTL_PIN_CCP0, +//! \b SYSCTL_PIN_CCP1, \b SYSCTL_PIN_CCP2, \b SYSCTL_PIN_CCP3, +//! \b SYSCTL_PIN_CCP4, \b SYSCTL_PIN_CCP5, \b SYSCTL_PIN_CCP6, +//! \b SYSCTL_PIN_CCP7, \b SYSCTL_PIN_32KHZ, or \b SYSCTL_PIN_MC_FAULT0. +//! +//! \return Returns \b true if the specified pin is present and \b false if it +//! is not. +// +//***************************************************************************** +tBoolean +SysCtlPinPresent(unsigned long ulPin) +{ + // + // Check the arguments. + // + ASSERT((ulPin == SYSCTL_PIN_PWM0) || + (ulPin == SYSCTL_PIN_PWM1) || + (ulPin == SYSCTL_PIN_PWM2) || + (ulPin == SYSCTL_PIN_PWM3) || + (ulPin == SYSCTL_PIN_PWM4) || + (ulPin == SYSCTL_PIN_PWM5) || + (ulPin == SYSCTL_PIN_C0MINUS) || + (ulPin == SYSCTL_PIN_C0PLUS) || + (ulPin == SYSCTL_PIN_C0O) || + (ulPin == SYSCTL_PIN_C1MINUS) || + (ulPin == SYSCTL_PIN_C1PLUS) || + (ulPin == SYSCTL_PIN_C1O) || + (ulPin == SYSCTL_PIN_C2MINUS) || + (ulPin == SYSCTL_PIN_C2PLUS) || + (ulPin == SYSCTL_PIN_C2O) || + (ulPin == SYSCTL_PIN_MC_FAULT0) || + (ulPin == SYSCTL_PIN_ADC0) || + (ulPin == SYSCTL_PIN_ADC1) || + (ulPin == SYSCTL_PIN_ADC2) || + (ulPin == SYSCTL_PIN_ADC3) || + (ulPin == SYSCTL_PIN_ADC4) || + (ulPin == SYSCTL_PIN_ADC5) || + (ulPin == SYSCTL_PIN_ADC6) || + (ulPin == SYSCTL_PIN_ADC7) || + (ulPin == SYSCTL_PIN_CCP0) || + (ulPin == SYSCTL_PIN_CCP1) || + (ulPin == SYSCTL_PIN_CCP2) || + (ulPin == SYSCTL_PIN_CCP3) || + (ulPin == SYSCTL_PIN_CCP4) || + (ulPin == SYSCTL_PIN_CCP5) || + (ulPin == SYSCTL_PIN_32KHZ)); + + // + // Determine if this pin is present. + // + if(HWREG(SYSCTL_DC3) & ulPin) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Determines if a peripheral is present. +//! +//! \param ulPeripheral is the peripheral in question. +//! +//! Determines if a particular peripheral is present in the device. Each +//! member of the Stellaris family has a different peripheral set; this will +//! determine which are present on this device. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_IEEE1588, +//! \b SYSCTL_PERIPH_MPU, \b SYSCTL_PERIPH_PLL, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return Returns \b true if the specified peripheral is present and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +SysCtlPeripheralPresent(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Read the correct DC register and determine if this peripheral exists. + // + if(ulPeripheral == SYSCTL_PERIPH_USB0) + { + // + // USB is a special case since the DC bit is missing for USB0. + // + if(HWREG(SYSCTL_DC6) & SYSCTL_DC6_USB0_M) + { + return(true); + } + else + { + return(false); + } + } + else if(HWREG(g_pulDCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) & + SYSCTL_PERIPH_MASK(ulPeripheral)) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Performs a software reset of a peripheral. +//! +//! \param ulPeripheral is the peripheral to reset. +//! +//! This function performs a software reset of the specified peripheral. An +//! individual peripheral reset signal is asserted for a brief period and then +//! deasserted, returning the internal state of the peripheral to its reset +//! condition. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralReset(unsigned long ulPeripheral) +{ + volatile unsigned long ulDelay; + + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Put the peripheral into the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); + + // + // Delay for a little bit. + // + for(ulDelay = 0; ulDelay < 16; ulDelay++) + { + } + + // + // Take the peripheral out of the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral. +//! +//! \param ulPeripheral is the peripheral to enable. +//! +//! Peripherals are enabled with this function. At power-up, all peripherals +//! are disabled; they must be enabled in order to operate or respond to +//! register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \note It takes five clock cycles after the write to enable a peripheral +//! before the the peripheral is actually enabled. During this time, attempts +//! to access the peripheral will result in a bus fault. Care should be taken +//! to ensure that the peripheral is not accessed during this brief time +//! period. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral. +//! +//! \param ulPeripheral is the peripheral to disable. +//! +//! Peripherals are disabled with this function. Once disabled, they will not +//! operate or respond to register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into sleep mode. Since the clocking configuration of the device does +//! not change, any peripheral can safely continue operating while the +//! processor is in sleep mode, and can therefore wake the processor from sleep +//! mode. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into sleep mode. Disabling peripherals while in sleep mode helps to lower +//! the current draw of the device. If enabled (via SysCtlPeripheralEnable()), +//! the peripheral will automatically resume operation when the processor +//! leaves sleep mode, maintaining its entire state from before sleep mode was +//! entered. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in deep-sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into deep-sleep mode. Since the clocking configuration of the device +//! may change, not all peripherals can safely continue operating while the +//! processor is in sleep mode. Those that must run at a particular frequency +//! (such as a UART) will not work as expected if the clock changes. It is the +//! responsibility of the caller to make sensible choices. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in deep-sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps +//! to lower the current draw of the device, and can keep peripherals that +//! require a particular clock frequency from operating when the clock changes +//! as a result of entering deep-sleep mode. If enabled (via +//! SysCtlPeripheralEnable()), the peripheral will automatically resume +//! operation when the processor leaves deep-sleep mode, maintaining its entire +//! state from before deep-sleep mode was entered. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Controls peripheral clock gating in sleep and deep-sleep mode. +//! +//! \param bEnable is a boolean that is \b true if the sleep and deep-sleep +//! peripheral configuration should be used and \b false if not. +//! +//! This function controls how peripherals are clocked when the processor goes +//! into sleep or deep-sleep mode. By default, the peripherals are clocked the +//! same as in run mode; if peripheral clock gating is enabled they are clocked +//! according to the configuration set by SysCtlPeripheralSleepEnable(), +//! SysCtlPeripheralSleepDisable(), SysCtlPeripheralDeepSleepEnable(), and +//! SysCtlPeripheralDeepSleepDisable(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralClockGating(tBoolean bEnable) +{ + // + // Enable peripheral clock gating as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_ACG; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_ACG); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the system control interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the system +//! control interrupt occurs. +//! +//! This sets the handler to be called when a system control interrupt occurs. +//! This will enable the global interrupt in the interrupt controller; specific +//! system control interrupts must be enabled via SysCtlIntEnable(). It is the +//! interrupt handler's responsibility to clear the interrupt source via +//! SysCtlIntClear(). +//! +//! System control can generate interrupts when the PLL achieves lock, if the +//! internal LDO current limit is exceeded, if the internal oscillator fails, +//! if the main oscillator fails, if the internal LDO output voltage droops too +//! much, if the external voltage droops too much, or if the PLL fails. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_SYSCTL, pfnHandler); + + // + // Enable the system control interrupt. + // + IntEnable(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the system control interrupt. +//! +//! This function will clear the handler to be called when a system control +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_SYSCTL); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Enables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be enabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Enables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntEnable(unsigned long ulInts) +{ + // + // Enable the specified interrupts. + // + HWREG(SYSCTL_IMC) |= ulInts; +} + +//***************************************************************************** +// +//! Disables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be disabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Disables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntDisable(unsigned long ulInts) +{ + // + // Disable the specified interrupts. + // + HWREG(SYSCTL_IMC) &= ~(ulInts); +} + +//***************************************************************************** +// +//! Clears system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be cleared. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! The specified system control interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntClear(unsigned long ulInts) +{ + // + // Clear the requested interrupt sources. + // + HWREG(SYSCTL_MISC) = ulInts; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the system controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, \b SYSCTL_INT_IOSC_FAIL, +//! \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, \b SYSCTL_INT_BOR, and +//! \b SYSCTL_INT_PLL_FAIL. +// +//***************************************************************************** +unsigned long +SysCtlIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(SYSCTL_MISC)); + } + else + { + return(HWREG(SYSCTL_RIS)); + } +} + +//***************************************************************************** +// +//! Sets the output voltage of the LDO. +//! +//! \param ulVoltage is the required output voltage from the LDO. Must be one +//! of \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +//! +//! This function sets the output voltage of the LDO. The default voltage is +//! 2.5 V; it can be adjusted +/- 10%. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOSet(unsigned long ulVoltage) +{ + // + // Check the arguments. + // + ASSERT((ulVoltage == SYSCTL_LDO_2_25V) || + (ulVoltage == SYSCTL_LDO_2_30V) || + (ulVoltage == SYSCTL_LDO_2_35V) || + (ulVoltage == SYSCTL_LDO_2_40V) || + (ulVoltage == SYSCTL_LDO_2_45V) || + (ulVoltage == SYSCTL_LDO_2_50V) || + (ulVoltage == SYSCTL_LDO_2_55V) || + (ulVoltage == SYSCTL_LDO_2_60V) || + (ulVoltage == SYSCTL_LDO_2_65V) || + (ulVoltage == SYSCTL_LDO_2_70V) || + (ulVoltage == SYSCTL_LDO_2_75V)); + + // + // Set the LDO voltage to the requested value. + // + HWREG(SYSCTL_LDOPCTL) = ulVoltage; +} + +//***************************************************************************** +// +//! Gets the output voltage of the LDO. +//! +//! This function determines the output voltage of the LDO, as specified by the +//! control register. +//! +//! \return Returns the current voltage of the LDO; will be one of +//! \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +// +//***************************************************************************** +unsigned long +SysCtlLDOGet(void) +{ + // + // Return the LDO voltage setting. + // + return(HWREG(SYSCTL_LDOPCTL)); +} + +//***************************************************************************** +// +//! Configures the LDO failure control. +//! +//! \param ulConfig is the required LDO failure control setting; can be either +//! \b SYSCTL_LDOCFG_ARST or \b SYSCTL_LDOCFG_NORST. +//! +//! This function allows the LDO to be configured to cause a processor reset +//! when the output voltage becomes unregulated. +//! +//! The LDO failure control is only available on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOConfigSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_LDOCFG_ARST) || + (ulConfig == SYSCTL_LDOCFG_NORST)); + + // + // Set the reset control as requested. + // + HWREG(SYSCTL_LDOARST) = ulConfig; +} + +//***************************************************************************** +// +//! Resets the device. +//! +//! This function will perform a software reset of the entire device. The +//! processor and all peripherals will be reset and all device registers will +//! return to their default values (with the exception of the reset cause +//! register, which will maintain its current value but have the software reset +//! bit set as well). +//! +//! \return This function does not return. +// +//***************************************************************************** +void +SysCtlReset(void) +{ + // + // Perform a software reset request. This will cause the device to reset, + // no further code will be executed. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ; + + // + // The device should have reset, so this should never be reached. Just in + // case, loop forever. + // + while(1) + { + } +} + +//***************************************************************************** +// +//! Puts the processor into sleep mode. +//! +//! This function places the processor into sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralSleepEnable() continue to operate and can wake up the +//! processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlSleep(void) +{ + // + // Wait for an interrupt. + // + CPUwfi(); +} + +//***************************************************************************** +// +//! Puts the processor into deep-sleep mode. +//! +//! This function places the processor into deep-sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralDeepSleepEnable() continue to operate and can wake up +//! the processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlDeepSleep(void) +{ + // + // Enable deep-sleep. + // + HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP; + + // + // Wait for an interrupt. + // + CPUwfi(); + + // + // Disable deep-sleep so that a future sleep will work correctly. + // + HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP); +} + +//***************************************************************************** +// +//! Gets the reason for a reset. +//! +//! This function will return the reason(s) for a reset. Since the reset +//! reasons are sticky until either cleared by software or an external reset, +//! multiple reset reasons may be returned if multiple resets have occurred. +//! The reset reason will be a logical OR of \b SYSCTL_CAUSE_LDO, +//! \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, \b SYSCTL_CAUSE_BOR, +//! \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! \return Returns the reason(s) for a reset. +// +//***************************************************************************** +unsigned long +SysCtlResetCauseGet(void) +{ + // + // Return the reset reasons. + // + return(HWREG(SYSCTL_RESC)); +} + +//***************************************************************************** +// +//! Clears reset reasons. +//! +//! \param ulCauses are the reset causes to be cleared; must be a logical OR of +//! \b SYSCTL_CAUSE_LDO, \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, +//! \b SYSCTL_CAUSE_BOR, \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! This function clears the specified sticky reset reasons. Once cleared, +//! another reset for the same reason can be detected, and a reset for a +//! different reason can be distinguished (instead of having two reset causes +//! set). If the reset reason is used by an application, all reset causes +//! should be cleared after they are retrieved with SysCtlResetCauseGet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlResetCauseClear(unsigned long ulCauses) +{ + // + // Clear the given reset reasons. + // + HWREG(SYSCTL_RESC) &= ~(ulCauses); +} + +//***************************************************************************** +// +//! Configures the brown-out control. +//! +//! \param ulConfig is the desired configuration of the brown-out control. +//! Must be the logical OR of \b SYSCTL_BOR_RESET and/or +//! \b SYSCTL_BOR_RESAMPLE. +//! \param ulDelay is the number of internal oscillator cycles to wait before +//! resampling an asserted brown-out signal. This value only has meaning when +//! \b SYSCTL_BOR_RESAMPLE is set and must be less than 8192. +//! +//! This function configures how the brown-out control operates. It can detect +//! a brown-out by looking at only the brown-out output, or it can wait for it +//! to be active for two consecutive samples separated by a configurable time. +//! When it detects a brown-out condition, it can either reset the device or +//! generate a processor interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) +{ + // + // Check the arguments. + // + ASSERT(!(ulConfig & ~(SYSCTL_BOR_RESET | SYSCTL_BOR_RESAMPLE))); + ASSERT(ulDelay < 8192); + + // + // Configure the brown-out reset control. + // + HWREG(SYSCTL_PBORCTL) = (ulDelay << SYSCTL_PBORCTL_BORTIM_S) | ulConfig; +} + +//***************************************************************************** +// +//! Provides a small delay. +//! +//! \param ulCount is the number of delay loop iterations to perform. +//! +//! This function provides a means of generating a constant length delay. It +//! is written in assembly to keep the delay consistent across tool chains, +//! avoiding the need to tune the delay based on the tool chain in use. +//! +//! The loop takes 3 cycles/loop. +//! +//! \return None. +// +//***************************************************************************** +#if defined(ewarm) || defined(DOXYGEN) +void +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +SysCtlDelay(unsigned long ulCount) +{ + subs r0, #1; + bne SysCtlDelay; + bx lr; +} +#endif +// +// For CCS implement this function in pure assembly. This prevents the TI +// compiler from doing funny things with the optimizer. +// +#if defined(ccs) + __asm(" .sect \".text:SysCtlDelay\"\n" + " .clink\n" + " .thumbfunc SysCtlDelay\n" + " .thumb\n" + " .global SysCtlDelay\n" + "SysCtlDelay:\n" + " subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr\n"); +#endif + + +//***************************************************************************** +// +//! Sets the clocking of the device. +//! +//! \param ulConfig is the required configuration of the device clocking. +//! +//! This function configures the clocking of the device. The input crystal +//! frequency, oscillator to be used, use of the PLL, and the system clock +//! divider are all configured with this function. +//! +//! The \e ulConfig parameter is the logical OR of several different values, +//! many of which are grouped into sets where only one can be chosen. +//! +//! The system clock divider is chosen with one of the following values: +//! \b SYSCTL_SYSDIV_1, \b SYSCTL_SYSDIV_2, \b SYSCTL_SYSDIV_3, ... +//! \b SYSCTL_SYSDIV_64. Only \b SYSCTL_SYSDIV_1 through \b SYSCTL_SYSDIV_16 +//! are valid on Sandstorm-class devices. +//! +//! The use of the PLL is chosen with either \b SYSCTL_USE_PLL or +//! \b SYSCTL_USE_OSC. +//! +//! The external crystal frequency is chosen with one of the following values: +//! \b SYSCTL_XTAL_1MHZ, \b SYSCTL_XTAL_1_84MHZ, \b SYSCTL_XTAL_2MHZ, +//! \b SYSCTL_XTAL_2_45MHZ, \b SYSCTL_XTAL_3_57MHZ, \b SYSCTL_XTAL_3_68MHZ, +//! \b SYSCTL_XTAL_4MHZ, \b SYSCTL_XTAL_4_09MHZ, \b SYSCTL_XTAL_4_91MHZ, +//! \b SYSCTL_XTAL_5MHZ, \b SYSCTL_XTAL_5_12MHZ, \b SYSCTL_XTAL_6MHZ, +//! \b SYSCTL_XTAL_6_14MHZ, \b SYSCTL_XTAL_7_37MHZ, \b SYSCTL_XTAL_8MHZ, +//! \b SYSCTL_XTAL_8_19MHZ, \b SYSCTL_XTAL_10MHZ, \b SYSCTL_XTAL_12MHZ, +//! \b SYSCTL_XTAL_12_2MHZ, \b SYSCTL_XTAL_13_5MHZ, \b SYSCTL_XTAL_14_3MHZ, +//! \b SYSCTL_XTAL_16MHZ, or \b SYSCTL_XTAL_16_3MHZ. Values below +//! \b SYSCTL_XTAL_3_57MHZ are not valid when the PLL is in operation. On +//! Sandstorm- and Fury-class devices, values above \b SYSCTL_XTAL_8_19MHZ are +//! not valid. +//! +//! The oscillator source is chosen with one of the following values: +//! \b SYSCTL_OSC_MAIN, \b SYSCTL_OSC_INT, \b SYSCTL_OSC_INT4, +//! \b SYSCTL_OSC_INT30, or \b SYSCTL_OSC_EXT32. On Sandstorm-class devices, +//! \b SYSCTL_OSC_INT30 and \b SYSCTL_OSC_EXT32 are not valid. +//! \b SYSCTL_OSC_EXT32 is only available on devices with the hibernate module, +//! and then only when the hibernate module has been enabled. +//! +//! The internal and main oscillators are disabled with the +//! \b SYSCTL_INT_OSC_DIS and \b SYSCTL_MAIN_OSC_DIS flags, respectively. +//! The external oscillator must be enabled in order to use an external clock +//! source. Note that attempts to disable the oscillator used to clock the +//! device will be prevented by the hardware. +//! +//! To clock the system from an external source (such as an external crystal +//! oscillator), use \b SYSCTL_USE_OSC \b | \b SYSCTL_OSC_MAIN. To clock the +//! system from the main oscillator, use \b SYSCTL_USE_OSC \b | +//! \b SYSCTL_OSC_MAIN. To clock the system from the PLL, use +//! \b SYSCTL_USE_PLL \b | \b SYSCTL_OSC_MAIN, and select the appropriate +//! crystal with one of the \b SYSCTL_XTAL_xxx values. +//! +//! \note If selecting the PLL as the system clock source (that is, via +//! \b SYSCTL_USE_PLL), this function will poll the PLL lock interrupt to +//! determine when the PLL has locked. If an interrupt handler for the +//! system control interrupt is in place, and it responds to and clears the +//! PLL lock interrupt, this function will delay until its timeout has occurred +//! instead of completing as soon as PLL lock is achieved. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClockSet(unsigned long ulConfig) +{ + unsigned long ulDelay, ulRCC, ulRCC2; + + // + // See if this is a Sandstorm-class device and clocking features from newer + // devices were requested. + // + if(CLASS_IS_SANDSTORM && (ulConfig & SYSCTL_RCC2_USERCC2)) + { + // + // Return without changing the clocking since the requested + // configuration can not be achieved. + // + return; + } + + // + // Get the current value of the RCC and RCC2 registers. If using a + // Sandstorm-class device, the RCC2 register will read back as zero and the + // writes to it from within this function will be ignored. + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Bypass the PLL and system clock dividers for now. + // + ulRCC |= SYSCTL_RCC_BYPASS; + ulRCC &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= SYSCTL_RCC2_BYPASS2; + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // See if either oscillator needs to be enabled. + // + if(((ulRCC & SYSCTL_RCC_IOSCDIS) && !(ulConfig & SYSCTL_RCC_IOSCDIS)) || + ((ulRCC & SYSCTL_RCC_MOSCDIS) && !(ulConfig & SYSCTL_RCC_MOSCDIS))) + { + // + // Make sure that the required oscillators are enabled. For now, the + // previously enabled oscillators must be enabled along with the newly + // requested oscillators. + // + ulRCC &= (~(SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS) | + (ulConfig & (SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS))); + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + + // + // Wait for a bit, giving the oscillator time to stabilize. The number + // of iterations is adjusted based on the current clock source; a + // smaller number of iterations is required for slower clock rates. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && + (((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_30) || + ((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_32))) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + ((ulRCC & SYSCTL_RCC_OSCSRC_M) == SYSCTL_RCC_OSCSRC_30))) + { + // + // Delay for 4096 iterations. + // + SysCtlDelay(4096); + } + else + { + // + // Delay for 524,288 iterations. + // + SysCtlDelay(524288); + } + } + + // + // Set the new crystal value, oscillator source, and PLL configuration. + // Since the OSCSRC2 field in RCC2 overlaps the XTAL field in RCC, the + // OSCSRC field has a special encoding within ulConfig to avoid the + // overlap. + // + ulRCC &= ~(SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC |= ulConfig & (SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC2 &= ~(SYSCTL_RCC2_USERCC2 | SYSCTL_RCC2_OSCSRC2_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_USERCC2 | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= (ulConfig & 0x00000008) << 3; + + // + // Clear the PLL lock interrupt. + // + HWREG(SYSCTL_MISC) = SYSCTL_INT_PLL_LOCK; + + // + // Write the new RCC value. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + HWREG(SYSCTL_RCC2) = ulRCC2; + HWREG(SYSCTL_RCC) = ulRCC; + } + else + { + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + } + + // + // Wait for a bit so that new crystal value and oscillator source can take + // effect. + // + SysCtlDelay(16); + + // + // Set the requested system divider and disable the appropriate + // oscillators. This will not get written immediately. + // + ulRCC &= ~(SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC |= ulConfig & (SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC2 &= ~(SYSCTL_RCC2_SYSDIV2_M); + ulRCC2 |= ulConfig & SYSCTL_RCC2_SYSDIV2_M; + if(ulConfig & SYSCTL_RCC2_DIV400) + { + ulRCC |= SYSCTL_RCC_USESYSDIV; + ulRCC2 &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_DIV400 | SYSCTL_RCC2_SYSDIV2LSB); + } + else + { + ulRCC2 &= ~(SYSCTL_RCC2_DIV400); + } + + // + // See if the PLL output is being used to clock the system. + // + if(!(ulConfig & SYSCTL_RCC_BYPASS)) + { + // + // Wait until the PLL has locked. + // + for(ulDelay = 32768; ulDelay > 0; ulDelay--) + { + if(HWREG(SYSCTL_RIS) & SYSCTL_INT_PLL_LOCK) + { + break; + } + } + + // + // Enable use of the PLL. + // + ulRCC &= ~(SYSCTL_RCC_BYPASS); + ulRCC2 &= ~(SYSCTL_RCC2_BYPASS2); + } + + // + // Write the final RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // Delay for a little bit so that the system divider takes effect. + // + SysCtlDelay(16); +} + +//***************************************************************************** +// +//! Gets the processor clock rate. +//! +//! This function determines the clock rate of the processor clock. This is +//! also the clock rate of all the peripheral modules (with the exception of +//! PWM, which has its own clock divider). +//! +//! \note This will not return accurate results if SysCtlClockSet() has not +//! been called to configure the clocking of the device, or if the device is +//! directly clocked from a crystal (or a clock source) that is not one of the +//! supported crystal frequencies. In the later case, this function should be +//! modified to directly return the correct system clock rate. +//! +//! \return The processor clock rate. +// +//***************************************************************************** +unsigned long +SysCtlClockGet(void) +{ + unsigned long ulRCC, ulRCC2, ulPLL, ulClk; + + // + // Read RCC and RCC2. For Sandstorm-class devices (which do not have + // RCC2), the RCC2 read will return 0, which indicates that RCC2 is + // disabled (since the SYSCTL_RCC2_USERCC2 bit is clear). + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Get the base clock rate. + // + switch((ulRCC2 & SYSCTL_RCC2_USERCC2) ? + (ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) : + (ulRCC & SYSCTL_RCC_OSCSRC_M)) + { + // + // The main oscillator is the clock source. Determine its rate from + // the crystal setting field. + // + case SYSCTL_RCC_OSCSRC_MAIN: + { + ulClk = g_pulXtals[(ulRCC & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + break; + } + + // + // The internal oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000; + } + else + { + // + // The internal oscillator on all other devices is 16 MHz. + // + ulClk = 16000000; + } + break; + } + + // + // The internal oscillator divided by four is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT4: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000 / 4; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000 / 4; + } + else + { + // + // The internal oscillator on a Tempest-class device is 16 MHz. + // + ulClk = 16000000 / 4; + } + break; + } + + // + // The internal 30 KHz oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_30: + { + // + // The internal 30 KHz oscillator has an accuracy of +/- 30%. + // + ulClk = 30000; + break; + } + + // + // The 4.19 MHz clock from the hibernate module is the clock source. + // + case SYSCTL_RCC2_OSCSRC2_419: + { + ulClk = 4194304; + break; + } + + // + // The 32 KHz clock from the hibernate module is the source clock. + // + case SYSCTL_RCC2_OSCSRC2_32: + { + ulClk = 32768; + break; + } + + // + // An unknown setting, so return a zero clock (that is, an unknown + // clock rate). + // + default: + { + return(0); + } + } + + // + // See if the PLL is being used. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC & SYSCTL_RCC_BYPASS))) + { + // + // Get the PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Sandstorm-class devices is + // "(xtal * (f + 2)) / (r + 2)". + // + ulClk = ((ulClk * (((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S) + 2)) / + (((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 2)); + } + else + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Fury-class device is + // "(xtal * f) / ((r + 1) * 2)". + // + ulClk = ((ulClk * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1) * 2)); + } + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulClk /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulClk /= 4; + } + + // + // Force the system divider to be enabled. It is always used when + // using the PLL, but in some cases it will not read as being enabled. + // + ulRCC |= SYSCTL_RCC_USESYSDIV; + } + + // + // See if the system divider is being used. + // + if(ulRCC & SYSCTL_RCC_USESYSDIV) + { + // + // Adjust the clock rate by the system clock divider. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + if((ulRCC2 & SYSCTL_RCC2_DIV400) && + (((ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC & SYSCTL_RCC_BYPASS)))) + + { + ulClk = ((ulClk * 2) / (((ulRCC2 & (SYSCTL_RCC2_SYSDIV2_M | + SYSCTL_RCC2_SYSDIV2LSB)) >> + (SYSCTL_RCC2_SYSDIV2_S - 1)) + 1)); + } + else + { + ulClk /= (((ulRCC2 & SYSCTL_RCC2_SYSDIV2_M) >> + SYSCTL_RCC2_SYSDIV2_S) + 1); + } + } + else + { + ulClk /= (((ulRCC & SYSCTL_RCC_SYSDIV_M) >> SYSCTL_RCC_SYSDIV_S) + + 1); + } + } + + // + // Return the computed clock rate. + // + return(ulClk); +} + +//***************************************************************************** +// +//! Sets the PWM clock configuration. +//! +//! \param ulConfig is the configuration for the PWM clock; it must be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +//! +//! This function sets the rate of the clock provided to the PWM module as a +//! ratio of the processor clock. This clock is used by the PWM module to +//! generate PWM signals; its rate forms the basis for all PWM signals. +//! +//! \note The clocking of the PWM is dependent upon the system clock rate as +//! configured by SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPWMClockSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_PWMDIV_1) || + (ulConfig == SYSCTL_PWMDIV_2) || + (ulConfig == SYSCTL_PWMDIV_4) || + (ulConfig == SYSCTL_PWMDIV_8) || + (ulConfig == SYSCTL_PWMDIV_16) || + (ulConfig == SYSCTL_PWMDIV_32) || + (ulConfig == SYSCTL_PWMDIV_64)); + + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Set the PWM clock configuration into the run-mode clock configuration + // register. + // + HWREG(SYSCTL_RCC) = ((HWREG(SYSCTL_RCC) & + ~(SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)) | + ulConfig); +} + +//***************************************************************************** +// +//! Gets the current PWM clock configuration. +//! +//! This function returns the current PWM clock configuration. +//! +//! \return Returns the current PWM clock configuration; will be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +// +//***************************************************************************** +unsigned long +SysCtlPWMClockGet(void) +{ + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Return the current PWM clock configuration. Make sure that + // SYSCTL_PWMDIV_1 is returned in all cases where the divider is disabled. + // + if(!(HWREG(SYSCTL_RCC) & SYSCTL_RCC_USEPWMDIV)) + { + // + // The divider is not active so reflect this in the value we return. + // + return(SYSCTL_PWMDIV_1); + } + else + { + // + // The divider is active so directly return the masked register value. + // + return(HWREG(SYSCTL_RCC) & + (SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)); + } +} + +//***************************************************************************** +// +//! Sets the sample rate of the ADC. +//! +//! \param ulSpeed is the desired sample rate of the ADC; must be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +//! +//! This function sets the rate at which the ADC samples are captured by the +//! ADC block. The sampling speed may be limited by the hardware, so the +//! sample rate may end up being slower than requested. SysCtlADCSpeedGet() +//! will return the actual speed in use. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlADCSpeedSet(unsigned long ulSpeed) +{ + // + // Check the arguments. + // + ASSERT((ulSpeed == SYSCTL_ADCSPEED_1MSPS) || + (ulSpeed == SYSCTL_ADCSPEED_500KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_250KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_125KSPS)); + + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Set the ADC speed in run, sleep, and deep-sleep mode. + // + HWREG(SYSCTL_RCGC0) = ((HWREG(SYSCTL_RCGC0) & ~(SYSCTL_RCGC0_ADCSPD_M)) | + ulSpeed); + HWREG(SYSCTL_SCGC0) = ((HWREG(SYSCTL_SCGC0) & ~(SYSCTL_SCGC0_ADCSPD_M)) | + ulSpeed); +} + +//***************************************************************************** +// +//! Gets the sample rate of the ADC. +//! +//! This function gets the current sample rate of the ADC. +//! +//! \return Returns the current ADC sample rate; will be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +// +//***************************************************************************** +unsigned long +SysCtlADCSpeedGet(void) +{ + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Return the current ADC speed. + // + return(HWREG(SYSCTL_RCGC0) & SYSCTL_RCGC0_ADCSPD_M); +} + +//***************************************************************************** +// +//! Configures the internal oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the internal oscillator +//! verification timer should be enabled. +//! +//! This function allows the internal oscillator verification timer to be +//! enabled or disabled. When enabled, an interrupt will be generated if the +//! internal oscillator ceases to operate. +//! +//! The internal oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the main oscillator will verify the +//! internal oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the internal oscillator verification timer as + // requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_IOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_IOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the main oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the main oscillator +//! verification timer should be enabled. +//! +//! This function allows the main oscillator verification timer to be enabled +//! or disabled. When enabled, an interrupt will be generated if the main +//! oscillator ceases to operate. +//! +//! The main oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the internal oscillator will verify the +//! main oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlMOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the main oscillator verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_MOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_MOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the PLL verification timer. +//! +//! \param bEnable is a boolean that is \b true if the PLL verification timer +//! should be enabled. +//! +//! This function allows the PLL verification timer to be enabled or disabled. +//! When enabled, an interrupt will be generated if the PLL ceases to operate. +//! +//! The PLL verification timer is only available on Sandstorm-class devices. +//! +//! \note The main oscillator must be enabled for this verification timer to +//! operate as it is used to check the PLL. Also, the verification timer +//! should be disabled while the PLL is being reconfigured via +//! SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPLLVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the PLL verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_PLLVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_PLLVER); + } +} + +//***************************************************************************** +// +//! Clears the clock verification status. +//! +//! This function clears the status of the clock verification timers, allowing +//! them to assert another failure if detected. +//! +//! The clock verification timers are only available on Sandstorm-class +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClkVerificationClear(void) +{ + // + // Clear the clock verification. + // + HWREG(SYSCTL_CLKVCLR) = SYSCTL_CLKVCLR_VERCLR; + + // + // The bit does not self-reset, so clear it. + // + HWREG(SYSCTL_CLKVCLR) = 0; +} + +//***************************************************************************** +// +//! Enables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to enable. +//! +//! This function is used to enable the specified GPIO peripheral to be +//! accessed from the Advanced Host Bus (AHB) instead of the legacy Advanced +//! Peripheral Bus (APB). When a GPIO peripheral is enabled for AHB access, +//! the \b _AHB_BASE form of the base address should be used for GPIO +//! functions. For example, instead of using \b GPIO_PORTA_BASE as the base +//! address for GPIO functions, use \b GPIO_PORTA_AHB_BASE instead. +//! +//! The \e ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Enable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) |= ulGPIOPeripheral & 0xFFFF; +} + +//***************************************************************************** +// +//! Disables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to disable. +//! +//! This function disables the specified GPIO peripheral for access from the +//! Advanced Host Bus (AHB). Once disabled, the GPIO peripheral is accessed +//! from the legacy Advanced Peripheral Bus (AHB). +//! +//! The \b ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Disable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) &= ~(ulGPIOPeripheral & 0xFFFF); +} + +//***************************************************************************** +// +//! Powers up the USB PLL. +//! +//! This function will enable the USB controller's PLL which is used by it's +//! physical layer. This call is necessary before connecting to any external +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLEnable(void) +{ + // + // Turn on the USB PLL. + // + HWREG(SYSCTL_RCC2) &= ~SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Powers down the USB PLL. +//! +//! This function will disable the USB controller's PLL which is used by it's +//! physical layer. The USB registers are still accessible, but the physical +//! layer will no longer function. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLDisable(void) +{ + // + // Turn of USB PLL. + // + HWREG(SYSCTL_RCC2) |= SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Sets the MCLK frequency provided to the I2S module. +//! +//! \param ulInputClock is the input clock to the MCLK divider. If this is +//! zero, the value is computed from the current PLL configuration. +//! \param ulMClk is the desired MCLK frequency. If this is zero, MCLK output +//! is disabled. +//! +//! This function sets the dividers to provide MCLK to the I2S module. A MCLK +//! divider will be chosen that produces the MCLK frequency that is the closest +//! possible to the requested frequency, which may be above or below the +//! requested frequency. +//! +//! The actual MCLK frequency will be returned. It is the responsibility of +//! the application to determine if the selected MCLK is acceptable; in general +//! the human ear can not discern the frequency difference if it is within 0.3% +//! of the desired frequency (though there is a very small percentage of the +//! population that can discern lower frequency deviations). +//! +//! \return Returns the actual MCLK frequency. +// +//***************************************************************************** +unsigned long +SysCtlI2SMClkSet(unsigned long ulInputClock, unsigned long ulMClk) +{ + unsigned long ulDivInt, ulDivFrac, ulPLL; + + // + // See if the I2S MCLK should be disabled. + // + if(ulMClk == 0) + { + // + // Disable the I2S MCLK and return. + // + HWREG(SYSCTL_I2SMCLKCFG) = 0; + return(0); + } + + // + // See if the input clock was specified. + // + if(ulInputClock == 0) + { + // + // The input clock was not specified, so compute the output frequency + // of the PLL. Get the current PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // Get the frequency of the crystal in use. + // + ulInputClock = g_pulXtals[(HWREG(SYSCTL_RCC) & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + + // + // Calculate the PLL output frequency. + // + ulInputClock = ((ulInputClock * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1))); + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulInputClock /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulInputClock /= 4; + } + } + + // + // Verify that the requested MCLK frequency is attainable. + // + ASSERT(ulMClk < ulInputClock); + + // + // Add a rounding factor to the input clock, so that the MCLK frequency + // that is closest to the desire value is selected. + // + ulInputClock += (ulMClk / 32) - 1; + + // + // Compute the integer portion of the MCLK divider. + // + ulDivInt = ulInputClock / ulMClk; + + // + // If the divisor is too large, then simply use the maximum divisor. + // + if(CLASS_IS_TEMPEST && REVISION_IS_B1 && (ulDivInt > 255)) + { + ulDivInt = 255; + ulDivFrac = 15; + } + else if(ulDivInt > 1023) + { + ulDivInt = 1023; + ulDivFrac = 15; + } + else + { + // + // Compute the fractional portion of the MCLK divider. + // + ulDivFrac = ((ulInputClock - (ulDivInt * ulMClk)) * 16) / ulMClk; + } + + // + // Set the divisor for the Tx and Rx MCLK generators and enable the clocks. + // + HWREG(SYSCTL_I2SMCLKCFG) = (SYSCTL_I2SMCLKCFG_RXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_RXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_RXF_S) | + SYSCTL_I2SMCLKCFG_TXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_TXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_TXF_S)); + + // + // Return the actual MCLK frequency. + // + ulInputClock -= (ulMClk / 32) - 1; + ulDivInt = (ulDivInt * 16) + ulDivFrac; + ulMClk = (ulInputClock / ulDivInt) * 16; + ulMClk += ((ulInputClock - ((ulMClk / 16) * ulDivInt)) * 16) / ulDivInt; + return(ulMClk); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.h new file mode 100644 index 00000000..d5b00681 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/sysctl.h @@ -0,0 +1,466 @@ +//***************************************************************************** +// +// sysctl.h - Prototypes for the system control driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSCTL_H__ +#define __SYSCTL_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to the +// SysCtlPeripheralPresent(), SysCtlPeripheralEnable(), +// SysCtlPeripheralDisable(), and SysCtlPeripheralReset() APIs as the +// ulPeripheral parameter. The peripherals in the fourth group (upper nibble +// is 3) can only be used with the SysCtlPeripheralPresent() API. +// +//***************************************************************************** +#ifndef DEPRECATED +#define SYSCTL_PERIPH_WDOG 0x00000008 // Watchdog +#endif +#define SYSCTL_PERIPH_WDOG0 0x00000008 // Watchdog 0 +#define SYSCTL_PERIPH_HIBERNATE 0x00000040 // Hibernation module +#ifndef DEPRECATED +#define SYSCTL_PERIPH_ADC 0x00100001 // ADC +#endif +#define SYSCTL_PERIPH_ADC0 0x00100001 // ADC0 +#define SYSCTL_PERIPH_ADC1 0x00100002 // ADC1 +#define SYSCTL_PERIPH_PWM 0x00100010 // PWM +#define SYSCTL_PERIPH_CAN0 0x00100100 // CAN 0 +#define SYSCTL_PERIPH_CAN1 0x00100200 // CAN 1 +#define SYSCTL_PERIPH_CAN2 0x00100400 // CAN 2 +#define SYSCTL_PERIPH_WDOG1 0x00101000 // Watchdog 1 +#define SYSCTL_PERIPH_UART0 0x10000001 // UART 0 +#define SYSCTL_PERIPH_UART1 0x10000002 // UART 1 +#define SYSCTL_PERIPH_UART2 0x10000004 // UART 2 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_SSI 0x10000010 // SSI +#endif +#define SYSCTL_PERIPH_SSI0 0x10000010 // SSI 0 +#define SYSCTL_PERIPH_SSI1 0x10000020 // SSI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_QEI 0x10000100 // QEI +#endif +#define SYSCTL_PERIPH_QEI0 0x10000100 // QEI 0 +#define SYSCTL_PERIPH_QEI1 0x10000200 // QEI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_I2C 0x10001000 // I2C +#endif +#define SYSCTL_PERIPH_I2C0 0x10001000 // I2C 0 +#define SYSCTL_PERIPH_I2C1 0x10004000 // I2C 1 +#define SYSCTL_PERIPH_TIMER0 0x10100001 // Timer 0 +#define SYSCTL_PERIPH_TIMER1 0x10100002 // Timer 1 +#define SYSCTL_PERIPH_TIMER2 0x10100004 // Timer 2 +#define SYSCTL_PERIPH_TIMER3 0x10100008 // Timer 3 +#define SYSCTL_PERIPH_COMP0 0x10100100 // Analog comparator 0 +#define SYSCTL_PERIPH_COMP1 0x10100200 // Analog comparator 1 +#define SYSCTL_PERIPH_COMP2 0x10100400 // Analog comparator 2 +#define SYSCTL_PERIPH_I2S0 0x10101000 // I2S0 +#define SYSCTL_PERIPH_EPI0 0x10104000 // EPI0 +#define SYSCTL_PERIPH_GPIOA 0x20000001 // GPIO A +#define SYSCTL_PERIPH_GPIOB 0x20000002 // GPIO B +#define SYSCTL_PERIPH_GPIOC 0x20000004 // GPIO C +#define SYSCTL_PERIPH_GPIOD 0x20000008 // GPIO D +#define SYSCTL_PERIPH_GPIOE 0x20000010 // GPIO E +#define SYSCTL_PERIPH_GPIOF 0x20000020 // GPIO F +#define SYSCTL_PERIPH_GPIOG 0x20000040 // GPIO G +#define SYSCTL_PERIPH_GPIOH 0x20000080 // GPIO H +#define SYSCTL_PERIPH_GPIOJ 0x20000100 // GPIO J +#define SYSCTL_PERIPH_UDMA 0x20002000 // uDMA +#define SYSCTL_PERIPH_USB0 0x20100001 // USB0 +#define SYSCTL_PERIPH_ETH 0x20105000 // ETH +#define SYSCTL_PERIPH_IEEE1588 0x20100100 // IEEE1588 +#define SYSCTL_PERIPH_PLL 0x30000010 // PLL +#define SYSCTL_PERIPH_TEMP 0x30000020 // Temperature sensor +#define SYSCTL_PERIPH_MPU 0x30000080 // Cortex M3 MPU + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPinPresent() API +// as the ulPin parameter. +// +//***************************************************************************** +#define SYSCTL_PIN_PWM0 0x00000001 // PWM0 pin +#define SYSCTL_PIN_PWM1 0x00000002 // PWM1 pin +#define SYSCTL_PIN_PWM2 0x00000004 // PWM2 pin +#define SYSCTL_PIN_PWM3 0x00000008 // PWM3 pin +#define SYSCTL_PIN_PWM4 0x00000010 // PWM4 pin +#define SYSCTL_PIN_PWM5 0x00000020 // PWM5 pin +#define SYSCTL_PIN_PWM6 0x00000040 // PWM6 pin +#define SYSCTL_PIN_PWM7 0x00000080 // PWM7 pin +#define SYSCTL_PIN_C0MINUS 0x00000040 // C0- pin +#define SYSCTL_PIN_C0PLUS 0x00000080 // C0+ pin +#define SYSCTL_PIN_C0O 0x00000100 // C0o pin +#define SYSCTL_PIN_C1MINUS 0x00000200 // C1- pin +#define SYSCTL_PIN_C1PLUS 0x00000400 // C1+ pin +#define SYSCTL_PIN_C1O 0x00000800 // C1o pin +#define SYSCTL_PIN_C2MINUS 0x00001000 // C2- pin +#define SYSCTL_PIN_C2PLUS 0x00002000 // C2+ pin +#define SYSCTL_PIN_C2O 0x00004000 // C2o pin +#define SYSCTL_PIN_MC_FAULT0 0x00008000 // MC0 Fault pin +#define SYSCTL_PIN_ADC0 0x00010000 // ADC0 pin +#define SYSCTL_PIN_ADC1 0x00020000 // ADC1 pin +#define SYSCTL_PIN_ADC2 0x00040000 // ADC2 pin +#define SYSCTL_PIN_ADC3 0x00080000 // ADC3 pin +#define SYSCTL_PIN_ADC4 0x00100000 // ADC4 pin +#define SYSCTL_PIN_ADC5 0x00200000 // ADC5 pin +#define SYSCTL_PIN_ADC6 0x00400000 // ADC6 pin +#define SYSCTL_PIN_ADC7 0x00800000 // ADC7 pin +#define SYSCTL_PIN_CCP0 0x01000000 // CCP0 pin +#define SYSCTL_PIN_CCP1 0x02000000 // CCP1 pin +#define SYSCTL_PIN_CCP2 0x04000000 // CCP2 pin +#define SYSCTL_PIN_CCP3 0x08000000 // CCP3 pin +#define SYSCTL_PIN_CCP4 0x10000000 // CCP4 pin +#define SYSCTL_PIN_CCP5 0x20000000 // CCP5 pin +#define SYSCTL_PIN_32KHZ 0x80000000 // 32kHz pin + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOSet() API as +// the ulVoltage value, or returned by the SysCtlLDOGet() API. +// +//***************************************************************************** +#define SYSCTL_LDO_2_25V 0x00000005 // LDO output of 2.25V +#define SYSCTL_LDO_2_30V 0x00000004 // LDO output of 2.30V +#define SYSCTL_LDO_2_35V 0x00000003 // LDO output of 2.35V +#define SYSCTL_LDO_2_40V 0x00000002 // LDO output of 2.40V +#define SYSCTL_LDO_2_45V 0x00000001 // LDO output of 2.45V +#define SYSCTL_LDO_2_50V 0x00000000 // LDO output of 2.50V +#define SYSCTL_LDO_2_55V 0x0000001f // LDO output of 2.55V +#define SYSCTL_LDO_2_60V 0x0000001e // LDO output of 2.60V +#define SYSCTL_LDO_2_65V 0x0000001d // LDO output of 2.65V +#define SYSCTL_LDO_2_70V 0x0000001c // LDO output of 2.70V +#define SYSCTL_LDO_2_75V 0x0000001b // LDO output of 2.75V + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOConfigSet() API. +// +//***************************************************************************** +#define SYSCTL_LDOCFG_ARST 0x00000001 // Allow LDO failure to reset +#define SYSCTL_LDOCFG_NORST 0x00000000 // Do not reset on LDO failure + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlIntEnable(), +// SysCtlIntDisable(), and SysCtlIntClear() APIs, or returned in the bit mask +// by the SysCtlIntStatus() API. +// +//***************************************************************************** +#define SYSCTL_INT_MOSC_PUP 0x00000100 // MOSC power-up interrupt +#define SYSCTL_INT_USBPLL_LOCK 0x00000080 // USB PLL lock interrupt +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlResetCauseClear() +// API or returned by the SysCtlResetCauseGet() API. +// +//***************************************************************************** +#define SYSCTL_CAUSE_LDO 0x00000020 // LDO power not OK reset +#define SYSCTL_CAUSE_SW 0x00000010 // Software reset +#define SYSCTL_CAUSE_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset +#define SYSCTL_CAUSE_POR 0x00000002 // Power on reset +#define SYSCTL_CAUSE_EXT 0x00000001 // External reset + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlBrownOutConfigSet() +// API as the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_BOR_RESET 0x00000002 // Reset instead of interrupting +#define SYSCTL_BOR_RESAMPLE 0x00000001 // Resample BOR before asserting + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPWMClockSet() API +// as the ulConfig parameter, and can be returned by the SysCtlPWMClockGet() +// API. +// +//***************************************************************************** +#define SYSCTL_PWMDIV_1 0x00000000 // PWM clock is processor clock /1 +#define SYSCTL_PWMDIV_2 0x00100000 // PWM clock is processor clock /2 +#define SYSCTL_PWMDIV_4 0x00120000 // PWM clock is processor clock /4 +#define SYSCTL_PWMDIV_8 0x00140000 // PWM clock is processor clock /8 +#define SYSCTL_PWMDIV_16 0x00160000 // PWM clock is processor clock /16 +#define SYSCTL_PWMDIV_32 0x00180000 // PWM clock is processor clock /32 +#define SYSCTL_PWMDIV_64 0x001A0000 // PWM clock is processor clock /64 + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlADCSpeedSet() API +// as the ulSpeed parameter, and can be returned by the SyCtlADCSpeedGet() +// API. +// +//***************************************************************************** +#define SYSCTL_ADCSPEED_1MSPS 0x00000F00 // 1,000,000 samples per second +#define SYSCTL_ADCSPEED_500KSPS 0x00000A00 // 500,000 samples per second +#define SYSCTL_ADCSPEED_250KSPS 0x00000500 // 250,000 samples per second +#define SYSCTL_ADCSPEED_125KSPS 0x00000000 // 125,000 samples per second + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlClockSet() API as +// the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_SYSDIV_1 0x07800000 // Processor clock is osc/pll /1 +#define SYSCTL_SYSDIV_2 0x00C00000 // Processor clock is osc/pll /2 +#define SYSCTL_SYSDIV_3 0x01400000 // Processor clock is osc/pll /3 +#define SYSCTL_SYSDIV_4 0x01C00000 // Processor clock is osc/pll /4 +#define SYSCTL_SYSDIV_5 0x02400000 // Processor clock is osc/pll /5 +#define SYSCTL_SYSDIV_6 0x02C00000 // Processor clock is osc/pll /6 +#define SYSCTL_SYSDIV_7 0x03400000 // Processor clock is osc/pll /7 +#define SYSCTL_SYSDIV_8 0x03C00000 // Processor clock is osc/pll /8 +#define SYSCTL_SYSDIV_9 0x04400000 // Processor clock is osc/pll /9 +#define SYSCTL_SYSDIV_10 0x04C00000 // Processor clock is osc/pll /10 +#define SYSCTL_SYSDIV_11 0x05400000 // Processor clock is osc/pll /11 +#define SYSCTL_SYSDIV_12 0x05C00000 // Processor clock is osc/pll /12 +#define SYSCTL_SYSDIV_13 0x06400000 // Processor clock is osc/pll /13 +#define SYSCTL_SYSDIV_14 0x06C00000 // Processor clock is osc/pll /14 +#define SYSCTL_SYSDIV_15 0x07400000 // Processor clock is osc/pll /15 +#define SYSCTL_SYSDIV_16 0x07C00000 // Processor clock is osc/pll /16 +#define SYSCTL_SYSDIV_17 0x88400000 // Processor clock is osc/pll /17 +#define SYSCTL_SYSDIV_18 0x88C00000 // Processor clock is osc/pll /18 +#define SYSCTL_SYSDIV_19 0x89400000 // Processor clock is osc/pll /19 +#define SYSCTL_SYSDIV_20 0x89C00000 // Processor clock is osc/pll /20 +#define SYSCTL_SYSDIV_21 0x8A400000 // Processor clock is osc/pll /21 +#define SYSCTL_SYSDIV_22 0x8AC00000 // Processor clock is osc/pll /22 +#define SYSCTL_SYSDIV_23 0x8B400000 // Processor clock is osc/pll /23 +#define SYSCTL_SYSDIV_24 0x8BC00000 // Processor clock is osc/pll /24 +#define SYSCTL_SYSDIV_25 0x8C400000 // Processor clock is osc/pll /25 +#define SYSCTL_SYSDIV_26 0x8CC00000 // Processor clock is osc/pll /26 +#define SYSCTL_SYSDIV_27 0x8D400000 // Processor clock is osc/pll /27 +#define SYSCTL_SYSDIV_28 0x8DC00000 // Processor clock is osc/pll /28 +#define SYSCTL_SYSDIV_29 0x8E400000 // Processor clock is osc/pll /29 +#define SYSCTL_SYSDIV_30 0x8EC00000 // Processor clock is osc/pll /30 +#define SYSCTL_SYSDIV_31 0x8F400000 // Processor clock is osc/pll /31 +#define SYSCTL_SYSDIV_32 0x8FC00000 // Processor clock is osc/pll /32 +#define SYSCTL_SYSDIV_33 0x90400000 // Processor clock is osc/pll /33 +#define SYSCTL_SYSDIV_34 0x90C00000 // Processor clock is osc/pll /34 +#define SYSCTL_SYSDIV_35 0x91400000 // Processor clock is osc/pll /35 +#define SYSCTL_SYSDIV_36 0x91C00000 // Processor clock is osc/pll /36 +#define SYSCTL_SYSDIV_37 0x92400000 // Processor clock is osc/pll /37 +#define SYSCTL_SYSDIV_38 0x92C00000 // Processor clock is osc/pll /38 +#define SYSCTL_SYSDIV_39 0x93400000 // Processor clock is osc/pll /39 +#define SYSCTL_SYSDIV_40 0x93C00000 // Processor clock is osc/pll /40 +#define SYSCTL_SYSDIV_41 0x94400000 // Processor clock is osc/pll /41 +#define SYSCTL_SYSDIV_42 0x94C00000 // Processor clock is osc/pll /42 +#define SYSCTL_SYSDIV_43 0x95400000 // Processor clock is osc/pll /43 +#define SYSCTL_SYSDIV_44 0x95C00000 // Processor clock is osc/pll /44 +#define SYSCTL_SYSDIV_45 0x96400000 // Processor clock is osc/pll /45 +#define SYSCTL_SYSDIV_46 0x96C00000 // Processor clock is osc/pll /46 +#define SYSCTL_SYSDIV_47 0x97400000 // Processor clock is osc/pll /47 +#define SYSCTL_SYSDIV_48 0x97C00000 // Processor clock is osc/pll /48 +#define SYSCTL_SYSDIV_49 0x98400000 // Processor clock is osc/pll /49 +#define SYSCTL_SYSDIV_50 0x98C00000 // Processor clock is osc/pll /50 +#define SYSCTL_SYSDIV_51 0x99400000 // Processor clock is osc/pll /51 +#define SYSCTL_SYSDIV_52 0x99C00000 // Processor clock is osc/pll /52 +#define SYSCTL_SYSDIV_53 0x9A400000 // Processor clock is osc/pll /53 +#define SYSCTL_SYSDIV_54 0x9AC00000 // Processor clock is osc/pll /54 +#define SYSCTL_SYSDIV_55 0x9B400000 // Processor clock is osc/pll /55 +#define SYSCTL_SYSDIV_56 0x9BC00000 // Processor clock is osc/pll /56 +#define SYSCTL_SYSDIV_57 0x9C400000 // Processor clock is osc/pll /57 +#define SYSCTL_SYSDIV_58 0x9CC00000 // Processor clock is osc/pll /58 +#define SYSCTL_SYSDIV_59 0x9D400000 // Processor clock is osc/pll /59 +#define SYSCTL_SYSDIV_60 0x9DC00000 // Processor clock is osc/pll /60 +#define SYSCTL_SYSDIV_61 0x9E400000 // Processor clock is osc/pll /61 +#define SYSCTL_SYSDIV_62 0x9EC00000 // Processor clock is osc/pll /62 +#define SYSCTL_SYSDIV_63 0x9F400000 // Processor clock is osc/pll /63 +#define SYSCTL_SYSDIV_64 0x9FC00000 // Processor clock is osc/pll /64 +#define SYSCTL_SYSDIV_2_5 0xC1000000 // Processor clock is pll / 2.5 +#define SYSCTL_SYSDIV_3_5 0xC1800000 // Processor clock is pll / 3.5 +#define SYSCTL_SYSDIV_4_5 0xC2000000 // Processor clock is pll / 4.5 +#define SYSCTL_SYSDIV_5_5 0xC2800000 // Processor clock is pll / 5.5 +#define SYSCTL_SYSDIV_6_5 0xC3000000 // Processor clock is pll / 6.5 +#define SYSCTL_SYSDIV_7_5 0xC3800000 // Processor clock is pll / 7.5 +#define SYSCTL_SYSDIV_8_5 0xC4000000 // Processor clock is pll / 8.5 +#define SYSCTL_SYSDIV_9_5 0xC4800000 // Processor clock is pll / 9.5 +#define SYSCTL_SYSDIV_10_5 0xC5000000 // Processor clock is pll / 10.5 +#define SYSCTL_SYSDIV_11_5 0xC5800000 // Processor clock is pll / 11.5 +#define SYSCTL_SYSDIV_12_5 0xC6000000 // Processor clock is pll / 12.5 +#define SYSCTL_SYSDIV_13_5 0xC6800000 // Processor clock is pll / 13.5 +#define SYSCTL_SYSDIV_14_5 0xC7000000 // Processor clock is pll / 14.5 +#define SYSCTL_SYSDIV_15_5 0xC7800000 // Processor clock is pll / 15.5 +#define SYSCTL_SYSDIV_16_5 0xC8000000 // Processor clock is pll / 16.5 +#define SYSCTL_SYSDIV_17_5 0xC8800000 // Processor clock is pll / 17.5 +#define SYSCTL_SYSDIV_18_5 0xC9000000 // Processor clock is pll / 18.5 +#define SYSCTL_SYSDIV_19_5 0xC9800000 // Processor clock is pll / 19.5 +#define SYSCTL_SYSDIV_20_5 0xCA000000 // Processor clock is pll / 20.5 +#define SYSCTL_SYSDIV_21_5 0xCA800000 // Processor clock is pll / 21.5 +#define SYSCTL_SYSDIV_22_5 0xCB000000 // Processor clock is pll / 22.5 +#define SYSCTL_SYSDIV_23_5 0xCB800000 // Processor clock is pll / 23.5 +#define SYSCTL_SYSDIV_24_5 0xCC000000 // Processor clock is pll / 24.5 +#define SYSCTL_SYSDIV_25_5 0xCC800000 // Processor clock is pll / 25.5 +#define SYSCTL_SYSDIV_26_5 0xCD000000 // Processor clock is pll / 26.5 +#define SYSCTL_SYSDIV_27_5 0xCD800000 // Processor clock is pll / 27.5 +#define SYSCTL_SYSDIV_28_5 0xCE000000 // Processor clock is pll / 28.5 +#define SYSCTL_SYSDIV_29_5 0xCE800000 // Processor clock is pll / 29.5 +#define SYSCTL_SYSDIV_30_5 0xCF000000 // Processor clock is pll / 30.5 +#define SYSCTL_SYSDIV_31_5 0xCF800000 // Processor clock is pll / 31.5 +#define SYSCTL_SYSDIV_32_5 0xD0000000 // Processor clock is pll / 32.5 +#define SYSCTL_SYSDIV_33_5 0xD0800000 // Processor clock is pll / 33.5 +#define SYSCTL_SYSDIV_34_5 0xD1000000 // Processor clock is pll / 34.5 +#define SYSCTL_SYSDIV_35_5 0xD1800000 // Processor clock is pll / 35.5 +#define SYSCTL_SYSDIV_36_5 0xD2000000 // Processor clock is pll / 36.5 +#define SYSCTL_SYSDIV_37_5 0xD2800000 // Processor clock is pll / 37.5 +#define SYSCTL_SYSDIV_38_5 0xD3000000 // Processor clock is pll / 38.5 +#define SYSCTL_SYSDIV_39_5 0xD3800000 // Processor clock is pll / 39.5 +#define SYSCTL_SYSDIV_40_5 0xD4000000 // Processor clock is pll / 40.5 +#define SYSCTL_SYSDIV_41_5 0xD4800000 // Processor clock is pll / 41.5 +#define SYSCTL_SYSDIV_42_5 0xD5000000 // Processor clock is pll / 42.5 +#define SYSCTL_SYSDIV_43_5 0xD5800000 // Processor clock is pll / 43.5 +#define SYSCTL_SYSDIV_44_5 0xD6000000 // Processor clock is pll / 44.5 +#define SYSCTL_SYSDIV_45_5 0xD6800000 // Processor clock is pll / 45.5 +#define SYSCTL_SYSDIV_46_5 0xD7000000 // Processor clock is pll / 46.5 +#define SYSCTL_SYSDIV_47_5 0xD7800000 // Processor clock is pll / 47.5 +#define SYSCTL_SYSDIV_48_5 0xD8000000 // Processor clock is pll / 48.5 +#define SYSCTL_SYSDIV_49_5 0xD8800000 // Processor clock is pll / 49.5 +#define SYSCTL_SYSDIV_50_5 0xD9000000 // Processor clock is pll / 50.5 +#define SYSCTL_SYSDIV_51_5 0xD9800000 // Processor clock is pll / 51.5 +#define SYSCTL_SYSDIV_52_5 0xDA000000 // Processor clock is pll / 52.5 +#define SYSCTL_SYSDIV_53_5 0xDA800000 // Processor clock is pll / 53.5 +#define SYSCTL_SYSDIV_54_5 0xDB000000 // Processor clock is pll / 54.5 +#define SYSCTL_SYSDIV_55_5 0xDB800000 // Processor clock is pll / 55.5 +#define SYSCTL_SYSDIV_56_5 0xDC000000 // Processor clock is pll / 56.5 +#define SYSCTL_SYSDIV_57_5 0xDC800000 // Processor clock is pll / 57.5 +#define SYSCTL_SYSDIV_58_5 0xDD000000 // Processor clock is pll / 58.5 +#define SYSCTL_SYSDIV_59_5 0xDD800000 // Processor clock is pll / 59.5 +#define SYSCTL_SYSDIV_60_5 0xDE000000 // Processor clock is pll / 60.5 +#define SYSCTL_SYSDIV_61_5 0xDE800000 // Processor clock is pll / 61.5 +#define SYSCTL_SYSDIV_62_5 0xDF000000 // Processor clock is pll / 62.5 +#define SYSCTL_SYSDIV_63_5 0xDF800000 // Processor clock is pll / 63.5 +#define SYSCTL_USE_PLL 0x00000000 // System clock is the PLL clock +#define SYSCTL_USE_OSC 0x00003800 // System clock is the osc clock +#define SYSCTL_XTAL_1MHZ 0x00000000 // External crystal is 1MHz +#define SYSCTL_XTAL_1_84MHZ 0x00000040 // External crystal is 1.8432MHz +#define SYSCTL_XTAL_2MHZ 0x00000080 // External crystal is 2MHz +#define SYSCTL_XTAL_2_45MHZ 0x000000C0 // External crystal is 2.4576MHz +#define SYSCTL_XTAL_3_57MHZ 0x00000100 // External crystal is 3.579545MHz +#define SYSCTL_XTAL_3_68MHZ 0x00000140 // External crystal is 3.6864MHz +#define SYSCTL_XTAL_4MHZ 0x00000180 // External crystal is 4MHz +#define SYSCTL_XTAL_4_09MHZ 0x000001C0 // External crystal is 4.096MHz +#define SYSCTL_XTAL_4_91MHZ 0x00000200 // External crystal is 4.9152MHz +#define SYSCTL_XTAL_5MHZ 0x00000240 // External crystal is 5MHz +#define SYSCTL_XTAL_5_12MHZ 0x00000280 // External crystal is 5.12MHz +#define SYSCTL_XTAL_6MHZ 0x000002C0 // External crystal is 6MHz +#define SYSCTL_XTAL_6_14MHZ 0x00000300 // External crystal is 6.144MHz +#define SYSCTL_XTAL_7_37MHZ 0x00000340 // External crystal is 7.3728MHz +#define SYSCTL_XTAL_8MHZ 0x00000380 // External crystal is 8MHz +#define SYSCTL_XTAL_8_19MHZ 0x000003C0 // External crystal is 8.192MHz +#define SYSCTL_XTAL_10MHZ 0x00000400 // External crystal is 10 MHz +#define SYSCTL_XTAL_12MHZ 0x00000440 // External crystal is 12 MHz +#define SYSCTL_XTAL_12_2MHZ 0x00000480 // External crystal is 12.288 MHz +#define SYSCTL_XTAL_13_5MHZ 0x000004C0 // External crystal is 13.56 MHz +#define SYSCTL_XTAL_14_3MHZ 0x00000500 // External crystal is 14.31818 MHz +#define SYSCTL_XTAL_16MHZ 0x00000540 // External crystal is 16 MHz +#define SYSCTL_XTAL_16_3MHZ 0x00000580 // External crystal is 16.384 MHz +#define SYSCTL_OSC_MAIN 0x00000000 // Osc source is main osc +#define SYSCTL_OSC_INT 0x00000010 // Osc source is int. osc +#define SYSCTL_OSC_INT4 0x00000020 // Osc source is int. osc /4 +#define SYSCTL_OSC_INT30 0x00000030 // Osc source is int. 30 KHz +#define SYSCTL_OSC_EXT4_19 0x80000028 // Osc source is ext. 4.19 MHz +#define SYSCTL_OSC_EXT32 0x80000038 // Osc source is ext. 32 KHz +#define SYSCTL_INT_PIOSC_DIS 0x00000004 // Disable interal precision osc. +#define SYSCTL_INT_OSC_DIS 0x00000002 // Disable internal oscillator +#define SYSCTL_MAIN_OSC_DIS 0x00000001 // Disable main oscillator + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long SysCtlSRAMSizeGet(void); +extern unsigned long SysCtlFlashSizeGet(void); +extern tBoolean SysCtlPinPresent(unsigned long ulPin); +extern tBoolean SysCtlPeripheralPresent(unsigned long ulPeripheral); +extern void SysCtlPeripheralReset(unsigned long ulPeripheral); +extern void SysCtlPeripheralEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralClockGating(tBoolean bEnable); +extern void SysCtlIntRegister(void (*pfnHandler)(void)); +extern void SysCtlIntUnregister(void); +extern void SysCtlIntEnable(unsigned long ulInts); +extern void SysCtlIntDisable(unsigned long ulInts); +extern void SysCtlIntClear(unsigned long ulInts); +extern unsigned long SysCtlIntStatus(tBoolean bMasked); +extern void SysCtlLDOSet(unsigned long ulVoltage); +extern unsigned long SysCtlLDOGet(void); +extern void SysCtlLDOConfigSet(unsigned long ulConfig); +extern void SysCtlReset(void); +extern void SysCtlSleep(void); +extern void SysCtlDeepSleep(void); +extern unsigned long SysCtlResetCauseGet(void); +extern void SysCtlResetCauseClear(unsigned long ulCauses); +extern void SysCtlBrownOutConfigSet(unsigned long ulConfig, + unsigned long ulDelay); +extern void SysCtlDelay(unsigned long ulCount); +extern void SysCtlClockSet(unsigned long ulConfig); +extern unsigned long SysCtlClockGet(void); +extern void SysCtlPWMClockSet(unsigned long ulConfig); +extern unsigned long SysCtlPWMClockGet(void); +extern void SysCtlADCSpeedSet(unsigned long ulSpeed); +extern unsigned long SysCtlADCSpeedGet(void); +extern void SysCtlIOSCVerificationSet(tBoolean bEnable); +extern void SysCtlMOSCVerificationSet(tBoolean bEnable); +extern void SysCtlPLLVerificationSet(tBoolean bEnable); +extern void SysCtlClkVerificationClear(void); +extern void SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral); +extern void SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral); +extern void SysCtlUSBPLLEnable(void); +extern void SysCtlUSBPLLDisable(void); +extern unsigned long SysCtlI2SMClkSet(unsigned long ulInputClock, + unsigned long ulMClk); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.c new file mode 100644 index 00000000..86ddc668 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.c @@ -0,0 +1,1611 @@ +//***************************************************************************** +// +// uart.c - Driver for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup uart_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "inc/hw_uart.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/uartlib.h" + +//***************************************************************************** +// +// The system clock divider defining the maximum baud rate supported by the +// UART. +// +//***************************************************************************** +#define UART_CLK_DIVIDER ((CLASS_IS_SANDSTORM || \ + (CLASS_IS_FURY && REVISION_IS_A2) || \ + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) ? \ + 16 : 8) + +//***************************************************************************** +// +//! \internal +//! Checks a UART base address. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function determines if a UART port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +UARTBaseValid(unsigned long ulBase) +{ + return((ulBase == UART0_BASE) || (ulBase == UART1_BASE) || + (ulBase == UART2_BASE)); +} +#endif + +//***************************************************************************** +// +//! Sets the type of parity. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulParity specifies the type of parity to use. +//! +//! Sets the type of parity to use for transmitting and expect when receiving. +//! The \e ulParity parameter must be one of \b UART_CONFIG_PAR_NONE, +//! \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, +//! or \b UART_CONFIG_PAR_ZERO. The last two allow direct control of the +//! parity bit; it is always either one or zero based on the mode. +//! +//! \return None. +// +//***************************************************************************** +void +UARTParityModeSet(unsigned long ulBase, unsigned long ulParity) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulParity == UART_CONFIG_PAR_NONE) || + (ulParity == UART_CONFIG_PAR_EVEN) || + (ulParity == UART_CONFIG_PAR_ODD) || + (ulParity == UART_CONFIG_PAR_ONE) || + (ulParity == UART_CONFIG_PAR_ZERO)); + + // + // Set the parity mode. + // + HWREG(ulBase + UART_O_LCRH) = ((HWREG(ulBase + UART_O_LCRH) & + ~(UART_LCRH_SPS | UART_LCRH_EPS | + UART_LCRH_PEN)) | ulParity); +} + +//***************************************************************************** +// +//! Gets the type of parity currently being used. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function gets the type of parity used for transmitting data and +//! expected when receiving data. +//! +//! \return Returns the current parity settings, specified as one of +//! \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, +//! \b UART_CONFIG_PAR_ONE, or \b UART_CONFIG_PAR_ZERO. +// +//***************************************************************************** +unsigned long +UARTParityModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current parity setting. + // + return(HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Sets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulTxLevel is the transmit FIFO interrupt level, specified as one of +//! \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, \b UART_FIFO_TX4_8, +//! \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param ulRxLevel is the receive FIFO interrupt level, specified as one of +//! \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, \b UART_FIFO_RX4_8, +//! \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function sets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulTxLevel == UART_FIFO_TX1_8) || + (ulTxLevel == UART_FIFO_TX2_8) || + (ulTxLevel == UART_FIFO_TX4_8) || + (ulTxLevel == UART_FIFO_TX6_8) || + (ulTxLevel == UART_FIFO_TX7_8)); + ASSERT((ulRxLevel == UART_FIFO_RX1_8) || + (ulRxLevel == UART_FIFO_RX2_8) || + (ulRxLevel == UART_FIFO_RX4_8) || + (ulRxLevel == UART_FIFO_RX6_8) || + (ulRxLevel == UART_FIFO_RX7_8)); + + // + // Set the FIFO interrupt levels. + // + HWREG(ulBase + UART_O_IFLS) = ulTxLevel | ulRxLevel; +} + +//***************************************************************************** +// +//! Gets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param pulTxLevel is a pointer to storage for the transmit FIFO level, +//! returned as one of \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, +//! \b UART_FIFO_TX4_8, \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param pulRxLevel is a pointer to storage for the receive FIFO level, +//! returned as one of \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, +//! \b UART_FIFO_RX4_8, \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function gets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Read the FIFO level register. + // + ulTemp = HWREG(ulBase + UART_O_IFLS); + + // + // Extract the transmit and receive FIFO levels. + // + *pulTxLevel = ulTemp & UART_IFLS_TX_M; + *pulRxLevel = ulTemp & UART_IFLS_RX_M; +} + +//***************************************************************************** +// +//! Sets the configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param ulBaud is the desired baud rate. +//! \param ulConfig is the data format for the port (number of data bits, +//! number of stop bits, and parity). +//! +//! This function configures the UART for operation in the specified data +//! format. The baud rate is provided in the \e ulBaud parameter and the data +//! format in the \e ulConfig parameter. +//! +//! The \e ulConfig parameter is the logical OR of three values: the number of +//! data bits, the number of stop bits, and the parity. \b UART_CONFIG_WLEN_8, +//! \b UART_CONFIG_WLEN_7, \b UART_CONFIG_WLEN_6, and \b UART_CONFIG_WLEN_5 +//! select from eight to five data bits per byte (respectively). +//! \b UART_CONFIG_STOP_ONE and \b UART_CONFIG_STOP_TWO select one or two stop +//! bits (respectively). \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, +//! \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, and \b UART_CONFIG_PAR_ZERO +//! select the parity mode (no parity bit, even parity bit, odd parity bit, +//! parity bit always one, and parity bit always zero, respectively). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigSet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT(ulBaud != 0); + ASSERT(ulUARTClk >= (ulBaud * UART_CLK_DIVIDER)); + + // + // Stop the UART. + // + UARTDisable(ulBase); + + // + // Is the required baud rate greater than the maximum rate supported + // without the use of high speed mode? + // + if((ulBaud * 16) > ulUARTClk) + { + // + // Enable high speed mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_HSE; + + // + // Half the supplied baud rate to compensate for enabling high speed + // mode. This allows the following code to be common to both cases. + // + ulBaud /= 2; + } + else + { + // + // Disable high speed mode. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_HSE); + } + + // + // Compute the fractional baud rate divider. + // + ulDiv = (((ulUARTClk * 8) / ulBaud) + 1) / 2; + + // + // Set the baud rate. + // + HWREG(ulBase + UART_O_IBRD) = ulDiv / 64; + HWREG(ulBase + UART_O_FBRD) = ulDiv % 64; + + // + // Set parity, data length, and number of stop bits. + // + HWREG(ulBase + UART_O_LCRH) = ulConfig; + + // + // Clear the flags register. + // + HWREG(ulBase + UART_O_FR) = 0; + + // + // Start the UART. + // + UARTEnable(ulBase); +} + +//***************************************************************************** +// +//! Gets the current configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param pulBaud is a pointer to storage for the baud rate. +//! \param pulConfig is a pointer to storage for the data format. +//! +//! The baud rate and data format for the UART is determined, given an +//! explicitly provided peripheral clock (hence the ExpClk suffix). The +//! returned baud rate is the actual baud rate; it may not be the exact baud +//! rate requested or an ``official'' baud rate. The data format returned in +//! \e pulConfig is enumerated the same as the \e ulConfig parameter of +//! UARTConfigSetExpClk(). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigGet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, unsigned long *pulConfig) +{ + unsigned long ulInt, ulFrac; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Compute the baud rate. + // + ulInt = HWREG(ulBase + UART_O_IBRD); + ulFrac = HWREG(ulBase + UART_O_FBRD); + *pulBaud = (ulUARTClk * 4) / ((64 * ulInt) + ulFrac); + + // + // See if high speed mode enabled. + // + if(HWREG(ulBase + UART_O_CTL) & UART_CTL_HSE) + { + // + // High speed mode is enabled so the actual baud rate is actually + // double what was just calculated. + // + *pulBaud *= 2; + } + + // + // Get the parity, data length, and number of stop bits. + // + *pulConfig = (HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_WLEN_M | UART_LCRH_STP2 | + UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Enables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Sets the UARTEN, TXE, and RXE bits, and enables the transmit and receive +//! FIFOs. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; + + // + // Enable RX, TX, and the UART. + // + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Disables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the UARTEN, TXE, and RXE bits, then waits for the end of +//! transmission of the current character, and flushes the transmit FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait for end of TX. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) + { + } + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); + + // + // Disable the UART. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Enables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions enables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; +} + +//***************************************************************************** +// +//! Disables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions disables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFODisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); +} + +//***************************************************************************** +// +//! Enables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param bLowPower indicates if SIR Low Power Mode is to be used. +//! +//! Enables the SIREN control bit for IrDA mode on the UART. If the +//! \e bLowPower flag is set, then SIRLP bit will also be set. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable SIR and SIRLP (if appropriate). + // + if(bLowPower) + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN | UART_CTL_SIRLP); + } + else + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN); + } +} + +//***************************************************************************** +// +//! Disables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SIREN (IrDA) and SIRLP (Low Power) bits. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisableSIR(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable SIR and SIRLP (if appropriate). + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_SIREN | UART_CTL_SIRLP); +} + +//***************************************************************************** +// +//! Enables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Enables the SMART control bit for ISO 7816 smart card mode on the UART. +//! This call also sets 8 bit word length and even parity as required by ISO +//! 7816. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardEnable(unsigned long ulBase) +{ + unsigned long ulVal; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Set 8 bit word length, even parity, 2 stop bits (even though the STP2 + // bit is ignored when in smartcard mode, this lets the caller read back + // the actual setting in use). + // + ulVal = HWREG(ulBase + UART_O_LCRH); + ulVal &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN | + UART_LCRH_WLEN_M); + ulVal |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | UART_LCRH_STP2; + HWREG(ulBase + UART_O_LCRH) = ulVal; + + // + // Enable SMART mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Disables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SMART (ISO 7816 smart card) bits in the UART control register. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the SMART bit. + // + HWREG(ulBase + UART_O_CTL) &= ~UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Sets the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Sets the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlSet(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp |= (ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Clears the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Clears the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlClear(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp &= ~(ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the states of the DTR and RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the two UART modem control signals, +//! DTR and RTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_OUTPUT_RTS and +//! \b UART_OUTPUT_DTR where the presence of each flag indicates that the +//! associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_CTL) & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); +} + +//***************************************************************************** +// +//! Gets the states of the RI, DCD, DSR and CTS modem status signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the four UART modem status signals, +//! RI, DCD, DSR and CTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_INPUT_RI, \b +//! UART_INPUT_DCD, \b UART_INPUT_CTS and \b UART_INPUT_DSR where the +//! presence of each flag indicates that the associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemStatusGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD | + UART_INPUT_CTS | UART_INPUT_DSR)); +} + +//***************************************************************************** +// +//! Sets the UART hardware flow control mode to be used. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode indicates the flow control modes to be used. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX and \b +//! UART_FLOWCONTROL_RX to enable hardware transmit (CTS) and receive (RTS) +//! flow control or \b UART_FLOWCONTROL_NONE to disable hardware flow control. +//! +//! Sets the required hardware flow control modes. If \e ulMode contains +//! flag \b UART_FLOWCONTROL_TX, data is only transmitted if the incoming CTS +//! signal is asserted. If \e ulMode contains flag \b UART_FLOWCONTROL_RX, +//! the RTS output is controlled by the hardware and is asserted only when +//! there is space available in the receive FIFO. If no hardware flow control +//! is required, UART_FLOWCONTROL_NONE should be passed. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode & ~(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX)) == 0); + + // + // Set the flow control mode as requested. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the UART hardware flow control mode currently in use. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current hardware flow control mode. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns the current flow control mode in use. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX if transmit +//! (CTS) flow control is enabled and \b UART_FLOWCONTROL_RX if receive (RTS) +//! flow control is in use. If hardware flow control is disabled, \b +//! UART_FLOWCONTROL_NONE will be returned. +// +//***************************************************************************** +unsigned long +UARTFlowControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + return(HWREG(ulBase + UART_O_CTL) & (UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)); +} + +//***************************************************************************** +// +//! Sets the operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode is the operating mode for the transmit interrupt. It may be +//! \b UART_TXINT_MODE_EOT to trigger interrupts when the transmitter is idle +//! or \b UART_TXINT_MODE_FIFO to trigger based on the current transmit FIFO +//! level. +//! +//! This function allows the mode of the UART transmit interrupt to be set. By +//! default, the transmit interrupt is asserted when the FIFO level falls past +//! a threshold set via a call to UARTFIFOLevelSet(). Alternatively, if this +//! function is called with \e ulMode set to \b UART_TXINT_MODE_EOT, the +//! transmit interrupt will only be asserted once the transmitter is completely +//! idle - the transmit FIFO is empty and all bits, including any stop bits, +//! have cleared the transmitter. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode == UART_TXINT_MODE_EOT) || + (ulMode == UART_TXINT_MODE_FIFO)); + + // + // Set or clear the EOT bit of the UART control register as appropriate. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the current operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current operating mode for the UART transmit +//! interrupt. The return value will be \b UART_TXINT_MODE_EOT if the +//! transmit interrupt is currently set to be asserted once the transmitter is +//! completely idle - the transmit FIFO is empty and all bits, including any +//! stop bits, have cleared the transmitter. The return value will be \b +//! UART_TXINT_MODE_FIFO if the interrupt is set to be asserted based upon the +//! level of the transmit FIFO. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns \b UART_TXINT_MODE_FIFO or \b UART_TXINT_MODE_EOT. +// +//***************************************************************************** +unsigned long +UARTTxIntModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current transmit interrupt mode. + // + return(HWREG(ulBase + UART_O_CTL) & (UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)); +} + +//***************************************************************************** +// +//! Determines if there are any characters in the receive FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is data +//! available in the receive FIFO. +//! +//! \return Returns \b true if there is data in the receive FIFO or \b false +//! if there is no data in the receive FIFO. +// +//***************************************************************************** +tBoolean +UARTCharsAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of characters. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) ? false : true); +} + +//***************************************************************************** +// +//! Determines if there is any space in the transmit FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is space +//! available in the transmit FIFO. +//! +//! \return Returns \b true if there is space available in the transmit FIFO +//! or \b false if there is no space available in the transmit FIFO. +// +//***************************************************************************** +tBoolean +UARTSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of space. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) ? false : true); +} + +//***************************************************************************** +// +//! Receives a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. +//! +//! This function replaces the original UARTCharNonBlockingGet() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. A \b -1 is returned if there are no characters present in the +//! receive FIFO. The UARTCharsAvail() function should be called before +//! attempting to call this function. +// +//***************************************************************************** +long +UARTCharGetNonBlocking(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there are any characters in the receive FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)) + { + // + // Read and return the next character. + // + return(HWREG(ulBase + UART_O_DR)); + } + else + { + // + // There are no characters, so return a failure. + // + return(-1); + } +} + +//***************************************************************************** +// +//! Waits for a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. If there +//! are no characters available, this function waits until a character is +//! received before returning. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. +// +//***************************************************************************** +long +UARTCharGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until a char is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) + { + } + + // + // Now get the char. + // + return(HWREG(ulBase + UART_O_DR)); +} + +//***************************************************************************** +// +//! Sends a character to the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Writes the character \e ucData to the transmit FIFO for the specified port. +//! This function does not block, so if there is no space available, then a +//! \b false is returned, and the application must retry the function later. +//! +//! This function replaces the original UARTCharNonBlockingPut() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns \b true if the character was successfully placed in the +//! transmit FIFO or \b false if there was no space available in the transmit +//! FIFO. +// +//***************************************************************************** +tBoolean +UARTCharPutNonBlocking(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there is space in the transmit FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF)) + { + // + // Write this character to the transmit FIFO. + // + HWREG(ulBase + UART_O_DR) = ucData; + + // + // Success. + // + return(true); + } + else + { + // + // There is no space in the transmit FIFO, so return a failure. + // + return(false); + } +} + +//***************************************************************************** +// +//! Waits to send a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Sends the character \e ucData to the transmit FIFO for the specified port. +//! If there is no space available in the transmit FIFO, this function waits +//! until there is space available before returning. +//! +//! \return None. +// +//***************************************************************************** +void +UARTCharPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until space is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) + { + } + + // + // Send the char. + // + HWREG(ulBase + UART_O_DR) = ucData; +} + +//***************************************************************************** +// +//! Causes a BREAK to be sent. +//! +//! \param ulBase is the base address of the UART port. +//! \param bBreakState controls the output level. +//! +//! Calling this function with \e bBreakState set to \b true asserts a break +//! condition on the UART. Calling this function with \e bBreakState set to +//! \b false removes the break condition. For proper transmission of a break +//! command, the break must be asserted for at least two complete frames. +//! +//! \return None. +// +//***************************************************************************** +void +UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the break condition as requested. + // + HWREG(ulBase + UART_O_LCRH) = + (bBreakState ? + (HWREG(ulBase + UART_O_LCRH) | UART_LCRH_BRK) : + (HWREG(ulBase + UART_O_LCRH) & ~(UART_LCRH_BRK))); +} + +//***************************************************************************** +// +//! Determines whether the UART transmitter is busy or not. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, the transmit FIFO is +//! empty and all bits of the last transmitted character, including all stop +//! bits, have left the hardware shift register. +//! +//! \return Returns \b true if the UART is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +UARTBusy(unsigned long ulBase) +{ + // + // Check the argument. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine if the UART is busy. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) ? true : false); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param pfnHandler is a pointer to the function to be called when the +//! UART interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; specific UART +//! interrupts must be enabled via UARTIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the UART interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function does the actual unregistering of the interrupt handler. It +//! will clear the handler to be called when a UART interrupt occurs. This +//! will also mask off the interrupt in the interrupt controller so that the +//! interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b UART_INT_OE - Overrun Error interrupt +//! - \b UART_INT_BE - Break Error interrupt +//! - \b UART_INT_PE - Parity Error interrupt +//! - \b UART_INT_FE - Framing Error interrupt +//! - \b UART_INT_RT - Receive Timeout interrupt +//! - \b UART_INT_TX - Transmit interrupt +//! - \b UART_INT_RX - Receive interrupt +//! - \b UART_INT_DSR - DSR interrupt +//! - \b UART_INT_DCD - DCD interrupt +//! - \b UART_INT_CTS - CTS interrupt +//! - \b UART_INT_RI - RI interrupt +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the UART port. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified UART. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in UARTIntEnable(). +// +//***************************************************************************** +unsigned long +UARTIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + UART_O_MIS)); + } + else + { + return(HWREG(ulBase + UART_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified UART interrupt sources are cleared, so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupt from being recognized again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + UART_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Enable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified UART DMA features are enabled. The UART can be +//! configured to use DMA for transmit or receive, and to disable +//! receive if an error occurs. The \e ulDMAFlags parameter is the +//! logical OR of any of the following values: +//! +//! - UART_DMA_RX - enable DMA for receive +//! - UART_DMA_TX - enable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - disable DMA receive on UART error +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable UART DMA features that were enabled +//! by UARTDMAEnable(). The specified UART DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - UART_DMA_RX - disable DMA for receive +//! - UART_DMA_TX - disable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - do not disable DMA receive on UART error +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Gets current receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current state of each of the 4 receiver error +//! sources. The returned errors are equivalent to the four error bits +//! returned via the previous call to UARTCharGet() or UARTCharGetNonBlocking() +//! with the exception that the overrun error is set immediately the overrun +//! occurs rather than when a character is next read. +//! +//! \return Returns a logical OR combination of the receiver error flags, +//! \b UART_RXERROR_FRAMING, \b UART_RXERROR_PARITY, \b UART_RXERROR_BREAK +//! and \b UART_RXERROR_OVERRUN. +// +//***************************************************************************** +unsigned long +UARTRxErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current value of the receive status register. + // + return(HWREG(ulBase + UART_O_RSR) & 0x0000000F); +} + +//***************************************************************************** +// +//! Clears all reported receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function is used to clear all receiver error conditions reported via +//! UARTRxErrorGet(). If using the overrun, framing error, parity error or +//! break interrupts, this function must be called after clearing the interrupt +//! to ensure that later errors of the same type trigger another interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +UARTRxErrorClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Any write to the Error Clear Register will clear all bits which are + // currently set. + // + HWREG(ulBase + UART_O_ECR) = 0; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.h new file mode 100644 index 00000000..2a23fa63 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/driverlib/uartlib.h @@ -0,0 +1,243 @@ +//***************************************************************************** +// +// uart.h - Defines and Macros for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UART_H__ +#define __UART_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to UARTIntEnable, UARTIntDisable, and UARTIntClear +// as the ulIntFlags parameter, and returned from UARTIntStatus. +// +//***************************************************************************** +#define UART_INT_OE 0x400 // Overrun Error Interrupt Mask +#define UART_INT_BE 0x200 // Break Error Interrupt Mask +#define UART_INT_PE 0x100 // Parity Error Interrupt Mask +#define UART_INT_FE 0x080 // Framing Error Interrupt Mask +#define UART_INT_RT 0x040 // Receive Timeout Interrupt Mask +#define UART_INT_TX 0x020 // Transmit Interrupt Mask +#define UART_INT_RX 0x010 // Receive Interrupt Mask +#define UART_INT_DSR 0x008 // DSR Modem Interrupt Mask +#define UART_INT_DCD 0x004 // DCD Modem Interrupt Mask +#define UART_INT_CTS 0x002 // CTS Modem Interrupt Mask +#define UART_INT_RI 0x001 // RI Modem Interrupt Mask + +//***************************************************************************** +// +// Values that can be passed to UARTConfigSetExpClk as the ulConfig parameter +// and returned by UARTConfigGetExpClk in the pulConfig parameter. +// Additionally, the UART_CONFIG_PAR_* subset can be passed to +// UARTParityModeSet as the ulParity parameter, and are returned by +// UARTParityModeGet. +// +//***************************************************************************** +#define UART_CONFIG_WLEN_MASK 0x00000060 // Mask for extracting word length +#define UART_CONFIG_WLEN_8 0x00000060 // 8 bit data +#define UART_CONFIG_WLEN_7 0x00000040 // 7 bit data +#define UART_CONFIG_WLEN_6 0x00000020 // 6 bit data +#define UART_CONFIG_WLEN_5 0x00000000 // 5 bit data +#define UART_CONFIG_STOP_MASK 0x00000008 // Mask for extracting stop bits +#define UART_CONFIG_STOP_ONE 0x00000000 // One stop bit +#define UART_CONFIG_STOP_TWO 0x00000008 // Two stop bits +#define UART_CONFIG_PAR_MASK 0x00000086 // Mask for extracting parity +#define UART_CONFIG_PAR_NONE 0x00000000 // No parity +#define UART_CONFIG_PAR_EVEN 0x00000006 // Even parity +#define UART_CONFIG_PAR_ODD 0x00000002 // Odd parity +#define UART_CONFIG_PAR_ONE 0x00000082 // Parity bit is one +#define UART_CONFIG_PAR_ZERO 0x00000086 // Parity bit is zero + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulTxLevel parameter and +// returned by UARTFIFOLevelGet in the pulTxLevel. +// +//***************************************************************************** +#define UART_FIFO_TX1_8 0x00000000 // Transmit interrupt at 1/8 Full +#define UART_FIFO_TX2_8 0x00000001 // Transmit interrupt at 1/4 Full +#define UART_FIFO_TX4_8 0x00000002 // Transmit interrupt at 1/2 Full +#define UART_FIFO_TX6_8 0x00000003 // Transmit interrupt at 3/4 Full +#define UART_FIFO_TX7_8 0x00000004 // Transmit interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulRxLevel parameter and +// returned by UARTFIFOLevelGet in the pulRxLevel. +// +//***************************************************************************** +#define UART_FIFO_RX1_8 0x00000000 // Receive interrupt at 1/8 Full +#define UART_FIFO_RX2_8 0x00000008 // Receive interrupt at 1/4 Full +#define UART_FIFO_RX4_8 0x00000010 // Receive interrupt at 1/2 Full +#define UART_FIFO_RX6_8 0x00000018 // Receive interrupt at 3/4 Full +#define UART_FIFO_RX7_8 0x00000020 // Receive interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTDMAEnable() and UARTDMADisable(). +// +//***************************************************************************** +#define UART_DMA_ERR_RXSTOP 0x00000004 // Stop DMA receive if UART error +#define UART_DMA_TX 0x00000002 // Enable DMA for transmit +#define UART_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Values returned from UARTRxErrorGet(). +// +//***************************************************************************** +#define UART_RXERROR_OVERRUN 0x00000008 +#define UART_RXERROR_BREAK 0x00000004 +#define UART_RXERROR_PARITY 0x00000002 +#define UART_RXERROR_FRAMING 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTHandshakeOutputsSet() or returned from +// UARTHandshakeOutputGet(). +// +//***************************************************************************** +#define UART_OUTPUT_RTS 0x00000800 +#define UART_OUTPUT_DTR 0x00000400 + +//***************************************************************************** +// +// Values that can be returned from UARTHandshakeInputsGet(). +// +//***************************************************************************** +#define UART_INPUT_RI 0x00000100 +#define UART_INPUT_DCD 0x00000004 +#define UART_INPUT_DSR 0x00000002 +#define UART_INPUT_CTS 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTFlowControl() or returned from +// UARTFlowControlGet(). +// +//***************************************************************************** +#define UART_FLOWCONTROL_TX 0x00008000 +#define UART_FLOWCONTROL_RX 0x00004000 +#define UART_FLOWCONTROL_NONE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to UARTTxIntModeSet() or returned from +// UARTTxIntModeGet(). +// +//***************************************************************************** +#define UART_TXINT_MODE_FIFO 0x00000000 +#define UART_TXINT_MODE_EOT 0x00000010 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void UARTParityModeSet(unsigned long ulBase, unsigned long ulParity); +extern unsigned long UARTParityModeGet(unsigned long ulBase); +extern void UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel); +extern void UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel); +extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig); +extern void UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, + unsigned long *pulConfig); +extern void UARTEnable(unsigned long ulBase); +extern void UARTDisable(unsigned long ulBase); +extern void UARTFIFOEnable(unsigned long ulBase); +extern void UARTFIFODisable(unsigned long ulBase); +extern void UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower); +extern void UARTDisableSIR(unsigned long ulBase); +extern tBoolean UARTCharsAvail(unsigned long ulBase); +extern tBoolean UARTSpaceAvail(unsigned long ulBase); +extern long UARTCharGetNonBlocking(unsigned long ulBase); +extern long UARTCharGet(unsigned long ulBase); +extern tBoolean UARTCharPutNonBlocking(unsigned long ulBase, + unsigned char ucData); +extern void UARTCharPut(unsigned long ulBase, unsigned char ucData); +extern void UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState); +extern tBoolean UARTBusy(unsigned long ulBase); +extern void UARTIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void UARTIntUnregister(unsigned long ulBase); +extern void UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long UARTIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern unsigned long UARTRxErrorGet(unsigned long ulBase); +extern void UARTRxErrorClear(unsigned long ulBase); +extern void UARTSmartCardEnable(unsigned long ulBase); +extern void UARTSmartCardDisable(unsigned long ulBase); +extern void UARTModemControlSet(unsigned long ulBase, + unsigned long ulControl); +extern void UARTModemControlClear(unsigned long ulBase, + unsigned long ulControl); +extern unsigned long UARTModemControlGet(unsigned long ulBase); +extern unsigned long UARTModemStatusGet(unsigned long ulBase); +extern void UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTFlowControlGet(unsigned long ulBase); +extern void UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTTxIntModeGet(unsigned long ulBase); + +//***************************************************************************** +// +// Several UART APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define UARTConfigSet(a, b, c) \ + UARTConfigSetExpClk(a, SysCtlClockGet(), b, c) +#define UARTConfigGet(a, b, c) \ + UARTConfigGetExpClk(a, SysCtlClockGet(), b, c) +#define UARTCharNonBlockingGet(a) \ + UARTCharGetNonBlocking(a) +#define UARTCharNonBlockingPut(a, b) \ + UARTCharPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_can.h new file mode 100644 index 00000000..f8ee925c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_can.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_can.h - Defines and macros used when accessing the CAN controllers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_CAN_H__ +#define __HW_CAN_H__ + +//***************************************************************************** +// +// The following are defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_CTL 0x00000000 // CAN Control +#define CAN_O_STS 0x00000004 // CAN Status +#define CAN_O_ERR 0x00000008 // CAN Error Counter +#define CAN_O_BIT 0x0000000C // CAN Bit Timing +#define CAN_O_INT 0x00000010 // CAN Interrupt +#define CAN_O_TST 0x00000014 // CAN Test +#define CAN_O_BRPE 0x00000018 // CAN Baud Rate Prescaler + // Extension +#define CAN_O_IF1CRQ 0x00000020 // CAN IF1 Command Request +#define CAN_O_IF1CMSK 0x00000024 // CAN IF1 Command Mask +#define CAN_O_IF1MSK1 0x00000028 // CAN IF1 Mask 1 +#define CAN_O_IF1MSK2 0x0000002C // CAN IF1 Mask 2 +#define CAN_O_IF1ARB1 0x00000030 // CAN IF1 Arbitration 1 +#define CAN_O_IF1ARB2 0x00000034 // CAN IF1 Arbitration 2 +#define CAN_O_IF1MCTL 0x00000038 // CAN IF1 Message Control +#define CAN_O_IF1DA1 0x0000003C // CAN IF1 Data A1 +#define CAN_O_IF1DA2 0x00000040 // CAN IF1 Data A2 +#define CAN_O_IF1DB1 0x00000044 // CAN IF1 Data B1 +#define CAN_O_IF1DB2 0x00000048 // CAN IF1 Data B2 +#define CAN_O_IF2CRQ 0x00000080 // CAN IF2 Command Request +#define CAN_O_IF2CMSK 0x00000084 // CAN IF2 Command Mask +#define CAN_O_IF2MSK1 0x00000088 // CAN IF2 Mask 1 +#define CAN_O_IF2MSK2 0x0000008C // CAN IF2 Mask 2 +#define CAN_O_IF2ARB1 0x00000090 // CAN IF2 Arbitration 1 +#define CAN_O_IF2ARB2 0x00000094 // CAN IF2 Arbitration 2 +#define CAN_O_IF2MCTL 0x00000098 // CAN IF2 Message Control +#define CAN_O_IF2DA1 0x0000009C // CAN IF2 Data A1 +#define CAN_O_IF2DA2 0x000000A0 // CAN IF2 Data A2 +#define CAN_O_IF2DB1 0x000000A4 // CAN IF2 Data B1 +#define CAN_O_IF2DB2 0x000000A8 // CAN IF2 Data B2 +#define CAN_O_TXRQ1 0x00000100 // CAN Transmission Request 1 +#define CAN_O_TXRQ2 0x00000104 // CAN Transmission Request 2 +#define CAN_O_NWDA1 0x00000120 // CAN New Data 1 +#define CAN_O_NWDA2 0x00000124 // CAN New Data 2 +#define CAN_O_MSG1INT 0x00000140 // CAN Message 1 Interrupt Pending +#define CAN_O_MSG2INT 0x00000144 // CAN Message 2 Interrupt Pending +#define CAN_O_MSG1VAL 0x00000160 // CAN Message 1 Valid +#define CAN_O_MSG2VAL 0x00000164 // CAN Message 2 Valid + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_CTL register. +// +//***************************************************************************** +#define CAN_CTL_TEST 0x00000080 // Test Mode Enable +#define CAN_CTL_CCE 0x00000040 // Configuration Change Enable +#define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission +#define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable +#define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable +#define CAN_CTL_IE 0x00000002 // CAN Interrupt Enable +#define CAN_CTL_INIT 0x00000001 // Initialization + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_STS register. +// +//***************************************************************************** +#define CAN_STS_BOFF 0x00000080 // Bus-Off Status +#define CAN_STS_EWARN 0x00000040 // Warning Status +#define CAN_STS_EPASS 0x00000020 // Error Passive +#define CAN_STS_RXOK 0x00000010 // Received a Message Successfully +#define CAN_STS_TXOK 0x00000008 // Transmitted a Message + // Successfully +#define CAN_STS_LEC_M 0x00000007 // Last Error Code +#define CAN_STS_LEC_NONE 0x00000000 // No Error +#define CAN_STS_LEC_STUFF 0x00000001 // Stuff Error +#define CAN_STS_LEC_FORM 0x00000002 // Format Error +#define CAN_STS_LEC_ACK 0x00000003 // ACK Error +#define CAN_STS_LEC_BIT1 0x00000004 // Bit 1 Error +#define CAN_STS_LEC_BIT0 0x00000005 // Bit 0 Error +#define CAN_STS_LEC_CRC 0x00000006 // CRC Error +#define CAN_STS_LEC_NOEVENT 0x00000007 // No Event + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_ERR register. +// +//***************************************************************************** +#define CAN_ERR_RP 0x00008000 // Received Error Passive +#define CAN_ERR_REC_M 0x00007F00 // Receive Error Counter +#define CAN_ERR_TEC_M 0x000000FF // Transmit Error Counter +#define CAN_ERR_REC_S 8 +#define CAN_ERR_TEC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BIT register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2_M 0x00007000 // Time Segment after Sample Point +#define CAN_BIT_TSEG1_M 0x00000F00 // Time Segment Before Sample Point +#define CAN_BIT_SJW_M 0x000000C0 // (Re)Synchronization Jump Width +#define CAN_BIT_BRP_M 0x0000003F // Baud Rate Prescaler +#define CAN_BIT_TSEG2_S 12 +#define CAN_BIT_TSEG1_S 8 +#define CAN_BIT_SJW_S 6 +#define CAN_BIT_BRP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_INT register. +// +//***************************************************************************** +#define CAN_INT_INTID_M 0x0000FFFF // Interrupt Identifier +#define CAN_INT_INTID_NONE 0x00000000 // No interrupt pending +#define CAN_INT_INTID_STATUS 0x00008000 // Status Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TST register. +// +//***************************************************************************** +#define CAN_TST_RX 0x00000080 // Receive Observation +#define CAN_TST_TX_M 0x00000060 // Transmit Control +#define CAN_TST_TX_CANCTL 0x00000000 // CAN Module Control +#define CAN_TST_TX_SAMPLE 0x00000020 // Sample Point +#define CAN_TST_TX_DOMINANT 0x00000040 // Driven Low +#define CAN_TST_TX_RECESSIVE 0x00000060 // Driven High +#define CAN_TST_LBACK 0x00000010 // Loopback Mode +#define CAN_TST_SILENT 0x00000008 // Silent Mode +#define CAN_TST_BASIC 0x00000004 // Basic Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BRPE register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE_M 0x0000000F // Baud Rate Prescaler Extension +#define CAN_BRPE_BRPE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CRQ register. +// +//***************************************************************************** +#define CAN_IF1CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF1CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF1CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF1CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CMSK register. +// +//***************************************************************************** +#define CAN_IF1CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF1CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF1CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF1CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF1CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF1CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF1CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF1CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF1CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK1 register. +// +//***************************************************************************** +#define CAN_IF1MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF1MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK2 register. +// +//***************************************************************************** +#define CAN_IF1MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF1MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF1MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF1MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB1 register. +// +//***************************************************************************** +#define CAN_IF1ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF1ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB2 register. +// +//***************************************************************************** +#define CAN_IF1ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF1ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF1ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF1ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF1ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MCTL register. +// +//***************************************************************************** +#define CAN_IF1MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF1MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF1MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF1MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF1MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF1MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF1MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF1MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF1MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF1MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF1MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA1 register. +// +//***************************************************************************** +#define CAN_IF1DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA2 register. +// +//***************************************************************************** +#define CAN_IF1DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB1 register. +// +//***************************************************************************** +#define CAN_IF1DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB2 register. +// +//***************************************************************************** +#define CAN_IF1DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CRQ register. +// +//***************************************************************************** +#define CAN_IF2CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF2CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF2CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF2CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CMSK register. +// +//***************************************************************************** +#define CAN_IF2CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF2CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF2CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF2CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF2CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF2CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF2CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF2CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF2CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK1 register. +// +//***************************************************************************** +#define CAN_IF2MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF2MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK2 register. +// +//***************************************************************************** +#define CAN_IF2MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF2MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF2MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF2MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB1 register. +// +//***************************************************************************** +#define CAN_IF2ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF2ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB2 register. +// +//***************************************************************************** +#define CAN_IF2ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF2ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF2ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF2ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF2ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MCTL register. +// +//***************************************************************************** +#define CAN_IF2MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF2MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF2MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF2MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF2MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF2MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF2MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF2MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF2MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF2MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF2MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA1 register. +// +//***************************************************************************** +#define CAN_IF2DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA2 register. +// +//***************************************************************************** +#define CAN_IF2DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB1 register. +// +//***************************************************************************** +#define CAN_IF2DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB2 register. +// +//***************************************************************************** +#define CAN_IF2DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ1 register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ1_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ2 register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ2_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA1 register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA1_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA2 register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA2_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1INT register. +// +//***************************************************************************** +#define CAN_MSG1INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG1INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2INT register. +// +//***************************************************************************** +#define CAN_MSG2INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG2INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1VAL register. +// +//***************************************************************************** +#define CAN_MSG1VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG1VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2VAL register. +// +//***************************************************************************** +#define CAN_MSG2VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG2VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_MSGINT1 0x00000140 // Intr. Pending in Msg Obj 1 reg +#define CAN_O_MSGINT2 0x00000144 // Intr. Pending in Msg Obj 2 reg +#define CAN_O_MSGVAL1 0x00000160 // Message Valid in Msg Obj 1 reg +#define CAN_O_MSGVAL2 0x00000164 // Message Valid in Msg Obj 2 reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_STS +// register. +// +//***************************************************************************** +#define CAN_STS_LEC_MSK 0x00000007 // Last Error Code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_ERR +// register. +// +//***************************************************************************** +#define CAN_ERR_REC_MASK 0x00007F00 // Receive error counter status +#define CAN_ERR_TEC_MASK 0x000000FF // Transmit error counter status +#define CAN_ERR_REC_SHIFT 8 // Receive error counter bit pos +#define CAN_ERR_TEC_SHIFT 0 // Transmit error counter bit pos + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BIT +// register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2 0x00007000 // Time segment after sample point +#define CAN_BIT_TSEG1 0x00000F00 // Time segment before sample point +#define CAN_BIT_SJW 0x000000C0 // (Re)Synchronization jump width +#define CAN_BIT_BRP 0x0000003F // Baud rate prescaler + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_INT +// register. +// +//***************************************************************************** +#define CAN_INT_INTID_MSK 0x0000FFFF // Interrupt Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TST +// register. +// +//***************************************************************************** +#define CAN_TST_TX_MSK 0x00000060 // Overide control of CAN_TX pin + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BRPE +// register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE 0x0000000F // Baud rate prescaler extension + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ1 +// register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ2 +// register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA1 +// register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA2 +// register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT1 +// register. +// +//***************************************************************************** +#define CAN_MSGINT1_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT2 +// register. +// +//***************************************************************************** +#define CAN_MSGINT2_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL1 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL1_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL2 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL2_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the can +// registers. +// +//***************************************************************************** +#define CAN_RV_IF1MSK2 0x0000FFFF +#define CAN_RV_IF1MSK1 0x0000FFFF +#define CAN_RV_IF2MSK1 0x0000FFFF +#define CAN_RV_IF2MSK2 0x0000FFFF +#define CAN_RV_BIT 0x00002301 +#define CAN_RV_CTL 0x00000001 +#define CAN_RV_IF1CRQ 0x00000001 +#define CAN_RV_IF2CRQ 0x00000001 +#define CAN_RV_TXRQ2 0x00000000 +#define CAN_RV_IF2DB1 0x00000000 +#define CAN_RV_INT 0x00000000 +#define CAN_RV_IF1DB2 0x00000000 +#define CAN_RV_BRPE 0x00000000 +#define CAN_RV_IF2DA2 0x00000000 +#define CAN_RV_MSGVAL2 0x00000000 +#define CAN_RV_TXRQ1 0x00000000 +#define CAN_RV_IF1MCTL 0x00000000 +#define CAN_RV_IF1DB1 0x00000000 +#define CAN_RV_STS 0x00000000 +#define CAN_RV_MSGINT1 0x00000000 +#define CAN_RV_IF1DA2 0x00000000 +#define CAN_RV_TST 0x00000000 +#define CAN_RV_IF1ARB1 0x00000000 +#define CAN_RV_IF1ARB2 0x00000000 +#define CAN_RV_NWDA2 0x00000000 +#define CAN_RV_IF2CMSK 0x00000000 +#define CAN_RV_NWDA1 0x00000000 +#define CAN_RV_IF1DA1 0x00000000 +#define CAN_RV_IF2DA1 0x00000000 +#define CAN_RV_IF2MCTL 0x00000000 +#define CAN_RV_MSGVAL1 0x00000000 +#define CAN_RV_IF1CMSK 0x00000000 +#define CAN_RV_ERR 0x00000000 +#define CAN_RV_IF2ARB2 0x00000000 +#define CAN_RV_MSGINT2 0x00000000 +#define CAN_RV_IF2ARB1 0x00000000 +#define CAN_RV_IF2DB2 0x00000000 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CRQ +// and CAN_IF1CRQ registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCRQ_BUSY 0x00008000 // Busy flag status +#define CAN_IFCRQ_MNUM_MSK 0x0000003F // Message Number + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CMSK +// and CAN_IF2CMSK registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCMSK_WRNRD 0x00000080 // Write, not Read +#define CAN_IFCMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IFCMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IFCMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IFCMSK_CLRINTPND 0x00000008 // Clear interrupt pending Bit +#define CAN_IFCMSK_TXRQST 0x00000004 // Access Tx request bit (WRNRD=1) +#define CAN_IFCMSK_NEWDAT 0x00000004 // Access New Data bit (WRNRD=0) +#define CAN_IFCMSK_DATAA 0x00000002 // DataA access - bytes 0 to 3 +#define CAN_IFCMSK_DATAB 0x00000001 // DataB access - bytes 4 to 7 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK1 +// and CAN_IF2MSK1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK1_MSK 0x0000FFFF // Identifier Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK2 +// and CAN_IF2MSK2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK2_MXTD 0x00008000 // Mask extended identifier +#define CAN_IFMSK2_MDIR 0x00004000 // Mask message direction +#define CAN_IFMSK2_MSK 0x00001FFF // Mask identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB1 +// and CAN_IF2ARB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB1_ID 0x0000FFFF // Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB2 +// and CAN_IF2ARB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB2_MSGVAL 0x00008000 // Message valid +#define CAN_IFARB2_XTD 0x00004000 // Extended identifier +#define CAN_IFARB2_DIR 0x00002000 // Message direction +#define CAN_IFARB2_ID 0x00001FFF // Message identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MCTL +// and CAN_IF2MCTL registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMCTL_NEWDAT 0x00008000 // New Data +#define CAN_IFMCTL_MSGLST 0x00004000 // Message lost +#define CAN_IFMCTL_INTPND 0x00002000 // Interrupt pending +#define CAN_IFMCTL_UMASK 0x00001000 // Use acceptance mask +#define CAN_IFMCTL_TXIE 0x00000800 // Transmit interrupt enable +#define CAN_IFMCTL_RXIE 0x00000400 // Receive interrupt enable +#define CAN_IFMCTL_RMTEN 0x00000200 // Remote enable +#define CAN_IFMCTL_TXRQST 0x00000100 // Transmit request +#define CAN_IFMCTL_EOB 0x00000080 // End of buffer +#define CAN_IFMCTL_DLC 0x0000000F // Data length code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA1 +// and CAN_IF2DA1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA1_DATA 0x0000FFFF // Data - bytes 1 and 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA2 +// and CAN_IF2DA2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA2_DATA 0x0000FFFF // Data - bytes 3 and 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB1 +// and CAN_IF2DB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB1_DATA 0x0000FFFF // Data - bytes 5 and 4 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB2 +// and CAN_IF2DB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB2_DATA 0x0000FFFF // Data - bytes 7 and 6 + +#endif + +#endif // __HW_CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_flash.h new file mode 100644 index 00000000..13a013e5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_flash.h @@ -0,0 +1,381 @@ +//***************************************************************************** +// +// hw_flash.h - Macros used when accessing the flash controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_FLASH_H__ +#define __HW_FLASH_H__ + +//***************************************************************************** +// +// The following are defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_FMA 0x400FD000 // Flash Memory Address +#define FLASH_FMD 0x400FD004 // Flash Memory Data +#define FLASH_FMC 0x400FD008 // Flash Memory Control +#define FLASH_FCRIS 0x400FD00C // Flash Controller Raw Interrupt + // Status +#define FLASH_FCIM 0x400FD010 // Flash Controller Interrupt Mask +#define FLASH_FCMISC 0x400FD014 // Flash Controller Masked + // Interrupt Status and Clear +#define FLASH_FMC2 0x400FD020 // Flash Memory Control 2 +#define FLASH_FWBVAL 0x400FD030 // Flash Write Buffer Valid +#define FLASH_FCTL 0x400FD0F8 // Flash Control +#define FLASH_FWBN 0x400FD100 // Flash Write Buffer n +#define FLASH_RMCTL 0x400FE0F0 // ROM Control +#define FLASH_FMPRE 0x400FE130 // Flash Memory Protection Read + // Enable +#define FLASH_FMPPE 0x400FE134 // Flash Memory Protection Program + // Enable +#define FLASH_USECRL 0x400FE140 // USec Reload +#define FLASH_USERDBG 0x400FE1D0 // User Debug +#define FLASH_BOOTCFG 0x400FE1D0 // Boot Configuration +#define FLASH_USERREG0 0x400FE1E0 // User Register 0 +#define FLASH_USERREG1 0x400FE1E4 // User Register 1 +#define FLASH_USERREG2 0x400FE1E8 // User Register 2 +#define FLASH_USERREG3 0x400FE1EC // User Register 3 +#define FLASH_FMPRE0 0x400FE200 // Flash Memory Protection Read + // Enable 0 +#define FLASH_FMPRE1 0x400FE204 // Flash Memory Protection Read + // Enable 1 +#define FLASH_FMPRE2 0x400FE208 // Flash Memory Protection Read + // Enable 2 +#define FLASH_FMPRE3 0x400FE20C // Flash Memory Protection Read + // Enable 3 +#define FLASH_FMPPE0 0x400FE400 // Flash Memory Protection Program + // Enable 0 +#define FLASH_FMPPE1 0x400FE404 // Flash Memory Protection Program + // Enable 1 +#define FLASH_FMPPE2 0x400FE408 // Flash Memory Protection Program + // Enable 2 +#define FLASH_FMPPE3 0x400FE40C // Flash Memory Protection Program + // Enable 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC2 register. +// +//***************************************************************************** +#define FLASH_FMC2_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC2_WRBUF 0x00000001 // Buffered Flash Memory Write + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBVAL register. +// +//***************************************************************************** +#define FLASH_FWBVAL_FWB_M 0xFFFFFFFF // Flash Memory Write Buffer + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCTL register. +// +//***************************************************************************** +#define FLASH_FCTL_USDACK 0x00000002 // User Shut Down Acknowledge +#define FLASH_FCTL_USDREQ 0x00000001 // User Shut Down Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBN register. +// +//***************************************************************************** +#define FLASH_FWBN_DATA_M 0xFFFFFFFF // Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_RMCTL register. +// +//***************************************************************************** +#define FLASH_RMCTL_BA 0x00000001 // Boot Alias + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_BOOTCFG register. +// +//***************************************************************************** +#define FLASH_BOOTCFG_NW 0x80000000 // Not Written +#define FLASH_BOOTCFG_PORT_M 0x0000E000 // Boot GPIO Port +#define FLASH_BOOTCFG_PORT_A 0x00000000 // Port A +#define FLASH_BOOTCFG_PORT_B 0x00002000 // Port B +#define FLASH_BOOTCFG_PORT_C 0x00004000 // Port C +#define FLASH_BOOTCFG_PORT_D 0x00006000 // Port D +#define FLASH_BOOTCFG_PORT_E 0x00008000 // Port E +#define FLASH_BOOTCFG_PORT_F 0x0000A000 // Port F +#define FLASH_BOOTCFG_PORT_G 0x0000C000 // Port G +#define FLASH_BOOTCFG_PORT_H 0x0000E000 // Port H +#define FLASH_BOOTCFG_PIN_M 0x00001C00 // Boot GPIO Pin +#define FLASH_BOOTCFG_PIN_0 0x00000000 // Pin 0 +#define FLASH_BOOTCFG_PIN_1 0x00000400 // Pin 1 +#define FLASH_BOOTCFG_PIN_2 0x00000800 // Pin 2 +#define FLASH_BOOTCFG_PIN_3 0x00000C00 // Pin 3 +#define FLASH_BOOTCFG_PIN_4 0x00001000 // Pin 4 +#define FLASH_BOOTCFG_PIN_5 0x00001400 // Pin 5 +#define FLASH_BOOTCFG_PIN_6 0x00001800 // Pin 6 +#define FLASH_BOOTCFG_PIN_7 0x00001C00 // Pin 7 +#define FLASH_BOOTCFG_POL 0x00000200 // Boot GPIO Polarity +#define FLASH_BOOTCFG_EN 0x00000100 // Boot GPIO Enable +#define FLASH_BOOTCFG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_BOOTCFG_DBG0 0x00000001 // Debug Control 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG2 register. +// +//***************************************************************************** +#define FLASH_USERREG2_NW 0x80000000 // Not Written +#define FLASH_USERREG2_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG3 register. +// +//***************************************************************************** +#define FLASH_USERREG3_NW 0x80000000 // Not Written +#define FLASH_USERREG3_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMPRE and +// FLASH_FMPPE registers. +// +//***************************************************************************** +#define FLASH_FMP_BLOCK_31 0x80000000 // Enable for block 31 +#define FLASH_FMP_BLOCK_30 0x40000000 // Enable for block 30 +#define FLASH_FMP_BLOCK_29 0x20000000 // Enable for block 29 +#define FLASH_FMP_BLOCK_28 0x10000000 // Enable for block 28 +#define FLASH_FMP_BLOCK_27 0x08000000 // Enable for block 27 +#define FLASH_FMP_BLOCK_26 0x04000000 // Enable for block 26 +#define FLASH_FMP_BLOCK_25 0x02000000 // Enable for block 25 +#define FLASH_FMP_BLOCK_24 0x01000000 // Enable for block 24 +#define FLASH_FMP_BLOCK_23 0x00800000 // Enable for block 23 +#define FLASH_FMP_BLOCK_22 0x00400000 // Enable for block 22 +#define FLASH_FMP_BLOCK_21 0x00200000 // Enable for block 21 +#define FLASH_FMP_BLOCK_20 0x00100000 // Enable for block 20 +#define FLASH_FMP_BLOCK_19 0x00080000 // Enable for block 19 +#define FLASH_FMP_BLOCK_18 0x00040000 // Enable for block 18 +#define FLASH_FMP_BLOCK_17 0x00020000 // Enable for block 17 +#define FLASH_FMP_BLOCK_16 0x00010000 // Enable for block 16 +#define FLASH_FMP_BLOCK_15 0x00008000 // Enable for block 15 +#define FLASH_FMP_BLOCK_14 0x00004000 // Enable for block 14 +#define FLASH_FMP_BLOCK_13 0x00002000 // Enable for block 13 +#define FLASH_FMP_BLOCK_12 0x00001000 // Enable for block 12 +#define FLASH_FMP_BLOCK_11 0x00000800 // Enable for block 11 +#define FLASH_FMP_BLOCK_10 0x00000400 // Enable for block 10 +#define FLASH_FMP_BLOCK_9 0x00000200 // Enable for block 9 +#define FLASH_FMP_BLOCK_8 0x00000100 // Enable for block 8 +#define FLASH_FMP_BLOCK_7 0x00000080 // Enable for block 7 +#define FLASH_FMP_BLOCK_6 0x00000040 // Enable for block 6 +#define FLASH_FMP_BLOCK_5 0x00000020 // Enable for block 5 +#define FLASH_FMP_BLOCK_4 0x00000010 // Enable for block 4 +#define FLASH_FMP_BLOCK_3 0x00000008 // Enable for block 3 +#define FLASH_FMP_BLOCK_2 0x00000004 // Enable for block 2 +#define FLASH_FMP_BLOCK_1 0x00000002 // Enable for block 1 +#define FLASH_FMP_BLOCK_0 0x00000001 // Enable for block 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_RMVER 0x400FE0F4 // ROM Version Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FMC +// register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_MASK 0xFFFF0000 // FLASH write key mask +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCRIS +// register. +// +//***************************************************************************** +#define FLASH_FCRIS_PROGRAM 0x00000002 // Programming status +#define FLASH_FCRIS_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCIM +// register. +// +//***************************************************************************** +#define FLASH_FCIM_PROGRAM 0x00000002 // Programming mask +#define FLASH_FCIM_ACCESS 0x00000001 // Invalid access mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCMISC +// register. +// +//***************************************************************************** +#define FLASH_FCMISC_PROGRAM 0x00000002 // Programming status +#define FLASH_FCMISC_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_RMVER +// register. +// +//***************************************************************************** +#define FLASH_RMVER_CONT_M 0xFF000000 // ROM Contents +#define FLASH_RMVER_CONT_LM 0x00000000 // Stellaris Boot Loader & + // DriverLib +#define FLASH_RMVER_CONT_LM_AES 0x02000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_CONT_LM_AES_SAFERTOS \ + 0x03000000 // Stellaris Boot Loader & + // DriverLib with AES and SAFERTOS +#define FLASH_RMVER_CONT_LM_AES2 \ + 0x05000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_VER_M 0x0000FF00 // ROM Version +#define FLASH_RMVER_REV_M 0x000000FF // ROM Revision +#define FLASH_RMVER_VER_S 8 +#define FLASH_RMVER_REV_S 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_USECRL +// register. +// +//***************************************************************************** +#define FLASH_USECRL_MASK 0x000000FF // Clock per uSec +#define FLASH_USECRL_SHIFT 0 + +#endif + +#endif // __HW_FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_gpio.h new file mode 100644 index 00000000..acdb2984 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_gpio.h @@ -0,0 +1,592 @@ +//***************************************************************************** +// +// hw_gpio.h - Defines and Macros for GPIO hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_GPIO_H__ +#define __HW_GPIO_H__ + +//***************************************************************************** +// +// The following are defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_DATA 0x00000000 // GPIO Data +#define GPIO_O_DIR 0x00000400 // GPIO Direction +#define GPIO_O_IS 0x00000404 // GPIO Interrupt Sense +#define GPIO_O_IBE 0x00000408 // GPIO Interrupt Both Edges +#define GPIO_O_IEV 0x0000040C // GPIO Interrupt Event +#define GPIO_O_IM 0x00000410 // GPIO Interrupt Mask +#define GPIO_O_RIS 0x00000414 // GPIO Raw Interrupt Status +#define GPIO_O_MIS 0x00000418 // GPIO Masked Interrupt Status +#define GPIO_O_ICR 0x0000041C // GPIO Interrupt Clear +#define GPIO_O_AFSEL 0x00000420 // GPIO Alternate Function Select +#define GPIO_O_DR2R 0x00000500 // GPIO 2-mA Drive Select +#define GPIO_O_DR4R 0x00000504 // GPIO 4-mA Drive Select +#define GPIO_O_DR8R 0x00000508 // GPIO 8-mA Drive Select +#define GPIO_O_ODR 0x0000050C // GPIO Open Drain Select +#define GPIO_O_PUR 0x00000510 // GPIO Pull-Up Select +#define GPIO_O_PDR 0x00000514 // GPIO Pull-Down Select +#define GPIO_O_SLR 0x00000518 // GPIO Slew Rate Control Select +#define GPIO_O_DEN 0x0000051C // GPIO Digital Enable +#define GPIO_O_LOCK 0x00000520 // GPIO Lock +#define GPIO_O_CR 0x00000524 // GPIO Commit +#define GPIO_O_AMSEL 0x00000528 // GPIO Analog Mode Select +#define GPIO_O_PCTL 0x0000052C // GPIO Port Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register +#define GPIO_LOCK_KEY_DD 0x4C4F434B // Unlocks the GPIO_CR register on + // DustDevil-class devices and + // later + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port A. +// +//***************************************************************************** +#define GPIO_PCTL_PA0_M 0x0000000F // PA0 mask +#define GPIO_PCTL_PA0_U0RX 0x00000001 // U0RX on PA0 +#define GPIO_PCTL_PA0_I2C1SCL 0x00000008 // I2C1SCL on PA0 +#define GPIO_PCTL_PA0_U1RX 0x00000009 // U1RX on PA0 +#define GPIO_PCTL_PA1_M 0x000000F0 // PA1 mask +#define GPIO_PCTL_PA1_U0TX 0x00000010 // U0TX on PA1 +#define GPIO_PCTL_PA1_I2C1SDA 0x00000080 // I2C1SDA on PA1 +#define GPIO_PCTL_PA1_U1TX 0x00000090 // U1TX on PA1 +#define GPIO_PCTL_PA2_M 0x00000F00 // PA2 mask +#define GPIO_PCTL_PA2_SSI0CLK 0x00000100 // SSI0CLK on PA2 +#define GPIO_PCTL_PA2_PWM4 0x00000400 // PWM4 on PA2 +#define GPIO_PCTL_PA2_I2S0RXSD 0x00000900 // I2S0RXSD on PA2 +#define GPIO_PCTL_PA3_M 0x0000F000 // PA3 mask +#define GPIO_PCTL_PA3_SSI0FSS 0x00001000 // SSI0FSS on PA3 +#define GPIO_PCTL_PA3_PWM5 0x00004000 // PWM5 on PA3 +#define GPIO_PCTL_PA3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PA3 +#define GPIO_PCTL_PA4_M 0x000F0000 // PA4 mask +#define GPIO_PCTL_PA4_SSI0RX 0x00010000 // SSI0RX on PA4 +#define GPIO_PCTL_PA4_PWM6 0x00040000 // PWM6 on PA4 +#define GPIO_PCTL_PA4_CAN0RX 0x00050000 // CAN0RX on PA4 +#define GPIO_PCTL_PA4_I2S0TXSCK 0x00090000 // I2S0TXSCK on PA4 +#define GPIO_PCTL_PA5_M 0x00F00000 // PA5 mask +#define GPIO_PCTL_PA5_SSI0TX 0x00100000 // SSI0TX on PA5 +#define GPIO_PCTL_PA5_PWM7 0x00400000 // PWM7 on PA5 +#define GPIO_PCTL_PA5_CAN0TX 0x00500000 // CAN0TX on PA5 +#define GPIO_PCTL_PA5_I2S0TXWS 0x00900000 // I2S0TXWS on PA5 +#define GPIO_PCTL_PA6_M 0x0F000000 // PA6 mask +#define GPIO_PCTL_PA6_I2C1SCL 0x01000000 // I2C1SCL on PA6 +#define GPIO_PCTL_PA6_CCP1 0x02000000 // CCP1 on PA6 +#define GPIO_PCTL_PA6_PWM0 0x04000000 // PWM0 on PA6 +#define GPIO_PCTL_PA6_PWM4 0x05000000 // PWM4 on PA6 +#define GPIO_PCTL_PA6_CAN0RX 0x06000000 // CAN0RX on PA6 +#define GPIO_PCTL_PA6_USB0EPEN 0x08000000 // USB0EPEN on PA6 +#define GPIO_PCTL_PA6_U1CTS 0x09000000 // U1CTS on PA6 +#define GPIO_PCTL_PA7_M 0xF0000000 // PA7 mask +#define GPIO_PCTL_PA7_I2C1SDA 0x10000000 // I2C1SDA on PA7 +#define GPIO_PCTL_PA7_CCP4 0x20000000 // CCP4 on PA7 +#define GPIO_PCTL_PA7_PWM1 0x40000000 // PWM1 on PA7 +#define GPIO_PCTL_PA7_PWM5 0x50000000 // PWM5 on PA7 +#define GPIO_PCTL_PA7_CAN0TX 0x60000000 // CAN0TX on PA7 +#define GPIO_PCTL_PA7_CCP3 0x70000000 // CCP3 on PA7 +#define GPIO_PCTL_PA7_USB0PFLT 0x80000000 // USB0PFLT on PA7 +#define GPIO_PCTL_PA7_U1DCD 0x90000000 // U1DCD on PA7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port B. +// +//***************************************************************************** +#define GPIO_PCTL_PB0_M 0x0000000F // PB0 mask +#define GPIO_PCTL_PB0_CCP0 0x00000001 // CCP0 on PB0 +#define GPIO_PCTL_PB0_PWM2 0x00000002 // PWM2 on PB0 +#define GPIO_PCTL_PB0_U1RX 0x00000005 // U1RX on PB0 +#define GPIO_PCTL_PB1_M 0x000000F0 // PB1 mask +#define GPIO_PCTL_PB1_CCP2 0x00000010 // CCP2 on PB1 +#define GPIO_PCTL_PB1_PWM3 0x00000020 // PWM3 on PB1 +#define GPIO_PCTL_PB1_CCP1 0x00000040 // CCP1 on PB1 +#define GPIO_PCTL_PB1_U1TX 0x00000050 // U1TX on PB1 +#define GPIO_PCTL_PB2_M 0x00000F00 // PB2 mask +#define GPIO_PCTL_PB2_I2C0SCL 0x00000100 // I2C0SCL on PB2 +#define GPIO_PCTL_PB2_IDX0 0x00000200 // IDX0 on PB2 +#define GPIO_PCTL_PB2_CCP3 0x00000400 // CCP3 on PB2 +#define GPIO_PCTL_PB2_CCP0 0x00000500 // CCP0 on PB2 +#define GPIO_PCTL_PB2_USB0EPEN 0x00000800 // USB0EPEN on PB2 +#define GPIO_PCTL_PB3_M 0x0000F000 // PB3 mask +#define GPIO_PCTL_PB3_I2C0SDA 0x00001000 // I2C0SDA on PB3 +#define GPIO_PCTL_PB3_FAULT0 0x00002000 // FAULT0 on PB3 +#define GPIO_PCTL_PB3_FAULT3 0x00004000 // FAULT3 on PB3 +#define GPIO_PCTL_PB3_USB0PFLT 0x00008000 // USB0PFLT on PB3 +#define GPIO_PCTL_PB4_M 0x000F0000 // PB4 mask +#define GPIO_PCTL_PB4_U2RX 0x00040000 // U2RX on PB4 +#define GPIO_PCTL_PB4_CAN0RX 0x00050000 // CAN0RX on PB4 +#define GPIO_PCTL_PB4_IDX0 0x00060000 // IDX0 on PB4 +#define GPIO_PCTL_PB4_U1RX 0x00070000 // U1RX on PB4 +#define GPIO_PCTL_PB4_EPI0S23 0x00080000 // EPI0S23 on PB4 +#define GPIO_PCTL_PB5_M 0x00F00000 // PB5 mask +#define GPIO_PCTL_PB5_C0O 0x00100000 // C0O on PB5 +#define GPIO_PCTL_PB5_CCP5 0x00200000 // CCP5 on PB5 +#define GPIO_PCTL_PB5_CCP6 0x00300000 // CCP6 on PB5 +#define GPIO_PCTL_PB5_CCP0 0x00400000 // CCP0 on PB5 +#define GPIO_PCTL_PB5_CAN0TX 0x00500000 // CAN0TX on PB5 +#define GPIO_PCTL_PB5_CCP2 0x00600000 // CCP2 on PB5 +#define GPIO_PCTL_PB5_U1TX 0x00700000 // U1TX on PB5 +#define GPIO_PCTL_PB5_EPI0S22 0x00800000 // EPI0S22 on PB5 +#define GPIO_PCTL_PB6_M 0x0F000000 // PB6 mask +#define GPIO_PCTL_PB6_CCP1 0x01000000 // CCP1 on PB6 +#define GPIO_PCTL_PB6_CCP7 0x02000000 // CCP7 on PB6 +#define GPIO_PCTL_PB6_C0O 0x03000000 // C0O on PB6 +#define GPIO_PCTL_PB6_FAULT1 0x04000000 // FAULT1 on PB6 +#define GPIO_PCTL_PB6_IDX0 0x05000000 // IDX0 on PB6 +#define GPIO_PCTL_PB6_CCP5 0x06000000 // CCP5 on PB6 +#define GPIO_PCTL_PB6_I2S0TXSCK 0x09000000 // I2S0TXSCK on PB6 +#define GPIO_PCTL_PB7_M 0xF0000000 // PB7 mask +#define GPIO_PCTL_PB7_NMI 0x40000000 // NMI on PB7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port C. +// +//***************************************************************************** +#define GPIO_PCTL_PC0_M 0x0000000F // PC0 mask +#define GPIO_PCTL_PC0_TCK 0x00000003 // TCK on PC0 +#define GPIO_PCTL_PC1_M 0x000000F0 // PC1 mask +#define GPIO_PCTL_PC1_TMS 0x00000030 // TMS on PC1 +#define GPIO_PCTL_PC2_M 0x00000F00 // PC2 mask +#define GPIO_PCTL_PC2_TDI 0x00000300 // TDI on PC2 +#define GPIO_PCTL_PC3_M 0x0000F000 // PC3 mask +#define GPIO_PCTL_PC3_TDO 0x00003000 // TDO on PC3 +#define GPIO_PCTL_PC4_M 0x000F0000 // PC4 mask +#define GPIO_PCTL_PC4_CCP5 0x00010000 // CCP5 on PC4 +#define GPIO_PCTL_PC4_PHA0 0x00020000 // PHA0 on PC4 +#define GPIO_PCTL_PC4_PWM6 0x00040000 // PWM6 on PC4 +#define GPIO_PCTL_PC4_CCP2 0x00050000 // CCP2 on PC4 +#define GPIO_PCTL_PC4_CCP4 0x00060000 // CCP4 on PC4 +#define GPIO_PCTL_PC4_EPI0S2 0x00080000 // EPI0S2 on PC4 +#define GPIO_PCTL_PC4_CCP1 0x00090000 // CCP1 on PC4 +#define GPIO_PCTL_PC5_M 0x00F00000 // PC5 mask +#define GPIO_PCTL_PC5_CCP1 0x00100000 // CCP1 on PC5 +#define GPIO_PCTL_PC5_C1O 0x00200000 // C1O on PC5 +#define GPIO_PCTL_PC5_C0O 0x00300000 // C0O on PC5 +#define GPIO_PCTL_PC5_FAULT2 0x00400000 // FAULT2 on PC5 +#define GPIO_PCTL_PC5_CCP3 0x00500000 // CCP3 on PC5 +#define GPIO_PCTL_PC5_USB0EPEN 0x00600000 // USB0EPEN on PC5 +#define GPIO_PCTL_PC5_EPI0S3 0x00800000 // EPI0S3 on PC5 +#define GPIO_PCTL_PC6_M 0x0F000000 // PC6 mask +#define GPIO_PCTL_PC6_CCP3 0x01000000 // CCP3 on PC6 +#define GPIO_PCTL_PC6_PHB0 0x02000000 // PHB0 on PC6 +#define GPIO_PCTL_PC6_C2O 0x03000000 // C2O on PC6 +#define GPIO_PCTL_PC6_PWM7 0x04000000 // PWM7 on PC6 +#define GPIO_PCTL_PC6_U1RX 0x05000000 // U1RX on PC6 +#define GPIO_PCTL_PC6_CCP0 0x06000000 // CCP0 on PC6 +#define GPIO_PCTL_PC6_USB0PFLT 0x07000000 // USB0PFLT on PC6 +#define GPIO_PCTL_PC6_EPI0S4 0x08000000 // EPI0S4 on PC6 +#define GPIO_PCTL_PC7_M 0xF0000000 // PC7 mask +#define GPIO_PCTL_PC7_CCP4 0x10000000 // CCP4 on PC7 +#define GPIO_PCTL_PC7_PHB0 0x20000000 // PHB0 on PC7 +#define GPIO_PCTL_PC7_CCP0 0x40000000 // CCP0 on PC7 +#define GPIO_PCTL_PC7_U1TX 0x50000000 // U1TX on PC7 +#define GPIO_PCTL_PC7_USB0PFLT 0x60000000 // USB0PFLT on PC7 +#define GPIO_PCTL_PC7_C1O 0x70000000 // C1O on PC7 +#define GPIO_PCTL_PC7_EPI0S5 0x80000000 // EPI0S5 on PC7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port D. +// +//***************************************************************************** +#define GPIO_PCTL_PD0_M 0x0000000F // PD0 mask +#define GPIO_PCTL_PD0_PWM0 0x00000001 // PWM0 on PD0 +#define GPIO_PCTL_PD0_CAN0RX 0x00000002 // CAN0RX on PD0 +#define GPIO_PCTL_PD0_IDX0 0x00000003 // IDX0 on PD0 +#define GPIO_PCTL_PD0_U2RX 0x00000004 // U2RX on PD0 +#define GPIO_PCTL_PD0_U1RX 0x00000005 // U1RX on PD0 +#define GPIO_PCTL_PD0_CCP6 0x00000006 // CCP6 on PD0 +#define GPIO_PCTL_PD0_I2S0RXSCK 0x00000008 // I2S0RXSCK on PD0 +#define GPIO_PCTL_PD0_U1CTS 0x00000009 // U1CTS on PD0 +#define GPIO_PCTL_PD1_M 0x000000F0 // PD1 mask +#define GPIO_PCTL_PD1_PWM1 0x00000010 // PWM1 on PD1 +#define GPIO_PCTL_PD1_CAN0TX 0x00000020 // CAN0TX on PD1 +#define GPIO_PCTL_PD1_PHA0 0x00000030 // PHA0 on PD1 +#define GPIO_PCTL_PD1_U2TX 0x00000040 // U2TX on PD1 +#define GPIO_PCTL_PD1_U1TX 0x00000050 // U1TX on PD1 +#define GPIO_PCTL_PD1_CCP7 0x00000060 // CCP7 on PD1 +#define GPIO_PCTL_PD1_I2S0RXWS 0x00000080 // I2S0RXWS on PD1 +#define GPIO_PCTL_PD1_U1DCD 0x00000090 // U1DCD on PD1 +#define GPIO_PCTL_PD1_CCP2 0x000000A0 // CCP2 on PD1 +#define GPIO_PCTL_PD1_PHB1 0x000000B0 // PHB1 on PD1 +#define GPIO_PCTL_PD2_M 0x00000F00 // PD2 mask +#define GPIO_PCTL_PD2_U1RX 0x00000100 // U1RX on PD2 +#define GPIO_PCTL_PD2_CCP6 0x00000200 // CCP6 on PD2 +#define GPIO_PCTL_PD2_PWM2 0x00000300 // PWM2 on PD2 +#define GPIO_PCTL_PD2_CCP5 0x00000400 // CCP5 on PD2 +#define GPIO_PCTL_PD2_EPI0S20 0x00000800 // EPI0S20 on PD2 +#define GPIO_PCTL_PD3_M 0x0000F000 // PD3 mask +#define GPIO_PCTL_PD3_U1TX 0x00001000 // U1TX on PD3 +#define GPIO_PCTL_PD3_CCP7 0x00002000 // CCP7 on PD3 +#define GPIO_PCTL_PD3_PWM3 0x00003000 // PWM3 on PD3 +#define GPIO_PCTL_PD3_CCP0 0x00004000 // CCP0 on PD3 +#define GPIO_PCTL_PD3_EPI0S21 0x00008000 // EPI0S21 on PD3 +#define GPIO_PCTL_PD4_M 0x000F0000 // PD4 mask +#define GPIO_PCTL_PD4_CCP0 0x00010000 // CCP0 on PD4 +#define GPIO_PCTL_PD4_CCP3 0x00020000 // CCP3 on PD4 +#define GPIO_PCTL_PD4_I2S0RXSD 0x00080000 // I2S0RXSD on PD4 +#define GPIO_PCTL_PD4_U1RI 0x00090000 // U1RI on PD4 +#define GPIO_PCTL_PD4_EPI0S19 0x000A0000 // EPI0S19 on PD4 +#define GPIO_PCTL_PD5_M 0x00F00000 // PD5 mask +#define GPIO_PCTL_PD5_CCP2 0x00100000 // CCP2 on PD5 +#define GPIO_PCTL_PD5_CCP4 0x00200000 // CCP4 on PD5 +#define GPIO_PCTL_PD5_I2S0RXMCLK \ + 0x00800000 // I2S0RXMCLK on PD5 +#define GPIO_PCTL_PD5_U2RX 0x00900000 // U2RX on PD5 +#define GPIO_PCTL_PD5_EPI0S28 0x00A00000 // EPI0S28 on PD5 +#define GPIO_PCTL_PD6_M 0x0F000000 // PD6 mask +#define GPIO_PCTL_PD6_FAULT0 0x01000000 // FAULT0 on PD6 +#define GPIO_PCTL_PD6_I2S0TXSCK 0x08000000 // I2S0TXSCK on PD6 +#define GPIO_PCTL_PD6_U2TX 0x09000000 // U2TX on PD6 +#define GPIO_PCTL_PD6_EPI0S29 0x0A000000 // EPI0S29 on PD6 +#define GPIO_PCTL_PD7_M 0xF0000000 // PD7 mask +#define GPIO_PCTL_PD7_IDX0 0x10000000 // IDX0 on PD7 +#define GPIO_PCTL_PD7_C0O 0x20000000 // C0O on PD7 +#define GPIO_PCTL_PD7_CCP1 0x30000000 // CCP1 on PD7 +#define GPIO_PCTL_PD7_I2S0TXWS 0x80000000 // I2S0TXWS on PD7 +#define GPIO_PCTL_PD7_U1DTR 0x90000000 // U1DTR on PD7 +#define GPIO_PCTL_PD7_EPI0S30 0xA0000000 // EPI0S30 on PD7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port E. +// +//***************************************************************************** +#define GPIO_PCTL_PE0_M 0x0000000F // PE0 mask +#define GPIO_PCTL_PE0_PWM4 0x00000001 // PWM4 on PE0 +#define GPIO_PCTL_PE0_SSI1CLK 0x00000002 // SSI1CLK on PE0 +#define GPIO_PCTL_PE0_CCP3 0x00000003 // CCP3 on PE0 +#define GPIO_PCTL_PE0_EPI0S8 0x00000008 // EPI0S8 on PE0 +#define GPIO_PCTL_PE0_USB0PFLT 0x00000009 // USB0PFLT on PE0 +#define GPIO_PCTL_PE1_M 0x000000F0 // PE1 mask +#define GPIO_PCTL_PE1_PWM5 0x00000010 // PWM5 on PE1 +#define GPIO_PCTL_PE1_SSI1FSS 0x00000020 // SSI1FSS on PE1 +#define GPIO_PCTL_PE1_FAULT0 0x00000030 // FAULT0 on PE1 +#define GPIO_PCTL_PE1_CCP2 0x00000040 // CCP2 on PE1 +#define GPIO_PCTL_PE1_CCP6 0x00000050 // CCP6 on PE1 +#define GPIO_PCTL_PE1_EPI0S9 0x00000080 // EPI0S9 on PE1 +#define GPIO_PCTL_PE2_M 0x00000F00 // PE2 mask +#define GPIO_PCTL_PE2_CCP4 0x00000100 // CCP4 on PE2 +#define GPIO_PCTL_PE2_SSI1RX 0x00000200 // SSI1RX on PE2 +#define GPIO_PCTL_PE2_PHB1 0x00000300 // PHB1 on PE2 +#define GPIO_PCTL_PE2_PHA0 0x00000400 // PHA0 on PE2 +#define GPIO_PCTL_PE2_CCP2 0x00000500 // CCP2 on PE2 +#define GPIO_PCTL_PE2_EPI0S24 0x00000800 // EPI0S24 on PE2 +#define GPIO_PCTL_PE3_M 0x0000F000 // PE3 mask +#define GPIO_PCTL_PE3_CCP1 0x00001000 // CCP1 on PE3 +#define GPIO_PCTL_PE3_SSI1TX 0x00002000 // SSI1TX on PE3 +#define GPIO_PCTL_PE3_PHA1 0x00003000 // PHA1 on PE3 +#define GPIO_PCTL_PE3_PHB0 0x00004000 // PHB0 on PE3 +#define GPIO_PCTL_PE3_CCP7 0x00005000 // CCP7 on PE3 +#define GPIO_PCTL_PE3_EPI0S25 0x00008000 // EPI0S25 on PE3 +#define GPIO_PCTL_PE4_M 0x000F0000 // PE4 mask +#define GPIO_PCTL_PE4_CCP3 0x00010000 // CCP3 on PE4 +#define GPIO_PCTL_PE4_FAULT0 0x00040000 // FAULT0 on PE4 +#define GPIO_PCTL_PE4_U2TX 0x00050000 // U2TX on PE4 +#define GPIO_PCTL_PE4_CCP2 0x00060000 // CCP2 on PE4 +#define GPIO_PCTL_PE4_I2S0TXWS 0x00090000 // I2S0TXWS on PE4 +#define GPIO_PCTL_PE5_M 0x00F00000 // PE5 mask +#define GPIO_PCTL_PE5_CCP5 0x00100000 // CCP5 on PE5 +#define GPIO_PCTL_PE5_I2S0TXSD 0x00900000 // I2S0TXSD on PE5 +#define GPIO_PCTL_PE6_M 0x0F000000 // PE6 mask +#define GPIO_PCTL_PE6_PWM4 0x01000000 // PWM4 on PE6 +#define GPIO_PCTL_PE6_C1O 0x02000000 // C1O on PE6 +#define GPIO_PCTL_PE6_U1CTS 0x09000000 // U1CTS on PE6 +#define GPIO_PCTL_PE7_M 0xF0000000 // PE7 mask +#define GPIO_PCTL_PE7_PWM5 0x10000000 // PWM5 on PE7 +#define GPIO_PCTL_PE7_C2O 0x20000000 // C2O on PE7 +#define GPIO_PCTL_PE7_U1DCD 0x90000000 // U1DCD on PE7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port F. +// +//***************************************************************************** +#define GPIO_PCTL_PF0_M 0x0000000F // PF0 mask +#define GPIO_PCTL_PF0_CAN1RX 0x00000001 // CAN1RX on PF0 +#define GPIO_PCTL_PF0_PHB0 0x00000002 // PHB0 on PF0 +#define GPIO_PCTL_PF0_PWM0 0x00000003 // PWM0 on PF0 +#define GPIO_PCTL_PF0_I2S0TXSD 0x00000008 // I2S0TXSD on PF0 +#define GPIO_PCTL_PF0_U1DSR 0x00000009 // U1DSR on PF0 +#define GPIO_PCTL_PF1_M 0x000000F0 // PF1 mask +#define GPIO_PCTL_PF1_CAN1TX 0x00000010 // CAN1TX on PF1 +#define GPIO_PCTL_PF1_IDX1 0x00000020 // IDX1 on PF1 +#define GPIO_PCTL_PF1_PWM1 0x00000030 // PWM1 on PF1 +#define GPIO_PCTL_PF1_I2S0TXMCLK \ + 0x00000080 // I2S0TXMCLK on PF1 +#define GPIO_PCTL_PF1_U1RTS 0x00000090 // U1RTS on PF1 +#define GPIO_PCTL_PF1_CCP3 0x000000A0 // CCP3 on PF1 +#define GPIO_PCTL_PF2_M 0x00000F00 // PF2 mask +#define GPIO_PCTL_PF2_LED1 0x00000100 // LED1 on PF2 +#define GPIO_PCTL_PF2_PWM4 0x00000200 // PWM4 on PF2 +#define GPIO_PCTL_PF2_PWM2 0x00000400 // PWM2 on PF2 +#define GPIO_PCTL_PF2_SSI1CLK 0x00000900 // SSI1CLK on PF2 +#define GPIO_PCTL_PF3_M 0x0000F000 // PF3 mask +#define GPIO_PCTL_PF3_LED0 0x00001000 // LED0 on PF3 +#define GPIO_PCTL_PF3_PWM5 0x00002000 // PWM5 on PF3 +#define GPIO_PCTL_PF3_PWM3 0x00004000 // PWM3 on PF3 +#define GPIO_PCTL_PF3_SSI1FSS 0x00009000 // SSI1FSS on PF3 +#define GPIO_PCTL_PF4_M 0x000F0000 // PF4 mask +#define GPIO_PCTL_PF4_CCP0 0x00010000 // CCP0 on PF4 +#define GPIO_PCTL_PF4_C0O 0x00020000 // C0O on PF4 +#define GPIO_PCTL_PF4_FAULT0 0x00040000 // FAULT0 on PF4 +#define GPIO_PCTL_PF4_EPI0S12 0x00080000 // EPI0S12 on PF4 +#define GPIO_PCTL_PF4_SSI1RX 0x00090000 // SSI1RX on PF4 +#define GPIO_PCTL_PF5_M 0x00F00000 // PF5 mask +#define GPIO_PCTL_PF5_CCP2 0x00100000 // CCP2 on PF5 +#define GPIO_PCTL_PF5_C1O 0x00200000 // C1O on PF5 +#define GPIO_PCTL_PF5_EPI0S15 0x00800000 // EPI0S15 on PF5 +#define GPIO_PCTL_PF5_SSI1TX 0x00900000 // SSI1TX on PF5 +#define GPIO_PCTL_PF6_M 0x0F000000 // PF6 mask +#define GPIO_PCTL_PF6_CCP1 0x01000000 // CCP1 on PF6 +#define GPIO_PCTL_PF6_C2O 0x02000000 // C2O on PF6 +#define GPIO_PCTL_PF6_PHA0 0x04000000 // PHA0 on PF6 +#define GPIO_PCTL_PF6_I2S0TXMCLK \ + 0x09000000 // I2S0TXMCLK on PF6 +#define GPIO_PCTL_PF6_U1RTS 0x0A000000 // U1RTS on PF6 +#define GPIO_PCTL_PF7_M 0xF0000000 // PF7 mask +#define GPIO_PCTL_PF7_CCP4 0x10000000 // CCP4 on PF7 +#define GPIO_PCTL_PF7_PHB0 0x40000000 // PHB0 on PF7 +#define GPIO_PCTL_PF7_EPI0S12 0x80000000 // EPI0S12 on PF7 +#define GPIO_PCTL_PF7_FAULT1 0x90000000 // FAULT1 on PF7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port G. +// +//***************************************************************************** +#define GPIO_PCTL_PG0_M 0x0000000F // PG0 mask +#define GPIO_PCTL_PG0_U2RX 0x00000001 // U2RX on PG0 +#define GPIO_PCTL_PG0_PWM0 0x00000002 // PWM0 on PG0 +#define GPIO_PCTL_PG0_I2C1SCL 0x00000003 // I2C1SCL on PG0 +#define GPIO_PCTL_PG0_PWM4 0x00000004 // PWM4 on PG0 +#define GPIO_PCTL_PG0_USB0EPEN 0x00000007 // USB0EPEN on PG0 +#define GPIO_PCTL_PG0_EPI0S13 0x00000008 // EPI0S13 on PG0 +#define GPIO_PCTL_PG1_M 0x000000F0 // PG1 mask +#define GPIO_PCTL_PG1_U2TX 0x00000010 // U2TX on PG1 +#define GPIO_PCTL_PG1_PWM1 0x00000020 // PWM1 on PG1 +#define GPIO_PCTL_PG1_I2C1SDA 0x00000030 // I2C1SDA on PG1 +#define GPIO_PCTL_PG1_PWM5 0x00000040 // PWM5 on PG1 +#define GPIO_PCTL_PG1_EPI0S14 0x00000080 // EPI0S14 on PG1 +#define GPIO_PCTL_PG2_M 0x00000F00 // PG2 mask +#define GPIO_PCTL_PG2_PWM0 0x00000100 // PWM0 on PG2 +#define GPIO_PCTL_PG2_FAULT0 0x00000400 // FAULT0 on PG2 +#define GPIO_PCTL_PG2_IDX1 0x00000800 // IDX1 on PG2 +#define GPIO_PCTL_PG2_I2S0RXSD 0x00000900 // I2S0RXSD on PG2 +#define GPIO_PCTL_PG3_M 0x0000F000 // PG3 mask +#define GPIO_PCTL_PG3_PWM1 0x00001000 // PWM1 on PG3 +#define GPIO_PCTL_PG3_FAULT2 0x00004000 // FAULT2 on PG3 +#define GPIO_PCTL_PG3_FAULT0 0x00008000 // FAULT0 on PG3 +#define GPIO_PCTL_PG3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PG3 +#define GPIO_PCTL_PG4_M 0x000F0000 // PG4 mask +#define GPIO_PCTL_PG4_CCP3 0x00010000 // CCP3 on PG4 +#define GPIO_PCTL_PG4_FAULT1 0x00040000 // FAULT1 on PG4 +#define GPIO_PCTL_PG4_EPI0S15 0x00080000 // EPI0S15 on PG4 +#define GPIO_PCTL_PG4_PWM6 0x00090000 // PWM6 on PG4 +#define GPIO_PCTL_PG4_U1RI 0x000A0000 // U1RI on PG4 +#define GPIO_PCTL_PG5_M 0x00F00000 // PG5 mask +#define GPIO_PCTL_PG5_CCP5 0x00100000 // CCP5 on PG5 +#define GPIO_PCTL_PG5_IDX0 0x00400000 // IDX0 on PG5 +#define GPIO_PCTL_PG5_FAULT1 0x00500000 // FAULT1 on PG5 +#define GPIO_PCTL_PG5_PWM7 0x00800000 // PWM7 on PG5 +#define GPIO_PCTL_PG5_I2S0RXSCK 0x00900000 // I2S0RXSCK on PG5 +#define GPIO_PCTL_PG5_U1DTR 0x00A00000 // U1DTR on PG5 +#define GPIO_PCTL_PG6_M 0x0F000000 // PG6 mask +#define GPIO_PCTL_PG6_PHA1 0x01000000 // PHA1 on PG6 +#define GPIO_PCTL_PG6_PWM6 0x04000000 // PWM6 on PG6 +#define GPIO_PCTL_PG6_FAULT1 0x08000000 // FAULT1 on PG6 +#define GPIO_PCTL_PG6_I2S0RXWS 0x09000000 // I2S0RXWS on PG6 +#define GPIO_PCTL_PG6_U1RI 0x0A000000 // U1RI on PG6 +#define GPIO_PCTL_PG7_M 0xF0000000 // PG7 mask +#define GPIO_PCTL_PG7_PHB1 0x10000000 // PHB1 on PG7 +#define GPIO_PCTL_PG7_PWM7 0x40000000 // PWM7 on PG7 +#define GPIO_PCTL_PG7_CCP5 0x80000000 // CCP5 on PG7 +#define GPIO_PCTL_PG7_EPI0S31 0x90000000 // EPI0S31 on PG7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port H. +// +//***************************************************************************** +#define GPIO_PCTL_PH0_M 0x0000000F // PH0 mask +#define GPIO_PCTL_PH0_CCP6 0x00000001 // CCP6 on PH0 +#define GPIO_PCTL_PH0_PWM2 0x00000002 // PWM2 on PH0 +#define GPIO_PCTL_PH0_EPI0S6 0x00000008 // EPI0S6 on PH0 +#define GPIO_PCTL_PH0_PWM4 0x00000009 // PWM4 on PH0 +#define GPIO_PCTL_PH1_M 0x000000F0 // PH1 mask +#define GPIO_PCTL_PH1_CCP7 0x00000010 // CCP7 on PH1 +#define GPIO_PCTL_PH1_PWM3 0x00000020 // PWM3 on PH1 +#define GPIO_PCTL_PH1_EPI0S7 0x00000080 // EPI0S7 on PH1 +#define GPIO_PCTL_PH1_PWM5 0x00000090 // PWM5 on PH1 +#define GPIO_PCTL_PH2_M 0x00000F00 // PH2 mask +#define GPIO_PCTL_PH2_IDX1 0x00000100 // IDX1 on PH2 +#define GPIO_PCTL_PH2_C1O 0x00000200 // C1O on PH2 +#define GPIO_PCTL_PH2_FAULT3 0x00000400 // FAULT3 on PH2 +#define GPIO_PCTL_PH2_EPI0S1 0x00000800 // EPI0S1 on PH2 +#define GPIO_PCTL_PH3_M 0x0000F000 // PH3 mask +#define GPIO_PCTL_PH3_PHB0 0x00001000 // PHB0 on PH3 +#define GPIO_PCTL_PH3_FAULT0 0x00002000 // FAULT0 on PH3 +#define GPIO_PCTL_PH3_USB0EPEN 0x00004000 // USB0EPEN on PH3 +#define GPIO_PCTL_PH3_EPI0S0 0x00008000 // EPI0S0 on PH3 +#define GPIO_PCTL_PH4_M 0x000F0000 // PH4 mask +#define GPIO_PCTL_PH4_USB0PFLT 0x00040000 // USB0PFLT on PH4 +#define GPIO_PCTL_PH4_EPI0S10 0x00080000 // EPI0S10 on PH4 +#define GPIO_PCTL_PH4_SSI1CLK 0x000B0000 // SSI1CLK on PH4 +#define GPIO_PCTL_PH5_M 0x00F00000 // PH5 mask +#define GPIO_PCTL_PH5_EPI0S11 0x00800000 // EPI0S11 on PH5 +#define GPIO_PCTL_PH5_FAULT2 0x00A00000 // FAULT2 on PH5 +#define GPIO_PCTL_PH5_SSI1FSS 0x00B00000 // SSI1FSS on PH5 +#define GPIO_PCTL_PH6_M 0x0F000000 // PH6 mask +#define GPIO_PCTL_PH6_EPI0S26 0x08000000 // EPI0S26 on PH6 +#define GPIO_PCTL_PH6_PWM4 0x0A000000 // PWM4 on PH6 +#define GPIO_PCTL_PH6_SSI1RX 0x0B000000 // SSI1RX on PH6 +#define GPIO_PCTL_PH7_M 0xF0000000 // PH7 mask +#define GPIO_PCTL_PH7_EPI0S27 0x80000000 // EPI0S27 on PH7 +#define GPIO_PCTL_PH7_PWM5 0xA0000000 // PWM5 on PH7 +#define GPIO_PCTL_PH7_SSI1TX 0xB0000000 // SSI1TX on PH7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port J. +// +//***************************************************************************** +#define GPIO_PCTL_PJ0_M 0x0000000F // PJ0 mask +#define GPIO_PCTL_PJ0_EPI0S16 0x00000008 // EPI0S16 on PJ0 +#define GPIO_PCTL_PJ0_PWM0 0x0000000A // PWM0 on PJ0 +#define GPIO_PCTL_PJ0_I2C1SCL 0x0000000B // I2C1SCL on PJ0 +#define GPIO_PCTL_PJ1_M 0x000000F0 // PJ1 mask +#define GPIO_PCTL_PJ1_EPI0S17 0x00000080 // EPI0S17 on PJ1 +#define GPIO_PCTL_PJ1_USB0PFLT 0x00000090 // USB0PFLT on PJ1 +#define GPIO_PCTL_PJ1_PWM1 0x000000A0 // PWM1 on PJ1 +#define GPIO_PCTL_PJ1_I2C1SDA 0x000000B0 // I2C1SDA on PJ1 +#define GPIO_PCTL_PJ2_M 0x00000F00 // PJ2 mask +#define GPIO_PCTL_PJ2_EPI0S18 0x00000800 // EPI0S18 on PJ2 +#define GPIO_PCTL_PJ2_CCP0 0x00000900 // CCP0 on PJ2 +#define GPIO_PCTL_PJ2_FAULT0 0x00000A00 // FAULT0 on PJ2 +#define GPIO_PCTL_PJ3_M 0x0000F000 // PJ3 mask +#define GPIO_PCTL_PJ3_EPI0S19 0x00008000 // EPI0S19 on PJ3 +#define GPIO_PCTL_PJ3_U1CTS 0x00009000 // U1CTS on PJ3 +#define GPIO_PCTL_PJ3_CCP6 0x0000A000 // CCP6 on PJ3 +#define GPIO_PCTL_PJ4_M 0x000F0000 // PJ4 mask +#define GPIO_PCTL_PJ4_EPI0S28 0x00080000 // EPI0S28 on PJ4 +#define GPIO_PCTL_PJ4_U1DCD 0x00090000 // U1DCD on PJ4 +#define GPIO_PCTL_PJ4_CCP4 0x000A0000 // CCP4 on PJ4 +#define GPIO_PCTL_PJ5_M 0x00F00000 // PJ5 mask +#define GPIO_PCTL_PJ5_EPI0S29 0x00800000 // EPI0S29 on PJ5 +#define GPIO_PCTL_PJ5_U1DSR 0x00900000 // U1DSR on PJ5 +#define GPIO_PCTL_PJ5_CCP2 0x00A00000 // CCP2 on PJ5 +#define GPIO_PCTL_PJ6_M 0x0F000000 // PJ6 mask +#define GPIO_PCTL_PJ6_EPI0S30 0x08000000 // EPI0S30 on PJ6 +#define GPIO_PCTL_PJ6_U1RTS 0x09000000 // U1RTS on PJ6 +#define GPIO_PCTL_PJ6_CCP1 0x0A000000 // CCP1 on PJ6 +#define GPIO_PCTL_PJ7_M 0xF0000000 // PJ7 mask +#define GPIO_PCTL_PJ7_U1DTR 0x90000000 // U1DTR on PJ7 +#define GPIO_PCTL_PJ7_CCP0 0xA0000000 // CCP0 on PJ7 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_PeriphID4 0x00000FD0 +#define GPIO_O_PeriphID5 0x00000FD4 +#define GPIO_O_PeriphID6 0x00000FD8 +#define GPIO_O_PeriphID7 0x00000FDC +#define GPIO_O_PeriphID0 0x00000FE0 +#define GPIO_O_PeriphID1 0x00000FE4 +#define GPIO_O_PeriphID2 0x00000FE8 +#define GPIO_O_PeriphID3 0x00000FEC +#define GPIO_O_PCellID0 0x00000FF0 +#define GPIO_O_PCellID1 0x00000FF4 +#define GPIO_O_PCellID2 0x00000FF8 +#define GPIO_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO Register reset values. +// +//***************************************************************************** +#define GPIO_RV_DEN 0x000000FF // Digital input enable reg RV +#define GPIO_RV_PUR 0x000000FF // Pull up select reg RV +#define GPIO_RV_DR2R 0x000000FF // 2ma drive select reg RV +#define GPIO_RV_PCellID1 0x000000F0 +#define GPIO_RV_PCellID3 0x000000B1 +#define GPIO_RV_PeriphID0 0x00000061 +#define GPIO_RV_PeriphID1 0x00000010 +#define GPIO_RV_PCellID0 0x0000000D +#define GPIO_RV_PCellID2 0x00000005 +#define GPIO_RV_PeriphID2 0x00000004 +#define GPIO_RV_LOCK 0x00000001 // Lock register RV +#define GPIO_RV_PeriphID7 0x00000000 +#define GPIO_RV_PDR 0x00000000 // Pull down select reg RV +#define GPIO_RV_IC 0x00000000 // Interrupt clear reg RV +#define GPIO_RV_SLR 0x00000000 // Slew rate control enable reg RV +#define GPIO_RV_ODR 0x00000000 // Open drain select reg RV +#define GPIO_RV_IBE 0x00000000 // Interrupt both edges reg RV +#define GPIO_RV_AFSEL 0x00000000 // Mode control select reg RV +#define GPIO_RV_IS 0x00000000 // Interrupt sense reg RV +#define GPIO_RV_IM 0x00000000 // Interrupt mask reg RV +#define GPIO_RV_PeriphID4 0x00000000 +#define GPIO_RV_PeriphID5 0x00000000 +#define GPIO_RV_DR8R 0x00000000 // 8ma drive select reg RV +#define GPIO_RV_RIS 0x00000000 // Raw interrupt status reg RV +#define GPIO_RV_DR4R 0x00000000 // 4ma drive select reg RV +#define GPIO_RV_IEV 0x00000000 // Intterupt event reg RV +#define GPIO_RV_DIR 0x00000000 // Data direction reg RV +#define GPIO_RV_PeriphID6 0x00000000 +#define GPIO_RV_PeriphID3 0x00000000 +#define GPIO_RV_DATA 0x00000000 // Data register reset value +#define GPIO_RV_MIS 0x00000000 // Masked interrupt status reg RV + +#endif + +#endif // __HW_GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_ints.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_ints.h new file mode 100644 index 00000000..1eb1e34e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_ints.h @@ -0,0 +1,141 @@ +//***************************************************************************** +// +// hw_ints.h - Macros that define the interrupt assignment on Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_INTS_H__ +#define __HW_INTS_H__ + +//***************************************************************************** +// +// The following are defines for the fault assignments. +// +//***************************************************************************** +#define FAULT_NMI 2 // NMI fault +#define FAULT_HARD 3 // Hard fault +#define FAULT_MPU 4 // MPU fault +#define FAULT_BUS 5 // Bus fault +#define FAULT_USAGE 6 // Usage fault +#define FAULT_SVCALL 11 // SVCall +#define FAULT_DEBUG 12 // Debug monitor +#define FAULT_PENDSV 14 // PendSV +#define FAULT_SYSTICK 15 // System Tick + +//***************************************************************************** +// +// The following are defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_GPIOA 16 // GPIO Port A +#define INT_GPIOB 17 // GPIO Port B +#define INT_GPIOC 18 // GPIO Port C +#define INT_GPIOD 19 // GPIO Port D +#define INT_GPIOE 20 // GPIO Port E +#define INT_UART0 21 // UART0 Rx and Tx +#define INT_UART1 22 // UART1 Rx and Tx +#define INT_SSI0 23 // SSI0 Rx and Tx +#define INT_I2C0 24 // I2C0 Master and Slave +#define INT_PWM_FAULT 25 // PWM Fault +#define INT_PWM0 26 // PWM Generator 0 +#define INT_PWM1 27 // PWM Generator 1 +#define INT_PWM2 28 // PWM Generator 2 +#define INT_QEI0 29 // Quadrature Encoder 0 +#define INT_ADC0SS0 30 // ADC0 Sequence 0 +#define INT_ADC0SS1 31 // ADC0 Sequence 1 +#define INT_ADC0SS2 32 // ADC0 Sequence 2 +#define INT_ADC0SS3 33 // ADC0 Sequence 3 +#define INT_WATCHDOG 34 // Watchdog timer +#define INT_TIMER0A 35 // Timer 0 subtimer A +#define INT_TIMER0B 36 // Timer 0 subtimer B +#define INT_TIMER1A 37 // Timer 1 subtimer A +#define INT_TIMER1B 38 // Timer 1 subtimer B +#define INT_TIMER2A 39 // Timer 2 subtimer A +#define INT_TIMER2B 40 // Timer 2 subtimer B +#define INT_COMP0 41 // Analog Comparator 0 +#define INT_COMP1 42 // Analog Comparator 1 +#define INT_COMP2 43 // Analog Comparator 2 +#define INT_SYSCTL 44 // System Control (PLL, OSC, BO) +#define INT_FLASH 45 // FLASH Control +#define INT_GPIOF 46 // GPIO Port F +#define INT_GPIOG 47 // GPIO Port G +#define INT_GPIOH 48 // GPIO Port H +#define INT_UART2 49 // UART2 Rx and Tx +#define INT_SSI1 50 // SSI1 Rx and Tx +#define INT_TIMER3A 51 // Timer 3 subtimer A +#define INT_TIMER3B 52 // Timer 3 subtimer B +#define INT_I2C1 53 // I2C1 Master and Slave +#define INT_QEI1 54 // Quadrature Encoder 1 +#define INT_CAN0 55 // CAN0 +#define INT_CAN1 56 // CAN1 +#define INT_CAN2 57 // CAN2 +#define INT_ETH 58 // Ethernet +#define INT_HIBERNATE 59 // Hibernation module +#define INT_USB0 60 // USB 0 Controller +#define INT_PWM3 61 // PWM Generator 3 +#define INT_UDMA 62 // uDMA controller +#define INT_UDMAERR 63 // uDMA Error +#define INT_ADC1SS0 64 // ADC1 Sequence 0 +#define INT_ADC1SS1 65 // ADC1 Sequence 1 +#define INT_ADC1SS2 66 // ADC1 Sequence 2 +#define INT_ADC1SS3 67 // ADC1 Sequence 3 +#define INT_I2S0 68 // I2S0 +#define INT_EPI0 69 // EPI0 +#define INT_GPIOJ 70 // GPIO Port J + +//***************************************************************************** +// +// The following are defines for the total number of interrupts. +// +//***************************************************************************** +#define NUM_INTERRUPTS 71 + +//***************************************************************************** +// +// The following are defines for the total number of priority levels. +// +//***************************************************************************** +#define NUM_PRIORITY 8 +#define NUM_PRIORITY_BITS 3 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_SSI 23 // SSI Rx and Tx +#define INT_I2C 24 // I2C Master and Slave +#define INT_QEI 29 // Quadrature Encoder +#define INT_ADC0 30 // ADC Sequence 0 +#define INT_ADC1 31 // ADC Sequence 1 +#define INT_ADC2 32 // ADC Sequence 2 +#define INT_ADC3 33 // ADC Sequence 3 + +#endif + +#endif // __HW_INTS_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_memmap.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_memmap.h new file mode 100644 index 00000000..144f9d25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_memmap.h @@ -0,0 +1,115 @@ +//***************************************************************************** +// +// hw_memmap.h - Macros defining the memory map of Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_MEMMAP_H__ +#define __HW_MEMMAP_H__ + +//***************************************************************************** +// +// The following are defines for the base address of the memories and +// peripherals. +// +//***************************************************************************** +#define FLASH_BASE 0x00000000 // FLASH memory +#define SRAM_BASE 0x20000000 // SRAM memory +#define WATCHDOG0_BASE 0x40000000 // Watchdog0 +#define WATCHDOG1_BASE 0x40001000 // Watchdog1 +#define GPIO_PORTA_BASE 0x40004000 // GPIO Port A +#define GPIO_PORTB_BASE 0x40005000 // GPIO Port B +#define GPIO_PORTC_BASE 0x40006000 // GPIO Port C +#define GPIO_PORTD_BASE 0x40007000 // GPIO Port D +#define SSI0_BASE 0x40008000 // SSI0 +#define SSI1_BASE 0x40009000 // SSI1 +#define UART0_BASE 0x4000C000 // UART0 +#define UART1_BASE 0x4000D000 // UART1 +#define UART2_BASE 0x4000E000 // UART2 +#define I2C0_MASTER_BASE 0x40020000 // I2C0 Master +#define I2C0_SLAVE_BASE 0x40020800 // I2C0 Slave +#define I2C1_MASTER_BASE 0x40021000 // I2C1 Master +#define I2C1_SLAVE_BASE 0x40021800 // I2C1 Slave +#define GPIO_PORTE_BASE 0x40024000 // GPIO Port E +#define GPIO_PORTF_BASE 0x40025000 // GPIO Port F +#define GPIO_PORTG_BASE 0x40026000 // GPIO Port G +#define GPIO_PORTH_BASE 0x40027000 // GPIO Port H +#define PWM_BASE 0x40028000 // PWM +#define QEI0_BASE 0x4002C000 // QEI0 +#define QEI1_BASE 0x4002D000 // QEI1 +#define TIMER0_BASE 0x40030000 // Timer0 +#define TIMER1_BASE 0x40031000 // Timer1 +#define TIMER2_BASE 0x40032000 // Timer2 +#define TIMER3_BASE 0x40033000 // Timer3 +#define ADC0_BASE 0x40038000 // ADC0 +#define ADC1_BASE 0x40039000 // ADC1 +#define COMP_BASE 0x4003C000 // Analog comparators +#define GPIO_PORTJ_BASE 0x4003D000 // GPIO Port J +#define CAN0_BASE 0x40040000 // CAN0 +#define CAN1_BASE 0x40041000 // CAN1 +#define CAN2_BASE 0x40042000 // CAN2 +#define ETH_BASE 0x40048000 // Ethernet +#define MAC_BASE 0x40048000 // Ethernet +#define USB0_BASE 0x40050000 // USB 0 Controller +#define I2S0_BASE 0x40054000 // I2S0 +#define GPIO_PORTA_AHB_BASE 0x40058000 // GPIO Port A (high speed) +#define GPIO_PORTB_AHB_BASE 0x40059000 // GPIO Port B (high speed) +#define GPIO_PORTC_AHB_BASE 0x4005A000 // GPIO Port C (high speed) +#define GPIO_PORTD_AHB_BASE 0x4005B000 // GPIO Port D (high speed) +#define GPIO_PORTE_AHB_BASE 0x4005C000 // GPIO Port E (high speed) +#define GPIO_PORTF_AHB_BASE 0x4005D000 // GPIO Port F (high speed) +#define GPIO_PORTG_AHB_BASE 0x4005E000 // GPIO Port G (high speed) +#define GPIO_PORTH_AHB_BASE 0x4005F000 // GPIO Port H (high speed) +#define GPIO_PORTJ_AHB_BASE 0x40060000 // GPIO Port J (high speed) +#define EPI0_BASE 0x400D0000 // EPI0 +#define HIB_BASE 0x400FC000 // Hibernation Module +#define FLASH_CTRL_BASE 0x400FD000 // FLASH Controller +#define SYSCTL_BASE 0x400FE000 // System Control +#define UDMA_BASE 0x400FF000 // uDMA Controller +#define ITM_BASE 0xE0000000 // Instrumentation Trace Macrocell +#define DWT_BASE 0xE0001000 // Data Watchpoint and Trace +#define FPB_BASE 0xE0002000 // FLASH Patch and Breakpoint +#define NVIC_BASE 0xE000E000 // Nested Vectored Interrupt Ctrl +#define TPIU_BASE 0xE0040000 // Trace Port Interface Unit + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the base address of the memories +// and peripherals. +// +//***************************************************************************** +#define WATCHDOG_BASE 0x40000000 // Watchdog +#define SSI_BASE 0x40008000 // SSI +#define I2C_MASTER_BASE 0x40020000 // I2C Master +#define I2C_SLAVE_BASE 0x40020800 // I2C Slave +#define QEI_BASE 0x4002C000 // QEI +#define ADC_BASE 0x40038000 // ADC + +#endif + +#endif // __HW_MEMMAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_nvic.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_nvic.h new file mode 100644 index 00000000..5ac7bafb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_nvic.h @@ -0,0 +1,1189 @@ +//***************************************************************************** +// +// hw_nvic.h - Macros used when accessing the NVIC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_NVIC_H__ +#define __HW_NVIC_H__ + +//***************************************************************************** +// +// The following are defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg +#define NVIC_ACTLR 0xE000E008 // Auxiliary Control +#define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status + // Register +#define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register +#define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register +#define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg +#define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable +#define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable +#define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable +#define NVIC_DIS1 0xE000E184 // Interrupt 32-54 Clear Enable +#define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending +#define NVIC_PEND1 0xE000E204 // Interrupt 32-54 Set Pending +#define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending +#define NVIC_UNPEND1 0xE000E284 // Interrupt 32-54 Clear Pending +#define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit +#define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-54 Active Bit +#define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority +#define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority +#define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority +#define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority +#define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority +#define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority +#define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority +#define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority +#define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority +#define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority +#define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority +#define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority +#define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority +#define NVIC_PRI13 0xE000E434 // Interrupt 52-53 Priority +#define NVIC_CPUID 0xE000ED00 // CPU ID Base +#define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State +#define NVIC_VTABLE 0xE000ED08 // Vector Table Offset +#define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset + // Control +#define NVIC_SYS_CTRL 0xE000ED10 // System Control +#define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control +#define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 +#define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2 +#define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3 +#define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State +#define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status +#define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status +#define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register +#define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address +#define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address +#define NVIC_MPU_TYPE 0xE000ED90 // MPU Type +#define NVIC_MPU_CTRL 0xE000ED94 // MPU Control +#define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number +#define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address +#define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size +#define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 +#define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size + // Alias 1 +#define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 +#define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size + // Alias 2 +#define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 +#define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size + // Alias 3 +#define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg +#define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select +#define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data +#define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control +#define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTLR register. +// +//***************************************************************************** +#define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding +#define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer +#define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple + // Cycle Instructions + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x007FFFFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable +#define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable +#define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable +#define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable +#define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable +#define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable +#define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable +#define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00FFFFFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00FFFFFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00FFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00FFFFFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI11 register. +// +//***************************************************************************** +#define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask +#define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask +#define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask +#define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask +#define NVIC_PRI11_INT47_S 29 +#define NVIC_PRI11_INT46_S 21 +#define NVIC_PRI11_INT45_S 13 +#define NVIC_PRI11_INT44_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI12 register. +// +//***************************************************************************** +#define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask +#define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask +#define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask +#define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask +#define NVIC_PRI12_INT51_S 29 +#define NVIC_PRI12_INT50_S 21 +#define NVIC_PRI12_INT49_S 13 +#define NVIC_PRI12_INT48_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI13 register. +// +//***************************************************************************** +#define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask +#define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask +#define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask +#define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask +#define NVIC_PRI13_INT55_S 29 +#define NVIC_PRI13_INT54_S 21 +#define NVIC_PRI13_INT53_S 13 +#define NVIC_PRI13_INT52_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0007F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_S 12 +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFE00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 9 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +#endif // __HW_NVIC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_sysctl.h new file mode 100644 index 00000000..2bcd8c71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_sysctl.h @@ -0,0 +1,1687 @@ +//***************************************************************************** +// +// hw_sysctl.h - Macros used when accessing the system control hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SYSCTL_H__ +#define __HW_SYSCTL_H__ + +//***************************************************************************** +// +// The following are defines for the System Control register addresses. +// +//***************************************************************************** +#define SYSCTL_DID0 0x400FE000 // Device Identification 0 +#define SYSCTL_DID1 0x400FE004 // Device Identification 1 +#define SYSCTL_DC0 0x400FE008 // Device Capabilities 0 +#define SYSCTL_DC1 0x400FE010 // Device Capabilities 1 +#define SYSCTL_DC2 0x400FE014 // Device Capabilities 2 +#define SYSCTL_DC3 0x400FE018 // Device Capabilities 3 +#define SYSCTL_DC4 0x400FE01C // Device Capabilities 4 +#define SYSCTL_DC5 0x400FE020 // Device Capabilities 5 +#define SYSCTL_DC6 0x400FE024 // Device Capabilities 6 +#define SYSCTL_DC7 0x400FE028 // Device Capabilities 7 +#define SYSCTL_DC8 0x400FE02C // Device Capabilities 8 ADC + // Channels +#define SYSCTL_PBORCTL 0x400FE030 // Brown-Out Reset Control +#define SYSCTL_LDOPCTL 0x400FE034 // LDO Power Control +#define SYSCTL_SRCR0 0x400FE040 // Software Reset Control 0 +#define SYSCTL_SRCR1 0x400FE044 // Software Reset Control 1 +#define SYSCTL_SRCR2 0x400FE048 // Software Reset Control 2 +#define SYSCTL_RIS 0x400FE050 // Raw Interrupt Status +#define SYSCTL_IMC 0x400FE054 // Interrupt Mask Control +#define SYSCTL_MISC 0x400FE058 // Masked Interrupt Status and + // Clear +#define SYSCTL_RESC 0x400FE05C // Reset Cause +#define SYSCTL_RCC 0x400FE060 // Run-Mode Clock Configuration +#define SYSCTL_PLLCFG 0x400FE064 // XTAL to PLL Translation +#define SYSCTL_GPIOHBCTL 0x400FE06C // GPIO High-Performance Bus + // Control +#define SYSCTL_RCC2 0x400FE070 // Run-Mode Clock Configuration 2 +#define SYSCTL_MOSCCTL 0x400FE07C // Main Oscillator Control +#define SYSCTL_RCGC0 0x400FE100 // Run Mode Clock Gating Control + // Register 0 +#define SYSCTL_RCGC1 0x400FE104 // Run Mode Clock Gating Control + // Register 1 +#define SYSCTL_RCGC2 0x400FE108 // Run Mode Clock Gating Control + // Register 2 +#define SYSCTL_SCGC0 0x400FE110 // Sleep Mode Clock Gating Control + // Register 0 +#define SYSCTL_SCGC1 0x400FE114 // Sleep Mode Clock Gating Control + // Register 1 +#define SYSCTL_SCGC2 0x400FE118 // Sleep Mode Clock Gating Control + // Register 2 +#define SYSCTL_DCGC0 0x400FE120 // Deep Sleep Mode Clock Gating + // Control Register 0 +#define SYSCTL_DCGC1 0x400FE124 // Deep-Sleep Mode Clock Gating + // Control Register 1 +#define SYSCTL_DCGC2 0x400FE128 // Deep Sleep Mode Clock Gating + // Control Register 2 +#define SYSCTL_DSLPCLKCFG 0x400FE144 // Deep Sleep Clock Configuration +#define SYSCTL_PIOSCCAL 0x400FE150 // Precision Internal Oscillator + // Calibration +#define SYSCTL_CLKVCLR 0x400FE150 // Clock Verification Clear +#define SYSCTL_PIOSCSTAT 0x400FE154 // Precision Internal Oscillator + // Statistics +#define SYSCTL_LDOARST 0x400FE160 // Allow Unregulated LDO to Reset + // the Part +#define SYSCTL_I2SMCLKCFG 0x400FE170 // I2S MCLK Configuration +#define SYSCTL_DC9 0x400FE190 // Device Capabilities 9 ADC + // Digital Comparators +#define SYSCTL_NVMSTAT 0x400FE1A0 // Non-Volatile Memory Information + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_0 0x00000000 // Initial DID0 register format + // definition for Stellaris(R) + // Sandstorm-class devices +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_SANDSTORM \ + 0x00000000 // Sandstorm-class Device +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_CLASS_DUSTDEVIL \ + 0x00030000 // Stellaris(R) DustDevil-class + // devices +#define SYSCTL_DID0_CLASS_TEMPEST \ + 0x00040000 // Stellaris(R) Tempest-class + // microcontrollers +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change +#define SYSCTL_DID0_MIN_3 0x00000003 // Minor revision 3 +#define SYSCTL_DID0_MIN_4 0x00000004 // Minor revision 4 +#define SYSCTL_DID0_MIN_5 0x00000005 // Minor revision 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_0 0x00000000 // Initial DID1 register format + // definition, indicating a + // Stellaris LM3Snnn device +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_101 0x00010000 // LM3S101 +#define SYSCTL_DID1_PRTNO_102 0x00020000 // LM3S102 +#define SYSCTL_DID1_PRTNO_300 0x00190000 // LM3S300 +#define SYSCTL_DID1_PRTNO_301 0x00110000 // LM3S301 +#define SYSCTL_DID1_PRTNO_308 0x001A0000 // LM3S308 +#define SYSCTL_DID1_PRTNO_310 0x00120000 // LM3S310 +#define SYSCTL_DID1_PRTNO_315 0x00130000 // LM3S315 +#define SYSCTL_DID1_PRTNO_316 0x00140000 // LM3S316 +#define SYSCTL_DID1_PRTNO_317 0x00170000 // LM3S317 +#define SYSCTL_DID1_PRTNO_328 0x00150000 // LM3S328 +#define SYSCTL_DID1_PRTNO_600 0x002A0000 // LM3S600 +#define SYSCTL_DID1_PRTNO_601 0x00210000 // LM3S601 +#define SYSCTL_DID1_PRTNO_608 0x002B0000 // LM3S608 +#define SYSCTL_DID1_PRTNO_610 0x00220000 // LM3S610 +#define SYSCTL_DID1_PRTNO_611 0x00230000 // LM3S611 +#define SYSCTL_DID1_PRTNO_612 0x00240000 // LM3S612 +#define SYSCTL_DID1_PRTNO_613 0x00250000 // LM3S613 +#define SYSCTL_DID1_PRTNO_615 0x00260000 // LM3S615 +#define SYSCTL_DID1_PRTNO_617 0x00280000 // LM3S617 +#define SYSCTL_DID1_PRTNO_618 0x00290000 // LM3S618 +#define SYSCTL_DID1_PRTNO_628 0x00270000 // LM3S628 +#define SYSCTL_DID1_PRTNO_800 0x00380000 // LM3S800 +#define SYSCTL_DID1_PRTNO_801 0x00310000 // LM3S801 +#define SYSCTL_DID1_PRTNO_808 0x00390000 // LM3S808 +#define SYSCTL_DID1_PRTNO_811 0x00320000 // LM3S811 +#define SYSCTL_DID1_PRTNO_812 0x00330000 // LM3S812 +#define SYSCTL_DID1_PRTNO_815 0x00340000 // LM3S815 +#define SYSCTL_DID1_PRTNO_817 0x00360000 // LM3S817 +#define SYSCTL_DID1_PRTNO_818 0x00370000 // LM3S818 +#define SYSCTL_DID1_PRTNO_828 0x00350000 // LM3S828 +#define SYSCTL_DID1_PRTNO_1110 0x00BF0000 // LM3S1110 +#define SYSCTL_DID1_PRTNO_1133 0x00C30000 // LM3S1133 +#define SYSCTL_DID1_PRTNO_1138 0x00C50000 // LM3S1138 +#define SYSCTL_DID1_PRTNO_1150 0x00C10000 // LM3S1150 +#define SYSCTL_DID1_PRTNO_1162 0x00C40000 // LM3S1162 +#define SYSCTL_DID1_PRTNO_1165 0x00C20000 // LM3S1165 +#define SYSCTL_DID1_PRTNO_1332 0x00C60000 // LM3S1332 +#define SYSCTL_DID1_PRTNO_1435 0x00BC0000 // LM3S1435 +#define SYSCTL_DID1_PRTNO_1439 0x00BA0000 // LM3S1439 +#define SYSCTL_DID1_PRTNO_1512 0x00BB0000 // LM3S1512 +#define SYSCTL_DID1_PRTNO_1538 0x00C70000 // LM3S1538 +#define SYSCTL_DID1_PRTNO_1601 0x00DB0000 // LM3S1601 +#define SYSCTL_DID1_PRTNO_1607 0x00060000 // LM3S1607 +#define SYSCTL_DID1_PRTNO_1608 0x00DA0000 // LM3S1608 +#define SYSCTL_DID1_PRTNO_1620 0x00C00000 // LM3S1620 +#define SYSCTL_DID1_PRTNO_1625 0x00030000 // LM3S1625 +#define SYSCTL_DID1_PRTNO_1626 0x00040000 // LM3S1626 +#define SYSCTL_DID1_PRTNO_1627 0x00050000 // LM3S1627 +#define SYSCTL_DID1_PRTNO_1635 0x00B30000 // LM3S1635 +#define SYSCTL_DID1_PRTNO_1637 0x00BD0000 // LM3S1637 +#define SYSCTL_DID1_PRTNO_1651 0x00B10000 // LM3S1651 +#define SYSCTL_DID1_PRTNO_1751 0x00B90000 // LM3S1751 +#define SYSCTL_DID1_PRTNO_1776 0x00100000 // LM3S1776 +#define SYSCTL_DID1_PRTNO_1811 0x00160000 // LM3S1811 +#define SYSCTL_DID1_PRTNO_1816 0x003D0000 // LM3S1816 +#define SYSCTL_DID1_PRTNO_1850 0x00B40000 // LM3S1850 +#define SYSCTL_DID1_PRTNO_1911 0x00DD0000 // LM3S1911 +#define SYSCTL_DID1_PRTNO_1918 0x00DC0000 // LM3S1918 +#define SYSCTL_DID1_PRTNO_1937 0x00B70000 // LM3S1937 +#define SYSCTL_DID1_PRTNO_1958 0x00BE0000 // LM3S1958 +#define SYSCTL_DID1_PRTNO_1960 0x00B50000 // LM3S1960 +#define SYSCTL_DID1_PRTNO_1968 0x00B80000 // LM3S1968 +#define SYSCTL_DID1_PRTNO_1J11 0x000F0000 // LM3S1J11 +#define SYSCTL_DID1_PRTNO_1J16 0x003C0000 // LM3S1J16 +#define SYSCTL_DID1_PRTNO_1N11 0x000E0000 // LM3S1N11 +#define SYSCTL_DID1_PRTNO_1N16 0x003B0000 // LM3S1N16 +#define SYSCTL_DID1_PRTNO_1P51 0x00B20000 // LM3S1P51 +#define SYSCTL_DID1_PRTNO_1R21 0x009E0000 // LM3S1R21 +#define SYSCTL_DID1_PRTNO_1W16 0x00300000 // LM3S1W16 +#define SYSCTL_DID1_PRTNO_1Z16 0x002F0000 // LM3S1Z16 +#define SYSCTL_DID1_PRTNO_2110 0x00510000 // LM3S2110 +#define SYSCTL_DID1_PRTNO_2139 0x00840000 // LM3S2139 +#define SYSCTL_DID1_PRTNO_2276 0x00390000 // LM3S2276 +#define SYSCTL_DID1_PRTNO_2410 0x00A20000 // LM3S2410 +#define SYSCTL_DID1_PRTNO_2412 0x00590000 // LM3S2412 +#define SYSCTL_DID1_PRTNO_2432 0x00560000 // LM3S2432 +#define SYSCTL_DID1_PRTNO_2533 0x005A0000 // LM3S2533 +#define SYSCTL_DID1_PRTNO_2601 0x00E10000 // LM3S2601 +#define SYSCTL_DID1_PRTNO_2608 0x00E00000 // LM3S2608 +#define SYSCTL_DID1_PRTNO_2616 0x00330000 // LM3S2616 +#define SYSCTL_DID1_PRTNO_2620 0x00570000 // LM3S2620 +#define SYSCTL_DID1_PRTNO_2637 0x00850000 // LM3S2637 +#define SYSCTL_DID1_PRTNO_2651 0x00530000 // LM3S2651 +#define SYSCTL_DID1_PRTNO_2671 0x00800000 // LM3S2671 +#define SYSCTL_DID1_PRTNO_2678 0x00500000 // LM3S2678 +#define SYSCTL_DID1_PRTNO_2730 0x00A40000 // LM3S2730 +#define SYSCTL_DID1_PRTNO_2739 0x00520000 // LM3S2739 +#define SYSCTL_DID1_PRTNO_2776 0x003A0000 // LM3S2776 +#define SYSCTL_DID1_PRTNO_2793 0x006D0000 // LM3S2793 +#define SYSCTL_DID1_PRTNO_2911 0x00E30000 // LM3S2911 +#define SYSCTL_DID1_PRTNO_2918 0x00E20000 // LM3S2918 +#define SYSCTL_DID1_PRTNO_2939 0x00540000 // LM3S2939 +#define SYSCTL_DID1_PRTNO_2948 0x008F0000 // LM3S2948 +#define SYSCTL_DID1_PRTNO_2950 0x00580000 // LM3S2950 +#define SYSCTL_DID1_PRTNO_2965 0x00550000 // LM3S2965 +#define SYSCTL_DID1_PRTNO_2B93 0x006C0000 // LM3S2B93 +#define SYSCTL_DID1_PRTNO_3634 0x00080000 // LM3S3634 +#define SYSCTL_DID1_PRTNO_3651 0x00430000 // LM3S3651 +#define SYSCTL_DID1_PRTNO_3739 0x00440000 // LM3S3739 +#define SYSCTL_DID1_PRTNO_3748 0x00490000 // LM3S3748 +#define SYSCTL_DID1_PRTNO_3749 0x00450000 // LM3S3749 +#define SYSCTL_DID1_PRTNO_3826 0x00420000 // LM3S3826 +#define SYSCTL_DID1_PRTNO_3J26 0x00410000 // LM3S3J26 +#define SYSCTL_DID1_PRTNO_3N26 0x00400000 // LM3S3N26 +#define SYSCTL_DID1_PRTNO_3W26 0x003F0000 // LM3S3W26 +#define SYSCTL_DID1_PRTNO_3Z26 0x003E0000 // LM3S3Z26 +#define SYSCTL_DID1_PRTNO_5632 0x00810000 // LM3S5632 +#define SYSCTL_DID1_PRTNO_5651 0x000C0000 // LM3S5651 +#define SYSCTL_DID1_PRTNO_5652 0x008A0000 // LM3S5652 +#define SYSCTL_DID1_PRTNO_5656 0x004D0000 // LM3S5656 +#define SYSCTL_DID1_PRTNO_5662 0x00910000 // LM3S5662 +#define SYSCTL_DID1_PRTNO_5732 0x00960000 // LM3S5732 +#define SYSCTL_DID1_PRTNO_5737 0x00970000 // LM3S5737 +#define SYSCTL_DID1_PRTNO_5739 0x00A00000 // LM3S5739 +#define SYSCTL_DID1_PRTNO_5747 0x00990000 // LM3S5747 +#define SYSCTL_DID1_PRTNO_5749 0x00A70000 // LM3S5749 +#define SYSCTL_DID1_PRTNO_5752 0x009A0000 // LM3S5752 +#define SYSCTL_DID1_PRTNO_5762 0x009C0000 // LM3S5762 +#define SYSCTL_DID1_PRTNO_5791 0x00690000 // LM3S5791 +#define SYSCTL_DID1_PRTNO_5951 0x000B0000 // LM3S5951 +#define SYSCTL_DID1_PRTNO_5956 0x004E0000 // LM3S5956 +#define SYSCTL_DID1_PRTNO_5B91 0x00680000 // LM3S5B91 +#define SYSCTL_DID1_PRTNO_5K31 0x00090000 // LM3S5K31 +#define SYSCTL_DID1_PRTNO_5K36 0x004A0000 // LM3S5K36 +#define SYSCTL_DID1_PRTNO_5P31 0x000A0000 // LM3S5P31 +#define SYSCTL_DID1_PRTNO_5P36 0x00480000 // LM3S5P36 +#define SYSCTL_DID1_PRTNO_5P51 0x000D0000 // LM3S5P51 +#define SYSCTL_DID1_PRTNO_5P56 0x004C0000 // LM3S5P56 +#define SYSCTL_DID1_PRTNO_5R31 0x00070000 // LM3S5R31 +#define SYSCTL_DID1_PRTNO_5R36 0x004B0000 // LM3S5R36 +#define SYSCTL_DID1_PRTNO_5T36 0x00470000 // LM3S5T36 +#define SYSCTL_DID1_PRTNO_5Y36 0x00460000 // LM3S5Y36 +#define SYSCTL_DID1_PRTNO_6100 0x00A10000 // LM3S6100 +#define SYSCTL_DID1_PRTNO_6110 0x00740000 // LM3S6110 +#define SYSCTL_DID1_PRTNO_6420 0x00A50000 // LM3S6420 +#define SYSCTL_DID1_PRTNO_6422 0x00820000 // LM3S6422 +#define SYSCTL_DID1_PRTNO_6432 0x00750000 // LM3S6432 +#define SYSCTL_DID1_PRTNO_6537 0x00760000 // LM3S6537 +#define SYSCTL_DID1_PRTNO_6610 0x00710000 // LM3S6610 +#define SYSCTL_DID1_PRTNO_6611 0x00E70000 // LM3S6611 +#define SYSCTL_DID1_PRTNO_6618 0x00E60000 // LM3S6618 +#define SYSCTL_DID1_PRTNO_6633 0x00830000 // LM3S6633 +#define SYSCTL_DID1_PRTNO_6637 0x008B0000 // LM3S6637 +#define SYSCTL_DID1_PRTNO_6730 0x00A30000 // LM3S6730 +#define SYSCTL_DID1_PRTNO_6753 0x00770000 // LM3S6753 +#define SYSCTL_DID1_PRTNO_6911 0x00E90000 // LM3S6911 +#define SYSCTL_DID1_PRTNO_6918 0x00E80000 // LM3S6918 +#define SYSCTL_DID1_PRTNO_6938 0x00890000 // LM3S6938 +#define SYSCTL_DID1_PRTNO_6950 0x00720000 // LM3S6950 +#define SYSCTL_DID1_PRTNO_6952 0x00780000 // LM3S6952 +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PRTNO_8530 0x00640000 // LM3S8530 +#define SYSCTL_DID1_PRTNO_8538 0x008E0000 // LM3S8538 +#define SYSCTL_DID1_PRTNO_8630 0x00610000 // LM3S8630 +#define SYSCTL_DID1_PRTNO_8730 0x00630000 // LM3S8730 +#define SYSCTL_DID1_PRTNO_8733 0x008D0000 // LM3S8733 +#define SYSCTL_DID1_PRTNO_8738 0x00860000 // LM3S8738 +#define SYSCTL_DID1_PRTNO_8930 0x00650000 // LM3S8930 +#define SYSCTL_DID1_PRTNO_8933 0x008C0000 // LM3S8933 +#define SYSCTL_DID1_PRTNO_8938 0x00880000 // LM3S8938 +#define SYSCTL_DID1_PRTNO_8962 0x00A60000 // LM3S8962 +#define SYSCTL_DID1_PRTNO_8970 0x00620000 // LM3S8970 +#define SYSCTL_DID1_PRTNO_8971 0x00D70000 // LM3S8971 +#define SYSCTL_DID1_PRTNO_9790 0x00670000 // LM3S9790 +#define SYSCTL_DID1_PRTNO_9792 0x006B0000 // LM3S9792 +#define SYSCTL_DID1_PRTNO_9997 0x00200000 // LM3S9997 +#define SYSCTL_DID1_PRTNO_9B90 0x00660000 // LM3S9B90 +#define SYSCTL_DID1_PRTNO_9B92 0x006A0000 // LM3S9B92 +#define SYSCTL_DID1_PRTNO_9B95 0x006E0000 // LM3S9B95 +#define SYSCTL_DID1_PRTNO_9B96 0x006F0000 // LM3S9B96 +#define SYSCTL_DID1_PRTNO_9L97 0x00180000 // LM3S9L97 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_28 0x00000000 // 28 pin package +#define SYSCTL_DID1_PINCNT_48 0x00002000 // 48-pin package +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_PINCNT_64 0x00006000 // 64-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_PKG_QFN 0x00000018 // QFN package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified +#define SYSCTL_DID1_PRTNO_S 16 // Part number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_2KB 0x00070000 // 2 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_4KB 0x000F0000 // 4 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_6KB 0x00170000 // 6 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_8KB 0x001F0000 // 8 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_12KB 0x002F0000 // 12 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_16KB 0x003F0000 // 16 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_20KB 0x004F0000 // 20 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_24KB 0x005F0000 // 24 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_32KB 0x007F0000 // 32 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_96KB 0x017F0000 // 96 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_8KB 0x00000003 // 8 KB of Flash +#define SYSCTL_DC0_FLASHSZ_16KB 0x00000007 // 16 KB of Flash +#define SYSCTL_DC0_FLASHSZ_32KB 0x0000000F // 32 KB of Flash +#define SYSCTL_DC0_FLASHSZ_64KB 0x0000001F // 64 KB of Flash +#define SYSCTL_DC0_FLASHSZ_96KB 0x0000002F // 96 KB of Flash +#define SYSCTL_DC0_FLASHSZ_128K 0x0000003F // 128 KB of Flash +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT1 0x10000000 // Watchdog Timer1 Present +#define SYSCTL_DC1_CAN2 0x04000000 // CAN Module 2 Present +#define SYSCTL_DC1_CAN1 0x02000000 // CAN Module 1 Present +#define SYSCTL_DC1_CAN0 0x01000000 // CAN Module 0 Present +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC1 0x00020000 // ADC Module 1 Present +#define SYSCTL_DC1_ADC0 0x00010000 // ADC Module 0 Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_100 \ + 0x00001000 // Divide VCO (400MHZ) by 5 minimum +#define SYSCTL_DC1_MINSYSDIV_66 0x00002000 // Divide VCO (400MHZ) by 2*2 + 2 = + // 6 minimum +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_MINSYSDIV_25 0x00007000 // Specifies a 25-MHz clock with a + // PLL divider of 8 +#define SYSCTL_DC1_MINSYSDIV_20 0x00009000 // Specifies a 20-MHz clock with a + // PLL divider of 10 +#define SYSCTL_DC1_ADCSPD_M 0x00000F00 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_DC1_ADCSPD_250K 0x00000100 // 250K samples/second +#define SYSCTL_DC1_ADCSPD_500K 0x00000200 // 500K samples/second +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_ADC1SPD_M 0x00000C00 // Max ADC1 Speed +#define SYSCTL_DC1_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_DC1_ADC0SPD_M 0x00000300 // Max ADC0 Speed +#define SYSCTL_DC1_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_EPI0 0x40000000 // EPI Module 0 Present +#define SYSCTL_DC2_I2S0 0x10000000 // I2S Module 0 Present +#define SYSCTL_DC2_COMP2 0x04000000 // Analog Comparator 2 Present +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI1 0x00000020 // SSI Module 1 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP5 0x20000000 // CCP5 Pin Present +#define SYSCTL_DC3_CCP4 0x10000000 // CCP4 Pin Present +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC0AIN7 0x00800000 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC3_ADC0AIN6 0x00400000 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC3_ADC0AIN5 0x00200000 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC3_ADC0AIN4 0x00100000 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC3_ADC0AIN3 0x00080000 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC3_ADC0AIN2 0x00040000 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC3_ADC0AIN1 0x00020000 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC3_ADC0AIN0 0x00010000 // ADC Module 0 AIN0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C2O 0x00004000 // C2o Pin Present +#define SYSCTL_DC3_C2PLUS 0x00002000 // C2+ Pin Present +#define SYSCTL_DC3_C2MINUS 0x00001000 // C2- Pin Present +#define SYSCTL_DC3_C1O 0x00000800 // C1o Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_ETH 0x50000000 // Ethernet present +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_E1588 0x01000000 // 1588 Capable +#define SYSCTL_DC4_PICAL 0x00040000 // PIOSC Calibrate +#define SYSCTL_DC4_CCP7 0x00008000 // CCP7 Pin Present +#define SYSCTL_DC4_CCP6 0x00004000 // CCP6 Pin Present +#define SYSCTL_DC4_UDMA 0x00002000 // Micro-DMA Module Present +#define SYSCTL_DC4_ROM 0x00001000 // Internal Code ROM Present +#define SYSCTL_DC4_GPIOJ 0x00000100 // GPIO Port J Present +#define SYSCTL_DC4_GPIOH 0x00000080 // GPIO Port H Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC5 register. +// +//***************************************************************************** +#define SYSCTL_DC5_PWMFAULT3 0x08000000 // PWM Fault 3 Pin Present +#define SYSCTL_DC5_PWMFAULT2 0x04000000 // PWM Fault 2 Pin Present +#define SYSCTL_DC5_PWMFAULT1 0x02000000 // PWM Fault 1 Pin Present +#define SYSCTL_DC5_PWMFAULT0 0x01000000 // PWM Fault 0 Pin Present +#define SYSCTL_DC5_PWMEFLT 0x00200000 // PWM Extended Fault Active +#define SYSCTL_DC5_PWMESYNC 0x00100000 // PWM Extended SYNC Active +#define SYSCTL_DC5_PWM7 0x00000080 // PWM7 Pin Present +#define SYSCTL_DC5_PWM6 0x00000040 // PWM6 Pin Present +#define SYSCTL_DC5_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC5_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC5_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC5_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC5_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC5_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC6 register. +// +//***************************************************************************** +#define SYSCTL_DC6_USB0PHY 0x00000010 // USB Module 0 PHY Present +#define SYSCTL_DC6_USB0_M 0x00000003 // USB Module 0 Present +#define SYSCTL_DC6_USB0_DEV 0x00000001 // USB0 is Device Only +#define SYSCTL_DC6_USB0_HOSTDEV 0x00000002 // USB is Device or Host +#define SYSCTL_DC6_USB0_OTG 0x00000003 // USB0 is OTG + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC7 register. +// +//***************************************************************************** +#define SYSCTL_DC7_SW 0x40000000 // Software transfer on uDMA Ch30 +#define SYSCTL_DC7_DMACH30 0x40000000 // SW +#define SYSCTL_DC7_DMACH29 0x20000000 // I2S0_TX / CAN1_TX +#define SYSCTL_DC7_DMACH28 0x10000000 // I2S0_RX / CAN1_RX +#define SYSCTL_DC7_DMACH27 0x08000000 // CAN1_TX / ADC1_SS3 +#define SYSCTL_DC7_DMACH26 0x04000000 // CAN1_RX / ADC1_SS2 +#define SYSCTL_DC7_DMACH25 0x02000000 // SSI1_TX / ADC1_SS1 +#define SYSCTL_DC7_SSI1_TX 0x02000000 // SSI1 TX on uDMA Ch25 +#define SYSCTL_DC7_SSI1_RX 0x01000000 // SSI1 RX on uDMA Ch24 +#define SYSCTL_DC7_DMACH24 0x01000000 // SSI1_RX / ADC1_SS0 +#define SYSCTL_DC7_UART1_TX 0x00800000 // UART1 TX on uDMA Ch23 +#define SYSCTL_DC7_DMACH23 0x00800000 // UART1_TX / CAN2_TX +#define SYSCTL_DC7_DMACH22 0x00400000 // UART1_RX / CAN2_RX +#define SYSCTL_DC7_UART1_RX 0x00400000 // UART1 RX on uDMA Ch22 +#define SYSCTL_DC7_DMACH21 0x00200000 // Timer1B / EPI0_WFIFO +#define SYSCTL_DC7_DMACH20 0x00100000 // Timer1A / EPI0_NBRFIFO +#define SYSCTL_DC7_DMACH19 0x00080000 // Timer0B / Timer1B +#define SYSCTL_DC7_DMACH18 0x00040000 // Timer0A / Timer1A +#define SYSCTL_DC7_DMACH17 0x00020000 // ADC0_SS3 +#define SYSCTL_DC7_DMACH16 0x00010000 // ADC0_SS2 +#define SYSCTL_DC7_DMACH15 0x00008000 // ADC0_SS1 / Timer2B +#define SYSCTL_DC7_DMACH14 0x00004000 // ADC0_SS0 / Timer2A +#define SYSCTL_DC7_DMACH13 0x00002000 // CAN0_TX / UART2_TX +#define SYSCTL_DC7_DMACH12 0x00001000 // CAN0_RX / UART2_RX +#define SYSCTL_DC7_SSI0_TX 0x00000800 // SSI0 TX on uDMA Ch11 +#define SYSCTL_DC7_DMACH11 0x00000800 // SSI0_TX / SSI1_TX +#define SYSCTL_DC7_SSI0_RX 0x00000400 // SSI0 RX on uDMA Ch10 +#define SYSCTL_DC7_DMACH10 0x00000400 // SSI0_RX / SSI1_RX +#define SYSCTL_DC7_UART0_TX 0x00000200 // UART0 TX on uDMA Ch9 +#define SYSCTL_DC7_DMACH9 0x00000200 // UART0_TX / UART1_TX +#define SYSCTL_DC7_DMACH8 0x00000100 // UART0_RX / UART1_RX +#define SYSCTL_DC7_UART0_RX 0x00000100 // UART0 RX on uDMA Ch8 +#define SYSCTL_DC7_DMACH7 0x00000080 // ETH_TX / Timer2B +#define SYSCTL_DC7_DMACH6 0x00000040 // ETH_RX / Timer2A +#define SYSCTL_DC7_DMACH5 0x00000020 // USB_EP3_TX / Timer2B +#define SYSCTL_DC7_USB_EP3_TX 0x00000020 // USB EP3 TX on uDMA Ch5 +#define SYSCTL_DC7_USB_EP3_RX 0x00000010 // USB EP3 RX on uDMA Ch4 +#define SYSCTL_DC7_DMACH4 0x00000010 // USB_EP3_RX / Timer2A +#define SYSCTL_DC7_USB_EP2_TX 0x00000008 // USB EP2 TX on uDMA Ch3 +#define SYSCTL_DC7_DMACH3 0x00000008 // USB_EP2_TX / Timer3B +#define SYSCTL_DC7_USB_EP2_RX 0x00000004 // USB EP2 RX on uDMA Ch2 +#define SYSCTL_DC7_DMACH2 0x00000004 // USB_EP2_RX / Timer3A +#define SYSCTL_DC7_USB_EP1_TX 0x00000002 // USB EP1 TX on uDMA Ch1 +#define SYSCTL_DC7_DMACH1 0x00000002 // USB_EP1_TX / UART2_TX +#define SYSCTL_DC7_DMACH0 0x00000001 // USB_EP1_RX / UART2_RX +#define SYSCTL_DC7_USB_EP1_RX 0x00000001 // USB EP1 RX on uDMA Ch0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC8 register. +// +//***************************************************************************** +#define SYSCTL_DC8_ADC1AIN15 0x80000000 // ADC Module 1 AIN15 Pin Present +#define SYSCTL_DC8_ADC1AIN14 0x40000000 // ADC Module 1 AIN14 Pin Present +#define SYSCTL_DC8_ADC1AIN13 0x20000000 // ADC Module 1 AIN13 Pin Present +#define SYSCTL_DC8_ADC1AIN12 0x10000000 // ADC Module 1 AIN12 Pin Present +#define SYSCTL_DC8_ADC1AIN11 0x08000000 // ADC Module 1 AIN11 Pin Present +#define SYSCTL_DC8_ADC1AIN10 0x04000000 // ADC Module 1 AIN10 Pin Present +#define SYSCTL_DC8_ADC1AIN9 0x02000000 // ADC Module 1 AIN9 Pin Present +#define SYSCTL_DC8_ADC1AIN8 0x01000000 // ADC Module 1 AIN8 Pin Present +#define SYSCTL_DC8_ADC1AIN7 0x00800000 // ADC Module 1 AIN7 Pin Present +#define SYSCTL_DC8_ADC1AIN6 0x00400000 // ADC Module 1 AIN6 Pin Present +#define SYSCTL_DC8_ADC1AIN5 0x00200000 // ADC Module 1 AIN5 Pin Present +#define SYSCTL_DC8_ADC1AIN4 0x00100000 // ADC Module 1 AIN4 Pin Present +#define SYSCTL_DC8_ADC1AIN3 0x00080000 // ADC Module 1 AIN3 Pin Present +#define SYSCTL_DC8_ADC1AIN2 0x00040000 // ADC Module 1 AIN2 Pin Present +#define SYSCTL_DC8_ADC1AIN1 0x00020000 // ADC Module 1 AIN1 Pin Present +#define SYSCTL_DC8_ADC1AIN0 0x00010000 // ADC Module 1 AIN0 Pin Present +#define SYSCTL_DC8_ADC0AIN15 0x00008000 // ADC Module 0 AIN15 Pin Present +#define SYSCTL_DC8_ADC0AIN14 0x00004000 // ADC Module 0 AIN14 Pin Present +#define SYSCTL_DC8_ADC0AIN13 0x00002000 // ADC Module 0 AIN13 Pin Present +#define SYSCTL_DC8_ADC0AIN12 0x00001000 // ADC Module 0 AIN12 Pin Present +#define SYSCTL_DC8_ADC0AIN11 0x00000800 // ADC Module 0 AIN11 Pin Present +#define SYSCTL_DC8_ADC0AIN10 0x00000400 // ADC Module 0 AIN10 Pin Present +#define SYSCTL_DC8_ADC0AIN9 0x00000200 // ADC Module 0 AIN9 Pin Present +#define SYSCTL_DC8_ADC0AIN8 0x00000100 // ADC Module 0 AIN8 Pin Present +#define SYSCTL_DC8_ADC0AIN7 0x00000080 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC8_ADC0AIN6 0x00000040 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC8_ADC0AIN5 0x00000020 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC8_ADC0AIN4 0x00000010 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC8_ADC0AIN3 0x00000008 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC8_ADC0AIN2 0x00000004 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC8_ADC0AIN1 0x00000002 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC8_ADC0AIN0 0x00000001 // ADC Module 0 AIN0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORTIM_M 0x0000FFFC // BOR Time Delay +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset +#define SYSCTL_PBORCTL_BORWT 0x00000001 // BOR Wait and Check for Noise +#define SYSCTL_PBORCTL_BORTIM_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_WDT1 0x10000000 // WDT1 Reset Control +#define SYSCTL_SRCR0_CAN2 0x04000000 // CAN2 Reset Control +#define SYSCTL_SRCR0_CAN1 0x02000000 // CAN1 Reset Control +#define SYSCTL_SRCR0_CAN0 0x01000000 // CAN0 Reset Control +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC1 0x00020000 // ADC1 Reset Control +#define SYSCTL_SRCR0_ADC0 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT0 0x00000008 // WDT0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_EPI0 0x40000000 // EPI0 Reset Control +#define SYSCTL_SRCR1_I2S0 0x10000000 // I2S0 Reset Control +#define SYSCTL_SRCR1_COMP2 0x04000000 // Analog Comp 2 Reset Control +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI1 0x00000020 // SSI1 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_USB0 0x00010000 // USB0 Reset Control +#define SYSCTL_SRCR2_UDMA 0x00002000 // Micro-DMA Reset Control +#define SYSCTL_SRCR2_GPIOJ 0x00000100 // Port J Reset Control +#define SYSCTL_SRCR2_GPIOH 0x00000080 // Port H Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_MOSCPUPRIS 0x00000100 // MOSC Power Up Raw Interrupt + // Status +#define SYSCTL_RIS_USBPLLLRIS 0x00000080 // USB PLL Lock Raw Interrupt + // Status +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_CLRIS 0x00000020 // Current Limit Raw Interrupt + // Status +#define SYSCTL_RIS_IOFRIS 0x00000010 // Internal Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_MOFRIS 0x00000008 // Main Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_LDORIS 0x00000004 // LDO Power Unregulated Raw + // Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status +#define SYSCTL_RIS_PLLFRIS 0x00000001 // PLL Fault Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_MOSCPUPIM 0x00000100 // MOSC Power Up Interrupt Mask +#define SYSCTL_IMC_USBPLLLIM 0x00000080 // USB PLL Lock Interrupt Mask +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_CLIM 0x00000020 // Current Limit Interrupt Mask +#define SYSCTL_IMC_IOFIM 0x00000010 // Internal Oscillator Fault + // Interrupt Mask +#define SYSCTL_IMC_MOFIM 0x00000008 // Main Oscillator Fault Interrupt + // Mask +#define SYSCTL_IMC_LDOIM 0x00000004 // LDO Power Unregulated Interrupt + // Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask +#define SYSCTL_IMC_PLLFIM 0x00000001 // PLL Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_MOSCPUPMIS 0x00000100 // MOSC Power Up Masked Interrupt + // Status +#define SYSCTL_MISC_USBPLLLMIS 0x00000080 // USB PLL Lock Masked Interrupt + // Status +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_CLMIS 0x00000020 // Current Limit Masked Interrupt + // Status +#define SYSCTL_MISC_IOFMIS 0x00000010 // Internal Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_MOFMIS 0x00000008 // Main Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_LDOMIS 0x00000004 // LDO Power Unregulated Masked + // Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_MOSCFAIL 0x00010000 // MOSC Failure Reset +#define SYSCTL_RESC_LDO 0x00000020 // LDO Reset +#define SYSCTL_RESC_WDT1 0x00000020 // Watchdog Timer 1 Reset +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT0 0x00000008 // Watchdog Timer 0 Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_OEN 0x00001000 // PLL Output Enable +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000007C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_XTAL_10MHZ 0x00000400 // 10 MHz +#define SYSCTL_RCC_XTAL_12MHZ 0x00000440 // 12 MHz +#define SYSCTL_RCC_XTAL_12_2MHZ 0x00000480 // 12.288 MHz +#define SYSCTL_RCC_XTAL_13_5MHZ 0x000004C0 // 13.56 MHz +#define SYSCTL_RCC_XTAL_14_3MHZ 0x00000500 // 14.31818 MHz +#define SYSCTL_RCC_XTAL_16MHZ 0x00000540 // 16 MHz +#define SYSCTL_RCC_XTAL_16_3MHZ 0x00000580 // 16.384 MHz +#define SYSCTL_RCC_PLLVER 0x00000400 // PLL Verification +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCVER 0x00000008 // Internal Oscillator Verification + // Timer +#define SYSCTL_RCC_MOSCVER 0x00000004 // Main Oscillator Verification + // Timer +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 +#define SYSCTL_RCC_PWMDIV_S 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_S 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_S 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_M 0x0000C000 // PLL OD Value +#define SYSCTL_PLLCFG_OD_1 0x00000000 // Divide by 1 +#define SYSCTL_PLLCFG_OD_2 0x00004000 // Divide by 2 +#define SYSCTL_PLLCFG_OD_4 0x00008000 // Divide by 4 +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_GPIOHBCTL +// register. +// +//***************************************************************************** +#define SYSCTL_GPIOHBCTL_PORTJ 0x00000100 // Port J Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTH 0x00000080 // Port H Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTG 0x00000040 // Port G Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTF 0x00000020 // Port F Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTE 0x00000010 // Port E Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTD 0x00000008 // Port D Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTC 0x00000004 // Port C Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTB 0x00000002 // Port B Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTA 0x00000001 // Port A Advanced High-Performance + // Bus + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_DIV400 0x40000000 // Divide PLL as 400 MHz vs. 200 + // MHz +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_SYSDIV2LSB 0x00400000 // Additional LSB for SYSDIV2 +#define SYSCTL_RCC2_USBPWRDN 0x00004000 // Power-Down USB PLL +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_419 0x00000060 // 4.194304 MHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MOSCCTL register. +// +//***************************************************************************** +#define SYSCTL_MOSCCTL_CVAL 0x00000001 // Clock Validation for MOSC + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_RCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_RCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_RCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_RCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_RCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_RCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_RCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_RCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_RCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_RCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_RCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_RCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_RCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_RCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_SCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_SCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_SCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_SCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_SCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_SCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_SCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_SCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_SCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_SCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_SCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_SCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_SCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_SCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_DCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_DCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_DCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_DCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_DCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_DCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_DCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_DCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_DCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_IOSC 0x00000001 // IOSC Clock Source +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCCAL +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCCAL_UTEN 0x80000000 // Use User Trim Value +#define SYSCTL_PIOSCCAL_CAL 0x00000200 // Start Calibration +#define SYSCTL_PIOSCCAL_UPDATE 0x00000100 // Update Trim +#define SYSCTL_PIOSCCAL_UT_M 0x0000007F // User Trim Value +#define SYSCTL_PIOSCCAL_UT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_VERCLR 0x00000001 // Clock Verification Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCSTAT +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCSTAT_DT_M 0x007F0000 // Default Trim Value +#define SYSCTL_PIOSCSTAT_CR_M 0x00000300 // Calibration Result +#define SYSCTL_PIOSCSTAT_CRNONE 0x00000000 // Calibration has not been + // attempted +#define SYSCTL_PIOSCSTAT_CRPASS 0x00000100 // The last calibration operation + // completed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CRFAIL 0x00000200 // The last calibration operation + // failed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CT_M 0x0000007F // Calibration Trim Value +#define SYSCTL_PIOSCSTAT_DT_S 16 +#define SYSCTL_PIOSCSTAT_CT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_LDOARST 0x00000001 // LDO Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_I2SMCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_I2SMCLKCFG_RXEN 0x80000000 // RX Clock Enable +#define SYSCTL_I2SMCLKCFG_RXI_M 0x3FF00000 // RX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_RXF_M 0x000F0000 // RX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_TXEN 0x00008000 // TX Clock Enable +#define SYSCTL_I2SMCLKCFG_TXI_M 0x00003FF0 // TX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_TXF_M 0x0000000F // TX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_RXI_S 20 +#define SYSCTL_I2SMCLKCFG_RXF_S 16 +#define SYSCTL_I2SMCLKCFG_TXI_S 4 +#define SYSCTL_I2SMCLKCFG_TXF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC9 register. +// +//***************************************************************************** +#define SYSCTL_DC9_ADC1DC7 0x00800000 // ADC1 DC7 Present +#define SYSCTL_DC9_ADC1DC6 0x00400000 // ADC1 DC6 Present +#define SYSCTL_DC9_ADC1DC5 0x00200000 // ADC1 DC5 Present +#define SYSCTL_DC9_ADC1DC4 0x00100000 // ADC1 DC4 Present +#define SYSCTL_DC9_ADC1DC3 0x00080000 // ADC1 DC3 Present +#define SYSCTL_DC9_ADC1DC2 0x00040000 // ADC1 DC2 Present +#define SYSCTL_DC9_ADC1DC1 0x00020000 // ADC1 DC1 Present +#define SYSCTL_DC9_ADC1DC0 0x00010000 // ADC1 DC0 Present +#define SYSCTL_DC9_ADC0DC7 0x00000080 // ADC0 DC7 Present +#define SYSCTL_DC9_ADC0DC6 0x00000040 // ADC0 DC6 Present +#define SYSCTL_DC9_ADC0DC5 0x00000020 // ADC0 DC5 Present +#define SYSCTL_DC9_ADC0DC4 0x00000010 // ADC0 DC4 Present +#define SYSCTL_DC9_ADC0DC3 0x00000008 // ADC0 DC3 Present +#define SYSCTL_DC9_ADC0DC2 0x00000004 // ADC0 DC2 Present +#define SYSCTL_DC9_ADC0DC1 0x00000002 // ADC0 DC1 Present +#define SYSCTL_DC9_ADC0DC0 0x00000001 // ADC0 DC0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_NVMSTAT register. +// +//***************************************************************************** +#define SYSCTL_NVMSTAT_TPSW 0x00000010 // Third Party Software Present +#define SYSCTL_NVMSTAT_FWB 0x00000001 // 32 Word Flash Write Buffer + // Active + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the System Control register +// addresses. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL 0x400FE06C // GPIO High-Speed Control +#define SYSCTL_USER0 0x400FE1E0 // NV User Register 0 +#define SYSCTL_USER1 0x400FE1E4 // NV User Register 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID0 +// register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_MASK 0x70000000 // DID0 version mask +#define SYSCTL_DID0_CLASS_MASK 0x00FF0000 // Device Class +#define SYSCTL_DID0_MAJ_MASK 0x0000FF00 // Major revision mask +#define SYSCTL_DID0_MAJ_A 0x00000000 // Major revision A +#define SYSCTL_DID0_MAJ_B 0x00000100 // Major revision B +#define SYSCTL_DID0_MAJ_C 0x00000200 // Major revision C +#define SYSCTL_DID0_MIN_MASK 0x000000FF // Minor revision mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID1 +// register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_MASK 0xF0000000 // Register version mask +#define SYSCTL_DID1_FAM_MASK 0x0F000000 // Family mask +#define SYSCTL_DID1_FAM_S 0x00000000 // Stellaris family +#define SYSCTL_DID1_PRTNO_MASK 0x00FF0000 // Part number mask +#define SYSCTL_DID1_PINCNT_MASK 0x0000E000 // Pin count +#define SYSCTL_DID1_TEMP_MASK 0x000000E0 // Temperature range mask +#define SYSCTL_DID1_PKG_MASK 0x00000018 // Package mask +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package +#define SYSCTL_DID1_QUAL_MASK 0x00000003 // Qualification status mask +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PRTNO_SHIFT 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_MASK 0xFFFF0000 // SRAM size mask +#define SYSCTL_DC0_FLASHSZ_MASK 0x0000FFFF // Flash size mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC1 +// register. +// +//***************************************************************************** +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_SYSDIV_MASK 0x0000F000 // Minimum system divider mask +#define SYSCTL_DC1_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_DC1_WDOG 0x00000008 // Watchdog present +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC2 +// register. +// +//***************************************************************************** +#define SYSCTL_DC2_I2C 0x00001000 // I2C present +#define SYSCTL_DC2_QEI 0x00000100 // QEI present +#define SYSCTL_DC2_SSI 0x00000010 // SSI present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC3 +// register. +// +//***************************************************************************** +#define SYSCTL_DC3_ADC7 0x00800000 // ADC7 Pin Present +#define SYSCTL_DC3_ADC6 0x00400000 // ADC6 Pin Present +#define SYSCTL_DC3_ADC5 0x00200000 // ADC5 Pin Present +#define SYSCTL_DC3_ADC4 0x00100000 // ADC4 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_MC_FAULT0 0x00008000 // MC0 fault pin present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BOR_MASK 0x0000FFFC // BOR wait timer +#define SYSCTL_PBORCTL_BOR_SH 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_MASK 0x0000003F // Voltage adjust mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0 +// register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RESC +// register. +// +//***************************************************************************** +#define SYSCTL_RESC_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC +// register. +// +//***************************************************************************** +#define SYSCTL_RCC_SYSDIV_MASK 0x07800000 // System clock divider +#define SYSCTL_RCC_USE_SYSDIV 0x00400000 // Use sytem clock divider +#define SYSCTL_RCC_USE_PWMDIV 0x00100000 // Use PWM clock divider +#define SYSCTL_RCC_PWMDIV_MASK 0x000E0000 // PWM clock divider +#define SYSCTL_RCC_OE 0x00001000 // PLL output enable +#define SYSCTL_RCC_XTAL_3_68MHz 0x00000140 // Using a 3.6864 MHz crystal +#define SYSCTL_RCC_XTAL_4MHz 0x00000180 // Using a 4 MHz crystal +#define SYSCTL_RCC_XTAL_MASK 0x000003C0 // Crystal attached to main osc +#define SYSCTL_RCC_OSCSRC_MASK 0x00000030 // Oscillator input select +#define SYSCTL_RCC_SYSDIV_SHIFT 23 // Shift to the SYSDIV field +#define SYSCTL_RCC_PWMDIV_SHIFT 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_SHIFT 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_SHIFT 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_PLLCFG +// register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_MASK 0x0000C000 // Output divider +#define SYSCTL_PLLCFG_F_MASK 0x00003FE0 // PLL multiplier +#define SYSCTL_PLLCFG_R_MASK 0x0000001F // Input predivider +#define SYSCTL_PLLCFG_F_SHIFT 5 +#define SYSCTL_PLLCFG_R_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_GPIOHSCTL register. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL_PORTA 0x00000001 // Port A High-Speed +#define SYSCTL_GPIOHSCTL_PORTB 0x00000002 // Port B High-Speed +#define SYSCTL_GPIOHSCTL_PORTC 0x00000004 // Port C High-Speed +#define SYSCTL_GPIOHSCTL_PORTD 0x00000008 // Port D High-Speed +#define SYSCTL_GPIOHSCTL_PORTE 0x00000010 // Port E High-Speed +#define SYSCTL_GPIOHSCTL_PORTF 0x00000020 // Port F High-Speed +#define SYSCTL_GPIOHSCTL_PORTG 0x00000040 // Port G High-Speed +#define SYSCTL_GPIOHSCTL_PORTH 0x00000080 // Port H High-Speed + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC2 +// register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USEFRACT 0x40000000 // Use fractional divider +#define SYSCTL_RCC2_SYSDIV2_MSK 0x1F800000 // System clock divider +#define SYSCTL_RCC2_FRACT 0x00400000 // Fractional divide +#define SYSCTL_RCC2_OSCSRC2_MSK 0x00000070 // Oscillator input select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_DSLPCLKCFG register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_MSK 0x1F800000 // Deep sleep system clock override +#define SYSCTL_DSLPCLKCFG_O_MSK 0x00000070 // Deep sleep oscillator override + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_CLR 0x00000001 // Clear clock verification fault + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_ARST 0x00000001 // Allow LDO to reset device + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0, +// SYSCTL_RCGC0, SYSCTL_SCGC0, and SYSCTL_DCGC0 registers. +// +//***************************************************************************** +#define SYSCTL_SET0_CAN2 0x04000000 // CAN 2 module +#define SYSCTL_SET0_CAN1 0x02000000 // CAN 1 module +#define SYSCTL_SET0_CAN0 0x01000000 // CAN 0 module +#define SYSCTL_SET0_PWM 0x00100000 // PWM module +#define SYSCTL_SET0_ADC 0x00010000 // ADC module +#define SYSCTL_SET0_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_SET0_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_SET0_ADCSPD_250K 0x00000100 // 250Ksps ADC +#define SYSCTL_SET0_ADCSPD_500K 0x00000200 // 500Ksps ADC +#define SYSCTL_SET0_ADCSPD_1M 0x00000300 // 1Msps ADC +#define SYSCTL_SET0_HIB 0x00000040 // Hibernation module +#define SYSCTL_SET0_WDOG 0x00000008 // Watchdog module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR1, +// SYSCTL_RCGC1, SYSCTL_SCGC1, and SYSCTL_DCGC1 registers. +// +//***************************************************************************** +#define SYSCTL_SET1_COMP2 0x04000000 // Analog comparator module 2 +#define SYSCTL_SET1_COMP1 0x02000000 // Analog comparator module 1 +#define SYSCTL_SET1_COMP0 0x01000000 // Analog comparator module 0 +#define SYSCTL_SET1_TIMER3 0x00080000 // Timer module 3 +#define SYSCTL_SET1_TIMER2 0x00040000 // Timer module 2 +#define SYSCTL_SET1_TIMER1 0x00020000 // Timer module 1 +#define SYSCTL_SET1_TIMER0 0x00010000 // Timer module 0 +#define SYSCTL_SET1_I2C1 0x00002000 // I2C module 1 +#define SYSCTL_SET1_I2C0 0x00001000 // I2C module 0 +#define SYSCTL_SET1_I2C 0x00001000 // I2C module +#define SYSCTL_SET1_QEI1 0x00000200 // QEI module 1 +#define SYSCTL_SET1_QEI 0x00000100 // QEI module +#define SYSCTL_SET1_QEI0 0x00000100 // QEI module 0 +#define SYSCTL_SET1_SSI1 0x00000020 // SSI module 1 +#define SYSCTL_SET1_SSI0 0x00000010 // SSI module 0 +#define SYSCTL_SET1_SSI 0x00000010 // SSI module +#define SYSCTL_SET1_UART2 0x00000004 // UART module 2 +#define SYSCTL_SET1_UART1 0x00000002 // UART module 1 +#define SYSCTL_SET1_UART0 0x00000001 // UART module 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR2, +// SYSCTL_RCGC2, SYSCTL_SCGC2, and SYSCTL_DCGC2 registers. +// +//***************************************************************************** +#define SYSCTL_SET2_ETH 0x50000000 // ETH module +#define SYSCTL_SET2_GPIOH 0x00000080 // GPIO H module +#define SYSCTL_SET2_GPIOG 0x00000040 // GPIO G module +#define SYSCTL_SET2_GPIOF 0x00000020 // GPIO F module +#define SYSCTL_SET2_GPIOE 0x00000010 // GPIO E module +#define SYSCTL_SET2_GPIOD 0x00000008 // GPIO D module +#define SYSCTL_SET2_GPIOC 0x00000004 // GPIO C module +#define SYSCTL_SET2_GPIOB 0x00000002 // GPIO B module +#define SYSCTL_SET2_GPIOA 0x00000001 // GIPO A module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RIS, +// SYSCTL_IMC, and SYSCTL_IMS registers. +// +//***************************************************************************** +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +#endif + +#endif // __HW_SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_types.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_types.h new file mode 100644 index 00000000..c62428aa --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_types.h @@ -0,0 +1,185 @@ +//***************************************************************************** +// +// hw_types.h - Common types and macros. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TYPES_H__ +#define __HW_TYPES_H__ + +//***************************************************************************** +// +// Define a boolean type, and values for true and false. +// +//***************************************************************************** +typedef unsigned char tBoolean; + +#ifndef true +#define true 1 +#endif + +#ifndef false +#define false 0 +#endif + +//***************************************************************************** +// +// Macros for hardware access, both direct and via the bit-band region. +// +//***************************************************************************** +#define HWREG(x) \ + (*((volatile unsigned long *)(x))) +#define HWREGH(x) \ + (*((volatile unsigned short *)(x))) +#define HWREGB(x) \ + (*((volatile unsigned char *)(x))) +#define HWREGBITW(x, b) \ + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITH(x, b) \ + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITB(x, b) \ + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + +//***************************************************************************** +// +// Helper Macros for determining silicon revisions, etc. +// +// These macros will be used by Driverlib at "run-time" to create necessary +// conditional code blocks that will allow a single version of the Driverlib +// "binary" code to support multiple(all) Stellaris silicon revisions. +// +// It is expected that these macros will be used inside of a standard 'C' +// conditional block of code, e.g. +// +// if(CLASS_IS_SANDSTORM) +// { +// do some Sandstorm-class specific code here. +// } +// +// By default, these macros will be defined as run-time checks of the +// appropriate register(s) to allow creation of run-time conditional code +// blocks for a common DriverLib across the entire Stellaris family. +// +// However, if code-space optimization is required, these macros can be "hard- +// coded" for a specific version of Stellaris silicon. Many compilers will +// then detect the "hard-coded" conditionals, and appropriately optimize the +// code blocks, eliminating any "unreachable" code. This would result in +// a smaller Driverlib, thus producing a smaller final application size, but +// at the cost of limiting the Driverlib binary to a specific Stellaris +// silicon revision. +// +//***************************************************************************** +#ifndef CLASS_IS_SANDSTORM +#define CLASS_IS_SANDSTORM \ + (((HWREG(SYSCTL_DID0) & SYSCTL_DID0_VER_M) == SYSCTL_DID0_VER_0) || \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_SANDSTORM))) +#endif + +#ifndef CLASS_IS_FURY +#define CLASS_IS_FURY \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_FURY)) +#endif + +#ifndef CLASS_IS_DUSTDEVIL +#define CLASS_IS_DUSTDEVIL \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_DUSTDEVIL)) +#endif + +#ifndef CLASS_IS_TEMPEST +#define CLASS_IS_TEMPEST \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TEMPEST)) +#endif + +#ifndef REVISION_IS_A0 +#define REVISION_IS_A0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A1 +#define REVISION_IS_A1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A2 +#define REVISION_IS_A2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_B0 +#define REVISION_IS_B0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_B1 +#define REVISION_IS_B1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C0 +#define REVISION_IS_C0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_C1 +#define REVISION_IS_C1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C2 +#define REVISION_IS_C2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_C3 +#define REVISION_IS_C3 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_3)) +#endif + +//***************************************************************************** +// +// Deprecated silicon class and revision detection macros. +// +//***************************************************************************** +#ifndef DEPRECATED +#define DEVICE_IS_SANDSTORM CLASS_IS_SANDSTORM +#define DEVICE_IS_FURY CLASS_IS_FURY +#define DEVICE_IS_REVA2 REVISION_IS_A2 +#define DEVICE_IS_REVC1 REVISION_IS_C1 +#define DEVICE_IS_REVC2 REVISION_IS_C2 +#endif + +#endif // __HW_TYPES_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_uart.h new file mode 100644 index 00000000..b6613861 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/lib/inc/hw_uart.h @@ -0,0 +1,458 @@ +//***************************************************************************** +// +// hw_uart.h - Macros and defines used when accessing the UART hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UART_H__ +#define __HW_UART_H__ + +//***************************************************************************** +// +// The following are defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_DR 0x00000000 // UART Data +#define UART_O_RSR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_ECR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_FR 0x00000018 // UART Flag +#define UART_O_ILPR 0x00000020 // UART IrDA Low-Power Register +#define UART_O_IBRD 0x00000024 // UART Integer Baud-Rate Divisor +#define UART_O_FBRD 0x00000028 // UART Fractional Baud-Rate + // Divisor +#define UART_O_LCRH 0x0000002C // UART Line Control +#define UART_O_CTL 0x00000030 // UART Control +#define UART_O_IFLS 0x00000034 // UART Interrupt FIFO Level Select +#define UART_O_IM 0x00000038 // UART Interrupt Mask +#define UART_O_RIS 0x0000003C // UART Raw Interrupt Status +#define UART_O_MIS 0x00000040 // UART Masked Interrupt Status +#define UART_O_ICR 0x00000044 // UART Interrupt Clear +#define UART_O_DMACTL 0x00000048 // UART DMA Control +#define UART_O_LCTL 0x00000090 // UART LIN Control +#define UART_O_LSS 0x00000094 // UART LIN Snap Shot +#define UART_O_LTIM 0x00000098 // UART LIN Timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_RI 0x00000100 // Ring Indicator +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy +#define UART_FR_DCD 0x00000004 // Data Carrier Detect +#define UART_FR_DSR 0x00000002 // Data Set Ready +#define UART_FR_CTS 0x00000001 // Clear To Send + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_CTSEN 0x00008000 // Enable Clear To Send +#define UART_CTL_RTSEN 0x00004000 // Enable Request to Send +#define UART_CTL_RTS 0x00000800 // Request to Send +#define UART_CTL_DTR 0x00000400 // Data Terminal Ready +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_LIN 0x00000040 // LIN Mode Enable +#define UART_CTL_HSE 0x00000020 // High-Speed Enable +#define UART_CTL_EOT 0x00000010 // End of Transmission +#define UART_CTL_SMART 0x00000008 // ISO 7816 Smart Card Support +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_LME5IM 0x00008000 // LIN Mode Edge 5 Interrupt Mask +#define UART_IM_LME1IM 0x00004000 // LIN Mode Edge 1 Interrupt Mask +#define UART_IM_LMSBIM 0x00002000 // LIN Mode Sync Break Interrupt + // Mask +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask +#define UART_IM_DSRMIM 0x00000008 // UART Data Set Ready Modem + // Interrupt Mask +#define UART_IM_DCDMIM 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Mask +#define UART_IM_CTSMIM 0x00000002 // UART Clear to Send Modem + // Interrupt Mask +#define UART_IM_RIMIM 0x00000001 // UART Ring Indicator Modem + // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_LME5RIS 0x00008000 // LIN Mode Edge 5 Raw Interrupt + // Status +#define UART_RIS_LME1RIS 0x00004000 // LIN Mode Edge 1 Raw Interrupt + // Status +#define UART_RIS_LMSBRIS 0x00002000 // LIN Mode Sync Break Raw + // Interrupt Status +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status +#define UART_RIS_DSRRIS 0x00000008 // UART Data Set Ready Modem Raw + // Interrupt Status +#define UART_RIS_DCDRIS 0x00000004 // UART Data Carrier Detect Modem + // Raw Interrupt Status +#define UART_RIS_CTSRIS 0x00000002 // UART Clear to Send Modem Raw + // Interrupt Status +#define UART_RIS_RIRIS 0x00000001 // UART Ring Indicator Modem Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_LME5MIS 0x00008000 // LIN Mode Edge 5 Masked Interrupt + // Status +#define UART_MIS_LME1MIS 0x00004000 // LIN Mode Edge 1 Masked Interrupt + // Status +#define UART_MIS_LMSBMIS 0x00002000 // LIN Mode Sync Break Masked + // Interrupt Status +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status +#define UART_MIS_DSRMIS 0x00000008 // UART Data Set Ready Modem Masked + // Interrupt Status +#define UART_MIS_DCDMIS 0x00000004 // UART Data Carrier Detect Modem + // Masked Interrupt Status +#define UART_MIS_CTSMIS 0x00000002 // UART Clear to Send Modem Masked + // Interrupt Status +#define UART_MIS_RIMIS 0x00000001 // UART Ring Indicator Modem Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_LME5MIC 0x00008000 // LIN Mode Edge 5 Interrupt Clear +#define UART_ICR_LME1MIC 0x00004000 // LIN Mode Edge 1 Interrupt Clear +#define UART_ICR_LMSBMIC 0x00002000 // LIN Mode Sync Break Interrupt + // Clear +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear +#define UART_ICR_DSRMIC 0x00000008 // UART Data Set Ready Modem + // Interrupt Clear +#define UART_ICR_DCDMIC 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Clear +#define UART_ICR_CTSMIC 0x00000002 // UART Clear to Send Modem + // Interrupt Clear +#define UART_ICR_RIMIC 0x00000001 // UART Ring Indicator Modem + // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DMACTL register. +// +//***************************************************************************** +#define UART_DMACTL_DMAERR 0x00000004 // DMA on Error +#define UART_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define UART_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCTL register. +// +//***************************************************************************** +#define UART_LCTL_BLEN_M 0x00000030 // Sync Break Length +#define UART_LCTL_BLEN_13T 0x00000000 // Sync break length is 13T bits + // (default) +#define UART_LCTL_BLEN_14T 0x00000010 // Sync break length is 14T bits +#define UART_LCTL_BLEN_15T 0x00000020 // Sync break length is 15T bits +#define UART_LCTL_BLEN_16T 0x00000030 // Sync break length is 16T bits +#define UART_LCTL_MASTER 0x00000001 // LIN Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LSS register. +// +//***************************************************************************** +#define UART_LSS_TSS_M 0x0000FFFF // Timer Snap Shot +#define UART_LSS_TSS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LTIM register. +// +//***************************************************************************** +#define UART_LTIM_TIMER_M 0x0000FFFF // Timer Value +#define UART_LTIM_TIMER_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_LCR_H 0x0000002C // Line Control Register, HIGH byte +#define UART_O_PeriphID4 0x00000FD0 +#define UART_O_PeriphID5 0x00000FD4 +#define UART_O_PeriphID6 0x00000FD8 +#define UART_O_PeriphID7 0x00000FDC +#define UART_O_PeriphID0 0x00000FE0 +#define UART_O_PeriphID1 0x00000FE4 +#define UART_O_PeriphID2 0x00000FE8 +#define UART_O_PeriphID3 0x00000FEC +#define UART_O_PCellID0 0x00000FF0 +#define UART_O_PCellID1 0x00000FF4 +#define UART_O_PCellID2 0x00000FF8 +#define UART_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_DR +// register. +// +//***************************************************************************** +#define UART_DR_DATA_MASK 0x000000FF // UART data + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IBRD +// register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_MASK 0x0000FFFF // Integer baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_FBRD +// register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_MASK 0x0000003F // Fractional baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_LCR_H +// register. +// +//***************************************************************************** +#define UART_LCR_H_SPS 0x00000080 // Stick Parity Select +#define UART_LCR_H_WLEN 0x00000060 // Word length +#define UART_LCR_H_WLEN_5 0x00000000 // 5 bit data +#define UART_LCR_H_WLEN_6 0x00000020 // 6 bit data +#define UART_LCR_H_WLEN_7 0x00000040 // 7 bit data +#define UART_LCR_H_WLEN_8 0x00000060 // 8 bit data +#define UART_LCR_H_FEN 0x00000010 // Enable FIFO +#define UART_LCR_H_STP2 0x00000008 // Two Stop Bits Select +#define UART_LCR_H_EPS 0x00000004 // Even Parity Select +#define UART_LCR_H_PEN 0x00000002 // Parity Enable +#define UART_LCR_H_BRK 0x00000001 // Send Break + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IFLS +// register. +// +//***************************************************************************** +#define UART_IFLS_RX_MASK 0x00000038 // RX FIFO level mask +#define UART_IFLS_TX_MASK 0x00000007 // TX FIFO level mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_ICR +// register. +// +//***************************************************************************** +#define UART_RSR_ANY (UART_RSR_OE | UART_RSR_BE | UART_RSR_PE | \ + UART_RSR_FE) + +//***************************************************************************** +// +// The following are deprecated defines for the Reset Values for UART +// Registers. +// +//***************************************************************************** +#define UART_RV_CTL 0x00000300 +#define UART_RV_PCellID1 0x000000F0 +#define UART_RV_PCellID3 0x000000B1 +#define UART_RV_FR 0x00000090 +#define UART_RV_PeriphID2 0x00000018 +#define UART_RV_IFLS 0x00000012 +#define UART_RV_PeriphID0 0x00000011 +#define UART_RV_PCellID0 0x0000000D +#define UART_RV_PCellID2 0x00000005 +#define UART_RV_PeriphID3 0x00000001 +#define UART_RV_PeriphID4 0x00000000 +#define UART_RV_LCR_H 0x00000000 +#define UART_RV_PeriphID6 0x00000000 +#define UART_RV_DR 0x00000000 +#define UART_RV_RSR 0x00000000 +#define UART_RV_ECR 0x00000000 +#define UART_RV_PeriphID5 0x00000000 +#define UART_RV_RIS 0x00000000 +#define UART_RV_FBRD 0x00000000 +#define UART_RV_IM 0x00000000 +#define UART_RV_MIS 0x00000000 +#define UART_RV_ICR 0x00000000 +#define UART_RV_PeriphID1 0x00000000 +#define UART_RV_PeriphID7 0x00000000 +#define UART_RV_IBRD 0x00000000 + +#endif + +#endif // __HW_UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/main.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/main.c new file mode 100644 index 00000000..2f893d66 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/main.c @@ -0,0 +1,107 @@ +/**************************************************************************************** +| Description: bootloader application source file +| File Name: main.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "boot.h" /* bootloader generic header */ +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/sysctl.h" +#include "driverlib/gpio.h" + + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static void Init(void); + + +/**************************************************************************************** +** NAME: main +** PARAMETER: none +** RETURN VALUE: program return code +** DESCRIPTION: This is the entry point for the bootloader application and is called +** by the reset interrupt vector after the C-startup routines executed. +** +****************************************************************************************/ +int main(void) +{ + /* initialize the microcontroller */ + Init(); + /* initialize the bootloader */ + BootInit(); + + /* start the infinite program loop */ + while (1) + { + /* run the bootloader task */ + BootTask(); + } + + /* program should never get here */ + return 0; +} /*** end of main ***/ + + +/**************************************************************************************** +** NAME: Init +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the microcontroller. The interrupts are disabled, the +** clocks are configured and the flash wait states are configured. +** +****************************************************************************************/ +static void Init(void) +{ + /* set the clocking to run at 50MHz from the PLL */ + SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); +#if (BOOT_COM_UART_ENABLE > 0) + #if (BOOT_COM_UART_CHANNEL_INDEX == 0) + /* enable the and configure UART0 related peripherals and pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); + GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); + #endif +#endif +#if (BOOT_COM_CAN_ENABLE > 0) + #if (BOOT_COM_CAN_CHANNEL_INDEX == 0) + /* configure the CAN pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); + GPIOPinTypeCAN(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1); + #endif +#endif +} /*** end of Init ***/ + + +/*********************************** end of main.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/makefile b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/makefile new file mode 100644 index 00000000..52fab3b4 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Boot/makefile @@ -0,0 +1,197 @@ +#**************************************************************************************** +#| Description: Makefile for LM3S using CodeSourcery GNU GCC compiler toolset +#| File Name: makefile +#| +#|--------------------------------------------------------------------------------------- +#| C O P Y R I G H T +#|--------------------------------------------------------------------------------------- +#| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +#| +#|--------------------------------------------------------------------------------------- +#| L I C E N S E +#|--------------------------------------------------------------------------------------- +#| This file is part of OpenBTL. OpenBTL is free software: you can redistribute it and/or +#| modify it under the terms of the GNU General Public License as published by the Free +#| Software Foundation, either version 3 of the License, or (at your option) any later +#| version. +#| +#| OpenBTL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +#| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +#| PURPOSE. See the GNU General Public License for more details. +#| +#| You should have received a copy of the GNU General Public License along with OpenBTL. +#| If not, see . +#| +#**************************************************************************************** +SHELL = sh + +#|---------------------------------------------------------------------------------------| +#| Configure project name | +#|---------------------------------------------------------------------------------------| +PROJ_NAME=openbtl_ek_lm3s8962 + + +#|---------------------------------------------------------------------------------------| +#| Speficy project source files | +#|---------------------------------------------------------------------------------------| +PROJ_FILES= \ +config.h \ +hooks.c \ +main.c \ +./lib/inc/hw_flash.h \ +./lib/inc/hw_gpio.h \ +./lib/inc/hw_ints.h \ +./lib/inc/hw_memmap.h \ +./lib/inc/hw_nvic.h \ +./lib/inc/hw_sysctl.h \ +-./lib/inc/hw_types.h \ +./lib/inc/hw_uart.h \ +./lib/inc/hw_can.h \ +./lib/driverlib/cpulib.c \ +./lib/driverlib/flashlib.c \ +./lib/driverlib/gpio.h \ +./lib/driverlib/sysctl.c \ +./lib/driverlib/uartlib.h \ +./lib/driverlib/canlib.h \ +./lib/driverlib/cpulib.h \ +./lib/driverlib/flashlib.h \ +./lib/driverlib/interrupt.c \ +./lib/driverlib/sysctl.h \ +./lib/driverlib/debug.h \ +./lib/driverlib/gpio.c \ +./lib/driverlib/interrupt.h \ +./lib/driverlib/uartlib.c \ +./lib/driverlib/canlib.c \ +../../../Source/boot.c \ +../../../Source/boot.h \ +../../../Source/com.c \ +../../../Source/com.h \ +../../../Source/xcp.c \ +../../../Source/xcp.h \ +../../../Source/backdoor.c \ +../../../Source/backdoor.h \ +../../../Source/cop.c \ +../../../Source/cop.h \ +../../../Source/assert.c \ +../../../Source/assert.h \ +../../../Source/plausibility.h \ +../../../Source/ARMCM3_LM3S/types.h \ +../../../Source/ARMCM3_LM3S/cpu.c \ +../../../Source/ARMCM3_LM3S/cpu.h \ +../../../Source/ARMCM3_LM3S/uart.c \ +../../../Source/ARMCM3_LM3S/uart.h \ +../../../Source/ARMCM3_LM3S/can.c \ +../../../Source/ARMCM3_LM3S/can.h \ +../../../Source/ARMCM3_LM3S/nvm.c \ +../../../Source/ARMCM3_LM3S/nvm.h \ +../../../Source/ARMCM3_LM3S/timer.c \ +../../../Source/ARMCM3_LM3S/timer.h \ +../../../Source/ARMCM3_LM3S/GCC/flash.c \ +../../../Source/ARMCM3_LM3S/GCC/flash.h \ +../../../Source/ARMCM3_LM3S/GCC/vectors.c \ +../../../Source/ARMCM3_LM3S/GCC/cstart.c + + +#|---------------------------------------------------------------------------------------| +#| Compiler binaries | +#|---------------------------------------------------------------------------------------| +CC = arm-none-eabi-gcc +LN = arm-none-eabi-gcc +OC = arm-none-eabi-objcopy +OD = arm-none-eabi-objdump +AS = arm-none-eabi-as +SZ = arm-none-eabi-size + + +#|---------------------------------------------------------------------------------------| +#| Extract file names | +#|---------------------------------------------------------------------------------------| +PROJ_ASRCS = $(filter %.s,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CSRCS = $(filter %.c,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CHDRS = $(filter %.h,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CCMPL = $(patsubst %.c,%.cpl,$(PROJ_CSRCS)) +PROJ_ACMPL = $(patsubst %.s,%.cpl,$(PROJ_ASRCS)) + + +#|---------------------------------------------------------------------------------------| +#| Set important path variables | +#|---------------------------------------------------------------------------------------| +VPATH = $(foreach path,$(sort $(foreach file,$(PROJ_FILES),$(dir $(file)))) $(subst \,/,$(OBJ_PATH)),$(path) :) +OBJ_PATH = obj +BIN_PATH = bin +INC_PATH = $(patsubst %,-I%,$(sort $(foreach file,$(filter %.h,$(PROJ_FILES)),$(dir $(file))))) +INC_PATH += -I. -I./lib +LIB_PATH = -L../../../Source/ARMCM3_LM3S/GCC/ + + +#|---------------------------------------------------------------------------------------| +#| Options for compiler binaries | +#|---------------------------------------------------------------------------------------| +CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -Os -T memory.x +CFLAGS += -D PACK_STRUCT_END=__attribute\(\(packed\)\) -Wno-main +CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) +CFLAGS += -ffunction-sections -fdata-sections $(INC_PATH) -D DEBUG -D gcc +CFLAGS += -Wa,-adhlns="$(OBJ_PATH)/$(subst .o,.lst,$@)" +LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections +OFLAGS = -O binary +ODFLAGS = -x +SZFLAGS = -B -d + + +#|---------------------------------------------------------------------------------------| +#| Specify library files | +#|---------------------------------------------------------------------------------------| +LIBS = + + +#|---------------------------------------------------------------------------------------| +#| Define targets | +#|---------------------------------------------------------------------------------------| +AOBJS = $(patsubst %.s,%.o,$(PROJ_ASRCS)) +COBJS = $(patsubst %.c,%.o,$(PROJ_CSRCS)) + + +#|---------------------------------------------------------------------------------------| +#| Make ALL | +#|---------------------------------------------------------------------------------------| +all : $(BIN_PATH)/$(PROJ_NAME).bin + + +$(BIN_PATH)/$(PROJ_NAME).bin : $(BIN_PATH)/$(PROJ_NAME).elf + @$(OC) $< $(OFLAGS) $@ + @$(OD) $(ODFLAGS) $< > $(BIN_PATH)/$(PROJ_NAME).map + @echo +++ Summary of memory consumption: + @$(SZ) $(SZFLAGS) $< + @echo +++ Build complete [$(notdir $@)] + +$(BIN_PATH)/$(PROJ_NAME).elf : $(AOBJS) $(COBJS) + @echo +++ Linking [$(notdir $@)] + @$(LN) $(CFLAGS) -o $@ $(patsubst %.o,$(OBJ_PATH)/%.o,$(^F)) $(LIBS) $(LFLAGS) + + +#|---------------------------------------------------------------------------------------| +#| Compile and assemble | +#|---------------------------------------------------------------------------------------| +$(AOBJS): %.o: %.s $(PROJ_CHDRS) + @echo +++ Assembling [$(notdir $<)] + @$(AS) $(AFLAGS) $< -o $(OBJ_PATH)/$(@F) + +$(COBJS): %.o: %.c $(PROJ_CHDRS) + @echo +++ Compiling [$(notdir $<)] + @$(CC) $(CFLAGS) -c $< -o $(OBJ_PATH)/$(@F) + + +#|---------------------------------------------------------------------------------------| +#| Make CLEAN | +#|---------------------------------------------------------------------------------------| +clean : + @echo +++ Cleaning build environment + @rm -f $(foreach file,$(AOBJS),$(OBJ_PATH)/$(file)) + @rm -f $(foreach file,$(COBJS),$(OBJ_PATH)/$(file)) + @rm -f $(patsubst %.o,%.lst,$(foreach file,$(COBJS),$(OBJ_PATH)/$(file))) + @rm -f $(BIN_PATH)/$(PROJ_NAME).elf $(BIN_PATH)/$(PROJ_NAME).map + @rm -f $(BIN_PATH)/$(PROJ_NAME).bin + @echo +++ Clean complete + + \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.elf b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.elf new file mode 100644 index 00000000..a1082f5d Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.elf differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.map b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.map new file mode 100644 index 00000000..dfefb11e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.map @@ -0,0 +1,149 @@ + +bin/demoprog_ek_lm3s8962.elf: file format elf32-littlearm +bin/demoprog_ek_lm3s8962.elf +architecture: arm, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x00002000 + +Program Header: + LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**15 + filesz 0x00003514 memsz 0x00003514 flags r-x + LOAD off 0x00008000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x0000015c flags rw- +private flags = 5000002: [Version5 EABI] [has entry point] + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 00001514 00002000 00002000 00002000 2**2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .bss 0000015c 20000000 20000000 00008000 2**2 + ALLOC + 2 .debug_abbrev 00001cdb 00000000 00000000 00003514 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 000093f8 00000000 00000000 000051ef 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_line 00005bd6 00000000 00000000 0000e5e7 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_loc 0000ccca 00000000 00000000 000141bd 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_pubnames 000031b7 00000000 00000000 00020e87 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_pubtypes 0000039c 00000000 00000000 0002403e 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_aranges 00001510 00000000 00000000 000243da 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 000013b0 00000000 00000000 000258ea 2**0 + CONTENTS, READONLY, DEBUGGING + 10 .debug_str 0000377c 00000000 00000000 00026c9a 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .comment 0000002a 00000000 00000000 0002a416 2**0 + CONTENTS, READONLY + 12 .ARM.attributes 00000031 00000000 00000000 0002a440 2**0 + CONTENTS, READONLY + 13 .debug_frame 00003bb0 00000000 00000000 0002a474 2**2 + CONTENTS, READONLY, DEBUGGING +SYMBOL TABLE: +00002000 l d .text 00000000 .text +20000000 l d .bss 00000000 .bss +00000000 l d .debug_abbrev 00000000 .debug_abbrev +00000000 l d .debug_info 00000000 .debug_info +00000000 l d .debug_line 00000000 .debug_line +00000000 l d .debug_loc 00000000 .debug_loc +00000000 l d .debug_pubnames 00000000 .debug_pubnames +00000000 l d .debug_pubtypes 00000000 .debug_pubtypes +00000000 l d .debug_aranges 00000000 .debug_aranges +00000000 l d .debug_ranges 00000000 .debug_ranges +00000000 l d .debug_str 00000000 .debug_str +00000000 l d .comment 00000000 .comment +00000000 l d .ARM.attributes 00000000 .ARM.attributes +00000000 l d .debug_frame 00000000 .debug_frame +00000000 l df *ABS* 00000000 vectors.c +00000000 l df *ABS* 00000000 boot.c +000020f4 l F .text 00000024 UartReceiveByte +20000000 l O .bss 00000041 xcpCtoReqPacket.1738 +20000044 l O .bss 00000001 xcpCtoRxInProgress.1740 +20000045 l O .bss 00000001 xcpCtoRxLength.1739 +00000000 l df *ABS* 00000000 cstart.c +00002276 l F .text 00000000 zero_loop +00000000 l df *ABS* 00000000 irq.c +00000000 l df *ABS* 00000000 led.c +20000048 l O .bss 00000004 timer_counter_last.1732 +2000004c l O .bss 00000001 led_toggle_state.1731 +00000000 l df *ABS* 00000000 main.c +20000050 l O .bss 00000004 assert_failure_file.1738 +20000054 l O .bss 00000004 assert_failure_line.1739 +00000000 l df *ABS* 00000000 time.c +20000058 l O .bss 00000004 millisecond_counter +00000000 l df *ABS* 00000000 cpu.c +00000000 l df *ABS* 00000000 gpio.c +00002474 l F .text 00000188 GPIOBaseValid +00000000 l df *ABS* 00000000 interrupt.c +00000000 l df *ABS* 00000000 sysctl.c +000028d4 l F .text 0000039c SysCtlPeripheralValid +00003464 l O .text 0000005c g_pulXtals +000034d8 l O .text 0000000c g_pulRCGCRegs +00000000 l df *ABS* 00000000 systick.c +00000000 l df *ABS* 00000000 uart.c +00003200 l F .text 0000003c UARTBaseValid +00000000 l df *ABS* 00000000 adc.c +00000000 l df *ABS* 00000000 can.c +00000000 l df *ABS* 00000000 comp.c +00000000 l df *ABS* 00000000 epi.c +00000000 l df *ABS* 00000000 ethernet.c +00000000 l df *ABS* 00000000 flash.c +00000000 l df *ABS* 00000000 hibernate.c +00000000 l df *ABS* 00000000 i2c.c +00000000 l df *ABS* 00000000 i2s.c +00000000 l df *ABS* 00000000 mpu.c +00000000 l df *ABS* 00000000 pwm.c +00000000 l df *ABS* 00000000 qei.c +00000000 l df *ABS* 00000000 ssi.c +00000000 l df *ABS* 00000000 timer.c +00000000 l df *ABS* 00000000 udma.c +00000000 l df *ABS* 00000000 usb.c +00000000 l df *ABS* 00000000 watchdog.c +000023c0 g F .text 00000016 __error__ +00002230 g F .text 0000005c reset_handler +00002cb8 g F .text 00000006 SysCtlDelay +00002298 g F .text 0000000e IrqInterruptEnable +000023f0 g F .text 0000000c TimeSet +00003514 g .text 00000000 _etext +000027ec g F .text 00000030 GPIOPinWrite +00002c70 g F .text 00000048 SysCtlPeripheralEnable +2000005c g .bss 00000000 _ebss +00003194 g F .text 00000012 SysTickDisable +00000100 g *ABS* 00000000 __STACKSIZE__ +00002468 g F .text 00000002 UnusedISR +000022a8 g F .text 00000042 LedInit +00002454 g F .text 00000012 TimeISRHandler +00003414 g F .text 00000036 UARTCharGetNonBlocking +20000000 g .bss 00000000 _bss +000031bc g F .text 00000012 SysTickIntDisable +000031d0 g F .text 0000002e SysTickPeriodSet +0000236c g F .text 00000052 main +00002e9c g F .text 000002e2 SysCtlClockGet +00003278 g F .text 00000044 UARTDisable +00002118 g F .text 0000005c BootComInit +000028c4 g F .text 00000010 IntMasterEnable +000023fc g F .text 0000004a TimeInit +000023d8 g F .text 00000018 TimeDeinit +20000000 g .text 00000000 _data +000022ec g F .text 00000080 LedToggle +2000015c g .bss 00000000 _estack +20000000 g .text 00000000 _edata +00002000 g O .text 000000f4 _vectab +00002870 g F .text 00000052 GPIOPinTypeUART +0000281c g F .text 00000052 GPIOPinTypeGPIOOutput +00002174 g F .text 000000bc BootComCheckActivationRequest +00002448 g F .text 0000000c TimeGet +0000246c g F .text 00000008 CPUcpsie +000025fc g F .text 00000070 GPIODirModeSet +2000005c g .bss 00000000 _stack +00003180 g F .text 00000012 SysTickEnable +000031a8 g F .text 00000012 SysTickIntEnable +000032bc g F .text 00000158 UARTConfigSetExpClk +00002cc0 g F .text 000001da SysCtlClockSet +0000266c g F .text 00000180 GPIOPadConfigSet +0000323c g F .text 0000003c UARTEnable + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.srec new file mode 100644 index 00000000..fef13f49 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/bin/demoprog_ek_lm3s8962.srec @@ -0,0 +1,340 @@ +S020000062696E2F64656D6F70726F675F656B5F6C6D3373383936322E7372656359 +S11320005C010020312200006924000069240000E2 +S11320106924000069240000692400006924000088 +S11320206924000069240000692400006924000078 +S1132030692400006924000069240000552400007C +S11320406924000069240000692400006924000058 +S11320506924000069240000692400006924000048 +S11320606924000069240000692400006924000038 +S11320706924000069240000692400006924000028 +S11320806924000069240000692400006924000018 +S11320906924000069240000692400006924000008 +S11320A069240000692400006924000069240000F8 +S11320B069240000692400006924000069240000E8 +S11320C069240000692400006924000069240000D8 +S11320D069240000692400006924000069240000C8 +S11320E069240000692400006924000069240000B8 +S11320F0EE11AA5510B504464FF44040C4F2000056 +S113210043F21543C0F200039847B0F1FF3F1ABFF2 +S113211020700120002010BD10B54FF00100C1F265 +S1132120000042F67144C0F20004A0474FF00100E1 +S1132130C2F20000A0474FF48040C4F200004FF008 +S1132140030142F67103C0F20003984742F69D630F +S1132150C0F20003984701464FF44040C4F2000027 +S11321604FF461424FF0600343F2BD24C0F2000417 +S1132170A04710BD08B540F24403C2F200031B7827 +S1132180CBB940F20000C2F2000042F2F503C0F203 +S113219000039847012848D140F24403C2F20003E7 +S11321A04FF001021A7040F24503C2F200034FF0EF +S11321B000021A7008BD40F24503C2F20003187809 +S11321C01A4BC01842F2F503C0F2000398470128E5 +S11321D02BD140F24503C2F200031A7802F1010246 +S11321E0D2B21A7040F20003C2F200031B78934289 +S11321F01BD140F24403C2F200034FF000021A70F4 +S113220040F20003C2F200035B78FF2B0DD140F2D1 +S11322100003C2F200039B783BB942F2D933C0F207 +S1132220000398474FF0F103984708BD01000020D0 +S113223008B516498D4640F20002C2F2000240F28F +S11322400003C2F200039A4211D243F21452C0F2C4 +S1132250000240F20003C2F2000340F20000C2F2A6 +S1132260000052F8041B43F8041B8342F9D30848C6 +S113227008494FF000028842B8BF40F8042BFADB4B +S113228042F26D33C0F20003984708BD5C010020A0 +S1132290000000205C00002008B542F6C503C0F22F +S11322A00003984708BD00BF10B54FF02000C2F2EC +S11322B0000042F67143C0F2000398474FF4A04473 +S11322C0C4F2020420464FF0010142F61D03C0F29D +S11322D00003984720464FF001014FF0000242F2FC +S11322E0ED73C0F20003984710BD00BF10B542F271 +S11322F04943C0F200039847044640F24803C2F23F +S113230000031B68C31AB3F5FA7F2ED340F24C03C3 +S1132310C2F200031B788BB940F24C03C2F20003F3 +S11323204FF001021A704FF4A040C4F202001146AB +S113233042F2ED73C0F20003984711E040F24C03FF +S1132340C2F200034FF000021A704FF4A040C4F22E +S113235002004FF0010142F2ED73C0F2000398470E +S113236040F24803C2F200031C6010BD38B54FF4BC +S11323706070C0F2C01042F6C143C0F20003984737 +S113238042F2A923C0F20003984742F2FD33C0F29F +S11323900003984742F29923C0F20003984742F29F +S11323A01913C0F20003984742F2ED25C0F200056C +S11323B042F27514C0F20004A847A047FCE700BF2E +S11323C040F25003C2F20003186040F25403C2F218 +S11323D000031960FEE700BF08B543F2BD13C0F265 +S11323E00003984743F29513C0F20003984708BDD1 +S11323F040F25803C2F200031860704708B542F671 +S11324009D63C0F20003984744F6D353C1F26203BC +S1132410A3FB00204FEA901043F2D113C0F2000353 +S1132420984743F28113C0F20003984743F2A9137B +S1132430C0F2000398474FF0000042F2F133C0F2BB +S11324400003984708BD00BF40F25803C2F20003DE +S11324501868704740F25803C2F200031A6802F188 +S113246001021A60704700BFFEE700BFEFF310805F +S113247062B670474FF48043C4F200034FF4004245 +S1132480C4F20502904214BF00220122984214BFF4 +S1132490134642F00103002B40F098804FF4A04310 +S11324A0C4F200034FF41042C4F20502904214BF78 +S11324B000220122984214BF134642F00103002B6C +S11324C040F087804FF4C043C4F200034FF420422D +S11324D0C4F20502904214BF00220122984214BFA4 +S11324E0134642F00103002B76D14FF4E043C4F2CB +S11324F000034FF43042C4F20502904214BF00229C +S11325000122984214BF134642F00103002B66D106 +S11325104FF48043C4F202034FF44042C4F2050274 +S1132520904214BF00220122984214BF134642F085 +S11325300103002B56D14FF4A043C4F202034FF41D +S11325405042C4F20502904214BF00220122984274 +S113255014BF134642F00103002B46D14FF4C0438D +S1132560C4F202034FF46042C4F20502904214BF65 +S113257000220122984214BF134642F00103002BAB +S113258036D14FF4E043C4F202034FF47042C4F274 +S11325900502904214BF00220122984214BF134640 +S11325A042F00103002B26D14FF45043C4F203033D +S11325B04FF00002C4F20602904214BF002201222E +S11325C0984214BF104642F0010070474FF00100DA +S11325D070474FF0010070474FF0010070474FF013 +S11325E0010070474FF0010070474FF00100704741 +S11325F04FF0010070474FF00100704770B504467A +S11326000E46154642F27543C0F20003984750B98E +S113261043F24C40C0F200004FF0E40142F2C133F7 +S1132620C0F200039847022D0AD943F24C40C0F28D +S113263000004FF0E60142F2C133C0F200039847B4 +S113264015F0010F04F58063D4F8002414BF32435D +S1132650B2431A6015F0020F04F58463D4F8202401 +S113266014BF164322EA06061E6070BDF8B5044680 +S11326700D4617461E4642F27543C0F200039847C2 +S113268050B943F24C40C0F200004FF4DD7142F205 +S1132690C133C0F20003984707F1FF323B1F18BF54 +S11326A00123012A94BF002303F0010363B10C2F1B +S11326B00AD043F24C40C0F200004FF4DF7142F202 +S11326C0C133C0F200039847B6F10A0318BF0123CF +S11326D0082E0CBF002303F00103FBB1B6F109037C +S11326E018BF01230C2E0CBF002303F00103ABB170 +S11326F0B6F10D0318BF01230B2E0CBF002303F00A +S113270001035BB156B143F24C40C0F2000040F209 +S1132710C51142F2C133C0F20003984717F0010F0C +S113272004F5A063D4F8002514BF2A43AA431A6011 +S113273017F0020F04F5A06303F10403D4F8042591 +S113274014BF2A43AA431A6017F0040F04F5A163C7 +S1132750D4F8082514BF2A43AA431A6017F0080FB7 +S113276004F5A363D4F8182514BF2A43AA431A60B6 +S113277016F0010F04F5A06303F10C03D4F80C2543 +S113278014BF2A43AA431A6016F0020F04F5A26389 +S1132790D4F8102514BF2A43AA431A6016F0040F74 +S11327A004F5A26303F10403D4F8142514BF2A43E7 +S11327B0AA431A6016F0080F04F5A26303F10C0390 +S11327C0D4F81C2514BF2A43AA431A6036B904F569 +S11327D0A563D4F8282542EA050505E004F5A563B8 +S11327E0D4F8282522EA05051D60F8BD70B5064613 +S11327F00C46154642F27543C0F20003984750B99F +S113280043F24C40C0F200004FF4517142F2C13324 +S1132810C0F20003984746F8245070BD38B5054609 +S11328200C4642F27543C0F20003984750B943F294 +S11328304C40C0F2000040F2044142F2C133C0F205 +S113284000039847284621464FF0010242F2FD5307 +S1132850C0F200039847284621464FF001024FF08A +S1132860080342F26D64C0F20004A04738BD00BF03 +S113287038B505460C4642F27543C0F2000398474A +S113288050B943F24C40C0F2000040F21F5142F2F2 +S1132890C133C0F200039847284621464FF0020294 +S11328A042F2FD53C0F200039847284621464FF0F8 +S11328B001024FF0080342F26D64C0F20004A04725 +S11328C038BD00BF08B542F26D43C0F2000398471B +S11328D0C0B208BDA0F5801303F1FF334FF480723A +S11328E0C0F21002904214BF00220122012B8CBFBF +S11328F0134642F00103002B40F07E814FF4007335 +S1132900C0F210034FF48062C0F21002904214BF70 +S113291000220122984214BF134642F00103002B07 +S113292040F06D814FF48073C1F210034FF40072D4 +S1132930C1F21002904214BF00220122984214BF37 +S1132940134642F00103002B40F05C814FF4806396 +S1132950C1F210034FF48042C1F21002904214BF3E +S113296000220122984214BF134642F00103002BB7 +S113297040F04B814FF4A043C2F210034FF0010228 +S1132980C2F20002904214BF00220122984214BFF6 +S1132990134642F00103002B40F03A814FF002034A +S11329A0C2F200034FF00402C2F20002904214BFCC +S11329B000220122984214BF134642F00103002B67 +S11329C040F029814FF00803C2F200034FF01002D7 +S11329D0C2F20002904214BF00220122984214BFA6 +S11329E0134642F00103002B40F018814FF02003FE +S11329F0C2F200034FF04002C2F20002904214BF40 +S1132A0000220122984214BF134642F00103002B16 +S1132A1040F007814FF08003C2F200034FF480724C +S1132A20C2F20002904214BF00220122984214BF55 +S1132A30134642F00103002B40F0F6804FF480531C +S1132A40C1F20003984214BF00230123402808BFA9 +S1132A5043F00103002B40F0EA804FF48043C1F2BD +S1132A6000034FF48052C1F21002904214BF0022BE +S1132A700122984214BF134642F00103002B40F098 +S1132A80D9804FF48073C2F210034FF08002C3F276 +S1132A900002904214BF00220122984214BF134640 +S1132AA042F00103002B40F0C8804FF01003C3F242 +S1132AB00003B0F1101F14BF00220122984214BF7A +S1132AC0134642F00103002B40F0BA804FF48073A8 +S1132AD0C1F200034FF40072C1F20002904214BF2D +S1132AE000220122984214BF134642F00103002B36 +S1132AF040F0A9804FF01003C1F200034FF0200210 +S1132B00C1F20002904214BF00220122984214BF75 +S1132B10134642F00103002B40F0988003F1200398 +S1132B20C3F200034FF00102C1F21002904214BF3D +S1132B3000220122984214BF134642F00103002BE5 +S1132B4040F0878003F10203C1F210034FF0040246 +S1132B50C1F21002904214BF00220122984214BF15 +S1132B60134642F00103002B76D103F10803C1F2AE +S1132B7010034FF00102C1F20002904214BF002280 +S1132B800122984214BF134642F00103002B66D180 +S1132B9003F10203C1F200034FF00402C1F2000288 +S1132BA0904214BF00220122984214BF134642F0FF +S1132BB00103002B56D14FF40053C2F200034FF02F +S1132BC00102C2F21002904214BF00220122984274 +S1132BD014BF134642F00103002B46D14FF4805337 +S1132BE0C0F21003984214BF00230123082814BF25 +S1132BF0184643F0010070474FF0010070474FF052 +S1132C00010070474FF0010070474FF0010070471A +S1132C104FF0010070474FF0010070474FF0010082 +S1132C2070474FF0010070474FF0010070474FF0BC +S1132C30010070474FF0010070474FF001007047EA +S1132C404FF0010070474FF0010070474FF0010052 +S1132C5070474FF0010070474FF0010070474FF08C +S1132C60010070474FF0010070474FF001007047BA +S1132C7010B5044642F6D503C0F20003984750B994 +S1132C8043F2C040C0F200004FF4FC7142F2C13381 +S1132C90C0F20003984743F2D843C0F200034FEA5E +S1132CA0147253F822301A68A1B2C4F3044401FA2E +S1132CB004F414431C6010BD0138FDD1704700BFFB +S1132CC0F8B504464FF46043C4F20F031B6813F0D5 +S1132CD0E04F0DD04FF46043C4F20F031A684FF075 +S1132CE00003C7F2FF0302EA0303B3F1805F02D1DA +S1132CF0002CC0F2D1804EF26002C4F20F021168BF +S1132D004EF27003C4F20F031E6841F4006121F413 +S1132D10800546F4006615601E6011F0020F02D0B3 +S1132D2014F0020F05D015F0010F2CD014F0010F90 +S1132D3029D164F003031D404EF26003C4F20F0373 +S1132D401D60002E0CDA06F07003702B14BF0022F5 +S1132D500122302B14BF134642F0010323B90BE0C8 +S1132D6005F03003302B07D14FF4805042F6B943BD +S1132D70C0F20003984706E04FF4002042F6B9433E +S1132D80C0F20003984725F45E5727F0700743F21A +S1132D90F07304EA03031F434DF68F73C7F6FF7302 +S1132DA006EA030342F23005C8F2000504EA050509 +S1132DB01D4304F008034EF25802C4F20F024FF010 +S1132DC04001116055EAC3050AD54EF27003C4F2FE +S1132DD00F031D604EF26003C4F20F031F6009E08D +S1132DE04EF26003C4F20F031F604EF27003C4F28C +S1132DF00F031D604FF0100042F6B943C0F2000308 +S1132E00984727F0F86727F003074FF00303C0F251 +S1132E10C07304EA03031F4325F0FC5504F0FC537C +S1132E201D4314F0804F1FBF47F4800725F4800032 +S1132E300023C4F240031ABF2340184325F0804006 +S1132E4014F4006F17D14EF25003C4F20F031B6841 +S1132E5013F0400F0BD147F6FF734EF25001C4F24A +S1132E600F010A6812F0400F01D1013BF9D127F498 +S1132E70006720F400604EF26003C4F20F031F6089 +S1132E804EF27003C4F20F0318604FF0100042F6C4 +S1132E90B943C0F200039847F8BD00BF30B44EF206 +S1132EA06003C4F20F031B684EF27002C4F20F02F7 +S1132EB01268002AB4BF02F0700103F03001202927 +S1132EC000F0858004D881B1102940F0548115E0C8 +S1132ED0602900F0E580702900F0DF80302908BF08 +S1132EE047F2305040F04781DCE043F26441C0F2E5 +S1132EF00001C3F3841051F82000D3E04FF4604183 +S1132F00C4F20F01096811F0E04F04BF4EF2C01083 +S1132F10C0F2E40000F0C6804FF46041C4F20F0137 +S1132F2008684FF00001C7F2FF0100EA0101B1F1A6 +S1132F30805F04BF4EF2C010C0F2E40000F0B28023 +S1132F404FF46041C4F20F0108684FF00001C7F26A +S1132F50FF0100EA01014FF00000C1F201008142CB +S1132F600DD14FF46041C4F20F01096889B20229FE +S1132F7004BF4FF4D850C0F2B70000F093804FF470 +S1132F806041C4F20F0108684FF00001C7F2FF016D +S1132F9000EA01014FF00000C1F2030081421CBFAE +S1132FA04FF41050C0F2F4007CD14FF46041C4F2ED +S1132FB00F010C68A4B24FF4D850C0F2B7004FF41C +S1132FC01051C0F2F401002C18BF08466AE04FF417 +S1132FD06041C4F20F01096811F0E04F04BF43F6E9 +S1132FE07000C0F239005DD04FF46041C4F20F01AB +S1132FF008684FF00001C7F2FF0100EA0101B1F1D6 +S1133000805F04BF43F67000C0F239004AD04FF429 +S11330106041C4F20F0108684FF00001C7F2FF01DC +S113302000EA01014FF00000C1F2010081420CD11D +S11330304FF46041C4F20F01096889B2022904BF48 +S11330404CF2C060C0F22D002CD04FF46041C4F2A9 +S11330500F0108684FF00001C7F2FF0100EA010107 +S11330604FF00000C1F2030081421CBF4FF4106016 +S1133070C0F23D0016D14FF46041C4F20F010C6858 +S1133080A4B24CF2C060C0F22D004FF41061C0F243 +S11330903D01002C18BF084604E04FF4004001E055 +S11330A04FF48000002A03DA12F4006F03D040E0EA +S11330B013F4006F3DD14EF26401C4F20F010968AC +S11330C04FF46044C4F20F04246814F0E04F0DD0B0 +S11330D04FF46044C4F20F0425684FF00004C7F2B3 +S11330E0FF0405EA0404B4F1805F0CD1C1F3481471 +S11330F004F1020404FB00F001F01F0404F10204D3 +S1133100B0FBF4F00BE0C1F3481404FB00F001F051 +S11331101F0404F101044FEA4404B0FBF4F011F479 +S1133120804F18BF400811F4004F18BF800843F4C3 +S1133130800313F4800F20D0002A15DA12F0804F98 +S11331400BD012F4006F08D14FEA4000C2F386524C +S113315002F10102B0FBF2F00FE0C2F3C55202F13A +S11331600102B0FBF2F008E0C3F3C35303F101031F +S1133170B0FBF3F001E04FF0000030BC704700BF3B +S11331804EF21003CEF200031A6842F005021A60F0 +S1133190704700BF4EF21003CEF200031A6822F00B +S11331A001021A60704700BF4EF21003CEF2000312 +S11331B01A6842F002021A60704700BF4EF2100310 +S11331C0CEF200031A6822F002021A60704700BFB0 +S11331D010B500F1FF34B4F1807F0AD343F2E44028 +S11331E0C0F200004FF0D00142F2C133C0F200033C +S11331F098474EF21403CEF200031C6010BD00BFCA +S11332004FF44043C4F200034FF45042C4F20002AE +S1133210904214BF00220122984214BF134642F088 +S1133220010343B94FF46043C4F20003984214BF4E +S11332300020012070474FF00100704710B504468C +S113324043F20123C0F20003984750B943F2FC4013 +S1133250C0F200004FF4CF7142F2C133C0F2000358 +S11332609847E36A43F01003E362236B43F440732B +S113327043F00103236310BD10B5044643F2012358 +S1133280C0F20003984750B943F2FC40C0F200007A +S11332904FF4DF7142F2C133C0F200039847A369CF +S11332A013F0080FFBD1E36A23F01003E362236BEE +S11332B023F4407323F00103236310BDF8B50446DF +S11332C00E4615461F4643F20123C0F200039847F9 +S11332D050B943F2FC40C0F2000040F20D1142F23A +S11332E0C133C0F20003984755B943F2FC40C0F221 +S11332F000004FF4877142F2C133C0F200039847D3 +S11333004FF46043C4F20F031B6813F0E04F08BF8F +S1133310102347D04FF46043C4F20F031A684FF0F0 +S11333200003C7F2FF0302EA0303B3F1805F08BF9F +S1133330102337D04FF46043C4F20F031A684FF0E0 +S11333400003C7F2FF0302EA03034FF00002C1F2D5 +S11333500102934209D14FF46043C4F20F031B6886 +S11333609BB2022B08BF10231CD04FF46043C4F25D +S11333700F031A684FF00003C7F2FF0302EA0303C6 +S11333804FF00002C1F20302934218BF082309D18F +S11333904FF46043C4F20F031B689BB2002B0CBFB5 +S11333A01023082305FB03F3B3420AD943F2FC407C +S11333B0C0F2000040F20F1142F2C133C0F2000328 +S11333C09847204643F27923C0F200039847B6EBAE +S11333D0051F236B3DBF43F0200323636D0823F0D7 +S11333E0200328BF23634FEAC606B6FBF5F505F1B3 +S11333F001054FEAD5136362C5F34505A562E7628B +S11334004FF00003A361204643F23D23C0F20003C2 +S11334109847F8BD10B5044643F20123C0F20003F7 +S1133420984750B943F2FC40C0F2000040F2094111 +S113343042F2C133C0F200039847A36913F0100F9E +S11334400CBF20684FF0FF3010BD00BF6C69622FC5 +S11334506472697665726C69622F6770696F2E6336 +S11334600000000040420F0000201C0080841E0069 +S113347000802500999E36000040380000093D0078 +S113348000803E0000004B00404B4C0000204E00EA +S1133490808D5B0000C05D000080700000127A0027 +S11334A000007D0080969800001BB7000080BB00E0 +S11334B0C0E8CE00647ADA000024F4000000FA00C8 +S11334C06C69622F6472697665726C69622F7379B4 +S11334D07363746C2E63000000E10F4004E10F403D +S11334E008E10F406C69622F6472697665726C69D9 +S11334F0622F7379737469636B2E63006C69622F36 +S11335006472697665726C69622F756172742E6378 +S107351000000000B3 +S9032000DC diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.c new file mode 100644 index 00000000..a1498e42 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.c @@ -0,0 +1,315 @@ +/**************************************************************************************** +| Description: demo program bootloader interface source file +| File Name: boot.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +** NAME: BootActivate +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Bootloader activation function. +** +****************************************************************************************/ +static void BootActivate(void) +{ + void (*pEntryFromProgFnc)(void); + + /* stop the timer from generating interrupts */ + TimeDeinit(); + /* set pointer to the address of function EntryFromProg in the bootloader. note that + * 1 is added to this address to enable a switch from Thumb2 to Thumb mode + */ + pEntryFromProgFnc = (void*)0x000000F0 + 1; + /* call EntryFromProg to activate the bootloader. */ + pEntryFromProgFnc(); +} /*** end of BootActivate ***/ + + +#if (BOOT_COM_UART_ENABLE > 0) +/**************************************************************************************** +* U N I V E R S A L A S Y N C H R O N O U S R X T X I N T E R F A C E +****************************************************************************************/ + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static unsigned char UartReceiveByte(unsigned char *data); + + +/**************************************************************************************** +** NAME: BootComInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the UART communication interface +** +****************************************************************************************/ +void BootComInit(void) +{ + /* enable the UART0 peripheral */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); + /* enable the and configure UART0 related peripherals and pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); + GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); + /* configure the UART0 baudrate and communication parameters */ + UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), BOOT_COM_UART_BAUDRATE, + (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | + UART_CONFIG_PAR_NONE)); +} /*** end of BootComInit ***/ + + +/**************************************************************************************** +** NAME: BootComCheckActivationRequest +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Receives the CONNECT request from the host, which indicates that the +** bootloader should be activated and, if so, activates it. +** +****************************************************************************************/ +void BootComCheckActivationRequest(void) +{ + static unsigned char xcpCtoReqPacket[BOOT_COM_UART_RX_MAX_DATA+1]; + static unsigned char xcpCtoRxLength; + static unsigned char xcpCtoRxInProgress = 0; + + /* start of cto packet received? */ + if (xcpCtoRxInProgress == 0) + { + /* store the message length when received */ + if (UartReceiveByte(&xcpCtoReqPacket[0]) == 1) + { + /* indicate that a cto packet is being received */ + xcpCtoRxInProgress = 1; + + /* reset packet data count */ + xcpCtoRxLength = 0; + } + } + else + { + /* store the next packet byte */ + if (UartReceiveByte(&xcpCtoReqPacket[xcpCtoRxLength+1]) == 1) + { + /* increment the packet data count */ + xcpCtoRxLength++; + + /* check to see if the entire packet was received */ + if (xcpCtoRxLength == xcpCtoReqPacket[0]) + { + /* done with cto packet reception */ + xcpCtoRxInProgress = 0; + + /* check if this was an XCP CONNECT command */ + if ((xcpCtoReqPacket[1] == 0xff) && (xcpCtoReqPacket[2] == 0x00)) + { + /* connection request received so start the bootloader */ + BootActivate(); + } + } + } + } +} /*** end of BootComCheckActivationRequest ***/ + + +/**************************************************************************************** +** NAME: UartReceiveByte +** PARAMETER: data pointer to byte where the data is to be stored. +** RETURN VALUE: 1 if a byte was received, 0 otherwise. +** DESCRIPTION: Receives a communication interface byte if one is present. +** +****************************************************************************************/ +static unsigned char UartReceiveByte(unsigned char *data) +{ + signed long result; + + /* try to read a newly received byte */ + result = UARTCharGetNonBlocking(UART0_BASE); + /* check if a new byte was received */ + if(result != -1) + { + /* store the received byte */ + *data = (unsigned char)result; + /* inform caller of the newly received byte */ + return 1; + } + /* inform caller that no new data was received */ + return 0; +} /*** end of UartReceiveByte ***/ +#endif /* BOOT_COM_UART_ENABLE > 0 */ + + +#if (BOOT_COM_CAN_ENABLE > 0) +/**************************************************************************************** +* C O N T R O L L E R A R E A N E T W O R K I N T E R F A C E +****************************************************************************************/ + +/**************************************************************************************** +* Macro definitions +****************************************************************************************/ +/* index of the used reception message objects */ +#define CAN_RX_MSGOBJECT_IDX (0) + + +/**************************************************************************************** +* Local constant declarations +****************************************************************************************/ +/* lookup table to quickly and efficiently convert a bit number to a bit mask */ +static const unsigned short canBitNum2Mask[] = +{ + 0x0001, /* bit 0 */ +}; + + +/**************************************************************************************** +** NAME: CanSetBittiming +** PARAMETER: none +** RETURN VALUE: 1 if a valid bittiming configuration was found and set. 0 otherwise. +** DESCRIPTION: Attempts to match the bittiming parameters to the requested baudrate +** for a sample point between 65 and 75%, through a linear search +** algorithm. It is based on the equation: +** baudrate = CAN Clock Freq/((1+PropSeg+Phase1Seg+Phase2Seg)*Prescaler) +** +****************************************************************************************/ +static unsigned char CanSetBittiming(void) +{ + tCANBitClkParms bitClkParms; + unsigned char samplepoint; + + /* init SJW to maximum value */ + bitClkParms.uSJW = 4; + + /* use a double loop to iterate through all possible settings of uSyncPropPhase1Seg + * and uPhase2Seg. + */ + for (bitClkParms.uSyncPropPhase1Seg = 16; bitClkParms.uSyncPropPhase1Seg >= 1; bitClkParms.uSyncPropPhase1Seg--) + { + for (bitClkParms.uPhase2Seg = 8; bitClkParms.uPhase2Seg >= 1; bitClkParms.uPhase2Seg--) + { + samplepoint = ((1+bitClkParms.uSyncPropPhase1Seg) * 100) / (1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg); + /* check that sample points is within the preferred range */ + if ( (samplepoint >= 65) && (samplepoint <= 75) ) + { + /* does a prescaler exist to get the exact baudrate with these bittiming + * settings? + */ + if ((((BOOT_CPU_XTAL_SPEED_KHZ*1000)/BOOT_COM_CAN_BAUDRATE) % (1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg)) == 0) + { + /* bittiming configuration found. now update SJW to that it is never greater + * than one of the phase segments. Giving the fact that the sample point is + * rather high, only phase seg 2 need to be considered for this. + */ + if (bitClkParms.uPhase2Seg < 4) + { + bitClkParms.uSJW = bitClkParms.uPhase2Seg; + } + /* calculate the actual prescaler value */ + bitClkParms.uQuantumPrescaler = ((BOOT_CPU_XTAL_SPEED_KHZ*1000)/BOOT_COM_CAN_BAUDRATE)/(1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg); + /* apply this bittiming configuration */ + CANSetBitTiming(CAN0_BASE, &bitClkParms); + /* break loop and return from function */ + return 1; + } + } + } + } + /* no valid bittiming configuration found */ + return 0; +} /*** end of CanSetBittiming ***/ + + +/**************************************************************************************** +** NAME: BootComInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the CAN communication interface +** +****************************************************************************************/ +void BootComInit(void) +{ + tCANMsgObject rxMsgObject; + + /* configure the CAN pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); + GPIOPinTypeCAN(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1); + /* enable the CAN controller */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0); + /* reset the state of the CAN controller, including the message objects */ + CANInit(CAN0_BASE); + /* set the bittiming */ + CanSetBittiming(); + /* take the CAN controller out of the initialization state */ + CANEnable(CAN0_BASE); + /* setup message object 1 to receive the BOOT_COM_CAN_RX_MSG_ID message*/ + rxMsgObject.ulMsgID = BOOT_COM_CAN_RX_MSG_ID; + rxMsgObject.ulMsgIDMask = 0x7ff; + rxMsgObject.ulFlags = MSG_OBJ_USE_ID_FILTER; + rxMsgObject.ulMsgLen = 8; + CANMessageSet(CAN0_BASE, CAN_RX_MSGOBJECT_IDX+1, &rxMsgObject, MSG_OBJ_TYPE_RX); +} /*** end of BootComInit ***/ + + +/**************************************************************************************** +** NAME: BootComCheckActivationRequest +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Receives the CONNECT request from the host, which indicates that the +** bootloader should be activated and, if so, activates it. +** +****************************************************************************************/ +void BootComCheckActivationRequest(void) +{ + unsigned long status; + tCANMsgObject msgObject; + unsigned char msgData[8]; + + /* get bitmask of message objects with new data */ + status = CANStatusGet(CAN0_BASE, CAN_STS_NEWDAT); + /* check if the BOOT_COM_CAN_RX_MSG_ID message was received */ + if ((status & canBitNum2Mask[CAN_RX_MSGOBJECT_IDX]) != 0) + { + /* read the message data */ + msgObject.pucMsgData = msgData; + CANMessageGet(CAN0_BASE, CAN_RX_MSGOBJECT_IDX+1, &msgObject, true); + /* check if this was an XCP CONNECT command */ + if ((msgData[0] == 0xff) && (msgData[1] == 0x00)) + { + /* connection request received so start the bootloader */ + BootActivate(); + } + } +} /*** end of BootComCheckActivationRequest ***/ +#endif /* BOOT_COM_CAN_ENABLE > 0 */ + + +/*********************************** end of boot.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.h new file mode 100644 index 00000000..6da3f21c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/boot.h @@ -0,0 +1,42 @@ +/**************************************************************************************** +| Description: demo program bootloader interface header file +| File Name: boot.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef BOOT_H +#define BOOT_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void BootComInit(void); +void BootComCheckActivationRequest(void); + + +#endif /* BOOT_H */ +/*********************************** end of boot.h *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/build.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/build.bat new file mode 100644 index 00000000..44c0c1b8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/build.bat @@ -0,0 +1,2 @@ +@echo off +make --directory=../ all diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/clean.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/clean.bat new file mode 100644 index 00000000..32c4b5f2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cmd/clean.bat @@ -0,0 +1,2 @@ +@echo off +make --directory=../ clean diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cstart.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cstart.c new file mode 100644 index 00000000..348255d9 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/cstart.c @@ -0,0 +1,94 @@ +/**************************************************************************************** +| Description: Demo program C startup source file +| File Name: cstart.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* External function protoypes +****************************************************************************************/ +extern int main(void); + + +/**************************************************************************************** +* External data declarations +****************************************************************************************/ +/* these externals are declared by the linker */ +extern unsigned long _etext; +extern unsigned long _data; +extern unsigned long _edata; +extern unsigned long _bss; +extern unsigned long _ebss; +extern unsigned long _estack; + + +/**************************************************************************************** +** NAME: reset_handler +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Reset interrupt service routine. Configures the stack, initializes +** RAM and jumps to function main. +** +****************************************************************************************/ +void reset_handler(void) +{ + unsigned long *pSrc, *pDest; + + /* initialize stack pointer */ + __asm(" ldr r1, =_estack\n" + " mov sp, r1"); + /* copy the data segment initializers from flash to SRAM */ + pSrc = &_etext; + for(pDest = &_data; pDest < &_edata; ) + { + *pDest++ = *pSrc++; + } + /* zero fill the bss segment. this is done with inline assembly since this will + * clear the value of pDest if it is not kept in a register. + */ + __asm(" ldr r0, =_bss\n" + " ldr r1, =_ebss\n" + " mov r2, #0\n" + " .thumb_func\n" + "zero_loop:\n" + " cmp r0, r1\n" + " it lt\n" + " strlt r2, [r0], #4\n" + " blt zero_loop"); + /* start the software application by calling its entry point */ + main(); +} /*** end of reset_handler ***/ + + +/************************************ end of cstart.c **********************************/ \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/header.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/header.h new file mode 100644 index 00000000..77ccf204 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/header.h @@ -0,0 +1,57 @@ +/**************************************************************************************** +| Description: generic header file +| File Name: header.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef HEADER_H +#define HEADER_H + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "../Boot/config.h" /* bootloader configuration */ +#include "boot.h" /* bootloader interface driver */ +#include "irq.h" /* IRQ driver */ +#include "led.h" /* LED driver */ +#include "time.h" /* Timer driver */ +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/sysctl.h" +#include "driverlib/gpio.h" +#include "driverlib/uart.h" +#include "driverlib/can.h" +#include "driverlib/interrupt.h" +#include "driverlib/systick.h" + + + +#endif /* HEADER_H */ +/*********************************** end of header.h ***********************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.project b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.project new file mode 100644 index 00000000..efb73d89 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.project @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + break main +continue + + + + + + + make clean + make + + + + None + $(WorkspacePath)/.. + + + + + + + + + + + + + + + + + + + + + + + make clean + make + + + + None + $(WorkspacePath) + + + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.workspace b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.workspace new file mode 100644 index 00000000..4060139b --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/DemoProg.workspace @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/readme.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/readme.txt new file mode 100644 index 00000000..8a340a19 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/ide/readme.txt @@ -0,0 +1,4 @@ +Integrated Development Environment +---------------------------------- +Codelite was used as the editor during the development of this software program. This directory contains the Codelite +workspace and project files. Codelite is a cross platform open source C/C++ IDE, available at http://www.codelite.org/. \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.c new file mode 100644 index 00000000..0f469a13 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.c @@ -0,0 +1,97 @@ +/**************************************************************************************** +| Description: IRQ driver source file +| File Name: irq.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Local data definitions +****************************************************************************************/ +static unsigned char interruptNesting = 0; /* used for global interrupt en/disable */ + + +/**************************************************************************************** +** NAME: IrqInterruptEnable +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Enables the generation IRQ interrupts. Typically called once during +** software startup after completion of the initialization. +** +****************************************************************************************/ +void IrqInterruptEnable(void) +{ + IntMasterEnable(); +} /*** end of IrqInterruptEnable ***/ + + +/**************************************************************************************** +** NAME: HwInterruptDisable +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Disables the generation IRQ interrupts and stores information on +** whether or not the interrupts were already disabled before explicitly +** disabling them with this function. Normally used as a pair together +** with IrqInterruptRestore during a critical section. +** +****************************************************************************************/ +void IrqInterruptDisable(void) +{ + if (interruptNesting == 0) + { + IntMasterDisable(); + } + interruptNesting++; +} /*** end of IrqInterruptDisable ***/ + + +/**************************************************************************************** +** NAME: IrqInterruptRestore +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Restore the generation IRQ interrupts to the setting it had prior to +** calling IrqInterruptDisable. Normally used as a pair together with +** IrqInterruptDisable during a critical section. +** +****************************************************************************************/ +void IrqInterruptRestore(void) +{ + interruptNesting--; + if (interruptNesting == 0) + { + IntMasterEnable(); + } +} /*** end of IrqInterruptRestore ***/ + + +/*********************************** end of irq.c **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.h new file mode 100644 index 00000000..73e97bc3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/irq.h @@ -0,0 +1,43 @@ +/**************************************************************************************** +| Description: IRQ driver header file +| File Name: irq.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef IRQ_H +#define IRQ_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void IrqInterruptEnable(void); +void IrqInterruptDisable(void); +void IrqInterruptRestore(void); + + +#endif /* IRQ_H */ +/*********************************** end of irq.h **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.c new file mode 100644 index 00000000..9c854f68 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.c @@ -0,0 +1,101 @@ +/**************************************************************************************** +| Description: LED driver source file +| File Name: led.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Macro definitions +****************************************************************************************/ +#define LED_TOGGLE_MS (500) /* toggle interval time in millisecodns */ + + +/**************************************************************************************** +** NAME: LedInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the LED. +** +****************************************************************************************/ +void LedInit(void) +{ + /* enable the peripherals used by the LED driver */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); + /* configure the LED as digital output and turn off the LED */ + GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, 0x01); + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 0); +} /*** end of LedInit ***/ + + +/**************************************************************************************** +** NAME: LedToggle +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Toggles the LED at a fixed time interval. +** +****************************************************************************************/ +void LedToggle(void) +{ + static unsigned char led_toggle_state = 0; + static unsigned long timer_counter_last = 0; + unsigned long timer_counter_now; + + /* check if toggle interval time passed */ + timer_counter_now = TimeGet(); + if ( (timer_counter_now - timer_counter_last) < LED_TOGGLE_MS) + { + /* not yet time to toggle */ + return; + } + + /* determine toggle action */ + if (led_toggle_state == 0) + { + led_toggle_state = 1; + /* turn the LED on */ + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 1); + } + else + { + led_toggle_state = 0; + /* turn the LED off */ + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 0); + } + + /* store toggle time to determine next toggle interval */ + timer_counter_last = timer_counter_now; +} /*** end of LedToggle ***/ + + +/*********************************** end of led.c **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.h new file mode 100644 index 00000000..b5126edb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/led.h @@ -0,0 +1,42 @@ +/**************************************************************************************** +| Description: LED driver header file +| File Name: led.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef LED_H +#define LED_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void LedInit(void); +void LedToggle(void); + + +#endif /* LED_H */ +/*********************************** end of led.h **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/EULA.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/EULA.txt new file mode 100644 index 00000000..7c1cfc7a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/EULA.txt @@ -0,0 +1,400 @@ +License Agreement + +Important - This is a legally binding agreement. Read it carefully. After you +read the following terms, you will be asked whether you are authorized to +commit your company to abide by the following terms. THIS AGREEMENT IS +DISPLAYED FOR YOU TO READ PRIOR TO DOWNLOADING OR USING THE "LICENSED +MATERIALS". + +DO NOT DOWNLOAD OR INSTALL the software programs unless you agree on behalf of +yourself and your company to be bound by the terms of this License Agreement. + +DO NOT CLICK "I AGREE" UNLESS: + +1. YOU ARE AUTHORIZED TO AGREE TO THE TERMS OF THIS LICENSE ON BEHALF OF +YOURSELF AND YOUR COMPANY; AND + +2. YOU INTEND TO ENTER THIS LEGALLY BINDING AGREEMENT ON BEHALF OF YOURSELF AND +YOUR COMPANY. + +Important - Read carefully: This software license agreement ("Agreement") is a +legal agreement between you (either an individual or entity) and Texas +Instruments Incorporated ("TI"). The "Licensed Materials" subject to this +Agreement include the software programs TI has granted you access to download +and any "on-line" or electronic documentation associated with these programs, +or any portion thereof, and may also include hardware, reference designs and +associated documentation. The Licensed Materials are specifically designed and +licensed for use solely and exclusively with microprocessor/microcontroller +devices manufactured by or for TI ("TI Devices"). By installing, copying or +otherwise using the Licensed Materials you agree to abide by the provisions set +forth herein. This Agreement is displayed for you to read prior to using the +Licensed Materials. If you choose not to accept or agree with these provisions, +do not download or install the Licensed Materials. + +1. Delivery. TI may deliver the Licensed Materials, or portions thereof, to you +electronically. + +2. License Grant and Use Restrictions. + +a. Limited Source Code License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a limited, free, non-transferable, +non-exclusive, non-assignable, non-sub-licensable license to make copies, +prepare derivative works, display internally and use internally the Licensed +Materials provided to you in source code for the sole purposes of designing and +developing object and executable versions of such Licensed Materials or any +derivative thereof, that execute solely and exclusively on TI Devices used in +Customer Product(s), and maintaining and supporting such Licensed Materials, or +any derivative thereof, and Customer Product(s). "Customer Product" means a +final product distributed by or for you that consists of both hardware, +including one or more TI Devices, and software components, including only +executable versions of the Licensed Materials that execute solely and +exclusively on or with such TI Devices and not on devices manufactured by or +for an entity other than TI. + +b. Production and Distribution License. Subject to the terms of this Agreement, +and commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-exclusive, non-transferable, +non-assignable, worldwide license to: + +(i). Use object code versions of the Licensed Materials, or any derivative +thereof, to make copies, display internally, evaluate, test, distribute +internally and use internally for the sole purposes of designing and developing +Customer Product(s), and maintaining and supporting the Licensed Materials and +Customer Product(s); + +(ii). Make copies, use, sell, offer to sell, and otherwise distribute object +code and executable versions of the Licensed Materials, or any derivative +thereof, for use in or with Customer Product(s), provided that such Licensed +Materials are embedded in or only used with Customer Product(s), and provided +further that such Licensed Materials execute solely and exclusively on a TI +Device and not on any device manufactured by or for an entity other than TI. + +c. Demonstration License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to demonstrate to third +parties the Licensed Materials as they are used in Customer Products executing +solely and exclusively on TI Devices, provided that such Licensed Materials are +demonstrated in object or executable versions only. + +d. Reference Design Use License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to: + +(i). use the Licensed Materials to design, develop, manufacture or have +manufactured, sell, offer to sell, or otherwise distribute Customer Product(s) +or product designs, including portions or derivatives of the Licensed Materials +as they are incorporated in or used with Customer Product(s), provided such +Customer Products or product designs utilize a TI Device. + +e. Contractors and Suppliers. The licenses granted to you hereunder shall +include your on-site and off-site suppliers and independent contractors, while +such suppliers and independent contractors are performing work for or providing +services to you, provided that such suppliers and independent contractors have +executed work-for-hire agreements with you containing terms and conditions not +inconsistent with the terms and conditions set forth is this Agreement and +provided further that such contractors may provide work product to only you +under such work-for-hire agreements. + +f. No Other License. Notwithstanding anything to the contrary, nothing in this +Agreement shall be construed as a license to any intellectual property rights +of TI other than those rights embodied in the Licensed Materials provided to +you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY +ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED +HEREIN. + +g. Restrictions. You shall maintain the source code versions of the Licensed +Materials under password control protection and shall not disclose such source +code versions of the Licensed Materials, or any derivative thereof, to any +person other than your employees and contractors whose job performance requires +access. You shall not use the Licensed Materials with a processing device +manufactured by or for an entity other than TI, and you agree that any such +unauthorized use of the Licensed Materials is a material breach of this +Agreement. Except as expressly provided in this Agreement, you shall not copy, +publish, disclose, display, provide, transfer or make available the Licensed +Materials to any third party and you shall not sublicense, transfer, or assign +the Licensed Materials or your rights under this Agreement to any third party. +You shall not mortgage, pledge or encumber the Licensed Materials in any way. +You shall not (i) incorporate, combine, or distribute the Licensed Materials, +or any derivative thereof, with any Public Software, or (ii) use Public +Software in the development of any derivatives of the Licensed Materials, each +in such a way that would cause the Licensed Materials, or any derivative +thereof, to be subject to all or part of the license obligations or other +intellectual property related terms with respect to such Public Software, +including but not limited to, the obligations that the Licensed Materials, or +any derivative thereof, incorporated into, combined, or distributed with such +Public Software (x) be disclosed or distributed in source code form, be +licensed for the purpose of making derivatives of such software, or be +redistributed free of charge, contrary to the terms and conditions of this +Agreement, (y) be used with devices other than TI Devices, or (z) be otherwise +used or distributed in a manner contrary to the terms and conditions of this +Agreement. As used in this Section 2(g), "Public Software" means any software +that contains, or is derived in whole or in part from, any software distributed +as open source software, including but not limited to software licensed under +the following or similar models: (A) GNU's General Public License (GPL) or +Lesser/Library GPL (LGPL), (B) the Artistic License (e.g., PERL), (C) the +Mozilla Public License, (D) the Netscape Public License, (E) the Sun Community +Source License (SCSL), (F) the Sun Industry Standards Source License (SISL), +(G) the Apache Server license, (H) QT Free Edition License, (I) IBM Public +License, and (J) BitKeeper. + +h. Termination. This Agreement is effective until terminated. You may terminate +this Agreement at any time by written notice to TI. Without prejudice to any +other rights, if you fail to comply with the terms of this Agreement, TI may +terminate your right to use the Licensed Materials upon written notice to you. +Upon termination of this Agreement, you will destroy any and all copies of the +Licensed Materials in your possession, custody or control and provide to TI a +written statement signed by your authorized representative certifying such +destruction. The following sections will survive any expiration or termination +of this Agreement: 2(h) (Termination), 3 (Licensed Materials Ownership), 6 +(Warranties and Limitations), 7 (Indemnification Disclaimer), 10 (Export +Control), 11 (Governing Law and Severability), 12 (PRC Provisions), and 13 +(Entire Agreement). The obligations set forth in Section 5 (Confidential +Information) will survive any expiration or termination of this Agreement for +three (3) years after such expiration or termination. + +3. Licensed Materials Ownership. The Licensed Materials are licensed, not sold +to you, and can only be used in accordance with the terms of this Agreement. +Subject to the licenses granted to you pursuant to this Agreement, TI and TI's +licensors own and shall continue to own all right, title, and interest in and +to the Licensed Materials, including all copies thereof. The parties agree that +all fixes, modifications and improvements to the Licensed Materials conceived +of or made by TI that are based, either in whole or in part, on your feedback, +suggestions or recommendations are the exclusive property of TI and all right, +title and interest in and to such fixes, modifications or improvements to the +Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree +that when your independently developed software or hardware components are +combined, in whole or in part, with the Licensed Materials, your right to use +the Licensed Materials embodied in such resulting combined work shall remain +subject to the terms and conditions of this Agreement. + +4. Intellectual Property Rights. + +a. The Licensed Materials contain copyrighted material, trade secrets and other +proprietary information of TI and TI's licensors and are protected by copyright +laws, international copyright treaties, and trade secret laws, as well as other +intellectual property laws. To protect TI's and TI's licensors' rights in the +Licensed Materials, you agree, except as specifically permitted by statute by a +provision that cannot be waived by contract, not to "unlock", decompile, +reverse engineer, disassemble or otherwise translate any portions of the +Licensed Materials to a human-perceivable form nor to permit any person or +entity to do so. You shall not remove, alter, cover, or obscure any +confidentiality, trade secret, proprietary, or copyright notices, trade-marks, +proprietary, patent, or other identifying marks or designs from any component +of the Licensed Materials and you shall reproduce and include in all copies of +the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI +and TI's licensors as they appear in the Licensed Materials. TI reserves all +rights not specifically granted under this Agreement. + +b. Third parties may claim to own patents, copyrights, or other intellectual +property rights that cover the implementation of certain Licensed Materials. +Certain Licensed Materials may also be based on industry recognized standards, +including but not limited to specifically the ISO MPEG and ITU standards, and +software programs published by industry recognized standards bodies and certain +third parties claim to own patents, copyrights, and other intellectual property +rights that cover implementation of those standards. You acknowledge and agree +that this Agreement does not convey a license to any such third party patents, +copyrights, and other intellectual property rights and that you are solely +responsible for any patent, copyright, or other intellectual property right +claims that relate to your use and distribution of the Licensed Materials, and +your use and distribution of your products that include or incorporate the +Licensed Materials. + +5. Confidential Information. You acknowledge and agree that the Licensed +Materials contain trade secrets and other confidential information of TI and +TI's licensors. You agree to use the Licensed Materials solely within the scope +of the licenses set forth herein, to maintain the Licensed Materials in strict +confidence, to use at least the same procedures and degree of care that you use +to prevent disclosure of your own confidential information of like importance +but in no instance less than reasonable care, and to prevent disclosure of the +Licensed Materials to any third party, except as may be necessary and required +in connection with your rights and obligations hereunder. You agree to obtain +executed confidentiality agreements with your employees and contractors having +access to the Licensed Materials and to diligently take steps to enforce such +agreements in this respect. TI agrees that the employment agreements used in +the normal course of your business shall satisfy the requirements of this +section. TI may disclose your contact information to TI's applicable licensors. + +6. Warranties and Limitations. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED +MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN +IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU +ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR +CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY +OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR +DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU +WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED +MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR +FAILURES. + +THE LICENSED MATERIALS AND ANY REALTED DOCUMENTATION ARE PROVIDED "AS IS" AND +WITH ALL FAULTS. TI MAKES NO WARRANTY OR REPRESENTATION, WHETHER EXPRESS, +IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT +LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, +RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET +ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, +COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO +USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN +THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO +MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR +SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED. + +IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL, +INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY +THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE +USE OF THE LICENSED MATERIALS, REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, +COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF +DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR +INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS +AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE +HUNDRED U.S. DOLLARS (US$500). THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT +ENLARGE OR EXTEND THESE LIMITS. + +Because some jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages or limitation on how long an implied +warranty lasts, the above limitations or exclusions may not apply to you. + +7. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE +LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY +INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR +DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR +SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR +INCORPORATE THE LICENSED MATERIALS. + +You will defend and indemnify TI in the event of claim, liability or costs +(including reasonable attorney's fees related to Your use or any sub-licensee's +use of the Licensed Materials) relating in any way to Your violation of the +terms of the License Grants set forth in Section 2, or any other violation of +other terms and conditions of this Agreement. + +8. No Technical Support. TI and TI's licensors are under no obligation to +install, maintain or support the Licensed Materials. + +9. Notices. All notices to TI hereunder shall be delivered to Texas Instruments +Incorporated, AEC Software Operations, 12203 Southwest Freeway, Mail Station +701, Stafford, Texas 77477, Attention: Administrator, AEC Software Operations, +with a copy to Texas Instruments Incorporated, 12203 Southwest Freeway, Mail +Station 725, Stafford, Texas 77477, Attention: Legal Department. All notices +shall be deemed served when received by TI. + +10. Export Control. You hereby acknowledge that the Licensed Materials are +subject to export control under the U.S. Commerce Department's Export +Administration Regulations ("EAR"). You further hereby acknowledge and agree +that unless prior authorization is obtained from the U.S. Commerce Department, +neither you nor your customers will export, re-export, or release, directly or +indirectly, any technology, software, or software source code (as defined in +Part 772 of the EAR), received from TI, or export, directly or indirectly, any +direct product of such technology, software, or software source code (as +defined in Part 734 of the EAR), to any destination or country to which the +export, re-export, or release of the technology, software, or software source +code, or direct product is prohibited by the EAR. You agree that none of the +Licensed Materials may be downloaded or otherwise exported or reexported (i) +into (or to a national or resident of) Cuba, Iran, North Korea, Sudan and Syria +or any other country the U.S. has embargoed goods; or (ii) to anyone on the +U.S. Treasury Department's List of Specially Designated Nationals or the U.S. +Commerce Department's Denied Persons List or Entity List. You represent and +warrant that you are not located in, under the control of, or a national or +resident of any such country or on any such list and you will not use or +transfer the Licensed Materials for use in any sensitive nuclear, chemical or +biological weapons, or missile technology end-uses unless authorized by the +U.S. Government by regulation or specific license or for a military end-use in, +or by any military entity of Albania, Armenia, Azerbaijan, Belarus, Cambodia, +China, Georgia, Iran, Iraq, Kazakhstan, Kyrgyzstan, Laos, Libya, Macau, +Moldova, Mongolia, Russia, Tajikistan, Turkmenistan, Ukraine, Uzbekistan, and +Vietnam. Any software export classification made by TI shall be for TI's +internal use only and shall not be construed as a representation or warranty +regarding the proper export classification for such software or whether an +export license or other documentation is required for the exportation of such +software. + +11. Governing Law and Severability. This Agreement will be governed by and +interpreted in accordance with the laws of the State of Texas, without +reference to conflict of laws principles. If for any reason a court of +competent jurisdiction finds any provision of the Agreement to be +unenforceable, that provision will be enforced to the maximum extent possible +to effectuate the intent of the parties, and the remainder of the Agreement +shall continue in full force and effect. This Agreement shall not be governed +by the United Nations Convention on Contracts for the International Sale of +Goods, or by the Uniform Computer Information Transactions Act (UCITA), as it +may be enacted in the State of Texas. The parties agree that non-exclusive +jurisdiction for any dispute arising out of or relating to this Agreement lies +within the courts located in the State of Texas. Notwithstanding the foregoing, +any judgment may be enforced in any United States or foreign court, and either +party may seek injunctive relief in any United States or foreign court. + +12. PRC Provisions. If you are located in the People's Republic of China +("PRC") or if the Licensed Materials will be sent to the PRC, the following +provisions shall apply and shall supersede any other provisions in this +Agreement concerning the same subject matter as the following provisions: + +a. Registration Requirements. You shall be solely responsible for performing +all acts and obtaining all approvals that may be required in connection with +this Agreement by the government of the PRC, including but not limited to +registering pursuant to, and otherwise complying with, the PRC Measures on the +Administration of Software Products, Management Regulations on Technology +Import-Export, and Technology Import and Export Contract Registration +Management Rules. Upon receipt of such approvals from the government +authorities, you shall forward evidence of all such approvals to TI for its +records. In the event that you fail to obtain any such approval or +registration, you shall be solely responsible for any and all losses, damages +or costs resulting therefrom, and shall indemnify TI for all such losses, +damages or costs. + +b. Governing Language. This Agreement is written and executed in the English +language. If a translation of this Agreement is required for any purpose, +including but not limited to registration of the Agreement pursuant to any +governmental laws, regulations or rules, you shall be solely responsible for +creating such translation. Any translation of this Agreement into a language +other than English is intended solely in order to comply with such laws or for +reference purposes, and the English language version shall be authoritative and +controlling. + +c. Export Control. + +(i). Diversions of Technology. You hereby agree that unless prior authorization +is obtained from the U.S. Department of Commerce, neither you nor your +subsidiaries or affiliates shall knowingly export, re-export, or release, +directly or indirectly, any technology, software, or software source code (as +defined in Part 772 of the Export Administration Regulations of the U.S. +Department of Commerce ("EAR")), received from TI or any of its affiliated +companies, or export, directly or indirectly, any direct product of such +technology, software, or software source code (as defined in Part 734 of the +EAR), to any destination or country to which the export, re-export, or release +of the technology, software, software source code, or direct product is +prohibited by the EAR. + +(ii). Assurance of Compliance. You understand and acknowledge that products, +technology (regardless of the form in which it is provided), software or +software source code, received from TI or any of its affiliates under this +Agreement may be under export control of the United States or other countries. +You shall comply with the United States and other applicable non-U.S. laws and +regulations governing the export, re-export and release of any products, +technology, software, or software source code received under this Agreement +from TI or its affiliates. You shall not undertake any action that is +prohibited by the EAR. Without limiting the generality of the foregoing, you +specifically agree that you shall not transfer or release products, technology, +software, or software source code of TI or its affiliates to, or for use by, +military end users or for use in military, missile, nuclear, biological, or +chemical weapons end uses. + +(iii). Licenses. Each party shall secure at its own expense, such licenses and +export and import documents as are necessary for each respective party to +fulfill its obligations under this Agreement. If such licenses or government +approvals cannot be obtained, TI may terminate this Agreement, or shall +otherwise be excused from the performance of any obligations it may have under +this Agreement for which the licenses or government approvals are required. + +13. Entire Agreement. This is the entire Agreement between you and TI, and +absent a signed and effective software license agreement related to the subject +matter of this Agreement, this Agreement supersedes any prior agreement between +the parties related to the subject matter of this Agreement. Notwithstanding +the foregoing, any signed and effective software license agreement relating to +the subject matter hereof will supersede the terms of this Agreement. No +amendment or modification of this Agreement will be effective unless in writing +and signed by a duly authorized representative of TI. You hereby warrant and +represent that you have obtained all authorizations and other applicable +consents required empowering you to enter into this Agreement. + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.c new file mode 100644 index 00000000..d6ef5ccc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.c @@ -0,0 +1,1470 @@ +//***************************************************************************** +// +// adc.c - Driver for the ADC. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup adc_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_adc.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/adc.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// These defines are used by the ADC driver to simplify access to the ADC +// sequencer's registers. +// +//***************************************************************************** +#define ADC_SEQ (ADC_O_SSMUX0) +#define ADC_SEQ_STEP (ADC_O_SSMUX1 - ADC_O_SSMUX0) +#define ADC_SSMUX (ADC_O_SSMUX0 - ADC_O_SSMUX0) +#define ADC_SSCTL (ADC_O_SSCTL0 - ADC_O_SSMUX0) +#define ADC_SSFIFO (ADC_O_SSFIFO0 - ADC_O_SSMUX0) +#define ADC_SSFSTAT (ADC_O_SSFSTAT0 - ADC_O_SSMUX0) +#define ADC_SSOP (ADC_O_SSOP0 - ADC_O_SSMUX0) +#define ADC_SSDC (ADC_O_SSDC0 - ADC_O_SSMUX0) + +//***************************************************************************** +// +// The currently configured software oversampling factor for each of the ADC +// sequencers. +// +//***************************************************************************** +static unsigned char g_pucOversampleFactor[3]; + +//***************************************************************************** +// +//! Registers an interrupt handler for an ADC interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pfnHandler is a pointer to the function to be called when the +//! ADC sample sequence interrupt occurs. +//! +//! This function sets the handler to be called when a sample sequence +//! interrupt occurs. This will enable the global interrupt in the interrupt +//! controller; the sequence interrupt must be enabled with ADCIntEnable(). It +//! is the interrupt handler's responsibility to clear the interrupt source via +//! ADCIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntRegister(unsigned long ulBase, unsigned long ulSequenceNum, + void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine the interrupt to register based on the sequence number. + // + ulInt = ((ulBase == ADC0_BASE) ? (INT_ADC0SS0 + ulSequenceNum) : + (INT_ADC1SS0 + ulSequenceNum)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the timer interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for an ADC interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function unregisters the interrupt handler. This will disable the +//! global interrupt in the interrupt controller; the sequence interrupt must +//! be disabled via ADCIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntUnregister(unsigned long ulBase, unsigned long ulSequenceNum) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine the interrupt to unregister based on the sequence number. + // + ulInt = ((ulBase == ADC0_BASE) ? (INT_ADC0SS0 + ulSequenceNum) : + (INT_ADC1SS0 + ulSequenceNum)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Disables a sample sequence interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function disables the requested sample sequence interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) &= ~(1 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Enables a sample sequence interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function enables the requested sample sequence interrupt. Any +//! outstanding interrupts are cleared before enabling the sample sequence +//! interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear any outstanding interrupts on this sample sequence. + // + HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum; + + // + // Enable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) |= 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified sample sequence. +//! Either the raw interrupt status or the status of interrupts that are +//! allowed to reflect to the processor can be returned. +//! +//! \return The current raw or masked interrupt status. +// +//***************************************************************************** +unsigned long +ADCIntStatus(unsigned long ulBase, unsigned long ulSequenceNum, + tBoolean bMasked) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + ulTemp = HWREG(ulBase + ADC_O_ISC) & (0x10001 << ulSequenceNum); + } + else + { + ulTemp = HWREG(ulBase + ADC_O_RIS) & (0x10000 | (1 << ulSequenceNum)); + + // + // If the digital comparator status bit is set, reflect it to the + // appropriate sequence bit. + // + if(ulTemp & 0x10000) + { + ulTemp |= 0xF0000; + ulTemp &= ~(0x10000 << ulSequenceNum); + } + } + + // + // Return the interrupt status + // + return(ulTemp); +} + +//***************************************************************************** +// +//! Clears sample sequence interrupt source. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! The specified sample sequence interrupt is cleared, so that it no longer +//! asserts. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the interrupt. + // + HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Enables a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! Allows the specified sample sequence to be captured when its trigger is +//! detected. A sample sequence must be configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Enable the specified sequence. + // + HWREG(ulBase + ADC_O_ACTSS) |= 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Disables a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! Prevents the specified sample sequence from being captured when its trigger +//! is detected. A sample sequence should be disabled before it is configured. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable the specified sequences. + // + HWREG(ulBase + ADC_O_ACTSS) &= ~(1 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Configures the trigger source and priority of a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulTrigger is the trigger source that initiates the sample sequence; +//! must be one of the \b ADC_TRIGGER_* values. +//! \param ulPriority is the relative priority of the sample sequence with +//! respect to the other sample sequences. +//! +//! This function configures the initiation criteria for a sample sequence. +//! Valid sample sequences range from zero to three; sequence zero will capture +//! up to eight samples, sequences one and two will capture up to four samples, +//! and sequence three will capture a single sample. The trigger condition and +//! priority (with respect to other sample sequence execution) is set. +//! +//! The \e ulTrigger parameter can take on the following values: +//! +//! - \b ADC_TRIGGER_PROCESSOR - A trigger generated by the processor, via the +//! ADCProcessorTrigger() function. +//! - \b ADC_TRIGGER_COMP0 - A trigger generated by the first analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_COMP1 - A trigger generated by the second analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_COMP2 - A trigger generated by the third analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_EXTERNAL - A trigger generated by an input from the Port +//! B4 pin. +//! - \b ADC_TRIGGER_TIMER - A trigger generated by a timer; configured with +//! TimerControlTrigger(). +//! - \b ADC_TRIGGER_PWM0 - A trigger generated by the first PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM1 - A trigger generated by the second PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM2 - A trigger generated by the third PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM3 - A trigger generated by the fourth PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_ALWAYS - A trigger that is always asserted, causing the +//! sample sequence to capture repeatedly (so long as +//! there is not a higher priority source active). +//! +//! Note that not all trigger sources are available on all Stellaris family +//! members; consult the data sheet for the device in question to determine the +//! availability of triggers. +//! +//! The \e ulPriority parameter is a value between 0 and 3, where 0 represents +//! the highest priority and 3 the lowest. Note that when programming the +//! priority among a set of sample sequences, each must have unique priority; +//! it is up to the caller to guarantee the uniqueness of the priorities. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceConfigure(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long ulTrigger, unsigned long ulPriority) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + ASSERT((ulTrigger == ADC_TRIGGER_PROCESSOR) || + (ulTrigger == ADC_TRIGGER_COMP0) || + (ulTrigger == ADC_TRIGGER_COMP1) || + (ulTrigger == ADC_TRIGGER_COMP2) || + (ulTrigger == ADC_TRIGGER_EXTERNAL) || + (ulTrigger == ADC_TRIGGER_TIMER) || + (ulTrigger == ADC_TRIGGER_PWM0) || + (ulTrigger == ADC_TRIGGER_PWM1) || + (ulTrigger == ADC_TRIGGER_PWM2) || + (ulTrigger == ADC_TRIGGER_PWM3) || + (ulTrigger == ADC_TRIGGER_ALWAYS)); + ASSERT(ulPriority < 4); + + // + // Compute the shift for the bits that control this sample sequence. + // + ulSequenceNum *= 4; + + // + // Set the trigger event for this sample sequence. + // + HWREG(ulBase + ADC_O_EMUX) = ((HWREG(ulBase + ADC_O_EMUX) & + ~(0xf << ulSequenceNum)) | + ((ulTrigger & 0xf) << ulSequenceNum)); + + // + // Set the priority for this sample sequence. + // + HWREG(ulBase + ADC_O_SSPRI) = ((HWREG(ulBase + ADC_O_SSPRI) & + ~(0xf << ulSequenceNum)) | + ((ulPriority & 0x3) << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Configure a step of the sample sequencer. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulStep is the step to be configured. +//! \param ulConfig is the configuration of this step; must be a logical OR of +//! \b ADC_CTL_TS, \b ADC_CTL_IE, \b ADC_CTL_END, \b ADC_CTL_D, and one of the +//! input channel selects (\b ADC_CTL_CH0 through \b ADC_CTL_CH15). For parts +//! with the digital comparator feature, the follow values may also be OR'd +//! into the \e ulConfig value to enable the digital comparater feature: +//! \b ADC_CTL_CE and one of the comparater selects (\b ADC_CTL_CMP0 through +//! \b ADC_CTL_CMP7). +//! +//! This function will set the configuration of the ADC for one step of a +//! sample sequence. The ADC can be configured for single-ended or +//! differential operation (the \b ADC_CTL_D bit selects differential +//! operation when set), the channel to be sampled can be chosen (the +//! \b ADC_CTL_CH0 through \b ADC_CTL_CH15 values), and the internal +//! temperature sensor can be selected (the \b ADC_CTL_TS bit). Additionally, +//! this step can be defined as the last in the sequence (the \b ADC_CTL_END +//! bit) and it can be configured to cause an interrupt when the step is +//! complete (the \b ADC_CTL_IE bit). If the digital comparators are present +//! on the device, this step may also be configured send the ADC sample to +//! the selected comparator (the \b ADC_CTL_CMP0 through \b ADC_CTL_CMP7 +//! values) by using the \b ADC_CTL_CE bit. The configuration is used by the +//! ADC at the appropriate time when the trigger for this sequence occurs. +//! +//! \note If the Digitial Comparator is present and enabled using the +//! \b ADC_CTL_CE bit, the ADC sample will NOT be written into the ADC +//! sequence data FIFO. +//! +//! The \e ulStep parameter determines the order in which the samples are +//! captured by the ADC when the trigger occurs. It can range from zero to +//! seven for the first sample sequence, from zero to three for the second and +//! third sample sequence, and can only be zero for the fourth sample sequence. +//! +//! Differential mode only works with adjacent channel pairs (for example, 0 +//! and 1). The channel select must be the number of the channel pair to +//! sample (for example, \b ADC_CTL_CH0 for 0 and 1, or \b ADC_CTL_CH1 for 2 +//! and 3) or undefined results will be returned by the ADC. Additionally, if +//! differential mode is selected when the temperature sensor is being sampled, +//! undefined results will be returned by the ADC. +//! +//! It is the responsibility of the caller to ensure that a valid configuration +//! is specified; this function does not check the validity of the specified +//! configuration. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceStepConfigure(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long ulStep, unsigned long ulConfig) +{ + unsigned long ulTemp; + + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + ASSERT(((ulSequenceNum == 0) && (ulStep < 8)) || + ((ulSequenceNum == 1) && (ulStep < 4)) || + ((ulSequenceNum == 2) && (ulStep < 4)) || + ((ulSequenceNum == 3) && (ulStep < 1))); + + // + // Get the offset of the sequence to be configured. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Compute the shift for the bits that control this step. + // + ulStep *= 4; + + // + // Set the analog mux value for this step. + // + HWREG(ulBase + ADC_SSMUX) = ((HWREG(ulBase + ADC_SSMUX) & + ~(0x0000000f << ulStep)) | + ((ulConfig & 0x0f) << ulStep)); + + // + // Set the control value for this step. + // + HWREG(ulBase + ADC_SSCTL) = ((HWREG(ulBase + ADC_SSCTL) & + ~(0x0000000f << ulStep)) | + (((ulConfig & 0xf0) >> 4) << ulStep)); + + // + // Enable digital comparator if specified in the ulConfig bit-fields. + // + if(ulConfig & 0x000F0000) + { + // + // Program the comparator for the specified step. + // + ulTemp = HWREG(ulBase + ADC_SSDC); + ulTemp &= ~(0xF << ulStep); + ulTemp |= (((ulConfig & 0x00070000) >> 16) << ulStep); + HWREG(ulBase + ADC_SSDC) = ulTemp; + + // + // Enable the comparator. + // + ulTemp = HWREG(ulBase + ADC_SSOP); + ulTemp |= (1 << ulStep); + HWREG(ulBase + ADC_SSOP) = ulTemp; + } + + // + // Disable digital comparator if not specified. + // + else + { + ulTemp = HWREG(ulBase + ADC_SSOP); + ulTemp &= ~(1 << ulStep); + HWREG(ulBase + ADC_SSOP) = ulTemp; + } +} + +//***************************************************************************** +// +//! Determines if a sample sequence overflow occurred. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This determines if a sample sequence overflow has occurred. This will +//! happen if the captured samples are not read from the FIFO before the next +//! trigger occurs. +//! +//! \return Returns zero if there was not an overflow, and non-zero if there +//! was. +// +//***************************************************************************** +long +ADCSequenceOverflow(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine if there was an overflow on this sequence. + // + return(HWREG(ulBase + ADC_O_OSTAT) & (1 << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Clears the overflow condition on a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This will clear an overflow condition on one of the sample sequences. The +//! overflow condition must be cleared in order to detect a subsequent overflow +//! condition (it otherwise causes no harm). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceOverflowClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the overflow condition for this sequence. + // + HWREG(ulBase + ADC_O_OSTAT) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Determines if a sample sequence underflow occurred. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This determines if a sample sequence underflow has occurred. This will +//! happen if too many samples are read from the FIFO. +//! +//! \return Returns zero if there was not an underflow, and non-zero if there +//! was. +// +//***************************************************************************** +long +ADCSequenceUnderflow(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine if there was an underflow on this sequence. + // + return(HWREG(ulBase + ADC_O_USTAT) & (1 << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Clears the underflow condition on a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This will clear an underflow condition on one of the sample sequences. The +//! underflow condition must be cleared in order to detect a subsequent +//! underflow condition (it otherwise causes no harm). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceUnderflowClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the underflow condition for this sequence. + // + HWREG(ulBase + ADC_O_USTAT) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the captured data for a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pulBuffer is the address where the data is stored. +//! +//! This function copies data from the specified sample sequence output FIFO to +//! a memory resident buffer. The number of samples available in the hardware +//! FIFO are copied into the buffer, which is assumed to be large enough to +//! hold that many samples. This will only return the samples that are +//! presently available, which may not be the entire sample sequence if it is +//! in the process of being executed. +//! +//! \return Returns the number of samples copied to the buffer. +// +//***************************************************************************** +long +ADCSequenceDataGet(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long *pulBuffer) +{ + unsigned long ulCount; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Get the offset of the sequence to be read. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Read samples from the FIFO until it is empty. + // + ulCount = 0; + while(!(HWREG(ulBase + ADC_SSFSTAT) & ADC_SSFSTAT0_EMPTY) && (ulCount < 8)) + { + // + // Read the FIFO and copy it to the destination. + // + *pulBuffer++ = HWREG(ulBase + ADC_SSFIFO); + + // + // Increment the count of samples read. + // + ulCount++; + } + + // + // Return the number of samples read. + // + return(ulCount); +} + +//***************************************************************************** +// +//! Causes a processor trigger for a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number, with +//! \b ADC_TRIGGER_WAIT or \b ADC_TRIGGER_SIGNAL optionally ORed into it. +//! +//! This function triggers a processor-initiated sample sequence if the sample +//! sequence trigger is configured to \b ADC_TRIGGER_PROCESSOR. If +//! \b ADC_TRIGGER_WAIT is ORed into the sequence number, the +//! processor-initiated trigger is delayed until a later processor-initiated +//! trigger to a different ADC module that specifies \b ADC_TRIGGER_SIGNAL, +//! allowing multiple ADCs to start from a processor-initiated trigger in a +//! synchronous manner. +//! +//! \return None. +// +//***************************************************************************** +void +ADCProcessorTrigger(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulSequenceNum & 0xf) < 4); + + // + // Generate a processor trigger for this sample sequence. + // + HWREG(ulBase + ADC_O_PSSI) = ((ulSequenceNum & 0xffff0000) | + (1 << (ulSequenceNum & 0xf))); +} + +//***************************************************************************** +// +//! Configures the software oversampling factor of the ADC. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulFactor is the number of samples to be averaged. +//! +//! This function configures the software oversampling for the ADC, which can +//! be used to provide better resolution on the sampled data. Oversampling is +//! accomplished by averaging multiple samples from the same analog input. +//! Three different oversampling rates are supported; 2x, 4x, and 8x. +//! +//! Oversampling is only supported on the sample sequencers that are more than +//! one sample in depth (that is, the fourth sample sequencer is not +//! supported). Oversampling by 2x (for example) divides the depth of the +//! sample sequencer by two; so 2x oversampling on the first sample sequencer +//! can only provide four samples per trigger. This also means that 8x +//! oversampling is only available on the first sample sequencer. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulFactor) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulFactor == 2) || (ulFactor == 4) || (ulFactor == 8)) && + ((ulSequenceNum == 0) || (ulFactor != 8))); + + // + // Convert the oversampling factor to a shift factor. + // + for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1) + { + } + + // + // Save the sfiht factor. + // + g_pucOversampleFactor[ulSequenceNum] = ulValue; +} + +//***************************************************************************** +// +//! Configures a step of the software oversampled sequencer. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulStep is the step to be configured. +//! \param ulConfig is the configuration of this step. +//! +//! This function configures a step of the sample sequencer when using the +//! software oversampling feature. The number of steps available depends on +//! the oversampling factor set by ADCSoftwareOversampleConfigure(). The value +//! of \e ulConfig is the same as defined for ADCSequenceStepConfigure(). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulSequenceNum == 0) && + (ulStep < (8 >> g_pucOversampleFactor[ulSequenceNum]))) || + (ulStep < (4 >> g_pucOversampleFactor[ulSequenceNum]))); + + // + // Get the offset of the sequence to be configured. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Compute the shift for the bits that control this step. + // + ulStep *= 4 << g_pucOversampleFactor[ulSequenceNum]; + + // + // Loop through the hardware steps that make up this step of the software + // oversampled sequence. + // + for(ulSequenceNum = 1 << g_pucOversampleFactor[ulSequenceNum]; + ulSequenceNum; ulSequenceNum--) + { + // + // Set the analog mux value for this step. + // + HWREG(ulBase + ADC_SSMUX) = ((HWREG(ulBase + ADC_SSMUX) & + ~(0x0000000f << ulStep)) | + ((ulConfig & 0x0f) << ulStep)); + + // + // Set the control value for this step. + // + HWREG(ulBase + ADC_SSCTL) = ((HWREG(ulBase + ADC_SSCTL) & + ~(0x0000000f << ulStep)) | + (((ulConfig & 0xf0) >> 4) << ulStep)); + if(ulSequenceNum != 1) + { + HWREG(ulBase + ADC_SSCTL) &= ~((ADC_SSCTL0_IE0 | + ADC_SSCTL0_END0) << ulStep); + } + + // + // Go to the next hardware step. + // + ulStep += 4; + } +} + +//***************************************************************************** +// +//! Gets the captured data for a sample sequence using software oversampling. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pulBuffer is the address where the data is stored. +//! \param ulCount is the number of samples to be read. +//! +//! This function copies data from the specified sample sequence output FIFO to +//! a memory resident buffer with software oversampling applied. The requested +//! number of samples are copied into the data buffer; if there are not enough +//! samples in the hardware FIFO to satisfy this many oversampled data items +//! then incorrect results will be returned. It is the caller's responsibility +//! to read only the samples that are available and wait until enough data is +//! available, for example as a result of receiving an interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleDataGet(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long *pulBuffer, unsigned long ulCount) +{ + unsigned long ulIdx, ulAccum; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulSequenceNum == 0) && + (ulCount < (8 >> g_pucOversampleFactor[ulSequenceNum]))) || + (ulCount < (4 >> g_pucOversampleFactor[ulSequenceNum]))); + + // + // Get the offset of the sequence to be read. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Read the samples from the FIFO until it is empty. + // + while(ulCount--) + { + // + // Compute the sum of the samples. + // + ulAccum = 0; + for(ulIdx = 1 << g_pucOversampleFactor[ulSequenceNum]; ulIdx; ulIdx--) + { + // + // Read the FIFO and add it to the accumulator. + // + ulAccum += HWREG(ulBase + ADC_SSFIFO); + } + + // + // Write the averaged sample to the output buffer. + // + *pulBuffer++ = ulAccum >> g_pucOversampleFactor[ulSequenceNum]; + } +} + +//***************************************************************************** +// +//! Configures the hardware oversampling factor of the ADC. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulFactor is the number of samples to be averaged. +//! +//! This function configures the hardware oversampling for the ADC, which can +//! be used to provide better resolution on the sampled data. Oversampling is +//! accomplished by averaging multiple samples from the same analog input. Six +//! different oversampling rates are supported; 2x, 4x, 8x, 16x, 32x, and 64x. +//! Specifying an oversampling factor of zero will disable hardware +//! oversampling. +//! +//! Hardware oversampling applies uniformly to all sample sequencers. It does +//! not reduce the depth of the sample sequencers like the software +//! oversampling APIs; each sample written into the sample sequence FIFO is a +//! fully oversampled analog input reading. +//! +//! Enabling hardware averaging increases the precision of the ADC at the cost +//! of throughput. For example, enabling 4x oversampling reduces the +//! throughput of a 250 Ksps ADC to 62.5 Ksps. +//! +//! \note Hardware oversampling is available beginning with Rev C0 of the +//! Stellaris microcontroller. +//! +//! \return None. +// +//***************************************************************************** +void +ADCHardwareOversampleConfigure(unsigned long ulBase, unsigned long ulFactor) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(((ulFactor == 0) || (ulFactor == 2) || (ulFactor == 4) || + (ulFactor == 8) || (ulFactor == 16) || (ulFactor == 32) || + (ulFactor == 64))); + + // + // Convert the oversampling factor to a shift factor. + // + for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1) + { + } + + // + // Write the shift factor to the ADC to configure the hardware oversampler. + // + HWREG(ulBase + ADC_O_SAC) = ulValue; +} + +//***************************************************************************** +// +//! Configures an ADC digital comparator. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulConfig is the configuration of the comparator. +//! +//! This function will configure a comparator. The \e ulConfig parameter is +//! the result of a logical OR operation between the \b ADC_COMP_TRIG_xxx, and +//! \b ADC_COMP_INT_xxx values. +//! +//! The \b ADC_COMP_TRIG_xxx term can take on the following values: +//! +//! - \b ADC_COMP_TRIG_NONE to never trigger PWM fault condition. +//! - \b ADC_COMP_TRIG_LOW_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the low-band. +//! - \b ADC_COMP_TRIG_LOW_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the low-band. +//! - \b ADC_COMP_TRIG_LOW_HALWAYS to always trigger PWM fault condition when +//! ADC output is in the low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_TRIG_LOW_HONCE to trigger PWM fault condition once when ADC +//! output transitions into low-band only if ADC output has been in the +//! high-band since the last trigger output. +//! - \b ADC_COMP_TRIG_MID_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the mid-band. +//! - \b ADC_COMP_TRIG_MID_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the mid-band. +//! - \b ADC_COMP_TRIG_HIGH_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the high-band. +//! - \b ADC_COMP_TRIG_HIGH_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the high-band. +//! - \b ADC_COMP_TRIG_HIGH_HALWAYS to always trigger PWM fault condition when +//! ADC output is in the high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! - \b ADC_COMP_TRIG_HIGH_HONCE to trigger PWM fault condition once when ADC +//! output transitions into high-band only if ADC output has been in the +//! low-band since the last trigger output. +//! +//! The \b ADC_COMP_INT_xxx term can take on the following values: +//! +//! - \b ADC_COMP_INT_NONE to never generate ADC interrupt. +//! - \b ADC_COMP_INT_LOW_ALWAYS to always generate ADC interrupt when ADC +//! output is in the low-band. +//! - \b ADC_COMP_INT_LOW_ONCE to generate ADC interrupt once when ADC output +//! transitions into the low-band. +//! - \b ADC_COMP__INT_LOW_HALWAYS to always generate ADC interrupt when ADC +//! output is in the low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_LOW_HONCE to generate ADC interrupt once when ADC output +//! transitions into low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_MID_ALWAYS to always generate ADC interrupt when ADC +//! output is in the mid-band. +//! - \b ADC_COMP_INT_MID_ONCE to generate ADC interrupt once when ADC output +//! transitions into the mid-band. +//! - \b ADC_COMP_INT_HIGH_ALWAYS to always generate ADC interrupt when ADC +//! output is in the high-band. +//! - \b ADC_COMP_INT_HIGH_ONCE to generate ADC interrupt once when ADC output +//! transitions into the high-band. +//! - \b ADC_COMP_INT_HIGH_HALWAYS to always generate ADC interrupt when ADC +//! output is in the high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_HIGH_HONCE to generate ADC interrupt once when ADC output +//! transitions into high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + + // + // Save the new setting. + // + HWREG(ulBase + ADC_O_DCCTL0 + (ulComp * 4)) = ulConfig; +} + +//***************************************************************************** +// +//! Defines the ADC digital comparator regions. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulLowRef is the reference point for the low/mid band threshold. +//! \param ulHighRef is the reference point for the mid/high band threshold. +//! +//! The ADC digital comparator operation is based on three ADC value regions: +//! - \b low-band is defined as any ADC value less than or equal to the +//! \e ulLowRef value. +//! - \b mid-band is defined as any ADC value greater than the \e ulLowRef +//! value but less than or equal to the \e ulHighRef value. +//! - \b high-band is defined as any ADC value greater than the \e ulHighRef +//! value. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorRegionSet(unsigned long ulBase, unsigned long ulComp, + unsigned long ulLowRef, unsigned long ulHighRef) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + ASSERT((ulLowRef < 1024) && (ulLowRef <= ulHighRef)); + ASSERT(ulHighRef < 1024); + + // + // Save the new region settings. + // + HWREG(ulBase + ADC_O_DCCMP0 + (ulComp * 4)) = (ulHighRef << 16) | ulLowRef; +} + +//***************************************************************************** +// +//! Resets the current ADC digital comparator conditions. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator. +//! \param bTrigger is the flag to indicate reset of Trigger conditions. +//! \param bInterrupt is the flag to indicate reset of Interrupt conditions. +//! +//! Because the digital comparator uses current and previous ADC values, this +//! function is provide to allow the comparator to be reset to its initial +//! value to prevent stale data from being used when a sequence is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorReset(unsigned long ulBase, unsigned long ulComp, + tBoolean bTrigger, tBoolean bInterrupt) +{ + unsigned long ulTemp = 0; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + + // + // Set the appropriate bits to reset the trigger and/or interrupt + // comparator conditions. + // + if(bTrigger) + { + ulTemp |= (1 << (16 + ulComp)); + } + if(bInterrupt) + { + ulTemp |= (1 << ulComp); + } + + HWREG(ulBase + ADC_O_DCRIC) = ulTemp; +} + +//***************************************************************************** +// +//! Disables a sample sequence comparator interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function disables the requested sample sequence comparator interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable this sample sequence comparator interrupt. + // + HWREG(ulBase + ADC_O_IM) &= ~(0x10000 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Enables a sample sequence comparator interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function enables the requested sample sequence comparator interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Enable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) |= 0x10000 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the current comparator interrupt status. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! This returns the digitial comparator interrupt status bits. This status +//! is sequence agnostic. +//! +//! \return The current comparator interrupt status. +// +//***************************************************************************** +unsigned long +ADCComparatorIntStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the digitial comparator interrupt status. + // + return(HWREG(ulBase + ADC_O_DCISC)); +} + +//***************************************************************************** +// +//! Clears sample sequence comparator interrupt source. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulStatus is the bit-mapped interrupts status to clear. +//! +//! The specified interrupt status is cleared. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntClear(unsigned long ulBase, unsigned long ulStatus) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Clear the interrupt. + // + HWREG(ulBase + ADC_O_DCISC) = ulStatus; +} + +//***************************************************************************** +// +//! Selects the ADC reference. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulRef is the reference to use. +//! +//! The ADC reference is set as specified by \e ulRef. It must be one of +//! \b ADC_REF_INT or \b ADC_REF_EXT_3V, for internal or external reference. +//! If \b ADC_REF_INT is chosen, then an internal 3V reference is used and +//! no external reference is needed. If \b ADC_REF_EXT_3V is chosen, then a 3V +//! reference must be supplied to the AVREF pin. +//! +//! \note The ADC reference can only be selected on parts that have an external +//! reference. Consult the data sheet for your part to determine if there is +//! an external reference. +//! +//! \return None. +// +//***************************************************************************** +void +ADCReferenceSet(unsigned long ulBase, unsigned long ulRef) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulRef == ADC_REF_INT) || (ulRef == ADC_REF_EXT_3V)); + + // + // Set the reference. + // + HWREG(ulBase + ADC_O_CTL) = (HWREG(ulBase + ADC_O_CTL) & ~ADC_CTL_VREF) | + ulRef; +} + +//***************************************************************************** +// +//! Returns the current setting of the ADC reference. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! Returns the value of the ADC reference setting. The returned value will be +//! one of \b ADC_REF_INT or \b ADC_REF_EXT_3V. +//! +//! \note The value returned by this function is only meaningful if used on a +//! part that is capable of using an external reference. Consult the data +//! sheet for your part to determine if it has an external reference input. +//! +//! \return The current setting of the ADC reference. +// +//***************************************************************************** +unsigned long +ADCReferenceGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the value of the reference. + // + return(HWREG(ulBase + ADC_O_CTL) & ADC_CTL_VREF); +} + +//***************************************************************************** +// +//! Sets the phase delay between a trigger and the start of a sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulPhase is the phase delay, specified as one of \b ADC_PHASE_0, +//! \b ADC_PHASE_22_5, \b ADC_PHASE_45, \b ADC_PHASE_67_5, \b ADC_PHASE_90, +//! \b ADC_PHASE_112_5, \b ADC_PHASE_135, \b ADC_PHASE_157_5, \b ADC_PHASE_180, +//! \b ADC_PHASE_202_5, \b ADC_PHASE_225, \b ADC_PHASE_247_5, \b ADC_PHASE_270, +//! \b ADC_PHASE_292_5, \b ADC_PHASE_315, or \b ADC_PHASE_337_5. +//! +//! This function sets the phase delay between the detection of an ADC trigger +//! event and the start of the sample sequence. By selecting a different phase +//! delay for a pair of ADC modules (such as \b ADC_PHASE_0 and +//! \b ADC_PHASE_180) and having each ADC module sample the same analog input, +//! it is possible to increase the sampling rate of the analog input (with +//! samples N, N+2, N+4, and so on, coming from the first ADC and samples N+1, +//! N+3, N+5, and so on, coming from the second ADC). The ADC module has a +//! single phase delay that is applied to all sample sequences within that +//! module. +//! +//! \note This capability is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +ADCPhaseDelaySet(unsigned long ulBase, unsigned long ulPhase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulPhase == ADC_PHASE_0) || (ulPhase == ADC_PHASE_22_5) || + (ulPhase == ADC_PHASE_45) || (ulPhase == ADC_PHASE_67_5) || + (ulPhase == ADC_PHASE_90) || (ulPhase == ADC_PHASE_112_5) || + (ulPhase == ADC_PHASE_135) || (ulPhase == ADC_PHASE_157_5) || + (ulPhase == ADC_PHASE_180) || (ulPhase == ADC_PHASE_202_5) || + (ulPhase == ADC_PHASE_225) || (ulPhase == ADC_PHASE_247_5) || + (ulPhase == ADC_PHASE_270) || (ulPhase == ADC_PHASE_292_5) || + (ulPhase == ADC_PHASE_315) || (ulPhase == ADC_PHASE_337_5)); + + // + // Set the phase delay. + // + HWREG(ulBase + ADC_O_SPC) = ulPhase; +} + +//***************************************************************************** +// +//! Gets the phase delay between a trigger and the start of a sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! This function gets the current phase delay between the detection of an ADC +//! trigger event and the start of the sample sequence. +//! +//! \return Returns the phase delay, specified as one of \b ADC_PHASE_0, +//! \b ADC_PHASE_22_5, \b ADC_PHASE_45, \b ADC_PHASE_67_5, \b ADC_PHASE_90, +//! \b ADC_PHASE_112_5, \b ADC_PHASE_135, \b ADC_PHASE_157_5, \b ADC_PHASE_180, +//! \b ADC_PHASE_202_5, \b ADC_PHASE_225, \b ADC_PHASE_247_5, \b ADC_PHASE_270, +//! \b ADC_PHASE_292_5, \b ADC_PHASE_315, or \b ADC_PHASE_337_5. +// +//***************************************************************************** +unsigned long +ADCPhaseDelayGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the phase delay. + // + return(HWREG(ulBase + ADC_O_SPC)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.h new file mode 100644 index 00000000..f47a21f7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/adc.h @@ -0,0 +1,258 @@ +//***************************************************************************** +// +// adc.h - ADC headers for using the ADC driver functions. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ADC_H__ +#define __ADC_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to ADCSequenceConfigure as the ulTrigger +// parameter. +// +//***************************************************************************** +#define ADC_TRIGGER_PROCESSOR 0x00000000 // Processor event +#define ADC_TRIGGER_COMP0 0x00000001 // Analog comparator 0 event +#define ADC_TRIGGER_COMP1 0x00000002 // Analog comparator 1 event +#define ADC_TRIGGER_COMP2 0x00000003 // Analog comparator 2 event +#define ADC_TRIGGER_EXTERNAL 0x00000004 // External event +#define ADC_TRIGGER_TIMER 0x00000005 // Timer event +#define ADC_TRIGGER_PWM0 0x00000006 // PWM0 event +#define ADC_TRIGGER_PWM1 0x00000007 // PWM1 event +#define ADC_TRIGGER_PWM2 0x00000008 // PWM2 event +#define ADC_TRIGGER_PWM3 0x00000009 // PWM3 event +#define ADC_TRIGGER_ALWAYS 0x0000000F // Always event + +//***************************************************************************** +// +// Values that can be passed to ADCSequenceStepConfigure as the ulConfig +// parameter. +// +//***************************************************************************** +#define ADC_CTL_TS 0x00000080 // Temperature sensor select +#define ADC_CTL_IE 0x00000040 // Interrupt enable +#define ADC_CTL_END 0x00000020 // Sequence end select +#define ADC_CTL_D 0x00000010 // Differential select +#define ADC_CTL_CH0 0x00000000 // Input channel 0 +#define ADC_CTL_CH1 0x00000001 // Input channel 1 +#define ADC_CTL_CH2 0x00000002 // Input channel 2 +#define ADC_CTL_CH3 0x00000003 // Input channel 3 +#define ADC_CTL_CH4 0x00000004 // Input channel 4 +#define ADC_CTL_CH5 0x00000005 // Input channel 5 +#define ADC_CTL_CH6 0x00000006 // Input channel 6 +#define ADC_CTL_CH7 0x00000007 // Input channel 7 +#define ADC_CTL_CH8 0x00000008 // Input channel 8 +#define ADC_CTL_CH9 0x00000009 // Input channel 9 +#define ADC_CTL_CH10 0x0000000A // Input channel 10 +#define ADC_CTL_CH11 0x0000000B // Input channel 11 +#define ADC_CTL_CH12 0x0000000C // Input channel 12 +#define ADC_CTL_CH13 0x0000000D // Input channel 13 +#define ADC_CTL_CH14 0x0000000E // Input channel 14 +#define ADC_CTL_CH15 0x0000000F // Input channel 15 +#define ADC_CTL_CMP0 0x00080000 // Select Comparator 0 +#define ADC_CTL_CMP1 0x00090000 // Select Comparator 1 +#define ADC_CTL_CMP2 0x000A0000 // Select Comparator 2 +#define ADC_CTL_CMP3 0x000B0000 // Select Comparator 3 +#define ADC_CTL_CMP4 0x000C0000 // Select Comparator 4 +#define ADC_CTL_CMP5 0x000D0000 // Select Comparator 5 +#define ADC_CTL_CMP6 0x000E0000 // Select Comparator 6 +#define ADC_CTL_CMP7 0x000F0000 // Select Comparator 7 + +//***************************************************************************** +// +// Values that can be passed to ADCComparatorConfigure as part of the +// ulConfig parameter. +// +//***************************************************************************** +#define ADC_COMP_TRIG_NONE 0x00000000 // Trigger Disabled +#define ADC_COMP_TRIG_LOW_ALWAYS \ + 0x00001000 // Trigger Low Always +#define ADC_COMP_TRIG_LOW_ONCE 0x00001100 // Trigger Low Once +#define ADC_COMP_TRIG_LOW_HALWAYS \ + 0x00001200 // Trigger Low Always (Hysteresis) +#define ADC_COMP_TRIG_LOW_HONCE 0x00001300 // Trigger Low Once (Hysteresis) +#define ADC_COMP_TRIG_MID_ALWAYS \ + 0x00001400 // Trigger Mid Always +#define ADC_COMP_TRIG_MID_ONCE 0x00001500 // Trigger Mid Once +#define ADC_COMP_TRIG_HIGH_ALWAYS \ + 0x00001C00 // Trigger High Always +#define ADC_COMP_TRIG_HIGH_ONCE 0x00001D00 // Trigger High Once +#define ADC_COMP_TRIG_HIGH_HALWAYS \ + 0x00001E00 // Trigger High Always (Hysteresis) +#define ADC_COMP_TRIG_HIGH_HONCE \ + 0x00001F00 // Trigger High Once (Hysteresis) + +#define ADC_COMP_INT_NONE 0x00000000 // Interrupt Disabled +#define ADC_COMP_INT_LOW_ALWAYS \ + 0x00000010 // Interrupt Low Always +#define ADC_COMP_INT_LOW_ONCE 0x00000011 // Interrupt Low Once +#define ADC_COMP_INT_LOW_HALWAYS \ + 0x00000012 // Interrupt Low Always + // (Hysteresis) +#define ADC_COMP_INT_LOW_HONCE 0x00000013 // Interrupt Low Once (Hysteresis) +#define ADC_COMP_INT_MID_ALWAYS \ + 0x00000014 // Interrupt Mid Always +#define ADC_COMP_INT_MID_ONCE 0x00000015 // Interrupt Mid Once +#define ADC_COMP_INT_HIGH_ALWAYS \ + 0x0000001C // Interrupt High Always +#define ADC_COMP_INT_HIGH_ONCE 0x0000001D // Interrupt High Once +#define ADC_COMP_INT_HIGH_HALWAYS \ + 0x0000001E // Interrupt High Always + // (Hysteresis) +#define ADC_COMP_INT_HIGH_HONCE \ + 0x0000001F // Interrupt High Once (Hysteresis) + +//***************************************************************************** +// +// Values that can be used to modify the sequence number passed to +// ADCProcessorTrigger in order to get cross-module synchronous processor +// triggers. +// +//***************************************************************************** +#define ADC_TRIGGER_WAIT 0x08000000 // Wait for the synchronous trigger +#define ADC_TRIGGER_SIGNAL 0x80000000 // Signal the synchronous trigger + +//***************************************************************************** +// +// Values that can be passed to ADCPhaseDelaySet as the ulPhase parameter and +// returned from ADCPhaseDelayGet. +// +//***************************************************************************** +#define ADC_PHASE_0 0x00000000 // 0 degrees +#define ADC_PHASE_22_5 0x00000001 // 22.5 degrees +#define ADC_PHASE_45 0x00000002 // 45 degrees +#define ADC_PHASE_67_5 0x00000003 // 67.5 degrees +#define ADC_PHASE_90 0x00000004 // 90 degrees +#define ADC_PHASE_112_5 0x00000005 // 112.5 degrees +#define ADC_PHASE_135 0x00000006 // 135 degrees +#define ADC_PHASE_157_5 0x00000007 // 157.5 degrees +#define ADC_PHASE_180 0x00000008 // 180 degrees +#define ADC_PHASE_202_5 0x00000009 // 202.5 degrees +#define ADC_PHASE_225 0x0000000A // 225 degrees +#define ADC_PHASE_247_5 0x0000000B // 247.5 degrees +#define ADC_PHASE_270 0x0000000C // 270 degrees +#define ADC_PHASE_292_5 0x0000000D // 292.5 degrees +#define ADC_PHASE_315 0x0000000E // 315 degrees +#define ADC_PHASE_337_5 0x0000000F // 337.5 degrees + +//***************************************************************************** +// +// Values that can be passed to ADCReferenceSet as the ulRef parameter. +// +//***************************************************************************** +#define ADC_REF_INT 0x00000000 // Internal reference +#define ADC_REF_EXT_3V 0x00000001 // External 3V reference + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void ADCIntRegister(unsigned long ulBase, unsigned long ulSequenceNum, + void (*pfnHandler)(void)); +extern void ADCIntUnregister(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCIntDisable(unsigned long ulBase, unsigned long ulSequenceNum); +extern void ADCIntEnable(unsigned long ulBase, unsigned long ulSequenceNum); +extern unsigned long ADCIntStatus(unsigned long ulBase, + unsigned long ulSequenceNum, + tBoolean bMasked); +extern void ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum); +extern void ADCSequenceEnable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceDisable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulTrigger, + unsigned long ulPriority); +extern void ADCSequenceStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig); +extern long ADCSequenceOverflow(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceOverflowClear(unsigned long ulBase, + unsigned long ulSequenceNum); +extern long ADCSequenceUnderflow(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceUnderflowClear(unsigned long ulBase, + unsigned long ulSequenceNum); +extern long ADCSequenceDataGet(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long *pulBuffer); +extern void ADCProcessorTrigger(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSoftwareOversampleConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulFactor); +extern void ADCSoftwareOversampleStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig); +extern void ADCSoftwareOversampleDataGet(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long *pulBuffer, + unsigned long ulCount); +extern void ADCHardwareOversampleConfigure(unsigned long ulBase, + unsigned long ulFactor); +extern void ADCComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig); +extern void ADCComparatorRegionSet(unsigned long ulBase, unsigned long ulComp, + unsigned long ulLowRef, + unsigned long ulHighRef); +extern void ADCComparatorReset(unsigned long ulBase, unsigned long ulComp, + tBoolean bTrigger, tBoolean bInterrupt); +extern void ADCComparatorIntDisable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCComparatorIntEnable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern unsigned long ADCComparatorIntStatus(unsigned long ulBase); +extern void ADCComparatorIntClear(unsigned long ulBase, + unsigned long ulStatus); +extern void ADCReferenceSet(unsigned long ulBase, unsigned long ulRef); +extern unsigned long ADCReferenceGet(unsigned long ulBase); +extern void ADCPhaseDelaySet(unsigned long ulBase, unsigned long ulPhase); +extern unsigned long ADCPhaseDelayGet(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __ADC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.c new file mode 100644 index 00000000..8f0a1d5e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.c @@ -0,0 +1,2249 @@ +//***************************************************************************** +// +// can.c - Driver for the CAN module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_can.h" +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/can.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is the maximum number that can be stored as an 11bit Message +// identifier. +// +//***************************************************************************** +#define CAN_MAX_11BIT_MSG_ID 0x7ff + +//***************************************************************************** +// +// This is used as the loop delay for accessing the CAN controller registers. +// +//***************************************************************************** +#define CAN_RW_DELAY 5 + +//***************************************************************************** +// +// The maximum CAN bit timing divisor is 19. +// +//***************************************************************************** +#define CAN_MAX_BIT_DIVISOR 19 + +//***************************************************************************** +// +// The minimum CAN bit timing divisor is 4. +// +//***************************************************************************** +#define CAN_MIN_BIT_DIVISOR 4 + +//***************************************************************************** +// +// The maximum CAN pre-divisor is 1024. +// +//***************************************************************************** +#define CAN_MAX_PRE_DIVISOR 1024 + +//***************************************************************************** +// +// The minimum CAN pre-divisor is 1. +// +//***************************************************************************** +#define CAN_MIN_PRE_DIVISOR 1 + +//***************************************************************************** +// +// Converts a set of CAN bit timing values into the value that needs to be +// programmed into the CAN_BIT register to achieve those timings. +// +//***************************************************************************** +#define CAN_BIT_VALUE(seg1, seg2, sjw) \ + ((((seg1 - 1) << CAN_BIT_TSEG1_S) & \ + CAN_BIT_TSEG1_M) | \ + (((seg2 - 1) << CAN_BIT_TSEG2_S) & \ + CAN_BIT_TSEG2_M) | \ + (((sjw - 1) << CAN_BIT_SJW_S) & \ + CAN_BIT_SJW_M)) + +//***************************************************************************** +// +// This table is used by the CANBitRateSet() API as the register defaults for +// the bit timing values. +// +//***************************************************************************** +static const unsigned short g_usCANBitValues[] = +{ + CAN_BIT_VALUE(2, 1, 1), // 4 clocks/bit + CAN_BIT_VALUE(3, 1, 1), // 5 clocks/bit + CAN_BIT_VALUE(3, 2, 2), // 6 clocks/bit + CAN_BIT_VALUE(4, 2, 2), // 7 clocks/bit + CAN_BIT_VALUE(4, 3, 3), // 8 clocks/bit + CAN_BIT_VALUE(5, 3, 3), // 9 clocks/bit + CAN_BIT_VALUE(5, 4, 4), // 10 clocks/bit + CAN_BIT_VALUE(6, 4, 4), // 11 clocks/bit + CAN_BIT_VALUE(6, 5, 4), // 12 clocks/bit + CAN_BIT_VALUE(7, 5, 4), // 13 clocks/bit + CAN_BIT_VALUE(7, 6, 4), // 14 clocks/bit + CAN_BIT_VALUE(8, 6, 4), // 15 clocks/bit + CAN_BIT_VALUE(8, 7, 4), // 16 clocks/bit + CAN_BIT_VALUE(9, 7, 4), // 17 clocks/bit + CAN_BIT_VALUE(9, 8, 4), // 18 clocks/bit + CAN_BIT_VALUE(10, 8, 4) // 19 clocks/bit +}; + +//***************************************************************************** +// +//! \internal +//! Checks a CAN base address. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! This function determines if a CAN controller base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +CANBaseValid(unsigned long ulBase) +{ + return((ulBase == CAN0_BASE) || (ulBase == CAN1_BASE) || + (ulBase == CAN2_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! +//! Returns the CAN controller interrupt number. +//! +//! \param ulBase is the base address of the selected CAN controller +//! +//! Given a CAN controller base address, returns the corresponding interrupt +//! number. +//! +//! This function replaces the original CANGetIntNumber() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return Returns a CAN interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +CANIntNumberGet(unsigned long ulBase) +{ + long lIntNumber; + + // + // Return the interrupt number for the given CAN controller. + // + switch(ulBase) + { + // + // Return the interrupt number for CAN 0 + // + case CAN0_BASE: + { + lIntNumber = INT_CAN0; + break; + } + + // + // Return the interrupt number for CAN 1 + // + case CAN1_BASE: + { + lIntNumber = INT_CAN1; + break; + } + + // + // Return the interrupt number for CAN 2 + // + case CAN2_BASE: + { + lIntNumber = INT_CAN2; + break; + } + + // + // Return -1 to indicate a bad address was passed in. + // + default: + { + lIntNumber = -1; + } + } + return(lIntNumber); +} + +//***************************************************************************** +// +//! \internal +//! +//! Reads a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be read. +//! +//! This function performs the necessary synchronization to read from a CAN +//! controller register. +//! +//! This function replaces the original CANReadReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note This function provides the delay required to access CAN registers. +//! This delay is required when accessing CAN registers directly. +//! +//! \return Returns the value read from the register. +// +//***************************************************************************** +static unsigned long +CANRegRead(unsigned long ulRegAddress) +{ + volatile int iDelay; + unsigned long ulRetVal; + unsigned long ulIntNumber; + unsigned long ulReenableInts; + + // + // Get the CAN interrupt number from the register base address. + // + ulIntNumber = CANIntNumberGet(ulRegAddress & 0xfffff000); + + // + // Make sure that the CAN base address was valid. + // + ASSERT(ulIntNumber != (unsigned long)-1); + + // + // Remember current state so that CAN interrupts are only re-enabled if + // they were already enabled. + // + ulReenableInts = HWREG(NVIC_EN1) & (1 << (ulIntNumber - 48)); + + // + // If the CAN interrupt was enabled then disable it. + // + if(ulReenableInts) + { + IntDisable(ulIntNumber); + } + + // + // Trigger the initial read to the CAN controller. The value returned at + // this point is not valid. + // + HWREG(ulRegAddress); + + // + // This delay is necessary for the CAN have the correct data on the bus. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } + + // + // Do the final read that has the valid value of the register. + // + ulRetVal = HWREG(ulRegAddress); + + // + // Enable CAN interrupts if they were enabled before this call. + // + if(ulReenableInts) + { + IntEnable(ulIntNumber); + } + + return(ulRetVal); +} + +//***************************************************************************** +// +//! \internal +//! +//! Writes a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be written. +//! \param ulRegValue is the value to write into the register specified by +//! \e ulRegAddress. +//! +//! This function takes care of the synchronization necessary to write to a +//! CAN controller register. +//! +//! This function replaces the original CANWriteReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note The delays in this function are required when accessing CAN registers +//! directly. +//! +//! \return None. +// +//***************************************************************************** +static void +CANRegWrite(unsigned long ulRegAddress, unsigned long ulRegValue) +{ + volatile int iDelay; + + // + // Trigger the initial write to the CAN controller. The value will not make + // it out to the CAN controller for CAN_RW_DELAY cycles. + // + HWREG(ulRegAddress) = ulRegValue; + + // + // Delay to allow the CAN controller to receive the new data. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the data to be written out to the CAN +//! controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 0, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy into the CAN controller. +//! +//! This function takes the steps necessary to copy data from a contiguous +//! buffer in memory into the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageSet() +//! function. +//! +//! This function replaces the original CANWriteDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegWrite(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + + // + // Write out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = pucData[iIdx++]; + + // + // Only write the second byte if needed otherwise it will be zero. + // + if(iIdx < iSize) + { + ulValue |= (pucData[iIdx++] << 8); + } + CANRegWrite((unsigned long)(pulRegister++), ulValue); + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the location to store the data read from the +//! CAN controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 1, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy from the CAN controller. +//! +//! This function takes the steps necessary to copy data to a contiguous buffer +//! in memory from the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageGet() +//! function. +//! +//! This function replaces the original CANReadDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegRead(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + // + // Read out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = CANRegRead((unsigned long)(pulRegister++)); + + // + // Store the first byte. + // + pucData[iIdx++] = (unsigned char)ulValue; + + // + // Only read the second byte if needed. + // + if(iIdx < iSize) + { + pucData[iIdx++] = (unsigned char)(ulValue >> 8); + } + } +} + +//***************************************************************************** +// +//! Initializes the CAN controller after reset. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! After reset, the CAN controller is left in the disabled state. However, +//! the memory used for message objects contains undefined values and must be +//! cleared prior to enabling the CAN controller the first time. This prevents +//! unwanted transmission or reception of data before the message objects are +//! configured. This function must be called before enabling the controller +//! the first time. +//! +//! \return None. +// +//***************************************************************************** +void +CANInit(unsigned long ulBase) +{ + int iMsg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Place CAN controller in init state, regardless of previous state. This + // will put controller in idle, and allow the message object RAM to be + // programmed. + // + CANRegWrite(ulBase + CAN_O_CTL, CAN_CTL_INIT); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid and is a "safe" condition to leave the message + // object. The same arb reg is used to program all the message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB | + CAN_IF1CMSK_CONTROL); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + CANRegWrite(ulBase + CAN_O_IF1MCTL, 0); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Make sure that the interrupt and new data flags are updated for the + // message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_NEWDAT | + CAN_IF1CMSK_CLRINTPND); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Acknowledge any pending status interrupts. + // + CANRegRead(ulBase + CAN_O_STS); +} + +//***************************************************************************** +// +//! Enables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to enable. +//! +//! Enables the CAN controller for message processing. Once enabled, the +//! controller will automatically transmit any pending frames, and process any +//! received frames. The controller can be stopped by calling CANDisable(). +//! Prior to calling CANEnable(), CANInit() should have been called to +//! initialize the controller and the CAN bus clock should be configured by +//! calling CANBitTimingSet(). +//! +//! \return None. +// +//***************************************************************************** +void +CANEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Clear the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Disables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to disable. +//! +//! Disables the CAN controller for message processing. When disabled, the +//! controller will no longer automatically process data on the CAN bus. The +//! controller can be restarted by calling CANEnable(). The state of the CAN +//! controller and the message objects in the controller are left as they were +//! before this call was made. +//! +//! \return None. +// +//***************************************************************************** +void +CANDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Set the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Reads the current settings for the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms is a pointer to a structure to hold the timing parameters. +//! +//! This function reads the current configuration of the CAN controller bit +//! clock timing, and stores the resulting information in the structure +//! supplied by the caller. Refer to CANBitTimingSet() for the meaning of the +//! values that are returned in the structure pointed to by \e pClkParms. +//! +//! This function replaces the original CANGetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // Read out all the bit timing values from the CAN controller registers. + // + uBitReg = CANRegRead(ulBase + CAN_O_BIT); + + // + // Set the phase 2 segment. + // + pClkParms->uPhase2Seg = + ((uBitReg & CAN_BIT_TSEG2_M) >> CAN_BIT_TSEG2_S) + 1; + + // + // Set the phase 1 segment. + // + pClkParms->uSyncPropPhase1Seg = + ((uBitReg & CAN_BIT_TSEG1_M) >> CAN_BIT_TSEG1_S) + 1; + + // + // Set the synchronous jump width. + // + pClkParms->uSJW = ((uBitReg & CAN_BIT_SJW_M) >> CAN_BIT_SJW_S) + 1; + + // + // Set the pre-divider for the CAN bus bit clock. + // + pClkParms->uQuantumPrescaler = + ((uBitReg & CAN_BIT_BRP_M) | + ((CANRegRead(ulBase + CAN_O_BRPE) & CAN_BRPE_BRPE_M) << 6)) + 1; +} + +//***************************************************************************** +// +//! This function is used to set the CAN bit timing values to a nominal setting +//! based on a desired bit rate. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulSourceClock is the system clock for the device in Hz. +//! \param ulBitRate is the desired bit rate. +//! +//! This function will set the CAN bit timing for the bit rate passed in the +//! \e ulBitRate parameter based on the \e ulSourceClock parameter. Since the +//! CAN clock is based off of the system clock the calling function should pass +//! in the source clock rate either by retrieving it from SysCtlClockGet() or +//! using a specific value in Hz. The CAN bit timing is calculated assuming a +//! minimal amount of propagation delay, which will work for most cases where +//! the network length is short. If tighter timing requirements or longer +//! network lengths are needed, then the CANBitTimingSet() function is +//! available for full customization of all of the CAN bit timing values. +//! Since not all bit rates can be matched exactly, the bit rate is set to the +//! value closest to the desired bit rate without being higher than the +//! \e ulBitRate value. +//! +//! \note On some devices the source clock is fixed at 8MHz so the +//! \e ulSourceClock should be set to 8000000. +//! +//! \return This function returns the bit rate that the CAN controller was +//! configured to use or it returns 0 to indicate that the bit rate was not +//! changed because the requested bit rate was not valid. +//! +//***************************************************************************** +unsigned long +CANBitRateSet(unsigned long ulBase, unsigned long ulSourceClock, + unsigned long ulBitRate) +{ + unsigned long ulDesiredRatio; + unsigned long ulCANBits; + unsigned long ulPreDivide; + unsigned long ulRegValue; + unsigned short usCANCTL; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(ulSourceClock != 0); + ASSERT(ulBitRate != 0); + + // + // Calculate the desired clock rate. + // + ulDesiredRatio = ulSourceClock / ulBitRate; + + // + // Make sure that the ratio of CAN bit rate to processor clock is not too + // small or too large. + // + ASSERT(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)); + ASSERT(ulDesiredRatio >= (CAN_MIN_PRE_DIVISOR * CAN_MIN_BIT_DIVISOR)); + + // + // Make sure that the Desired Ratio is not too large. This enforces the + // requirement that the bit rate is larger than requested. + // + if((ulSourceClock / ulDesiredRatio) > ulBitRate) + { + ulDesiredRatio += 1; + } + + // + // Check all possible values to find a matching value. + // + while(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)) + { + // + // Loop through all possible CAN bit divisors. + // + for(ulCANBits = CAN_MAX_BIT_DIVISOR; ulCANBits >= CAN_MIN_BIT_DIVISOR; + ulCANBits--) + { + // + // For a given CAN bit divisor save the pre divisor. + // + ulPreDivide = ulDesiredRatio / ulCANBits; + + // + // If the calculated divisors match the desired clock ratio then + // return these bit rate and set the CAN bit timing. + // + if((ulPreDivide * ulCANBits) == ulDesiredRatio) + { + // + // Start building the bit timing value by adding the bit timing + // in time quanta. + // + ulRegValue = g_usCANBitValues[ulCANBits - CAN_MIN_BIT_DIVISOR]; + + // + // To set the bit timing register, the controller must be placed + // in init mode (if not already), and also configuration change + // bit enabled. The state of the register should be saved + // so it can be restored. + // + usCANCTL = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, + usCANCTL | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Now add in the pre-scalar on the bit rate. + // + ulRegValue |= ((ulPreDivide - 1) & CAN_BIT_BRP_M); + + // + // Set the clock bits in the and the lower bits of the + // pre-scalar. + // + CANRegWrite(ulBase + CAN_O_BIT, ulRegValue); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((ulPreDivide - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Restore the saved CAN Control register. + // + CANRegWrite(ulBase + CAN_O_CTL, usCANCTL); + + // + // Return the computed bit rate. + // + return(ulSourceClock / ( ulPreDivide * ulCANBits)); + } + } + + // + // Move the divisor up one and look again. Only in rare cases are + // more than 2 loops required to find the value. + // + ulDesiredRatio++; + } + + // + // A valid combination could not be found, so return 0 to indicate that the + // bit rate was not changed. + // + return(0); +} + +//***************************************************************************** +// +//! Configures the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms points to the structure with the clock parameters. +//! +//! Configures the various timing parameters for the CAN bus bit timing: +//! Propagation segment, Phase Buffer 1 segment, Phase Buffer 2 segment, and +//! the Synchronization Jump Width. The values for Propagation and Phase +//! Buffer 1 segments are derived from the combination +//! \e pClkParms->uSyncPropPhase1Seg parameter. Phase Buffer 2 is determined +//! from the \e pClkParms->uPhase2Seg parameter. These two parameters, along +//! with \e pClkParms->uSJW are based in units of bit time quanta. The actual +//! quantum time is determined by the \e pClkParms->uQuantumPrescaler value, +//! which specifies the divisor for the CAN module clock. +//! +//! The total bit time, in quanta, will be the sum of the two Seg parameters, +//! as follows: +//! +//! bit_time_q = uSyncPropPhase1Seg + uPhase2Seg + 1 +//! +//! Note that the Sync_Seg is always one quantum in duration, and will be added +//! to derive the correct duration of Prop_Seg and Phase1_Seg. +//! +//! The equation to determine the actual bit rate is as follows: +//! +//! CAN Clock / +//! ((\e uSyncPropPhase1Seg + \e uPhase2Seg + 1) * (\e uQuantumPrescaler)) +//! +//! This means that with \e uSyncPropPhase1Seg = 4, \e uPhase2Seg = 1, +//! \e uQuantumPrescaler = 2 and an 8 MHz CAN clock, that the bit rate will be +//! (8 MHz) / ((5 + 2 + 1) * 2) or 500 Kbit/sec. +//! +//! This function replaces the original CANSetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + unsigned int uSavedInit; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // The phase 1 segment must be in the range from 2 to 16. + // + ASSERT((pClkParms->uSyncPropPhase1Seg >= 2) && + (pClkParms->uSyncPropPhase1Seg <= 16)); + + // + // The phase 2 segment must be in the range from 1 to 8. + // + ASSERT((pClkParms->uPhase2Seg >= 1) && (pClkParms->uPhase2Seg <= 8)); + + // + // The synchronous jump windows must be in the range from 1 to 4. + // + ASSERT((pClkParms->uSJW >= 1) && (pClkParms->uSJW <= 4)); + + // + // The CAN clock pre-divider must be in the range from 1 to 1024. + // + ASSERT((pClkParms->uQuantumPrescaler <= 1024) && + (pClkParms->uQuantumPrescaler >= 1)); + + // + // To set the bit timing register, the controller must be placed in init + // mode (if not already), and also configuration change bit enabled. State + // of the init bit should be saved so it can be restored at the end. + // + uSavedInit = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Set the bit fields of the bit timing register according to the parms. + // + uBitReg = (((pClkParms->uPhase2Seg - 1) << CAN_BIT_TSEG2_S) & + CAN_BIT_TSEG2_M); + uBitReg |= (((pClkParms->uSyncPropPhase1Seg - 1) << CAN_BIT_TSEG1_S) & + CAN_BIT_TSEG1_M); + uBitReg |= ((pClkParms->uSJW - 1) << CAN_BIT_SJW_S) & CAN_BIT_SJW_M; + uBitReg |= (pClkParms->uQuantumPrescaler - 1) & CAN_BIT_BRP_M; + CANRegWrite(ulBase + CAN_O_BIT, uBitReg); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((pClkParms->uQuantumPrescaler - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Clear the config change bit, and restore the init bit. + // + uSavedInit &= ~CAN_CTL_CCE; + + // + // If Init was not set before, then clear it. + // + if(uSavedInit & CAN_CTL_INIT) + { + uSavedInit &= ~CAN_CTL_INIT; + } + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled CAN interrupts occur. +//! +//! This function registers the interrupt handler in the interrupt vector +//! table, and enables CAN interrupts on the interrupt controller; specific CAN +//! interrupt sources must be enabled using CANIntEnable(). The interrupt +//! handler being registered must clear the source of the interrupt using +//! CANIntClear(). +//! +//! If the application is using a static interrupt vector table stored in +//! flash, then it is not necessary to register the interrupt handler this way. +//! Instead, IntEnable() should be used to enable CAN interrupts on the +//! interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntRegister(ulIntNumber, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(ulIntNumber); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the previously registered interrupt handler and +//! disables the interrupt on the interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntUnregister(unsigned long ulBase) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntUnregister(ulIntNumber); + + // + // Disable the CAN interrupt. + // + IntDisable(ulIntNumber); +} + +//***************************************************************************** +// +//! Enables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables specific interrupt sources of the CAN controller. Only enabled +//! sources will cause a processor interrupt. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b CAN_INT_ERROR - a controller error condition has occurred +//! - \b CAN_INT_STATUS - a message transfer has completed, or a bus error has +//! been detected +//! - \b CAN_INT_MASTER - allow CAN controller to generate interrupts +//! +//! In order to generate any interrupts, \b CAN_INT_MASTER must be enabled. +//! Further, for any particular transaction from a message object to generate +//! an interrupt, that message object must have interrupts enabled (see +//! CANMessageSet()). \b CAN_INT_ERROR will generate an interrupt if the +//! controller enters the ``bus off'' condition, or if the error counters reach +//! a limit. \b CAN_INT_STATUS will generate an interrupt under quite a few +//! status conditions and may provide more interrupts than the application +//! needs to handle. When an interrupt occurs, use CANIntStatus() to determine +//! the cause. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Enable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags); +} + +//***************************************************************************** +// +//! Disables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the specified CAN controller interrupt sources. Only enabled +//! interrupt sources can cause a processor interrupt. +//! +//! The \e ulIntFlags parameter has the same definition as in the +//! CANIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Disable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~(ulIntFlags)); +} + +//***************************************************************************** +// +//! Returns the current CAN controller interrupt status. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eIntStsReg indicates which interrupt status register to read +//! +//! Returns the value of one of two interrupt status registers. The interrupt +//! status register read is determined by the \e eIntStsReg parameter, which +//! can have one of the following values: +//! +//! - \b CAN_INT_STS_CAUSE - indicates the cause of the interrupt +//! - \b CAN_INT_STS_OBJECT - indicates pending interrupts of all message +//! objects +//! +//! \b CAN_INT_STS_CAUSE returns the value of the controller interrupt register +//! and indicates the cause of the interrupt. It will be a value of +//! \b CAN_INT_INTID_STATUS if the cause is a status interrupt. In this case, +//! the status register should be read with the CANStatusGet() function. +//! Calling this function to read the status will also clear the status +//! interrupt. If the value of the interrupt register is in the range 1-32, +//! then this indicates the number of the highest priority message object that +//! has an interrupt pending. The message object interrupt can be cleared by +//! using the CANIntClear() function, or by reading the message using +//! CANMessageGet() in the case of a received message. The interrupt handler +//! can read the interrupt status again to make sure all pending interrupts are +//! cleared before returning from the interrupt. +//! +//! \b CAN_INT_STS_OBJECT returns a bit mask indicating which message objects +//! have pending interrupts. This can be used to discover all of the pending +//! interrupts at once, as opposed to repeatedly reading the interrupt register +//! by using \b CAN_INT_STS_CAUSE. +//! +//! \return Returns the value of one of the interrupt status registers. +// +//***************************************************************************** +unsigned long +CANIntStatus(unsigned long ulBase, tCANIntStsReg eIntStsReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // See which status the caller is looking for. + // + switch(eIntStsReg) + { + // + // The caller wants the global interrupt status for the CAN controller + // specified by ulBase. + // + case CAN_INT_STS_CAUSE: + { + ulStatus = CANRegRead(ulBase + CAN_O_INT); + break; + } + + // + // The caller wants the current message status interrupt for all + // messages. + // + case CAN_INT_STS_OBJECT: + { + // + // Read and combine both 16 bit values into one 32bit status. + // + ulStatus = (CANRegRead(ulBase + CAN_O_MSG1INT) & + CAN_MSG1INT_INTPND_M); + ulStatus |= (CANRegRead(ulBase + CAN_O_MSG2INT) << 16); + break; + } + + // + // Request was for unknown status so just return 0. + // + default: + { + ulStatus = 0; + break; + } + } + + // + // Return the interrupt status value + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears a CAN interrupt source. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntClr is a value indicating which interrupt source to clear. +//! +//! This function can be used to clear a specific interrupt source. The +//! \e ulIntClr parameter should be one of the following values: +//! +//! - \b CAN_INT_INTID_STATUS - Clears a status interrupt. +//! - 1-32 - Clears the specified message object interrupt +//! +//! It is not necessary to use this function to clear an interrupt. This +//! should only be used if the application wants to clear an interrupt source +//! without taking the normal interrupt action. +//! +//! Normally, the status interrupt is cleared by reading the controller status +//! using CANStatusGet(). A specific message object interrupt is normally +//! cleared by reading the message object using CANMessageGet(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +CANIntClear(unsigned long ulBase, unsigned long ulIntClr) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntClr == CAN_INT_INTID_STATUS) || + ((ulIntClr>=1) && (ulIntClr <=32))); + + if(ulIntClr == CAN_INT_INTID_STATUS) + { + // + // Simply read and discard the status to clear the interrupt. + // + CANRegRead(ulBase + CAN_O_STS); + } + else + { + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Only change the interrupt pending state by setting only the + // CAN_IF1CMSK_CLRINTPND bit. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_CLRINTPND); + + // + // Send the clear pending interrupt command to the CAN controller. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulIntClr & CAN_IF1CRQ_MNUM_M); + + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + } +} + +//***************************************************************************** +// +//! Sets the CAN controller automatic retransmission behavior. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param bAutoRetry enables automatic retransmission. +//! +//! Enables or disables automatic retransmission of messages with detected +//! errors. If \e bAutoRetry is \b true, then automatic retransmission is +//! enabled, otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry) +{ + unsigned long ulCtlReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + ulCtlReg = CANRegRead(ulBase + CAN_O_CTL); + + // + // Conditionally set the DAR bit to enable/disable auto-retry. + // + if(bAutoRetry) + { + // + // Clearing the DAR bit tells the controller to not disable the + // auto-retry of messages which were not transmitted or received + // correctly. + // + ulCtlReg &= ~CAN_CTL_DAR; + } + else + { + // + // Setting the DAR bit tells the controller to disable the auto-retry + // of messages which were not transmitted or received correctly. + // + ulCtlReg |= CAN_CTL_DAR; + } + + CANRegWrite(ulBase + CAN_O_CTL, ulCtlReg); +} + +//***************************************************************************** +// +//! Returns the current setting for automatic retransmission. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! Reads the current setting for the automatic retransmission in the CAN +//! controller and returns it to the caller. +//! +//! \return Returns \b true if automatic retransmission is enabled, \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +CANRetryGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the disable automatic retry setting from the CAN controller. + // + if(CANRegRead(ulBase + CAN_O_CTL) & CAN_CTL_DAR) + { + // + // Automatic data retransmission is not enabled. + // + return(false); + } + + // + // Automatic data retransmission is enabled. + // + return(true); +} + +//***************************************************************************** +// +//! Reads one of the controller status registers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eStatusReg is the status register to read. +//! +//! Reads a status register of the CAN controller and returns it to the caller. +//! The different status registers are: +//! +//! - \b CAN_STS_CONTROL - the main controller status +//! - \b CAN_STS_TXREQUEST - bit mask of objects pending transmission +//! - \b CAN_STS_NEWDAT - bit mask of objects with new data +//! - \b CAN_STS_MSGVAL - bit mask of objects with valid configuration +//! +//! When reading the main controller status register, a pending status +//! interrupt will be cleared. This should be used in the interrupt handler +//! for the CAN controller if the cause is a status interrupt. The controller +//! status register fields are as follows: +//! +//! - \b CAN_STATUS_BUS_OFF - controller is in bus-off condition +//! - \b CAN_STATUS_EWARN - an error counter has reached a limit of at least 96 +//! - \b CAN_STATUS_EPASS - CAN controller is in the error passive state +//! - \b CAN_STATUS_RXOK - a message was received successfully (independent of +//! any message filtering). +//! - \b CAN_STATUS_TXOK - a message was successfully transmitted +//! - \b CAN_STATUS_LEC_MSK - mask of last error code bits (3 bits) +//! - \b CAN_STATUS_LEC_NONE - no error +//! - \b CAN_STATUS_LEC_STUFF - stuffing error detected +//! - \b CAN_STATUS_LEC_FORM - a format error occurred in the fixed format part +//! of a message +//! - \b CAN_STATUS_LEC_ACK - a transmitted message was not acknowledged +//! - \b CAN_STATUS_LEC_BIT1 - dominant level detected when trying to send in +//! recessive mode +//! - \b CAN_STATUS_LEC_BIT0 - recessive level detected when trying to send in +//! dominant mode +//! - \b CAN_STATUS_LEC_CRC - CRC error in received message +//! +//! The remaining status registers are 32-bit bit maps to the message objects. +//! They can be used to quickly obtain information about the status of all the +//! message objects without needing to query each one. They contain the +//! following information: +//! +//! - \b CAN_STS_TXREQUEST - if a message object's TxRequest bit is set, that +//! means that a transmission is pending on that object. The application can +//! use this to determine which objects are still waiting to send a message. +//! - \b CAN_STS_NEWDAT - if a message object's NewDat bit is set, that means +//! that a new message has been received in that object, and has not yet been +//! picked up by the host application +//! - \b CAN_STS_MSGVAL - if a message object's MsgVal bit is set, that means +//! it has a valid configuration programmed. The host application can use this +//! to determine which message objects are empty/unused. +//! +//! \return Returns the value of the status register. +// +//***************************************************************************** +unsigned long +CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + switch(eStatusReg) + { + // + // Just return the global CAN status register since that is what was + // requested. + // + case CAN_STS_CONTROL: + { + ulStatus = CANRegRead(ulBase + CAN_O_STS); + CANRegWrite(ulBase + CAN_O_STS, + ~(CAN_STS_RXOK | CAN_STS_TXOK | CAN_STS_LEC_M)); + break; + } + + // + // Combine the Transmit status bits into one 32bit value. + // + case CAN_STS_TXREQUEST: + { + ulStatus = CANRegRead(ulBase + CAN_O_TXRQ1); + ulStatus |= CANRegRead(ulBase + CAN_O_TXRQ2) << 16; + break; + } + + // + // Combine the New Data status bits into one 32bit value. + // + case CAN_STS_NEWDAT: + { + ulStatus = CANRegRead(ulBase + CAN_O_NWDA1); + ulStatus |= CANRegRead(ulBase + CAN_O_NWDA2) << 16; + break; + } + + // + // Combine the Message valid status bits into one 32bit value. + // + case CAN_STS_MSGVAL: + { + ulStatus = CANRegRead(ulBase + CAN_O_MSG1VAL); + ulStatus |= CANRegRead(ulBase + CAN_O_MSG2VAL) << 16; + break; + } + + // + // Unknown CAN status requested so return 0. + // + default: + { + ulStatus = 0; + break; + } + } + return(ulStatus); +} + +//***************************************************************************** +// +//! Reads the CAN controller error counter register. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pulRxCount is a pointer to storage for the receive error counter. +//! \param pulTxCount is a pointer to storage for the transmit error counter. +//! +//! Reads the error counter register and returns the transmit and receive error +//! counts to the caller along with a flag indicating if the controller receive +//! counter has reached the error passive limit. The values of the receive and +//! transmit error counters are returned through the pointers provided as +//! parameters. +//! +//! After this call, \e *pulRxCount will hold the current receive error count +//! and \e *pulTxCount will hold the current transmit error count. +//! +//! \return Returns \b true if the receive error count has reached the error +//! passive limit, and \b false if the error count is below the error passive +//! limit. +// +//***************************************************************************** +tBoolean +CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount) +{ + unsigned long ulCANError; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the current count of transmit/receive errors. + // + ulCANError = CANRegRead(ulBase + CAN_O_ERR); + + // + // Extract the error numbers from the register value. + // + *pulRxCount = (ulCANError & CAN_ERR_REC_M) >> CAN_ERR_REC_S; + *pulTxCount = (ulCANError & CAN_ERR_TEC_M) >> CAN_ERR_TEC_S; + + if(ulCANError & CAN_ERR_RP) + { + return(true); + } + return(false); +} + +//***************************************************************************** +// +//! Configures a message object in the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to configure (1-32). +//! \param pMsgObject is a pointer to a structure containing message object +//! settings. +//! \param eMsgType indicates the type of message for this object. +//! +//! This function is used to configure any one of the 32 message objects in the +//! CAN controller. A message object can be configured as any type of CAN +//! message object as well as several options for automatic transmission and +//! reception. This call also allows the message object to be configured to +//! generate interrupts on completion of message receipt or transmission. The +//! message object can also be configured with a filter/mask so that actions +//! are only taken when a message that meets certain parameters is seen on the +//! CAN bus. +//! +//! The \e eMsgType parameter must be one of the following values: +//! +//! - \b MSG_OBJ_TYPE_TX - CAN transmit message object. +//! - \b MSG_OBJ_TYPE_TX_REMOTE - CAN transmit remote request message object. +//! - \b MSG_OBJ_TYPE_RX - CAN receive message object. +//! - \b MSG_OBJ_TYPE_RX_REMOTE - CAN receive remote request message object. +//! - \b MSG_OBJ_TYPE_RXTX_REMOTE - CAN remote frame receive remote, then +//! transmit message object. +//! +//! The message object pointed to by \e pMsgObject must be populated by the +//! caller, as follows: +//! +//! - \e ulMsgID - contains the message ID, either 11 or 29 bits. +//! - \e ulMsgIDMask - mask of bits from \e ulMsgID that must match if +//! identifier filtering is enabled. +//! - \e ulFlags +//! - Set \b MSG_OBJ_TX_INT_ENABLE flag to enable interrupt on transmission. +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to enable interrupt on receipt. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable filtering based on the +//! identifier mask specified by \e ulMsgIDMask. +//! - \e ulMsgLen - the number of bytes in the message data. This should be +//! non-zero even for a remote frame; it should match the expected bytes of the +//! data responding data frame. +//! - \e pucMsgData - points to a buffer containing up to 8 bytes of data for a +//! data frame. +//! +//! \b Example: To send a data frame or remote frame(in response to a remote +//! request), take the following steps: +//! +//! -# Set \e eMsgType to \b MSG_OBJ_TYPE_TX. +//! -# Set \e pMsgObject->ulMsgID to the message ID. +//! -# Set \e pMsgObject->ulFlags. Make sure to set \b MSG_OBJ_TX_INT_ENABLE to +//! allow an interrupt to be generated when the message is sent. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the data frame. +//! -# Set \e pMsgObject->pucMsgData to point to an array containing the bytes +//! to send in the message. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! \b Example: To receive a specific data frame, take the following steps: +//! +//! -# Set \e eMsgObjType to \b MSG_OBJ_TYPE_RX. +//! -# Set \e pMsgObject->ulMsgID to the full message ID, or a partial mask to +//! use partial ID matching. +//! -# Set \e pMsgObject->ulMsgIDMask bits that should be used for masking +//! during comparison. +//! -# Set \e pMsgObject->ulFlags as follows: +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to be interrupted when the data frame +//! is received. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable identifier based filtering. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the expected data +//! frame. +//! -# The buffer pointed to by \e pMsgObject->pucMsgData is not used by this +//! call as no data is present at the time of the call. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! If you specify a message object buffer that already contains a message +//! definition, it will be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + tBoolean bTransferData; + tBoolean bUseExtendedID; + + bTransferData = 0; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + ASSERT((eMsgType == MSG_OBJ_TYPE_TX) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RX) || + (eMsgType == MSG_OBJ_TYPE_RX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RXTX_REMOTE)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // See if we need to use an extended identifier or not. + // + if((pMsgObject->ulMsgID > CAN_MAX_11BIT_MSG_ID) || + (pMsgObject->ulFlags & MSG_OBJ_EXTENDED_ID)) + { + bUseExtendedID = 1; + } + else + { + bUseExtendedID = 0; + } + + // + // This is always a write to the Message object as this call is setting a + // message object. This call will also always set all size bits so it sets + // both data bits. The call will use the CONTROL register to set control + // bits so this bit needs to be set as well. + // + usCmdMaskReg = (CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL); + + // + // Initialize the values to a known state before filling them in based on + // the type of message object that is being configured. + // + usArbReg0 = 0; + usArbReg1 = 0; + usMsgCtrl = 0; + usMaskReg0 = 0; + usMaskReg1 = 0; + + switch(eMsgType) + { + // + // Transmit message object. + // + case MSG_OBJ_TYPE_TX: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = CAN_IF1ARB2_DIR; + bTransferData = 1; + break; + } + + // + // Transmit remote request message object + // + case MSG_OBJ_TYPE_TX_REMOTE: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = 0; + break; + } + + // + // Receive message object. + // + case MSG_OBJ_TYPE_RX: + { + // + // This clears the DIR bit along with everything else. The TXRQST + // bit was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = 0; + break; + } + + // + // Receive remote request message object. + // + case MSG_OBJ_TYPE_RX_REMOTE: + { + // + // The DIR bit is set to one for remote receivers. The TXRQST bit + // was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object so that it only indicates that a remote frame + // was received and allow for software to handle it by sending back + // a data frame. + // + usMsgCtrl = CAN_IF1MCTL_UMASK; + + // + // Use the full Identifier by default. + // + usMaskReg0 = 0xffff; + usMaskReg1 = 0x1fff; + + // + // Make sure to send the mask to the message object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + break; + } + + // + // Remote frame receive remote, with auto-transmit message object. + // + case MSG_OBJ_TYPE_RXTX_REMOTE: + { + // + // Oddly the DIR bit is set to one for remote receivers. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object to auto answer if a matching identifier is seen. + // + usMsgCtrl = CAN_IF1MCTL_RMTEN | CAN_IF1MCTL_UMASK; + + // + // The data to be returned needs to be filled in. + // + bTransferData = 1; + break; + } + + // + // This case should never happen due to the ASSERT statement at the + // beginning of this function. + // + default: + { + return; + } + } + + // + // Configure the Mask Registers. + // + if(pMsgObject->ulFlags & MSG_OBJ_USE_ID_FILTER) + { + if(bUseExtendedID) + { + // + // Set the 29 bits of Identifier mask that were requested. + // + usMaskReg0 = pMsgObject->ulMsgIDMask & CAN_IF1MSK1_IDMSK_M; + usMaskReg1 = ((pMsgObject->ulMsgIDMask >> 16) & + CAN_IF1MSK2_IDMSK_M); + } + else + { + // + // Lower 16 bit are unused so set them to zero. + // + usMaskReg0 = 0; + + // + // Put the 11 bit Mask Identifier into the upper bits of the field + // in the register. + // + usMaskReg1 = ((pMsgObject->ulMsgIDMask << 2) & + CAN_IF1MSK2_IDMSK_M); + } + } + + // + // If the caller wants to filter on the extended ID bit then set it. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_EXT_FILTER) == + MSG_OBJ_USE_EXT_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MXTD; + } + + // + // The caller wants to filter on the message direction field. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_DIR_FILTER) == + MSG_OBJ_USE_DIR_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MDIR; + } + + if(pMsgObject->ulFlags & (MSG_OBJ_USE_ID_FILTER | MSG_OBJ_USE_DIR_FILTER | + MSG_OBJ_USE_EXT_FILTER)) + { + // + // Set the UMASK bit to enable using the mask register. + // + usMsgCtrl |= CAN_IF1MCTL_UMASK; + + // + // Set the MASK bit so that this gets transferred to the Message Object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + } + + // + // Set the Arb bit so that this gets transferred to the Message object. + // + usCmdMaskReg |= CAN_IF1CMSK_ARB; + + // + // Configure the Arbitration registers. + // + if(bUseExtendedID) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + usArbReg0 |= pMsgObject->ulMsgID & CAN_IF1ARB1_ID_M; + usArbReg1 |= (pMsgObject->ulMsgID >> 16) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid and set the extended ID bit. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL | CAN_IF1ARB2_XTD; + } + else + { + // + // Set the 11 bit version of the Identifier for this message object. + // The lower 18 bits are set to zero. + // + usArbReg1 |= (pMsgObject->ulMsgID << 2) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL; + } + + // + // Set the data length since this is set for all transfers. This is also a + // single transfer and not a FIFO transfer so set EOB bit. + // + usMsgCtrl |= (pMsgObject->ulMsgLen & CAN_IF1MCTL_DLC_M); + + // + // Mark this as the last entry if this is not the last entry in a FIFO. + // + if((pMsgObject->ulFlags & MSG_OBJ_FIFO) == 0) + { + usMsgCtrl |= CAN_IF1MCTL_EOB; + } + + // + // Enable transmit interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_TX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_TXIE; + } + + // + // Enable receive interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_RX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_RXIE; + } + + // + // Write the data out to the CAN Data registers if needed. + // + if(bTransferData) + { + CANDataRegWrite(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF1DA1), + pMsgObject->ulMsgLen); + } + + // + // Write out the registers to program the message object. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, usCmdMaskReg); + CANRegWrite(ulBase + CAN_O_IF1MSK1, usMaskReg0); + CANRegWrite(ulBase + CAN_O_IF1MSK2, usMaskReg1); + CANRegWrite(ulBase + CAN_O_IF1ARB1, usArbReg0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, usArbReg1); + CANRegWrite(ulBase + CAN_O_IF1MCTL, usMsgCtrl); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +//! Reads a CAN message from one of the message object buffers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to read (1-32). +//! \param pMsgObject points to a structure containing message object fields. +//! \param bClrPendingInt indicates whether an associated interrupt should be +//! cleared. +//! +//! This function is used to read the contents of one of the 32 message objects +//! in the CAN controller, and return it to the caller. The data returned is +//! stored in the fields of the caller-supplied structure pointed to by +//! \e pMsgObject. The data consists of all of the parts of a CAN message, +//! plus some control and status information. +//! +//! Normally this is used to read a message object that has received and stored +//! a CAN message with a certain identifier. However, this could also be used +//! to read the contents of a message object in order to load the fields of the +//! structure in case only part of the structure needs to be changed from a +//! previous setting. +//! +//! When using CANMessageGet, all of the same fields of the structure are +//! populated in the same way as when the CANMessageSet() function is used, +//! with the following exceptions: +//! +//! \e pMsgObject->ulFlags: +//! +//! - \b MSG_OBJ_NEW_DATA indicates if this is new data since the last time it +//! was read +//! - \b MSG_OBJ_DATA_LOST indicates that at least one message was received on +//! this message object, and not read by the host before being overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + + // + // This is always a read to the Message object as this call is setting a + // message object. + // + usCmdMaskReg = (CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL | CAN_IF1CMSK_MASK | CAN_IF1CMSK_ARB); + + // + // Clear a pending interrupt and new data in a message object. + // + if(bClrPendingInt) + { + usCmdMaskReg |= CAN_IF1CMSK_CLRINTPND; + } + + // + // Set up the request for data from the message object. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, usCmdMaskReg); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Read out the IF Registers. + // + usMaskReg0 = CANRegRead(ulBase + CAN_O_IF2MSK1); + usMaskReg1 = CANRegRead(ulBase + CAN_O_IF2MSK2); + usArbReg0 = CANRegRead(ulBase + CAN_O_IF2ARB1); + usArbReg1 = CANRegRead(ulBase + CAN_O_IF2ARB2); + usMsgCtrl = CANRegRead(ulBase + CAN_O_IF2MCTL); + + pMsgObject->ulFlags = MSG_OBJ_NO_FLAGS; + + // + // Determine if this is a remote frame by checking the TXRQST and DIR bits. + // + if((!(usMsgCtrl & CAN_IF1MCTL_TXRQST) && (usArbReg1 & CAN_IF1ARB2_DIR)) || + ((usMsgCtrl & CAN_IF1MCTL_TXRQST) && (!(usArbReg1 & CAN_IF1ARB2_DIR)))) + { + pMsgObject->ulFlags |= MSG_OBJ_REMOTE_FRAME; + } + + // + // Get the identifier out of the register, the format depends on size of + // the mask. + // + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + pMsgObject->ulMsgID = ((usArbReg1 & CAN_IF1ARB2_ID_M) << 16) | + usArbReg0; + + pMsgObject->ulFlags |= MSG_OBJ_EXTENDED_ID; + } + else + { + // + // The Identifier is an 11 bit value. + // + pMsgObject->ulMsgID = (usArbReg1 & CAN_IF1ARB2_ID_M) >> 2; + } + + // + // Indicate that we lost some data. + // + if(usMsgCtrl & CAN_IF1MCTL_MSGLST) + { + pMsgObject->ulFlags |= MSG_OBJ_DATA_LOST; + } + + // + // Set the flag to indicate if ID masking was used. + // + if(usMsgCtrl & CAN_IF1MCTL_UMASK) + { + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // The Identifier Mask is assumed to also be a 29 bit value. + // + pMsgObject->ulMsgIDMask = + ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) << 16) | usMaskReg0; + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x1fffffff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + else + { + // + // The Identifier Mask is assumed to also be an 11 bit value. + // + pMsgObject->ulMsgIDMask = ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) >> + 2); + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x7ff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + + // + // Indicate if the extended bit was used in filtering. + // + if(usMaskReg1 & CAN_IF1MSK2_MXTD) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_EXT_FILTER; + } + + // + // Indicate if direction filtering was enabled. + // + if(usMaskReg1 & CAN_IF1MSK2_MDIR) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_DIR_FILTER; + } + } + + // + // Set the interrupt flags. + // + if(usMsgCtrl & CAN_IF1MCTL_TXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_TX_INT_ENABLE; + } + if(usMsgCtrl & CAN_IF1MCTL_RXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_RX_INT_ENABLE; + } + + // + // See if there is new data available. + // + if(usMsgCtrl & CAN_IF1MCTL_NEWDAT) + { + // + // Get the amount of data needed to be read. + // + pMsgObject->ulMsgLen = (usMsgCtrl & CAN_IF1MCTL_DLC_M); + + // + // Don't read any data for a remote frame, there is nothing valid in + // that buffer anyway. + // + if((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0) + { + // + // Read out the data from the CAN registers. + // + CANDataRegRead(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF2DA1), + pMsgObject->ulMsgLen); + } + + // + // Now clear out the new data flag. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, CAN_IF1CMSK_NEWDAT); + + // + // Transfer the message object to the message object specified by + // ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Indicate that there is new data in this message. + // + pMsgObject->ulFlags |= MSG_OBJ_NEW_DATA; + } + else + { + // + // Along with the MSG_OBJ_NEW_DATA not being set the amount of data + // needs to be set to zero if none was available. + // + pMsgObject->ulMsgLen = 0; + } +} + +//***************************************************************************** +// +//! Clears a message object so that it is no longer used. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the message object number to disable (1-32). +//! +//! This function frees the specified message object from use. Once a message +//! object has been ``cleared,'' it will no longer automatically send or +//! receive messages, or generate interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageClear(unsigned long ulBase, unsigned long ulObjID) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID >= 1) && (ulObjID <= 32)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB); + CANRegWrite(ulBase + CAN_O_IF1ARB1, 0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.h new file mode 100644 index 00000000..39aa7055 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/can.h @@ -0,0 +1,450 @@ +//***************************************************************************** +// +// can.h - Defines and Macros for the CAN controller. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CAN_H__ +#define __CAN_H__ + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Miscellaneous defines for Message ID Types +// +//***************************************************************************** + +//***************************************************************************** +// +// These are the flags used by the tCANMsgObject.ulFlags value when calling the +// CANMessageSet() and CANMessageGet() functions. +// +//***************************************************************************** + +// +//! This definition is used with the tCANMsgObject ulFlags value and indicates +//! that transmit interrupts should be enabled, or are enabled. +// +#define MSG_OBJ_TX_INT_ENABLE 0x00000001 + +// +//! This indicates that receive interrupts should be enabled, or are +//! enabled. +// +#define MSG_OBJ_RX_INT_ENABLE 0x00000002 + +// +//! This indicates that a message object will use or is using an extended +//! identifier. +// +#define MSG_OBJ_EXTENDED_ID 0x00000004 + +// +//! This indicates that a message object will use or is using filtering +//! based on the object's message identifier. +// +#define MSG_OBJ_USE_ID_FILTER 0x00000008 + +// +//! This indicates that new data was available in the message object. +// +#define MSG_OBJ_NEW_DATA 0x00000080 + +// +//! This indicates that data was lost since this message object was last +//! read. +// +#define MSG_OBJ_DATA_LOST 0x00000100 + +// +//! This indicates that a message object will use or is using filtering +//! based on the direction of the transfer. If the direction filtering is +//! used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_DIR_FILTER (0x00000010 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object will use or is using message +//! identifier filtering based on the extended identifier. If the extended +//! identifier filtering is used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_EXT_FILTER (0x00000020 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object is a remote frame. +// +#define MSG_OBJ_REMOTE_FRAME 0x00000040 + +// +//! This indicates that this message object is part of a FIFO structure and +//! not the final message object in a FIFO. +// +#define MSG_OBJ_FIFO 0x00000200 + +// +//! This indicates that a message object has no flags set. +// +#define MSG_OBJ_NO_FLAGS 0x00000000 + +//***************************************************************************** +// +//! This define is used with the flag values to allow checking only status +//! flags and not configuration flags. +// +//***************************************************************************** +#define MSG_OBJ_STATUS_MASK (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST) + +//***************************************************************************** +// +//! The structure used for encapsulating all the items associated with a CAN +//! message object in the CAN controller. +// +//***************************************************************************** +typedef struct +{ + // + //! The CAN message identifier used for 11 or 29 bit identifiers. + // + unsigned long ulMsgID; + + // + //! The message identifier mask used when identifier filtering is enabled. + // + unsigned long ulMsgIDMask; + + // + //! This value holds various status flags and settings specified by + //! tCANObjFlags. + // + unsigned long ulFlags; + + // + //! This value is the number of bytes of data in the message object. + // + unsigned long ulMsgLen; + + // + //! This is a pointer to the message object's data. + // + unsigned char *pucMsgData; +} +tCANMsgObject; + +//***************************************************************************** +// +//! This structure is used for encapsulating the values associated with setting +//! up the bit timing for a CAN controller. The structure is used when calling +//! the CANGetBitTiming and CANSetBitTiming functions. +// +//***************************************************************************** +typedef struct +{ + // + //! This value holds the sum of the Synchronization, Propagation, and Phase + //! Buffer 1 segments, measured in time quanta. The valid values for this + //! setting range from 2 to 16. + // + unsigned int uSyncPropPhase1Seg; + + // + //! This value holds the Phase Buffer 2 segment in time quanta. The valid + //! values for this setting range from 1 to 8. + // + unsigned int uPhase2Seg; + + // + //! This value holds the Resynchronization Jump Width in time quanta. The + //! valid values for this setting range from 1 to 4. + // + unsigned int uSJW; + + // + //! This value holds the CAN_CLK divider used to determine time quanta. + //! The valid values for this setting range from 1 to 1023. + // + unsigned int uQuantumPrescaler; +} +tCANBitClkParms; + +//***************************************************************************** +// +//! This data type is used to identify the interrupt status register. This is +//! used when calling the CANIntStatus() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the CAN interrupt status information. + // + CAN_INT_STS_CAUSE, + + // + //! Read a message object's interrupt status. + // + CAN_INT_STS_OBJECT +} +tCANIntStsReg; + +//***************************************************************************** +// +//! This data type is used to identify which of several status registers to +//! read when calling the CANStatusGet() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the full CAN controller status. + // + CAN_STS_CONTROL, + + // + //! Read the full 32-bit mask of message objects with a transmit request + //! set. + // + CAN_STS_TXREQUEST, + + // + //! Read the full 32-bit mask of message objects with new data available. + // + CAN_STS_NEWDAT, + + // + //! Read the full 32-bit mask of message objects that are enabled. + // + CAN_STS_MSGVAL +} +tCANStsReg; + +//***************************************************************************** +// +// These definitions are used to specify interrupt sources to CANIntEnable() +// and CANIntDisable(). +// +//***************************************************************************** +// +//! This flag is used to allow a CAN controller to generate error +//! interrupts. +// +#define CAN_INT_ERROR 0x00000008 + +// +//! This flag is used to allow a CAN controller to generate status +//! interrupts. +// +#define CAN_INT_STATUS 0x00000004 + +// +//! This flag is used to allow a CAN controller to generate any CAN +//! interrupts. If this is not set, then no interrupts will be generated +//! by the CAN controller. +// +#define CAN_INT_MASTER 0x00000002 + +//***************************************************************************** +// +//! This definition is used to determine the type of message object that will +//! be set up via a call to the CANMessageSet() API. +// +//***************************************************************************** +typedef enum +{ + // + //! Transmit message object. + // + MSG_OBJ_TYPE_TX, + + // + //! Transmit remote request message object + // + MSG_OBJ_TYPE_TX_REMOTE, + + // + //! Receive message object. + // + MSG_OBJ_TYPE_RX, + + // + //! Receive remote request message object. + // + MSG_OBJ_TYPE_RX_REMOTE, + + // + //! Remote frame receive remote, with auto-transmit message object. + // + MSG_OBJ_TYPE_RXTX_REMOTE +} +tMsgObjType; + +//***************************************************************************** +// +// The following enumeration contains all error or status indicators that can +// be returned when calling the CANStatusGet() function. +// +//***************************************************************************** +// +//! CAN controller has entered a Bus Off state. +// +#define CAN_STATUS_BUS_OFF 0x00000080 + +// +//! CAN controller error level has reached warning level. +// +#define CAN_STATUS_EWARN 0x00000040 + +// +//! CAN controller error level has reached error passive level. +// +#define CAN_STATUS_EPASS 0x00000020 + +// +//! A message was received successfully since the last read of this status. +// +#define CAN_STATUS_RXOK 0x00000010 + +// +//! A message was transmitted successfully since the last read of this +//! status. +// +#define CAN_STATUS_TXOK 0x00000008 + +// +//! This is the mask for the last error code field. +// +#define CAN_STATUS_LEC_MSK 0x00000007 + +// +//! There was no error. +// +#define CAN_STATUS_LEC_NONE 0x00000000 + +// +//! A bit stuffing error has occurred. +// +#define CAN_STATUS_LEC_STUFF 0x00000001 + +// +//! A formatting error has occurred. +// +#define CAN_STATUS_LEC_FORM 0x00000002 + +// +//! An acknowledge error has occurred. +// +#define CAN_STATUS_LEC_ACK 0x00000003 + +// +//! The bus remained a bit level of 1 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT1 0x00000004 + +// +//! The bus remained a bit level of 0 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT0 0x00000005 + +// +//! A CRC error has occurred. +// +#define CAN_STATUS_LEC_CRC 0x00000006 + +// +//! This is the mask for the CAN Last Error Code (LEC). +// +#define CAN_STATUS_LEC_MASK 0x00000007 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern void CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern unsigned long CANBitRateSet(unsigned long ulBase, + unsigned long ulSourceClock, + unsigned long ulBitRate); +extern void CANDisable(unsigned long ulBase); +extern void CANEnable(unsigned long ulBase); +extern tBoolean CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount); +extern void CANInit(unsigned long ulBase); +extern void CANIntClear(unsigned long ulBase, unsigned long ulIntClr); +extern void CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern unsigned long CANIntStatus(unsigned long ulBase, + tCANIntStsReg eIntStsReg); +extern void CANIntUnregister(unsigned long ulBase); +extern void CANMessageClear(unsigned long ulBase, unsigned long ulObjID); +extern void CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt); +extern void CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType); +extern tBoolean CANRetryGet(unsigned long ulBase); +extern void CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry); +extern unsigned long CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg); + +//***************************************************************************** +// +// Several CAN APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define CANSetBitTiming(a, b) CANBitTimingSet(a, b) +#define CANGetBitTiming(a, b) CANBitTimingGet(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +#endif // __CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.c new file mode 100644 index 00000000..313fe8e3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.c @@ -0,0 +1,436 @@ +//***************************************************************************** +// +// comp.c - Driver for the analog comparator. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup comp_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_comp.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/comp.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Configures a comparator. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulConfig is the configuration of the comparator. +//! +//! This function configures a comparator. The \e ulConfig parameter is the +//! result of a logical OR operation between the \b COMP_TRIG_xxx, +//! \b COMP_INT_xxx, \b COMP_ASRCP_xxx, and \b COMP_OUTPUT_xxx values. +//! +//! The \b COMP_TRIG_xxx term can take on the following values: +//! +//! - \b COMP_TRIG_NONE to have no trigger to the ADC. +//! - \b COMP_TRIG_HIGH to trigger the ADC when the comparator output is high. +//! - \b COMP_TRIG_LOW to trigger the ADC when the comparator output is low. +//! - \b COMP_TRIG_FALL to trigger the ADC when the comparator output goes low. +//! - \b COMP_TRIG_RISE to trigger the ADC when the comparator output goes +//! high. +//! - \b COMP_TRIG_BOTH to trigger the ADC when the comparator output goes low +//! or high. +//! +//! The \b COMP_INT_xxx term can take on the following values: +//! +//! - \b COMP_INT_HIGH to generate an interrupt when the comparator output is +//! high. +//! - \b COMP_INT_LOW to generate an interrupt when the comparator output is +//! low. +//! - \b COMP_INT_FALL to generate an interrupt when the comparator output goes +//! low. +//! - \b COMP_INT_RISE to generate an interrupt when the comparator output goes +//! high. +//! - \b COMP_INT_BOTH to generate an interrupt when the comparator output goes +//! low or high. +//! +//! The \b COMP_ASRCP_xxx term can take on the following values: +//! +//! - \b COMP_ASRCP_PIN to use the dedicated Comp+ pin as the reference +//! voltage. +//! - \b COMP_ASRCP_PIN0 to use the Comp0+ pin as the reference voltage (this +//! the same as \b COMP_ASRCP_PIN for the comparator 0). +//! - \b COMP_ASRCP_REF to use the internally generated voltage as the +//! reference voltage. +//! +//! The \b COMP_OUTPUT_xxx term can take on the following values: +//! +//! - \b COMP_OUTPUT_NORMAL to enable a non-inverted output from the comparator +//! to a device pin. +//! - \b COMP_OUTPUT_INVERT to enable an inverted output from the comparator to +//! a device pin. +//! - \b COMP_OUTPUT_NONE is deprecated and behaves the same as +//! \b COMP_OUTPUT_NORMAL. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Configure this comparator. + // + HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACCTL0) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the internal reference voltage. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulRef is the desired reference voltage. +//! +//! This function sets the internal reference voltage value. The voltage is +//! specified as one of the following values: +//! +//! - \b COMP_REF_OFF to turn off the reference voltage +//! - \b COMP_REF_0V to set the reference voltage to 0 V +//! - \b COMP_REF_0_1375V to set the reference voltage to 0.1375 V +//! - \b COMP_REF_0_275V to set the reference voltage to 0.275 V +//! - \b COMP_REF_0_4125V to set the reference voltage to 0.4125 V +//! - \b COMP_REF_0_55V to set the reference voltage to 0.55 V +//! - \b COMP_REF_0_6875V to set the reference voltage to 0.6875 V +//! - \b COMP_REF_0_825V to set the reference voltage to 0.825 V +//! - \b COMP_REF_0_928125V to set the reference voltage to 0.928125 V +//! - \b COMP_REF_0_9625V to set the reference voltage to 0.9625 V +//! - \b COMP_REF_1_03125V to set the reference voltage to 1.03125 V +//! - \b COMP_REF_1_134375V to set the reference voltage to 1.134375 V +//! - \b COMP_REF_1_1V to set the reference voltage to 1.1 V +//! - \b COMP_REF_1_2375V to set the reference voltage to 1.2375 V +//! - \b COMP_REF_1_340625V to set the reference voltage to 1.340625 V +//! - \b COMP_REF_1_375V to set the reference voltage to 1.375 V +//! - \b COMP_REF_1_44375V to set the reference voltage to 1.44375 V +//! - \b COMP_REF_1_5125V to set the reference voltage to 1.5125 V +//! - \b COMP_REF_1_546875V to set the reference voltage to 1.546875 V +//! - \b COMP_REF_1_65V to set the reference voltage to 1.65 V +//! - \b COMP_REF_1_753125V to set the reference voltage to 1.753125 V +//! - \b COMP_REF_1_7875V to set the reference voltage to 1.7875 V +//! - \b COMP_REF_1_85625V to set the reference voltage to 1.85625 V +//! - \b COMP_REF_1_925V to set the reference voltage to 1.925 V +//! - \b COMP_REF_1_959375V to set the reference voltage to 1.959375 V +//! - \b COMP_REF_2_0625V to set the reference voltage to 2.0625 V +//! - \b COMP_REF_2_165625V to set the reference voltage to 2.165625 V +//! - \b COMP_REF_2_26875V to set the reference voltage to 2.26875 V +//! - \b COMP_REF_2_371875V to set the reference voltage to 2.371875 V +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorRefSet(unsigned long ulBase, unsigned long ulRef) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + + // + // Set the voltage reference voltage as requested. + // + HWREG(ulBase + COMP_O_ACREFCTL) = ulRef; +} + +//***************************************************************************** +// +//! Gets the current comparator output value. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function retrieves the current value of the comparator output. +//! +//! \return Returns \b true if the comparator output is high and \b false if +//! the comparator output is low. +// +//***************************************************************************** +tBoolean +ComparatorValueGet(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Return the appropriate value based on the comparator's present output + // value. + // + if(HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACSTAT0) & COMP_ACSTAT0_OVAL) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! \param pfnHandler is a pointer to the function to be called when the +//! comparator interrupt occurs. +//! +//! This sets the handler to be called when the comparator interrupt occurs +//! and enables the interrupt in the interrupt controller. It is the interrupt +//! handler's responsibility to clear the interrupt source via +//! ComparatorIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, + void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_COMP0 + ulComp, pfnHandler); + + // + // Enable the interrupt in the interrupt controller. + // + IntEnable(INT_COMP0 + ulComp); + + // + // Enable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) |= 1 << ulComp; +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function clears the handler to be called when a comparator interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntUnregister(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Disable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) &= ~(1 << ulComp); + + // + // Disable the interrupt in the interrupt controller. + // + IntDisable(INT_COMP0 + ulComp); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_COMP0 + ulComp); +} + +//***************************************************************************** +// +//! Enables the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function enables generation of an interrupt from the specified +//! comparator. Only comparators whose interrupts are enabled can be reflected +//! to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntEnable(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Enable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) |= 1 << ulComp; +} + +//***************************************************************************** +// +//! Disables the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function disables generation of an interrupt from the specified +//! comparator. Only comparators whose interrupts are enabled can be reflected +//! to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Disable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) &= ~(1 << ulComp); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the comparator. Either the raw or +//! the masked interrupt status can be returned. +//! +//! \return \b true if the interrupt is asserted and \b false if it is not +//! asserted. +// +//***************************************************************************** +tBoolean +ComparatorIntStatus(unsigned long ulBase, unsigned long ulComp, + tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(((HWREG(ulBase + COMP_O_ACMIS) >> ulComp) & 1) ? true : false); + } + else + { + return(((HWREG(ulBase + COMP_O_ACRIS) >> ulComp) & 1) ? true : false); + } +} + +//***************************************************************************** +// +//! Clears a comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! The comparator interrupt is cleared, so that it no longer asserts. This +//! fucntion must be called in the interrupt handler to keep the handler from +//! being called again immediately upon exit. Note that for a level-triggered +//! interrupt, the interrupt cannot be cleared until it stops asserting. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntClear(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Clear the interrupt. + // + HWREG(ulBase + COMP_O_ACMIS) = 1 << ulComp; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.h new file mode 100644 index 00000000..e02e9e25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/comp.h @@ -0,0 +1,130 @@ +//***************************************************************************** +// +// comp.h - Prototypes for the analog comparator driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __COMP_H__ +#define __COMP_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to ComparatorConfigure() as the ulConfig +// parameter. For each group (i.e. COMP_TRIG_xxx, COMP_INT_xxx, etc.), one of +// the values may be selected and combined together with values from the other +// groups via a logical OR. +// +//***************************************************************************** +#define COMP_TRIG_NONE 0x00000000 // No ADC trigger +#define COMP_TRIG_HIGH 0x00000880 // Trigger when high +#define COMP_TRIG_LOW 0x00000800 // Trigger when low +#define COMP_TRIG_FALL 0x00000820 // Trigger on falling edge +#define COMP_TRIG_RISE 0x00000840 // Trigger on rising edge +#define COMP_TRIG_BOTH 0x00000860 // Trigger on both edges +#define COMP_INT_HIGH 0x00000010 // Interrupt when high +#define COMP_INT_LOW 0x00000000 // Interrupt when low +#define COMP_INT_FALL 0x00000004 // Interrupt on falling edge +#define COMP_INT_RISE 0x00000008 // Interrupt on rising edge +#define COMP_INT_BOTH 0x0000000C // Interrupt on both edges +#define COMP_ASRCP_PIN 0x00000000 // Dedicated Comp+ pin +#define COMP_ASRCP_PIN0 0x00000200 // Comp0+ pin +#define COMP_ASRCP_REF 0x00000400 // Internal voltage reference +#ifndef DEPRECATED +#define COMP_OUTPUT_NONE 0x00000000 // No comparator output +#endif +#define COMP_OUTPUT_NORMAL 0x00000000 // Comparator output normal +#define COMP_OUTPUT_INVERT 0x00000002 // Comparator output inverted + +//***************************************************************************** +// +// Values that can be passed to ComparatorSetRef() as the ulRef parameter. +// +//***************************************************************************** +#define COMP_REF_OFF 0x00000000 // Turn off the internal reference +#define COMP_REF_0V 0x00000300 // Internal reference of 0V +#define COMP_REF_0_1375V 0x00000301 // Internal reference of 0.1375V +#define COMP_REF_0_275V 0x00000302 // Internal reference of 0.275V +#define COMP_REF_0_4125V 0x00000303 // Internal reference of 0.4125V +#define COMP_REF_0_55V 0x00000304 // Internal reference of 0.55V +#define COMP_REF_0_6875V 0x00000305 // Internal reference of 0.6875V +#define COMP_REF_0_825V 0x00000306 // Internal reference of 0.825V +#define COMP_REF_0_928125V 0x00000201 // Internal reference of 0.928125V +#define COMP_REF_0_9625V 0x00000307 // Internal reference of 0.9625V +#define COMP_REF_1_03125V 0x00000202 // Internal reference of 1.03125V +#define COMP_REF_1_134375V 0x00000203 // Internal reference of 1.134375V +#define COMP_REF_1_1V 0x00000308 // Internal reference of 1.1V +#define COMP_REF_1_2375V 0x00000309 // Internal reference of 1.2375V +#define COMP_REF_1_340625V 0x00000205 // Internal reference of 1.340625V +#define COMP_REF_1_375V 0x0000030A // Internal reference of 1.375V +#define COMP_REF_1_44375V 0x00000206 // Internal reference of 1.44375V +#define COMP_REF_1_5125V 0x0000030B // Internal reference of 1.5125V +#define COMP_REF_1_546875V 0x00000207 // Internal reference of 1.546875V +#define COMP_REF_1_65V 0x0000030C // Internal reference of 1.65V +#define COMP_REF_1_753125V 0x00000209 // Internal reference of 1.753125V +#define COMP_REF_1_7875V 0x0000030D // Internal reference of 1.7875V +#define COMP_REF_1_85625V 0x0000020A // Internal reference of 1.85625V +#define COMP_REF_1_925V 0x0000030E // Internal reference of 1.925V +#define COMP_REF_1_959375V 0x0000020B // Internal reference of 1.959375V +#define COMP_REF_2_0625V 0x0000030F // Internal reference of 2.0625V +#define COMP_REF_2_165625V 0x0000020D // Internal reference of 2.165625V +#define COMP_REF_2_26875V 0x0000020E // Internal reference of 2.26875V +#define COMP_REF_2_371875V 0x0000020F // Internal reference of 2.371875V + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void ComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig); +extern void ComparatorRefSet(unsigned long ulBase, unsigned long ulRef); +extern tBoolean ComparatorValueGet(unsigned long ulBase, unsigned long ulComp); +extern void ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, + void (*pfnHandler)(void)); +extern void ComparatorIntUnregister(unsigned long ulBase, + unsigned long ulComp); +extern void ComparatorIntEnable(unsigned long ulBase, unsigned long ulComp); +extern void ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp); +extern tBoolean ComparatorIntStatus(unsigned long ulBase, unsigned long ulComp, + tBoolean bMasked); +extern void ComparatorIntClear(unsigned long ulBase, unsigned long ulComp); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __COMP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.c new file mode 100644 index 00000000..a7d49bfc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.c @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// cpu.c - Instruction wrappers for special CPU instructions needed by the +// drivers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "driverlib/cpu.h" + +//***************************************************************************** +// +// Wrapper function for the CPSID instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsid(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + cpsid i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function returning the state of PRIMASK (indicating whether +// interrupts are enabled or disabled). +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUprimask(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the CPSIE instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsie(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + mrs r0, PRIMASK; + cpsie i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the WFI instruction. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + wfi; + bx lr +} +#endif +#if defined(ccs) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for writing the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUbasepriSet(unsigned long ulNewBasepri) +{ + + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + msr BASEPRI, r0; + bx lr +} +#endif +#if defined(ccs) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for reading the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUbasepriGet(void) +{ + unsigned long ulRet; + + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + mrs r0, BASEPRI; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.h new file mode 100644 index 00000000..c0e073e1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/cpu.h @@ -0,0 +1,60 @@ +//***************************************************************************** +// +// cpu.h - Prototypes for the CPU instruction wrapper functions. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CPU_H__ +#define __CPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes. +// +//***************************************************************************** +extern unsigned long CPUcpsid(void); +extern unsigned long CPUcpsie(void); +extern unsigned long CPUprimask(void); +extern void CPUwfi(void); +extern unsigned long CPUbasepriGet(void); +extern void CPUbasepriSet(unsigned long ulNewBasepri); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __CPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/debug.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/debug.h new file mode 100644 index 00000000..6fe52fe5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/debug.h @@ -0,0 +1,53 @@ +//***************************************************************************** +// +// debug.h - Macros for assisting debug of the driver library. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +//***************************************************************************** +// +// Prototype for the function that is called when an invalid argument is passed +// to an API. This is only used when doing a DEBUG build. +// +//***************************************************************************** +extern void __error__(char *pcFilename, unsigned long ulLine); + +//***************************************************************************** +// +// The ASSERT macro, which does the actual assertion checking. Typically, this +// will be for procedure arguments. +// +//***************************************************************************** +#ifdef DEBUG +#define ASSERT(expr) { \ + if(!(expr)) \ + { \ + __error__(__FILE__, __LINE__); \ + } \ + } +#else +#define ASSERT(expr) +#endif + +#endif // __DEBUG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.c new file mode 100644 index 00000000..ee53bd42 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.c @@ -0,0 +1,1176 @@ +//***************************************************************************** +// +// epi.c - Driver for the EPI module. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "inc/hw_epi.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/epi.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! \addtogroup epi_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +//! Sets the usage mode of the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param ulMode is the usage mode of the EPI module. +//! +//! This functions sets the operating mode of the EPI module. The parameter +//! \e ulMode must be one of the following: +//! +//! - \b EPI_MODE_GENERAL - use for general-purpose mode operation +//! - \b EPI_MODE_SDRAM - use with SDRAM device +//! - \b EPI_MODE_HB8 - use with host-bus 8-bit interface +//! - \b EPI_MODE_HB16 - use with host-bus 16-bit interface +//! - \b EPI_MODE_DISABLE - disable the EPI module +//! +//! Selection of any of the above modes will enable the EPI module, except +//! for \b EPI_MODE_DISABLE which should be used to disable the module. +//! +//! \return None. +// +//***************************************************************************** +void +EPIModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT((ulMode == EPI_MODE_GENERAL) || + (ulMode == EPI_MODE_SDRAM) || + (ulMode == EPI_MODE_HB8) || + (ulMode == EPI_MODE_HB16) || + (ulMode == EPI_MODE_DISABLE)); + + // + // Write the mode word to the register. + // + HWREG(ulBase + EPI_O_CFG) = ulMode; +} + +//***************************************************************************** +// +//! Sets the clock divider for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param ulDivider is the value of the clock divider to be applied to +//! the external interface (0-65535). +//! +//! This functions sets the clock divider(s) that will be used to determine the +//! clock rate of the external interface. The \e ulDivider value is used to +//! derive the EPI clock rate from the system clock based upon the following +//! formula. +//! +//! EPIClock = (Divider == 0) ? SysClk : (SysClk / (((Divider / 2) + 1) * 2)) +//! +//! For example, a divider value of 1 results in an EPI clock rate of half +//! the system clock, value of 2 or 3 yield one quarter of the system clock and +//! a value of 4 results in one sixth of the system clock rate. +//! +//! In cases where a dual chip select mode is in use and different clock rates +//! are required for each chip select, the \e ulDivider parameter must contain +//! two dividers. The lower 16 bits define the divider to be used with CS0n +//! and the upper 16 bits define the divider for CS1n. +//! +//! \return None. +// +//***************************************************************************** +void +EPIDividerSet(unsigned long ulBase, unsigned long ulDivider) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Write the divider value to the register. + // + HWREG(ulBase + EPI_O_BAUD) = ulDivider; +} + +//***************************************************************************** +// +//! Configures the SDRAM mode of operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the SDRAM interface configuration. +//! \param ulRefresh is the refresh count in core clocks (0-2047). +//! +//! This function is used to configure the SDRAM interface, when the SDRAM +//! mode is chosen with the function EPIModeSet(). The parameter \e ulConfig +//! is the logical OR of several sets of choices: +//! +//! The processor core frequency must be specified with one of the following: +//! +//! - \b EPI_SDRAM_CORE_FREQ_0_15 - core clock is 0 MHz < clk <= 15 MHz +//! - \b EPI_SDRAM_CORE_FREQ_15_30 - core clock is 15 MHz < clk <= 30 MHz +//! - \b EPI_SDRAM_CORE_FREQ_30_50 - core clock is 30 MHz < clk <= 50 MHz +//! - \b EPI_SDRAM_CORE_FREQ_50_100 - core clock is 50 MHz < clk <= 100 MHz +//! +//! The low power mode is specified with one of the following: +//! +//! - \b EPI_SDRAM_LOW_POWER - enter low power, self-refresh state +//! - \b EPI_SDRAM_FULL_POWER - normal operating state +//! +//! The SDRAM device size is specified with one of the following: +//! +//! - \b EPI_SDRAM_SIZE_64MBIT - 64 Mbit device (8 MB) +//! - \b EPI_SDRAM_SIZE_128MBIT - 128 Mbit device (16 MB) +//! - \b EPI_SDRAM_SIZE_256MBIT - 256 Mbit device (32 MB) +//! - \b EPI_SDRAM_SIZE_512MBIT - 512 Mbit device (64 MB) +//! +//! The parameter \e ulRefresh sets the refresh counter in units of core +//! clock ticks. It is an 11-bit value with a range of 0 - 2047 counts. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigSDRAMSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulRefresh) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulRefresh < 2048); + + // + // Fill in the refresh count field of the configuration word. + // + ulConfig &= ~EPI_SDRAMCFG_RFSH_M; + ulConfig |= ulRefresh << EPI_SDRAMCFG_RFSH_S; + + // + // Write the SDRAM configuration register. + // + HWREG(ulBase + EPI_O_SDRAMCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for Host-bus 8 operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulMaxWait is the maximum number of external clocks to wait +//! if a FIFO ready signal is holding off the transaction. +//! +//! This function is used to configure the interface when used in Host-bus 8 +//! operation as chosen with the function EPIModeSet(). The parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - one of \b EPI_HB8_MODE_ADMUX, \b EPI_HB8_MODE_ADDEMUX, +//! \b EPI_HB8_MODE_SRAM, or \b EPI_HB8_MODE_FIFO to select the HB8 mode +//! - \b EPI_HB8_USE_TXEMPTY - enable TXEMPTY signal with FIFO +//! - \b EPI_HB8_USE_RXFULL - enable RXFULL signal with FIFO +//! - \b EPI_HB8_WRHIGH - use active high write strobe, otherwise it is +//! active low +//! - \b EPI_HB8_RDHIGH - use active high read strobe, otherwise it is +//! active low +//! - one of \b EPI_HB8_WRWAIT_0, \b EPI_HB8_WRWAIT_1, \b EPI_HB8_WRWAIT_2, +//! or \b EPI_HB8_WRWAIT_3 to select the number of write wait states (default +//! is 0 wait states) +//! - one of \b EPI_HB8_RDWAIT_0, \b EPI_HB8_RDWAIT_1, \b EPI_HB8_RDWAIT_2, +//! or \b EPI_HB8_RDWAIT_3 to select the number of read wait states (default +//! is 0 wait states) +//! - \b EPI_HB8_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in bits [31:8]. If absent, +//! all data transfers use bits [7:0]. +//! - \b EPI_HB8_CSBAUD_DUAL - use different baud rates when accessing devices +//! on each CSn. CS0n uses the baud rate specified by the lower 16 bits of the +//! divider passed to EPIDividerSet() and CS1n uses the divider passed in the +//! upper 16 bits. If this option is absent, both chip selects use the baud +//! rate resulting from the divider in the lower 16 bits of the parameter passed +//! to EPIDividerSet(). +//! - one of \b EPI_HB8_CSCFG_CS, \b EPI_HB8_CSCFG_ALE, +//! \b EPI_HB8_CSCFG_DUAL_CS or \b EPI_HB8_CSCFG_ALE_DUAL_CS. \b +//! EPI_HB8_CSCFG_CS sets EPI30 to operate as a Chip Select (CSn) signal. \b +//! EPI_HB8_CSCFG_ALE sets EPI30 to operate as an address latch (ALE). \b +//! EPI_HB8_CSCFG_DUAL_CS sets EPI30 to operate as CS0n and EPI27 as CS1n with +//! the asserted chip select determined from the most significant address bit +//! for the respective external address map. \b EPI_HB8_CSCFG_ALE_DUAL_CS sets +//! EPI30 as an address latch (ALE), EPI27 as CS0n and EPI26 as CS1n with the +//! asserted chip select determined from the most significant address bit for +//! the respective external address map. +//! +//! The parameter \e ulMaxWait is used if the FIFO mode is chosen. If a +//! FIFO is used along with RXFULL or TXEMPTY ready signals, then this +//! parameter determines the maximum number of clocks to wait when the +//! transaction is being held off by by the FIFO using one of these ready +//! signals. A value of 0 means to wait forever. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigHB8Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMaxWait < 256); + + // + // Determine the CS and word access modes. + // + HWREG(ulBase + EPI_O_HB8CFG2) = (((ulConfig & EPI_HB8_WORD_ACCESS) ? + EPI_HB8CFG2_WORD : 0) | + ((ulConfig & EPI_HB8_CSBAUD_DUAL) ? + EPI_HB8CFG2_CSBAUD : 0) | + ((ulConfig & EPI_HB8_CSCFG_MASK) << 15)); + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_HB8CFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_HB8CFG_MAXWAIT_S; + + // + // Write the main HostBus8 configuration register. + // + HWREG(ulBase + EPI_O_HB8CFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for Host-bus 16 operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulMaxWait is the maximum number of external clocks to wait +//! if a FIFO ready signal is holding off the transaction. +//! +//! This function is used to configure the interface when used in Host-bus 16 +//! operation as chosen with the function EPIModeSet(). The parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - one of \b EPI_HB16_MODE_ADMUX, \b EPI_HB16_MODE_ADDEMUX, +//! \b EPI_HB16_MODE_SRAM, or \b EPI_HB16_MODE_FIFO to select the HB16 mode +//! - \b EPI_HB16_USE_TXEMPTY - enable TXEMPTY signal with FIFO +//! - \b EPI_HB16_USE_RXFULL - enable RXFULL signal with FIFO +//! - \b EPI_HB16_WRHIGH - use active high write strobe, otherwise it is +//! active low +//! - \b EPI_HB16_RDHIGH - use active high read strobe, otherwise it is +//! active low +//! - one of \b EPI_HB16_WRWAIT_0, \b EPI_HB16_WRWAIT_1, \b EPI_HB16_WRWAIT_2, +//! or \b EPI_HB16_WRWAIT_3 to select the number of write wait states (default +//! is 0 wait states) +//! - one of \b EPI_HB16_RDWAIT_0, \b EPI_HB16_RDWAIT_1, \b EPI_HB16_RDWAIT_2, +//! or \b EPI_HB16_RDWAIT_3 to select the number of read wait states (default +//! is 0 wait states) +//! - \b EPI_HB16_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in bits [31:8]. If absent, +//! all data transfers use bits [7:0]. +//! - \b EPI_HB16_BSEL - enables byte selects. In this mode, two EPI signals +//! operate as byte selects allowing 8-bit transfers. If this flag is not +//! specified, data must be read and written using only 16-bit transfers. +//! - \b EPI_HB16_CSBAUD_DUAL - use different baud rates when accessing devices +//! on each CSn. CS0n uses the baud rate specified by the lower 16 bits of the +//! divider passed to EPIDividerSet() and CS1n uses the divider passed in the +//! upper 16 bits. If this option is absent, both chip selects use the baud +//! rate resulting from the divider in the lower 16 bits of the parameter passed +//! to EPIDividerSet(). +//! - one of \b EPI_HB16_CSCFG_CS, \b EPI_HB16_CSCFG_ALE, +//! \b EPI_HB16_CSCFG_DUAL_CS or \b EPI_HB16_CSCFG_ALE_DUAL_CS. \b +//! EPI_HB16_CSCFG_CS sets EPI30 to operate as a Chip Select (CSn) signal. \b +//! EPI_HB16_CSCFG_ALE sets EPI30 to operate as an address latch (ALE). +//! \b EPI_HB16_CSCFG_DUAL_CS sets EPI30 to operate as CS0n and EPI27 as CS1n +//! with the asserted chip select determined from the most significant address +//! bit for the respective external address map. \b EPI_HB16_CSCFG_ALE_DUAL_CS +//! sets EPI30 as an address latch (ALE), EPI27 as CS0n and EPI26 as CS1n with +//! the asserted chip select determined from the most significant address bit +//! for the respective external address map. +//! +//! The parameter \e ulMaxWait is used if the FIFO mode is chosen. If a +//! FIFO is used along with RXFULL or TXEMPTY ready signals, then this +//! parameter determines the maximum number of clocks to wait when the +//! transaction is being held off by by the FIFO using one of these ready +//! signals. A value of 0 means to wait forever. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigHB16Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMaxWait < 256); + + // + // Determine the CS and word access modes. + // + HWREG(ulBase + EPI_O_HB16CFG2) = (((ulConfig & EPI_HB16_WORD_ACCESS) ? + EPI_HB16CFG2_WORD : 0) | + ((ulConfig & EPI_HB16_CSBAUD_DUAL) ? + EPI_HB16CFG2_CSBAUD : 0) | + ((ulConfig & EPI_HB16_CSCFG_MASK) << 15)); + + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_HB16CFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_HB16CFG_MAXWAIT_S; + + // + // Write the main HostBus16 configuration register. + // + HWREG(ulBase + EPI_O_HB16CFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for general-purpose mode operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulFrameCount is the frame size in clocks, if the frame signal +//! is used (0-15). +//! \param ulMaxWait is the maximum number of external clocks to wait +//! when the external clock enable is holding off the transaction (0-255). +//! +//! This function is used to configure the interface when used in +//! general-purpose operation as chosen with the function EPIModeSet(). The +//! parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - \b EPI_GPMODE_CLKPIN - interface clock is output on a pin +//! - \b EPI_GPMODE_CLKGATE - clock is stopped when there is no transaction, +//! otherwise it is free-running +//! - \b EPI_GPMODE_RDYEN - the external peripheral drives an iRDY signal into +//! pin EPI0S27. If absent, the peripheral is assumed to be ready at all times. +//! This flag may only be used with a free-running clock (\b EPI_GPMODE_CLKGATE +//! is absent). +//! - \b EPI_GPMODE_FRAMEPIN - framing signal is emitted on a pin +//! - \b EPI_GPMODE_FRAME50 - framing signal is 50/50 duty cycle, otherwise it +//! is a pulse +//! - \b EPI_GPMODE_READWRITE - read and write strobes are emitted on pins +//! - \b EPI_GPMODE_WRITE2CYCLE - a two cycle write is used, otherwise a +//! single-cycle write is used +//! - \b EPI_GPMODE_READ2CYCLE - a two cycle read is used, otherwise a +//! single-cycle read is used +//! - \b EPI_GPMODE_ASIZE_NONE, \b EPI_GPMODE_ASIZE_4, +//! \b EPI_GPMODE_ASIZE_12, or \b EPI_GPMODE_ASIZE_20 to choose no address +//! bus, or and address bus size of 4, 12, or 20 bits +//! - \b EPI_GPMODE_DSIZE_8, \b EPI_GPMODE_DSIZE_16, +//! \b EPI_GPMODE_DSIZE_24, or \b EPI_GPMODE_DSIZE_32 to select a data bus +//! size of 8, 16, 24, or 32 bits +//! - \b EPI_GPMODE_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in the upper bits of the word +//! when necessary. +//! +//! The parameter \e ulFrameCount is the number of clocks used to form the +//! framing signal, if the framing signal is used. The behavior depends on +//! whether the frame signal is a pulse or a 50/50 duty cycle. This value +//! is not used if the framing signal is not enabled with the option +//! \b EPI_GPMODE_FRAMEPIN. +//! +//! The parameter \e ulMaxWait is used if the external clock enable is turned +//! on with the \b EPI_GPMODE_CLKENA option is used. In the case that +//! external clock enable is used, this parameter determines the maximum +//! number of clocks to wait when the external clock enable signal is holding +//! off a transaction. A value of 0 means to wait forever. If a non-zero +//! value is used and exceeded, an interrupt will occur and the transaction +//! aborted. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigGPModeSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulFrameCount, unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulFrameCount < 16); + ASSERT(ulMaxWait < 256); + + // + // Set the word access mode. + // + HWREG(ulBase + EPI_O_GPCFG2) = ((ulConfig & EPI_GPMODE_WORD_ACCESS) ? + EPI_GPCFG2_WORD : 0); + + // + // Fill in the frame count field of the configuration word. + // + ulConfig &= ~EPI_GPCFG_FRMCNT_M; + ulConfig |= ulFrameCount << EPI_GPCFG_FRMCNT_S; + + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_GPCFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_GPCFG_MAXWAIT_S; + + // + // Write the non-moded configuration register. + // + HWREG(ulBase + EPI_O_GPCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the address map for the external interface. +//! +//! \param ulBase is the EPI module base address. +//! \param ulMap is the address mapping configuration. +//! +//! This function is used to configure the address mapping for the external +//! interface. This determines the base address of the external memory or +//! device within the processor peripheral and/or memory space. +//! +//! The parameter \e ulMap is the logical OR of the following: +//! +//! - \b EPI_ADDR_PER_SIZE_256B, \b EPI_ADDR_PER_SIZE_64KB, +//! \b EPI_ADDR_PER_SIZE_16MB, or \b EPI_ADDR_PER_SIZE_512MB to choose a +//! peripheral address space of 256 bytes, 64 Kbytes, 16 Mbytes or 512 Mbytes +//! - \b EPI_ADDR_PER_BASE_NONE, \b EPI_ADDR_PER_BASE_A, or +//! \b EPI_ADDR_PER_BASE_C to choose the base address of the peripheral +//! space as none, 0xA0000000, or 0xC0000000 +//! - \b EPI_ADDR_RAM_SIZE_256B, \b EPI_ADDR_RAM_SIZE_64KB, +//! \b EPI_ADDR_RAM_SIZE_16MB, or \b EPI_ADDR_RAM_SIZE_512MB to choose a +//! RAM address space of 256 bytes, 64 Kbytes, 16 Mbytes or 512 Mbytes +//! - \b EPI_ADDR_RAM_BASE_NONE, \b EPI_ADDR_RAM_BASE_6, or +//! \b EPI_ADDR_RAM_BASE_8 to choose the base address of the RAM space +//! as none, 0x60000000, or 0x80000000 +//! +//! \return None. +// +//***************************************************************************** +void +EPIAddressMapSet(unsigned long ulBase, unsigned long ulMap) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMap < 0x100); + + // + // Set the value of the address mapping register. + // + HWREG(ulBase + EPI_O_ADDRMAP) = ulMap; +} + +//***************************************************************************** +// +//! Configures a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! \param ulDataSize is the size of the data items to read. +//! \param ulAddress is the starting address to read. +//! +//! This function is used to configure a non-blocking read channel for a +//! transaction. Two channels are available which can be used in a ping-pong +//! method for continuous reading. It is not necessary to use both channels +//! to perform a non-blocking read. +//! +//! The parameter \e ulDataSize is one of \b EPI_NBCONFIG_SIZE_8, +//! \b EPI_NBCONFIG_SIZE_16, or \b EPI_NBCONFIG_SIZE_32 for 8-bit, 16-bit, +//! or 32-bit sized data transfers. +//! +//! The parameter \e ulAddress is the starting address for the read, relative +//! to the external device. The start of the device is address 0. +//! +//! Once configured, the non-blocking read is started by calling +//! EPINonBlockingReadStart(). If the addresses to be read from the device +//! are in a sequence, it is not necessary to call this function multiple +//! times. Until it is changed, the EPI module will remember the last address +//! that was used for a non-blocking read (per channel). +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadConfigure(unsigned long ulBase, unsigned long ulChannel, + unsigned long ulDataSize, unsigned long ulAddress) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + ASSERT(ulDataSize < 4); + ASSERT(ulAddress < 0x20000000); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RSIZE1 - EPI_O_RSIZE0); + + // + // Write the data size register for the channel. + // + HWREG(ulBase + EPI_O_RSIZE0 + ulOffset) = ulDataSize; + + // + // Write the starting address register for the channel. + // + HWREG(ulBase + EPI_O_RADDR0 + ulOffset) = ulAddress; +} + +//***************************************************************************** +// +//! Starts a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! \param ulCount is the number of items to read (1-4095). +//! +//! This function starts a non-blocking read that was previously configured +//! with the function EPINonBlockingReadConfigure(). Once this function is +//! called, the EPI module will begin reading data from the external device +//! into the read FIFO. The EPI will stop reading when the FIFO fills up +//! and resume reading when the application drains the FIFO, until the +//! total specified count of data items has been read. +//! +//! Once a read transaction is completed and the FIFO drained, another +//! transaction can be started from the next address by calling this +//! function again. +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadStart(unsigned long ulBase, unsigned long ulChannel, + unsigned long ulCount) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + ASSERT(ulCount < 4096); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Write to the read count register. + // + HWREG(ulBase + EPI_O_RPSTD0 + ulOffset) = ulCount; +} + +//***************************************************************************** +// +//! Stops a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! +//! This function cancels a non-blocking read transaction that is already +//! in progress. +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadStop(unsigned long ulBase, unsigned long ulChannel) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Write a 0 to the read count register, which will cancel the transaction. + // + HWREG(ulBase + EPI_O_RPSTD0 + ulOffset) = 0; +} + +//***************************************************************************** +// +//! Get the count remaining for a non-blocking transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! +//! This function gets the remaining count of items for a non-blocking read +//! transaction. +//! +//! \return The number of items remaining in the non-blocking read transaction. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadCount(unsigned long ulBase, unsigned long ulChannel) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Read the count remaining and return the value to the caller. + // + return(HWREG(ulBase + EPI_O_RPSTD0 + ulOffset)); +} + +//***************************************************************************** +// +//! Get the count of items available in the read FIFO. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function gets the number of items that are available to read in +//! the read FIFO. The read FIFO is filled by a non-blocking read transaction +//! which is configured by the functions EPINonBlockingReadConfigure() and +//! EPINonBlockingReadStart(). +//! +//! \return The number of items available to read in the read FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the FIFO count and return it to the caller. + // + return(HWREG(ulBase + EPI_O_RFIFOCNT)); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 32-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pulBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 32-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet32(unsigned long ulBase, unsigned long ulCount, + unsigned long *pulBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pulBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pulBuf = HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pulBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 16-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pusBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 16-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet16(unsigned long ulBase, unsigned long ulCount, + unsigned short *pusBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pusBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pusBuf = (unsigned short)HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pusBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 8-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pucBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 8-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet8(unsigned long ulBase, unsigned long ulCount, + unsigned char *pucBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pucBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pucBuf = (unsigned char)HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pucBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Configures the read FIFO. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the FIFO configuration. +//! +//! This function configures the FIFO trigger levels and error +//! generation. The parameter \e ulConfig is the logical OR of the +//! following: +//! +//! - \b EPI_FIFO_CONFIG_WTFULLERR - enables an error interrupt when a write is +//! attempted and the write FIFO is full +//! - \b EPI_FIFO_CONFIG_RSTALLERR - enables an error interrupt when a read is +//! stalled due to an interleaved write or other reason +//! - \b EPI_FIFO_CONFIG_TX_EMPTY, \b EPI_FIFO_CONFIG_TX_1_4, +//! \b EPI_FIFO_CONFIG_TX_1_2, or \b EPI_FIFO_CONFIG_TX_3_4 to set the +//! TX FIFO trigger level to empty, 1/4, 1/2, or 3/4 level +//! - \b EPI_FIFO_CONFIG_RX_1_8, \b EPI_FIFO_CONFIG_RX_1_4, +//! \b EPI_FIFO_CONFIG_RX_1_2, \b EPI_FIFO_CONFIG_RX_3_4, +//! \b EPI_FIFO_CONFIG_RX_7_8, or \b EPI_FIFO_CONFIG_RX_FULL to set the +//! RX FIFO trigger level to 1/8, 1/4, 1/2, 3/4, 7/8 or full level +//! +//! \return None. +// +//***************************************************************************** +void +EPIFIFOConfig(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulConfig == (ulConfig & 0x00030077)); + + // + // Load the configuration into the FIFO config reg. + // + HWREG(ulBase + EPI_O_FIFOLVL) = ulConfig; +} + +//***************************************************************************** +// +//! Reads the number of empty slots in the write transaction FIFO. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function returns the number of slots available in the transaction +//! FIFO. It can be used in a polling method to avoid attempting a write +//! that would stall. +//! +//! \return The number of empty slots in the transaction FIFO. +// +//***************************************************************************** +unsigned long +EPIWriteFIFOCountGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the FIFO count and return it to the caller. + // + return(HWREG(ulBase + EPI_O_WFIFOCNT)); +} + +//***************************************************************************** +// +//! Enables EPI interrupt sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! This function enables the specified EPI sources to generate interrupts. +//! The \e ulIntFlags parameter can be the logical OR of any of the following +//! values: +//! +//! - \b EPI_INT_TXREQ - transmit FIFO is below the trigger level +//! - \b EPI_INT_RXREQ - read FIFO is above the trigger level +//! - \b EPI_INT_ERR - an error condition occurred +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulIntFlags < 16); + + // + // Write the interrupt flags mask to the mask register. + // + HWREG(ulBase + EPI_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables EPI interrupt sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! This function disables the specified EPI sources for interrupt +//! generation. The \e ulIntFlags parameter can be the logical OR +//! of any of the following values: \b EPI_INT_RXREQ, \b EPI_INT_TXREQ, or +//! \b I2S_INT_ERR. +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulIntFlags < 16); + + // + // Write the interrupt flags mask to the mask register. + // + HWREG(ulBase + EPI_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the EPI interrupt status. +//! +//! \param ulBase is the EPI module base address. +//! \param bMasked is set \b true to get the masked interrupt status, or +//! \b false to get the raw interrupt status. +//! +//! This function returns the EPI interrupt status. It can return either +//! the raw or masked interrupt status. +//! +//! \return Returns the masked or raw EPI interrupt status, as a bit field +//! of any of the following values: \b EPI_INT_TXREQ, \b EPI_INT_RXREQ, +//! or \b EPI_INT_ERR +// +//***************************************************************************** +unsigned long +EPIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + EPI_O_MIS)); + } + else + { + return(HWREG(ulBase + EPI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Gets the EPI error interrupt status. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function returns the error status of the EPI. If the return value of +//! the function EPIIntStatus() has the flag \b EPI_INT_ERR set, then this +//! function can be used to determine the cause of the error. +//! +//! This function returns a bit mask of error flags, which can be the logical +//! OR of any of the following: +//! +//! - \b EPI_INT_ERR_WTFULL - occurs when a write stalled when the transaction +//! FIFO was full +//! - \b EPI_INT_ERR_RSTALL - occurs when a read stalled +//! - \b EPI_INT_ERR_TIMEOUT - occurs when the external clock enable held +//! off a transaction longer than the configured maximum wait time +//! +//! \return Returns the interrupt error flags as the logical OR of any of +//! the following: \b EPI_INT_ERR_WTFULL, \b EPI_INT_ERR_RSTALL, or +//! \b EPI_INT_ERR_TIMEOUT. +// +//***************************************************************************** +unsigned long +EPIIntErrorStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the error status and return to caller. + // + return(HWREG(ulBase + EPI_O_EISC)); +} + +//***************************************************************************** +// +//! Clears pending EPI error sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulErrFlags is a bit mask of the error sources to be cleared. +//! +//! This function clears the specified pending EPI errors. The \e ulErrFlags +//! parameter can be the logical OR of any of the following values: +//! \b EPI_INT_ERR_WTFULL, \b EPI_INT_ERR_RSTALL, or \b EPI_INT_ERR_TIMEOUT. +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulErrFlags < 16); + + // + // Write the error flags to the register to clear the pending errors. + // + HWREG(ulBase + EPI_O_EISC) = ulErrFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the EPI module +//! generates an interrupt. Specific EPI interrupts must still be enabled +//! with the EPIIntEnable() function. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EPIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(INT_EPI0, pfnHandler); + + // + // Enable the EPI interface interrupt. + // + IntEnable(INT_EPI0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function will disable and clear the handler to be called when the +//! EPI interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EPIIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Disable the EPI interface interrupt. + // + IntDisable(INT_EPI0); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_EPI0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.h new file mode 100644 index 00000000..44ccb4dc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/epi.h @@ -0,0 +1,304 @@ +//***************************************************************************** +// +// epi.h - Prototypes and macros for the EPI module. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __EPI_H__ +#define __EPI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to EPIModeSet() +// +//***************************************************************************** +#define EPI_MODE_GENERAL 0x00000010 +#define EPI_MODE_SDRAM 0x00000011 +#define EPI_MODE_HB8 0x00000012 +#define EPI_MODE_HB16 0x00000013 +#define EPI_MODE_DISABLE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigSDRAMSet() +// +//***************************************************************************** +#define EPI_SDRAM_CORE_FREQ_0_15 0x00000000 +#define EPI_SDRAM_CORE_FREQ_15_30 0x40000000 +#define EPI_SDRAM_CORE_FREQ_30_50 0x80000000 +#define EPI_SDRAM_CORE_FREQ_50_100 0xC0000000 +#define EPI_SDRAM_LOW_POWER 0x00000200 +#define EPI_SDRAM_FULL_POWER 0x00000000 +#define EPI_SDRAM_SIZE_64MBIT 0x00000000 +#define EPI_SDRAM_SIZE_128MBIT 0x00000001 +#define EPI_SDRAM_SIZE_256MBIT 0x00000002 +#define EPI_SDRAM_SIZE_512MBIT 0x00000003 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigGPModeSet() +// +//***************************************************************************** +#define EPI_GPMODE_CLKPIN 0x80000000 +#define EPI_GPMODE_CLKGATE 0x40000000 +#define EPI_GPMODE_RDYEN 0x10000000 +#define EPI_GPMODE_FRAMEPIN 0x08000000 +#define EPI_GPMODE_FRAME50 0x04000000 +#define EPI_GPMODE_READWRITE 0x00200000 +#define EPI_GPMODE_WRITE2CYCLE 0x00080000 +#define EPI_GPMODE_READ2CYCLE 0x00040000 +#define EPI_GPMODE_ASIZE_NONE 0x00000000 +#define EPI_GPMODE_ASIZE_4 0x00000010 +#define EPI_GPMODE_ASIZE_12 0x00000020 +#define EPI_GPMODE_ASIZE_20 0x00000030 +#define EPI_GPMODE_DSIZE_8 0x00000000 +#define EPI_GPMODE_DSIZE_16 0x00000001 +#define EPI_GPMODE_DSIZE_24 0x00000002 +#define EPI_GPMODE_DSIZE_32 0x00000003 +#define EPI_GPMODE_WORD_ACCESS 0x00000100 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigHB8ModeSet() +// +//***************************************************************************** +#define EPI_HB8_USE_TXEMPTY 0x00800000 +#define EPI_HB8_USE_RXFULL 0x00400000 +#define EPI_HB8_WRHIGH 0x00200000 +#define EPI_HB8_RDHIGH 0x00100000 +#define EPI_HB8_WRWAIT_0 0x00000000 +#define EPI_HB8_WRWAIT_1 0x00000040 +#define EPI_HB8_WRWAIT_2 0x00000080 +#define EPI_HB8_WRWAIT_3 0x000000C0 +#define EPI_HB8_RDWAIT_0 0x00000000 +#define EPI_HB8_RDWAIT_1 0x00000010 +#define EPI_HB8_RDWAIT_2 0x00000020 +#define EPI_HB8_RDWAIT_3 0x00000030 +#define EPI_HB8_MODE_ADMUX 0x00000000 +#define EPI_HB8_MODE_ADDEMUX 0x00000001 +#define EPI_HB8_MODE_SRAM 0x00000002 +#define EPI_HB8_MODE_FIFO 0x00000003 +#define EPI_HB8_WORD_ACCESS 0x00000100 +#define EPI_HB8_CSCFG_ALE 0x00000000 +#define EPI_HB8_CSCFG_CS 0x00000200 +#define EPI_HB8_CSCFG_DUAL_CS 0x00000400 +#define EPI_HB8_CSCFG_ALE_DUAL_CS 0x00000600 +#define EPI_HB8_CSBAUD_DUAL 0x00000800 + +#define EPI_HB8_CSCFG_MASK 0x00000600 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigHB16ModeSet() +// +//***************************************************************************** +#define EPI_HB16_USE_TXEMPTY 0x00800000 +#define EPI_HB16_USE_RXFULL 0x00400000 +#define EPI_HB16_WRHIGH 0x00200000 +#define EPI_HB16_RDHIGH 0x00100000 +#define EPI_HB16_WRWAIT_0 0x00000000 +#define EPI_HB16_WRWAIT_1 0x00000040 +#define EPI_HB16_WRWAIT_2 0x00000080 +#define EPI_HB16_WRWAIT_3 0x000000C0 +#define EPI_HB16_RDWAIT_0 0x00000000 +#define EPI_HB16_RDWAIT_1 0x00000010 +#define EPI_HB16_RDWAIT_2 0x00000020 +#define EPI_HB16_RDWAIT_3 0x00000030 +#define EPI_HB16_MODE_ADMUX 0x00000000 +#define EPI_HB16_MODE_ADDEMUX 0x00000001 +#define EPI_HB16_MODE_SRAM 0x00000002 +#define EPI_HB16_MODE_FIFO 0x00000003 +#define EPI_HB16_BSEL 0x00000004 +#define EPI_HB16_WORD_ACCESS 0x00000100 +#define EPI_HB16_CSCFG_ALE 0x00000000 +#define EPI_HB16_CSCFG_CS 0x00000200 +#define EPI_HB16_CSCFG_DUAL_CS 0x00000400 +#define EPI_HB16_CSCFG_ALE_DUAL_CS 0x00000600 +#define EPI_HB16_CSBAUD_DUAL 0x00000800 + +#define EPI_HB16_CSCFG_MASK 0x00000600 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigSDRAMSet() +// +//***************************************************************************** +#define EPI_ADDR_PER_SIZE_256B 0x00000000 +#define EPI_ADDR_PER_SIZE_64KB 0x00000040 +#define EPI_ADDR_PER_SIZE_16MB 0x00000080 +#define EPI_ADDR_PER_SIZE_256MB 0x000000C0 +#define EPI_ADDR_PER_BASE_NONE 0x00000000 +#define EPI_ADDR_PER_BASE_A 0x00000010 +#define EPI_ADDR_PER_BASE_C 0x00000020 +#define EPI_ADDR_RAM_SIZE_256B 0x00000000 +#define EPI_ADDR_RAM_SIZE_64KB 0x00000004 +#define EPI_ADDR_RAM_SIZE_16MB 0x00000008 +#define EPI_ADDR_RAM_SIZE_256MB 0x0000000C +#define EPI_ADDR_RAM_BASE_NONE 0x00000000 +#define EPI_ADDR_RAM_BASE_6 0x00000001 +#define EPI_ADDR_RAM_BASE_8 0x00000002 + +//***************************************************************************** +// +// Values that can be passed to EPINonBlockingReadConfigure() +// +//***************************************************************************** +#define EPI_NBCONFIG_SIZE_8 1 +#define EPI_NBCONFIG_SIZE_16 2 +#define EPI_NBCONFIG_SIZE_32 3 + +//***************************************************************************** +// +// Values that can be passed to EPIFIFOConfig() +// +//***************************************************************************** +#define EPI_FIFO_CONFIG_WTFULLERR 0x00020000 +#define EPI_FIFO_CONFIG_RSTALLERR 0x00010000 +#define EPI_FIFO_CONFIG_TX_EMPTY 0x00000000 +#define EPI_FIFO_CONFIG_TX_1_4 0x00000020 +#define EPI_FIFO_CONFIG_TX_1_2 0x00000030 +#define EPI_FIFO_CONFIG_TX_3_4 0x00000040 +#define EPI_FIFO_CONFIG_RX_1_8 0x00000001 +#define EPI_FIFO_CONFIG_RX_1_4 0x00000002 +#define EPI_FIFO_CONFIG_RX_1_2 0x00000003 +#define EPI_FIFO_CONFIG_RX_3_4 0x00000004 +#define EPI_FIFO_CONFIG_RX_7_8 0x00000005 +#define EPI_FIFO_CONFIG_RX_FULL 0x00000006 + +//***************************************************************************** +// +// Values that can be passed to EPIIntEnable(), EPIIntDisable(), or returned +// as flags from EPIIntStatus() +// +//***************************************************************************** +#define EPI_INT_TXREQ 0x00000004 +#define EPI_INT_RXREQ 0x00000002 +#define EPI_INT_ERR 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to EPIIntErrorClear(), or returned as flags from +// EPIIntErrorStatus() +// +//***************************************************************************** +#define EPI_INT_ERR_WTFULL 0x00000004 +#define EPI_INT_ERR_RSTALL 0x00000002 +#define EPI_INT_ERR_TIMEOUT 0x00000001 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void EPIModeSet(unsigned long ulBase, unsigned long ulMode); +extern void EPIDividerSet(unsigned long ulBase, unsigned long ulDivider); +extern void EPIConfigSDRAMSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulRefresh); +extern void EPIConfigGPModeSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulFrameCount, + unsigned long ulMaxWait); +extern void EPIConfigHB8Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait); +extern void EPIConfigHB16Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait); +extern void EPIAddressMapSet(unsigned long ulBase, unsigned long ulMap); +extern void EPINonBlockingReadConfigure(unsigned long ulBase, + unsigned long ulChannel, + unsigned long ulDataSize, + unsigned long ulAddress); +extern void EPINonBlockingReadStart(unsigned long ulBase, + unsigned long ulChannel, + unsigned long ulCount); +extern void EPINonBlockingReadStop(unsigned long ulBase, + unsigned long ulChannel); +extern unsigned long EPINonBlockingReadCount(unsigned long ulBase, + unsigned long ulChannel); +extern unsigned long EPINonBlockingReadAvail(unsigned long ulBase); +extern unsigned long EPINonBlockingReadGet32(unsigned long ulBase, + unsigned long ulCount, + unsigned long *pulBuf); +extern unsigned long EPINonBlockingReadGet16(unsigned long ulBase, + unsigned long ulCount, + unsigned short *pusBuf); +extern unsigned long EPINonBlockingReadGet8(unsigned long ulBase, + unsigned long ulCount, + unsigned char *pucBuf); +extern void EPIFIFOConfig(unsigned long ulBase, unsigned long ulConfig); +extern unsigned long EPIWriteFIFOCountGet(unsigned long ulBase); +extern void EPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void EPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long EPIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern unsigned long EPIIntErrorStatus(unsigned long ulBase); +extern void EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags); +extern void EPIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void EPIIntUnregister(unsigned long ulBase); + +//***************************************************************************** +// +// Several EPI APIs and labels have been renamed, with the original definition +// name being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define EPI_MODE_NONE EPI_MODE_GENERAL +#define EPI_NONMODE_CLKPIN EPI_GPMODE_CLKPIN +#define EPI_NONMODE_CLKSTOP EPI_GPMODE_CLKGATE +#define EPI_NONMODE_CLKENA EPI_GPMODE_RDYEN +#define EPI_NONMODE_FRAMEPIN EPI_GPMODE_FRAMEPIN +#define EPI_NONMODE_FRAME50 EPI_GPMODE_FRAME50 +#define EPI_NONMODE_READWRITE EPI_GPMODE_READWRITE +#define EPI_NONMODE_WRITE2CYCLE EPI_GPMODE_WRITE2CYCLE +#define EPI_NONMODE_READ2CYCLE EPI_GPMODE_READ2CYCLE +#define EPI_NONMODE_ASIZE_NONE EPI_GPMODE_ASIZE_NONE +#define EPI_NONMODE_ASIZE_4 EPI_GPMODE_ASIZE_4 +#define EPI_NONMODE_ASIZE_12 EPI_GPMODE_ASIZE_12 +#define EPI_NONMODE_ASIZE_20 EPI_GPMODE_ASIZE_20 +#define EPI_NONMODE_DSIZE_8 EPI_GPMODE_DSIZE_8 +#define EPI_NONMODE_DSIZE_16 EPI_GPMODE_DSIZE_16 +#define EPI_NONMODE_DSIZE_24 EPI_GPMODE_DSIZE_24 +#define EPI_NONMODE_DSIZE_32 EPI_GPMODE_DSIZE_32 +#define EPI_NONMODE_WORD_ACCESS EPI_GPMODE_WORD_ACCESS + +#define EPINonBlockingWriteCount(a) EPIWriteFIFOCountGet(a) +#define EPIConfigNoModeSet(a, b, c, d) EPIConfigGPModeSet((a), (b), (c), (d)) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __EPI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.c new file mode 100644 index 00000000..29ade99f --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.c @@ -0,0 +1,1327 @@ +//***************************************************************************** +// +// ethernet.c - Driver for the Integrated Ethernet Controller +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup ethernet_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ethernet.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/ethernet.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Initializes the Ethernet controller for operation. +//! +//! \param ulBase is the base address of the controller. +//! \param ulEthClk is the rate of the clock supplied to the Ethernet module. +//! +//! This function will prepare the Ethernet controller for first time use in +//! a given hardware/software configuration. This function should be called +//! before any other Ethernet API functions are called. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard-coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original EthernetInit() API and performs the +//! same actions. A macro is provided in ethernet.h to map the +//! original API to this API. +//! +//! \note If the device configuration is changed (for example, the system clock +//! is reprogrammed to a different speed), then the Ethernet controller must be +//! disabled by calling the EthernetDisable() function and the controller must +//! be reinitialized by calling the EthernetInitExpClk() function again. After +//! the controller has been reinitialized, the controller should be +//! reconfigured using the appropriate Ethernet API calls. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetInitExpClk(unsigned long ulBase, unsigned long ulEthClk) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Set the Management Clock Divider register for access to the PHY + // register set (via EthernetPHYRead/Write). + // + // The MDC clock divided down from the system clock using the following + // formula. A maximum of 2.5MHz is allowed for F(mdc). + // + // F(mdc) = F(sys) / (2 * (div + 1)) + // div = (F(sys) / (2 * F(mdc))) - 1 + // div = (F(sys) / 2 / F(mdc)) - 1 + // + // Note: Because we should round up, to ensure we don't violate the + // maximum clock speed, we can simplify this as follows: + // + // div = F(sys) / 2 / F(mdc) + // + // For example, given a system clock of 6.0MHz, and a div value of 1, + // the mdc clock would be programmed as 1.5 MHz. + // + ulDiv = (ulEthClk / 2) / 2500000; + HWREG(ulBase + MAC_O_MDV) = (ulDiv & MAC_MDV_DIV_M); +} + +//***************************************************************************** +// +//! Sets the configuration of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param ulConfig is the configuration for the controller. +//! +//! After the EthernetInitExpClk() function has been called, this API function +//! can be used to configure the various features of the Ethernet controller. +//! +//! The Ethernet controller provides three control registers that are used +//! to configure the controller's operation. The transmit control register +//! provides settings to enable full duplex operation, to auto-generate the +//! frame check sequence, and to pad the transmit packets to the minimum +//! length as required by the IEEE standard. The receive control register +//! provides settings to enable reception of packets with bad frame check +//! sequence values and to enable multi-cast or promiscuous modes. The +//! timestamp control register provides settings that enable support logic in +//! the controller that allow the use of the General Purpose Timer 3 to capture +//! timestamps for the transmitted and received packets. +//! +//! The \e ulConfig parameter is the logical OR of the following values: +//! +//! - \b ETH_CFG_TS_TSEN - Enable TX and RX interrupt status as CCP timer +//! inputs +//! - \b ETH_CFG_RX_BADCRCDIS - Disable reception of packets with a bad CRC +//! - \b ETH_CFG_RX_PRMSEN - Enable promiscuous mode reception (all packets) +//! - \b ETH_CFG_RX_AMULEN - Enable reception of multicast packets +//! - \b ETH_CFG_TX_DPLXEN - Enable full duplex transmit mode +//! - \b ETH_CFG_TX_CRCEN - Enable transmit with auto CRC generation +//! - \b ETH_CFG_TX_PADEN - Enable padding of transmit data to minimum size +//! +//! These bit-mapped values are programmed into the transmit, receive, and/or +//! timestamp control register. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT((ulConfig & ~(ETH_CFG_TX_DPLXEN | ETH_CFG_TX_CRCEN | + ETH_CFG_TX_PADEN | ETH_CFG_RX_BADCRCDIS | + ETH_CFG_RX_PRMSEN | ETH_CFG_RX_AMULEN | + ETH_CFG_TS_TSEN)) == 0); + + // + // Setup the Transmit Control Register. + // + ulTemp = HWREG(ulBase + MAC_O_TCTL); + ulTemp &= ~(MAC_TCTL_DUPLEX | MAC_TCTL_CRC | MAC_TCTL_PADEN); + ulTemp |= ulConfig & 0x0FF; + HWREG(ulBase + MAC_O_TCTL) = ulTemp; + + // + // Setup the Receive Control Register. + // + ulTemp = HWREG(ulBase + MAC_O_RCTL); + ulTemp &= ~(MAC_RCTL_BADCRC | MAC_RCTL_PRMS | MAC_RCTL_AMUL); + ulTemp |= (ulConfig >> 8) & 0x0FF; + HWREG(ulBase + MAC_O_RCTL) = ulTemp; + + // + // Setup the Time Stamp Configuration register. + // + ulTemp = HWREG(ulBase + MAC_O_TS); + ulTemp &= ~(MAC_TS_TSEN); + ulTemp |= (ulConfig >> 16) & 0x0FF; + HWREG(ulBase + MAC_O_TS) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the current configuration of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will query the control registers of the Ethernet controller +//! and return a bit-mapped configuration value. +//! +//! \sa The description of the EthernetConfigSet() function provides detailed +//! information for the bit-mapped configuration values that will be returned. +//! +//! \return Returns the bit-mapped Ethernet controller configuration value. +// +//***************************************************************************** +unsigned long +EthernetConfigGet(unsigned long ulBase) +{ + unsigned long ulConfig; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Read and return the Ethernet controller configuration parameters, + // properly shifted into the appropriate bit field positions. + // + ulConfig = HWREG(ulBase + MAC_O_TS) << 16; + ulConfig |= (HWREG(ulBase + MAC_O_RCTL) & ~(MAC_RCTL_RXEN)) << 8; + ulConfig |= HWREG(ulBase + MAC_O_TCTL) & ~(MAC_TCTL_TXEN); + return(ulConfig); +} + +//***************************************************************************** +// +//! Sets the MAC address of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucMACAddr is the pointer to the array of MAC-48 address octets. +//! +//! This function will program the IEEE-defined MAC-48 address specified in +//! \e pucMACAddr into the Ethernet controller. This address is used by the +//! Ethernet controller for hardware-level filtering of incoming Ethernet +//! packets (when promiscuous mode is not enabled). +//! +//! The MAC-48 address is defined as 6 octets, illustrated by the following +//! example address. The numbers are shown in hexadecimal format. +//! +//! AC-DE-48-00-00-80 +//! +//! In this representation, the first three octets (AC-DE-48) are the +//! Organizationally Unique Identifier (OUI). This is a number assigned by +//! the IEEE to an organization that requests a block of MAC addresses. The +//! last three octets (00-00-80) are a 24-bit number managed by the OUI owner +//! to uniquely identify a piece of hardware within that organization that is +//! to be connected to the Ethernet. +//! +//! In this representation, the octets are transmitted from left to right, +//! with the ``AC'' octet being transmitted first and the ``80'' octet being +//! transmitted last. Within an octet, the bits are transmitted LSB to MSB. +//! For this address, the first bit to be transmitted would be ``0'', the LSB +//! of ``AC'', and the last bit to be transmitted would be ``1'', the MSB of +//! ``80''. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetMACAddrSet(unsigned long ulBase, unsigned char *pucMACAddr) +{ + unsigned long ulTemp; + unsigned char *pucTemp = (unsigned char *)&ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucMACAddr != 0); + + // + // Program the MAC Address into the device. The first four bytes of the + // MAC Address are placed into the IA0 register. The remaining two bytes + // of the MAC address are placed into the IA1 register. + // + pucTemp[0] = pucMACAddr[0]; + pucTemp[1] = pucMACAddr[1]; + pucTemp[2] = pucMACAddr[2]; + pucTemp[3] = pucMACAddr[3]; + HWREG(ulBase + MAC_O_IA0) = ulTemp; + ulTemp = 0; + pucTemp[0] = pucMACAddr[4]; + pucTemp[1] = pucMACAddr[5]; + HWREG(ulBase + MAC_O_IA1) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the MAC address of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucMACAddr is the pointer to the location in which to store the +//! array of MAC-48 address octets. +//! +//! This function will read the currently programmed MAC address into the +//! \e pucMACAddr buffer. +//! +//! \sa Refer to EthernetMACAddrSet() API description for more details about +//! the MAC address format. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetMACAddrGet(unsigned long ulBase, unsigned char *pucMACAddr) +{ + unsigned long ulTemp; + unsigned char *pucTemp = (unsigned char *)&ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucMACAddr != 0); + + // + // Read the MAC address from the device. The first four bytes of the + // MAC address are read from the IA0 register. The remaining two bytes + // of the MAC addres + // + ulTemp = HWREG(ulBase + MAC_O_IA0); + pucMACAddr[0] = pucTemp[0]; + pucMACAddr[1] = pucTemp[1]; + pucMACAddr[2] = pucTemp[2]; + pucMACAddr[3] = pucTemp[3]; + ulTemp = HWREG(ulBase + MAC_O_IA1); + pucMACAddr[4] = pucTemp[0]; + pucMACAddr[5] = pucTemp[1]; +} + +//***************************************************************************** +// +//! Enables the Ethernet controller for normal operation. +//! +//! \param ulBase is the base address of the controller. +//! +//! Once the Ethernet controller has been configured using the +//! EthernetConfigSet() function and the MAC address has been programmed using +//! the EthernetMACAddrSet() function, this API function can be called to +//! enable the controller for normal operation. +//! +//! This function will enable the controller's transmitter and receiver, and +//! will reset the receive FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Reset the receive FIFO. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; + + // + // Enable the Ethernet receiver. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RXEN; + + // + // Enable Ethernet transmitter. + // + HWREG(ulBase + MAC_O_TCTL) |= MAC_TCTL_TXEN; + + // + // Reset the receive FIFO again, after the receiver has been enabled. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; +} + +//***************************************************************************** +// +//! Disables the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! When terminating operations on the Ethernet interface, this function should +//! be called. This function will disable the transmitter and receiver, and +//! will clear out the receive FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Reset the receive FIFO. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; + + // + // Disable the Ethernet transmitter. + // + HWREG(ulBase + MAC_O_TCTL) &= ~(MAC_TCTL_TXEN); + + // + // Disable the Ethernet receiver. + // + HWREG(ulBase + MAC_O_RCTL) &= ~(MAC_RCTL_RXEN); + + // + // Reset the receive FIFO again, after the receiver has been disabled. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; +} + +//***************************************************************************** +// +//! Check for packet available from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! The Ethernet controller provides a register that contains the number of +//! packets available in the receive FIFO. When the last bytes of a packet are +//! successfully received (that is, the frame check sequence bytes), the packet +//! count is incremented. Once the packet has been fully read (including the +//! frame check sequence bytes) from the FIFO, the packet count will be +//! decremented. +//! +//! \return Returns \b true if there are one or more packets available in the +//! receive FIFO, including the current packet being read, and \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +EthernetPacketAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Return the availability of packets. + // + return((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) ? true : false); +} + +//***************************************************************************** +// +//! Checks for packet space available in the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! The Ethernet controller's transmit FIFO is designed to support a single +//! packet at a time. After the packet has been written into the FIFO, the +//! transmit request bit must be set to enable the transmission of the packet. +//! Only after the packet has been transmitted can a new packet be written +//! into the FIFO. This function will simply check to see if a packet is +//! in progress. If so, there is no space available in the transmit FIFO. +//! +//! \return Returns \b true if a space is available in the transmit FIFO, and +//! \b false otherwise. +// +//***************************************************************************** +tBoolean +EthernetSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Return the availability of space. + // + return((HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) ? false : true); +} + +//***************************************************************************** +// +//! \internal +//! +//! Internal function for reading a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! Based on the following table of how the receive frame is stored in the +//! receive FIFO, this function will extract a packet from the FIFO and store +//! it in the packet buffer that was passed in. +//! +//! Format of the data in the RX FIFO is as follows: +//! +//! \verbatim +//! +---------+----------+----------+----------+----------+ +//! | | 31:24 | 23:16 | 15:8 | 7:0 | +//! +---------+----------+----------+----------+----------+ +//! | Word 0 | DA 2 | DA 1 | FL MSB | FL LSB | +//! +---------+----------+----------+----------+----------+ +//! | Word 1 | DA 6 | DA 5 | DA 4 | DA 3 | +//! +---------+----------+----------+----------+----------+ +//! | Word 2 | SA 4 | SA 3 | SA 2 | SA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 3 | FT LSB | FT MSB | SA 6 | SA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 4 | DATA 4 | DATA 3 | DATA 2 | DATA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 5 | DATA 8 | DATA 7 | DATA 6 | DATA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 6 | DATA 12 | DATA 11 | DATA 10 | DATA 9 | +//! +---------+----------+----------+----------+----------+ +//! | ... | | | | | +//! +---------+----------+----------+----------+----------+ +//! | Word X | DATA n | DATA n-1 | DATA n-2 | DATA n-3 | +//! +---------+----------+----------+----------+----------+ +//! | Word Y | FCS 4 | FCS 3 | FCS 2 | FCS 1 | +//! +---------+----------+----------+----------+----------+ +//! \endverbatim +//! +//! Where FL is Frame Length, (FL + DA + SA + FT + DATA + FCS) Bytes. +//! Where DA is Destination (MAC) Address. +//! Where SA is Source (MAC) Address. +//! Where FT is Frame Type (or Frame Length for Ethernet). +//! Where DATA is Payload Data for the Ethernet Frame. +//! Where FCS is the Frame Check Sequence. +//! +//! \return Returns the negated packet length \b -n if the packet is too large +//! for \e pucBuf, and returns the packet length \b n otherwise. +// +//***************************************************************************** +static long +EthernetPacketGetInternal(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + unsigned long ulTemp; + long lFrameLen, lTempLen; + long i = 0; + + // + // Read WORD 0 (see format above) from the FIFO, set the receive + // Frame Length and store the first two bytes of the destination + // address in the receive buffer. + // + ulTemp = HWREG(ulBase + MAC_O_DATA); + lFrameLen = (long)(ulTemp & 0xFFFF); + pucBuf[i++] = (unsigned char) ((ulTemp >> 16) & 0xff); + pucBuf[i++] = (unsigned char) ((ulTemp >> 24) & 0xff); + + // + // Read all but the last WORD into the receive buffer. + // + lTempLen = (lBufLen < (lFrameLen - 6)) ? lBufLen : (lFrameLen - 6); + while(i <= (lTempLen - 4)) + { + *(unsigned long *)&pucBuf[i] = HWREG(ulBase + MAC_O_DATA); + i += 4; + } + + // + // Read the last 1, 2, or 3 BYTES into the buffer + // + if(i < lTempLen) + { + ulTemp = HWREG(ulBase + MAC_O_DATA); + if(i == lTempLen - 3) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + pucBuf[i++] = ((ulTemp >> 8) & 0xff); + pucBuf[i++] = ((ulTemp >> 16) & 0xff); + i += 1; + } + else if(i == lTempLen - 2) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + pucBuf[i++] = ((ulTemp >> 8) & 0xff); + i += 2; + } + else if(i == lTempLen - 1) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + i += 3; + } + } + + // + // Read any remaining WORDS (that did not fit into the buffer). + // + while(i < (lFrameLen - 2)) + { + ulTemp = HWREG(ulBase + MAC_O_DATA); + i += 4; + } + + // + // If frame was larger than the buffer, return the "negative" frame length + // + lFrameLen -= 6; + if(lFrameLen > lBufLen) + { + return(-lFrameLen); + } + + // + // Return the Frame Length + // + return(lFrameLen); +} + +//***************************************************************************** +// +//! Receives a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! This function reads a packet from the receive FIFO of the controller and +//! places it into \e pucBuf. If no packet is available the function will +//! return immediately. Otherwise, the function will read the entire packet +//! from the receive FIFO. If there are more bytes in the packet than will fit +//! into \e pucBuf (as specified by \e lBufLen), the function will return the +//! negated length of the packet and the buffer will contain \e lBufLen bytes +//! of the packet. Otherwise, the function will return the length of the +//! packet that was read and \e pucBuf will contain the entire packet +//! (excluding the frame check sequence bytes). +//! +//! This function replaces the original EthernetPacketNonBlockingGet() API and +//! performs the same actions. A macro is provided in ethernet.h to +//! map the original API to this API. +//! +//! \note This function will return immediately if no packet is available. +//! +//! \return Returns \b 0 if no packet is available, the negated packet length +//! \b -n if the packet is too large for \e pucBuf, and the packet length \b n +//! otherwise. +// +//***************************************************************************** +long +EthernetPacketGetNonBlocking(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Check to see if any packets are available. + // + if((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) == 0) + { + return(0); + } + + // + // Read the packet, and return. + // + return(EthernetPacketGetInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Waits for a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! This function reads a packet from the receive FIFO of the controller and +//! places it into \e pucBuf. The function will wait until a packet is +//! available in the FIFO. Then the function will read the entire packet +//! from the receive FIFO. If there are more bytes in the packet than will +//! fit into \e pucBuf (as specified by \e lBufLen), the function will return +//! the negated length of the packet and the buffer will contain \e lBufLen +//! bytes of the packet. Otherwise, the function will return the length of +//! the packet that was read and \e pucBuf will contain the entire packet +//! (excluding the frame check sequence bytes). +//! +//! \note This function is blocking and will not return until a packet arrives. +//! +//! \return Returns the negated packet length \b -n if the packet is too large +//! for \e pucBuf, and returns the packet length \b n otherwise. +// +//***************************************************************************** +long +EthernetPacketGet(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Wait for a packet to become available + // + while((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) == 0) + { + } + + // + // Read the packet + // + return(EthernetPacketGetInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! \internal +//! +//! Internal function for sending a packet to the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! Puts a packet into the transmit FIFO of the controller. +//! +//! Format of the data in the TX FIFO is as follows: +//! +//! \verbatim +//! +---------+----------+----------+----------+----------+ +//! | | 31:24 | 23:16 | 15:8 | 7:0 | +//! +---------+----------+----------+----------+----------+ +//! | Word 0 | DA 2 | DA 1 | PL MSB | PL LSB | +//! +---------+----------+----------+----------+----------+ +//! | Word 1 | DA 6 | DA 5 | DA 4 | DA 3 | +//! +---------+----------+----------+----------+----------+ +//! | Word 2 | SA 4 | SA 3 | SA 2 | SA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 3 | FT LSB | FT MSB | SA 6 | SA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 4 | DATA 4 | DATA 3 | DATA 2 | DATA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 5 | DATA 8 | DATA 7 | DATA 6 | DATA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 6 | DATA 12 | DATA 11 | DATA 10 | DATA 9 | +//! +---------+----------+----------+----------+----------+ +//! | ... | | | | | +//! +---------+----------+----------+----------+----------+ +//! | Word X | DATA n | DATA n-1 | DATA n-2 | DATA n-3 | +//! +---------+----------+----------+----------+----------+ +//! \endverbatim +//! +//! Where PL is Payload Length, (DATA) only +//! Where DA is Destination (MAC) Address +//! Where SA is Source (MAC) Address +//! Where FT is Frame Type (or Frame Length for Ethernet) +//! Where DATA is Payload Data for the Ethernet Frame +//! +//! \return Returns the negated packet length \b -lBufLen if the packet is too +//! large for FIFO, and the packet length \b lBufLen otherwise. +// +//***************************************************************************** +static long +EthernetPacketPutInternal(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + unsigned long ulTemp; + long i = 0; + + // + // If the packet is too large, return the negative packet length as + // an error code. + // + if(lBufLen > (2048 - 2)) + { + return(-lBufLen); + } + + // + // Build and write WORD 0 (see format above) to the transmit FIFO. + // + ulTemp = (unsigned long)(lBufLen - 14); + ulTemp |= (pucBuf[i++] << 16); + ulTemp |= (pucBuf[i++] << 24); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + + // + // Write each subsequent WORD n to the transmit FIFO, except for the last + // WORD (if the word does not contain 4 bytes). + // + while(i <= (lBufLen - 4)) + { + HWREG(ulBase + MAC_O_DATA) = *(unsigned long *)&pucBuf[i]; + i += 4; + } + + // + // Build the last word of the remaining 1, 2, or 3 bytes, and store + // the WORD into the transmit FIFO. + // + if(i != lBufLen) + { + if(i == (lBufLen - 3)) + { + ulTemp = (pucBuf[i++] << 0); + ulTemp |= (pucBuf[i++] << 8); + ulTemp |= (pucBuf[i++] << 16); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + else if(i == (lBufLen - 2)) + { + ulTemp = (pucBuf[i++] << 0); + ulTemp |= (pucBuf[i++] << 8); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + else if(i == (lBufLen - 1)) + { + ulTemp = (pucBuf[i++] << 0); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + } + + // + // Activate the transmitter + // + HWREG(ulBase + MAC_O_TR) = MAC_TR_NEWTX; + + // + // Return the Buffer Length transmitted. + // + return(lBufLen); +} + +//***************************************************************************** +// +//! Sends a packet to the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! This function writes \e lBufLen bytes of the packet contained in \e pucBuf +//! into the transmit FIFO of the controller and then activates the +//! transmitter for this packet. If no space is available in the FIFO, the +//! function will return immediately. If space is available, the +//! function will return once \e lBufLen bytes of the packet have been placed +//! into the FIFO and the transmitter has been started. The function will not +//! wait for the transmission to complete. The function will return the +//! negated \e lBufLen if the length is larger than the space available in +//! the transmit FIFO. +//! +//! This function replaces the original EthernetPacketNonBlockingPut() API and +//! performs the same actions. A macro is provided in ethernet.h to +//! map the original API to this API. +//! +//! \note This function does not block and will return immediately if no space +//! is available for the transmit packet. +//! +//! \return Returns \b 0 if no space is available in the transmit FIFO, the +//! negated packet length \b -lBufLen if the packet is too large for FIFO, and +//! the packet length \b lBufLen otherwise. +// +//***************************************************************************** +long +EthernetPacketPutNonBlocking(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Check if the transmit FIFO is in use and return the appropriate code. + // + if(HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) + { + return(0); + } + + // + // Send the packet and return. + // + return(EthernetPacketPutInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Waits to send a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! This function writes \e lBufLen bytes of the packet contained in \e pucBuf +//! into the transmit FIFO of the controller and then activates the transmitter +//! for this packet. This function will wait until the transmit FIFO is empty. +//! Once space is available, the function will return once \e lBufLen bytes of +//! the packet have been placed into the FIFO and the transmitter has been +//! started. The function will not wait for the transmission to complete. The +//! function will return the negated \e lBufLen if the length is larger than +//! the space available in the transmit FIFO. +//! +//! \note This function blocks and will wait until space is available for the +//! transmit packet before returning. +//! +//! \return Returns the negated packet length \b -lBufLen if the packet is too +//! large for FIFO, and the packet length \b lBufLen otherwise. +// +//***************************************************************************** +long +EthernetPacketPut(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Wait for current packet (if any) to complete. + // + while(HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) + { + } + + // + // Send the packet and return. + // + return(EthernetPacketPutInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for an Ethernet interrupt. +//! +//! \param ulBase is the base address of the controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled Ethernet interrupts occur. +//! +//! This function sets the handler to be called when the Ethernet interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific Ethernet interrupts must be enabled via EthernetIntEnable(). It +//! is the interrupt handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pfnHandler != 0); + + // + // Register the interrupt handler. + // + IntRegister(INT_ETH, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(INT_ETH); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for an Ethernet interrupt. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the interrupt handler. This will disable the +//! global interrupt in the interrupt controller so that the interrupt handler +//! no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Disable the interrupt. + // + IntDisable(INT_ETH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_ETH); +} + +//***************************************************************************** +// +//! Enables individual Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated Ethernet interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b ETH_INT_PHY - An interrupt from the PHY has occurred. The integrated +//! PHY supports a number of interrupt conditions. The PHY register, PHY_MR17, +//! must be read to determine which PHY interrupt has occurred. This register +//! can be read using the EthernetPHYRead() API function. +//! - \b ETH_INT_MDIO - This interrupt indicates that a transaction on the +//! management interface has completed successfully. +//! - \b ETH_INT_RXER - This interrupt indicates that an error has occurred +//! during reception of a frame. This error can indicate a length mismatch, a +//! CRC failure, or an error indication from the PHY. +//! - \b ETH_INT_RXOF - This interrupt indicates that a frame has been received +//! that exceeds the available space in the RX FIFO. +//! - \b ETH_INT_TX - This interrupt indicates that the packet stored in the TX +//! FIFO has been successfully transmitted. +//! - \b ETH_INT_TXER - This interrupt indicates that an error has occurred +//! during the transmission of a packet. This error can be either a retry +//! failure during the back-off process, or an invalid length stored in the TX +//! FIFO. +//! - \b ETH_INT_RX - This interrupt indicates that one (or more) packets are +//! available in the RX FIFO for processing. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + MAC_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated Ethernet interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to EthernetIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + MAC_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the current Ethernet interrupt status. +//! +//! \param ulBase is the base address of the controller. +//! \param bMasked is false if the raw interrupt status is required and true +//! if the masked interrupt status is required. +//! +//! This returns the interrupt status for the Ethernet controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in EthernetIntEnable(). +// +//***************************************************************************** +unsigned long +EthernetIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Read the unmasked status. + // + ulStatus = HWREG(ulBase + MAC_O_RIS); + + // + // If masked status is requested, mask it off. + // + if(bMasked) + { + ulStatus &= HWREG(ulBase + MAC_O_IM); + } + + // + // Return the interrupt status value. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified Ethernet interrupt sources are cleared so that they no longer +//! assert. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to EthernetIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + MAC_O_IACK) = ulIntFlags; +} + +//***************************************************************************** +// +//! Writes to the PHY register. +//! +//! \param ulBase is the base address of the controller. +//! \param ucRegAddr is the address of the PHY register to be accessed. +//! \param ulData is the data to be written to the PHY register. +//! +//! This function will write the \e ulData to the PHY register specified by +//! \e ucRegAddr. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYWrite(unsigned long ulBase, unsigned char ucRegAddr, + unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Wait for any pending transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Program the DATA to be written. + // + HWREG(ulBase + MAC_O_MTXD) = ulData & MAC_MTXD_MDTX_M; + + // + // Program the PHY register address and initiate the transaction. + // + HWREG(ulBase + MAC_O_MCTL) = (((ucRegAddr << 3) & MAC_MCTL_REGADR_M) | + MAC_MCTL_WRITE | MAC_MCTL_START); + + // + // Wait for the write transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } +} + +//***************************************************************************** +// +//! Reads from a PHY register. +//! +//! \param ulBase is the base address of the controller. +//! \param ucRegAddr is the address of the PHY register to be accessed. +//! +//! This function will return the contents of the PHY register specified by +//! \e ucRegAddr. +//! +//! \return Returns the 16-bit value read from the PHY. +// +//***************************************************************************** +unsigned long +EthernetPHYRead(unsigned long ulBase, unsigned char ucRegAddr) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Wait for any pending transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Program the PHY register address and initiate the transaction. + // + HWREG(ulBase + MAC_O_MCTL) = (((ucRegAddr << 3) & MAC_MCTL_REGADR_M) | + MAC_MCTL_START); + + // + // Wait for the transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Return the PHY data that was read. + // + return(HWREG(ulBase + MAC_O_MRXD) & MAC_MRXD_MDRX_M); +} + +//***************************************************************************** +// +//! Powers off the Ethernet PHY. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will power off the Ethernet PHY, reducing the current +//! consuption of the device. While in the powered off state, the Ethernet +//! controller will be unable to connect to the Ethernet. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYPowerOff(unsigned long ulBase) +{ + // + // Set the PWRDN bit and clear the ANEGEN bit in the PHY, putting it into + // its low power mode. + // + EthernetPHYWrite(ulBase, PHY_MR0, + (EthernetPHYRead(ulBase, PHY_MR0) & ~PHY_MR0_ANEGEN) | + PHY_MR0_PWRDN); +} + +//***************************************************************************** +// +//! Powers on the Ethernet PHY. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will power on the Ethernet PHY, enabling it return to normal +//! operation. By default, the PHY is powered on, so this function only needs +//! to be called if EthernetPHYPowerOff() has previously been called. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYPowerOn(unsigned long ulBase) +{ + // + // Clear the PWRDN bit and set the ANEGEN bit in the PHY, putting it into + // normal operating mode. + // + EthernetPHYWrite(ulBase, PHY_MR0, + (EthernetPHYRead(ulBase, PHY_MR0) & ~PHY_MR0_PWRDN) | + PHY_MR0_ANEGEN); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.h new file mode 100644 index 00000000..860a1365 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ethernet.h @@ -0,0 +1,171 @@ +//***************************************************************************** +// +// ethernet.h - Defines and Macros for the ethernet module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ETHERNET_H__ +#define __ETHERNET_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to EthernetConfigSet as the ulConfig value, and +// returned from EthernetConfigGet. +// +//***************************************************************************** +#define ETH_CFG_TS_TSEN 0x010000 // Enable Timestamp (CCP) +#define ETH_CFG_RX_BADCRCDIS 0x000800 // Disable RX BAD CRC Packets +#define ETH_CFG_RX_PRMSEN 0x000400 // Enable RX Promiscuous +#define ETH_CFG_RX_AMULEN 0x000200 // Enable RX Multicast +#define ETH_CFG_TX_DPLXEN 0x000010 // Enable TX Duplex Mode +#define ETH_CFG_TX_CRCEN 0x000004 // Enable TX CRC Generation +#define ETH_CFG_TX_PADEN 0x000002 // Enable TX Padding + +//***************************************************************************** +// +// Values that can be passed to EthernetIntEnable, EthernetIntDisable, and +// EthernetIntClear as the ulIntFlags parameter, and returned from +// EthernetIntStatus. +// +//***************************************************************************** +#define ETH_INT_PHY 0x040 // PHY Event/Interrupt +#define ETH_INT_MDIO 0x020 // Management Transaction +#define ETH_INT_RXER 0x010 // RX Error +#define ETH_INT_RXOF 0x008 // RX FIFO Overrun +#define ETH_INT_TX 0x004 // TX Complete +#define ETH_INT_TXER 0x002 // TX Error +#define ETH_INT_RX 0x001 // RX Complete + +//***************************************************************************** +// +// Helper Macros for Ethernet Processing +// +//***************************************************************************** +// +// htonl/ntohl - big endian/little endian byte swapping macros for +// 32-bit (long) values +// +//***************************************************************************** +#ifndef htonl + #define htonl(a) \ + ((((a) >> 24) & 0x000000ff) | \ + (((a) >> 8) & 0x0000ff00) | \ + (((a) << 8) & 0x00ff0000) | \ + (((a) << 24) & 0xff000000)) +#endif + +#ifndef ntohl + #define ntohl(a) htonl((a)) +#endif + +//***************************************************************************** +// +// htons/ntohs - big endian/little endian byte swapping macros for +// 16-bit (short) values +// +//***************************************************************************** +#ifndef htons + #define htons(a) \ + ((((a) >> 8) & 0x00ff) | \ + (((a) << 8) & 0xff00)) +#endif + +#ifndef ntohs + #define ntohs(a) htons((a)) +#endif + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void EthernetInitExpClk(unsigned long ulBase, unsigned long ulEthClk); +extern void EthernetConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern unsigned long EthernetConfigGet(unsigned long ulBase); +extern void EthernetMACAddrSet(unsigned long ulBase, + unsigned char *pucMACAddr); +extern void EthernetMACAddrGet(unsigned long ulBase, + unsigned char *pucMACAddr); +extern void EthernetEnable(unsigned long ulBase); +extern void EthernetDisable(unsigned long ulBase); +extern tBoolean EthernetPacketAvail(unsigned long ulBase); +extern tBoolean EthernetSpaceAvail(unsigned long ulBase); +extern long EthernetPacketGetNonBlocking(unsigned long ulBase, + unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketGet(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketPutNonBlocking(unsigned long ulBase, + unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketPut(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen); +extern void EthernetIntRegister(unsigned long ulBase, + void (*pfnHandler)(void)); +extern void EthernetIntUnregister(unsigned long ulBase); +extern void EthernetIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void EthernetIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long EthernetIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void EthernetIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void EthernetPHYWrite(unsigned long ulBase, unsigned char ucRegAddr, + unsigned long ulData); +extern unsigned long EthernetPHYRead(unsigned long ulBase, + unsigned char ucRegAddr); +extern void EthernetPHYPowerOff(unsigned long ulBase); +extern void EthernetPHYPowerOn(unsigned long ulBase); + +//***************************************************************************** +// +// Several Ethernet APIs have been renamed, with the original function name +// being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define EthernetInit(a) \ + EthernetInitExpClk(a, SysCtlClockGet()) +#define EthernetPacketNonBlockingGet(a, b, c) \ + EthernetPacketGetNonBlocking(a, b, c) +#define EthernetPacketNonBlockingPut(a, b, c) \ + EthernetPacketPutNonBlocking(a, b, c) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __ETHERNET_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.c new file mode 100644 index 00000000..09585467 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.c @@ -0,0 +1,912 @@ +//***************************************************************************** +// +// flash.c - Driver for programming the on-chip flash. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup flash_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_flash.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/flash.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Program Enable (FMPPE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPPERegs[] = +{ + FLASH_FMPPE, + FLASH_FMPPE1, + FLASH_FMPPE2, + FLASH_FMPPE3 +}; + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Read Enable (FMPRE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPRERegs[] = +{ + FLASH_FMPRE, + FLASH_FMPRE1, + FLASH_FMPRE2, + FLASH_FMPRE3 +}; + +//***************************************************************************** +// +//! Gets the number of processor clocks per micro-second. +//! +//! This function returns the number of clocks per micro-second, as presently +//! known by the flash controller. +//! +//! \return Returns the number of processor clocks per micro-second. +// +//***************************************************************************** +unsigned long +FlashUsecGet(void) +{ + // + // Return the number of clocks per micro-second. + // + return(HWREG(FLASH_USECRL) + 1); +} + +//***************************************************************************** +// +//! Sets the number of processor clocks per micro-second. +//! +//! \param ulClocks is the number of processor clocks per micro-second. +//! +//! This function is used to tell the flash controller the number of processor +//! clocks per micro-second. This value must be programmed correctly or the +//! flash most likely will not program correctly; it has no affect on reading +//! flash. +//! +//! \return None. +// +//***************************************************************************** +void +FlashUsecSet(unsigned long ulClocks) +{ + // + // Set the number of clocks per micro-second. + // + HWREG(FLASH_USECRL) = ulClocks - 1; +} + +//***************************************************************************** +// +//! Erases a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be erased. +//! +//! This function will erase a 1 kB block of the on-chip flash. After erasing, +//! the block will be filled with 0xFF bytes. Read-only and execute-only +//! blocks cannot be erased. +//! +//! This function will not return until the block has been erased. +//! +//! \return Returns 0 on success, or -1 if an invalid block address was +//! specified or the block is write-protected. +// +//***************************************************************************** +long +FlashErase(unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & (FLASH_ERASE_SIZE - 1))); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // Erase the block. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_ERASE; + + // + // Wait until the block has been erased. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_ERASE) + { + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Programs flash. +//! +//! \param pulData is a pointer to the data to be programmed. +//! \param ulAddress is the starting address in flash to be programmed. Must +//! be a multiple of four. +//! \param ulCount is the number of bytes to be programmed. Must be a multiple +//! of four. +//! +//! This function will program a sequence of words into the on-chip flash. +//! Programming each location consists of the result of an AND operation +//! of the new data and the existing data; in other words bits that contain +//! 1 can remain 1 or be changed to 0, but bits that are 0 cannot be changed +//! to 1. Therefore, a word can be programmed multiple times as long as these +//! rules are followed; if a program operation attempts to change a 0 bit to +//! a 1 bit, that bit will not have its value changed. +//! +//! Since the flash is programmed one word at a time, the starting address and +//! byte count must both be multiples of four. It is up to the caller to +//! verify the programmed contents, if such verification is required. +//! +//! This function will not return until the data has been programmed. +//! +//! \return Returns 0 on success, or -1 if a programming error is encountered. +// +//***************************************************************************** +long +FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & 3)); + ASSERT(!(ulCount & 3)); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // See if this device has a write buffer. + // + if(HWREG(SYSCTL_NVMSTAT) & SYSCTL_NVMSTAT_FWB) + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Set the address of this block of words. + // + HWREG(FLASH_FMA) = ulAddress & ~(0x7f); + + // + // Loop over the words in this 32-word block. + // + while(((ulAddress & 0x7c) || (HWREG(FLASH_FWBVAL) == 0)) && + (ulCount != 0)) + { + // + // Write this word into the write buffer. + // + HWREG(FLASH_FWBN + (ulAddress & 0x7c)) = *pulData++; + ulAddress += 4; + ulCount -= 4; + } + + // + // Program the contents of the write buffer into flash. + // + HWREG(FLASH_FMC2) = FLASH_FMC2_WRKEY | FLASH_FMC2_WRBUF; + + // + // Wait until the write buffer has been programmed. + // + while(HWREG(FLASH_FMC2) & FLASH_FMC2_WRBUF) + { + } + } + } + else + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Program the next word. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMD) = *pulData; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_WRITE; + + // + // Wait until the word has been programmed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_WRITE) + { + } + + // + // Increment to the next word. + // + pulData++; + ulAddress += 4; + ulCount -= 4; + } + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be queried. +//! +//! This function will get the current protection for the specified 2 kB block +//! of flash. Each block can be read/write, read-only, or execute-only. +//! Read/write blocks can be read, executed, erased, and programmed. Read-only +//! blocks can be read and executed. Execute-only blocks can only be executed; +//! processor and debugger data reads are not allowed. +//! +//! \return Returns the protection setting for this block. See +//! FlashProtectSet() for possible values. +// +//***************************************************************************** +tFlashProtection +FlashProtectGet(unsigned long ulAddress) +{ + unsigned long ulFMPRE, ulFMPPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + + // + // Calculate the Flash Bank from Base Address, and mask off the Bank + // from ulAddress for subsequent reference. + // + ulBank = (((ulAddress / FLASH_PROTECT_SIZE) / 32) % 4); + ulAddress &= ((FLASH_PROTECT_SIZE * 32) - 1); + + // + // Read the appropriate flash protection registers for the specified + // flash bank. + // + ulFMPRE = HWREG(g_pulFMPRERegs[ulBank]); + ulFMPPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When Querying Block + // Protection, assume these bits are 1. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulFMPRE |= (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + } + + // + // Check the appropriate protection bits for the block of memory that + // is specified by the address. + // + switch((((ulFMPRE >> (ulAddress / FLASH_PROTECT_SIZE)) & + FLASH_FMP_BLOCK_0) << 1) | + ((ulFMPPE >> (ulAddress / FLASH_PROTECT_SIZE)) & FLASH_FMP_BLOCK_0)) + { + // + // This block is marked as execute only (that is, it can not be erased + // or programmed, and the only reads allowed are via the instruction + // fetch interface). + // + case 0: + case 1: + { + return(FlashExecuteOnly); + } + + // + // This block is marked as read only (that is, it can not be erased or + // programmed). + // + case 2: + { + return(FlashReadOnly); + } + + // + // This block is read/write; it can be read, erased, and programmed. + // + case 3: + default: + { + return(FlashReadWrite); + } + } +} + +//***************************************************************************** +// +//! Sets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be protected. +//! \param eProtect is the protection to be applied to the block. Can be one +//! of \b FlashReadWrite, \b FlashReadOnly, or \b FlashExecuteOnly. +//! +//! This function will set the protection for the specified 2 kB block of +//! flash. Blocks which are read/write can be made read-only or execute-only. +//! Blocks which are read-only can be made execute-only. Blocks which are +//! execute-only cannot have their protection modified. Attempts to make the +//! block protection less stringent (that is, read-only to read/write) will +//! result in a failure (and be prevented by the hardware). +//! +//! Changes to the flash protection are maintained only until the next reset. +//! This allows the application to be executed in the desired flash protection +//! environment to check for inappropriate flash access (via the flash +//! interrupt). To make the flash protection permanent, use the +//! FlashProtectSave() function. +//! +//! \return Returns 0 on success, or -1 if an invalid address or an invalid +//! protection was specified. +// +//***************************************************************************** +long +FlashProtectSet(unsigned long ulAddress, tFlashProtection eProtect) +{ + unsigned long ulProtectRE, ulProtectPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + ASSERT((eProtect == FlashReadWrite) || (eProtect == FlashReadOnly) || + (eProtect == FlashExecuteOnly)); + + // + // Convert the address into a block number. + // + ulAddress /= FLASH_PROTECT_SIZE; + + // + // ulAddress contains a "raw" block number. Derive the Flash Bank from + // the "raw" block number, and convert ulAddress to a "relative" + // block number. + // + ulBank = ((ulAddress / 32) % 4); + ulAddress %= 32; + + // + // Get the current protection for the specified flash bank. + // + ulProtectRE = HWREG(g_pulFMPRERegs[ulBank]); + ulProtectPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When setting protection, + // check to see if block 30 or 31 and protection is FlashExecuteOnly. If + // so, return an error condition. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + if((ulAddress >= 30) && (eProtect == FlashExecuteOnly)) + { + return(-1); + } + } + + // + // Set the protection based on the requested proection. + // + switch(eProtect) + { + // + // Make this block execute only. + // + case FlashExecuteOnly: + { + // + // Turn off the read and program bits for this block. + // + ulProtectRE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read only. + // + case FlashReadOnly: + { + // + // The block can not be made read only if it is execute only. + // + if(((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) + { + return(-1); + } + + // + // Make this block read only. + // + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read/write. + // + case FlashReadWrite: + default: + { + // + // The block can not be made read/write if it is not already + // read/write. + // + if((((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) || + (((ulProtectPE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0)) + { + return(-1); + } + + // + // The block is already read/write, so there is nothing to do. + // + return(0); + } + } + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG options, and are not + // available for the FLASH protection scheme. When setting block + // protection, ensure that these bits are not altered. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulProtectRE &= ~(FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + ulProtectRE |= (HWREG(g_pulFMPRERegs[ulBank]) & + (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30)); + } + + // + // Set the new protection for the specified flash bank. + // + HWREG(g_pulFMPRERegs[ulBank]) = ulProtectRE; + HWREG(g_pulFMPPERegs[ulBank]) = ulProtectPE; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the flash protection settings. +//! +//! This function will make the currently programmed flash protection settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change the flash protection. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashProtectSave(void) +{ + int ulTemp, ulLimit; + + // + // If running on a Sandstorm-class device, only trigger a save of the first + // two protection registers (FMPRE and FMPPE). Otherwise, save the + // entire bank of flash protection registers. + // + ulLimit = CLASS_IS_SANDSTORM ? 2 : 8; + for(ulTemp = 0; ulTemp < ulLimit; ulTemp++) + { + // + // Tell the flash controller to write the flash protection register. + // + HWREG(FLASH_FMA) = ulTemp; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the user registers. +//! +//! \param pulUser0 is a pointer to the location to store USER Register 0. +//! \param pulUser1 is a pointer to the location to store USER Register 1. +//! +//! This function will read the contents of user registers (0 and 1), and +//! store them in the specified locations. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1) +{ + // + // Verify that the pointers are valid. + // + ASSERT(pulUser0 != 0); + ASSERT(pulUser1 != 0); + + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Get and store the current value of the user registers. + // + *pulUser0 = HWREG(FLASH_USERREG0); + *pulUser1 = HWREG(FLASH_USERREG1); + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Sets the user registers. +//! +//! \param ulUser0 is the value to store in USER Register 0. +//! \param ulUser1 is the value to store in USER Register 1. +//! +//! This function will set the contents of the user registers (0 and 1) to +//! the specified values. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSet(unsigned long ulUser0, unsigned long ulUser1) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Save the new values into the user registers. + // + HWREG(FLASH_USERREG0) = ulUser0; + HWREG(FLASH_USERREG1) = ulUser1; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the user registers. +//! +//! This function will make the currently programmed user register settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change this setting. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSave(void) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Setting the MSB of FMA will trigger a permanent save of a USER + // register. Bit 0 will indicate User 0 (0) or User 1 (1). + // + HWREG(FLASH_FMA) = 0x80000000; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Tell the flash controller to write the USER1 Register. + // + HWREG(FLASH_FMA) = 0x80000001; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the flash interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the flash +//! interrupt occurs. +//! +//! This sets the handler to be called when the flash interrupt occurs. The +//! flash controller can generate an interrupt when an invalid flash access +//! occurs, such as trying to program or erase a read-only block, or trying to +//! read from an execute-only block. It can also generate an interrupt when a +//! program or erase operation has completed. The interrupt will be +//! automatically enabled when the handler is registered. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_FLASH, pfnHandler); + + // + // Enable the flash interrupt. + // + IntEnable(INT_FLASH); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the flash interrupt. +//! +//! This function will clear the handler to be called when the flash interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler is no longer called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_FLASH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_FLASH); +} + +//***************************************************************************** +// +//! Enables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Enables the indicated flash controller interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntEnable(unsigned long ulIntFlags) +{ + // + // Enable the specified interrupts. + // + HWREG(FLASH_FCIM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Disables the indicated flash controller interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntDisable(unsigned long ulIntFlags) +{ + // + // Disable the specified interrupts. + // + HWREG(FLASH_FCIM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the flash controller. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b FLASH_INT_PROGRAM and \b FLASH_INT_ACCESS. +// +//***************************************************************************** +unsigned long +FlashIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(FLASH_FCMISC)); + } + else + { + return(HWREG(FLASH_FCRIS)); + } +} + +//***************************************************************************** +// +//! Clears flash controller interrupt sources. +//! +//! \param ulIntFlags is the bit mask of the interrupt sources to be cleared. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_AMISC values. +//! +//! The specified flash controller interrupt sources are cleared, so that they +//! no longer assert. This must be done in the interrupt handler to keep it +//! from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntClear(unsigned long ulIntFlags) +{ + // + // Clear the flash interrupt. + // + HWREG(FLASH_FCMISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.h new file mode 100644 index 00000000..36203673 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/flash.h @@ -0,0 +1,106 @@ +//***************************************************************************** +// +// flash.h - Prototypes for the flash driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __FLASH_H__ +#define __FLASH_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to FlashProtectSet(), and returned by +// FlashProtectGet(). +// +//***************************************************************************** +typedef enum +{ + FlashReadWrite, // Flash can be read and written + FlashReadOnly, // Flash can only be read + FlashExecuteOnly // Flash can only be executed +} +tFlashProtection; + +//***************************************************************************** +// +// Values passed to FlashIntEnable(), FlashIntDisable() and FlashIntClear() and +// returned from FlashIntStatus(). +// +//***************************************************************************** +#define FLASH_INT_PROGRAM 0x00000002 // Programming Interrupt Mask +#define FLASH_INT_ACCESS 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long FlashUsecGet(void); +extern void FlashUsecSet(unsigned long ulClocks); +extern long FlashErase(unsigned long ulAddress); +extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount); +extern tFlashProtection FlashProtectGet(unsigned long ulAddress); +extern long FlashProtectSet(unsigned long ulAddress, + tFlashProtection eProtect); +extern long FlashProtectSave(void); +extern long FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1); +extern long FlashUserSet(unsigned long ulUser0, unsigned long ulUser1); +extern long FlashUserSave(void); +extern void FlashIntRegister(void (*pfnHandler)(void)); +extern void FlashIntUnregister(void); +extern void FlashIntEnable(unsigned long ulIntFlags); +extern void FlashIntDisable(unsigned long ulIntFlags); +extern unsigned long FlashIntStatus(tBoolean bMasked); +extern void FlashIntClear(unsigned long ulIntFlags); + +//***************************************************************************** +// +// Deprecated function names. These definitions ensure backwards compatibility +// but new code should avoid using deprecated function names since these will +// be removed at some point in the future. +// +//***************************************************************************** +#ifndef DEPRECATED +#define FlashIntGetStatus FlashIntStatus +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.c new file mode 100644 index 00000000..4e5afa7c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.c @@ -0,0 +1,1600 @@ +//***************************************************************************** +// +// gpio.c - API for GPIO ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup gpio_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_gpio.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/gpio.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// The base addresses of all the GPIO modules. Both the APB and AHB apertures +// are provided. +// +//***************************************************************************** +static const unsigned long g_pulGPIOBaseAddrs[] = +{ + GPIO_PORTA_BASE, GPIO_PORTA_AHB_BASE, + GPIO_PORTB_BASE, GPIO_PORTB_AHB_BASE, + GPIO_PORTC_BASE, GPIO_PORTC_AHB_BASE, + GPIO_PORTD_BASE, GPIO_PORTD_AHB_BASE, + GPIO_PORTE_BASE, GPIO_PORTE_AHB_BASE, + GPIO_PORTF_BASE, GPIO_PORTF_AHB_BASE, + GPIO_PORTG_BASE, GPIO_PORTG_AHB_BASE, + GPIO_PORTH_BASE, GPIO_PORTH_AHB_BASE, + GPIO_PORTJ_BASE, GPIO_PORTJ_AHB_BASE, +}; + +//***************************************************************************** +// +//! \internal +//! Checks a GPIO base address. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function determines if a GPIO port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +GPIOBaseValid(unsigned long ulPort) +{ + return((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTA_AHB_BASE) || + (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTB_AHB_BASE) || + (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTC_AHB_BASE) || + (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTD_AHB_BASE) || + (ulPort == GPIO_PORTE_BASE) || (ulPort == GPIO_PORTE_AHB_BASE) || + (ulPort == GPIO_PORTF_BASE) || (ulPort == GPIO_PORTF_AHB_BASE) || + (ulPort == GPIO_PORTG_BASE) || (ulPort == GPIO_PORTG_AHB_BASE) || + (ulPort == GPIO_PORTH_BASE) || (ulPort == GPIO_PORTH_AHB_BASE) || + (ulPort == GPIO_PORTJ_BASE) || (ulPort == GPIO_PORTJ_AHB_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Gets the GPIO interrupt number. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! Given a GPIO base address, returns the corresponding interrupt number. +//! +//! \return Returns a GPIO interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +GPIOGetIntNumber(unsigned long ulPort) +{ + unsigned int ulInt; + + // + // Determine the GPIO interrupt number for the given module. + // + switch(ulPort) + { + case GPIO_PORTA_BASE: + case GPIO_PORTA_AHB_BASE: + { + ulInt = INT_GPIOA; + break; + } + + case GPIO_PORTB_BASE: + case GPIO_PORTB_AHB_BASE: + { + ulInt = INT_GPIOB; + break; + } + + case GPIO_PORTC_BASE: + case GPIO_PORTC_AHB_BASE: + { + ulInt = INT_GPIOC; + break; + } + + case GPIO_PORTD_BASE: + case GPIO_PORTD_AHB_BASE: + { + ulInt = INT_GPIOD; + break; + } + + case GPIO_PORTE_BASE: + case GPIO_PORTE_AHB_BASE: + { + ulInt = INT_GPIOE; + break; + } + + case GPIO_PORTF_BASE: + case GPIO_PORTF_AHB_BASE: + { + ulInt = INT_GPIOF; + break; + } + + case GPIO_PORTG_BASE: + case GPIO_PORTG_AHB_BASE: + { + ulInt = INT_GPIOG; + break; + } + + case GPIO_PORTH_BASE: + case GPIO_PORTH_AHB_BASE: + { + ulInt = INT_GPIOH; + break; + } + + case GPIO_PORTJ_BASE: + case GPIO_PORTJ_AHB_BASE: + { + ulInt = INT_GPIOJ; + break; + } + + default: + { + return(-1); + } + } + + // + // Return GPIO interrupt number. + // + return(ulInt); +} + +//***************************************************************************** +// +//! Sets the direction and mode of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulPinIO is the pin direction and/or mode. +//! +//! This function will set the specified pin(s) on the selected GPIO port +//! as either an input or output under software control, or it will set the +//! pin to be under hardware control. +//! +//! The parameter \e ulPinIO is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_DIR_MODE_IN +//! - \b GPIO_DIR_MODE_OUT +//! - \b GPIO_DIR_MODE_HW +//! +//! where \b GPIO_DIR_MODE_IN specifies that the pin will be programmed as +//! a software controlled input, \b GPIO_DIR_MODE_OUT specifies that the pin +//! will be programmed as a software controlled output, and +//! \b GPIO_DIR_MODE_HW specifies that the pin will be placed under +//! hardware control. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note GPIOPadConfigSet() must also be used to configure the corresponding +//! pad(s) in order for them to propagate the signal to/from the GPIO. +//! +//! \return None. +// +//***************************************************************************** +void +GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulPinIO == GPIO_DIR_MODE_IN) || (ulPinIO == GPIO_DIR_MODE_OUT) || + (ulPinIO == GPIO_DIR_MODE_HW)); + + // + // Set the pin direction and mode. + // + HWREG(ulPort + GPIO_O_DIR) = ((ulPinIO & 1) ? + (HWREG(ulPort + GPIO_O_DIR) | ucPins) : + (HWREG(ulPort + GPIO_O_DIR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_AFSEL) = ((ulPinIO & 2) ? + (HWREG(ulPort + GPIO_O_AFSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AFSEL) & + ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the direction and mode of a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the direction and control mode for a specified pin on +//! the selected GPIO port. The pin can be configured as either an input or +//! output under software control, or it can be under hardware control. The +//! type of control and direction are returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIODirModeSet(). +// +//***************************************************************************** +unsigned long +GPIODirModeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulDir, ulAFSEL; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin direction and mode. + // + ulDir = HWREG(ulPort + GPIO_O_DIR); + ulAFSEL = HWREG(ulPort + GPIO_O_AFSEL); + return(((ulDir & ucPin) ? 1 : 0) | ((ulAFSEL & ucPin) ? 2 : 0)); +} + +//***************************************************************************** +// +//! Sets the interrupt type for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulIntType specifies the type of interrupt trigger mechanism. +//! +//! This function sets up the various interrupt trigger mechanisms for the +//! specified pin(s) on the selected GPIO port. +//! +//! The parameter \e ulIntType is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_FALLING_EDGE +//! - \b GPIO_RISING_EDGE +//! - \b GPIO_BOTH_EDGES +//! - \b GPIO_LOW_LEVEL +//! - \b GPIO_HIGH_LEVEL +//! +//! where the different values describe the interrupt detection mechanism +//! (edge or level) and the particular triggering event (falling, rising, +//! or both edges for edge detect, low or high for level detect). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note In order to avoid any spurious interrupts, the user must +//! ensure that the GPIO inputs remain stable for the duration of +//! this function. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulIntType == GPIO_FALLING_EDGE) || + (ulIntType == GPIO_RISING_EDGE) || (ulIntType == GPIO_BOTH_EDGES) || + (ulIntType == GPIO_LOW_LEVEL) || (ulIntType == GPIO_HIGH_LEVEL)); + + // + // Set the pin interrupt type. + // + HWREG(ulPort + GPIO_O_IBE) = ((ulIntType & 1) ? + (HWREG(ulPort + GPIO_O_IBE) | ucPins) : + (HWREG(ulPort + GPIO_O_IBE) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IS) = ((ulIntType & 2) ? + (HWREG(ulPort + GPIO_O_IS) | ucPins) : + (HWREG(ulPort + GPIO_O_IS) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IEV) = ((ulIntType & 4) ? + (HWREG(ulPort + GPIO_O_IEV) | ucPins) : + (HWREG(ulPort + GPIO_O_IEV) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the interrupt type for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the interrupt type for a specified pin on the selected +//! GPIO port. The pin can be configured as a falling edge, rising edge, or +//! both edge detected interrupt, or it can be configured as a low level or +//! high level detected interrupt. The type of interrupt detection mechanism +//! is returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIOIntTypeSet(). +// +//***************************************************************************** +unsigned long +GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulIBE, ulIS, ulIEV; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin interrupt type. + // + ulIBE = HWREG(ulPort + GPIO_O_IBE); + ulIS = HWREG(ulPort + GPIO_O_IS); + ulIEV = HWREG(ulPort + GPIO_O_IEV); + return(((ulIBE & ucPin) ? 1 : 0) | ((ulIS & ucPin) ? 2 : 0) | + ((ulIEV & ucPin) ? 4 : 0)); +} + +//***************************************************************************** +// +//! Sets the pad configuration for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulStrength specifies the output drive strength. +//! \param ulPinType specifies the pin type. +//! +//! This function sets the drive strength and type for the specified pin(s) +//! on the selected GPIO port. For pin(s) configured as input ports, the +//! pad is configured as requested, but the only real effect on the input +//! is the configuration of the pull-up or pull-down termination. +//! +//! The parameter \e ulStrength can be one of the following values: +//! +//! - \b GPIO_STRENGTH_2MA +//! - \b GPIO_STRENGTH_4MA +//! - \b GPIO_STRENGTH_8MA +//! - \b GPIO_STRENGTH_8MA_SC +//! +//! where \b GPIO_STRENGTH_xMA specifies either 2, 4, or 8 mA output drive +//! strength, and \b GPIO_OUT_STRENGTH_8MA_SC specifies 8 mA output drive with +//! slew control. +//! +//! The parameter \e ulPinType can be one of the following values: +//! +//! - \b GPIO_PIN_TYPE_STD +//! - \b GPIO_PIN_TYPE_STD_WPU +//! - \b GPIO_PIN_TYPE_STD_WPD +//! - \b GPIO_PIN_TYPE_OD +//! - \b GPIO_PIN_TYPE_OD_WPU +//! - \b GPIO_PIN_TYPE_OD_WPD +//! - \b GPIO_PIN_TYPE_ANALOG +//! +//! where \b GPIO_PIN_TYPE_STD* specifies a push-pull pin, \b GPIO_PIN_TYPE_OD* +//! specifies an open-drain pin, \b *_WPU specifies a weak pull-up, \b *_WPD +//! specifies a weak pull-down, and \b GPIO_PIN_TYPE_ANALOG specifies an +//! analog input (for the comparators). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, unsigned long ulPinType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulStrength == GPIO_STRENGTH_2MA) || + (ulStrength == GPIO_STRENGTH_4MA) || + (ulStrength == GPIO_STRENGTH_8MA) || + (ulStrength == GPIO_STRENGTH_8MA_SC)); + ASSERT((ulPinType == GPIO_PIN_TYPE_STD) || + (ulPinType == GPIO_PIN_TYPE_STD_WPU) || + (ulPinType == GPIO_PIN_TYPE_STD_WPD) || + (ulPinType == GPIO_PIN_TYPE_OD) || + (ulPinType == GPIO_PIN_TYPE_OD_WPU) || + (ulPinType == GPIO_PIN_TYPE_OD_WPD) || + (ulPinType == GPIO_PIN_TYPE_ANALOG)) + + // + // Set the output drive strength. + // + HWREG(ulPort + GPIO_O_DR2R) = ((ulStrength & 1) ? + (HWREG(ulPort + GPIO_O_DR2R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR2R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR4R) = ((ulStrength & 2) ? + (HWREG(ulPort + GPIO_O_DR4R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR4R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR8R) = ((ulStrength & 4) ? + (HWREG(ulPort + GPIO_O_DR8R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR8R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_SLR) = ((ulStrength & 8) ? + (HWREG(ulPort + GPIO_O_SLR) | ucPins) : + (HWREG(ulPort + GPIO_O_SLR) & ~(ucPins))); + + // + // Set the pin type. + // + HWREG(ulPort + GPIO_O_ODR) = ((ulPinType & 1) ? + (HWREG(ulPort + GPIO_O_ODR) | ucPins) : + (HWREG(ulPort + GPIO_O_ODR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PUR) = ((ulPinType & 2) ? + (HWREG(ulPort + GPIO_O_PUR) | ucPins) : + (HWREG(ulPort + GPIO_O_PUR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PDR) = ((ulPinType & 4) ? + (HWREG(ulPort + GPIO_O_PDR) | ucPins) : + (HWREG(ulPort + GPIO_O_PDR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DEN) = ((ulPinType & 8) ? + (HWREG(ulPort + GPIO_O_DEN) | ucPins) : + (HWREG(ulPort + GPIO_O_DEN) & ~(ucPins))); + + // + // Set the analog mode select register. This register only appears in + // DustDevil-class (and later) devices, but is a harmless write on + // Sandstorm- and Fury-class devices. + // + HWREG(ulPort + GPIO_O_AMSEL) = + ((ulPinType == GPIO_PIN_TYPE_ANALOG) ? + (HWREG(ulPort + GPIO_O_AMSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AMSEL) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the pad configuration for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! \param pulStrength is a pointer to storage for the output drive strength. +//! \param pulPinType is a pointer to storage for the output drive type. +//! +//! This function gets the pad configuration for a specified pin on the +//! selected GPIO port. The values returned in \e pulStrength and +//! \e pulPinType correspond to the values used in GPIOPadConfigSet(). This +//! function also works for pin(s) configured as input pin(s); however, the +//! only meaningful data returned is whether the pin is terminated with a +//! pull-up or down resistor. +//! +//! \return None +// +//***************************************************************************** +void +GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, unsigned long *pulPinType) +{ + unsigned long ulTemp1, ulTemp2, ulTemp3, ulTemp4; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = (1 << ucPin); + + // + // Get the drive strength for this pin. + // + ulTemp1 = HWREG(ulPort + GPIO_O_DR2R); + ulTemp2 = HWREG(ulPort + GPIO_O_DR4R); + ulTemp3 = HWREG(ulPort + GPIO_O_DR8R); + ulTemp4 = HWREG(ulPort + GPIO_O_SLR); + *pulStrength = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); + + // + // Get the pin type. + // + ulTemp1 = HWREG(ulPort + GPIO_O_ODR); + ulTemp2 = HWREG(ulPort + GPIO_O_PUR); + ulTemp3 = HWREG(ulPort + GPIO_O_PDR); + ulTemp4 = HWREG(ulPort + GPIO_O_DEN); + *pulPinType = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); +} + +//***************************************************************************** +// +//! Enables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Unmasks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Enable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) |= ucPins; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Masks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Disable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) &= ~(ucPins); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns a bit-packed byte, where each bit that is set identifies +//! an active masked or raw interrupt, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the interrupt status. + // + if(bMasked) + { + return(HWREG(ulPort + GPIO_O_MIS)); + } + else + { + return(HWREG(ulPort + GPIO_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the interrupt for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Clears the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Clear the interrupts. + // + HWREG(ulPort + GPIO_O_ICR) = ucPins; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param pfnIntHandler is a pointer to the GPIO port interrupt handling +//! function. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected from the selected +//! GPIO port. This function will also enable the corresponding GPIO interrupt +//! in the interrupt controller; individual pin interrupts and interrupt +//! sources must be enabled with GPIOPinIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntRegister(unsigned long ulPort, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Register the interrupt handler. + // + IntRegister(ulPort, pfnIntHandler); + + // + // Enable the GPIO interrupt. + // + IntEnable(ulPort); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function will unregister the interrupt handler for the specified +//! GPIO port. This function will also disable the corresponding +//! GPIO port interrupt in the interrupt controller; individual GPIO interrupts +//! and interrupt sources must be disabled with GPIOPinIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntUnregister(unsigned long ulPort) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Disable the GPIO interrupt. + // + IntDisable(ulPort); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulPort); +} + +//***************************************************************************** +// +//! Reads the values present of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The values at the specified pin(s) are read, as specified by \e ucPins. +//! Values are returned for both input and output pin(s), and the value +//! for pin(s) that are not specified by \e ucPins are set to 0. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return Returns a bit-packed byte providing the state of the specified +//! pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents +//! GPIO port pin 1, and so on. Any bit that is not specified by \e ucPins +//! is returned as a 0. Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinRead(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the pin value(s). + // + return(HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2)))); +} + +//***************************************************************************** +// +//! Writes a value to the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ucVal is the value to write to the pin(s). +//! +//! Writes the corresponding bit values to the output pin(s) specified by +//! \e ucPins. Writing to a pin configured as an input pin has no effect. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Write the pins. + // + HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))) = ucVal; +} + +//***************************************************************************** +// +//! Configures pin(s) for use as analog-to-digital converter inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog-to-digital converter input pins must be properly configured +//! to function correctly on DustDevil-class devices. This function provides +//! the proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an ADC input; it only +//! configures an ADC input pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as a CAN device. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CAN pins must be properly configured for the CAN peripherals to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a CAN pin; it only +//! configures a CAN pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as an analog comparator input. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog comparator input pins must be properly configured for the analog +//! comparator to function correctly. This function provides the proper +//! configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an analog comparator input; +//! it only configures an analog comparator pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO inputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO open drain outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutputOD(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2C peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The I2C pins must be properly configured for the I2C peripheral to function +//! correctly. This function provides the proper configuration for those +//! pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an I2C pin; it only +//! configures an I2C pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for open-drain operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the PWM peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The PWM pins must be properly configured for the PWM peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a PWM pin; it only +//! configures a PWM pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the QEI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The QEI pins must be properly configured for the QEI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, not using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a QEI pin; it only +//! configures a QEI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the SSI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The SSI pins must be properly configured for the SSI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a SSI pin; it only +//! configures a SSI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Timer peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CCP pins must be properly configured for the timer peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a timer pin; it only +//! configures a timer pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the UART peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The UART pins must be properly configured for the UART peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a UART pin; it only +//! configures a UART pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB digital pins must be properly configured for the USB peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital USB pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! This function should only be used with EPEN and PFAULT pins as all other +//! USB pins are analog in nature or are not used in devices without OTG +//! functionality. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB analog pins must be properly configured for the USB peripheral to +//! function correctly. This function provides the proper configuration for +//! any USB pin(s). This can also be used to configure the EPEN and PFAULT pins +//! so that they are no longer used by the USB controller. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2S peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some I2S pins must be properly configured for the I2S peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital I2S pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a I2S pin; it only +//! configures a I2S pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Ethernet peripheral as LED signals. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The Ethernet peripheral provides two signals that can be used to drive +//! an LED (e.g. for link status/activity). This function provides a typical +//! configuration for the pins. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an Ethernet LED pin; it only +//! configures an Ethernet LED pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the external peripheral interface. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The external peripheral interface pins must be properly configured for the +//! external peripheral interface to function correctly. This function +//! provides a typica configuration for those pin(s); other configurations may +//! work as well depending upon the board setup (for exampe, using the on-chip +//! pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an external peripheral +//! interface pin; it only configures an external peripheral interface pin for +//! proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures the alternate function of a GPIO pin. +//! +//! \param ulPinConfig is the pin configuration value, specified as only one of +//! the \b GPIO_P??_??? values. +//! +//! This function configures the pin mux that selects the peripheral function +//! associated with a particular GPIO pin. Only one peripheral function at a +//! time can be associated with a GPIO pin, and each peripheral function should +//! only be associated with a single GPIO pin at a time (despite the fact that +//! many of them can be associated with more than one GPIO pin). +//! +//! \note This function is only valid on Tempest-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinConfigure(unsigned long ulPinConfig) +{ + unsigned long ulBase, ulShift; + + // + // Check the argument. + // + ASSERT(((ulPinConfig >> 16) & 0xff) < 9); + ASSERT(((ulPinConfig >> 8) & 0xe3) == 0); + + // + // Extract the base address index from the input value. + // + ulBase = (ulPinConfig >> 16) & 0xff; + + // + // Get the base address of the GPIO module, selecting either the APB or the + // AHB aperture as appropriate. + // + if(HWREG(SYSCTL_GPIOHBCTL) & (1 << ulBase)) + { + ulBase = g_pulGPIOBaseAddrs[(ulBase << 1) + 1]; + } + else + { + ulBase = g_pulGPIOBaseAddrs[ulBase << 1]; + } + + // + // Extract the shift from the input value. + // + ulShift = (ulPinConfig >> 8) & 0xff; + + // + // Write the requested pin muxing value for this GPIO pin. + // + HWREG(ulBase + GPIO_O_PCTL) = ((HWREG(ulBase + GPIO_O_PCTL) & + ~(0xf << ulShift)) | + ((ulPinConfig & 0xf) << ulShift)); + +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.h new file mode 100644 index 00000000..3b60fc77 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/gpio.h @@ -0,0 +1,767 @@ +//***************************************************************************** +// +// gpio.h - Defines and Macros for GPIO API. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __GPIO_H__ +#define __GPIO_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following values define the bit field for the ucPins argument to several +// of the APIs. +// +//***************************************************************************** +#define GPIO_PIN_0 0x00000001 // GPIO pin 0 +#define GPIO_PIN_1 0x00000002 // GPIO pin 1 +#define GPIO_PIN_2 0x00000004 // GPIO pin 2 +#define GPIO_PIN_3 0x00000008 // GPIO pin 3 +#define GPIO_PIN_4 0x00000010 // GPIO pin 4 +#define GPIO_PIN_5 0x00000020 // GPIO pin 5 +#define GPIO_PIN_6 0x00000040 // GPIO pin 6 +#define GPIO_PIN_7 0x00000080 // GPIO pin 7 + +//***************************************************************************** +// +// Values that can be passed to GPIODirModeSet as the ulPinIO parameter, and +// returned from GPIODirModeGet. +// +//***************************************************************************** +#define GPIO_DIR_MODE_IN 0x00000000 // Pin is a GPIO input +#define GPIO_DIR_MODE_OUT 0x00000001 // Pin is a GPIO output +#define GPIO_DIR_MODE_HW 0x00000002 // Pin is a peripheral function + +//***************************************************************************** +// +// Values that can be passed to GPIOIntTypeSet as the ulIntType parameter, and +// returned from GPIOIntTypeGet. +// +//***************************************************************************** +#define GPIO_FALLING_EDGE 0x00000000 // Interrupt on falling edge +#define GPIO_RISING_EDGE 0x00000004 // Interrupt on rising edge +#define GPIO_BOTH_EDGES 0x00000001 // Interrupt on both edges +#define GPIO_LOW_LEVEL 0x00000002 // Interrupt on low level +#define GPIO_HIGH_LEVEL 0x00000007 // Interrupt on high level + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulStrength parameter, +// and returned by GPIOPadConfigGet in the *pulStrength parameter. +// +//***************************************************************************** +#define GPIO_STRENGTH_2MA 0x00000001 // 2mA drive strength +#define GPIO_STRENGTH_4MA 0x00000002 // 4mA drive strength +#define GPIO_STRENGTH_8MA 0x00000004 // 8mA drive strength +#define GPIO_STRENGTH_8MA_SC 0x0000000C // 8mA drive with slew rate control + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulPadType parameter, +// and returned by GPIOPadConfigGet in the *pulPadType parameter. +// +//***************************************************************************** +#define GPIO_PIN_TYPE_STD 0x00000008 // Push-pull +#define GPIO_PIN_TYPE_STD_WPU 0x0000000A // Push-pull with weak pull-up +#define GPIO_PIN_TYPE_STD_WPD 0x0000000C // Push-pull with weak pull-down +#define GPIO_PIN_TYPE_OD 0x00000009 // Open-drain +#define GPIO_PIN_TYPE_OD_WPU 0x0000000B // Open-drain with weak pull-up +#define GPIO_PIN_TYPE_OD_WPD 0x0000000D // Open-drain with weak pull-down +#define GPIO_PIN_TYPE_ANALOG 0x00000000 // Analog comparator + +//***************************************************************************** +// +// Values that can be passed to GPIOPinConfigure as the ulPinConfig parameter. +// +//***************************************************************************** +// +// GPIO pin A0 +// +#define GPIO_PA0_U0RX 0x00000001 +#define GPIO_PA0_I2C1SCL 0x00000008 +#define GPIO_PA0_U1RX 0x00000009 + +// +// GPIO pin A1 +// +#define GPIO_PA1_U0TX 0x00000401 +#define GPIO_PA1_I2C1SDA 0x00000408 +#define GPIO_PA1_U1TX 0x00000409 + +// +// GPIO pin A2 +// +#define GPIO_PA2_SSI0CLK 0x00000801 +#define GPIO_PA2_PWM4 0x00000804 +#define GPIO_PA2_I2S0RXSD 0x00000809 + +// +// GPIO pin A3 +// +#define GPIO_PA3_SSI0FSS 0x00000c01 +#define GPIO_PA3_PWM5 0x00000c04 +#define GPIO_PA3_I2S0RXMCLK 0x00000c09 + +// +// GPIO pin A4 +// +#define GPIO_PA4_SSI0RX 0x00001001 +#define GPIO_PA4_PWM6 0x00001004 +#define GPIO_PA4_CAN0RX 0x00001005 +#define GPIO_PA4_I2S0TXSCK 0x00001009 + +// +// GPIO pin A5 +// +#define GPIO_PA5_SSI0TX 0x00001401 +#define GPIO_PA5_PWM7 0x00001404 +#define GPIO_PA5_CAN0TX 0x00001405 +#define GPIO_PA5_I2S0TXWS 0x00001409 + +// +// GPIO pin A6 +// +#define GPIO_PA6_I2C1SCL 0x00001801 +#define GPIO_PA6_CCP1 0x00001802 +#define GPIO_PA6_PWM0 0x00001804 +#define GPIO_PA6_PWM4 0x00001805 +#define GPIO_PA6_CAN0RX 0x00001806 +#define GPIO_PA6_USB0EPEN 0x00001808 +#define GPIO_PA6_U1CTS 0x00001809 + +// +// GPIO pin A7 +// +#define GPIO_PA7_I2C1SDA 0x00001c01 +#define GPIO_PA7_CCP4 0x00001c02 +#define GPIO_PA7_PWM1 0x00001c04 +#define GPIO_PA7_PWM5 0x00001c05 +#define GPIO_PA7_CAN0TX 0x00001c06 +#define GPIO_PA7_CCP3 0x00001c07 +#define GPIO_PA7_USB0PFLT 0x00001c08 +#define GPIO_PA7_U1DCD 0x00001c09 + +// +// GPIO pin B0 +// +#define GPIO_PB0_CCP0 0x00010001 +#define GPIO_PB0_PWM2 0x00010002 +#define GPIO_PB0_U1RX 0x00010005 + +// +// GPIO pin B1 +// +#define GPIO_PB1_CCP2 0x00010401 +#define GPIO_PB1_PWM3 0x00010402 +#define GPIO_PB1_CCP1 0x00010404 +#define GPIO_PB1_U1TX 0x00010405 + +// +// GPIO pin B2 +// +#define GPIO_PB2_I2C0SCL 0x00010801 +#define GPIO_PB2_IDX0 0x00010802 +#define GPIO_PB2_CCP3 0x00010804 +#define GPIO_PB2_CCP0 0x00010805 +#define GPIO_PB2_USB0EPEN 0x00010808 + +// +// GPIO pin B3 +// +#define GPIO_PB3_I2C0SDA 0x00010c01 +#define GPIO_PB3_FAULT0 0x00010c02 +#define GPIO_PB3_FAULT3 0x00010c04 +#define GPIO_PB3_USB0PFLT 0x00010c08 + +// +// GPIO pin B4 +// +#define GPIO_PB4_U2RX 0x00011004 +#define GPIO_PB4_CAN0RX 0x00011005 +#define GPIO_PB4_IDX0 0x00011006 +#define GPIO_PB4_U1RX 0x00011007 +#define GPIO_PB4_EPI0S23 0x00011008 + +// +// GPIO pin B5 +// +#define GPIO_PB5_C0O 0x00011401 +#define GPIO_PB5_CCP5 0x00011402 +#define GPIO_PB5_CCP6 0x00011403 +#define GPIO_PB5_CCP0 0x00011404 +#define GPIO_PB5_CAN0TX 0x00011405 +#define GPIO_PB5_CCP2 0x00011406 +#define GPIO_PB5_U1TX 0x00011407 +#define GPIO_PB5_EPI0S22 0x00011408 + +// +// GPIO pin B6 +// +#define GPIO_PB6_CCP1 0x00011801 +#define GPIO_PB6_CCP7 0x00011802 +#define GPIO_PB6_C0O 0x00011803 +#define GPIO_PB6_FAULT1 0x00011804 +#define GPIO_PB6_IDX0 0x00011805 +#define GPIO_PB6_CCP5 0x00011806 +#define GPIO_PB6_I2S0TXSCK 0x00011809 + +// +// GPIO pin B7 +// +#define GPIO_PB7_NMI 0x00011c04 + +// +// GPIO pin C0 +// +#define GPIO_PC0_TCK 0x00020003 + +// +// GPIO pin C1 +// +#define GPIO_PC1_TMS 0x00020403 + +// +// GPIO pin C2 +// +#define GPIO_PC2_TDI 0x00020803 + +// +// GPIO pin C3 +// +#define GPIO_PC3_TDO 0x00020c03 + +// +// GPIO pin C4 +// +#define GPIO_PC4_CCP5 0x00021001 +#define GPIO_PC4_PHA0 0x00021002 +#define GPIO_PC4_PWM6 0x00021004 +#define GPIO_PC4_CCP2 0x00021005 +#define GPIO_PC4_CCP4 0x00021006 +#define GPIO_PC4_EPI0S2 0x00021008 +#define GPIO_PC4_CCP1 0x00021009 + +// +// GPIO pin C5 +// +#define GPIO_PC5_CCP1 0x00021401 +#define GPIO_PC5_C1O 0x00021402 +#define GPIO_PC5_C0O 0x00021403 +#define GPIO_PC5_FAULT2 0x00021404 +#define GPIO_PC5_CCP3 0x00021405 +#define GPIO_PC5_USB0EPEN 0x00021406 +#define GPIO_PC5_EPI0S3 0x00021408 + +// +// GPIO pin C6 +// +#define GPIO_PC6_CCP3 0x00021801 +#define GPIO_PC6_PHB0 0x00021802 +#define GPIO_PC6_C2O 0x00021803 +#define GPIO_PC6_PWM7 0x00021804 +#define GPIO_PC6_U1RX 0x00021805 +#define GPIO_PC6_CCP0 0x00021806 +#define GPIO_PC6_USB0PFLT 0x00021807 +#define GPIO_PC6_EPI0S4 0x00021808 + +// +// GPIO pin C7 +// +#define GPIO_PC7_CCP4 0x00021c01 +#define GPIO_PC7_PHB0 0x00021c02 +#define GPIO_PC7_CCP0 0x00021c04 +#define GPIO_PC7_U1TX 0x00021c05 +#define GPIO_PC7_USB0PFLT 0x00021c06 +#define GPIO_PC7_C1O 0x00021c07 +#define GPIO_PC7_EPI0S5 0x00021c08 + +// +// GPIO pin D0 +// +#define GPIO_PD0_PWM0 0x00030001 +#define GPIO_PD0_CAN0RX 0x00030002 +#define GPIO_PD0_IDX0 0x00030003 +#define GPIO_PD0_U2RX 0x00030004 +#define GPIO_PD0_U1RX 0x00030005 +#define GPIO_PD0_CCP6 0x00030006 +#define GPIO_PD0_I2S0RXSCK 0x00030008 +#define GPIO_PD0_U1CTS 0x00030009 + +// +// GPIO pin D1 +// +#define GPIO_PD1_PWM1 0x00030401 +#define GPIO_PD1_CAN0TX 0x00030402 +#define GPIO_PD1_PHA0 0x00030403 +#define GPIO_PD1_U2TX 0x00030404 +#define GPIO_PD1_U1TX 0x00030405 +#define GPIO_PD1_CCP7 0x00030406 +#define GPIO_PD1_I2S0RXWS 0x00030408 +#define GPIO_PD1_U1DCD 0x00030409 +#define GPIO_PD1_CCP2 0x0003040a +#define GPIO_PD1_PHB1 0x0003040b + +// +// GPIO pin D2 +// +#define GPIO_PD2_U1RX 0x00030801 +#define GPIO_PD2_CCP6 0x00030802 +#define GPIO_PD2_PWM2 0x00030803 +#define GPIO_PD2_CCP5 0x00030804 +#define GPIO_PD2_EPI0S20 0x00030808 + +// +// GPIO pin D3 +// +#define GPIO_PD3_U1TX 0x00030c01 +#define GPIO_PD3_CCP7 0x00030c02 +#define GPIO_PD3_PWM3 0x00030c03 +#define GPIO_PD3_CCP0 0x00030c04 +#define GPIO_PD3_EPI0S21 0x00030c08 + +// +// GPIO pin D4 +// +#define GPIO_PD4_CCP0 0x00031001 +#define GPIO_PD4_CCP3 0x00031002 +#define GPIO_PD4_I2S0RXSD 0x00031008 +#define GPIO_PD4_U1RI 0x00031009 +#define GPIO_PD4_EPI0S19 0x0003100a + +// +// GPIO pin D5 +// +#define GPIO_PD5_CCP2 0x00031401 +#define GPIO_PD5_CCP4 0x00031402 +#define GPIO_PD5_I2S0RXMCLK 0x00031408 +#define GPIO_PD5_U2RX 0x00031409 +#define GPIO_PD5_EPI0S28 0x0003140a + +// +// GPIO pin D6 +// +#define GPIO_PD6_FAULT0 0x00031801 +#define GPIO_PD6_I2S0TXSCK 0x00031808 +#define GPIO_PD6_U2TX 0x00031809 +#define GPIO_PD6_EPI0S29 0x0003180a + +// +// GPIO pin D7 +// +#define GPIO_PD7_IDX0 0x00031c01 +#define GPIO_PD7_C0O 0x00031c02 +#define GPIO_PD7_CCP1 0x00031c03 +#define GPIO_PD7_I2S0TXWS 0x00031c08 +#define GPIO_PD7_U1DTR 0x00031c09 +#define GPIO_PD7_EPI0S30 0x00031c0a + +// +// GPIO pin E0 +// +#define GPIO_PE0_PWM4 0x00040001 +#define GPIO_PE0_SSI1CLK 0x00040002 +#define GPIO_PE0_CCP3 0x00040003 +#define GPIO_PE0_EPI0S8 0x00040008 +#define GPIO_PE0_USB0PFLT 0x00040009 + +// +// GPIO pin E1 +// +#define GPIO_PE1_PWM5 0x00040401 +#define GPIO_PE1_SSI1FSS 0x00040402 +#define GPIO_PE1_FAULT0 0x00040403 +#define GPIO_PE1_CCP2 0x00040404 +#define GPIO_PE1_CCP6 0x00040405 +#define GPIO_PE1_EPI0S9 0x00040408 + +// +// GPIO pin E2 +// +#define GPIO_PE2_CCP4 0x00040801 +#define GPIO_PE2_SSI1RX 0x00040802 +#define GPIO_PE2_PHB1 0x00040803 +#define GPIO_PE2_PHA0 0x00040804 +#define GPIO_PE2_CCP2 0x00040805 +#define GPIO_PE2_EPI0S24 0x00040808 + +// +// GPIO pin E3 +// +#define GPIO_PE3_CCP1 0x00040c01 +#define GPIO_PE3_SSI1TX 0x00040c02 +#define GPIO_PE3_PHA1 0x00040c03 +#define GPIO_PE3_PHB0 0x00040c04 +#define GPIO_PE3_CCP7 0x00040c05 +#define GPIO_PE3_EPI0S25 0x00040c08 + +// +// GPIO pin E4 +// +#define GPIO_PE4_CCP3 0x00041001 +#define GPIO_PE4_FAULT0 0x00041004 +#define GPIO_PE4_U2TX 0x00041005 +#define GPIO_PE4_CCP2 0x00041006 +#define GPIO_PE4_I2S0TXWS 0x00041009 + +// +// GPIO pin E5 +// +#define GPIO_PE5_CCP5 0x00041401 +#define GPIO_PE5_I2S0TXSD 0x00041409 + +// +// GPIO pin E6 +// +#define GPIO_PE6_PWM4 0x00041801 +#define GPIO_PE6_C1O 0x00041802 +#define GPIO_PE6_U1CTS 0x00041809 + +// +// GPIO pin E7 +// +#define GPIO_PE7_PWM5 0x00041c01 +#define GPIO_PE7_C2O 0x00041c02 +#define GPIO_PE7_U1DCD 0x00041c09 + +// +// GPIO pin F0 +// +#define GPIO_PF0_CAN1RX 0x00050001 +#define GPIO_PF0_PHB0 0x00050002 +#define GPIO_PF0_PWM0 0x00050003 +#define GPIO_PF0_I2S0TXSD 0x00050008 +#define GPIO_PF0_U1DSR 0x00050009 + +// +// GPIO pin F1 +// +#define GPIO_PF1_CAN1TX 0x00050401 +#define GPIO_PF1_IDX1 0x00050402 +#define GPIO_PF1_PWM1 0x00050403 +#define GPIO_PF1_I2S0TXMCLK 0x00050408 +#define GPIO_PF1_U1RTS 0x00050409 +#define GPIO_PF1_CCP3 0x0005040a + +// +// GPIO pin F2 +// +#define GPIO_PF2_LED1 0x00050801 +#define GPIO_PF2_PWM4 0x00050802 +#define GPIO_PF2_PWM2 0x00050804 +#define GPIO_PF2_SSI1CLK 0x00050809 + +// +// GPIO pin F3 +// +#define GPIO_PF3_LED0 0x00050c01 +#define GPIO_PF3_PWM5 0x00050c02 +#define GPIO_PF3_PWM3 0x00050c04 +#define GPIO_PF3_SSI1FSS 0x00050c09 + +// +// GPIO pin F4 +// +#define GPIO_PF4_CCP0 0x00051001 +#define GPIO_PF4_C0O 0x00051002 +#define GPIO_PF4_FAULT0 0x00051004 +#define GPIO_PF4_EPI0S12 0x00051008 +#define GPIO_PF4_SSI1RX 0x00051009 + +// +// GPIO pin F5 +// +#define GPIO_PF5_CCP2 0x00051401 +#define GPIO_PF5_C1O 0x00051402 +#define GPIO_PF5_EPI0S15 0x00051408 +#define GPIO_PF5_SSI1TX 0x00051409 + +// +// GPIO pin F6 +// +#define GPIO_PF6_CCP1 0x00051801 +#define GPIO_PF6_C2O 0x00051802 +#define GPIO_PF6_PHA0 0x00051804 +#define GPIO_PF6_I2S0TXMCLK 0x00051809 +#define GPIO_PF6_U1RTS 0x0005180a + +// +// GPIO pin F7 +// +#define GPIO_PF7_CCP4 0x00051c01 +#define GPIO_PF7_PHB0 0x00051c04 +#define GPIO_PF7_EPI0S12 0x00051c08 +#define GPIO_PF7_FAULT1 0x00051c09 + +// +// GPIO pin G0 +// +#define GPIO_PG0_U2RX 0x00060001 +#define GPIO_PG0_PWM0 0x00060002 +#define GPIO_PG0_I2C1SCL 0x00060003 +#define GPIO_PG0_PWM4 0x00060004 +#define GPIO_PG0_USB0EPEN 0x00060007 +#define GPIO_PG0_EPI0S13 0x00060008 + +// +// GPIO pin G1 +// +#define GPIO_PG1_U2TX 0x00060401 +#define GPIO_PG1_PWM1 0x00060402 +#define GPIO_PG1_I2C1SDA 0x00060403 +#define GPIO_PG1_PWM5 0x00060404 +#define GPIO_PG1_EPI0S14 0x00060408 + +// +// GPIO pin G2 +// +#define GPIO_PG2_PWM0 0x00060801 +#define GPIO_PG2_FAULT0 0x00060804 +#define GPIO_PG2_IDX1 0x00060808 +#define GPIO_PG2_I2S0RXSD 0x00060809 + +// +// GPIO pin G3 +// +#define GPIO_PG3_PWM1 0x00060c01 +#define GPIO_PG3_FAULT2 0x00060c04 +#define GPIO_PG3_FAULT0 0x00060c08 +#define GPIO_PG3_I2S0RXMCLK 0x00060c09 + +// +// GPIO pin G4 +// +#define GPIO_PG4_CCP3 0x00061001 +#define GPIO_PG4_FAULT1 0x00061004 +#define GPIO_PG4_EPI0S15 0x00061008 +#define GPIO_PG4_PWM6 0x00061009 +#define GPIO_PG4_U1RI 0x0006100a + +// +// GPIO pin G5 +// +#define GPIO_PG5_CCP5 0x00061401 +#define GPIO_PG5_IDX0 0x00061404 +#define GPIO_PG5_FAULT1 0x00061405 +#define GPIO_PG5_PWM7 0x00061408 +#define GPIO_PG5_I2S0RXSCK 0x00061409 +#define GPIO_PG5_U1DTR 0x0006140a + +// +// GPIO pin G6 +// +#define GPIO_PG6_PHA1 0x00061801 +#define GPIO_PG6_PWM6 0x00061804 +#define GPIO_PG6_FAULT1 0x00061808 +#define GPIO_PG6_I2S0RXWS 0x00061809 +#define GPIO_PG6_U1RI 0x0006180a + +// +// GPIO pin G7 +// +#define GPIO_PG7_PHB1 0x00061c01 +#define GPIO_PG7_PWM7 0x00061c04 +#define GPIO_PG7_CCP5 0x00061c08 +#define GPIO_PG7_EPI0S31 0x00061c09 + +// +// GPIO pin H0 +// +#define GPIO_PH0_CCP6 0x00070001 +#define GPIO_PH0_PWM2 0x00070002 +#define GPIO_PH0_EPI0S6 0x00070008 +#define GPIO_PH0_PWM4 0x00070009 + +// +// GPIO pin H1 +// +#define GPIO_PH1_CCP7 0x00070401 +#define GPIO_PH1_PWM3 0x00070402 +#define GPIO_PH1_EPI0S7 0x00070408 +#define GPIO_PH1_PWM5 0x00070409 + +// +// GPIO pin H2 +// +#define GPIO_PH2_IDX1 0x00070801 +#define GPIO_PH2_C1O 0x00070802 +#define GPIO_PH2_FAULT3 0x00070804 +#define GPIO_PH2_EPI0S1 0x00070808 + +// +// GPIO pin H3 +// +#define GPIO_PH3_PHB0 0x00070c01 +#define GPIO_PH3_FAULT0 0x00070c02 +#define GPIO_PH3_USB0EPEN 0x00070c04 +#define GPIO_PH3_EPI0S0 0x00070c08 + +// +// GPIO pin H4 +// +#define GPIO_PH4_USB0PFLT 0x00071004 +#define GPIO_PH4_EPI0S10 0x00071008 +#define GPIO_PH4_SSI1CLK 0x0007100b + +// +// GPIO pin H5 +// +#define GPIO_PH5_EPI0S11 0x00071408 +#define GPIO_PH5_FAULT2 0x0007140a +#define GPIO_PH5_SSI1FSS 0x0007140b + +// +// GPIO pin H6 +// +#define GPIO_PH6_EPI0S26 0x00071808 +#define GPIO_PH6_PWM4 0x0007180a +#define GPIO_PH6_SSI1RX 0x0007180b + +// +// GPIO pin H7 +// +#define GPIO_PH7_EPI0S27 0x00071c08 +#define GPIO_PH7_PWM5 0x00071c0a +#define GPIO_PH7_SSI1TX 0x00071c0b + +// +// GPIO pin J0 +// +#define GPIO_PJ0_EPI0S16 0x00080008 +#define GPIO_PJ0_PWM0 0x0008000a +#define GPIO_PJ0_I2C1SCL 0x0008000b + +// +// GPIO pin J1 +// +#define GPIO_PJ1_EPI0S17 0x00080408 +#define GPIO_PJ1_USB0PFLT 0x00080409 +#define GPIO_PJ1_PWM1 0x0008040a +#define GPIO_PJ1_I2C1SDA 0x0008040b + +// +// GPIO pin J2 +// +#define GPIO_PJ2_EPI0S18 0x00080808 +#define GPIO_PJ2_CCP0 0x00080809 +#define GPIO_PJ2_FAULT0 0x0008080a + +// +// GPIO pin J3 +// +#define GPIO_PJ3_EPI0S19 0x00080c08 +#define GPIO_PJ3_U1CTS 0x00080c09 +#define GPIO_PJ3_CCP6 0x00080c0a + +// +// GPIO pin J4 +// +#define GPIO_PJ4_EPI0S28 0x00081008 +#define GPIO_PJ4_U1DCD 0x00081009 +#define GPIO_PJ4_CCP4 0x0008100a + +// +// GPIO pin J5 +// +#define GPIO_PJ5_EPI0S29 0x00081408 +#define GPIO_PJ5_U1DSR 0x00081409 +#define GPIO_PJ5_CCP2 0x0008140a + +// +// GPIO pin J6 +// +#define GPIO_PJ6_EPI0S30 0x00081808 +#define GPIO_PJ6_U1RTS 0x00081809 +#define GPIO_PJ6_CCP1 0x0008180a + +// +// GPIO pin J7 +// +#define GPIO_PJ7_U1DTR 0x00081c09 +#define GPIO_PJ7_CCP0 0x00081c0a + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO); +extern unsigned long GPIODirModeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType); +extern unsigned long GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, + unsigned long ulPadType); +extern void GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, + unsigned long *pulPadType); +extern void GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins); +extern long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked); +extern void GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPortIntRegister(unsigned long ulPort, + void (*pfnIntHandler)(void)); +extern void GPIOPortIntUnregister(unsigned long ulPort); +extern long GPIOPinRead(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, + unsigned char ucVal); +extern void GPIOPinConfigure(unsigned long ulPinConfig); +extern void GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutputOD(unsigned long ulPort, + unsigned char ucPins); +extern void GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.c new file mode 100644 index 00000000..2e4f858e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.c @@ -0,0 +1,962 @@ +//***************************************************************************** +// +// hibernate.c - Driver for the Hibernation module +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup hibernate_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_hibernate.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/hibernate.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// The delay in microseconds for writing to the Hibernation module registers. +// +//***************************************************************************** +#define DELAY_USECS 95 + +//***************************************************************************** +// +// The number of processor cycles to execute one pass of the delay loop. +// +//***************************************************************************** +#define LOOP_CYCLES 3 + +//***************************************************************************** +// +// The calculated number of delay loops to achieve the write delay. +// +//***************************************************************************** +static unsigned long g_ulWriteDelay; + +//***************************************************************************** +// +//! \internal +//! +//! Polls until the write complete (WRC) bit in the hibernate control register +//! is set. +//! +//! \param None. +//! +//! On non-Fury-class devices, the hibernate module provides an indication when +//! any write is completed. This is used to pace writes to the module. This +//! function merely polls this bit and returns as soon as it is set. At this +//! point, it is safe to perform another write to the module. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateWriteComplete(void) +{ + // + // Spin until the write complete bit is set. + // + while(!(HWREG(HIB_CTL) & HIB_CTL_WRC)) + { + } +} + +//***************************************************************************** +// +//! Enables the Hibernation module for operation. +//! +//! \param ulHibClk is the rate of the clock supplied to the Hibernation +//! module. +//! +//! Enables the Hibernation module for operation. This function should be +//! called before any of the Hibernation module features are used. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard-coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original HibernateEnable() API and performs the +//! same actions. A macro is provided in hibernate.h to map the +//! original API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateEnableExpClk(unsigned long ulHibClk) +{ + // + // Turn on the clock enable bit. + // + HWREG(HIB_CTL) |= HIB_CTL_CLK32EN; + + // + // For Fury-class devices, compute the number of delay loops that must be + // used to achieve the desired delay for writes to the hibernation + // registers. This value will be used in calls to SysCtlDelay(). + // + if(CLASS_IS_FURY) + { + g_ulWriteDelay = (((ulHibClk / 1000) * DELAY_USECS) / + (1000L * LOOP_CYCLES)); + g_ulWriteDelay++; + } +} + +//***************************************************************************** +// +//! Disables the Hibernation module for operation. +//! +//! Disables the Hibernation module for operation. After this function is +//! called, none of the Hibernation module features are available. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDisable(void) +{ + // + // Turn off the clock enable bit. + // + HWREG(HIB_CTL) &= ~HIB_CTL_CLK32EN; +} + +//***************************************************************************** +// +//! Selects the clock input for the Hibernation module. +//! +//! \param ulClockInput specifies the clock input. +//! +//! Configures the clock input for the Hibernation module. The configuration +//! option chosen depends entirely on hardware design. The clock input for the +//! module will either be a 32.768 kHz oscillator or a 4.194304 MHz crystal. +//! The \e ulClockFlags parameter must be one of the following: +//! +//! - \b HIBERNATE_CLOCK_SEL_RAW - use the raw signal from a 32.768 kHz +//! oscillator. +//! - \b HIBERNATE_CLOCK_SEL_DIV128 - use the crystal input, divided by 128. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateClockSelect(unsigned long ulClockInput) +{ + // + // Check the arguments. + // + ASSERT((ulClockInput == HIBERNATE_CLOCK_SEL_RAW) || + (ulClockInput == HIBERNATE_CLOCK_SEL_DIV128)); + + // + // Set the clock selection bit according to the parameter. + // + HWREG(HIB_CTL) = ulClockInput | (HWREG(HIB_CTL) & ~HIB_CTL_CLKSEL); +} + +//***************************************************************************** +// +//! Enables the RTC feature of the Hibernation module. +//! +//! Enables the RTC in the Hibernation module. The RTC can be used to wake the +//! processor from hibernation at a certain time, or to generate interrupts at +//! certain times. This function must be called before using any of the RTC +//! features of the Hibernation module. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCEnable(void) +{ + // + // Turn on the RTC enable bit. + // + HWREG(HIB_CTL) |= HIB_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Disables the RTC feature of the Hibernation module. +//! +//! Disables the RTC in the Hibernation module. After calling this function +//! the RTC features of the Hibernation module will not be available. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCDisable(void) +{ + // + // Turn off the RTC enable bit. + // + HWREG(HIB_CTL) &= ~HIB_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Configures the wake conditions for the Hibernation module. +//! +//! \param ulWakeFlags specifies which conditions should be used for waking. +//! +//! Enables the conditions under which the Hibernation module will wake. The +//! \e ulWakeFlags parameter is the logical OR of any combination of the +//! following: +//! +//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted. +//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateWakeSet(unsigned long ulWakeFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulWakeFlags & ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC))); + + // + // Set the specified wake flags in the control register. + // + HWREG(HIB_CTL) = (ulWakeFlags | + (HWREG(HIB_CTL) & + ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC))); +} + +//***************************************************************************** +// +//! Gets the currently configured wake conditions for the Hibernation module. +//! +//! Returns the flags representing the wake configuration for the Hibernation +//! module. The return value will be a combination of the following flags: +//! +//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted. +//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs. +//! +//! \return Returns flags indicating the configured wake conditions. +// +//***************************************************************************** +unsigned long +HibernateWakeGet(void) +{ + // + // Read the wake bits from the control register and return + // those bits to the caller. + // + return(HWREG(HIB_CTL) & (HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC)); +} + +//***************************************************************************** +// +//! Configures the low battery detection. +//! +//! \param ulLowBatFlags specifies behavior of low battery detection. +//! +//! Enables the low battery detection and whether hibernation is allowed if a +//! low battery is detected. If low battery detection is enabled, then a low +//! battery condition will be indicated in the raw interrupt status register, +//! and can also trigger an interrupt. Optionally, hibernation can be aborted +//! if a low battery is detected. +//! +//! The \e ulLowBatFlags parameter is one of the following values: +//! +//! - \b HIBERNATE_LOW_BAT_DETECT - detect a low battery condition. +//! - \b HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort +//! hibernation if low battery is detected. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateLowBatSet(unsigned long ulLowBatFlags) +{ + // + // Check the arguments. + // + ASSERT((ulLowBatFlags == HIBERNATE_LOW_BAT_DETECT) || + (ulLowBatFlags == HIBERNATE_LOW_BAT_ABORT)); + + // + // Set the low battery detect and abort bits in the control register, + // according to the parameter. + // + HWREG(HIB_CTL) = (ulLowBatFlags | + (HWREG(HIB_CTL) & ~HIBERNATE_LOW_BAT_ABORT)); +} + +//***************************************************************************** +// +//! Gets the currently configured low battery detection behavior. +//! +//! Returns a value representing the currently configured low battery detection +//! behavior. The return value will be one of the following: +//! +//! - \b HIBERNATE_LOW_BAT_DETECT - detect a low battery condition. +//! - \b HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort +//! hibernation if low battery is detected. +//! +//! \return Returns a value indicating the configured low battery detection. +// +//***************************************************************************** +unsigned long +HibernateLowBatGet(void) +{ + // + // Read the low bat bits from the control register and return those bits to + // the caller. + // + return(HWREG(HIB_CTL) & HIBERNATE_LOW_BAT_ABORT); +} + +//***************************************************************************** +// +//! Sets the value of the real time clock (RTC) counter. +//! +//! \param ulRTCValue is the new value for the RTC. +//! +//! Sets the value of the RTC. The RTC will count seconds if the hardware is +//! configured correctly. The RTC must be enabled by calling +//! HibernateRTCEnable() before calling this function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCSet(unsigned long ulRTCValue) +{ + // + // Write the new RTC value to the RTC load register. + // + HWREG(HIB_RTCLD) = ulRTCValue; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the real time clock (RTC) counter. +//! +//! Gets the value of the RTC and returns it to the caller. +//! +//! \return Returns the value of the RTC. +// +//***************************************************************************** +unsigned long +HibernateRTCGet(void) +{ + // + // Return the value of the RTC counter register to the caller. + // + return(HWREG(HIB_RTCC)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC match 0 register. +//! +//! \param ulMatch is the value for the match register. +//! +//! Sets the match 0 register for the RTC. The Hibernation module can be +//! configured to wake from hibernation, and/or generate an interrupt when the +//! value of the RTC counter is the same as the match register. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCMatch0Set(unsigned long ulMatch) +{ + // + // Write the new match value to the match register. + // + HWREG(HIB_RTCM0) = ulMatch; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC match 0 register. +//! +//! Gets the value of the match 0 register for the RTC. +//! +//! \return Returns the value of the match register. +// +//***************************************************************************** +unsigned long +HibernateRTCMatch0Get(void) +{ + // + // Return the value of the match register to the caller. + // + return(HWREG(HIB_RTCM0)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC match 1 register. +//! +//! \param ulMatch is the value for the match register. +//! +//! Sets the match 1 register for the RTC. The Hibernation module can be +//! configured to wake from hibernation, and/or generate an interrupt when the +//! value of the RTC counter is the same as the match register. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCMatch1Set(unsigned long ulMatch) +{ + // + // Write the new match value to the match register. + // + HWREG(HIB_RTCM1) = ulMatch; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC match 1 register. +//! +//! Gets the value of the match 1 register for the RTC. +//! +//! \return Returns the value of the match register. +// +//***************************************************************************** +unsigned long +HibernateRTCMatch1Get(void) +{ + // + // Return the value of the match register to the caller. + // + return(HWREG(HIB_RTCM1)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC predivider trim register. +//! +//! \param ulTrim is the new value for the pre-divider trim register. +//! +//! Sets the value of the pre-divider trim register. The input time source is +//! divided by the pre-divider to achieve a one-second clock rate. Once every +//! 64 seconds, the value of the pre-divider trim register is applied to the +//! predivider to allow fine-tuning of the RTC rate, in order to make +//! corrections to the rate. The software application can make adjustments to +//! the predivider trim register to account for variations in the accuracy of +//! the input time source. The nominal value is 0x7FFF, and it can be adjusted +//! up or down in order to fine-tune the RTC rate. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCTrimSet(unsigned long ulTrim) +{ + // + // Check the arguments. + // + ASSERT(ulTrim < 0x10000); + + // + // Write the new trim value to the trim register. + // + HWREG(HIB_RTCT) = ulTrim; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC predivider trim register. +//! +//! Gets the value of the pre-divider trim register. This function can be used +//! to get the current value of the trim register prior to making an adjustment +//! by using the HibernateRTCTrimSet() function. +//! +//! \return None. +// +//***************************************************************************** +unsigned long +HibernateRTCTrimGet(void) +{ + // + // Return the value of the trim register to the caller. + // + return(HWREG(HIB_RTCT)); +} + +//***************************************************************************** +// +//! Stores data in the non-volatile memory of the Hibernation module. +//! +//! \param pulData points to the data that the caller wants to store in the +//! memory of the Hibernation module. +//! \param ulCount is the count of 32-bit words to store. +//! +//! Stores a set of data in the Hibernation module non-volatile memory. This +//! memory will be preserved when the power to the processor is turned off, and +//! can be used to store application state information which will be available +//! when the processor wakes. Up to 64 32-bit words can be stored in the +//! non-volatile memory. The data can be restored by calling the +//! HibernateDataGet() function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDataSet(unsigned long *pulData, unsigned long ulCount) +{ + unsigned int uIdx; + + // + // Check the arguments. + // + ASSERT(ulCount <= 64); + ASSERT(pulData != 0); + + // + // Loop through all the words to be stored, storing one at a time. + // + for(uIdx = 0; uIdx < ulCount; uIdx++) + { + // + // Write a word to the non-volatile storage area. + // + HWREG(HIB_DATA + (uIdx * 4)) = pulData[uIdx]; + + // + // Add a delay between writes to the data area. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } + } +} + +//***************************************************************************** +// +//! Reads a set of data from the non-volatile memory of the Hibernation module. +//! +//! \param pulData points to a location where the data that is read from the +//! Hibernation module will be stored. +//! \param ulCount is the count of 32-bit words to read. +//! +//! Retrieves a set of data from the Hibernation module non-volatile memory +//! that was previously stored with the HibernateDataSet() function. The +//! caller must ensure that \e pulData points to a large enough memory block to +//! hold all the data that is read from the non-volatile memory. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDataGet(unsigned long *pulData, unsigned long ulCount) +{ + unsigned int uIdx; + + // + // Check the arguments. + // + ASSERT(ulCount <= 64); + ASSERT(pulData != 0); + + // + // Loop through all the words to be restored, reading one at a time. + // + for(uIdx = 0; uIdx < ulCount; uIdx++) + { + // + // Read a word from the non-volatile storage area. No delay is + // required between reads. + // + pulData[uIdx] = HWREG(HIB_DATA + (uIdx * 4)); + } +} + +//***************************************************************************** +// +//! Requests hibernation mode. +//! +//! This function requests the Hibernation module to disable the external +//! regulator, thus removing power from the processor and all peripherals. The +//! Hibernation module will remain powered from the battery or auxiliary power +//! supply. +//! +//! The Hibernation module will re-enable the external regulator when one of +//! the configured wake conditions occurs (such as RTC match or external +//! \b WAKE pin). When the power is restored the processor will go through a +//! normal power-on reset. The processor can retrieve saved state information +//! with the HibernateDataGet() function. Prior to calling the function to +//! request hibernation mode, the conditions for waking must have already been +//! set by using the HibernateWakeSet() function. +//! +//! Note that this function may return because some time may elapse before the +//! power is actually removed, or it may not be removed at all. For this +//! reason, the processor will continue to execute instructions for some time +//! and the caller should be prepared for this function to return. There are +//! various reasons why the power may not be removed. For example, if the +//! HibernateLowBatSet() function was used to configure an abort if low +//! battery is detected, then the power will not be removed if the battery +//! voltage is too low. There may be other reasons, related to the external +//! circuit design, that a request for hibernation may not actually occur. +//! +//! For all these reasons, the caller must be prepared for this function to +//! return. The simplest way to handle it is to just enter an infinite loop +//! and wait for the power to be removed. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRequest(void) +{ + // + // Set the bit in the control register to cut main power to the processor. + // + HWREG(HIB_CTL) |= HIB_CTL_HIBREQ; +} + +//***************************************************************************** +// +//! Enables interrupts for the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be enabled. +//! +//! Enables the specified interrupt sources from the Hibernation module. +//! +//! The \e ulIntFlags parameter must be the logical OR of any combination of +//! the following: +//! +//! - \b HIBERNATE_INT_PIN_WAKE - wake from pin interrupt +//! - \b HIBERNATE_INT_LOW_BAT - low battery interrupt +//! - \b HIBERNATE_INT_RTC_MATCH_0 - RTC match 0 interrupt +//! - \b HIBERNATE_INT_RTC_MATCH_1 - RTC match 1 interrupt +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntEnable(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Set the specified interrupt mask bits. + // + HWREG(HIB_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables interrupts for the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be disabled. +//! +//! Disables the specified interrupt sources from the Hibernation module. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to the HibernateIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntDisable(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Clear the specified interrupt mask bits. + // + HWREG(HIB_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the Hibernation module interrupt. +//! +//! \param pfnHandler points to the function to be called when a hibernation +//! interrupt occurs. +//! +//! Registers the interrupt handler in the system interrupt controller. The +//! interrupt is enabled at the global level, but individual interrupt sources +//! must still be enabled with a call to HibernateIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler. + // + IntRegister(INT_HIBERNATE, pfnHandler); + + // + // Enable the hibernate module interrupt. + // + IntEnable(INT_HIBERNATE); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the Hibernation module interrupt. +//! +//! Unregisters the interrupt handler in the system interrupt controller. The +//! interrupt is disabled at the global level, and the interrupt handler will +//! no longer be called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntUnregister(void) +{ + // + // Disable the hibernate interrupt. + // + IntDisable(INT_HIBERNATE); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_HIBERNATE); +} + +//***************************************************************************** +// +//! Gets the current interrupt status of the Hibernation module. +//! +//! \param bMasked is false to retrieve the raw interrupt status, and true to +//! retrieve the masked interrupt status. +//! +//! Returns the interrupt status of the Hibernation module. The caller can use +//! this to determine the cause of a hibernation interrupt. Either the masked +//! or raw interrupt status can be returned. +//! +//! \return Returns the interrupt status as a bit field with the values as +//! described in the HibernateIntEnable() function. +// +//***************************************************************************** +unsigned long +HibernateIntStatus(tBoolean bMasked) +{ + // + // Read and return the Hibernation module raw or masked interrupt status. + // + if(bMasked == true) + { + return(HWREG(HIB_MIS) & 0xf); + } + else + { + return(HWREG(HIB_RIS) & 0xf); + } +} + +//***************************************************************************** +// +//! Clears pending interrupts from the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be cleared. +//! +//! Clears the specified interrupt sources. This must be done from within the +//! interrupt handler or else the handler will be called again upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to the HibernateIntEnable() function. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntClear(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Write the specified interrupt bits into the interrupt clear register. + // + HWREG(HIB_IC) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Checks to see if the Hibernation module is already powered up. +//! +//! This function queries the control register to determine if the module is +//! already active. This function can be called at a power-on reset to help +//! determine if the reset is due to a wake from hibernation or a cold start. +//! If the Hibernation module is already active, then it does not need to be +//! re-enabled and its status can be queried immediately. +//! +//! The software application should also use the HibernateIntStatus() function +//! to read the raw interrupt status to determine the cause of the wake. The +//! HibernateDataGet() function can be used to restore state. These +//! combinations of functions can be used by the software to determine if the +//! processor is waking from hibernation and the appropriate action to take as +//! a result. +//! +//! \return Returns \b true if the module is already active, and \b false if +//! not. +// +//***************************************************************************** +unsigned int +HibernateIsActive(void) +{ + // + // Read the control register, and return true if the module is enabled. + // + return(HWREG(HIB_CTL) & HIB_CTL_CLK32EN ? 1 : 0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.h new file mode 100644 index 00000000..b5df6f2b --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/hibernate.h @@ -0,0 +1,127 @@ +//***************************************************************************** +// +// hibernate.h - API definition for the Hibernation module. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __HIBERNATE_H__ +#define __HIBERNATE_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macros needed for selecting the clock source for HibernateClockSelect() +// +//***************************************************************************** +#define HIBERNATE_CLOCK_SEL_RAW 0x04 +#define HIBERNATE_CLOCK_SEL_DIV128 0x00 + +//***************************************************************************** +// +// Macros need to configure wake events for HibernateWakeSet() +// +//***************************************************************************** +#define HIBERNATE_WAKE_PIN 0x10 +#define HIBERNATE_WAKE_RTC 0x08 + +//***************************************************************************** +// +// Macros needed to configure low battery detect for HibernateLowBatSet() +// +//***************************************************************************** +#define HIBERNATE_LOW_BAT_DETECT 0x20 +#define HIBERNATE_LOW_BAT_ABORT 0xA0 + +//***************************************************************************** +// +// Macros defining interrupt source bits for the interrupt functions. +// +//***************************************************************************** +#define HIBERNATE_INT_PIN_WAKE 0x08 +#define HIBERNATE_INT_LOW_BAT 0x04 +#define HIBERNATE_INT_RTC_MATCH_0 0x01 +#define HIBERNATE_INT_RTC_MATCH_1 0x02 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void HibernateEnableExpClk(unsigned long ulHibClk); +extern void HibernateDisable(void); +extern void HibernateClockSelect(unsigned long ulClockInput); +extern void HibernateRTCEnable(void); +extern void HibernateRTCDisable(void); +extern void HibernateWakeSet(unsigned long ulWakeFlags); +extern unsigned long HibernateWakeGet(void); +extern void HibernateLowBatSet(unsigned long ulLowBatFlags); +extern unsigned long HibernateLowBatGet(void); +extern void HibernateRTCSet(unsigned long ulRTCValue); +extern unsigned long HibernateRTCGet(void); +extern void HibernateRTCMatch0Set(unsigned long ulMatch); +extern unsigned long HibernateRTCMatch0Get(void); +extern void HibernateRTCMatch1Set(unsigned long ulMatch); +extern unsigned long HibernateRTCMatch1Get(void); +extern void HibernateRTCTrimSet(unsigned long ulTrim); +extern unsigned long HibernateRTCTrimGet(void); +extern void HibernateDataSet(unsigned long *pulData, unsigned long ulCount); +extern void HibernateDataGet(unsigned long *pulData, unsigned long ulCount); +extern void HibernateRequest(void); +extern void HibernateIntEnable(unsigned long ulIntFlags); +extern void HibernateIntDisable(unsigned long ulIntFlags); +extern void HibernateIntRegister(void (*pfnHandler)(void)); +extern void HibernateIntUnregister(void); +extern unsigned long HibernateIntStatus(tBoolean bMasked); +extern void HibernateIntClear(unsigned long ulIntFlags); +extern unsigned int HibernateIsActive(void); + +//***************************************************************************** +// +// Several Hibernate module APIs have been renamed, with the original function +// name being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define HibernateEnable(a) \ + HibernateEnableExpClk(a, SysCtlClockGet()) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __HIBERNATE_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.c new file mode 100644 index 00000000..ed9ef655 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.c @@ -0,0 +1,1106 @@ +//***************************************************************************** +// +// i2c.c - Driver for Inter-IC (I2C) bus block. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup i2c_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_i2c.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/i2c.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Initializes the I2C Master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ulI2CClk is the rate of the clock supplied to the I2C module. +//! \param bFast set up for fast data transfers +//! +//! This function initializes operation of the I2C Master block. Upon +//! successful initialization of the I2C block, this function will have set the +//! bus speed for the master, and will have enabled the I2C Master block. +//! +//! If the parameter \e bFast is \b true, then the master block will be set up +//! to transfer data at 400 kbps; otherwise, it will be set up to transfer data +//! at 100 kbps. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original I2CMasterInit() API and performs the +//! same actions. A macro is provided in i2c.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterInitExpClk(unsigned long ulBase, unsigned long ulI2CClk, + tBoolean bFast) +{ + unsigned long ulSCLFreq; + unsigned long ulTPR; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Must enable the device before doing anything else. + // + I2CMasterEnable(ulBase); + + // + // Get the desired SCL speed. + // + if(bFast == true) + { + ulSCLFreq = 400000; + } + else + { + ulSCLFreq = 100000; + } + + // + // Compute the clock divider that achieves the fastest speed less than or + // equal to the desired speed. The numerator is biased to favor a larger + // clock divider so that the resulting clock is always less than or equal + // to the desired clock, never greater. + // + ulTPR = ((ulI2CClk + (2 * 10 * ulSCLFreq) - 1) / (2 * 10 * ulSCLFreq)) - 1; + HWREG(ulBase + I2C_O_MTPR) = ulTPR; +} + +//***************************************************************************** +// +//! Initializes the I2C Slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ucSlaveAddr 7-bit slave address +//! +//! This function initializes operation of the I2C Slave block. Upon +//! successful initialization of the I2C blocks, this function will have set +//! the slave address and have enabled the I2C Slave block. +//! +//! The parameter \e ucSlaveAddr is the value that will be compared against the +//! slave address sent by an I2C master. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveInit(unsigned long ulBase, unsigned char ucSlaveAddr) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + ASSERT(!(ucSlaveAddr & 0x80)); + + // + // Must enable the device before doing anything else. + // + I2CSlaveEnable(ulBase); + + // + // Set up the slave address. + // + HWREG(ulBase + I2C_O_SOAR) = ucSlaveAddr; +} + +//***************************************************************************** +// +//! Enables the I2C Master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This will enable operation of the I2C Master block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Enable the master block. + // + HWREG(ulBase + I2C_O_MCR) |= I2C_MCR_MFE; +} + +//***************************************************************************** +// +//! Enables the I2C Slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This will enable operation of the I2C Slave block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the clock to the slave block. + // + HWREG(ulBase - I2C0_SLAVE_BASE + I2C0_MASTER_BASE + I2C_O_MCR) |= + I2C_MCR_SFE; + + // + // Enable the slave. + // + HWREG(ulBase + I2C_O_SCSR) = I2C_SCSR_DA; +} + +//***************************************************************************** +// +//! Disables the I2C master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This will disable operation of the I2C master block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Disable the master block. + // + HWREG(ulBase + I2C_O_MCR) &= ~(I2C_MCR_MFE); +} + +//***************************************************************************** +// +//! Disables the I2C slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This will disable operation of the I2C slave block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave. + // + HWREG(ulBase + I2C_O_SCSR) = 0; + + // + // Disable the clock to the slave block. + // + HWREG(ulBase - I2C0_SLAVE_BASE + I2C0_MASTER_BASE + I2C_O_MCR) &= + ~(I2C_MCR_SFE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the I2C module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param pfnHandler is a pointer to the function to be called when the +//! I2C interrupt occurs. +//! +//! This sets the handler to be called when an I2C interrupt occurs. This will +//! enable the global interrupt in the interrupt controller; specific I2C +//! interrupts must be enabled via I2CMasterIntEnable() and +//! I2CSlaveIntEnable(). If necessary, it is the interrupt handler's +//! responsibility to clear the interrupt source via I2CMasterIntClear() and +//! I2CSlaveIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2CIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Determine the interrupt number based on the I2C port. + // + ulInt = (ulBase == I2C0_MASTER_BASE) ? INT_I2C0 : INT_I2C1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the I2C interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the I2C module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function will clear the handler to be called when an I2C interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2CIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Determine the interrupt number based on the I2C port. + // + ulInt = (ulBase == I2C0_MASTER_BASE) ? INT_I2C0 : INT_I2C1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables the I2C Master interrupt. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! Enables the I2C Master interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Enable the master interrupt. + // + HWREG(ulBase + I2C_O_MIMR) = 1; +} + +//***************************************************************************** +// +//! Enables the I2C Slave interrupt. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! Enables the I2C Slave interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) |= I2C_SLAVE_INT_DATA; +} + +//***************************************************************************** +// +//! Enables individual I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated I2C Slave interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b I2C_SLAVE_INT_STOP - Stop condition detected interrupt +//! - \b I2C_SLAVE_INT_START - Start condition detected interrupt +//! - \b I2C_SLAVE_INT_DATA - Data interrupt +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntEnableEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables the I2C Master interrupt. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! Disables the I2C Master interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Disable the master interrupt. + // + HWREG(ulBase + I2C_O_MIMR) = 0; +} + +//***************************************************************************** +// +//! Disables the I2C Slave interrupt. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! Disables the I2C Slave interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) &= ~I2C_SLAVE_INT_DATA; +} + +//***************************************************************************** +// +//! Disables individual I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated I2C Slave interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to I2CSlaveIntEnableEx(). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntDisableEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the current I2C Master interrupt status. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Master module. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, returned as \b true if active +//! or \b false if not active. +// +//***************************************************************************** +tBoolean +I2CMasterIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return((HWREG(ulBase + I2C_O_MMIS)) ? true : false); + } + else + { + return((HWREG(ulBase + I2C_O_MRIS)) ? true : false); + } +} + +//***************************************************************************** +// +//! Gets the current I2C Slave interrupt status. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Slave module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, returned as \b true if active +//! or \b false if not active. +// +//***************************************************************************** +tBoolean +I2CSlaveIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return((HWREG(ulBase + I2C_O_SMIS)) ? true : false); + } + else + { + return((HWREG(ulBase + I2C_O_SRIS)) ? true : false); + } +} + +//***************************************************************************** +// +//! Gets the current I2C Slave interrupt status. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Slave module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in I2CSlaveIntEnableEx(). +// +//***************************************************************************** +unsigned long +I2CSlaveIntStatusEx(unsigned long ulBase, tBoolean bMasked) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + // + // Workaround for I2C slave masked interrupt status register errata + // (7.1) for Dustdevil Rev A0 devices. + // + if(CLASS_IS_DUSTDEVIL && REVISION_IS_A0) + { + ulValue = HWREG(ulBase + I2C_O_SRIS); + return(ulValue & HWREG(ulBase + I2C_O_SIMR)); + } + else + { + return(HWREG(ulBase + I2C_O_SMIS)); + } + } + else + { + return(HWREG(ulBase + I2C_O_SRIS)); + } +} + +//***************************************************************************** +// +//! Clears I2C Master interrupt sources. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! The I2C Master interrupt source is cleared, so that it no longer asserts. +//! This must be done in the interrupt handler to keep it from being called +//! again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Clear the I2C master interrupt source. + // + HWREG(ulBase + I2C_O_MICR) = I2C_MICR_IC; + + // + // Workaround for I2C master interrupt clear errata for rev B Stellaris + // devices. For later devices, this write is ignored and therefore + // harmless (other than the slight performance hit). + // + HWREG(ulBase + I2C_O_MMIS) = I2C_MICR_IC; +} + +//***************************************************************************** +// +//! Clears I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! The I2C Slave interrupt source is cleared, so that it no longer asserts. +//! This must be done in the interrupt handler to keep it from being called +//! again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Clear the I2C slave interrupt source. + // + HWREG(ulBase + I2C_O_SICR) = I2C_SICR_DATAIC; +} + +//***************************************************************************** +// +//! Clears I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified I2C Slave interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to I2CSlaveIntEnableEx(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntClearEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Clear the I2C slave interrupt source. + // + HWREG(ulBase + I2C_O_SICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Sets the address that the I2C Master will place on the bus. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ucSlaveAddr 7-bit slave address +//! \param bReceive flag indicating the type of communication with the slave +//! +//! This function will set the address that the I2C Master will place on the +//! bus when initiating a transaction. When the \e bReceive parameter is set +//! to \b true, the address will indicate that the I2C Master is initiating a +//! read from the slave; otherwise the address will indicate that the I2C +//! Master is initiating a write to the slave. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterSlaveAddrSet(unsigned long ulBase, unsigned char ucSlaveAddr, + tBoolean bReceive) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + ASSERT(!(ucSlaveAddr & 0x80)); + + // + // Set the address of the slave with which the master will communicate. + // + HWREG(ulBase + I2C_O_MSA) = (ucSlaveAddr << 1) | bReceive; +} + +//***************************************************************************** +// +//! Indicates whether or not the I2C Master is busy. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function returns an indication of whether or not the I2C Master is +//! busy transmitting or receiving data. +//! +//! \return Returns \b true if the I2C Master is busy; otherwise, returns +//! \b false. +// +//***************************************************************************** +tBoolean +I2CMasterBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return the busy status. + // + if(HWREG(ulBase + I2C_O_MCS) & I2C_MCS_BUSY) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Indicates whether or not the I2C bus is busy. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function returns an indication of whether or not the I2C bus is busy. +//! This function can be used in a multi-master environment to determine if +//! another master is currently using the bus. +//! +//! \return Returns \b true if the I2C bus is busy; otherwise, returns +//! \b false. +// +//***************************************************************************** +tBoolean +I2CMasterBusBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return the bus busy status. + // + if(HWREG(ulBase + I2C_O_MCS) & I2C_MCS_BUSBSY) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Controls the state of the I2C Master module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ulCmd command to be issued to the I2C Master module +//! +//! This function is used to control the state of the Master module send and +//! receive operations. The \e ucCmd parameter can be one of the following +//! values: +//! +//! - \b I2C_MASTER_CMD_SINGLE_SEND +//! - \b I2C_MASTER_CMD_SINGLE_RECEIVE +//! - \b I2C_MASTER_CMD_BURST_SEND_START +//! - \b I2C_MASTER_CMD_BURST_SEND_CONT +//! - \b I2C_MASTER_CMD_BURST_SEND_FINISH +//! - \b I2C_MASTER_CMD_BURST_SEND_ERROR_STOP +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_START +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_CONT +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_FINISH +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterControl(unsigned long ulBase, unsigned long ulCmd) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + ASSERT((ulCmd == I2C_MASTER_CMD_SINGLE_SEND) || + (ulCmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_START) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_CONT) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_FINISH) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_ERROR_STOP) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_START) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_CONT) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_FINISH) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP)); + + // + // Send the command. + // + HWREG(ulBase + I2C_O_MCS) = ulCmd; +} + +//***************************************************************************** +// +//! Gets the error status of the I2C Master module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function is used to obtain the error status of the Master module send +//! and receive operations. +//! +//! \return Returns the error status, as one of \b I2C_MASTER_ERR_NONE, +//! \b I2C_MASTER_ERR_ADDR_ACK, \b I2C_MASTER_ERR_DATA_ACK, or +//! \b I2C_MASTER_ERR_ARB_LOST. +// +//***************************************************************************** +unsigned long +I2CMasterErr(unsigned long ulBase) +{ + unsigned long ulErr; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Get the raw error state + // + ulErr = HWREG(ulBase + I2C_O_MCS); + + // + // If the I2C master is busy, then all the other bit are invalid, and + // don't have an error to report. + // + if(ulErr & I2C_MCS_BUSY) + { + return(I2C_MASTER_ERR_NONE); + } + + // + // Check for errors. + // + if(ulErr & (I2C_MCS_ERROR | I2C_MCS_ARBLST)) + { + return(ulErr & (I2C_MCS_ARBLST | I2C_MCS_DATACK | I2C_MCS_ADRACK)); + } + else + { + return(I2C_MASTER_ERR_NONE); + } +} + +//***************************************************************************** +// +//! Transmits a byte from the I2C Master. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ucData data to be transmitted from the I2C Master +//! +//! This function will place the supplied data into I2C Master Data Register. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterDataPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Write the byte. + // + HWREG(ulBase + I2C_O_MDR) = ucData; +} + +//***************************************************************************** +// +//! Receives a byte that has been sent to the I2C Master. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function reads a byte of data from the I2C Master Data Register. +//! +//! \return Returns the byte received from by the I2C Master, cast as an +//! unsigned long. +// +//***************************************************************************** +unsigned long +I2CMasterDataGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Read a byte. + // + return(HWREG(ulBase + I2C_O_MDR)); +} + +//***************************************************************************** +// +//! Gets the I2C Slave module status +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This function will return the action requested from a master, if any. +//! Possible values are: +//! +//! - \b I2C_SLAVE_ACT_NONE +//! - \b I2C_SLAVE_ACT_RREQ +//! - \b I2C_SLAVE_ACT_TREQ +//! - \b I2C_SLAVE_ACT_RREQ_FBR +//! +//! \return Returns \b I2C_SLAVE_ACT_NONE to indicate that no action has been +//! requested of the I2C Slave module, \b I2C_SLAVE_ACT_RREQ to indicate that +//! an I2C master has sent data to the I2C Slave module, \b I2C_SLAVE_ACT_TREQ +//! to indicate that an I2C master has requested that the I2C Slave module send +//! data, and \b I2C_SLAVE_ACT_RREQ_FBR to indicate that an I2C master has sent +//! data to the I2C slave and the first byte following the slave's own address +//! has been received. +// +//***************************************************************************** +unsigned long +I2CSlaveStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return the slave status. + // + return(HWREG(ulBase + I2C_O_SCSR)); +} + +//***************************************************************************** +// +//! Transmits a byte from the I2C Slave. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ucData data to be transmitted from the I2C Slave +//! +//! This function will place the supplied data into I2C Slave Data Register. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Write the byte. + // + HWREG(ulBase + I2C_O_SDR) = ucData; +} + +//***************************************************************************** +// +//! Receives a byte that has been sent to the I2C Slave. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This function reads a byte of data from the I2C Slave Data Register. +//! +//! \return Returns the byte received from by the I2C Slave, cast as an +//! unsigned long. +// +//***************************************************************************** +unsigned long +I2CSlaveDataGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Read a byte. + // + return(HWREG(ulBase + I2C_O_SDR)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.h new file mode 100644 index 00000000..d277dce3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2c.h @@ -0,0 +1,179 @@ +//***************************************************************************** +// +// i2c.h - Prototypes for the I2C Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __I2C_H__ +#define __I2C_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Defines for the API. +// +//***************************************************************************** + +//***************************************************************************** +// +// Interrupt defines. +// +//***************************************************************************** +#define I2C_INT_MASTER 0x00000001 +#define I2C_INT_SLAVE 0x00000002 + +//***************************************************************************** +// +// I2C Master commands. +// +//***************************************************************************** +#define I2C_MASTER_CMD_SINGLE_SEND \ + 0x00000007 +#define I2C_MASTER_CMD_SINGLE_RECEIVE \ + 0x00000007 +#define I2C_MASTER_CMD_BURST_SEND_START \ + 0x00000003 +#define I2C_MASTER_CMD_BURST_SEND_CONT \ + 0x00000001 +#define I2C_MASTER_CMD_BURST_SEND_FINISH \ + 0x00000005 +#define I2C_MASTER_CMD_BURST_SEND_ERROR_STOP \ + 0x00000004 +#define I2C_MASTER_CMD_BURST_RECEIVE_START \ + 0x0000000b +#define I2C_MASTER_CMD_BURST_RECEIVE_CONT \ + 0x00000009 +#define I2C_MASTER_CMD_BURST_RECEIVE_FINISH \ + 0x00000005 +#define I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP \ + 0x00000004 + +//***************************************************************************** +// +// I2C Master error status. +// +//***************************************************************************** +#define I2C_MASTER_ERR_NONE 0 +#define I2C_MASTER_ERR_ADDR_ACK 0x00000004 +#define I2C_MASTER_ERR_DATA_ACK 0x00000008 +#define I2C_MASTER_ERR_ARB_LOST 0x00000010 + +//***************************************************************************** +// +// I2C Slave action requests +// +//***************************************************************************** +#define I2C_SLAVE_ACT_NONE 0 +#define I2C_SLAVE_ACT_RREQ 0x00000001 // Master has sent data +#define I2C_SLAVE_ACT_TREQ 0x00000002 // Master has requested data +#define I2C_SLAVE_ACT_RREQ_FBR 0x00000005 // Master has sent first byte + +//***************************************************************************** +// +// Miscellaneous I2C driver definitions. +// +//***************************************************************************** +#define I2C_MASTER_MAX_RETRIES 1000 // Number of retries + + +//***************************************************************************** +// +// I2C Slave interrupts. +// +//***************************************************************************** +#define I2C_SLAVE_INT_STOP 0x00000004 // Stop Condition Interrupt. +#define I2C_SLAVE_INT_START 0x00000002 // Start Condition Interrupt. +#define I2C_SLAVE_INT_DATA 0x00000001 // Data Interrupt. + + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void I2CIntRegister(unsigned long ulBase, void(fnHandler)(void)); +extern void I2CIntUnregister(unsigned long ulBase); +extern tBoolean I2CMasterBusBusy(unsigned long ulBase); +extern tBoolean I2CMasterBusy(unsigned long ulBase); +extern void I2CMasterControl(unsigned long ulBase, unsigned long ulCmd); +extern unsigned long I2CMasterDataGet(unsigned long ulBase); +extern void I2CMasterDataPut(unsigned long ulBase, unsigned char ucData); +extern void I2CMasterDisable(unsigned long ulBase); +extern void I2CMasterEnable(unsigned long ulBase); +extern unsigned long I2CMasterErr(unsigned long ulBase); +extern void I2CMasterInitExpClk(unsigned long ulBase, unsigned long ulI2CClk, + tBoolean bFast); +extern void I2CMasterIntClear(unsigned long ulBase); +extern void I2CMasterIntDisable(unsigned long ulBase); +extern void I2CMasterIntEnable(unsigned long ulBase); +extern tBoolean I2CMasterIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void I2CMasterSlaveAddrSet(unsigned long ulBase, + unsigned char ucSlaveAddr, + tBoolean bReceive); +extern unsigned long I2CSlaveDataGet(unsigned long ulBase); +extern void I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData); +extern void I2CSlaveDisable(unsigned long ulBase); +extern void I2CSlaveEnable(unsigned long ulBase); +extern void I2CSlaveInit(unsigned long ulBase, unsigned char ucSlaveAddr); +extern void I2CSlaveIntClear(unsigned long ulBase); +extern void I2CSlaveIntDisable(unsigned long ulBase); +extern void I2CSlaveIntEnable(unsigned long ulBase); +extern void I2CSlaveIntClearEx(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2CSlaveIntDisableEx(unsigned long ulBase, + unsigned long ulIntFlags); +extern void I2CSlaveIntEnableEx(unsigned long ulBase, unsigned long ulIntFlags); +extern tBoolean I2CSlaveIntStatus(unsigned long ulBase, tBoolean bMasked); +extern unsigned long I2CSlaveIntStatusEx(unsigned long ulBase, + tBoolean bMasked); +extern unsigned long I2CSlaveStatus(unsigned long ulBase); + +//***************************************************************************** +// +// Several I2C APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define I2CMasterInit(a, b) \ + I2CMasterInitExpClk(a, SysCtlClockGet(), b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __I2C_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.c new file mode 100644 index 00000000..42749354 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.c @@ -0,0 +1,1136 @@ +//***************************************************************************** +// +// i2s.c - Driver for the I2S controller. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup i2s_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_i2s.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/i2s.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Enables the I2S transmit module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function enables the transmit module for operation. The module +//! should be enabled after configuration. When the module is disabled, +//! no data or clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the tx FIFO service request. + // + HWREG(ulBase + I2S_O_TXISM) = I2S_TXISM_FFM; + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_TXEN; +} + +//***************************************************************************** +// +//! Disables the I2S transmit module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function disables the transmit module for operation. The module +//! should be disabled before configuration. When the module is disabled, +//! no data or clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) &= ~I2S_CFG_TXEN; +} + +//***************************************************************************** +// +//! Writes data samples to the I2S transmit FIFO with blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param ulData is the single or dual channel I2S data. +//! +//! This function writes a single channel sample or combined left-right +//! samples to the I2S transmit FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2STxConfigSet(). +//! If the transmit mode is I2S_MODE_DUAL_STEREO then the \e ulData parameter +//! contains either the left or right sample. The left and right sample +//! alternate with each write to the FIFO, left sample first. If the transmit +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! \e ulData parameter contains both the left and right samples. If the +//! transmit mode is I2S_MODE_SINGLE_MONO then the \e ulData parameter +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are written at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no room in the transmit FIFO, then this function will wait +//! in a polling loop until the data can be written. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxDataPut(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Wait until there is space. + // + while(HWREG(ulBase + I2S_O_TXLEV) >= 16) + { + } + + // + // Write the data to the I2S. + // + HWREG(ulBase + I2S_O_TXFIFO) = ulData; +} + +//***************************************************************************** +// +//! Writes data samples to the I2S transmit FIFO without blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param ulData is the single or dual channel I2S data. +//! +//! This function writes a single channel sample or combined left-right +//! samples to the I2S transmit FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2STxConfigSet(). +//! If the transmit mode is I2S_MODE_DUAL_STEREO then the \e ulData parameter +//! contains either the left or right sample. The left and right sample +//! alternate with each write to the FIFO, left sample first. If the transmit +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! \e ulData parameter contains both the left and right samples. If the +//! transmit mode is I2S_MODE_SINGLE_MONO then the \e ulData parameter +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are written at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no room in the transmit FIFO, then this function will return +//! immediately without writing any data to the FIFO. +//! +//! \return The number of elements written to the I2S transmit FIFO (1 or 0). +// +//***************************************************************************** +long +I2STxDataPutNonBlocking(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Check for space to write. + // + if(HWREG(ulBase + I2S_O_TXLEV) < 16) + { + HWREG(ulBase + I2S_O_TXFIFO) = ulData; + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Configures the I2S transmit module. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S transmit +//! channel. The parameter \e ulConfig is the logical OR of the following +//! options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S transmitter is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! - \b I2S_CONFIG_EMPTY_ZERO or \b I2S_CONFIG_EMPTY_REPEAT to select whether +//! the module transmits zeroes or repeats the last sample when the FIFO is +//! empty. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_EMPTY_MASK | I2S_CONFIG_CLK_MASK | + I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Check to see if a compact mode is used. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + // + // If compact 8 mode is used, then need to adjust some bits + // before writing the config register. Also set the FIFO + // config register for 8 bit compact samples. + // + ulConfig &= ~I2S_CONFIG_MODE_MONO; + HWREG(ulBase + I2S_O_TXFIFOCFG) = I2S_TXFIFOCFG_CSS; + } + else + { + // + // If compact 8 mode is not used, then set the FIFO config + // register for 16 bit. This is okay if a compact mode is + // not used. + // + HWREG(ulBase + I2S_O_TXFIFOCFG) = 0; + } + + // + // Write the configuration register. Since all the fields are + // specified by the configuration parameter, it is not necessary + // to do a read-modify-write. + // + HWREG(ulBase + I2S_O_TXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the FIFO level at which a service request is generated. +//! +//! \param ulBase is the I2S module base address. +//! \param ulLevel is the FIFO service request limit. +//! +//! This function is used to set the transmit FIFO fullness level at which +//! a service request will occur. The service request is used to generate +//! an interrupt or a DMA transfer request. The transmit FIFO will +//! generate a service request when the number of items in the FIFO is +//! less than the level specified in the \e ulLevel parameter. For example, +//! if \e ulLevel is 8, then a service request will be generated when +//! there are less than 8 samples remaining in the transmit FIFO. +//! +//! For the purposes of counting the FIFO level, a left-right sample pair +//! counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, the level must be an even number from 0 to 16. The +//! maximum value is 16, which will cause a service request when there +//! is any room in the FIFO. The minimum value is 0, which disables the +//! service request. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(ulLevel <= 16); + + // + // Write the FIFO limit + // + HWREG(ulBase + I2S_O_TXLIMIT) = ulLevel; +} + +//***************************************************************************** +// +//! Gets the current setting of the FIFO service request level. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the value of the transmit FIFO service +//! request level. This value is set using the I2STxFIFOLimitSet() +//! function. +//! +//! \return Returns the current value of the FIFO service request limit. +// +//***************************************************************************** +unsigned long +I2STxFIFOLimitGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the FIFO limit + // + return(HWREG(ulBase + I2S_O_TXLIMIT)); +} + +//***************************************************************************** +// +//! Gets the number of samples in the transmit FIFO. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the number of samples in the transmit +//! FIFO. For the purposes of measuring the FIFO level, a left-right sample +//! pair counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, normally the level will be an even number from 0 to +//! 16. If dual stereo mode is used and only the left sample has been +//! written without the matching right sample, then the FIFO level will be an +//! odd value. If the FIFO level is odd, it indicates a left-right sample +//! mismatch. +//! +//! \return Returns the number of samples in the transmit FIFO, which will +//! normally be an even number. +// +//***************************************************************************** +unsigned long +I2STxFIFOLevelGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the transmit FIFO level. + // + return(HWREG(ulBase + I2S_O_TXLEV)); +} + +//***************************************************************************** +// +//! Enables the I2S receive module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function enables the receive module for operation. The module +//! should be enabled after configuration. When the module is disabled, +//! no data will be clocked in regardless of the signals on the I2S interface. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the tx FIFO service request. + // + HWREG(ulBase + I2S_O_RXISM) = I2S_RXISM_FFM; + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Disables the I2S receive module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function disables the receive module for operation. The module +//! should be disabled before configuration. When the module is disabled, +//! no data will be clocked in regardless of the signals on the I2S interface. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) &= ~I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Reads data samples from the I2S receive FIFO with blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param pulData points to storage for the returned I2S sample data. +//! +//! This function reads a single channel sample or combined left-right +//! samples from the I2S receive FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2SRxConfigSet(). +//! If the receive mode is I2S_MODE_DUAL_STEREO then the returned value +//! contains either the left or right sample. The left and right sample +//! alternate with each read from the FIFO, left sample first. If the receive +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! returned data contains both the left and right samples. If the +//! receive mode is I2S_MODE_SINGLE_MONO then the returned data +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are read at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no data in the receive FIFO, then this function will wait +//! in a polling loop until data is available. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxDataGet(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Wait until there is data available. + // + while(HWREG(ulBase + I2S_O_RXLEV) == 0) + { + } + + // + // Read data from the I2S receive FIFO. + // + *pulData = HWREG(ulBase + I2S_O_RXFIFO); +} + +//***************************************************************************** +// +//! Reads data samples from the I2S receive FIFO without blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param pulData points to storage for the returned I2S sample data. +//! +//! This function reads a single channel sample or combined left-right +//! samples from the I2S receive FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2SRxConfigSet(). +//! If the receive mode is I2S_MODE_DUAL_STEREO then the received data +//! contains either the left or right sample. The left and right sample +//! alternate with each read from the FIFO, left sample first. If the receive +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! received data contains both the left and right samples. If the +//! receive mode is I2S_MODE_SINGLE_MONO then the received data +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are read at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no data in the receive FIFO, then this function will return +//! immediately without reading any data from the FIFO. +//! +//! \return The number of elements read from the I2S receive FIFO (1 or 0). +// +//***************************************************************************** +long +I2SRxDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Check for available samples. + // + if(HWREG(ulBase + I2S_O_RXLEV) != 0) + { + *pulData = HWREG(ulBase + I2S_O_RXFIFO); + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Configures the I2S receive module. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S receive +//! channel. The parameter \e ulConfig is the logical OR of the following +//! options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S receiver is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_CLK_MASK | I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Clear out any prior config of the RX FIFO config register. + // + HWREG(ulBase + I2S_O_RXFIFOCFG) = 0; + + // + // If mono mode is used, then the FMM bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_MONO) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_FMM; + } + + // + // If a compact mode is used, then the CSS bit needs to be set. + // + else if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_CSS; + } + + // + // The "mono" bits needs to be removed from the configuration word + // prior to writing to hardware, because the RX configuration register + // does not actually use these bits. + // + ulConfig &= ~I2S_CONFIG_MODE_MONO; + + // + // Write the configuration register. Since all the fields are + // specified by the configuration parameter, it is not necessary + // to do a read-modify-write. + // + HWREG(ulBase + I2S_O_RXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the FIFO level at which a service request is generated. +//! +//! \param ulBase is the I2S module base address. +//! \param ulLevel is the FIFO service request limit. +//! +//! This function is used to set the receive FIFO fullness level at which +//! a service request will occur. The service request is used to generate +//! an interrupt or a DMA transfer request. The receive FIFO will +//! generate a service request when the number of items in the FIFO is +//! greater than the level specified in the \e ulLevel parameter. For example, +//! if \e ulLevel is 4, then a service request will be generated when +//! there are more than 4 samples available in the receive FIFO. +//! +//! For the purposes of counting the FIFO level, a left-right sample pair +//! counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, the level must be an even number from 0 to 16. The +//! minimum value is 0, which will cause a service request when there +//! is any data available in the FIFO. The maximum value is 16, which +//! disables the service request (because there cannot be more than 16 +//! items in the FIFO). +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(ulLevel <= 16); + + // + // Write the FIFO limit + // + HWREG(ulBase + I2S_O_RXLIMIT) = ulLevel; +} + +//***************************************************************************** +// +//! Gets the current setting of the FIFO service request level. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the value of the receive FIFO service +//! request level. This value is set using the I2SRxFIFOLimitSet() +//! function. +//! +//! \return Returns the current value of the FIFO service request limit. +// +//***************************************************************************** +unsigned long +I2SRxFIFOLimitGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the FIFO limit. The lower bit is masked + // because it always reads as 1, and has no meaning. + // + return(HWREG(ulBase + I2S_O_RXLIMIT) & 0xFFFE); +} + +//***************************************************************************** +// +//! Gets the number of samples in the receive FIFO. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the number of samples in the receive +//! FIFO. For the purposes of measuring the FIFO level, a left-right sample +//! pair counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, normally the level will be an even number from 0 to +//! 16. If dual stereo mode is used and only the left sample has been +//! read without reading the matching right sample, then the FIFO level will +//! be an odd value. If the FIFO level is odd, it indicates a left-right +//! sample mismatch. +//! +//! \return Returns the number of samples in the transmit FIFO, which will +//! normally be an even number. +// +//***************************************************************************** +unsigned long +I2SRxFIFOLevelGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the receive FIFO level. + // + return(HWREG(ulBase + I2S_O_RXLEV)); +} + +//***************************************************************************** +// +//! Enables the I2S transmit and receive modules for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function simultaneously enables the transmit and receive modules for +//! operation, providing a synchronized SCLK and LRCLK. The module should be +//! enabled after configuration. When the module is disabled, no data or +//! clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the Tx FIFO service request. + // + HWREG(ulBase + I2S_O_TXISM) = I2S_TXISM_FFM; + + // + // Enable the Rx FIFO service request. + // + HWREG(ulBase + I2S_O_RXISM) = I2S_RXISM_FFM; + + // + // Enable the transmit and receive modules. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_TXEN | I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Disables the I2S transmit and receive modules. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function simultaneously disables the transmit and receive modules. +//! When the module is disabled, no data or clocks will be generated on the I2S +//! signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Disable the transmit and receive modules. + // + HWREG(ulBase + I2S_O_CFG) &= ~(I2S_CFG_TXEN | I2S_CFG_RXEN); +} + +//***************************************************************************** +// +//! Configures the I2S transmit and receive modules. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S transmit and +//! receive channels with identical parameters. The parameter \e ulConfig is +//! the logical OR of the following options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S transmitter is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! - \b I2S_CONFIG_EMPTY_ZERO or \b I2S_CONFIG_EMPTY_REPEAT to select whether +//! the module transmits zeroes or repeats the last sample when the FIFO is +//! empty. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_EMPTY_MASK | I2S_CONFIG_CLK_MASK | + I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Clear out any prior configuration of the FIFO config registers. + // + HWREG(ulBase + I2S_O_TXFIFOCFG) = 0; + HWREG(ulBase + I2S_O_RXFIFOCFG) = 0; + + // + // If mono mode is used, then the FMM bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_MONO) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_FMM; + ulConfig &= ~(I2S_CONFIG_MODE_MONO); + } + + // + // If a compact mode is used, then the CSS bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + HWREG(ulBase + I2S_O_TXFIFOCFG) |= I2S_TXFIFOCFG_CSS; + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_CSS; + } + + // + // Write the configuration register. Since all the fields are specified by + // the configuration parameter, it is not necessary to do a + // read-modify-write. + // + HWREG(ulBase + I2S_O_TXCFG) = ulConfig; + HWREG(ulBase + I2S_O_RXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Selects the source of the master clock, internal or external. +//! +//! \param ulBase is the I2S module base address. +//! \param ulMClock is the logical OR of the master clock configuration +//! choices. +//! +//! This function selects whether the master clock is sourced from the device +//! internal PLL, or comes from an external pin. The I2S serial bit clock +//! (SCLK) and left-right word clock (LRCLK) are derived from the I2S master +//! clock. The transmit and receive modules can be configured independently. +//! The \e ulMClock parameter is chosen from the following: +//! +//! - one of \b I2S_TX_MCLK_EXT or \b I2S_TX_MCLK_INT +//! - one of \b I2S_RX_MCLK_EXT or \b I2S_RX_MCLK_INT +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock) +{ + unsigned long ulConfig; + + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulMClock & (I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT)) == ulMClock); + + // + // Set the clock selection bits in the configuation word. + // + ulConfig = HWREG(ulBase + I2S_O_CFG) & + ~(I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT); + HWREG(ulBase + I2S_O_CFG) = ulConfig | ulMClock; +} + +//***************************************************************************** +// +//! Enables I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! This function enables the specified I2S sources to generate interrupts. +//! The \e ulIntFlags parameter can be the logical OR of any of the following +//! values: +//! +//! - \b I2S_INT_RXERR for receive errors +//! - \b I2S_INT_RXREQ for receive FIFO service requests +//! - \b I2S_INT_TXERR for transmit errors +//! - \b I2S_INT_TXREQ for transmit FIFO service requests +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + I2S_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! This function disables the specified I2S sources for interrupt +//! generation. The \e ulIntFlags parameter can be the logical OR +//! of any of the following values: \b I2S_INT_RXERR, \b I2S_INT_RXREQ, +//! \b I2S_INT_TXERR, or \b I2S_INT_TXREQ. +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + I2S_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the I2S interrupt status. +//! +//! \param ulBase is the I2S module base address. +//! \param bMasked is set \b true to get the masked interrupt status, or +//! \b false to get the raw interrupt status. +//! +//! This function returns the I2S interrupt status. It can return either +//! the raw or masked interrupt status. +//! +//! \return Returns the masked or raw I2S interrupt status, as a bit field +//! of any of the following values: \b I2S_INT_RXERR, \b I2S_INT_RXREQ, +//! \b I2S_INT_TXERR, or \b I2S_INT_TXREQ +// +//***************************************************************************** +unsigned long +I2SIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + I2S_O_MIS)); + } + else + { + return(HWREG(ulBase + I2S_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears pending I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! This function clears the specified pending I2S interrupts. This must +//! be done in the interrupt handler to keep the handler from being called +//! again immediately upon exit. The \e ulIntFlags parameter can be the +//! logical OR of any of the following values: \b I2S_INT_RXERR, +//! \b I2S_INT_RXREQ, \b I2S_INT_TXERR, or \b I2S_INT_TXREQ. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + I2S_O_IC) = ulIntFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the I2S controller. +//! +//! \param ulBase is the I2S module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the I2S controller +//! generates an interrupt. Specific I2S interrupts must still be enabled +//! with the I2SIntEnable() function. It is the responsibility of the +//! interrupt handler to clear any pending interrupts with I2SIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2SIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(INT_I2S0, pfnHandler); + + // + // Enable the I2S interface interrupt. + // + IntEnable(INT_I2S0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the I2S controller. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function will disable and clear the handler to be called when the +//! I2S interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2SIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Disable the I2S interface interrupt. + // + IntDisable(INT_I2S0); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_I2S0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.h new file mode 100644 index 00000000..5782c61b --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/i2s.h @@ -0,0 +1,154 @@ +//***************************************************************************** +// +// i2s.h - Prototypes and macros for the I2S controller. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __I2S_H__ +#define __I2S_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to I2STxConfigSet() and I2SRxConfigSet() +// +//***************************************************************************** +#define I2S_CONFIG_FORMAT_MASK 0x3C000000 // JST, DLY, SCP, LRP +#define I2S_CONFIG_FORMAT_I2S 0x14000000 // !JST, DLY, !SCP, LRP +#define I2S_CONFIG_FORMAT_LEFT_JUST \ + 0x00000000 // !JST, !DLY, !SCP, !LRP +#define I2S_CONFIG_FORMAT_RIGHT_JUST \ + 0x20000000 // JST, !DLY, !SCP, !LRP + +#define I2S_CONFIG_SCLK_INVERT 0x08000000 + +#define I2S_CONFIG_MODE_MASK 0x03000000 +#define I2S_CONFIG_MODE_DUAL 0x00000000 +#define I2S_CONFIG_MODE_COMPACT_16 \ + 0x01000000 +#define I2S_CONFIG_MODE_COMPACT_8 \ + 0x03000000 +#define I2S_CONFIG_MODE_MONO 0x02000000 + +#define I2S_CONFIG_EMPTY_MASK 0x00800000 +#define I2S_CONFIG_EMPTY_ZERO 0x00000000 +#define I2S_CONFIG_EMPTY_REPEAT 0x00800000 + +#define I2S_CONFIG_CLK_MASK 0x00400000 +#define I2S_CONFIG_CLK_MASTER 0x00400000 +#define I2S_CONFIG_CLK_SLAVE 0x00000000 + +#define I2S_CONFIG_SAMPLE_SIZE_MASK \ + 0x0000FC00 +#define I2S_CONFIG_SAMPLE_SIZE_32 \ + 0x00007C00 +#define I2S_CONFIG_SAMPLE_SIZE_24 \ + 0x00005C00 +#define I2S_CONFIG_SAMPLE_SIZE_20 \ + 0x00004C00 +#define I2S_CONFIG_SAMPLE_SIZE_16 \ + 0x00003C00 +#define I2S_CONFIG_SAMPLE_SIZE_8 \ + 0x00001C00 + +#define I2S_CONFIG_WIRE_SIZE_MASK \ + 0x000003F0 +#define I2S_CONFIG_WIRE_SIZE_32 0x000001F0 +#define I2S_CONFIG_WIRE_SIZE_24 0x00000170 +#define I2S_CONFIG_WIRE_SIZE_20 0x00000130 +#define I2S_CONFIG_WIRE_SIZE_16 0x000000F0 +#define I2S_CONFIG_WIRE_SIZE_8 0x00000070 + +//***************************************************************************** +// +// Values that can be passed to I2SMasterClockSelect() +// +//***************************************************************************** +#define I2S_TX_MCLK_EXT 0x00000010 +#define I2S_TX_MCLK_INT 0x00000000 +#define I2S_RX_MCLK_EXT 0x00000020 +#define I2S_RX_MCLK_INT 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to I2SIntEnable(), I2SIntDisable(), and +// I2SIntClear() +// +//***************************************************************************** +#define I2S_INT_RXERR 0x00000020 +#define I2S_INT_RXREQ 0x00000010 +#define I2S_INT_TXERR 0x00000002 +#define I2S_INT_TXREQ 0x00000001 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void I2STxEnable(unsigned long ulBase); +extern void I2STxDisable(unsigned long ulBase); +extern void I2STxDataPut(unsigned long ulBase, unsigned long ulData); +extern long I2STxDataPutNonBlocking(unsigned long ulBase, + unsigned long ulData); +extern void I2STxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2STxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel); +extern unsigned long I2STxFIFOLimitGet(unsigned long ulBase); +extern unsigned long I2STxFIFOLevelGet(unsigned long ulBase); +extern void I2SRxEnable(unsigned long ulBase); +extern void I2SRxDisable(unsigned long ulBase); +extern void I2SRxDataGet(unsigned long ulBase, unsigned long *pulData); +extern long I2SRxDataGetNonBlocking(unsigned long ulBase, + unsigned long *pulData); +extern void I2SRxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2SRxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel); +extern unsigned long I2SRxFIFOLimitGet(unsigned long ulBase); +extern unsigned long I2SRxFIFOLevelGet(unsigned long ulBase); +extern void I2STxRxEnable(unsigned long ulBase); +extern void I2STxRxDisable(unsigned long ulBase); +extern void I2STxRxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock); +extern void I2SIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2SIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long I2SIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void I2SIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2SIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void I2SIntUnregister(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __I2S_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.c new file mode 100644 index 00000000..20e3a052 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.c @@ -0,0 +1,723 @@ +//***************************************************************************** +// +// interrupt.c - Driver for the NVIC Interrupt Controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup interrupt_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/cpu.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is a mapping between priority grouping encodings and the number of +// preemption priority bits. +// +//***************************************************************************** +static const unsigned long g_pulPriority[] = +{ + NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6, + NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3, + NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1 +}; + +//***************************************************************************** +// +// This is a mapping between interrupt number and the register that contains +// the priority encoding for that interrupt. +// +//***************************************************************************** +static const unsigned long g_pulRegs[] = +{ + 0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1, + NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7, + NVIC_PRI8, NVIC_PRI9, NVIC_PRI10, NVIC_PRI11, NVIC_PRI12, NVIC_PRI13 +}; + +//***************************************************************************** +// +//! \internal +//! The default interrupt handler. +//! +//! This is the default interrupt handler for all interrupts. It simply loops +//! forever so that the system state is preserved for observation by a +//! debugger. Since interrupts should be disabled before unregistering the +//! corresponding handler, this should never be called. +//! +//! \return None. +// +//***************************************************************************** +static void +IntDefaultHandler(void) +{ + // + // Go into an infinite loop. + // + while(1) + { + } +} + +//***************************************************************************** +// +// The processor vector table. +// +// This contains a list of the handlers for the various interrupt sources in +// the system. The layout of this list is defined by the hardware; assertion +// of an interrupt causes the processor to start executing directly at the +// address given in the corresponding location in this list. +// +//***************************************************************************** +#if defined(ewarm) +static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE"; +#elif defined(sourcerygxx) +static __attribute__((section(".cs3.region-head.ram"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#elif defined(ccs) +#pragma DATA_SECTION(g_pfnRAMVectors, ".vtable") +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#else +static __attribute__((section("vtable"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#endif + +//***************************************************************************** +// +//! Enables the processor interrupt. +//! +//! Allows the processor to respond to interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were disabled when the function was +//! called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterEnable(void) +{ + // + // Enable processor interrupts. + // + return(CPUcpsie()); +} + +//***************************************************************************** +// +//! Disables the processor interrupt. +//! +//! Prevents the processor from receiving interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were already disabled when the +//! function was called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterDisable(void) +{ + // + // Disable processor interrupts. + // + return(CPUcpsid()); +} + +//***************************************************************************** +// +//! Registers a function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param pfnHandler is a pointer to the function to be called. +//! +//! This function is used to specify the handler function to be called when the +//! given interrupt is asserted to the processor. When the interrupt occurs, +//! if it is enabled (via IntEnable()), the handler function will be called in +//! interrupt context. Since the handler function can preempt other code, care +//! must be taken to protect memory or peripherals that are accessed by the +//! handler and other non-handler code. +//! +//! \note The use of this function (directly or indirectly via a peripheral +//! driver interrupt register function) moves the interrupt vector table from +//! flash to SRAM. Therefore, care must be taken when linking the application +//! to ensure that the SRAM vector table is located at the beginning of SRAM; +//! otherwise NVIC will not look in the correct portion of memory for the +//! vector table (it requires the vector table be on a 1 kB memory alignment). +//! Normally, the SRAM vector table is so placed via the use of linker scripts. +//! See the discussion of compile-time versus run-time interrupt handler +//! registration in the introduction to this chapter. +//! +//! \return None. +// +//***************************************************************************** +void +IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)) +{ + unsigned long ulIdx, ulValue; + + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Make sure that the RAM vector table is correctly aligned. + // + ASSERT(((unsigned long)g_pfnRAMVectors & 0x000003ff) == 0); + + // + // See if the RAM vector table has been initialized. + // + if(HWREG(NVIC_VTABLE) != (unsigned long)g_pfnRAMVectors) + { + // + // Copy the vector table from the beginning of FLASH to the RAM vector + // table. + // + ulValue = HWREG(NVIC_VTABLE); + for(ulIdx = 0; ulIdx < NUM_INTERRUPTS; ulIdx++) + { + g_pfnRAMVectors[ulIdx] = (void (*)(void))HWREG((ulIdx * 4) + + ulValue); + } + + // + // Point NVIC at the RAM vector table. + // + HWREG(NVIC_VTABLE) = (unsigned long)g_pfnRAMVectors; + } + + // + // Save the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = pfnHandler; +} + +//***************************************************************************** +// +//! Unregisters the function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function is used to indicate that no handler should be called when the +//! given interrupt is asserted to the processor. The interrupt source will be +//! automatically disabled (via IntDisable()) if necessary. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +IntUnregister(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Reset the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = IntDefaultHandler; +} + +//***************************************************************************** +// +//! Sets the priority grouping of the interrupt controller. +//! +//! \param ulBits specifies the number of bits of preemptable priority. +//! +//! This function specifies the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. The range of +//! the grouping values are dependent upon the hardware implementation; on +//! the Stellaris family, three bits are available for hardware interrupt +//! prioritization and therefore priority grouping values of three through +//! seven have the same effect. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityGroupingSet(unsigned long ulBits) +{ + // + // Check the arguments. + // + ASSERT(ulBits < NUM_PRIORITY); + + // + // Set the priority grouping. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | g_pulPriority[ulBits]; +} + +//***************************************************************************** +// +//! Gets the priority grouping of the interrupt controller. +//! +//! This function returns the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. +//! +//! \return The number of bits of preemptable priority. +// +//***************************************************************************** +unsigned long +IntPriorityGroupingGet(void) +{ + unsigned long ulLoop, ulValue; + + // + // Read the priority grouping. + // + ulValue = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M; + + // + // Loop through the priority grouping values. + // + for(ulLoop = 0; ulLoop < NUM_PRIORITY; ulLoop++) + { + // + // Stop looping if this value matches. + // + if(ulValue == g_pulPriority[ulLoop]) + { + break; + } + } + + // + // Return the number of priority bits. + // + return(ulLoop); +} + +//***************************************************************************** +// +//! Sets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param ucPriority specifies the priority of the interrupt. +//! +//! This function is used to set the priority of an interrupt. When multiple +//! interrupts are asserted simultaneously, the ones with the highest priority +//! are processed before the lower priority interrupts. Smaller numbers +//! correspond to higher interrupt priorities; priority 0 is the highest +//! interrupt priority. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. The remaining bits can be +//! used to sub-prioritize the interrupt sources, and may be used by the +//! hardware priority mechanism on a future part. This arrangement allows +//! priorities to migrate to different NVIC implementations without changing +//! the gross prioritization of the interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +IntPrioritySet(unsigned long ulInterrupt, unsigned char ucPriority) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Set the interrupt priority. + // + ulTemp = HWREG(g_pulRegs[ulInterrupt >> 2]); + ulTemp &= ~(0xFF << (8 * (ulInterrupt & 3))); + ulTemp |= ucPriority << (8 * (ulInterrupt & 3)); + HWREG(g_pulRegs[ulInterrupt >> 2]) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function gets the priority of an interrupt. See IntPrioritySet() for +//! a definition of the priority value. +//! +//! \return Returns the interrupt priority, or -1 if an invalid interrupt was +//! specified. +// +//***************************************************************************** +long +IntPriorityGet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Return the interrupt priority. + // + return((HWREG(g_pulRegs[ulInterrupt >> 2]) >> (8 * (ulInterrupt & 3))) & + 0xFF); +} + +//***************************************************************************** +// +//! Enables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be enabled. +//! +//! The specified interrupt is enabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntEnable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to enable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Enable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM; + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Enable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS; + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Enable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Enable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Disables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be disabled. +//! +//! The specified interrupt is disabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntDisable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to disable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Disable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM); + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Disable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS); + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Disable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE); + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Disable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Pends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be pended. +//! +//! The specified interrupt is pended in the interrupt controller. This will +//! cause the interrupt controller to execute the corresponding interrupt +//! handler at the next available time, based on the current interrupt state +//! priorities. For example, if called by a higher priority interrupt handler, +//! the specified interrupt handler will not be called until after the current +//! interrupt handler has completed execution. The interrupt must have been +//! enabled for it to be called. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendSet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to pend. + // + if(ulInterrupt == FAULT_NMI) + { + // + // Pend the NMI interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_NMI_SET; + } + else if(ulInterrupt == FAULT_PENDSV) + { + // + // Pend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Pend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTSET; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Unpends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be unpended. +//! +//! The specified interrupt is unpended in the interrupt controller. This will +//! cause any previously generated interrupts that have not been handled yet +//! (due to higher priority interrupts or the interrupt no having been enabled +//! yet) to be discarded. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendClear(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to unpend. + // + if(ulInterrupt == FAULT_PENDSV) + { + // + // Unpend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_UNPEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Unpend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTCLR; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Sets the priority masking level +//! +//! \param ulPriorityMask is the priority level that will be masked. +//! +//! This function sets the interrupt priority masking level so that all +//! interrupts at the specified or lesser priority level is masked. This +//! can be used to globally disable a set of interrupts with priority below +//! a predetermined threshold. A value of 0 disables priority +//! masking. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityMaskSet(unsigned long ulPriorityMask) +{ + CPUbasepriSet(ulPriorityMask); +} + +//***************************************************************************** +// +//! Gets the priority masking level +//! +//! This function gets the current setting of the interrupt priority masking +//! level. The value returned is the priority level such that all interrupts +//! of that and lesser priority are masked. A value of 0 means that priority +//! masking is disabled. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return Returns the value of the interrupt priority level mask. +// +//***************************************************************************** +unsigned long +IntPriorityMaskGet(void) +{ + return(CPUbasepriGet()); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.h new file mode 100644 index 00000000..954f5775 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/interrupt.h @@ -0,0 +1,77 @@ +//***************************************************************************** +// +// interrupt.h - Prototypes for the NVIC Interrupt Controller Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __INTERRUPT_H__ +#define __INTERRUPT_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macro to generate an interrupt priority mask based on the number of bits +// of priority supported by the hardware. +// +//***************************************************************************** +#define INT_PRIORITY_MASK ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF) + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean IntMasterEnable(void); +extern tBoolean IntMasterDisable(void); +extern void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)); +extern void IntUnregister(unsigned long ulInterrupt); +extern void IntPriorityGroupingSet(unsigned long ulBits); +extern unsigned long IntPriorityGroupingGet(void); +extern void IntPrioritySet(unsigned long ulInterrupt, + unsigned char ucPriority); +extern long IntPriorityGet(unsigned long ulInterrupt); +extern void IntEnable(unsigned long ulInterrupt); +extern void IntDisable(unsigned long ulInterrupt); +extern void IntPendSet(unsigned long ulInterrupt); +extern void IntPendClear(unsigned long ulInterrupt); +extern void IntPriorityMaskSet(unsigned long ulPriorityMask); +extern unsigned long IntPriorityMaskGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __INTERRUPT_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.c new file mode 100644 index 00000000..cb570006 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.c @@ -0,0 +1,446 @@ +//***************************************************************************** +// +// mpu.c - Driver for the Cortex-M3 memory protection unit (MPU). +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup mpu_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/mpu.h" + +//***************************************************************************** +// +//! Enables and configures the MPU for use. +//! +//! \param ulMPUConfig is the logical OR of the possible configurations. +//! +//! This function enables the Cortex-M3 memory protection unit. It also +//! configures the default behavior when in privileged mode and while +//! handling a hard fault or NMI. Prior to enabling the MPU, at least one +//! region must be set by calling MPURegionSet() or else by enabling the +//! default region for privileged mode by passing the +//! \b MPU_CONFIG_PRIV_DEFAULT flag to MPUEnable(). +//! Once the MPU is enabled, a memory management fault will be generated +//! for any memory access violations. +//! +//! The \e ulMPUConfig parameter should be the logical OR of any of the +//! following: +//! +//! - \b MPU_CONFIG_PRIV_DEFAULT enables the default memory map when in +//! privileged mode and when no other regions are defined. If this option +//! is not enabled, then there must be at least one valid region already +//! defined when the MPU is enabled. +//! - \b MPU_CONFIG_HARDFLT_NMI enables the MPU while in a hard fault or NMI +//! exception handler. If this option is not enabled, then the MPU is +//! disabled while in one of these exception handlers and the default +//! memory map is applied. +//! - \b MPU_CONFIG_NONE chooses none of the above options. In this case, +//! no default memory map is provided in privileged mode, and the MPU will +//! not be enabled in the fault handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUEnable(unsigned long ulMPUConfig) +{ + // + // Check the arguments. + // + ASSERT(!(ulMPUConfig & ~(MPU_CONFIG_PRIV_DEFAULT | + MPU_CONFIG_HARDFLT_NMI))); + + // + // Set the MPU control bits according to the flags passed by the user, + // and also set the enable bit. + // + HWREG(NVIC_MPU_CTRL) = ulMPUConfig | NVIC_MPU_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the MPU for use. +//! +//! This function disables the Cortex-M3 memory protection unit. When the +//! MPU is disabled, the default memory map is used and memory management +//! faults are not generated. +//! +//! \return None. +// +//***************************************************************************** +void +MPUDisable(void) +{ + // + // Turn off the MPU enable bit. + // + HWREG(NVIC_MPU_CTRL) &= ~NVIC_MPU_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Gets the count of regions supported by the MPU. +//! +//! This function is used to get the number of regions that are supported by +//! the MPU. This is the total number that are supported, including regions +//! that are already programmed. +//! +//! \return The number of memory protection regions that are available +//! for programming using MPURegionSet(). +// +//***************************************************************************** +unsigned long +MPURegionCountGet(void) +{ + // + // Read the DREGION field of the MPU type register, and mask off + // the bits of interest to get the count of regions. + // + return((HWREG(NVIC_MPU_TYPE) & NVIC_MPU_TYPE_DREGION_M) + >> NVIC_MPU_TYPE_DREGION_S); +} + +//***************************************************************************** +// +//! Enables a specific region. +//! +//! \param ulRegion is the region number to enable. +//! +//! This function is used to enable a memory protection region. The region +//! should already be set up with the MPURegionSet() function. Once enabled, +//! the memory protection rules of the region will be applied and access +//! violations will cause a memory management fault. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionEnable(unsigned long ulRegion) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + + // + // Select the region to modify. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Modify the enable bit in the region attributes. + // + HWREG(NVIC_MPU_ATTR) |= NVIC_MPU_ATTR_ENABLE; +} + +//***************************************************************************** +// +//! Disables a specific region. +//! +//! \param ulRegion is the region number to disable. +//! +//! This function is used to disable a previously enabled memory protection +//! region. The region will remain configured if it is not overwritten with +//! another call to MPURegionSet(), and can be enabled again by calling +//! MPURegionEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionDisable(unsigned long ulRegion) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + + // + // Select the region to modify. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Modify the enable bit in the region attributes. + // + HWREG(NVIC_MPU_ATTR) &= ~NVIC_MPU_ATTR_ENABLE; +} + +//***************************************************************************** +// +//! Sets up the access rules for a specific region. +//! +//! \param ulRegion is the region number to set up. +//! \param ulAddr is the base address of the region. It must be aligned +//! according to the size of the region specified in ulFlags. +//! \param ulFlags is a set of flags to define the attributes of the region. +//! +//! This function sets up the protection rules for a region. The region has +//! a base address and a set of attributes including the size, which must +//! be a power of 2. The base address parameter, \e ulAddr, must be aligned +//! according to the size. +//! +//! The \e ulFlags parameter is the logical OR of all of the attributes +//! of the region. It is a combination of choices for region size, +//! execute permission, read/write permissions, disabled sub-regions, +//! and a flag to determine if the region is enabled. +//! +//! The size flag determines the size of a region, and must be one of the +//! following: +//! +//! - \b MPU_RGN_SIZE_32B +//! - \b MPU_RGN_SIZE_64B +//! - \b MPU_RGN_SIZE_128B +//! - \b MPU_RGN_SIZE_256B +//! - \b MPU_RGN_SIZE_512B +//! - \b MPU_RGN_SIZE_1K +//! - \b MPU_RGN_SIZE_2K +//! - \b MPU_RGN_SIZE_4K +//! - \b MPU_RGN_SIZE_8K +//! - \b MPU_RGN_SIZE_16K +//! - \b MPU_RGN_SIZE_32K +//! - \b MPU_RGN_SIZE_64K +//! - \b MPU_RGN_SIZE_128K +//! - \b MPU_RGN_SIZE_256K +//! - \b MPU_RGN_SIZE_512K +//! - \b MPU_RGN_SIZE_1M +//! - \b MPU_RGN_SIZE_2M +//! - \b MPU_RGN_SIZE_4M +//! - \b MPU_RGN_SIZE_8M +//! - \b MPU_RGN_SIZE_16M +//! - \b MPU_RGN_SIZE_32M +//! - \b MPU_RGN_SIZE_64M +//! - \b MPU_RGN_SIZE_128M +//! - \b MPU_RGN_SIZE_256M +//! - \b MPU_RGN_SIZE_512M +//! - \b MPU_RGN_SIZE_1G +//! - \b MPU_RGN_SIZE_2G +//! - \b MPU_RGN_SIZE_4G +//! +//! The execute permission flag must be one of the following: +//! +//! - \b MPU_RGN_PERM_EXEC enables the region for execution of code +//! - \b MPU_RGN_PERM_NOEXEC disables the region for execution of code +//! +//! The read/write access permissions are applied separately for the +//! privileged and user modes. The read/write access flags must be one +//! of the following: +//! +//! - \b MPU_RGN_PERM_PRV_NO_USR_NO - no access in privileged or user mode +//! - \b MPU_RGN_PERM_PRV_RW_USR_NO - privileged read/write, user no access +//! - \b MPU_RGN_PERM_PRV_RW_USR_RO - privileged read/write, user read-only +//! - \b MPU_RGN_PERM_PRV_RW_USR_RW - privileged read/write, user read/write +//! - \b MPU_RGN_PERM_PRV_RO_USR_NO - privileged read-only, user no access +//! - \b MPU_RGN_PERM_PRV_RO_USR_RO - privileged read-only, user read-only +//! +//! The region is automatically divided into 8 equally-sized sub-regions by +//! the MPU. Sub-regions can only be used in regions of size 256 bytes +//! or larger. Any of these 8 sub-regions can be disabled. This allows +//! for creation of ``holes'' in a region which can be left open, or overlaid +//! by another region with different attributes. Any of the 8 sub-regions +//! can be disabled with a logical OR of any of the following flags: +//! +//! - \b MPU_SUB_RGN_DISABLE_0 +//! - \b MPU_SUB_RGN_DISABLE_1 +//! - \b MPU_SUB_RGN_DISABLE_2 +//! - \b MPU_SUB_RGN_DISABLE_3 +//! - \b MPU_SUB_RGN_DISABLE_4 +//! - \b MPU_SUB_RGN_DISABLE_5 +//! - \b MPU_SUB_RGN_DISABLE_6 +//! - \b MPU_SUB_RGN_DISABLE_7 +//! +//! Finally, the region can be initially enabled or disabled with one of +//! the following flags: +//! +//! - \b MPU_RGN_ENABLE +//! - \b MPU_RGN_DISABLE +//! +//! As an example, to set a region with the following attributes: size of +//! 32 KB, execution enabled, read-only for both privileged and user, one +//! sub-region disabled, and initially enabled; the \e ulFlags parameter would +//! have the following value: +//! +//! +//! (MPU_RG_SIZE_32K | MPU_RGN_PERM_EXEC | MPU_RGN_PERM_PRV_RO_USR_RO | +//! MPU_SUB_RGN_DISABLE_2 | MPU_RGN_ENABLE) +//! +//! +//! \note This function will write to multiple registers and is not protected +//! from interrupts. It is possible that an interrupt which accesses a +//! region may occur while that region is in the process of being changed. +//! The safest way to handle this is to disable a region before changing it. +//! Refer to the discussion of this in the API Detailed Description section. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionSet(unsigned long ulRegion, unsigned long ulAddr, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + ASSERT((ulAddr & ~0 << (((ulFlags & NVIC_MPU_ATTR_SIZE_M) >> 1) + 1)) + == ulAddr); + + // + // Program the base address, use the region field to select the + // region at the same time. + // + HWREG(NVIC_MPU_BASE) = ulAddr | ulRegion | NVIC_MPU_BASE_VALID; + + // + // Program the region attributes. Set the TEX field and the S, C, + // and B bits to fixed values that are suitable for all Stellaris + // memory. + // + HWREG(NVIC_MPU_ATTR) = (ulFlags & ~(NVIC_MPU_ATTR_TEX_M | + NVIC_MPU_ATTR_CACHEABLE)) | + NVIC_MPU_ATTR_SHAREABLE | + NVIC_MPU_ATTR_BUFFRABLE; +} + +//***************************************************************************** +// +//! Gets the current settings for a specific region. +//! +//! \param ulRegion is the region number to get. +//! \param pulAddr points to storage for the base address of the region. +//! \param pulFlags points to the attribute flags for the region. +//! +//! This function retrieves the configuration of a specific region. The +//! meanings and format of the parameters is the same as that of the +//! MPURegionSet() function. +//! +//! This function can be used to save the configuration of a region for +//! later use with the MPURegionSet() function. The region's enable state +//! will be preserved in the attributes that are saved. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionGet(unsigned long ulRegion, unsigned long *pulAddr, + unsigned long *pulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + ASSERT(pulAddr); + ASSERT(pulFlags); + + // + // Select the region to get. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Read and store the base address for the region. + // + *pulAddr = HWREG(NVIC_MPU_BASE); + + // + // Read and store the region attributes. + // + *pulFlags = HWREG(NVIC_MPU_ATTR); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the memory management fault. +//! +//! \param pfnHandler is a pointer to the function to be called when the +//! memory management fault occurs. +//! +//! This sets and enables the handler to be called when the MPU generates +//! a memory management fault due to a protection region access violation. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUIntRegister(void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(FAULT_MPU, pfnHandler); + + // + // Enable the memory management fault. + // + IntEnable(FAULT_MPU); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the memory management fault. +//! +//! This function will disable and clear the handler to be called when a +//! memory management fault occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(FAULT_MPU); + + // + // Unregister the interrupt handler. + // + IntUnregister(FAULT_MPU); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.h new file mode 100644 index 00000000..744be354 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/mpu.h @@ -0,0 +1,147 @@ +//***************************************************************************** +// +// mpu.h - Defines and Macros for the memory protection unit. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __MPU_H__ +#define __MPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Flags that can be passed to MPUEnable. +// +//***************************************************************************** +#define MPU_CONFIG_PRIV_DEFAULT 4 +#define MPU_CONFIG_HARDFLT_NMI 2 +#define MPU_CONFIG_NONE 0 + +//***************************************************************************** +// +// Flags for the region size to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_SIZE_32B (4 << 1) +#define MPU_RGN_SIZE_64B (5 << 1) +#define MPU_RGN_SIZE_128B (6 << 1) +#define MPU_RGN_SIZE_256B (7 << 1) +#define MPU_RGN_SIZE_512B (8 << 1) + +#define MPU_RGN_SIZE_1K (9 << 1) +#define MPU_RGN_SIZE_2K (10 << 1) +#define MPU_RGN_SIZE_4K (11 << 1) +#define MPU_RGN_SIZE_8K (12 << 1) +#define MPU_RGN_SIZE_16K (13 << 1) +#define MPU_RGN_SIZE_32K (14 << 1) +#define MPU_RGN_SIZE_64K (15 << 1) +#define MPU_RGN_SIZE_128K (16 << 1) +#define MPU_RGN_SIZE_256K (17 << 1) +#define MPU_RGN_SIZE_512K (18 << 1) + +#define MPU_RGN_SIZE_1M (19 << 1) +#define MPU_RGN_SIZE_2M (20 << 1) +#define MPU_RGN_SIZE_4M (21 << 1) +#define MPU_RGN_SIZE_8M (22 << 1) +#define MPU_RGN_SIZE_16M (23 << 1) +#define MPU_RGN_SIZE_32M (24 << 1) +#define MPU_RGN_SIZE_64M (25 << 1) +#define MPU_RGN_SIZE_128M (26 << 1) +#define MPU_RGN_SIZE_256M (27 << 1) +#define MPU_RGN_SIZE_512M (28 << 1) + +#define MPU_RGN_SIZE_1G (29 << 1) +#define MPU_RGN_SIZE_2G (30 << 1) +#define MPU_RGN_SIZE_4G (31 << 1) + +//***************************************************************************** +// +// Flags for the permissions to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_PERM_EXEC 0x00000000 +#define MPU_RGN_PERM_NOEXEC 0x10000000 +#define MPU_RGN_PERM_PRV_NO_USR_NO 0x00000000 +#define MPU_RGN_PERM_PRV_RW_USR_NO 0x01000000 +#define MPU_RGN_PERM_PRV_RW_USR_RO 0x02000000 +#define MPU_RGN_PERM_PRV_RW_USR_RW 0x03000000 +#define MPU_RGN_PERM_PRV_RO_USR_NO 0x05000000 +#define MPU_RGN_PERM_PRV_RO_USR_RO 0x06000000 + +//***************************************************************************** +// +// Flags for the sub-region to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_SUB_RGN_DISABLE_0 0x00000100 +#define MPU_SUB_RGN_DISABLE_1 0x00000200 +#define MPU_SUB_RGN_DISABLE_2 0x00000400 +#define MPU_SUB_RGN_DISABLE_3 0x00000800 +#define MPU_SUB_RGN_DISABLE_4 0x00001000 +#define MPU_SUB_RGN_DISABLE_5 0x00002000 +#define MPU_SUB_RGN_DISABLE_6 0x00004000 +#define MPU_SUB_RGN_DISABLE_7 0x00008000 + +//***************************************************************************** +// +// Flags to enable or disable a region, to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_ENABLE 1 +#define MPU_RGN_DISABLE 0 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void MPUEnable(unsigned long ulMPUConfig); +extern void MPUDisable(void); +extern unsigned long MPURegionCountGet(void); +extern void MPURegionEnable(unsigned long ulRegion); +extern void MPURegionDisable(unsigned long ulRegion); +extern void MPURegionSet(unsigned long ulRegion, unsigned long ulAddr, + unsigned long ulFlags); +extern void MPURegionGet(unsigned long ulRegion, unsigned long *pulAddr, + unsigned long *pulFlags); +extern void MPUIntRegister(void (*pfnHandler)(void)); +extern void MPUIntUnregister(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __MPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pin_map.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pin_map.h new file mode 100644 index 00000000..d946c355 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pin_map.h @@ -0,0 +1,20413 @@ +//***************************************************************************** +// +// pin_map.h - Mapping of peripherals to pins for all parts. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __PIN_MAP_H__ +#define __PIN_MAP_H__ + +//***************************************************************************** +// +// LM3S101 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S101 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define 32KHZ_PERIPH (SYSCTL_PERIPH_GPIOB) +#define 32KHZ_PORT (GPIO_PORTB_BASE) +#define 32KHZ_PIN (GPIO_PIN_1) + +#endif // PART_LM3S101 + +//***************************************************************************** +// +// LM3S102 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S102 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define 32KHZ_PERIPH (SYSCTL_PERIPH_GPIOB) +#define 32KHZ_PORT (GPIO_PORTB_BASE) +#define 32KHZ_PIN (GPIO_PIN_1) + +#endif // PART_LM3S102 + +//***************************************************************************** +// +// LM3S300 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S300 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S300 + +//***************************************************************************** +// +// LM3S301 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S301 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S301 + +//***************************************************************************** +// +// LM3S308 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S308 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S308 + +//***************************************************************************** +// +// LM3S310 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S310 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S310 + +//***************************************************************************** +// +// LM3S315 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S315 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S315 + +//***************************************************************************** +// +// LM3S316 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S316 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S316 + +//***************************************************************************** +// +// LM3S317 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S317 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S317 + +//***************************************************************************** +// +// LM3S328 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S328 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S328 + +//***************************************************************************** +// +// LM3S600 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S600 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S600 + +//***************************************************************************** +// +// LM3S601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX_PORT (GPIO_PORTD_BASE) +#define IDX_PIN (GPIO_PIN_7) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S601 + +//***************************************************************************** +// +// LM3S608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S608 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S608 + +//***************************************************************************** +// +// LM3S610 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S610 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S610 + +//***************************************************************************** +// +// LM3S611 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S611 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S611 + +//***************************************************************************** +// +// LM3S612 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S612 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S612 + +//***************************************************************************** +// +// LM3S613 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S613 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S613 + +//***************************************************************************** +// +// LM3S615 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S615 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S615 + +//***************************************************************************** +// +// LM3S617 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S617 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S617 + +//***************************************************************************** +// +// LM3S618 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S618 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX_PORT (GPIO_PORTB_BASE) +#define IDX_PIN (GPIO_PIN_2) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S618 + +//***************************************************************************** +// +// LM3S628 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S628 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S628 + +//***************************************************************************** +// +// LM3S800 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S800 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S800 + +//***************************************************************************** +// +// LM3S801 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S801 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX_PORT (GPIO_PORTD_BASE) +#define IDX_PIN (GPIO_PIN_7) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S801 + +//***************************************************************************** +// +// LM3S808 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S808 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S808 + +//***************************************************************************** +// +// LM3S811 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S811 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S811 + +//***************************************************************************** +// +// LM3S812 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S812 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S812 + +//***************************************************************************** +// +// LM3S815 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S815 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S815 + +//***************************************************************************** +// +// LM3S817 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S817 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S817 + +//***************************************************************************** +// +// LM3S818 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S818 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX_PORT (GPIO_PORTB_BASE) +#define IDX_PIN (GPIO_PIN_2) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S818 + +//***************************************************************************** +// +// LM3S828 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S828 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S828 + +//***************************************************************************** +// +// LM3S1110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1110 + +//***************************************************************************** +// +// LM3S1133 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1133 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1133 + +//***************************************************************************** +// +// LM3S1138 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1138 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1138 + +//***************************************************************************** +// +// LM3S1150 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1150 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1150 + +//***************************************************************************** +// +// LM3S1162 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1162 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1162 + +//***************************************************************************** +// +// LM3S1165 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1165 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP6_PORT (GPIO_PORTB_BASE) +#define CCP6_PIN (GPIO_PIN_5) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1165 + +//***************************************************************************** +// +// LM3S1332 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1332 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1332 + +//***************************************************************************** +// +// LM3S1435 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1435 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1435 + +//***************************************************************************** +// +// LM3S1439 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1439 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1439 + +//***************************************************************************** +// +// LM3S1512 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1512 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP4_PORT (GPIO_PORTD_BASE) +#define CCP4_PIN (GPIO_PIN_5) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1512 + +//***************************************************************************** +// +// LM3S1538 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1538 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1538 + +//***************************************************************************** +// +// LM3S1601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1601 + +//***************************************************************************** +// +// LM3S1607 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1607 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_1) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_0) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U2RX_PORT (GPIO_PORTB_BASE) +#define U2RX_PIN (GPIO_PIN_4) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define U2TX_PORT (GPIO_PORTE_BASE) +#define U2TX_PIN (GPIO_PIN_4) + +#endif // PART_LM3S1607 + +//***************************************************************************** +// +// LM3S1608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1608 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1608 + +//***************************************************************************** +// +// LM3S1620 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1620 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1620 + +//***************************************************************************** +// +// LM3S1625 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1625 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1625 + +//***************************************************************************** +// +// LM3S1626 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1626 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_4) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_5) + +#endif // PART_LM3S1626 + +//***************************************************************************** +// +// LM3S1627 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1627 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_4) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1627 + +//***************************************************************************** +// +// LM3S1635 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1635 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1635 + +//***************************************************************************** +// +// LM3S1637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1637 + +//***************************************************************************** +// +// LM3S1751 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1751 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1751 + +//***************************************************************************** +// +// LM3S1776 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1776 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1776 + +//***************************************************************************** +// +// LM3S1850 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1850 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1850 + +//***************************************************************************** +// +// LM3S1911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1911 + +//***************************************************************************** +// +// LM3S1918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1918 + +//***************************************************************************** +// +// LM3S1937 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1937 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1937 + +//***************************************************************************** +// +// LM3S1958 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1958 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1958 + +//***************************************************************************** +// +// LM3S1960 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1960 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOH) +#define IDX1_PORT (GPIO_PORTH_BASE) +#define IDX1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1960 + +//***************************************************************************** +// +// LM3S1968 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1968 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT_PORT (GPIO_PORTH_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1968 + +//***************************************************************************** +// +// LM3S2016 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2016 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2016 + +//***************************************************************************** +// +// LM3S2110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2110 + +//***************************************************************************** +// +// LM3S2139 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2139 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2139 + +//***************************************************************************** +// +// LM3S2276 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2276 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2276 + +//***************************************************************************** +// +// LM3S2410 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2410 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2410 + +//***************************************************************************** +// +// LM3S2412 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2412 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2412 + +//***************************************************************************** +// +// LM3S2432 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2432 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2432 + +//***************************************************************************** +// +// LM3S2533 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2533 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2533 + +//***************************************************************************** +// +// LM3S2601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2601 + +//***************************************************************************** +// +// LM3S2608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2608 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2608 + +//***************************************************************************** +// +// LM3S2616 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2616 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0RX_PORT (GPIO_PORTA_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0TX_PORT (GPIO_PORTA_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2616 + +//***************************************************************************** +// +// LM3S2620 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2620 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C2O_PORT (GPIO_PORTE_BASE) +#define C2O_PIN (GPIO_PIN_7) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2620 + +//***************************************************************************** +// +// LM3S2637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2637 + +//***************************************************************************** +// +// LM3S2651 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2651 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2651 + +//***************************************************************************** +// +// LM3S2671 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2671 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_5) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2671 + +//***************************************************************************** +// +// LM3S2678 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2678 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_1) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_2) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2678 + +//***************************************************************************** +// +// LM3S2730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2730 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2730 + +//***************************************************************************** +// +// LM3S2739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2739 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2739 + +//***************************************************************************** +// +// LM3S2776 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2776 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2776 + +//***************************************************************************** +// +// LM3S2911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2911 + +//***************************************************************************** +// +// LM3S2918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2918 + +//***************************************************************************** +// +// LM3S2939 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2939 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2939 + +//***************************************************************************** +// +// LM3S2948 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2948 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2948 + +//***************************************************************************** +// +// LM3S2950 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2950 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_3) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2950 + +//***************************************************************************** +// +// LM3S2965 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2965 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP4_PORT (GPIO_PORTD_BASE) +#define CCP4_PIN (GPIO_PIN_5) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP5_PORT (GPIO_PORTG_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOH) +#define IDX1_PORT (GPIO_PORTH_BASE) +#define IDX1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_3) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2965 + +//***************************************************************************** +// +// LM3S3651 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3651 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP6_PORT (GPIO_PORTD_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S3651 + +//***************************************************************************** +// +// LM3S3739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3739 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3739 + +//***************************************************************************** +// +// LM3S3748 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3748 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP2_PORT (GPIO_PORTF_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_4) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define FAULT0_PORT (GPIO_PORTF_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_5) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM2_PORT (GPIO_PORTF_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM3_PORT (GPIO_PORTF_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM4_PORT (GPIO_PORTG_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM5_PORT (GPIO_PORTG_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOC) +#define U1RX_PORT (GPIO_PORTC_BASE) +#define U1RX_PIN (GPIO_PIN_6) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOC) +#define U1TX_PORT (GPIO_PORTC_BASE) +#define U1TX_PIN (GPIO_PIN_7) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3748 + +//***************************************************************************** +// +// LM3S3749 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3749 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP2_PORT (GPIO_PORTF_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP6_PORT (GPIO_PORTD_BASE) +#define CCP6_PIN (GPIO_PIN_2) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT0_PORT (GPIO_PORTG_BASE) +#define FAULT0_PIN (GPIO_PIN_2) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_4) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SDA_PORT (GPIO_PORTG_BASE) +#define I2C1SDA_PIN (GPIO_PIN_1) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define IDX0_PORT (GPIO_PORTG_BASE) +#define IDX0_PIN (GPIO_PIN_5) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHA0_PORT (GPIO_PORTF_BASE) +#define PHA0_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3749 + +//***************************************************************************** +// +// LM3S5632 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5632 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5632 + +//***************************************************************************** +// +// LM3S5652 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5652 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP2_PORT (GPIO_PORTE_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5652 + +//***************************************************************************** +// +// LM3S5662 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5662 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_2) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5662 + +//***************************************************************************** +// +// LM3S5732 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5732 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5732 + +//***************************************************************************** +// +// LM3S5737 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5737 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5737 + +//***************************************************************************** +// +// LM3S5739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5739 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0RX_PORT (GPIO_PORTA_BASE) +#define CAN0RX_PIN (GPIO_PIN_6) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0TX_PORT (GPIO_PORTA_BASE) +#define CAN0TX_PIN (GPIO_PIN_7) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SDA_PORT (GPIO_PORTG_BASE) +#define I2C1SDA_PIN (GPIO_PIN_1) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S5739 + +//***************************************************************************** +// +// LM3S5747 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5747 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5747 + +//***************************************************************************** +// +// LM3S5749 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5749 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT0_PORT (GPIO_PORTG_BASE) +#define FAULT0_PIN (GPIO_PIN_2) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_4) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define IDX0_PORT (GPIO_PORTG_BASE) +#define IDX0_PIN (GPIO_PIN_5) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHA0_PORT (GPIO_PORTF_BASE) +#define PHA0_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S5749 + +//***************************************************************************** +// +// LM3S5752 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5752 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP2_PORT (GPIO_PORTE_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5752 + +//***************************************************************************** +// +// LM3S5762 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5762 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_2) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5762 + +//***************************************************************************** +// +// LM3S6100 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6100 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6100 + +//***************************************************************************** +// +// LM3S6110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6110 + +//***************************************************************************** +// +// LM3S6420 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6420 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6420 + +//***************************************************************************** +// +// LM3S6422 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6422 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6422 + +//***************************************************************************** +// +// LM3S6432 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6432 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6432 + +//***************************************************************************** +// +// LM3S6537 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6537 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6537 + +//***************************************************************************** +// +// LM3S6610 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6610 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C2O_PORT (GPIO_PORTE_BASE) +#define C2O_PIN (GPIO_PIN_7) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6610 + +//***************************************************************************** +// +// LM3S6611 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6611 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6611 + +//***************************************************************************** +// +// LM3S6618 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6618 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6618 + +//***************************************************************************** +// +// LM3S6633 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6633 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6633 + +//***************************************************************************** +// +// LM3S6637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6637 + +//***************************************************************************** +// +// LM3S6730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6730 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6730 + +//***************************************************************************** +// +// LM3S6753 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6753 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6753 + +//***************************************************************************** +// +// LM3S6816 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6816 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT_PORT (GPIO_PORTE_BASE) +#define FAULT_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6816 + +//***************************************************************************** +// +// LM3S6911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6911 + +//***************************************************************************** +// +// LM3S6916 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6916 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT_PORT (GPIO_PORTE_BASE) +#define FAULT_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6916 + +//***************************************************************************** +// +// LM3S6918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6918 + +//***************************************************************************** +// +// LM3S6938 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6938 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6938 + +//***************************************************************************** +// +// LM3S6950 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6950 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6950 + +//***************************************************************************** +// +// LM3S6952 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6952 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6952 + +//***************************************************************************** +// +// LM3S6965 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6965 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHA1_PORT (GPIO_PORTE_BASE) +#define PHA1_PIN (GPIO_PIN_3) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHB1_PORT (GPIO_PORTE_BASE) +#define PHB1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6965 + +//***************************************************************************** +// +// LM3S8530 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8530 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CAN2RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2RX_PORT (GPIO_PORTE_BASE) +#define CAN2RX_PIN (GPIO_PIN_4) + +#define CAN2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2TX_PORT (GPIO_PORTE_BASE) +#define CAN2TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8530 + +//***************************************************************************** +// +// LM3S8538 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8538 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8538 + +//***************************************************************************** +// +// LM3S8630 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8630 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8630 + +//***************************************************************************** +// +// LM3S8730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8730 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8730 + +//***************************************************************************** +// +// LM3S8733 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8733 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8733 + +//***************************************************************************** +// +// LM3S8738 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8738 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8738 + +//***************************************************************************** +// +// LM3S8930 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8930 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8930 + +//***************************************************************************** +// +// LM3S8933 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8933 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8933 + +//***************************************************************************** +// +// LM3S8938 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8938 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8938 + +//***************************************************************************** +// +// LM3S8962 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8962 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHA1_PORT (GPIO_PORTE_BASE) +#define PHA1_PIN (GPIO_PIN_3) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHB1_PORT (GPIO_PORTE_BASE) +#define PHB1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8962 + +//***************************************************************************** +// +// LM3S8970 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8970 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CAN2RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2RX_PORT (GPIO_PORTE_BASE) +#define CAN2RX_PIN (GPIO_PIN_4) + +#define CAN2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2TX_PORT (GPIO_PORTE_BASE) +#define CAN2TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8970 + +//***************************************************************************** +// +// LM3S8971 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8971 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_2) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8971 + +//***************************************************************************** +// +// Pin Mapping Functions +// +// This section describes the code that is responsible for handling the +// mapping of peripheral functions to their physical location on the pins of +// a device. +// +//***************************************************************************** + +//***************************************************************************** +// +// Definitions to support mapping GPIO Ports and Pins to their function. +// +//***************************************************************************** + +//***************************************************************************** +// +// Configures the specified ADC pin to function as an ADC pin. +// +// \param ulName is one of the valid names for the ADC pins. +// +// This function takes on of the valid names for an ADC pin and configures +// the pin for its ADC functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b ADC0, \b ADC1, \b ADC2, +// \b ADC3, \b ADC4, \b ADC5, \b ADC6, or \b ADC7. +// +// \sa GPIOPinTypeADC() in order to configure multiple ADC pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeADC(ulName) GPIOPinTypeADC(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified CAN pin to function as a CAN pin. +// +// \param ulName is one of the valid names for the CAN pins. +// +// This function takes one of the valid names for a CAN pin and configures +// the pin for its CAN functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b CAN0RX, \b CAN0TX, +// \b CAN1RX, \b CAN1TX, \b CAN2RX, or \b CAN2TX. +// +// \sa GPIOPinTypeCAN() in order to configure multiple CAN pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeCAN(ulName) GPIOPinTypeCAN(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified comparator pin to function as a comparator pin. +// +// \param ulName is one of the valid names for the Comparator pins. +// +// This function takes one of the valid names for a comparator pin and +// configures the pin for its comparator functionality depending on the part +// that is defined. +// +// The valid names for the pins are as follows: \b C0_MINUS, \b C0_PLUS, +// \b C1_MINUS, \b C1_PLUS, \b C2_MINUS, or \b C2_PLUS. +// +// \sa GPIOPinTypeComparator() in order to configure multiple comparator pins +// at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeComparator(ulName) \ + GPIOPinTypeComparator(ulName##_PORT, \ + ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified I2C pin to function as an I2C pin. +// +// \param ulName is one of the valid names for the I2C pins. +// +// This function takes one of the valid names for an I2C pin and configures +// the pin for its I2C functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b I2C0SCL, \b I2C0SDA, +// \b I2C1SCL, or \b I2C1SDA. +// +// \sa GPIOPinTypeI2C() in order to configure multiple I2C pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeI2C(ulName) GPIOPinTypeI2C(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified PWM pin to function as a PWM pin. +// +// \param ulName is one of the valid names for the PWM pins. +// +// This function takes one of the valid names for a PWM pin and configures +// the pin for its PWM functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b PWM0, \b PWM1, \b PWM2, +// \b PWM3, \b PWM4, \b PWM5, or \b FAULT. +// +// \sa GPIOPinTypePWM() in order to configure multiple PWM pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypePWM(ulName) GPIOPinTypePWM(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified QEI pin to function as a QEI pin. +// +// \param ulName is one of the valid names for the QEI pins. +// +// This function takes one of the valid names for a QEI pin and configures +// the pin for its QEI functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b PHA0, \b PHB0, \b IDX0, +// \b PHA1, \b PHB1, or \b IDX1. +// +// \sa GPIOPinTypeQEI() in order to configure multiple QEI pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeQEI(ulName) GPIOPinTypeQEI(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified SSI pin to function as an SSI pin. +// +// \param ulName is one of the valid names for the SSI pins. +// +// This function takes one of the valid names for an SSI pin and configures +// the pin for its SSI functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b SSI0CLK, \b SSI0FSS, +// \b SSI0RX, \b SSI0TX, \b SSI1CLK, \b SSI1FSS, \b SSI1RX, or \b SSI1TX. +// +// \sa GPIOPinTypeSSI() in order to configure multiple SSI pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeSSI(ulName) GPIOPinTypeSSI(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified Timer pin to function as a Timer pin. +// +// \param ulName is one of the valid names for the Timer pins. +// +// This function takes one of the valid names for a Timer pin and configures +// the pin for its Timer functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b CCP0, \b CCP1, \b CCP2, +// \b CCP3, \b CCP4, \b CCP5, \b CCP6, or \b CCP7. +// +// \sa GPIOPinTypeTimer() in order to configure multiple CCP pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeTimer(ulName) GPIOPinTypeTimer(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified UART pin to function as a UART pin. +// +// \param ulName is one of the valid names for the UART pins. +// +// This function takes one of the valid names for a UART pin and configures +// the pin for its UART functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b U0RX, \b U0TX, \b U1RX, +// \b U1TX, \b U2RX, or \b U2TX. +// +// \sa GPIOPinTypeUART() in order to configure multiple UART pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeUART(ulName) GPIOPinTypeUART(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +//! Configures the specified USB digital pin to function as a USB pin. +//! +//! \param ulName is one of the valid names for a USB digital pin. +//! +//! This function takes one of the valid names for a USB digital pin and +//! configures the pin for its USB functionality depending on the part that is +//! defined. +//! +//! The valid names for the pins are as follows: \b EPEN or \b PFAULT. +//! +//! \sa GPIOPinTypeUSBDigital() in order to configure multiple USB pins at +//! once. +//! +//! \return None. +// +//***************************************************************************** +#define PinTypeUSBDigital(ulName) \ + GPIOPinTypeUSBDigital(ulName##_PORT, \ + ulName##_PIN) + +//***************************************************************************** +// +//! Enables the peripheral port used by the given pin. +//! +//! \param ulName is one of the valid names for a pin. +//! +//! This function takes one of the valid names for a pin function and +//! enables the peripheral port for that pin depending on the part that is +//! defined. +//! +//! Any valid pin name can be used. +//! +//! \sa SysCtlPeripheralEnable() in order to enable a single port when +//! multiple pins are on the same port. +//! +//! \return None. +// +//***************************************************************************** +#define PeripheralEnable(ulName) \ + SysCtlPeripheralEnable(ulName##_PERIPH) + +#endif // __PIN_MAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.c new file mode 100644 index 00000000..5f82c487 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.c @@ -0,0 +1,1748 @@ +//***************************************************************************** +// +// pwm.c - API for the PWM modules +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup pwm_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_pwm.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/pwm.h" + +//***************************************************************************** +// +// Misc macros for manipulating the encoded generator and output defines used +// by the API. +// +//***************************************************************************** +#define PWM_GEN_BADDR(_mod_, _gen_) \ + ((_mod_) + (_gen_)) +#define PWM_GEN_EXT_BADDR(_mod_, _gen_) \ + ((_mod_) + PWM_GEN_EXT_0 + \ + ((_gen_) - PWM_GEN_0) * 2) +#define PWM_OUT_BADDR(_mod_, _out_) \ + ((_mod_) + ((_out_) & 0xFFFFFFC0)) +#define PWM_IS_OUTPUT_ODD(_out_) \ + ((_out_) & 0x00000001) + +//***************************************************************************** +// +//! \internal +//! Checks a PWM generator number. +//! +//! \param ulGen is the generator number. +//! +//! This function determines if a PWM generator number is valid. +//! +//! \return Returnes \b true if the generator number is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +PWMGenValid(unsigned long ulGen) +{ + return((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) || + (ulGen == PWM_GEN_2) || (ulGen == PWM_GEN_3)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Checks a PWM output number. +//! +//! \param ulPWMOut is the output number. +//! +//! This function determines if a PWM output number is valid. +//! +//! \return Returns \b true if the output number is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +PWMOutValid(unsigned long ulPWMOut) +{ + return((ulPWMOut == PWM_OUT_0) || (ulPWMOut == PWM_OUT_1) || + (ulPWMOut == PWM_OUT_2) || (ulPWMOut == PWM_OUT_3) || + (ulPWMOut == PWM_OUT_4) || (ulPWMOut == PWM_OUT_5) || + (ulPWMOut == PWM_OUT_6) || (ulPWMOut == PWM_OUT_7)); +} +#endif + +//***************************************************************************** +// +//! Configures a PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to configure. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulConfig is the configuration for the PWM generator. +//! +//! This function is used to set the mode of operation for a PWM generator. +//! The counting mode, synchronization mode, and debug behavior are all +//! configured. After configuration, the generator is left in the disabled +//! state. +//! +//! A PWM generator can count in two different modes: count down mode or count +//! up/down mode. In count down mode, it will count from a value down to zero, +//! and then reset to the preset value. This will produce left-aligned PWM +//! signals (that is the rising edge of the two PWM signals produced by the +//! generator will occur at the same time). In count up/down mode, it will +//! count up from zero to the preset value, count back down to zero, and then +//! repeat the process. This will produce center-aligned PWM signals (that is, +//! the middle of the high/low period of the PWM signals produced by the +//! generator will occur at the same time). +//! +//! When the PWM generator parameters (period and pulse width) are modified, +//! their affect on the output PWM signals can be delayed. In synchronous +//! mode, the parameter updates are not applied until a synchronization event +//! occurs. This allows multiple parameters to be modified and take affect +//! simultaneously, instead of one at a time. Additionally, parameters to +//! multiple PWM generators in synchronous mode can be updated simultaneously, +//! allowing them to be treated as if they were a unified generator. In +//! non-synchronous mode, the parameter updates are not delayed until a +//! synchronization event. In either mode, the parameter updates only occur +//! when the counter is at zero to help prevent oddly formed PWM signals during +//! the update (that is, a PWM pulse that is too short or too long). +//! +//! The PWM generator can either pause or continue running when the processor +//! is stopped via the debugger. If configured to pause, it will continue to +//! count until it reaches zero, at which point it will pause until the +//! processor is restarted. If configured to continue running, it will keep +//! counting as if nothing had happened. +//! +//! The \e ulConfig parameter contains the desired configuration. It is the +//! logical OR of the following: +//! +//! - \b PWM_GEN_MODE_DOWN or \b PWM_GEN_MODE_UP_DOWN to specify the counting +//! mode +//! - \b PWM_GEN_MODE_SYNC or \b PWM_GEN_MODE_NO_SYNC to specify the counter +//! load and comparator update synchronization mode +//! - \b PWM_GEN_MODE_DBG_RUN or \b PWM_GEN_MODE_DBG_STOP to specify the debug +//! behavior +//! - \b PWM_GEN_MODE_GEN_NO_SYNC, \b PWM_GEN_MODE_GEN_SYNC_LOCAL, or +//! \b PWM_GEN_MODE_GEN_SYNC_GLOBAL to specify the update synchronization +//! mode for generator counting mode changes +//! - \b PWM_GEN_MODE_DB_NO_SYNC, \b PWM_GEN_MODE_DB_SYNC_LOCAL, or +//! \b PWM_GEN_MODE_DB_SYNC_GLOBAL to specify the deadband parameter +//! synchronization mode +//! - \b PWM_GEN_MODE_FAULT_LATCHED or \b PWM_GEN_MODE_FAULT_UNLATCHED to +//! specify whether fault conditions are latched or not +//! - \b PWM_GEN_MODE_FAULT_MINPER or \b PWM_GEN_MODE_FAULT_NO_MINPER to +//! specify whether minimum fault period support is required +//! - \b PWM_GEN_MODE_FAULT_EXT or \b PWM_GEN_MODE_FAULT_LEGACY to specify +//! whether extended fault source selection support is enabled or not +//! +//! Setting \b PWM_GEN_MODE_FAULT_MINPER allows an application to set the +//! minimum duration of a PWM fault signal. Fault will be signaled for at +//! least this time even if the external fault pin deasserts earlier. Care +//! should be taken when using this mode since during the fault signal period, +//! the fault interrupt from the PWM generator will remain asserted. The fault +//! interrupt handler may, therefore, reenter immediately if it exits prior to +//! expiration of the fault timer. +//! +//! \note Changes to the counter mode will affect the period of the PWM signals +//! produced. PWMGenPeriodSet() and PWMPulseWidthSet() should be called after +//! any changes to the counter mode of a generator. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Change the global configuration of the generator. + // + HWREG(ulGen + PWM_O_X_CTL) = ((HWREG(ulGen + PWM_O_X_CTL) & + ~(PWM_X_CTL_MODE | PWM_X_CTL_DEBUG | + PWM_X_CTL_LATCH | PWM_X_CTL_MINFLTPER | + PWM_X_CTL_FLTSRC | PWM_X_CTL_DBFALLUPD_M | + PWM_X_CTL_DBRISEUPD_M | + PWM_X_CTL_DBCTLUPD_M | + PWM_X_CTL_GENBUPD_M | + PWM_X_CTL_GENAUPD_M | + PWM_X_CTL_LOADUPD | PWM_X_CTL_CMPAUPD | + PWM_X_CTL_CMPBUPD)) | ulConfig); + + // + // Set the individual PWM generator controls. + // + if(ulConfig & PWM_X_CTL_MODE) + { + // + // In up/down count mode, set the signal high on up count comparison + // and low on down count comparison (that is, center align the + // signals). + // + HWREG(ulGen + PWM_O_X_GENA) = (PWM_X_GENA_ACTCMPAU_ONE | + PWM_X_GENA_ACTCMPAD_ZERO); + HWREG(ulGen + PWM_O_X_GENB) = (PWM_X_GENB_ACTCMPBU_ONE | + PWM_X_GENB_ACTCMPBD_ZERO); + } + else + { + // + // In down count mode, set the signal high on load and low on count + // comparison (that is, left align the signals). + // + HWREG(ulGen + PWM_O_X_GENA) = (PWM_X_GENA_ACTLOAD_ONE | + PWM_X_GENA_ACTCMPAD_ZERO); + HWREG(ulGen + PWM_O_X_GENB) = (PWM_X_GENB_ACTLOAD_ONE | + PWM_X_GENB_ACTCMPBD_ZERO); + } +} + +//***************************************************************************** +// +//! Set the period of a PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be modified. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulPeriod specifies the period of PWM generator output, measured +//! in clock ticks. +//! +//! This function sets the period of the specified PWM generator block, where +//! the period of the generator block is defined as the number of PWM clock +//! ticks between pulses on the generator block zero signal. +//! +//! \note Any subsequent calls made to this function before an update occurs +//! will cause the previous values to be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenPeriodSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Set the reload register based on the mode. + // + if(HWREG(ulGen + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + // + // In up/down count mode, set the reload register to half the requested + // period. + // + ASSERT((ulPeriod / 2) < 65536); + HWREG(ulGen + PWM_O_X_LOAD) = ulPeriod / 2; + } + else + { + // + // In down count mode, set the reload register to the requested period + // minus one. + // + ASSERT((ulPeriod <= 65536) && (ulPeriod != 0)); + HWREG(ulGen + PWM_O_X_LOAD) = ulPeriod - 1; + } +} + +//***************************************************************************** +// +//! Gets the period of a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function gets the period of the specified PWM generator block. The +//! period of the generator block is defined as the number of PWM clock ticks +//! between pulses on the generator block zero signal. +//! +//! If the update of the counter for the specified PWM generator has yet +//! to be completed, the value returned may not be the active period. The +//! value returned is the programmed period, measured in PWM clock ticks. +//! +//! \return Returns the programmed period of the specified generator block +//! in PWM clock ticks. +// +//***************************************************************************** +unsigned long +PWMGenPeriodGet(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Figure out the counter mode. + // + if(HWREG(ulGen + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + // + // The period is twice the reload register value. + // + return(HWREG(ulGen + PWM_O_X_LOAD) * 2); + } + else + { + // + // The period is the reload register value plus one. + // + return(HWREG(ulGen + PWM_O_X_LOAD) + 1); + } +} + +//***************************************************************************** +// +//! Enables the timer/counter for a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be enabled. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function allows the PWM clock to drive the timer/counter for the +//! specified generator block. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenEnable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Enable the PWM generator. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_CTL) |= PWM_X_CTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the timer/counter for a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be disabled. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function blocks the PWM clock from driving the timer/counter for the +//! specified generator block. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenDisable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Disable the PWM generator. + // + HWREG(PWM_GEN_BADDR(ulBase, + ulGen) + PWM_O_X_CTL) &= ~(PWM_X_CTL_ENABLE); +} + +//***************************************************************************** +// +//! Sets the pulse width for the specified PWM output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOut is the PWM output to modify. Must be one of \b PWM_OUT_0, +//! \b PWM_OUT_1, \b PWM_OUT_2, \b PWM_OUT_3, \b PWM_OUT_4, \b PWM_OUT_5, +//! \b PWM_OUT_6, or \b PWM_OUT_7. +//! \param ulWidth specifies the width of the positive portion of the pulse. +//! +//! This function sets the pulse width for the specified PWM output, where the +//! pulse width is defined as the number of PWM clock ticks. +//! +//! \note Any subsequent calls made to this function before an update occurs +//! will cause the previous values to be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +PWMPulseWidthSet(unsigned long ulBase, unsigned long ulPWMOut, + unsigned long ulWidth) +{ + unsigned long ulGenBase, ulReg; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMOutValid(ulPWMOut)); + + // + // Compute the generator's base address. + // + ulGenBase = PWM_OUT_BADDR(ulBase, ulPWMOut); + + // + // If the counter is in up/down count mode, divide the width by two. + // + if(HWREG(ulGenBase + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + ulWidth /= 2; + } + + // + // Get the period. + // + ulReg = HWREG(ulGenBase + PWM_O_X_LOAD); + + // + // Make sure the width is not too large. + // + ASSERT(ulWidth < ulReg); + + // + // Compute the compare value. + // + ulReg = ulReg - ulWidth; + + // + // Write to the appropriate registers. + // + if(PWM_IS_OUTPUT_ODD(ulPWMOut)) + { + HWREG(ulGenBase + PWM_O_X_CMPB) = ulReg; + } + else + { + HWREG(ulGenBase + PWM_O_X_CMPA) = ulReg; + } +} + +//***************************************************************************** +// +//! Gets the pulse width of a PWM output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOut is the PWM output to query. Must be one of \b PWM_OUT_0, +//! \b PWM_OUT_1, \b PWM_OUT_2, \b PWM_OUT_3, \b PWM_OUT_4, \b PWM_OUT_5, +//! \b PWM_OUT_6, or \b PWM_OUT_7. +//! +//! This function gets the currently programmed pulse width for the specified +//! PWM output. If the update of the comparator for the specified output has +//! yet to be completed, the value returned may not be the active pulse width. +//! The value returned is the programmed pulse width, measured in PWM clock +//! ticks. +//! +//! \return Returns the width of the pulse in PWM clock ticks. +// +//***************************************************************************** +unsigned long +PWMPulseWidthGet(unsigned long ulBase, unsigned long ulPWMOut) +{ + unsigned long ulGenBase, ulReg, ulLoad; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMOutValid(ulPWMOut)); + + // + // Compute the generator's base address. + // + ulGenBase = PWM_OUT_BADDR(ulBase, ulPWMOut); + + // + // Then compute the pulse width. If mode is UpDown, set + // width = (load - compare) * 2. Otherwise, set width = load - compare. + // + ulLoad = HWREG(ulGenBase + PWM_O_X_LOAD); + if(PWM_IS_OUTPUT_ODD(ulPWMOut)) + { + ulReg = HWREG(ulGenBase + PWM_O_X_CMPB); + } + else + { + ulReg = HWREG(ulGenBase + PWM_O_X_CMPA); + } + ulReg = ulLoad - ulReg; + + // + // If in up/down count mode, double the pulse width. + // + if(HWREG(ulGenBase + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + ulReg = ulReg * 2; + } + + // + // Return the pulse width. + // + return(ulReg); +} + +//***************************************************************************** +// +//! Enables the PWM dead band output, and sets the dead band delays. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to modify. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param usRise specifies the width of delay from the rising edge. +//! \param usFall specifies the width of delay from the falling edge. +//! +//! This function sets the dead bands for the specified PWM generator, +//! where the dead bands are defined as the number of \b PWM clock ticks +//! from the rising or falling edge of the generator's \b OutA signal. +//! Note that this function causes the coupling of \b OutB to \b OutA. +//! +//! \return None. +// +//***************************************************************************** +void +PWMDeadBandEnable(unsigned long ulBase, unsigned long ulGen, + unsigned short usRise, unsigned short usFall) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT(usRise < 4096); + ASSERT(usFall < 4096); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Write the dead band delay values. + // + HWREG(ulGen + PWM_O_X_DBRISE) = usRise; + HWREG(ulGen + PWM_O_X_DBFALL) = usFall; + + // + // Enable the deadband functionality. + // + HWREG(ulGen + PWM_O_X_DBCTL) |= PWM_X_DBCTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the PWM dead band output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to modify. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function disables the dead band mode for the specified PWM generator. +//! Doing so decouples the \b OutA and \b OutB signals. +//! +//! \return None. +// +//***************************************************************************** +void +PWMDeadBandDisable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Disable the deadband functionality. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_DBCTL) &= + ~(PWM_X_DBCTL_ENABLE); +} + +//***************************************************************************** +// +//! Synchronizes all pending updates. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenBits are the PWM generator blocks to be updated. Must be the +//! logical OR of any of \b PWM_GEN_0_BIT, \b PWM_GEN_1_BIT, +//! \b PWM_GEN_2_BIT, or \b PWM_GEN_3_BIT. +//! +//! For the selected PWM generators, this function causes all queued updates to +//! the period or pulse width to be applied the next time the corresponding +//! counter becomes zero. +//! +//! \return None. +// +//***************************************************************************** +void +PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulGenBits & ~(PWM_GEN_0_BIT | PWM_GEN_1_BIT | PWM_GEN_2_BIT | + PWM_GEN_3_BIT))); + + // + // Synchronize pending PWM register changes. + // + HWREG(ulBase + PWM_O_CTL) = ulGenBits; +} + +//***************************************************************************** +// +//! Synchronizes the counters in one or multiple PWM generator blocks. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenBits are the PWM generator blocks to be synchronized. Must be +//! the logical OR of any of \b PWM_GEN_0_BIT, \b PWM_GEN_1_BIT, +//! \b PWM_GEN_2_BIT, or \b PWM_GEN_3_BIT. +//! +//! For the selected PWM module, this function synchronizes the time base +//! of the generator blocks by causing the specified generator counters to be +//! reset to zero. +//! +//! \return None. +// +//***************************************************************************** +void +PWMSyncTimeBase(unsigned long ulBase, unsigned long ulGenBits) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulGenBits & ~(PWM_GEN_0_BIT | PWM_GEN_1_BIT | PWM_GEN_2_BIT | + PWM_GEN_3_BIT))); + + // + // Synchronize the counters in the specified generators by writing to the + // module's synchronization register. + // + HWREG(ulBase + PWM_O_SYNC) = ulGenBits; +} + +//***************************************************************************** +// +//! Enables or disables PWM outputs. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, +//! or \b PWM_OUT_7_BIT. +//! \param bEnable determines if the signal is enabled or disabled. +//! +//! This function is used to enable or disable the selected PWM outputs. The +//! outputs are selected using the parameter \e ulPWMOutBits. The parameter +//! \e bEnable determines the state of the selected outputs. If \e bEnable is +//! \b true, then the selected PWM outputs are enabled, or placed in the active +//! state. If \e bEnable is \b false, then the selected outputs are disabled, +//! or placed in the inactive state. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputState(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bEnable) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's ENABLE output control register, and set or clear the + // requested bits. + // + if(bEnable == true) + { + HWREG(ulBase + PWM_O_ENABLE) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_ENABLE) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Selects the inversion mode for PWM outputs. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bInvert determines if the signal is inverted or passed through. +//! +//! This function is used to select the inversion mode for the selected PWM +//! outputs. The outputs are selected using the parameter \e ulPWMOutBits. +//! The parameter \e bInvert determines the inversion mode for the selected +//! outputs. If \e bInvert is \b true, this function will cause the specified +//! PWM output signals to be inverted, or made active low. If \e bInvert is +//! \b false, the specified output will be passed through as is, or be made +//! active high. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputInvert(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bInvert) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's INVERT output control register, and set or clear the + // requested bits. + // + if(bInvert == true) + { + HWREG(ulBase + PWM_O_INVERT) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_INVERT) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Specifies the level of PWM outputs suppressed in response to a fault +//! condition. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bDriveHigh determines if the signal is driven high or low during an +//! active fault condition. +//! +//! This function determines whether a PWM output pin that is suppressed in +//! response to a fault condition will be driven high or low. The affected +//! outputs are selected using the parameter \e ulPWMOutBits. The parameter +//! \e bDriveHigh determines the output level for the pins identified by +//! \e ulPWMOutBits. If \e bDriveHigh is \b true then the selected outputs +//! will be driven high when a fault is detected. If it is \e false, the pins +//! will be driven low. +//! +//! In a fault condition, pins which have not been configured to be suppressed +//! via a call to PWMOutputFault() are unaffected by this function. +//! +//! \note This function is available only on devices which support extended +//! PWM fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputFaultLevel(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bDriveHigh) +{ + // + // Check the arguments. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's FAULT output control register, and set or clear the + // requested bits. + // + if(bDriveHigh == true) + { + HWREG(ulBase + PWM_O_FAULTVAL) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_FAULTVAL) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Specifies the state of PWM outputs in response to a fault condition. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bFaultSuppress determines if the signal is suppressed or passed +//! through during an active fault condition. +//! +//! This function sets the fault handling characteristics of the selected PWM +//! outputs. The outputs are selected using the parameter \e ulPWMOutBits. +//! The parameter \e bFaultSuppress determines the fault handling +//! characteristics for the selected outputs. If \e bFaultSuppress is \b true, +//! then the selected outputs will be made inactive. If \e bFaultSuppress is +//! \b false, then the selected outputs are unaffected by the detected fault. +//! +//! On devices supporting extended PWM fault handling, the state the affected +//! output pins are driven to can be configured with PWMOutputFaultLevel(). If +//! not configured, or if the device does not support extended PWM fault +//! handling, affected outputs will be driven low on a fault condition. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputFault(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bFaultSuppress) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's FAULT output control register, and set or clear the + // requested bits. + // + if(bFaultSuppress == true) + { + HWREG(ulBase + PWM_O_FAULT) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_FAULT) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator in question. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param pfnIntHandler is a pointer to the function to be called when the PWM +//! generator interrupt occurs. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected for the specified +//! PWM generator block. This function will also enable the corresponding +//! PWM generator interrupt in the interrupt controller; individual generator +//! interrupts and interrupt sources must be enabled with PWMIntEnable() and +//! PWMGenIntTrigEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, + void (*pfnIntHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Get the interrupt number associated with the specified generator. + // + if(ulGen == PWM_GEN_3) + { + ulInt = INT_PWM3; + } + else + { + ulInt = INT_PWM0 + (ulGen >> 6) - 1; + } + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnIntHandler); + + // + // Enable the PWMx interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator in question. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function will unregister the interrupt handler for the specified +//! PWM generator block. This function will also disable the corresponding +//! PWM generator interrupt in the interrupt controller; individual generator +//! interrupts and interrupt sources must be disabled with PWMIntDisable() and +//! PWMGenIntTrigDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Get the interrupt number associated with the specified generator. + // + if(ulGen == PWM_GEN_3) + { + ulInt = INT_PWM3; + } + else + { + ulInt = INT_PWM0 + (ulGen >> 6) - 1; + } + + // + // Disable the PWMx interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a fault condition detected in a PWM +//! module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param pfnIntHandler is a pointer to the function to be called when the PWM +//! fault interrupt occurs. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when a fault interrupt is detected for the +//! selected PWM module. This function will also enable the PWM fault +//! interrupt in the NVIC; the PWM fault interrupt must also be enabled at the +//! module level using PWMIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntRegister(unsigned long ulBase, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Register the interrupt handler, returning an error if one occurs. + // + IntRegister(INT_PWM_FAULT, pfnIntHandler); + + // + // Enable the PWM fault interrupt. + // + IntEnable(INT_PWM_FAULT); +} + +//***************************************************************************** +// +//! Removes the PWM fault condition interrupt handler. +//! +//! \param ulBase is the base address of the PWM module. +//! +//! This function will remove the interrupt handler for a PWM fault interrupt +//! from the selected PWM module. This function will also disable the PWM +//! fault interrupt in the NVIC; the PWM fault interrupt must also be disabled +//! at the module level using PWMIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Disable the PWM fault interrupt. + // + IntDisable(INT_PWM_FAULT); + + // + // Unregister the interrupt handler, returning an error if one occurs. + // + IntUnregister(INT_PWM_FAULT); +} + +//***************************************************************************** +// +//! Enables interrupts and triggers for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to have interrupts and triggers enabled. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulIntTrig specifies the interrupts and triggers to be enabled. +//! +//! Unmasks the specified interrupt(s) and trigger(s) by setting the +//! specified bits of the interrupt/trigger enable register for the specified +//! PWM generator. The \e ulIntTrig parameter is the logical OR of +//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, +//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD, +//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD, +//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | + PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU | + PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD | + PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU | + PWM_TR_CNT_BD)) == 0); + + // + // Enable the specified interrupts/triggers. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) |= ulIntTrig; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to have interrupts and triggers disabled. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulIntTrig specifies the interrupts and triggers to be disabled. +//! +//! Masks the specified interrupt(s) and trigger(s) by clearing the +//! specified bits of the interrupt/trigger enable register for the specified +//! PWM generator. The \e ulIntTrig parameter is the logical OR of +//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, +//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD, +//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD, +//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | + PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU | + PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD | + PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU | + PWM_TR_CNT_BD)) == 0); + + // + // Disable the specified interrupts/triggers. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) &= ~(ulIntTrig); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of \b PWM_GEN_0, +//! \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns the contents of the interrupt status register, or the +//! contents of the raw interrupt status register, for the specified +//! PWM generator. +// +//***************************************************************************** +unsigned long +PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Read and return the specified generator's raw or enabled interrupt + // status. + // + if(bMasked == true) + { + return(HWREG(ulGen + PWM_O_X_ISC)); + } + else + { + return(HWREG(ulGen + PWM_O_X_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the specified interrupt(s) for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of \b PWM_GEN_0, +//! \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulInts specifies the interrupts to be cleared. +//! +//! Clears the specified interrupt(s) by writing a 1 to the specified bits +//! of the interrupt status register for the specified PWM generator. The +//! \e ulInts parameter is the logical OR of \b PWM_INT_CNT_ZERO, +//! \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, \b PWM_INT_CNT_AD, +//! \b PWM_INT_CNT_BU, or \b PWM_INT_CNT_BD. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, unsigned long ulInts) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulInts & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | PWM_INT_CNT_AU | + PWM_INT_CNT_AD | PWM_INT_CNT_BU | PWM_INT_CNT_BD)) == + 0); + + // + // Clear the requested interrupts by writing ones to the specified bit + // of the module's interrupt enable register. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_ISC) = ulInts; +} + +//***************************************************************************** +// +//! Enables generator and fault interrupts for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenFault contains the interrupts to be enabled. Must be a logical +//! OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, +//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, +//! or \b PWM_INT_FAULT3. +//! +//! Unmasks the specified interrupt(s) by setting the specified bits of +//! the interrupt enable register for the selected PWM module. +//! +//! \return None. +// +//***************************************************************************** +void +PWMIntEnable(unsigned long ulBase, unsigned long ulGenFault) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 | + PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Read the module's interrupt enable register, and enable interrupts + // for the specified PWM generators. + // + HWREG(ulBase + PWM_O_INTEN) |= ulGenFault; +} + +//***************************************************************************** +// +//! Disables generator and fault interrupts for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenFault contains the interrupts to be disabled. Must be a +//! logical OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, +//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, +//! or \b PWM_INT_FAULT3. +//! +//! Masks the specified interrupt(s) by clearing the specified bits of +//! the interrupt enable register for the selected PWM module. +//! +//! \return None. +// +//***************************************************************************** +void +PWMIntDisable(unsigned long ulBase, unsigned long ulGenFault) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 | + PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Read the module's interrupt enable register, and disable interrupts + // for the specified PWM generators. + // + HWREG(ulBase + PWM_O_INTEN) &= ~(ulGenFault); +} + +//***************************************************************************** +// +//! Clears the fault interrupt for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! +//! Clears the fault interrupt by writing to the appropriate bit of the +//! interrupt status register for the selected PWM module. +//! +//! This function clears only the FAULT0 interrupt and is retained for +//! backwards compatibility. It is recommended that PWMFaultIntClearExt() be +//! used instead since it supports all fault interrupts supported on devices +//! with and without extended PWM fault handling support. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Write the only writeable bit in the module's interrupt register. + // + HWREG(ulBase + PWM_O_ISC) = PWM_ISC_INTFAULT0; +} + +//***************************************************************************** +// +//! Gets the interrupt status for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, \b PWM_INT_GEN_3, +//! \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, and +//! \b PWM_INT_FAULT3. +//! +//***************************************************************************** +unsigned long +PWMIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Read and return either the module's raw or enabled interrupt status. + // + if(bMasked == true) + { + return(HWREG(ulBase + PWM_O_ISC)); + } + else + { + return(HWREG(ulBase + PWM_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the fault interrupt for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulFaultInts specifies the fault interrupts to clear. +//! +//! Clears one or more fault interrupts by writing to the appropriate bit of +//! the PWM interrupt status register. The parameter \e ulFaultInts must be +//! the logical OR of any of \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, +//! \b PWM_INT_FAULT2, or \b PWM_INT_FAULT3. +//! +//! When running on a device supporting extended PWM fault handling, the fault +//! interrupts are derived by performing a logical OR of each of the configured +//! fault trigger signals for a given generator. Therefore, these interrupts +//! are not directly related to the four possible FAULTn inputs to the device +//! but indicate that a fault has been signaled to one of the four possible PWM +//! generators. On a device without extended PWM fault handling, the interrupt +//! is directly related to the state of the single FAULT pin. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntClearExt(unsigned long ulBase, unsigned long ulFaultInts) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulFaultInts & ~(PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Clear the supplied fault bits. + // + HWREG(ulBase + PWM_O_ISC) = ulFaultInts; +} + +//***************************************************************************** +// +//! Configures the minimum fault period and fault pin senses for a given +//! PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault configuration is being set. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulMinFaultPeriod is the minimum fault active period expressed in +//! PWM clock cycles. +//! \param ulFaultSenses indicates which sense of each FAULT input should be +//! considered the ``asserted'' state. Valid values are logical OR +//! combinations of \b PWM_FAULTn_SENSE_HIGH and \b PWM_FAULTn_SENSE_LOW. +//! +//! This function sets the minimum fault period for a given generator along +//! with the sense of each of the 4 possible fault inputs. The minimum fault +//! period is expressed in PWM clock cycles and takes effect only if +//! PWMGenConfigure() is called with flag \b PWM_GEN_MODE_FAULT_PER set in the +//! \e ulConfig parameter. When a fault input is asserted, the minimum fault +//! period timer ensures that it remains asserted for at least the number of +//! clock cycles specified. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulMinFaultPeriod, + unsigned long ulFaultSenses) +{ + // + // Check the arguments. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT(ulMinFaultPeriod < PWM_X_MINFLTPER_M); + ASSERT((ulFaultSenses & ~(PWM_FAULT0_SENSE_HIGH | PWM_FAULT0_SENSE_LOW | + PWM_FAULT1_SENSE_HIGH | PWM_FAULT1_SENSE_LOW | + PWM_FAULT2_SENSE_HIGH | PWM_FAULT2_SENSE_LOW | + PWM_FAULT3_SENSE_HIGH | PWM_FAULT3_SENSE_LOW)) == + 0); + + // + // Write the minimum fault period. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_MINFLTPER) = ulMinFaultPeriod; + + // + // Write the fault senses. + // + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSEN) = ulFaultSenses; +} + +//***************************************************************************** +// +//! Configures the set of fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault triggers are being set. Must +//! be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulGroup indicates the subset of possible faults that are to be +//! configured. This must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! \param ulFaultTriggers defines the set of inputs that are to contribute +//! towards generation of the fault signal to the given PWM generator. For +//! \b PWM_FAULT_GROUP_0, this will be the logical OR of \b PWM_FAULT_FAULT0, +//! \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or \b PWM_FAULT_FAULT3. For +//! \b PWM_FAULT_GROUP_1, this will be the logical OR of \b PWM_FAULT_DCMP0, +//! \b PWM_FAULT_DCMP1, \b PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b +//! PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, \b PWM_FAULT_DCMP6, or \b +//! PWM_FAULT_DCMP7. +//! +//! This function allows selection of the set of fault inputs that will be +//! combined to generate a fault condition to a given PWM generator. By +//! default, all generators use only FAULT0 (for backwards compatibility) but +//! if PWMGenConfigure() is called with flag \b PWM_GEN_MODE_FAULT_SRC in the +//! \e ulConfig parameter, extended fault handling is enabled and this function +//! must be called to configure the fault triggers. +//! +//! The fault signal to the PWM generator is generated by ORing together each +//! of the signals whose inputs are specified in the \e ulFaultTriggers +//! parameter after having adjusted the sense of each FAULTn input based on the +//! configuration previously set using a call to PWMGenFaultConfigure(). +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultTriggerSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, unsigned long ulFaultTriggers) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) && + ((ulFaultTriggers & ~(PWM_FAULT_FAULT0 | PWM_FAULT_FAULT1 | + PWM_FAULT_FAULT2 | PWM_FAULT_FAULT3)) == 0)); + ASSERT((ulGroup == PWM_FAULT_GROUP_1) && + ((ulFaultTriggers & ~(PWM_FAULT_DCMP0 | PWM_FAULT_DCMP1 | + PWM_FAULT_DCMP2 | PWM_FAULT_DCMP3 | + PWM_FAULT_DCMP4 | PWM_FAULT_DCMP5 | + PWM_FAULT_DCMP6 | PWM_FAULT_DCMP7)) == 0)); + + // + // Write the fault triggers to the appropriate register. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC0) = + ulFaultTriggers; + } + else + { + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC1) = + ulFaultTriggers; + } +} + +//***************************************************************************** +// +//! Returns the set of fault triggers currently configured for a given PWM +//! generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault triggers are being queried. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! +//! This function allows an application to query the current set of inputs that +//! contribute towards the generation of a fault condition to a given PWM +//! generator. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return Returns the current fault triggers configured for the fault group +//! provided. For \b PWM_FAULT_GROUP_0, the returned value will be a logical +//! OR of \b PWM_FAULT_FAULT0, \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or +//! \b PWM_FAULT_FAULT3. For \b PWM_FAULT_GROUP_1, the return value will be +//! the logical OR of \b PWM_FAULT_DCMP0, \b PWM_FAULT_DCMP1, \b +//! PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, +//! \b PWM_FAULT_DCMP6, or \b PWM_FAULT_DCMP7. +// +//***************************************************************************** +unsigned long +PWMGenFaultTriggerGet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + + // + // Return the current fault triggers. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + return(HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC0)); + } + else + { + return(HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC1)); + } +} + +//***************************************************************************** +// +//! Returns the current state of the fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault trigger states are being +//! queried. Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or +//! \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! +//! This function allows an application to query the current state of each of +//! the fault trigger inputs to a given PWM generator. The current state of +//! each fault trigger input is returned unless PWMGenConfigure() has +//! previously been called with flag \b PWM_GEN_MODE_LATCH_FAULT in the +//! \e ulConfig parameter in which case the returned status is the latched +//! fault trigger status. +//! +//! If latched faults are configured, the application must call +//! PWMGenFaultClear() to clear each trigger. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return Returns the current state of the fault triggers for the given PWM +//! generator. A set bit indicates that the associated trigger is active. For +//! \b PWM_FAULT_GROUP_0, the returned value will be a logical OR of +//! \b PWM_FAULT_FAULT0, \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or +//! \b PWM_FAULT_FAULT3. For \b PWM_FAULT_GROUP_1, the return value will be +//! the logical OR of \b PWM_FAULT_DCMP0, \b PWM_FAULT_DCMP1, \b +//! PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, +//! \b PWM_FAULT_DCMP6, or \b PWM_FAULT_DCMP7. +// +//***************************************************************************** +unsigned long +PWMGenFaultStatus(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + + // + // Return the current fault status. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + return(HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT0)); + } + else + { + return(HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT1)); + } +} + +//***************************************************************************** +// +//! Clears one or more latched fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault trigger states are being +//! queried. Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or +//! \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! \param ulFaultTriggers is the set of fault triggers which are to be +//! cleared. +//! +//! This function allows an application to clear the fault triggers for a given +//! PWM generator. This is only required if PWMGenConfigure() has previously +//! been called with flag \b PWM_GEN_MODE_LATCH_FAULT in parameter \e ulConfig. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, unsigned long ulFaultTriggers) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) && + ((ulFaultTriggers & ~(PWM_FAULT_FAULT0 | PWM_FAULT_FAULT1 | + PWM_FAULT_FAULT2 | PWM_FAULT_FAULT3)) == 0)); + ASSERT((ulGroup == PWM_FAULT_GROUP_1) && + ((ulFaultTriggers & ~(PWM_FAULT_DCMP0 | PWM_FAULT_DCMP1 | + PWM_FAULT_DCMP2 | PWM_FAULT_DCMP3 | + PWM_FAULT_DCMP4 | PWM_FAULT_DCMP5 | + PWM_FAULT_DCMP6 | PWM_FAULT_DCMP7)) == 0)); + + // + // Clear the given faults. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT0) = + ulFaultTriggers; + } + else + { + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT1) = + ulFaultTriggers; + } +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.h new file mode 100644 index 00000000..8eca5912 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/pwm.h @@ -0,0 +1,283 @@ +//***************************************************************************** +// +// pwm.h - API function protoypes for Pulse Width Modulation (PWM) ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __PWM_H__ +#define __PWM_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following defines are passed to PWMGenConfigure() as the ulConfig +// parameter and specify the configuration of the PWM generator. +// +//***************************************************************************** +#define PWM_GEN_MODE_DOWN 0x00000000 // Down count mode +#define PWM_GEN_MODE_UP_DOWN 0x00000002 // Up/Down count mode +#define PWM_GEN_MODE_SYNC 0x00000038 // Synchronous updates +#define PWM_GEN_MODE_NO_SYNC 0x00000000 // Immediate updates +#define PWM_GEN_MODE_DBG_RUN 0x00000004 // Continue running in debug mode +#define PWM_GEN_MODE_DBG_STOP 0x00000000 // Stop running in debug mode +#define PWM_GEN_MODE_FAULT_LATCHED \ + 0x00040000 // Fault is latched +#define PWM_GEN_MODE_FAULT_UNLATCHED \ + 0x00000000 // Fault is not latched +#define PWM_GEN_MODE_FAULT_MINPER \ + 0x00020000 // Enable min fault period +#define PWM_GEN_MODE_FAULT_NO_MINPER \ + 0x00000000 // Disable min fault period +#define PWM_GEN_MODE_FAULT_EXT 0x00010000 // Enable extended fault support +#define PWM_GEN_MODE_FAULT_LEGACY \ + 0x00000000 // Disable extended fault support +#define PWM_GEN_MODE_DB_NO_SYNC 0x00000000 // Deadband updates occur + // immediately +#define PWM_GEN_MODE_DB_SYNC_LOCAL \ + 0x0000A800 // Deadband updates locally + // synchronized +#define PWM_GEN_MODE_DB_SYNC_GLOBAL \ + 0x0000FC00 // Deadband updates globally + // synchronized +#define PWM_GEN_MODE_GEN_NO_SYNC \ + 0x00000000 // Generator mode updates occur + // immediately +#define PWM_GEN_MODE_GEN_SYNC_LOCAL \ + 0x00000280 // Generator mode updates locally + // synchronized +#define PWM_GEN_MODE_GEN_SYNC_GLOBAL \ + 0x000003C0 // Generator mode updates globally + // synchronized + +//***************************************************************************** +// +// Defines for enabling, disabling, and clearing PWM generator interrupts and +// triggers. +// +//***************************************************************************** +#define PWM_INT_CNT_ZERO 0x00000001 // Int if COUNT = 0 +#define PWM_INT_CNT_LOAD 0x00000002 // Int if COUNT = LOAD +#define PWM_INT_CNT_AU 0x00000004 // Int if COUNT = CMPA U +#define PWM_INT_CNT_AD 0x00000008 // Int if COUNT = CMPA D +#define PWM_INT_CNT_BU 0x00000010 // Int if COUNT = CMPA U +#define PWM_INT_CNT_BD 0x00000020 // Int if COUNT = CMPA D +#define PWM_TR_CNT_ZERO 0x00000100 // Trig if COUNT = 0 +#define PWM_TR_CNT_LOAD 0x00000200 // Trig if COUNT = LOAD +#define PWM_TR_CNT_AU 0x00000400 // Trig if COUNT = CMPA U +#define PWM_TR_CNT_AD 0x00000800 // Trig if COUNT = CMPA D +#define PWM_TR_CNT_BU 0x00001000 // Trig if COUNT = CMPA U +#define PWM_TR_CNT_BD 0x00002000 // Trig if COUNT = CMPA D + +//***************************************************************************** +// +// Defines for enabling, disabling, and clearing PWM interrupts. +// +//***************************************************************************** +#define PWM_INT_GEN_0 0x00000001 // Generator 0 interrupt +#define PWM_INT_GEN_1 0x00000002 // Generator 1 interrupt +#define PWM_INT_GEN_2 0x00000004 // Generator 2 interrupt +#define PWM_INT_GEN_3 0x00000008 // Generator 3 interrupt +#ifndef DEPRECATED +#define PWM_INT_FAULT 0x00010000 // Fault interrupt +#endif +#define PWM_INT_FAULT0 0x00010000 // Fault0 interrupt +#define PWM_INT_FAULT1 0x00020000 // Fault1 interrupt +#define PWM_INT_FAULT2 0x00040000 // Fault2 interrupt +#define PWM_INT_FAULT3 0x00080000 // Fault3 interrupt +#define PWM_INT_FAULT_M 0x000F0000 // Fault interrupt source mask + +//***************************************************************************** +// +// Defines to identify the generators within a module. +// +//***************************************************************************** +#define PWM_GEN_0 0x00000040 // Offset address of Gen0 +#define PWM_GEN_1 0x00000080 // Offset address of Gen1 +#define PWM_GEN_2 0x000000C0 // Offset address of Gen2 +#define PWM_GEN_3 0x00000100 // Offset address of Gen3 + +#define PWM_GEN_0_BIT 0x00000001 // Bit-wise ID for Gen0 +#define PWM_GEN_1_BIT 0x00000002 // Bit-wise ID for Gen1 +#define PWM_GEN_2_BIT 0x00000004 // Bit-wise ID for Gen2 +#define PWM_GEN_3_BIT 0x00000008 // Bit-wise ID for Gen3 + +#define PWM_GEN_EXT_0 0x00000800 // Offset of Gen0 ext address range +#define PWM_GEN_EXT_1 0x00000880 // Offset of Gen1 ext address range +#define PWM_GEN_EXT_2 0x00000900 // Offset of Gen2 ext address range +#define PWM_GEN_EXT_3 0x00000980 // Offset of Gen3 ext address range + +//***************************************************************************** +// +// Defines to identify the outputs within a module. +// +//***************************************************************************** +#define PWM_OUT_0 0x00000040 // Encoded offset address of PWM0 +#define PWM_OUT_1 0x00000041 // Encoded offset address of PWM1 +#define PWM_OUT_2 0x00000082 // Encoded offset address of PWM2 +#define PWM_OUT_3 0x00000083 // Encoded offset address of PWM3 +#define PWM_OUT_4 0x000000C4 // Encoded offset address of PWM4 +#define PWM_OUT_5 0x000000C5 // Encoded offset address of PWM5 +#define PWM_OUT_6 0x00000106 // Encoded offset address of PWM6 +#define PWM_OUT_7 0x00000107 // Encoded offset address of PWM7 + +#define PWM_OUT_0_BIT 0x00000001 // Bit-wise ID for PWM0 +#define PWM_OUT_1_BIT 0x00000002 // Bit-wise ID for PWM1 +#define PWM_OUT_2_BIT 0x00000004 // Bit-wise ID for PWM2 +#define PWM_OUT_3_BIT 0x00000008 // Bit-wise ID for PWM3 +#define PWM_OUT_4_BIT 0x00000010 // Bit-wise ID for PWM4 +#define PWM_OUT_5_BIT 0x00000020 // Bit-wise ID for PWM5 +#define PWM_OUT_6_BIT 0x00000040 // Bit-wise ID for PWM6 +#define PWM_OUT_7_BIT 0x00000080 // Bit-wise ID for PWM7 + +//***************************************************************************** +// +// Defines to identify each of the possible fault trigger conditions in +// PWM_FAULT_GROUP_0. +// +//***************************************************************************** +#define PWM_FAULT_GROUP_0 0 + +#define PWM_FAULT_FAULT0 0x00000001 +#define PWM_FAULT_FAULT1 0x00000002 +#define PWM_FAULT_FAULT2 0x00000004 +#define PWM_FAULT_FAULT3 0x00000008 +#define PWM_FAULT_ACMP0 0x00010000 +#define PWM_FAULT_ACMP1 0x00020000 +#define PWM_FAULT_ACMP2 0x00040000 + +//***************************************************************************** +// +// Defines to identify each of the possible fault trigger conditions in +// PWM_FAULT_GROUP_1. +// +//***************************************************************************** +#define PWM_FAULT_GROUP_1 1 + +#define PWM_FAULT_DCMP0 0x00000001 +#define PWM_FAULT_DCMP1 0x00000002 +#define PWM_FAULT_DCMP2 0x00000004 +#define PWM_FAULT_DCMP3 0x00000008 +#define PWM_FAULT_DCMP4 0x00000010 +#define PWM_FAULT_DCMP5 0x00000020 +#define PWM_FAULT_DCMP6 0x00000040 +#define PWM_FAULT_DCMP7 0x00000080 + +//***************************************************************************** +// +// Defines to identify the sense of each of the external FAULTn signals +// +//***************************************************************************** +#define PWM_FAULT0_SENSE_HIGH 0x00000000 +#define PWM_FAULT0_SENSE_LOW 0x00000001 +#define PWM_FAULT1_SENSE_HIGH 0x00000000 +#define PWM_FAULT1_SENSE_LOW 0x00000002 +#define PWM_FAULT2_SENSE_HIGH 0x00000000 +#define PWM_FAULT2_SENSE_LOW 0x00000004 +#define PWM_FAULT3_SENSE_HIGH 0x00000000 +#define PWM_FAULT3_SENSE_LOW 0x00000008 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void PWMGenConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulConfig); +extern void PWMGenPeriodSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulPeriod); +extern unsigned long PWMGenPeriodGet(unsigned long ulBase, + unsigned long ulGen); +extern void PWMGenEnable(unsigned long ulBase, unsigned long ulGen); +extern void PWMGenDisable(unsigned long ulBase, unsigned long ulGen); +extern void PWMPulseWidthSet(unsigned long ulBase, unsigned long ulPWMOut, + unsigned long ulWidth); +extern unsigned long PWMPulseWidthGet(unsigned long ulBase, + unsigned long ulPWMOut); +extern void PWMDeadBandEnable(unsigned long ulBase, unsigned long ulGen, + unsigned short usRise, unsigned short usFall); +extern void PWMDeadBandDisable(unsigned long ulBase, unsigned long ulGen); +extern void PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits); +extern void PWMSyncTimeBase(unsigned long ulBase, unsigned long ulGenBits); +extern void PWMOutputState(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bEnable); +extern void PWMOutputInvert(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bInvert); +extern void PWMOutputFaultLevel(unsigned long ulBase, + unsigned long ulPWMOutBits, + tBoolean bDriveHigh); +extern void PWMOutputFault(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bFaultSuppress); +extern void PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, + void (*pfnIntHandler)(void)); +extern void PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen); +extern void PWMFaultIntRegister(unsigned long ulBase, + void (*pfnIntHandler)(void)); +extern void PWMFaultIntUnregister(unsigned long ulBase); +extern void PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig); +extern void PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig); +extern unsigned long PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, + tBoolean bMasked); +extern void PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulInts); +extern void PWMIntEnable(unsigned long ulBase, unsigned long ulGenFault); +extern void PWMIntDisable(unsigned long ulBase, unsigned long ulGenFault); +extern void PWMFaultIntClear(unsigned long ulBase); +extern unsigned long PWMIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void PWMFaultIntClearExt(unsigned long ulBase, + unsigned long ulFaultInts); +extern void PWMGenFaultConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulMinFaultPeriod, + unsigned long ulFaultSenses); +extern void PWMGenFaultTriggerSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, + unsigned long ulFaultTriggers); +extern unsigned long PWMGenFaultTriggerGet(unsigned long ulBase, + unsigned long ulGen, + unsigned long ulGroup); +extern unsigned long PWMGenFaultStatus(unsigned long ulBase, + unsigned long ulGen, + unsigned long ulGroup); +extern void PWMGenFaultClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, + unsigned long ulFaultTriggers); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __PWM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.c new file mode 100644 index 00000000..4615846e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.c @@ -0,0 +1,616 @@ +//***************************************************************************** +// +// qei.c - Driver for the Quadrature Encoder with Index. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup qei_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_qei.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/qei.h" + +//***************************************************************************** +// +//! Enables the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will enable operation of the quadrature encoder module. It must be +//! configured before it is enabled. +//! +//! \sa QEIConfigure() +//! +//! \return None. +// +//***************************************************************************** +void +QEIEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the QEI module. + // + HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will disable operation of the quadrature encoder module. +//! +//! \return None. +// +//***************************************************************************** +void +QEIDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the QEI module. + // + HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_ENABLE); +} + +//***************************************************************************** +// +//! Configures the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulConfig is the configuration for the quadrature encoder. See below +//! for a description of this parameter. +//! \param ulMaxPosition specifies the maximum position value. +//! +//! This will configure the operation of the quadrature encoder. The +//! \e ulConfig parameter provides the configuration of the encoder and is the +//! logical OR of several values: +//! +//! - \b QEI_CONFIG_CAPTURE_A or \b QEI_CONFIG_CAPTURE_A_B to specify if edges +//! on channel A or on both channels A and B should be counted by the +//! position integrator and velocity accumulator. +//! - \b QEI_CONFIG_NO_RESET or \b QEI_CONFIG_RESET_IDX to specify if the +//! position integrator should be reset when the index pulse is detected. +//! - \b QEI_CONFIG_QUADRATURE or \b QEI_CONFIG_CLOCK_DIR to specify if +//! quadrature signals are being provided on ChA and ChB, or if a direction +//! signal and a clock are being provided instead. +//! - \b QEI_CONFIG_NO_SWAP or \b QEI_CONFIG_SWAP to specify if the signals +//! provided on ChA and ChB should be swapped before being processed. +//! +//! \e ulMaxPosition is the maximum value of the position integrator, and is +//! the value used to reset the position capture when in index reset mode and +//! moving in the reverse (negative) direction. +//! +//! \return None. +// +//***************************************************************************** +void +QEIConfigure(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxPosition) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Write the new configuration to the hardware. + // + HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) & + ~(QEI_CTL_CAPMODE | QEI_CTL_RESMODE | + QEI_CTL_SIGMODE | QEI_CTL_SWAP)) | + ulConfig); + + // + // Set the maximum position. + // + HWREG(ulBase + QEI_O_MAXPOS) = ulMaxPosition; +} + +//***************************************************************************** +// +//! Gets the current encoder position. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current position of the encoder. Depending upon the +//! configuration of the encoder, and the incident of an index pulse, this +//! value may or may not contain the expected data (that is, if in reset on +//! index mode, if an index pulse has not been encountered, the position +//! counter will not be aligned with the index pulse yet). +//! +//! \return The current position of the encoder. +// +//***************************************************************************** +unsigned long +QEIPositionGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the current position counter. + // + return(HWREG(ulBase + QEI_O_POS)); +} + +//***************************************************************************** +// +//! Sets the current encoder position. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulPosition is the new position for the encoder. +//! +//! This sets the current position of the encoder; the encoder position will +//! then be measured relative to this value. +//! +//! \return None. +// +//***************************************************************************** +void +QEIPositionSet(unsigned long ulBase, unsigned long ulPosition) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Set the position counter. + // + HWREG(ulBase + QEI_O_POS) = ulPosition; +} + +//***************************************************************************** +// +//! Gets the current direction of rotation. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current direction of rotation. In this case, current +//! means the most recently detected direction of the encoder; it may not be +//! presently moving but this is the direction it last moved before it stopped. +//! +//! \return Returns 1 if moving in the forward direction or -1 if moving in the +//! reverse direction. +// +//***************************************************************************** +long +QEIDirectionGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the direction of rotation. + // + return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_DIRECTION) ? -1 : 1); +} + +//***************************************************************************** +// +//! Gets the encoder error indicator. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the error indicator for the quadrature encoder. It is an +//! error for both of the signals of the quadrature input to change at the same +//! time. +//! +//! \return Returns \b true if an error has occurred and \b false otherwise. +// +//***************************************************************************** +tBoolean +QEIErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the error indicator. + // + return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_ERROR) ? true : false); +} + +//***************************************************************************** +// +//! Enables the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will enable operation of the velocity capture in the quadrature +//! encoder module. It must be configured before it is enabled. Velocity +//! capture will not occur if the quadrature encoder is not enabled. +//! +//! \sa QEIVelocityConfigure() and QEIEnable() +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the velocity capture. + // + HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_VELEN; +} + +//***************************************************************************** +// +//! Disables the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will disable operation of the velocity capture in the quadrature +//! encoder module. +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the velocity capture. + // + HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_VELEN); +} + +//***************************************************************************** +// +//! Configures the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulPreDiv specifies the predivider applied to the input quadrature +//! signal before it is counted; can be one of \b QEI_VELDIV_1, +//! \b QEI_VELDIV_2, \b QEI_VELDIV_4, \b QEI_VELDIV_8, \b QEI_VELDIV_16, +//! \b QEI_VELDIV_32, \b QEI_VELDIV_64, or \b QEI_VELDIV_128. +//! \param ulPeriod specifies the number of clock ticks over which to measure +//! the velocity; must be non-zero. +//! +//! This will configure the operation of the velocity capture portion of the +//! quadrature encoder. The position increment signal is predivided as +//! specified by \e ulPreDiv before being accumulated by the velocity capture. +//! The divided signal is accumulated over \e ulPeriod system clock before +//! being saved and resetting the accumulator. +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityConfigure(unsigned long ulBase, unsigned long ulPreDiv, + unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + ASSERT(!(ulPreDiv & ~(QEI_CTL_VELDIV_M))); + ASSERT(ulPeriod != 0); + + // + // Set the velocity predivider. + // + HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) & + ~(QEI_CTL_VELDIV_M)) | ulPreDiv); + + // + // Set the timer period. + // + HWREG(ulBase + QEI_O_LOAD) = ulPeriod - 1; +} + +//***************************************************************************** +// +//! Gets the current encoder speed. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current speed of the encoder. The value returned is the +//! number of pulses detected in the specified time period; this number can be +//! multiplied by the number of time periods per second and divided by the +//! number of pulses per revolution to obtain the number of revolutions per +//! second. +//! +//! \return Returns the number of pulses captured in the given time period. +// +//***************************************************************************** +unsigned long +QEIVelocityGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the speed capture value. + // + return(HWREG(ulBase + QEI_O_SPEED)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the quadrature encoder interrupt. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param pfnHandler is a pointer to the function to be called when the +//! quadrature encoder interrupt occurs. +//! +//! This sets the handler to be called when a quadrature encoder interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific quadrature encoder interrupts must be enabled via QEIIntEnable(). +//! It is the interrupt handler's responsibility to clear the interrupt source +//! via QEIIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Determine the interrupt number based on the QEI module. + // + ulInt = (ulBase == QEI0_BASE) ? INT_QEI0 : INT_QEI1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the quadrature encoder interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the quadrature encoder interrupt. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This function will clear the handler to be called when a quadrature encoder +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Determine the interrupt number based on the QEI module. + // + ulInt = (ulBase == QEI0_BASE) ? INT_QEI0 : INT_QEI1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! Enables the indicated quadrature encoder interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + QEI_O_INTEN) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! Disables the indicated quadrature encoder interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + QEI_O_INTEN) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the quadrature encoder module. +//! Either the raw interrupt status or the status of interrupts that are +//! allowed to reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, and \b QEI_INTINDEX. +// +//***************************************************************************** +unsigned long +QEIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + QEI_O_ISC)); + } + else + { + return(HWREG(ulBase + QEI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! The specified quadrature encoder interrupt sources are cleared, so that +//! they no longer assert. This must be done in the interrupt handler to keep +//! it from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + QEI_O_ISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.h new file mode 100644 index 00000000..0ad5e1e9 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/qei.h @@ -0,0 +1,112 @@ +//***************************************************************************** +// +// qei.h - Prototypes for the Quadrature Encoder Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __QEI_H__ +#define __QEI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to QEIConfigure as the ulConfig paramater. +// +//***************************************************************************** +#define QEI_CONFIG_CAPTURE_A 0x00000000 // Count on ChA edges only +#define QEI_CONFIG_CAPTURE_A_B 0x00000008 // Count on ChA and ChB edges +#define QEI_CONFIG_NO_RESET 0x00000000 // Do not reset on index pulse +#define QEI_CONFIG_RESET_IDX 0x00000010 // Reset position on index pulse +#define QEI_CONFIG_QUADRATURE 0x00000000 // ChA and ChB are quadrature +#define QEI_CONFIG_CLOCK_DIR 0x00000004 // ChA and ChB are clock and dir +#define QEI_CONFIG_NO_SWAP 0x00000000 // Do not swap ChA and ChB +#define QEI_CONFIG_SWAP 0x00000002 // Swap ChA and ChB + +//***************************************************************************** +// +// Values that can be passed to QEIVelocityConfigure as the ulPreDiv parameter. +// +//***************************************************************************** +#define QEI_VELDIV_1 0x00000000 // Predivide by 1 +#define QEI_VELDIV_2 0x00000040 // Predivide by 2 +#define QEI_VELDIV_4 0x00000080 // Predivide by 4 +#define QEI_VELDIV_8 0x000000C0 // Predivide by 8 +#define QEI_VELDIV_16 0x00000100 // Predivide by 16 +#define QEI_VELDIV_32 0x00000140 // Predivide by 32 +#define QEI_VELDIV_64 0x00000180 // Predivide by 64 +#define QEI_VELDIV_128 0x000001C0 // Predivide by 128 + +//***************************************************************************** +// +// Values that can be passed to QEIEnableInts, QEIDisableInts, and QEIClearInts +// as the ulIntFlags parameter, and returned by QEIGetIntStatus. +// +//***************************************************************************** +#define QEI_INTERROR 0x00000008 // Phase error detected +#define QEI_INTDIR 0x00000004 // Direction change +#define QEI_INTTIMER 0x00000002 // Velocity timer expired +#define QEI_INTINDEX 0x00000001 // Index pulse detected + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void QEIEnable(unsigned long ulBase); +extern void QEIDisable(unsigned long ulBase); +extern void QEIConfigure(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxPosition); +extern unsigned long QEIPositionGet(unsigned long ulBase); +extern void QEIPositionSet(unsigned long ulBase, unsigned long ulPosition); +extern long QEIDirectionGet(unsigned long ulBase); +extern tBoolean QEIErrorGet(unsigned long ulBase); +extern void QEIVelocityEnable(unsigned long ulBase); +extern void QEIVelocityDisable(unsigned long ulBase); +extern void QEIVelocityConfigure(unsigned long ulBase, unsigned long ulPreDiv, + unsigned long ulPeriod); +extern unsigned long QEIVelocityGet(unsigned long ulBase); +extern void QEIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void QEIIntUnregister(unsigned long ulBase); +extern void QEIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long QEIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void QEIIntClear(unsigned long ulBase, unsigned long ulIntFlags); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __QEI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom.h new file mode 100644 index 00000000..467d6c20 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom.h @@ -0,0 +1,3584 @@ +//***************************************************************************** +// +// rom.h - Macros to facilitate calling functions in the ROM. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ROM_H__ +#define __ROM_H__ + +//***************************************************************************** +// +// Pointers to the main API tables. +// +//***************************************************************************** +#define ROM_APITABLE ((unsigned long *)0x01000010) +#define ROM_VERSION (ROM_APITABLE[0]) +#define ROM_UARTTABLE ((unsigned long *)(ROM_APITABLE[1])) +#define ROM_SSITABLE ((unsigned long *)(ROM_APITABLE[2])) +#define ROM_I2CTABLE ((unsigned long *)(ROM_APITABLE[3])) +#define ROM_GPIOTABLE ((unsigned long *)(ROM_APITABLE[4])) +#define ROM_ADCTABLE ((unsigned long *)(ROM_APITABLE[5])) +#define ROM_COMPARATORTABLE ((unsigned long *)(ROM_APITABLE[6])) +#define ROM_FLASHTABLE ((unsigned long *)(ROM_APITABLE[7])) +#define ROM_PWMTABLE ((unsigned long *)(ROM_APITABLE[8])) +#define ROM_QEITABLE ((unsigned long *)(ROM_APITABLE[9])) +#define ROM_SYSTICKTABLE ((unsigned long *)(ROM_APITABLE[10])) +#define ROM_TIMERTABLE ((unsigned long *)(ROM_APITABLE[11])) +#define ROM_WATCHDOGTABLE ((unsigned long *)(ROM_APITABLE[12])) +#define ROM_SYSCTLTABLE ((unsigned long *)(ROM_APITABLE[13])) +#define ROM_INTERRUPTTABLE ((unsigned long *)(ROM_APITABLE[14])) +#define ROM_ETHERNETTABLE ((unsigned long *)(ROM_APITABLE[15])) +#define ROM_USBTABLE ((unsigned long *)(ROM_APITABLE[16])) +#define ROM_UDMATABLE ((unsigned long *)(ROM_APITABLE[17])) +#define ROM_CANTABLE ((unsigned long *)(ROM_APITABLE[18])) +#define ROM_HIBERNATETABLE ((unsigned long *)(ROM_APITABLE[19])) +#define ROM_MPUTABLE ((unsigned long *)(ROM_APITABLE[20])) +#define ROM_SOFTWARETABLE ((unsigned long *)(ROM_APITABLE[21])) +#define ROM_I2STABLE ((unsigned long *)(ROM_APITABLE[22])) +#define ROM_EPITABLE ((unsigned long *)(ROM_APITABLE[23])) + +//***************************************************************************** +// +// Macros for calling ROM functions in the ADC API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceDataGet \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long *pulBuffer))ROM_ADCTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + tBoolean bMasked))ROM_ADCTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long ulTrigger, \ + unsigned long ulPriority))ROM_ADCTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceStepConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long ulStep, \ + unsigned long ulConfig))ROM_ADCTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceOverflow \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceOverflowClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceUnderflow \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceUnderflowClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCProcessorTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCHardwareOversampleConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFactor))ROM_ADCTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulConfig))ROM_ADCTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorRegionSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulLowRef, \ + unsigned long ulHighRef))ROM_ADCTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorReset \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + tBoolean bTrigger, \ + tBoolean bInterrupt))ROM_ADCTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulStatus))ROM_ADCTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCReferenceSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulRef))ROM_ADCTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCReferenceGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCPhaseDelaySet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPhase))ROM_ADCTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCPhaseDelayGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[25]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the CAN API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntClr))ROM_CANTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANInit \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANEnable \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANDisable \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitTimingSet \ + ((void (*)(unsigned long ulBase, \ + tCANBitClkParms *pClkParms))ROM_CANTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitTimingGet \ + ((void (*)(unsigned long ulBase, \ + tCANBitClkParms *pClkParms))ROM_CANTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID, \ + tCANMsgObject *pMsgObject, \ + tMsgObjType eMsgType))ROM_CANTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID, \ + tCANMsgObject *pMsgObject, \ + tBoolean bClrPendingInt))ROM_CANTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANStatusGet \ + ((unsigned long (*)(unsigned long ulBase, \ + tCANStsReg eStatusReg))ROM_CANTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID))ROM_CANTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_CANTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_CANTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tCANIntStsReg eIntStsReg))ROM_CANTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANRetryGet \ + ((tBoolean (*)(unsigned long ulBase))ROM_CANTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANRetrySet \ + ((void (*)(unsigned long ulBase, \ + tBoolean bAutoRetry))ROM_CANTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANErrCntrGet \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long *pulRxCount, \ + unsigned long *pulTxCount))ROM_CANTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitRateSet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulSourceClock, \ + unsigned long ulBitRate))ROM_CANTABLE[16]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Comparator API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulConfig))ROM_COMPARATORTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorRefSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulRef))ROM_COMPARATORTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorValueGet \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + tBoolean bMasked))ROM_COMPARATORTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Ethernet API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_EPITABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMode))ROM_EPITABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIDividerSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDivider))ROM_EPITABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigSDRAMSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulRefresh))ROM_EPITABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigGPModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulFrameCount, \ + unsigned long ulMaxWait))ROM_EPITABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigHB8Set \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxWait))ROM_EPITABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigHB16Set \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxWait))ROM_EPITABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIAddressMapSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMap))ROM_EPITABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel, \ + unsigned long ulDataSize, \ + unsigned long ulAddress))ROM_EPITABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadStart \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel, \ + unsigned long ulCount))ROM_EPITABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadStop \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel))ROM_EPITABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadCount \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulChannel))ROM_EPITABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadAvail \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet32 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned long *pulBuf))ROM_EPITABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet16 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned short *pusBuf))ROM_EPITABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet8 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned char *pucBuf))ROM_EPITABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIFIFOConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_EPITABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIWriteFIFOCountGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_EPITABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_EPITABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntErrorStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntErrorClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulErrFlags))ROM_EPITABLE[21]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Ethernet API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetInitExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEthClk))ROM_ETHERNETTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_ETHERNETTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetConfigGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ETHERNETTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetMACAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned char *pucMACAddr))ROM_ETHERNETTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetMACAddrGet \ + ((void (*)(unsigned long ulBase, \ + unsigned char *pucMACAddr))ROM_ETHERNETTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetEnable \ + ((void (*)(unsigned long ulBase))ROM_ETHERNETTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetDisable \ + ((void (*)(unsigned long ulBase))ROM_ETHERNETTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_ETHERNETTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetSpaceAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_ETHERNETTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketGet \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketPut \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_ETHERNETTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPHYWrite \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucRegAddr, \ + unsigned long ulData))ROM_ETHERNETTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPHYRead \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned char ucRegAddr))ROM_ETHERNETTABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateEthernet \ + ((void (*)(unsigned long ulClock))ROM_ETHERNETTABLE[19]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Flash API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProgram \ + ((long (*)(unsigned long *pulData, \ + unsigned long ulAddress, \ + unsigned long ulCount))ROM_FLASHTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUsecGet \ + ((unsigned long (*)(void))ROM_FLASHTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUsecSet \ + ((void (*)(unsigned long ulClocks))ROM_FLASHTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashErase \ + ((long (*)(unsigned long ulAddress))ROM_FLASHTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectGet \ + ((tFlashProtection (*)(unsigned long ulAddress))ROM_FLASHTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectSet \ + ((long (*)(unsigned long ulAddress, \ + tFlashProtection eProtect))ROM_FLASHTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectSave \ + ((long (*)(void))ROM_FLASHTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserGet \ + ((long (*)(unsigned long *pulUser0, \ + unsigned long *pulUser1))ROM_FLASHTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserSet \ + ((long (*)(unsigned long ulUser0, \ + unsigned long ulUser1))ROM_FLASHTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserSave \ + ((long (*)(void))ROM_FLASHTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntEnable \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntDisable \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_FLASHTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntClear \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[13]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the GPIO API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinWrite \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned char ucVal))ROM_GPIOTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIODirModeSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulPinIO))ROM_GPIOTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIODirModeGet \ + ((unsigned long (*)(unsigned long ulPort, \ + unsigned char ucPin))ROM_GPIOTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOIntTypeSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulIntType))ROM_GPIOTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOIntTypeGet \ + ((unsigned long (*)(unsigned long ulPort, \ + unsigned char ucPin))ROM_GPIOTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPadConfigSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulStrength, \ + unsigned long ulPadType))ROM_GPIOTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPadConfigGet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPin, \ + unsigned long *pulStrength, \ + unsigned long *pulPadType))ROM_GPIOTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntEnable \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntDisable \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntStatus \ + ((long (*)(unsigned long ulPort, \ + tBoolean bMasked))ROM_GPIOTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntClear \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinRead \ + ((long (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeCAN \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeComparator \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOInput \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOOutput \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeI2C \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypePWM \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeQEI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeSSI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeTimer \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUART \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOOutputOD \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeADC \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUSBDigital \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeI2S \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinConfigure \ + ((void (*)(unsigned long ulPinConfig))ROM_GPIOTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEthernetLED \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUSBAnalog \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEPI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEthernetMII \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[30]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Hibernate API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntClear \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateEnableExpClk \ + ((void (*)(unsigned long ulHibClk))ROM_HIBERNATETABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDisable \ + ((void (*)(void))ROM_HIBERNATETABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateClockSelect \ + ((void (*)(unsigned long ulClockInput))ROM_HIBERNATETABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCEnable \ + ((void (*)(void))ROM_HIBERNATETABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCDisable \ + ((void (*)(void))ROM_HIBERNATETABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateWakeSet \ + ((void (*)(unsigned long ulWakeFlags))ROM_HIBERNATETABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateWakeGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateLowBatSet \ + ((void (*)(unsigned long ulLowBatFlags))ROM_HIBERNATETABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateLowBatGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCSet \ + ((void (*)(unsigned long ulRTCValue))ROM_HIBERNATETABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch0Set \ + ((void (*)(unsigned long ulMatch))ROM_HIBERNATETABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch0Get \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch1Set \ + ((void (*)(unsigned long ulMatch))ROM_HIBERNATETABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch1Get \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCTrimSet \ + ((void (*)(unsigned long ulTrim))ROM_HIBERNATETABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCTrimGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDataSet \ + ((void (*)(unsigned long *pulData, \ + unsigned long ulCount))ROM_HIBERNATETABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDataGet \ + ((void (*)(unsigned long *pulData, \ + unsigned long ulCount))ROM_HIBERNATETABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRequest \ + ((void (*)(void))ROM_HIBERNATETABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntEnable \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntDisable \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_HIBERNATETABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIsActive \ + ((unsigned int (*)(void))ROM_HIBERNATETABLE[24]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the I2C API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_I2CTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterInitExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulI2CClk, \ + tBoolean bFast))ROM_I2CTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveInit \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucSlaveAddr))ROM_I2CTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntClear \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntClear \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterSlaveAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucSlaveAddr, \ + tBoolean bReceive))ROM_I2CTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterBusBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulCmd))ROM_I2CTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterErr \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDataGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_I2CTABLE[22]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDataGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[23]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateI2C \ + ((void (*)(void))ROM_I2CTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntEnableEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntDisableEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntStatusEx \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntClearEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[28]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the I2S API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2STABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_I2STABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDataPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_I2STABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLimitSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLevel))ROM_I2STABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLimitGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLevelGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDataGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_I2STABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDataGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_I2STABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLimitSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLevel))ROM_I2STABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLimitGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLevelGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SMasterClockSelect \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMClock))ROM_I2STABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[23]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Interrupt API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntEnable \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntMasterEnable \ + ((tBoolean (*)(void))ROM_INTERRUPTTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntMasterDisable \ + ((tBoolean (*)(void))ROM_INTERRUPTTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntDisable \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGroupingSet \ + ((void (*)(unsigned long ulBits))ROM_INTERRUPTTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGroupingGet \ + ((unsigned long (*)(void))ROM_INTERRUPTTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPrioritySet \ + ((void (*)(unsigned long ulInterrupt, \ + unsigned char ucPriority))ROM_INTERRUPTTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGet \ + ((long (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPendSet \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPendClear \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[9]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the MPU API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPUEnable \ + ((void (*)(unsigned long ulMPUConfig))ROM_MPUTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPUDisable \ + ((void (*)(void))ROM_MPUTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionCountGet \ + ((unsigned long (*)(void))ROM_MPUTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionEnable \ + ((void (*)(unsigned long ulRegion))ROM_MPUTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionDisable \ + ((void (*)(unsigned long ulRegion))ROM_MPUTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionSet \ + ((void (*)(unsigned long ulRegion, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_MPUTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionGet \ + ((void (*)(unsigned long ulRegion, \ + unsigned long *pulAddr, \ + unsigned long *pulFlags))ROM_MPUTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the PWM API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMPulseWidthSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOut, \ + unsigned long ulWidth))ROM_PWMTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulConfig))ROM_PWMTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenPeriodSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulPeriod))ROM_PWMTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenPeriodGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMPulseWidthGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulPWMOut))ROM_PWMTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMDeadBandEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned short usRise, \ + unsigned short usFall))ROM_PWMTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMDeadBandDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMSyncUpdate \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenBits))ROM_PWMTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMSyncTimeBase \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenBits))ROM_PWMTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputState \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bEnable))ROM_PWMTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputInvert \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bInvert))ROM_PWMTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputFault \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bFaultSuppress))ROM_PWMTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntTrigEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulIntTrig))ROM_PWMTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntTrigDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulIntTrig))ROM_PWMTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + tBoolean bMasked))ROM_PWMTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulInts))ROM_PWMTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenFault))ROM_PWMTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenFault))ROM_PWMTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMFaultIntClear \ + ((void (*)(unsigned long ulBase))ROM_PWMTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_PWMTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputFaultLevel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bDriveHigh))ROM_PWMTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMFaultIntClearExt \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFaultInts))ROM_PWMTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulMinFaultPeriod, \ + unsigned long ulFaultSenses))ROM_PWMTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultTriggerSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup, \ + unsigned long ulFaultTriggers))ROM_PWMTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultTriggerGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup))ROM_PWMTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup))ROM_PWMTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup, \ + unsigned long ulFaultTriggers))ROM_PWMTABLE[28]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the QEI API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIPositionGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIEnable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIDisable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxPosition))ROM_QEITABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIPositionSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPosition))ROM_QEITABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIDirectionGet \ + ((long (*)(unsigned long ulBase))ROM_QEITABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIErrorGet \ + ((tBoolean (*)(unsigned long ulBase))ROM_QEITABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityEnable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityDisable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPreDiv, \ + unsigned long ulPeriod))ROM_QEITABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_QEITABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SSI API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_SSITABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIConfigSetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSSIClk, \ + unsigned long ulProtocol, \ + unsigned long ulMode, \ + unsigned long ulBitRate, \ + unsigned long ulDataWidth))ROM_SSITABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIEnable \ + ((void (*)(unsigned long ulBase))ROM_SSITABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDisable \ + ((void (*)(unsigned long ulBase))ROM_SSITABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_SSITABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_SSITABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_SSITABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_SSITABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateSSI \ + ((void (*)(void))ROM_SSITABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDMAEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_SSITABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDMADisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_SSITABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_SSITABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SysCtl API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlSleep \ + ((void (*)(void))ROM_SYSCTLTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlSRAMSizeGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlFlashSizeGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPinPresent \ + ((tBoolean (*)(unsigned long ulPin))ROM_SYSCTLTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralPresent \ + ((tBoolean (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralReset \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralSleepEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralSleepDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDeepSleepEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDeepSleepDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralClockGating \ + ((void (*)(tBoolean bEnable))ROM_SYSCTLTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntEnable \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntDisable \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntClear \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_SYSCTLTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlLDOSet \ + ((void (*)(unsigned long ulVoltage))ROM_SYSCTLTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlLDOGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlReset \ + ((void (*)(void))ROM_SYSCTLTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlDeepSleep \ + ((void (*)(void))ROM_SYSCTLTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlResetCauseGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlResetCauseClear \ + ((void (*)(unsigned long ulCauses))ROM_SYSCTLTABLE[22]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlClockSet \ + ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[23]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlClockGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[24]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPWMClockSet \ + ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[25]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPWMClockGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[26]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlADCSpeedSet \ + ((void (*)(unsigned long ulSpeed))ROM_SYSCTLTABLE[27]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlADCSpeedGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[28]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlGPIOAHBEnable \ + ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[29]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlGPIOAHBDisable \ + ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[30]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlUSBPLLEnable \ + ((void (*)(void))ROM_SYSCTLTABLE[31]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlUSBPLLDisable \ + ((void (*)(void))ROM_SYSCTLTABLE[32]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlI2SMClkSet \ + ((unsigned long (*)(unsigned long ulInputClock, \ + unsigned long ulMClk))ROM_SYSCTLTABLE[33]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlDelay \ + ((void (*)(unsigned long ulCount))ROM_SYSCTLTABLE[34]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SysTick API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickValueGet \ + ((unsigned long (*)(void))ROM_SYSTICKTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickEnable \ + ((void (*)(void))ROM_SYSTICKTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickDisable \ + ((void (*)(void))ROM_SYSTICKTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickIntEnable \ + ((void (*)(void))ROM_SYSTICKTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickIntDisable \ + ((void (*)(void))ROM_SYSTICKTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickPeriodSet \ + ((void (*)(unsigned long ulPeriod))ROM_SYSTICKTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickPeriodGet \ + ((unsigned long (*)(void))ROM_SYSTICKTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Timer API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_TIMERTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlLevel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bInvert))ROM_TIMERTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bEnable))ROM_TIMERTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlEvent \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulEvent))ROM_TIMERTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlStall \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bStall))ROM_TIMERTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerRTCEnable \ + ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerRTCDisable \ + ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleMatchSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleMatchGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerLoadSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerLoadGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerValueGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerMatchSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerMatchGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_TIMERTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlWaitOnTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bWait))ROM_TIMERTABLE[22]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the UART API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_UARTTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTParityModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulParity))ROM_UARTTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTParityModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOLevelSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTxLevel, \ + unsigned long ulRxLevel))ROM_UARTTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOLevelGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulTxLevel, \ + unsigned long *pulRxLevel))ROM_UARTTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTConfigSetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulUARTClk, \ + unsigned long ulBaud, \ + unsigned long ulConfig))ROM_UARTTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTConfigGetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulUARTClk, \ + unsigned long *pulBaud, \ + unsigned long *pulConfig))ROM_UARTTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTEnable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDisable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTEnableSIR \ + ((void (*)(unsigned long ulBase, \ + tBoolean bLowPower))ROM_UARTTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDisableSIR \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharsAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTSpaceAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharGetNonBlocking \ + ((long (*)(unsigned long ulBase))ROM_UARTTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharGet \ + ((long (*)(unsigned long ulBase))ROM_UARTTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharPutNonBlocking \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_UARTTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTBreakCtl \ + ((void (*)(unsigned long ulBase, \ + tBoolean bBreakState))ROM_UARTTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_UARTTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateUART \ + ((void (*)(void))ROM_UARTTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDMAEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_UARTTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDMADisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_UARTTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOEnable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFODisable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTTxIntModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMode))ROM_UARTTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTTxIntModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTRxErrorGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTRxErrorClear \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[30]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the uDMA API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelTransferSet \ + ((void (*)(unsigned long ulChannelStructIndex, \ + unsigned long ulMode, \ + void *pvSrcAddr, \ + void *pvDstAddr, \ + unsigned long ulTransferSize))ROM_UDMATABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAEnable \ + ((void (*)(void))ROM_UDMATABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMADisable \ + ((void (*)(void))ROM_UDMATABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAErrorStatusGet \ + ((unsigned long (*)(void))ROM_UDMATABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAErrorStatusClear \ + ((void (*)(void))ROM_UDMATABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelEnable \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelDisable \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelIsEnabled \ + ((tBoolean (*)(unsigned long ulChannelNum))ROM_UDMATABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAControlBaseSet \ + ((void (*)(void *pControlTable))ROM_UDMATABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAControlBaseGet \ + ((void * (*)(void))ROM_UDMATABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelRequest \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeEnable \ + ((void (*)(unsigned long ulChannelNum, \ + unsigned long ulAttr))ROM_UDMATABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeDisable \ + ((void (*)(unsigned long ulChannelNum, \ + unsigned long ulAttr))ROM_UDMATABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeGet \ + ((unsigned long (*)(unsigned long ulChannelNum))ROM_UDMATABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelControlSet \ + ((void (*)(unsigned long ulChannelStructIndex, \ + unsigned long ulControl))ROM_UDMATABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSizeGet \ + ((unsigned long (*)(unsigned long ulChannelStructIndex))ROM_UDMATABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelModeGet \ + ((unsigned long (*)(unsigned long ulChannelStructIndex))ROM_UDMATABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSelectSecondary \ + ((void (*)(unsigned long ulSecPeriphs))ROM_UDMATABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSelectDefault \ + ((void (*)(unsigned long ulDefPeriphs))ROM_UDMATABLE[18]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the USB API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevAddrGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulAddress))ROM_USBTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevConnect \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevDisconnect \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulMaxPacketSize, \ + unsigned long ulFlags))ROM_USBTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointDataAck \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + tBoolean bIsLastPacket))ROM_USBTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointStall \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointStatusClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataGet \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned char *pucData, \ + unsigned long *pulSize))ROM_USBTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataPut \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned char *pucData, \ + unsigned long ulSize))ROM_USBTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataSend \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulTransType))ROM_USBTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataToggleClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOConfigGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long *pulFIFOAddress, \ + unsigned long *pulFIFOSize, \ + unsigned long ulFlags))ROM_USBTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFIFOAddress, \ + unsigned long ulFIFOSize, \ + unsigned long ulFlags))ROM_USBTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFrameNumberGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_USBTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulMaxPacketSize, \ + unsigned long ulNAKPollInterval, \ + unsigned long ulTargetEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointDataAck \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointDataToggle \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + tBoolean bDataToggle, \ + unsigned long ulFlags))ROM_USBTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointStatusClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostHubAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostHubAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_USBTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrDisable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrEnable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFlags))ROM_USBTABLE[30]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrFaultDisable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[31]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrFaultEnable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[32]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostRequestIN \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[33]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostRequestStatus \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[34]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostReset \ + ((void (*)(unsigned long ulBase, \ + tBoolean bStart))ROM_USBTABLE[35]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostResume \ + ((void (*)(unsigned long ulBase, \ + tBoolean bStart))ROM_USBTABLE[36]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostSpeedGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[37]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostSuspend \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[38]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[39]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[40]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointConfigGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long *pulMaxPacketSize, \ + unsigned long *pulFlags))ROM_USBTABLE[41]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataAvail \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[44]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBOTGHostRequest \ + ((void (*)(unsigned long ulBase, \ + tBoolean bHNP))ROM_USBTABLE[45]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[46]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDMAChannel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulChannel))ROM_USBTABLE[47]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisableControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[48]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnableControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[49]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatusControl \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[50]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisableEndpoint \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[51]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnableEndpoint \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[52]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatusEndpoint \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[53]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Watchdog API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntClear \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogRunning \ + ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogResetEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogResetDisable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogLock \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogUnlock \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogLockState \ + ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogReloadSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLoadVal))ROM_WATCHDOGTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogReloadGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogValueGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_WATCHDOGTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogStallEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogStallDisable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Software API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_Crc16Array \ + ((unsigned short (*)(unsigned long ulWordLen, \ + const unsigned long *pulData))ROM_SOFTWARETABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_Crc16Array3 \ + ((void (*)(unsigned long ulWordLen, \ + const unsigned long *pulData, \ + unsigned short *pusCrc3))ROM_SOFTWARETABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_pvAESTable \ + ((void *)&(ROM_SOFTWARETABLE[7])) +#endif + +//***************************************************************************** +// +// Deprecated ROM functions. +// +//***************************************************************************** +#ifndef DEPRECATED +#ifdef ROM_FlashIntStatus +#define ROM_FlashIntGetStatus \ + ROM_FlashIntStatus +#endif +#ifdef ROM_USBDevEndpointConfigSet +#define ROM_USBDevEndpointConfig \ + ROM_USBDevEndpointConfigSet +#endif +#ifdef ROM_USBHostPwrConfig +#define ROM_USBHostPwrFaultConfig \ + ROM_USBHostPwrConfig +#endif +#endif + +#endif // __ROM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom_map.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom_map.h new file mode 100644 index 00000000..cc6682f3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/rom_map.h @@ -0,0 +1,3444 @@ +//***************************************************************************** +// +// rom_map.h - Macros to facilitate calling functions in the ROM when they are +// available and in flash otherwise. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ROM_MAP_H__ +#define __ROM_MAP_H__ + +//***************************************************************************** +// +// Macros for the ADC API. +// +//***************************************************************************** +#ifdef ROM_ADCSequenceDataGet +#define MAP_ADCSequenceDataGet \ + ROM_ADCSequenceDataGet +#else +#define MAP_ADCSequenceDataGet \ + ADCSequenceDataGet +#endif +#ifdef ROM_ADCIntDisable +#define MAP_ADCIntDisable \ + ROM_ADCIntDisable +#else +#define MAP_ADCIntDisable \ + ADCIntDisable +#endif +#ifdef ROM_ADCIntEnable +#define MAP_ADCIntEnable \ + ROM_ADCIntEnable +#else +#define MAP_ADCIntEnable \ + ADCIntEnable +#endif +#ifdef ROM_ADCIntStatus +#define MAP_ADCIntStatus \ + ROM_ADCIntStatus +#else +#define MAP_ADCIntStatus \ + ADCIntStatus +#endif +#ifdef ROM_ADCIntClear +#define MAP_ADCIntClear \ + ROM_ADCIntClear +#else +#define MAP_ADCIntClear \ + ADCIntClear +#endif +#ifdef ROM_ADCSequenceEnable +#define MAP_ADCSequenceEnable \ + ROM_ADCSequenceEnable +#else +#define MAP_ADCSequenceEnable \ + ADCSequenceEnable +#endif +#ifdef ROM_ADCSequenceDisable +#define MAP_ADCSequenceDisable \ + ROM_ADCSequenceDisable +#else +#define MAP_ADCSequenceDisable \ + ADCSequenceDisable +#endif +#ifdef ROM_ADCSequenceConfigure +#define MAP_ADCSequenceConfigure \ + ROM_ADCSequenceConfigure +#else +#define MAP_ADCSequenceConfigure \ + ADCSequenceConfigure +#endif +#ifdef ROM_ADCSequenceStepConfigure +#define MAP_ADCSequenceStepConfigure \ + ROM_ADCSequenceStepConfigure +#else +#define MAP_ADCSequenceStepConfigure \ + ADCSequenceStepConfigure +#endif +#ifdef ROM_ADCSequenceOverflow +#define MAP_ADCSequenceOverflow \ + ROM_ADCSequenceOverflow +#else +#define MAP_ADCSequenceOverflow \ + ADCSequenceOverflow +#endif +#ifdef ROM_ADCSequenceOverflowClear +#define MAP_ADCSequenceOverflowClear \ + ROM_ADCSequenceOverflowClear +#else +#define MAP_ADCSequenceOverflowClear \ + ADCSequenceOverflowClear +#endif +#ifdef ROM_ADCSequenceUnderflow +#define MAP_ADCSequenceUnderflow \ + ROM_ADCSequenceUnderflow +#else +#define MAP_ADCSequenceUnderflow \ + ADCSequenceUnderflow +#endif +#ifdef ROM_ADCSequenceUnderflowClear +#define MAP_ADCSequenceUnderflowClear \ + ROM_ADCSequenceUnderflowClear +#else +#define MAP_ADCSequenceUnderflowClear \ + ADCSequenceUnderflowClear +#endif +#ifdef ROM_ADCProcessorTrigger +#define MAP_ADCProcessorTrigger \ + ROM_ADCProcessorTrigger +#else +#define MAP_ADCProcessorTrigger \ + ADCProcessorTrigger +#endif +#ifdef ROM_ADCHardwareOversampleConfigure +#define MAP_ADCHardwareOversampleConfigure \ + ROM_ADCHardwareOversampleConfigure +#else +#define MAP_ADCHardwareOversampleConfigure \ + ADCHardwareOversampleConfigure +#endif +#ifdef ROM_ADCComparatorConfigure +#define MAP_ADCComparatorConfigure \ + ROM_ADCComparatorConfigure +#else +#define MAP_ADCComparatorConfigure \ + ADCComparatorConfigure +#endif +#ifdef ROM_ADCComparatorRegionSet +#define MAP_ADCComparatorRegionSet \ + ROM_ADCComparatorRegionSet +#else +#define MAP_ADCComparatorRegionSet \ + ADCComparatorRegionSet +#endif +#ifdef ROM_ADCComparatorReset +#define MAP_ADCComparatorReset \ + ROM_ADCComparatorReset +#else +#define MAP_ADCComparatorReset \ + ADCComparatorReset +#endif +#ifdef ROM_ADCComparatorIntDisable +#define MAP_ADCComparatorIntDisable \ + ROM_ADCComparatorIntDisable +#else +#define MAP_ADCComparatorIntDisable \ + ADCComparatorIntDisable +#endif +#ifdef ROM_ADCComparatorIntEnable +#define MAP_ADCComparatorIntEnable \ + ROM_ADCComparatorIntEnable +#else +#define MAP_ADCComparatorIntEnable \ + ADCComparatorIntEnable +#endif +#ifdef ROM_ADCComparatorIntStatus +#define MAP_ADCComparatorIntStatus \ + ROM_ADCComparatorIntStatus +#else +#define MAP_ADCComparatorIntStatus \ + ADCComparatorIntStatus +#endif +#ifdef ROM_ADCComparatorIntClear +#define MAP_ADCComparatorIntClear \ + ROM_ADCComparatorIntClear +#else +#define MAP_ADCComparatorIntClear \ + ADCComparatorIntClear +#endif +#ifdef ROM_ADCReferenceSet +#define MAP_ADCReferenceSet \ + ROM_ADCReferenceSet +#else +#define MAP_ADCReferenceSet \ + ADCReferenceSet +#endif +#ifdef ROM_ADCReferenceGet +#define MAP_ADCReferenceGet \ + ROM_ADCReferenceGet +#else +#define MAP_ADCReferenceGet \ + ADCReferenceGet +#endif +#ifdef ROM_ADCPhaseDelaySet +#define MAP_ADCPhaseDelaySet \ + ROM_ADCPhaseDelaySet +#else +#define MAP_ADCPhaseDelaySet \ + ADCPhaseDelaySet +#endif +#ifdef ROM_ADCPhaseDelayGet +#define MAP_ADCPhaseDelayGet \ + ROM_ADCPhaseDelayGet +#else +#define MAP_ADCPhaseDelayGet \ + ADCPhaseDelayGet +#endif + +//***************************************************************************** +// +// Macros for the CAN API. +// +//***************************************************************************** +#ifdef ROM_CANIntClear +#define MAP_CANIntClear \ + ROM_CANIntClear +#else +#define MAP_CANIntClear \ + CANIntClear +#endif +#ifdef ROM_CANInit +#define MAP_CANInit \ + ROM_CANInit +#else +#define MAP_CANInit \ + CANInit +#endif +#ifdef ROM_CANEnable +#define MAP_CANEnable \ + ROM_CANEnable +#else +#define MAP_CANEnable \ + CANEnable +#endif +#ifdef ROM_CANDisable +#define MAP_CANDisable \ + ROM_CANDisable +#else +#define MAP_CANDisable \ + CANDisable +#endif +#ifdef ROM_CANBitTimingSet +#define MAP_CANBitTimingSet \ + ROM_CANBitTimingSet +#else +#define MAP_CANBitTimingSet \ + CANBitTimingSet +#endif +#ifdef ROM_CANBitTimingGet +#define MAP_CANBitTimingGet \ + ROM_CANBitTimingGet +#else +#define MAP_CANBitTimingGet \ + CANBitTimingGet +#endif +#ifdef ROM_CANMessageSet +#define MAP_CANMessageSet \ + ROM_CANMessageSet +#else +#define MAP_CANMessageSet \ + CANMessageSet +#endif +#ifdef ROM_CANMessageGet +#define MAP_CANMessageGet \ + ROM_CANMessageGet +#else +#define MAP_CANMessageGet \ + CANMessageGet +#endif +#ifdef ROM_CANStatusGet +#define MAP_CANStatusGet \ + ROM_CANStatusGet +#else +#define MAP_CANStatusGet \ + CANStatusGet +#endif +#ifdef ROM_CANMessageClear +#define MAP_CANMessageClear \ + ROM_CANMessageClear +#else +#define MAP_CANMessageClear \ + CANMessageClear +#endif +#ifdef ROM_CANIntEnable +#define MAP_CANIntEnable \ + ROM_CANIntEnable +#else +#define MAP_CANIntEnable \ + CANIntEnable +#endif +#ifdef ROM_CANIntDisable +#define MAP_CANIntDisable \ + ROM_CANIntDisable +#else +#define MAP_CANIntDisable \ + CANIntDisable +#endif +#ifdef ROM_CANIntStatus +#define MAP_CANIntStatus \ + ROM_CANIntStatus +#else +#define MAP_CANIntStatus \ + CANIntStatus +#endif +#ifdef ROM_CANRetryGet +#define MAP_CANRetryGet \ + ROM_CANRetryGet +#else +#define MAP_CANRetryGet \ + CANRetryGet +#endif +#ifdef ROM_CANRetrySet +#define MAP_CANRetrySet \ + ROM_CANRetrySet +#else +#define MAP_CANRetrySet \ + CANRetrySet +#endif +#ifdef ROM_CANErrCntrGet +#define MAP_CANErrCntrGet \ + ROM_CANErrCntrGet +#else +#define MAP_CANErrCntrGet \ + CANErrCntrGet +#endif +#ifdef ROM_CANBitRateSet +#define MAP_CANBitRateSet \ + ROM_CANBitRateSet +#else +#define MAP_CANBitRateSet \ + CANBitRateSet +#endif + +//***************************************************************************** +// +// Macros for the Comparator API. +// +//***************************************************************************** +#ifdef ROM_ComparatorIntClear +#define MAP_ComparatorIntClear \ + ROM_ComparatorIntClear +#else +#define MAP_ComparatorIntClear \ + ComparatorIntClear +#endif +#ifdef ROM_ComparatorConfigure +#define MAP_ComparatorConfigure \ + ROM_ComparatorConfigure +#else +#define MAP_ComparatorConfigure \ + ComparatorConfigure +#endif +#ifdef ROM_ComparatorRefSet +#define MAP_ComparatorRefSet \ + ROM_ComparatorRefSet +#else +#define MAP_ComparatorRefSet \ + ComparatorRefSet +#endif +#ifdef ROM_ComparatorValueGet +#define MAP_ComparatorValueGet \ + ROM_ComparatorValueGet +#else +#define MAP_ComparatorValueGet \ + ComparatorValueGet +#endif +#ifdef ROM_ComparatorIntEnable +#define MAP_ComparatorIntEnable \ + ROM_ComparatorIntEnable +#else +#define MAP_ComparatorIntEnable \ + ComparatorIntEnable +#endif +#ifdef ROM_ComparatorIntDisable +#define MAP_ComparatorIntDisable \ + ROM_ComparatorIntDisable +#else +#define MAP_ComparatorIntDisable \ + ComparatorIntDisable +#endif +#ifdef ROM_ComparatorIntStatus +#define MAP_ComparatorIntStatus \ + ROM_ComparatorIntStatus +#else +#define MAP_ComparatorIntStatus \ + ComparatorIntStatus +#endif + +//***************************************************************************** +// +// Macros for the Ethernet API. +// +//***************************************************************************** +#ifdef ROM_EPIIntStatus +#define MAP_EPIIntStatus \ + ROM_EPIIntStatus +#else +#define MAP_EPIIntStatus \ + EPIIntStatus +#endif +#ifdef ROM_EPIModeSet +#define MAP_EPIModeSet \ + ROM_EPIModeSet +#else +#define MAP_EPIModeSet \ + EPIModeSet +#endif +#ifdef ROM_EPIDividerSet +#define MAP_EPIDividerSet \ + ROM_EPIDividerSet +#else +#define MAP_EPIDividerSet \ + EPIDividerSet +#endif +#ifdef ROM_EPIConfigSDRAMSet +#define MAP_EPIConfigSDRAMSet \ + ROM_EPIConfigSDRAMSet +#else +#define MAP_EPIConfigSDRAMSet \ + EPIConfigSDRAMSet +#endif +#ifdef ROM_EPIConfigGPModeSet +#define MAP_EPIConfigGPModeSet \ + ROM_EPIConfigGPModeSet +#else +#define MAP_EPIConfigGPModeSet \ + EPIConfigGPModeSet +#endif +#ifdef ROM_EPIConfigHB8Set +#define MAP_EPIConfigHB8Set \ + ROM_EPIConfigHB8Set +#else +#define MAP_EPIConfigHB8Set \ + EPIConfigHB8Set +#endif +#ifdef ROM_EPIConfigHB16Set +#define MAP_EPIConfigHB16Set \ + ROM_EPIConfigHB16Set +#else +#define MAP_EPIConfigHB16Set \ + EPIConfigHB16Set +#endif +#ifdef ROM_EPIAddressMapSet +#define MAP_EPIAddressMapSet \ + ROM_EPIAddressMapSet +#else +#define MAP_EPIAddressMapSet \ + EPIAddressMapSet +#endif +#ifdef ROM_EPINonBlockingReadConfigure +#define MAP_EPINonBlockingReadConfigure \ + ROM_EPINonBlockingReadConfigure +#else +#define MAP_EPINonBlockingReadConfigure \ + EPINonBlockingReadConfigure +#endif +#ifdef ROM_EPINonBlockingReadStart +#define MAP_EPINonBlockingReadStart \ + ROM_EPINonBlockingReadStart +#else +#define MAP_EPINonBlockingReadStart \ + EPINonBlockingReadStart +#endif +#ifdef ROM_EPINonBlockingReadStop +#define MAP_EPINonBlockingReadStop \ + ROM_EPINonBlockingReadStop +#else +#define MAP_EPINonBlockingReadStop \ + EPINonBlockingReadStop +#endif +#ifdef ROM_EPINonBlockingReadCount +#define MAP_EPINonBlockingReadCount \ + ROM_EPINonBlockingReadCount +#else +#define MAP_EPINonBlockingReadCount \ + EPINonBlockingReadCount +#endif +#ifdef ROM_EPINonBlockingReadAvail +#define MAP_EPINonBlockingReadAvail \ + ROM_EPINonBlockingReadAvail +#else +#define MAP_EPINonBlockingReadAvail \ + EPINonBlockingReadAvail +#endif +#ifdef ROM_EPINonBlockingReadGet32 +#define MAP_EPINonBlockingReadGet32 \ + ROM_EPINonBlockingReadGet32 +#else +#define MAP_EPINonBlockingReadGet32 \ + EPINonBlockingReadGet32 +#endif +#ifdef ROM_EPINonBlockingReadGet16 +#define MAP_EPINonBlockingReadGet16 \ + ROM_EPINonBlockingReadGet16 +#else +#define MAP_EPINonBlockingReadGet16 \ + EPINonBlockingReadGet16 +#endif +#ifdef ROM_EPINonBlockingReadGet8 +#define MAP_EPINonBlockingReadGet8 \ + ROM_EPINonBlockingReadGet8 +#else +#define MAP_EPINonBlockingReadGet8 \ + EPINonBlockingReadGet8 +#endif +#ifdef ROM_EPIFIFOConfig +#define MAP_EPIFIFOConfig \ + ROM_EPIFIFOConfig +#else +#define MAP_EPIFIFOConfig \ + EPIFIFOConfig +#endif +#ifdef ROM_EPIWriteFIFOCountGet +#define MAP_EPIWriteFIFOCountGet \ + ROM_EPIWriteFIFOCountGet +#else +#define MAP_EPIWriteFIFOCountGet \ + EPIWriteFIFOCountGet +#endif +#ifdef ROM_EPIIntEnable +#define MAP_EPIIntEnable \ + ROM_EPIIntEnable +#else +#define MAP_EPIIntEnable \ + EPIIntEnable +#endif +#ifdef ROM_EPIIntDisable +#define MAP_EPIIntDisable \ + ROM_EPIIntDisable +#else +#define MAP_EPIIntDisable \ + EPIIntDisable +#endif +#ifdef ROM_EPIIntErrorStatus +#define MAP_EPIIntErrorStatus \ + ROM_EPIIntErrorStatus +#else +#define MAP_EPIIntErrorStatus \ + EPIIntErrorStatus +#endif +#ifdef ROM_EPIIntErrorClear +#define MAP_EPIIntErrorClear \ + ROM_EPIIntErrorClear +#else +#define MAP_EPIIntErrorClear \ + EPIIntErrorClear +#endif + +//***************************************************************************** +// +// Macros for the Ethernet API. +// +//***************************************************************************** +#ifdef ROM_EthernetIntClear +#define MAP_EthernetIntClear \ + ROM_EthernetIntClear +#else +#define MAP_EthernetIntClear \ + EthernetIntClear +#endif +#ifdef ROM_EthernetInitExpClk +#define MAP_EthernetInitExpClk \ + ROM_EthernetInitExpClk +#else +#define MAP_EthernetInitExpClk \ + EthernetInitExpClk +#endif +#ifdef ROM_EthernetConfigSet +#define MAP_EthernetConfigSet \ + ROM_EthernetConfigSet +#else +#define MAP_EthernetConfigSet \ + EthernetConfigSet +#endif +#ifdef ROM_EthernetConfigGet +#define MAP_EthernetConfigGet \ + ROM_EthernetConfigGet +#else +#define MAP_EthernetConfigGet \ + EthernetConfigGet +#endif +#ifdef ROM_EthernetMACAddrSet +#define MAP_EthernetMACAddrSet \ + ROM_EthernetMACAddrSet +#else +#define MAP_EthernetMACAddrSet \ + EthernetMACAddrSet +#endif +#ifdef ROM_EthernetMACAddrGet +#define MAP_EthernetMACAddrGet \ + ROM_EthernetMACAddrGet +#else +#define MAP_EthernetMACAddrGet \ + EthernetMACAddrGet +#endif +#ifdef ROM_EthernetEnable +#define MAP_EthernetEnable \ + ROM_EthernetEnable +#else +#define MAP_EthernetEnable \ + EthernetEnable +#endif +#ifdef ROM_EthernetDisable +#define MAP_EthernetDisable \ + ROM_EthernetDisable +#else +#define MAP_EthernetDisable \ + EthernetDisable +#endif +#ifdef ROM_EthernetPacketAvail +#define MAP_EthernetPacketAvail \ + ROM_EthernetPacketAvail +#else +#define MAP_EthernetPacketAvail \ + EthernetPacketAvail +#endif +#ifdef ROM_EthernetSpaceAvail +#define MAP_EthernetSpaceAvail \ + ROM_EthernetSpaceAvail +#else +#define MAP_EthernetSpaceAvail \ + EthernetSpaceAvail +#endif +#ifdef ROM_EthernetPacketGetNonBlocking +#define MAP_EthernetPacketGetNonBlocking \ + ROM_EthernetPacketGetNonBlocking +#else +#define MAP_EthernetPacketGetNonBlocking \ + EthernetPacketGetNonBlocking +#endif +#ifdef ROM_EthernetPacketGet +#define MAP_EthernetPacketGet \ + ROM_EthernetPacketGet +#else +#define MAP_EthernetPacketGet \ + EthernetPacketGet +#endif +#ifdef ROM_EthernetPacketPutNonBlocking +#define MAP_EthernetPacketPutNonBlocking \ + ROM_EthernetPacketPutNonBlocking +#else +#define MAP_EthernetPacketPutNonBlocking \ + EthernetPacketPutNonBlocking +#endif +#ifdef ROM_EthernetPacketPut +#define MAP_EthernetPacketPut \ + ROM_EthernetPacketPut +#else +#define MAP_EthernetPacketPut \ + EthernetPacketPut +#endif +#ifdef ROM_EthernetIntEnable +#define MAP_EthernetIntEnable \ + ROM_EthernetIntEnable +#else +#define MAP_EthernetIntEnable \ + EthernetIntEnable +#endif +#ifdef ROM_EthernetIntDisable +#define MAP_EthernetIntDisable \ + ROM_EthernetIntDisable +#else +#define MAP_EthernetIntDisable \ + EthernetIntDisable +#endif +#ifdef ROM_EthernetIntStatus +#define MAP_EthernetIntStatus \ + ROM_EthernetIntStatus +#else +#define MAP_EthernetIntStatus \ + EthernetIntStatus +#endif +#ifdef ROM_EthernetPHYWrite +#define MAP_EthernetPHYWrite \ + ROM_EthernetPHYWrite +#else +#define MAP_EthernetPHYWrite \ + EthernetPHYWrite +#endif +#ifdef ROM_EthernetPHYRead +#define MAP_EthernetPHYRead \ + ROM_EthernetPHYRead +#else +#define MAP_EthernetPHYRead \ + EthernetPHYRead +#endif + +//***************************************************************************** +// +// Macros for the Flash API. +// +//***************************************************************************** +#ifdef ROM_FlashProgram +#define MAP_FlashProgram \ + ROM_FlashProgram +#else +#define MAP_FlashProgram \ + FlashProgram +#endif +#ifdef ROM_FlashUsecGet +#define MAP_FlashUsecGet \ + ROM_FlashUsecGet +#else +#define MAP_FlashUsecGet \ + FlashUsecGet +#endif +#ifdef ROM_FlashUsecSet +#define MAP_FlashUsecSet \ + ROM_FlashUsecSet +#else +#define MAP_FlashUsecSet \ + FlashUsecSet +#endif +#ifdef ROM_FlashErase +#define MAP_FlashErase \ + ROM_FlashErase +#else +#define MAP_FlashErase \ + FlashErase +#endif +#ifdef ROM_FlashProtectGet +#define MAP_FlashProtectGet \ + ROM_FlashProtectGet +#else +#define MAP_FlashProtectGet \ + FlashProtectGet +#endif +#ifdef ROM_FlashProtectSet +#define MAP_FlashProtectSet \ + ROM_FlashProtectSet +#else +#define MAP_FlashProtectSet \ + FlashProtectSet +#endif +#ifdef ROM_FlashProtectSave +#define MAP_FlashProtectSave \ + ROM_FlashProtectSave +#else +#define MAP_FlashProtectSave \ + FlashProtectSave +#endif +#ifdef ROM_FlashUserGet +#define MAP_FlashUserGet \ + ROM_FlashUserGet +#else +#define MAP_FlashUserGet \ + FlashUserGet +#endif +#ifdef ROM_FlashUserSet +#define MAP_FlashUserSet \ + ROM_FlashUserSet +#else +#define MAP_FlashUserSet \ + FlashUserSet +#endif +#ifdef ROM_FlashUserSave +#define MAP_FlashUserSave \ + ROM_FlashUserSave +#else +#define MAP_FlashUserSave \ + FlashUserSave +#endif +#ifdef ROM_FlashIntEnable +#define MAP_FlashIntEnable \ + ROM_FlashIntEnable +#else +#define MAP_FlashIntEnable \ + FlashIntEnable +#endif +#ifdef ROM_FlashIntDisable +#define MAP_FlashIntDisable \ + ROM_FlashIntDisable +#else +#define MAP_FlashIntDisable \ + FlashIntDisable +#endif +#ifdef ROM_FlashIntStatus +#define MAP_FlashIntStatus \ + ROM_FlashIntStatus +#else +#define MAP_FlashIntStatus \ + FlashIntStatus +#endif +#ifdef ROM_FlashIntClear +#define MAP_FlashIntClear \ + ROM_FlashIntClear +#else +#define MAP_FlashIntClear \ + FlashIntClear +#endif + +//***************************************************************************** +// +// Macros for the GPIO API. +// +//***************************************************************************** +#ifdef ROM_GPIOPinWrite +#define MAP_GPIOPinWrite \ + ROM_GPIOPinWrite +#else +#define MAP_GPIOPinWrite \ + GPIOPinWrite +#endif +#ifdef ROM_GPIODirModeSet +#define MAP_GPIODirModeSet \ + ROM_GPIODirModeSet +#else +#define MAP_GPIODirModeSet \ + GPIODirModeSet +#endif +#ifdef ROM_GPIODirModeGet +#define MAP_GPIODirModeGet \ + ROM_GPIODirModeGet +#else +#define MAP_GPIODirModeGet \ + GPIODirModeGet +#endif +#ifdef ROM_GPIOIntTypeSet +#define MAP_GPIOIntTypeSet \ + ROM_GPIOIntTypeSet +#else +#define MAP_GPIOIntTypeSet \ + GPIOIntTypeSet +#endif +#ifdef ROM_GPIOIntTypeGet +#define MAP_GPIOIntTypeGet \ + ROM_GPIOIntTypeGet +#else +#define MAP_GPIOIntTypeGet \ + GPIOIntTypeGet +#endif +#ifdef ROM_GPIOPadConfigSet +#define MAP_GPIOPadConfigSet \ + ROM_GPIOPadConfigSet +#else +#define MAP_GPIOPadConfigSet \ + GPIOPadConfigSet +#endif +#ifdef ROM_GPIOPadConfigGet +#define MAP_GPIOPadConfigGet \ + ROM_GPIOPadConfigGet +#else +#define MAP_GPIOPadConfigGet \ + GPIOPadConfigGet +#endif +#ifdef ROM_GPIOPinIntEnable +#define MAP_GPIOPinIntEnable \ + ROM_GPIOPinIntEnable +#else +#define MAP_GPIOPinIntEnable \ + GPIOPinIntEnable +#endif +#ifdef ROM_GPIOPinIntDisable +#define MAP_GPIOPinIntDisable \ + ROM_GPIOPinIntDisable +#else +#define MAP_GPIOPinIntDisable \ + GPIOPinIntDisable +#endif +#ifdef ROM_GPIOPinIntStatus +#define MAP_GPIOPinIntStatus \ + ROM_GPIOPinIntStatus +#else +#define MAP_GPIOPinIntStatus \ + GPIOPinIntStatus +#endif +#ifdef ROM_GPIOPinIntClear +#define MAP_GPIOPinIntClear \ + ROM_GPIOPinIntClear +#else +#define MAP_GPIOPinIntClear \ + GPIOPinIntClear +#endif +#ifdef ROM_GPIOPinRead +#define MAP_GPIOPinRead \ + ROM_GPIOPinRead +#else +#define MAP_GPIOPinRead \ + GPIOPinRead +#endif +#ifdef ROM_GPIOPinTypeCAN +#define MAP_GPIOPinTypeCAN \ + ROM_GPIOPinTypeCAN +#else +#define MAP_GPIOPinTypeCAN \ + GPIOPinTypeCAN +#endif +#ifdef ROM_GPIOPinTypeComparator +#define MAP_GPIOPinTypeComparator \ + ROM_GPIOPinTypeComparator +#else +#define MAP_GPIOPinTypeComparator \ + GPIOPinTypeComparator +#endif +#ifdef ROM_GPIOPinTypeGPIOInput +#define MAP_GPIOPinTypeGPIOInput \ + ROM_GPIOPinTypeGPIOInput +#else +#define MAP_GPIOPinTypeGPIOInput \ + GPIOPinTypeGPIOInput +#endif +#ifdef ROM_GPIOPinTypeGPIOOutput +#define MAP_GPIOPinTypeGPIOOutput \ + ROM_GPIOPinTypeGPIOOutput +#else +#define MAP_GPIOPinTypeGPIOOutput \ + GPIOPinTypeGPIOOutput +#endif +#ifdef ROM_GPIOPinTypeI2C +#define MAP_GPIOPinTypeI2C \ + ROM_GPIOPinTypeI2C +#else +#define MAP_GPIOPinTypeI2C \ + GPIOPinTypeI2C +#endif +#ifdef ROM_GPIOPinTypePWM +#define MAP_GPIOPinTypePWM \ + ROM_GPIOPinTypePWM +#else +#define MAP_GPIOPinTypePWM \ + GPIOPinTypePWM +#endif +#ifdef ROM_GPIOPinTypeQEI +#define MAP_GPIOPinTypeQEI \ + ROM_GPIOPinTypeQEI +#else +#define MAP_GPIOPinTypeQEI \ + GPIOPinTypeQEI +#endif +#ifdef ROM_GPIOPinTypeSSI +#define MAP_GPIOPinTypeSSI \ + ROM_GPIOPinTypeSSI +#else +#define MAP_GPIOPinTypeSSI \ + GPIOPinTypeSSI +#endif +#ifdef ROM_GPIOPinTypeTimer +#define MAP_GPIOPinTypeTimer \ + ROM_GPIOPinTypeTimer +#else +#define MAP_GPIOPinTypeTimer \ + GPIOPinTypeTimer +#endif +#ifdef ROM_GPIOPinTypeUART +#define MAP_GPIOPinTypeUART \ + ROM_GPIOPinTypeUART +#else +#define MAP_GPIOPinTypeUART \ + GPIOPinTypeUART +#endif +#ifdef ROM_GPIOPinTypeGPIOOutputOD +#define MAP_GPIOPinTypeGPIOOutputOD \ + ROM_GPIOPinTypeGPIOOutputOD +#else +#define MAP_GPIOPinTypeGPIOOutputOD \ + GPIOPinTypeGPIOOutputOD +#endif +#ifdef ROM_GPIOPinTypeADC +#define MAP_GPIOPinTypeADC \ + ROM_GPIOPinTypeADC +#else +#define MAP_GPIOPinTypeADC \ + GPIOPinTypeADC +#endif +#ifdef ROM_GPIOPinTypeUSBDigital +#define MAP_GPIOPinTypeUSBDigital \ + ROM_GPIOPinTypeUSBDigital +#else +#define MAP_GPIOPinTypeUSBDigital \ + GPIOPinTypeUSBDigital +#endif +#ifdef ROM_GPIOPinTypeI2S +#define MAP_GPIOPinTypeI2S \ + ROM_GPIOPinTypeI2S +#else +#define MAP_GPIOPinTypeI2S \ + GPIOPinTypeI2S +#endif +#ifdef ROM_GPIOPinConfigure +#define MAP_GPIOPinConfigure \ + ROM_GPIOPinConfigure +#else +#define MAP_GPIOPinConfigure \ + GPIOPinConfigure +#endif +#ifdef ROM_GPIOPinTypeEthernetLED +#define MAP_GPIOPinTypeEthernetLED \ + ROM_GPIOPinTypeEthernetLED +#else +#define MAP_GPIOPinTypeEthernetLED \ + GPIOPinTypeEthernetLED +#endif +#ifdef ROM_GPIOPinTypeUSBAnalog +#define MAP_GPIOPinTypeUSBAnalog \ + ROM_GPIOPinTypeUSBAnalog +#else +#define MAP_GPIOPinTypeUSBAnalog \ + GPIOPinTypeUSBAnalog +#endif +#ifdef ROM_GPIOPinTypeEPI +#define MAP_GPIOPinTypeEPI \ + ROM_GPIOPinTypeEPI +#else +#define MAP_GPIOPinTypeEPI \ + GPIOPinTypeEPI +#endif +#ifdef ROM_GPIOPinTypeEthernetMII +#define MAP_GPIOPinTypeEthernetMII \ + ROM_GPIOPinTypeEthernetMII +#else +#define MAP_GPIOPinTypeEthernetMII \ + GPIOPinTypeEthernetMII +#endif + +//***************************************************************************** +// +// Macros for the Hibernate API. +// +//***************************************************************************** +#ifdef ROM_HibernateIntClear +#define MAP_HibernateIntClear \ + ROM_HibernateIntClear +#else +#define MAP_HibernateIntClear \ + HibernateIntClear +#endif +#ifdef ROM_HibernateEnableExpClk +#define MAP_HibernateEnableExpClk \ + ROM_HibernateEnableExpClk +#else +#define MAP_HibernateEnableExpClk \ + HibernateEnableExpClk +#endif +#ifdef ROM_HibernateDisable +#define MAP_HibernateDisable \ + ROM_HibernateDisable +#else +#define MAP_HibernateDisable \ + HibernateDisable +#endif +#ifdef ROM_HibernateClockSelect +#define MAP_HibernateClockSelect \ + ROM_HibernateClockSelect +#else +#define MAP_HibernateClockSelect \ + HibernateClockSelect +#endif +#ifdef ROM_HibernateRTCEnable +#define MAP_HibernateRTCEnable \ + ROM_HibernateRTCEnable +#else +#define MAP_HibernateRTCEnable \ + HibernateRTCEnable +#endif +#ifdef ROM_HibernateRTCDisable +#define MAP_HibernateRTCDisable \ + ROM_HibernateRTCDisable +#else +#define MAP_HibernateRTCDisable \ + HibernateRTCDisable +#endif +#ifdef ROM_HibernateWakeSet +#define MAP_HibernateWakeSet \ + ROM_HibernateWakeSet +#else +#define MAP_HibernateWakeSet \ + HibernateWakeSet +#endif +#ifdef ROM_HibernateWakeGet +#define MAP_HibernateWakeGet \ + ROM_HibernateWakeGet +#else +#define MAP_HibernateWakeGet \ + HibernateWakeGet +#endif +#ifdef ROM_HibernateLowBatSet +#define MAP_HibernateLowBatSet \ + ROM_HibernateLowBatSet +#else +#define MAP_HibernateLowBatSet \ + HibernateLowBatSet +#endif +#ifdef ROM_HibernateLowBatGet +#define MAP_HibernateLowBatGet \ + ROM_HibernateLowBatGet +#else +#define MAP_HibernateLowBatGet \ + HibernateLowBatGet +#endif +#ifdef ROM_HibernateRTCSet +#define MAP_HibernateRTCSet \ + ROM_HibernateRTCSet +#else +#define MAP_HibernateRTCSet \ + HibernateRTCSet +#endif +#ifdef ROM_HibernateRTCGet +#define MAP_HibernateRTCGet \ + ROM_HibernateRTCGet +#else +#define MAP_HibernateRTCGet \ + HibernateRTCGet +#endif +#ifdef ROM_HibernateRTCMatch0Set +#define MAP_HibernateRTCMatch0Set \ + ROM_HibernateRTCMatch0Set +#else +#define MAP_HibernateRTCMatch0Set \ + HibernateRTCMatch0Set +#endif +#ifdef ROM_HibernateRTCMatch0Get +#define MAP_HibernateRTCMatch0Get \ + ROM_HibernateRTCMatch0Get +#else +#define MAP_HibernateRTCMatch0Get \ + HibernateRTCMatch0Get +#endif +#ifdef ROM_HibernateRTCMatch1Set +#define MAP_HibernateRTCMatch1Set \ + ROM_HibernateRTCMatch1Set +#else +#define MAP_HibernateRTCMatch1Set \ + HibernateRTCMatch1Set +#endif +#ifdef ROM_HibernateRTCMatch1Get +#define MAP_HibernateRTCMatch1Get \ + ROM_HibernateRTCMatch1Get +#else +#define MAP_HibernateRTCMatch1Get \ + HibernateRTCMatch1Get +#endif +#ifdef ROM_HibernateRTCTrimSet +#define MAP_HibernateRTCTrimSet \ + ROM_HibernateRTCTrimSet +#else +#define MAP_HibernateRTCTrimSet \ + HibernateRTCTrimSet +#endif +#ifdef ROM_HibernateRTCTrimGet +#define MAP_HibernateRTCTrimGet \ + ROM_HibernateRTCTrimGet +#else +#define MAP_HibernateRTCTrimGet \ + HibernateRTCTrimGet +#endif +#ifdef ROM_HibernateDataSet +#define MAP_HibernateDataSet \ + ROM_HibernateDataSet +#else +#define MAP_HibernateDataSet \ + HibernateDataSet +#endif +#ifdef ROM_HibernateDataGet +#define MAP_HibernateDataGet \ + ROM_HibernateDataGet +#else +#define MAP_HibernateDataGet \ + HibernateDataGet +#endif +#ifdef ROM_HibernateRequest +#define MAP_HibernateRequest \ + ROM_HibernateRequest +#else +#define MAP_HibernateRequest \ + HibernateRequest +#endif +#ifdef ROM_HibernateIntEnable +#define MAP_HibernateIntEnable \ + ROM_HibernateIntEnable +#else +#define MAP_HibernateIntEnable \ + HibernateIntEnable +#endif +#ifdef ROM_HibernateIntDisable +#define MAP_HibernateIntDisable \ + ROM_HibernateIntDisable +#else +#define MAP_HibernateIntDisable \ + HibernateIntDisable +#endif +#ifdef ROM_HibernateIntStatus +#define MAP_HibernateIntStatus \ + ROM_HibernateIntStatus +#else +#define MAP_HibernateIntStatus \ + HibernateIntStatus +#endif +#ifdef ROM_HibernateIsActive +#define MAP_HibernateIsActive \ + ROM_HibernateIsActive +#else +#define MAP_HibernateIsActive \ + HibernateIsActive +#endif + +//***************************************************************************** +// +// Macros for the I2C API. +// +//***************************************************************************** +#ifdef ROM_I2CMasterDataPut +#define MAP_I2CMasterDataPut \ + ROM_I2CMasterDataPut +#else +#define MAP_I2CMasterDataPut \ + I2CMasterDataPut +#endif +#ifdef ROM_I2CMasterInitExpClk +#define MAP_I2CMasterInitExpClk \ + ROM_I2CMasterInitExpClk +#else +#define MAP_I2CMasterInitExpClk \ + I2CMasterInitExpClk +#endif +#ifdef ROM_I2CSlaveInit +#define MAP_I2CSlaveInit \ + ROM_I2CSlaveInit +#else +#define MAP_I2CSlaveInit \ + I2CSlaveInit +#endif +#ifdef ROM_I2CMasterEnable +#define MAP_I2CMasterEnable \ + ROM_I2CMasterEnable +#else +#define MAP_I2CMasterEnable \ + I2CMasterEnable +#endif +#ifdef ROM_I2CSlaveEnable +#define MAP_I2CSlaveEnable \ + ROM_I2CSlaveEnable +#else +#define MAP_I2CSlaveEnable \ + I2CSlaveEnable +#endif +#ifdef ROM_I2CMasterDisable +#define MAP_I2CMasterDisable \ + ROM_I2CMasterDisable +#else +#define MAP_I2CMasterDisable \ + I2CMasterDisable +#endif +#ifdef ROM_I2CSlaveDisable +#define MAP_I2CSlaveDisable \ + ROM_I2CSlaveDisable +#else +#define MAP_I2CSlaveDisable \ + I2CSlaveDisable +#endif +#ifdef ROM_I2CMasterIntEnable +#define MAP_I2CMasterIntEnable \ + ROM_I2CMasterIntEnable +#else +#define MAP_I2CMasterIntEnable \ + I2CMasterIntEnable +#endif +#ifdef ROM_I2CSlaveIntEnable +#define MAP_I2CSlaveIntEnable \ + ROM_I2CSlaveIntEnable +#else +#define MAP_I2CSlaveIntEnable \ + I2CSlaveIntEnable +#endif +#ifdef ROM_I2CMasterIntDisable +#define MAP_I2CMasterIntDisable \ + ROM_I2CMasterIntDisable +#else +#define MAP_I2CMasterIntDisable \ + I2CMasterIntDisable +#endif +#ifdef ROM_I2CSlaveIntDisable +#define MAP_I2CSlaveIntDisable \ + ROM_I2CSlaveIntDisable +#else +#define MAP_I2CSlaveIntDisable \ + I2CSlaveIntDisable +#endif +#ifdef ROM_I2CMasterIntStatus +#define MAP_I2CMasterIntStatus \ + ROM_I2CMasterIntStatus +#else +#define MAP_I2CMasterIntStatus \ + I2CMasterIntStatus +#endif +#ifdef ROM_I2CSlaveIntStatus +#define MAP_I2CSlaveIntStatus \ + ROM_I2CSlaveIntStatus +#else +#define MAP_I2CSlaveIntStatus \ + I2CSlaveIntStatus +#endif +#ifdef ROM_I2CMasterIntClear +#define MAP_I2CMasterIntClear \ + ROM_I2CMasterIntClear +#else +#define MAP_I2CMasterIntClear \ + I2CMasterIntClear +#endif +#ifdef ROM_I2CSlaveIntClear +#define MAP_I2CSlaveIntClear \ + ROM_I2CSlaveIntClear +#else +#define MAP_I2CSlaveIntClear \ + I2CSlaveIntClear +#endif +#ifdef ROM_I2CMasterSlaveAddrSet +#define MAP_I2CMasterSlaveAddrSet \ + ROM_I2CMasterSlaveAddrSet +#else +#define MAP_I2CMasterSlaveAddrSet \ + I2CMasterSlaveAddrSet +#endif +#ifdef ROM_I2CMasterBusy +#define MAP_I2CMasterBusy \ + ROM_I2CMasterBusy +#else +#define MAP_I2CMasterBusy \ + I2CMasterBusy +#endif +#ifdef ROM_I2CMasterBusBusy +#define MAP_I2CMasterBusBusy \ + ROM_I2CMasterBusBusy +#else +#define MAP_I2CMasterBusBusy \ + I2CMasterBusBusy +#endif +#ifdef ROM_I2CMasterControl +#define MAP_I2CMasterControl \ + ROM_I2CMasterControl +#else +#define MAP_I2CMasterControl \ + I2CMasterControl +#endif +#ifdef ROM_I2CMasterErr +#define MAP_I2CMasterErr \ + ROM_I2CMasterErr +#else +#define MAP_I2CMasterErr \ + I2CMasterErr +#endif +#ifdef ROM_I2CMasterDataGet +#define MAP_I2CMasterDataGet \ + ROM_I2CMasterDataGet +#else +#define MAP_I2CMasterDataGet \ + I2CMasterDataGet +#endif +#ifdef ROM_I2CSlaveStatus +#define MAP_I2CSlaveStatus \ + ROM_I2CSlaveStatus +#else +#define MAP_I2CSlaveStatus \ + I2CSlaveStatus +#endif +#ifdef ROM_I2CSlaveDataPut +#define MAP_I2CSlaveDataPut \ + ROM_I2CSlaveDataPut +#else +#define MAP_I2CSlaveDataPut \ + I2CSlaveDataPut +#endif +#ifdef ROM_I2CSlaveDataGet +#define MAP_I2CSlaveDataGet \ + ROM_I2CSlaveDataGet +#else +#define MAP_I2CSlaveDataGet \ + I2CSlaveDataGet +#endif +#ifdef ROM_I2CSlaveIntEnableEx +#define MAP_I2CSlaveIntEnableEx \ + ROM_I2CSlaveIntEnableEx +#else +#define MAP_I2CSlaveIntEnableEx \ + I2CSlaveIntEnableEx +#endif +#ifdef ROM_I2CSlaveIntDisableEx +#define MAP_I2CSlaveIntDisableEx \ + ROM_I2CSlaveIntDisableEx +#else +#define MAP_I2CSlaveIntDisableEx \ + I2CSlaveIntDisableEx +#endif +#ifdef ROM_I2CSlaveIntStatusEx +#define MAP_I2CSlaveIntStatusEx \ + ROM_I2CSlaveIntStatusEx +#else +#define MAP_I2CSlaveIntStatusEx \ + I2CSlaveIntStatusEx +#endif +#ifdef ROM_I2CSlaveIntClearEx +#define MAP_I2CSlaveIntClearEx \ + ROM_I2CSlaveIntClearEx +#else +#define MAP_I2CSlaveIntClearEx \ + I2CSlaveIntClearEx +#endif + +//***************************************************************************** +// +// Macros for the I2S API. +// +//***************************************************************************** +#ifdef ROM_I2SIntStatus +#define MAP_I2SIntStatus \ + ROM_I2SIntStatus +#else +#define MAP_I2SIntStatus \ + I2SIntStatus +#endif +#ifdef ROM_I2STxEnable +#define MAP_I2STxEnable \ + ROM_I2STxEnable +#else +#define MAP_I2STxEnable \ + I2STxEnable +#endif +#ifdef ROM_I2STxDisable +#define MAP_I2STxDisable \ + ROM_I2STxDisable +#else +#define MAP_I2STxDisable \ + I2STxDisable +#endif +#ifdef ROM_I2STxDataPut +#define MAP_I2STxDataPut \ + ROM_I2STxDataPut +#else +#define MAP_I2STxDataPut \ + I2STxDataPut +#endif +#ifdef ROM_I2STxDataPutNonBlocking +#define MAP_I2STxDataPutNonBlocking \ + ROM_I2STxDataPutNonBlocking +#else +#define MAP_I2STxDataPutNonBlocking \ + I2STxDataPutNonBlocking +#endif +#ifdef ROM_I2STxConfigSet +#define MAP_I2STxConfigSet \ + ROM_I2STxConfigSet +#else +#define MAP_I2STxConfigSet \ + I2STxConfigSet +#endif +#ifdef ROM_I2STxFIFOLimitSet +#define MAP_I2STxFIFOLimitSet \ + ROM_I2STxFIFOLimitSet +#else +#define MAP_I2STxFIFOLimitSet \ + I2STxFIFOLimitSet +#endif +#ifdef ROM_I2STxFIFOLimitGet +#define MAP_I2STxFIFOLimitGet \ + ROM_I2STxFIFOLimitGet +#else +#define MAP_I2STxFIFOLimitGet \ + I2STxFIFOLimitGet +#endif +#ifdef ROM_I2STxFIFOLevelGet +#define MAP_I2STxFIFOLevelGet \ + ROM_I2STxFIFOLevelGet +#else +#define MAP_I2STxFIFOLevelGet \ + I2STxFIFOLevelGet +#endif +#ifdef ROM_I2SRxEnable +#define MAP_I2SRxEnable \ + ROM_I2SRxEnable +#else +#define MAP_I2SRxEnable \ + I2SRxEnable +#endif +#ifdef ROM_I2SRxDisable +#define MAP_I2SRxDisable \ + ROM_I2SRxDisable +#else +#define MAP_I2SRxDisable \ + I2SRxDisable +#endif +#ifdef ROM_I2SRxDataGet +#define MAP_I2SRxDataGet \ + ROM_I2SRxDataGet +#else +#define MAP_I2SRxDataGet \ + I2SRxDataGet +#endif +#ifdef ROM_I2SRxDataGetNonBlocking +#define MAP_I2SRxDataGetNonBlocking \ + ROM_I2SRxDataGetNonBlocking +#else +#define MAP_I2SRxDataGetNonBlocking \ + I2SRxDataGetNonBlocking +#endif +#ifdef ROM_I2SRxConfigSet +#define MAP_I2SRxConfigSet \ + ROM_I2SRxConfigSet +#else +#define MAP_I2SRxConfigSet \ + I2SRxConfigSet +#endif +#ifdef ROM_I2SRxFIFOLimitSet +#define MAP_I2SRxFIFOLimitSet \ + ROM_I2SRxFIFOLimitSet +#else +#define MAP_I2SRxFIFOLimitSet \ + I2SRxFIFOLimitSet +#endif +#ifdef ROM_I2SRxFIFOLimitGet +#define MAP_I2SRxFIFOLimitGet \ + ROM_I2SRxFIFOLimitGet +#else +#define MAP_I2SRxFIFOLimitGet \ + I2SRxFIFOLimitGet +#endif +#ifdef ROM_I2SRxFIFOLevelGet +#define MAP_I2SRxFIFOLevelGet \ + ROM_I2SRxFIFOLevelGet +#else +#define MAP_I2SRxFIFOLevelGet \ + I2SRxFIFOLevelGet +#endif +#ifdef ROM_I2STxRxEnable +#define MAP_I2STxRxEnable \ + ROM_I2STxRxEnable +#else +#define MAP_I2STxRxEnable \ + I2STxRxEnable +#endif +#ifdef ROM_I2STxRxDisable +#define MAP_I2STxRxDisable \ + ROM_I2STxRxDisable +#else +#define MAP_I2STxRxDisable \ + I2STxRxDisable +#endif +#ifdef ROM_I2STxRxConfigSet +#define MAP_I2STxRxConfigSet \ + ROM_I2STxRxConfigSet +#else +#define MAP_I2STxRxConfigSet \ + I2STxRxConfigSet +#endif +#ifdef ROM_I2SMasterClockSelect +#define MAP_I2SMasterClockSelect \ + ROM_I2SMasterClockSelect +#else +#define MAP_I2SMasterClockSelect \ + I2SMasterClockSelect +#endif +#ifdef ROM_I2SIntEnable +#define MAP_I2SIntEnable \ + ROM_I2SIntEnable +#else +#define MAP_I2SIntEnable \ + I2SIntEnable +#endif +#ifdef ROM_I2SIntDisable +#define MAP_I2SIntDisable \ + ROM_I2SIntDisable +#else +#define MAP_I2SIntDisable \ + I2SIntDisable +#endif +#ifdef ROM_I2SIntClear +#define MAP_I2SIntClear \ + ROM_I2SIntClear +#else +#define MAP_I2SIntClear \ + I2SIntClear +#endif + +//***************************************************************************** +// +// Macros for the Interrupt API. +// +//***************************************************************************** +#ifdef ROM_IntEnable +#define MAP_IntEnable \ + ROM_IntEnable +#else +#define MAP_IntEnable \ + IntEnable +#endif +#ifdef ROM_IntMasterEnable +#define MAP_IntMasterEnable \ + ROM_IntMasterEnable +#else +#define MAP_IntMasterEnable \ + IntMasterEnable +#endif +#ifdef ROM_IntMasterDisable +#define MAP_IntMasterDisable \ + ROM_IntMasterDisable +#else +#define MAP_IntMasterDisable \ + IntMasterDisable +#endif +#ifdef ROM_IntDisable +#define MAP_IntDisable \ + ROM_IntDisable +#else +#define MAP_IntDisable \ + IntDisable +#endif +#ifdef ROM_IntPriorityGroupingSet +#define MAP_IntPriorityGroupingSet \ + ROM_IntPriorityGroupingSet +#else +#define MAP_IntPriorityGroupingSet \ + IntPriorityGroupingSet +#endif +#ifdef ROM_IntPriorityGroupingGet +#define MAP_IntPriorityGroupingGet \ + ROM_IntPriorityGroupingGet +#else +#define MAP_IntPriorityGroupingGet \ + IntPriorityGroupingGet +#endif +#ifdef ROM_IntPrioritySet +#define MAP_IntPrioritySet \ + ROM_IntPrioritySet +#else +#define MAP_IntPrioritySet \ + IntPrioritySet +#endif +#ifdef ROM_IntPriorityGet +#define MAP_IntPriorityGet \ + ROM_IntPriorityGet +#else +#define MAP_IntPriorityGet \ + IntPriorityGet +#endif +#ifdef ROM_IntPendSet +#define MAP_IntPendSet \ + ROM_IntPendSet +#else +#define MAP_IntPendSet \ + IntPendSet +#endif +#ifdef ROM_IntPendClear +#define MAP_IntPendClear \ + ROM_IntPendClear +#else +#define MAP_IntPendClear \ + IntPendClear +#endif + +//***************************************************************************** +// +// Macros for the MPU API. +// +//***************************************************************************** +#ifdef ROM_MPUEnable +#define MAP_MPUEnable \ + ROM_MPUEnable +#else +#define MAP_MPUEnable \ + MPUEnable +#endif +#ifdef ROM_MPUDisable +#define MAP_MPUDisable \ + ROM_MPUDisable +#else +#define MAP_MPUDisable \ + MPUDisable +#endif +#ifdef ROM_MPURegionCountGet +#define MAP_MPURegionCountGet \ + ROM_MPURegionCountGet +#else +#define MAP_MPURegionCountGet \ + MPURegionCountGet +#endif +#ifdef ROM_MPURegionEnable +#define MAP_MPURegionEnable \ + ROM_MPURegionEnable +#else +#define MAP_MPURegionEnable \ + MPURegionEnable +#endif +#ifdef ROM_MPURegionDisable +#define MAP_MPURegionDisable \ + ROM_MPURegionDisable +#else +#define MAP_MPURegionDisable \ + MPURegionDisable +#endif +#ifdef ROM_MPURegionSet +#define MAP_MPURegionSet \ + ROM_MPURegionSet +#else +#define MAP_MPURegionSet \ + MPURegionSet +#endif +#ifdef ROM_MPURegionGet +#define MAP_MPURegionGet \ + ROM_MPURegionGet +#else +#define MAP_MPURegionGet \ + MPURegionGet +#endif + +//***************************************************************************** +// +// Macros for the PWM API. +// +//***************************************************************************** +#ifdef ROM_PWMPulseWidthSet +#define MAP_PWMPulseWidthSet \ + ROM_PWMPulseWidthSet +#else +#define MAP_PWMPulseWidthSet \ + PWMPulseWidthSet +#endif +#ifdef ROM_PWMGenConfigure +#define MAP_PWMGenConfigure \ + ROM_PWMGenConfigure +#else +#define MAP_PWMGenConfigure \ + PWMGenConfigure +#endif +#ifdef ROM_PWMGenPeriodSet +#define MAP_PWMGenPeriodSet \ + ROM_PWMGenPeriodSet +#else +#define MAP_PWMGenPeriodSet \ + PWMGenPeriodSet +#endif +#ifdef ROM_PWMGenPeriodGet +#define MAP_PWMGenPeriodGet \ + ROM_PWMGenPeriodGet +#else +#define MAP_PWMGenPeriodGet \ + PWMGenPeriodGet +#endif +#ifdef ROM_PWMGenEnable +#define MAP_PWMGenEnable \ + ROM_PWMGenEnable +#else +#define MAP_PWMGenEnable \ + PWMGenEnable +#endif +#ifdef ROM_PWMGenDisable +#define MAP_PWMGenDisable \ + ROM_PWMGenDisable +#else +#define MAP_PWMGenDisable \ + PWMGenDisable +#endif +#ifdef ROM_PWMPulseWidthGet +#define MAP_PWMPulseWidthGet \ + ROM_PWMPulseWidthGet +#else +#define MAP_PWMPulseWidthGet \ + PWMPulseWidthGet +#endif +#ifdef ROM_PWMDeadBandEnable +#define MAP_PWMDeadBandEnable \ + ROM_PWMDeadBandEnable +#else +#define MAP_PWMDeadBandEnable \ + PWMDeadBandEnable +#endif +#ifdef ROM_PWMDeadBandDisable +#define MAP_PWMDeadBandDisable \ + ROM_PWMDeadBandDisable +#else +#define MAP_PWMDeadBandDisable \ + PWMDeadBandDisable +#endif +#ifdef ROM_PWMSyncUpdate +#define MAP_PWMSyncUpdate \ + ROM_PWMSyncUpdate +#else +#define MAP_PWMSyncUpdate \ + PWMSyncUpdate +#endif +#ifdef ROM_PWMSyncTimeBase +#define MAP_PWMSyncTimeBase \ + ROM_PWMSyncTimeBase +#else +#define MAP_PWMSyncTimeBase \ + PWMSyncTimeBase +#endif +#ifdef ROM_PWMOutputState +#define MAP_PWMOutputState \ + ROM_PWMOutputState +#else +#define MAP_PWMOutputState \ + PWMOutputState +#endif +#ifdef ROM_PWMOutputInvert +#define MAP_PWMOutputInvert \ + ROM_PWMOutputInvert +#else +#define MAP_PWMOutputInvert \ + PWMOutputInvert +#endif +#ifdef ROM_PWMOutputFault +#define MAP_PWMOutputFault \ + ROM_PWMOutputFault +#else +#define MAP_PWMOutputFault \ + PWMOutputFault +#endif +#ifdef ROM_PWMGenIntTrigEnable +#define MAP_PWMGenIntTrigEnable \ + ROM_PWMGenIntTrigEnable +#else +#define MAP_PWMGenIntTrigEnable \ + PWMGenIntTrigEnable +#endif +#ifdef ROM_PWMGenIntTrigDisable +#define MAP_PWMGenIntTrigDisable \ + ROM_PWMGenIntTrigDisable +#else +#define MAP_PWMGenIntTrigDisable \ + PWMGenIntTrigDisable +#endif +#ifdef ROM_PWMGenIntStatus +#define MAP_PWMGenIntStatus \ + ROM_PWMGenIntStatus +#else +#define MAP_PWMGenIntStatus \ + PWMGenIntStatus +#endif +#ifdef ROM_PWMGenIntClear +#define MAP_PWMGenIntClear \ + ROM_PWMGenIntClear +#else +#define MAP_PWMGenIntClear \ + PWMGenIntClear +#endif +#ifdef ROM_PWMIntEnable +#define MAP_PWMIntEnable \ + ROM_PWMIntEnable +#else +#define MAP_PWMIntEnable \ + PWMIntEnable +#endif +#ifdef ROM_PWMIntDisable +#define MAP_PWMIntDisable \ + ROM_PWMIntDisable +#else +#define MAP_PWMIntDisable \ + PWMIntDisable +#endif +#ifdef ROM_PWMFaultIntClear +#define MAP_PWMFaultIntClear \ + ROM_PWMFaultIntClear +#else +#define MAP_PWMFaultIntClear \ + PWMFaultIntClear +#endif +#ifdef ROM_PWMIntStatus +#define MAP_PWMIntStatus \ + ROM_PWMIntStatus +#else +#define MAP_PWMIntStatus \ + PWMIntStatus +#endif +#ifdef ROM_PWMOutputFaultLevel +#define MAP_PWMOutputFaultLevel \ + ROM_PWMOutputFaultLevel +#else +#define MAP_PWMOutputFaultLevel \ + PWMOutputFaultLevel +#endif +#ifdef ROM_PWMFaultIntClearExt +#define MAP_PWMFaultIntClearExt \ + ROM_PWMFaultIntClearExt +#else +#define MAP_PWMFaultIntClearExt \ + PWMFaultIntClearExt +#endif +#ifdef ROM_PWMGenFaultConfigure +#define MAP_PWMGenFaultConfigure \ + ROM_PWMGenFaultConfigure +#else +#define MAP_PWMGenFaultConfigure \ + PWMGenFaultConfigure +#endif +#ifdef ROM_PWMGenFaultTriggerSet +#define MAP_PWMGenFaultTriggerSet \ + ROM_PWMGenFaultTriggerSet +#else +#define MAP_PWMGenFaultTriggerSet \ + PWMGenFaultTriggerSet +#endif +#ifdef ROM_PWMGenFaultTriggerGet +#define MAP_PWMGenFaultTriggerGet \ + ROM_PWMGenFaultTriggerGet +#else +#define MAP_PWMGenFaultTriggerGet \ + PWMGenFaultTriggerGet +#endif +#ifdef ROM_PWMGenFaultStatus +#define MAP_PWMGenFaultStatus \ + ROM_PWMGenFaultStatus +#else +#define MAP_PWMGenFaultStatus \ + PWMGenFaultStatus +#endif +#ifdef ROM_PWMGenFaultClear +#define MAP_PWMGenFaultClear \ + ROM_PWMGenFaultClear +#else +#define MAP_PWMGenFaultClear \ + PWMGenFaultClear +#endif + +//***************************************************************************** +// +// Macros for the QEI API. +// +//***************************************************************************** +#ifdef ROM_QEIPositionGet +#define MAP_QEIPositionGet \ + ROM_QEIPositionGet +#else +#define MAP_QEIPositionGet \ + QEIPositionGet +#endif +#ifdef ROM_QEIEnable +#define MAP_QEIEnable \ + ROM_QEIEnable +#else +#define MAP_QEIEnable \ + QEIEnable +#endif +#ifdef ROM_QEIDisable +#define MAP_QEIDisable \ + ROM_QEIDisable +#else +#define MAP_QEIDisable \ + QEIDisable +#endif +#ifdef ROM_QEIConfigure +#define MAP_QEIConfigure \ + ROM_QEIConfigure +#else +#define MAP_QEIConfigure \ + QEIConfigure +#endif +#ifdef ROM_QEIPositionSet +#define MAP_QEIPositionSet \ + ROM_QEIPositionSet +#else +#define MAP_QEIPositionSet \ + QEIPositionSet +#endif +#ifdef ROM_QEIDirectionGet +#define MAP_QEIDirectionGet \ + ROM_QEIDirectionGet +#else +#define MAP_QEIDirectionGet \ + QEIDirectionGet +#endif +#ifdef ROM_QEIErrorGet +#define MAP_QEIErrorGet \ + ROM_QEIErrorGet +#else +#define MAP_QEIErrorGet \ + QEIErrorGet +#endif +#ifdef ROM_QEIVelocityEnable +#define MAP_QEIVelocityEnable \ + ROM_QEIVelocityEnable +#else +#define MAP_QEIVelocityEnable \ + QEIVelocityEnable +#endif +#ifdef ROM_QEIVelocityDisable +#define MAP_QEIVelocityDisable \ + ROM_QEIVelocityDisable +#else +#define MAP_QEIVelocityDisable \ + QEIVelocityDisable +#endif +#ifdef ROM_QEIVelocityConfigure +#define MAP_QEIVelocityConfigure \ + ROM_QEIVelocityConfigure +#else +#define MAP_QEIVelocityConfigure \ + QEIVelocityConfigure +#endif +#ifdef ROM_QEIVelocityGet +#define MAP_QEIVelocityGet \ + ROM_QEIVelocityGet +#else +#define MAP_QEIVelocityGet \ + QEIVelocityGet +#endif +#ifdef ROM_QEIIntEnable +#define MAP_QEIIntEnable \ + ROM_QEIIntEnable +#else +#define MAP_QEIIntEnable \ + QEIIntEnable +#endif +#ifdef ROM_QEIIntDisable +#define MAP_QEIIntDisable \ + ROM_QEIIntDisable +#else +#define MAP_QEIIntDisable \ + QEIIntDisable +#endif +#ifdef ROM_QEIIntStatus +#define MAP_QEIIntStatus \ + ROM_QEIIntStatus +#else +#define MAP_QEIIntStatus \ + QEIIntStatus +#endif +#ifdef ROM_QEIIntClear +#define MAP_QEIIntClear \ + ROM_QEIIntClear +#else +#define MAP_QEIIntClear \ + QEIIntClear +#endif + +//***************************************************************************** +// +// Macros for the SSI API. +// +//***************************************************************************** +#ifdef ROM_SSIDataPut +#define MAP_SSIDataPut \ + ROM_SSIDataPut +#else +#define MAP_SSIDataPut \ + SSIDataPut +#endif +#ifdef ROM_SSIConfigSetExpClk +#define MAP_SSIConfigSetExpClk \ + ROM_SSIConfigSetExpClk +#else +#define MAP_SSIConfigSetExpClk \ + SSIConfigSetExpClk +#endif +#ifdef ROM_SSIEnable +#define MAP_SSIEnable \ + ROM_SSIEnable +#else +#define MAP_SSIEnable \ + SSIEnable +#endif +#ifdef ROM_SSIDisable +#define MAP_SSIDisable \ + ROM_SSIDisable +#else +#define MAP_SSIDisable \ + SSIDisable +#endif +#ifdef ROM_SSIIntEnable +#define MAP_SSIIntEnable \ + ROM_SSIIntEnable +#else +#define MAP_SSIIntEnable \ + SSIIntEnable +#endif +#ifdef ROM_SSIIntDisable +#define MAP_SSIIntDisable \ + ROM_SSIIntDisable +#else +#define MAP_SSIIntDisable \ + SSIIntDisable +#endif +#ifdef ROM_SSIIntStatus +#define MAP_SSIIntStatus \ + ROM_SSIIntStatus +#else +#define MAP_SSIIntStatus \ + SSIIntStatus +#endif +#ifdef ROM_SSIIntClear +#define MAP_SSIIntClear \ + ROM_SSIIntClear +#else +#define MAP_SSIIntClear \ + SSIIntClear +#endif +#ifdef ROM_SSIDataPutNonBlocking +#define MAP_SSIDataPutNonBlocking \ + ROM_SSIDataPutNonBlocking +#else +#define MAP_SSIDataPutNonBlocking \ + SSIDataPutNonBlocking +#endif +#ifdef ROM_SSIDataGet +#define MAP_SSIDataGet \ + ROM_SSIDataGet +#else +#define MAP_SSIDataGet \ + SSIDataGet +#endif +#ifdef ROM_SSIDataGetNonBlocking +#define MAP_SSIDataGetNonBlocking \ + ROM_SSIDataGetNonBlocking +#else +#define MAP_SSIDataGetNonBlocking \ + SSIDataGetNonBlocking +#endif +#ifdef ROM_SSIDMAEnable +#define MAP_SSIDMAEnable \ + ROM_SSIDMAEnable +#else +#define MAP_SSIDMAEnable \ + SSIDMAEnable +#endif +#ifdef ROM_SSIDMADisable +#define MAP_SSIDMADisable \ + ROM_SSIDMADisable +#else +#define MAP_SSIDMADisable \ + SSIDMADisable +#endif +#ifdef ROM_SSIBusy +#define MAP_SSIBusy \ + ROM_SSIBusy +#else +#define MAP_SSIBusy \ + SSIBusy +#endif + +//***************************************************************************** +// +// Macros for the SysCtl API. +// +//***************************************************************************** +#ifdef ROM_SysCtlSleep +#define MAP_SysCtlSleep \ + ROM_SysCtlSleep +#else +#define MAP_SysCtlSleep \ + SysCtlSleep +#endif +#ifdef ROM_SysCtlSRAMSizeGet +#define MAP_SysCtlSRAMSizeGet \ + ROM_SysCtlSRAMSizeGet +#else +#define MAP_SysCtlSRAMSizeGet \ + SysCtlSRAMSizeGet +#endif +#ifdef ROM_SysCtlFlashSizeGet +#define MAP_SysCtlFlashSizeGet \ + ROM_SysCtlFlashSizeGet +#else +#define MAP_SysCtlFlashSizeGet \ + SysCtlFlashSizeGet +#endif +#ifdef ROM_SysCtlPinPresent +#define MAP_SysCtlPinPresent \ + ROM_SysCtlPinPresent +#else +#define MAP_SysCtlPinPresent \ + SysCtlPinPresent +#endif +#ifdef ROM_SysCtlPeripheralPresent +#define MAP_SysCtlPeripheralPresent \ + ROM_SysCtlPeripheralPresent +#else +#define MAP_SysCtlPeripheralPresent \ + SysCtlPeripheralPresent +#endif +#ifdef ROM_SysCtlPeripheralReset +#define MAP_SysCtlPeripheralReset \ + ROM_SysCtlPeripheralReset +#else +#define MAP_SysCtlPeripheralReset \ + SysCtlPeripheralReset +#endif +#ifdef ROM_SysCtlPeripheralEnable +#define MAP_SysCtlPeripheralEnable \ + ROM_SysCtlPeripheralEnable +#else +#define MAP_SysCtlPeripheralEnable \ + SysCtlPeripheralEnable +#endif +#ifdef ROM_SysCtlPeripheralDisable +#define MAP_SysCtlPeripheralDisable \ + ROM_SysCtlPeripheralDisable +#else +#define MAP_SysCtlPeripheralDisable \ + SysCtlPeripheralDisable +#endif +#ifdef ROM_SysCtlPeripheralSleepEnable +#define MAP_SysCtlPeripheralSleepEnable \ + ROM_SysCtlPeripheralSleepEnable +#else +#define MAP_SysCtlPeripheralSleepEnable \ + SysCtlPeripheralSleepEnable +#endif +#ifdef ROM_SysCtlPeripheralSleepDisable +#define MAP_SysCtlPeripheralSleepDisable \ + ROM_SysCtlPeripheralSleepDisable +#else +#define MAP_SysCtlPeripheralSleepDisable \ + SysCtlPeripheralSleepDisable +#endif +#ifdef ROM_SysCtlPeripheralDeepSleepEnable +#define MAP_SysCtlPeripheralDeepSleepEnable \ + ROM_SysCtlPeripheralDeepSleepEnable +#else +#define MAP_SysCtlPeripheralDeepSleepEnable \ + SysCtlPeripheralDeepSleepEnable +#endif +#ifdef ROM_SysCtlPeripheralDeepSleepDisable +#define MAP_SysCtlPeripheralDeepSleepDisable \ + ROM_SysCtlPeripheralDeepSleepDisable +#else +#define MAP_SysCtlPeripheralDeepSleepDisable \ + SysCtlPeripheralDeepSleepDisable +#endif +#ifdef ROM_SysCtlPeripheralClockGating +#define MAP_SysCtlPeripheralClockGating \ + ROM_SysCtlPeripheralClockGating +#else +#define MAP_SysCtlPeripheralClockGating \ + SysCtlPeripheralClockGating +#endif +#ifdef ROM_SysCtlIntEnable +#define MAP_SysCtlIntEnable \ + ROM_SysCtlIntEnable +#else +#define MAP_SysCtlIntEnable \ + SysCtlIntEnable +#endif +#ifdef ROM_SysCtlIntDisable +#define MAP_SysCtlIntDisable \ + ROM_SysCtlIntDisable +#else +#define MAP_SysCtlIntDisable \ + SysCtlIntDisable +#endif +#ifdef ROM_SysCtlIntClear +#define MAP_SysCtlIntClear \ + ROM_SysCtlIntClear +#else +#define MAP_SysCtlIntClear \ + SysCtlIntClear +#endif +#ifdef ROM_SysCtlIntStatus +#define MAP_SysCtlIntStatus \ + ROM_SysCtlIntStatus +#else +#define MAP_SysCtlIntStatus \ + SysCtlIntStatus +#endif +#ifdef ROM_SysCtlLDOSet +#define MAP_SysCtlLDOSet \ + ROM_SysCtlLDOSet +#else +#define MAP_SysCtlLDOSet \ + SysCtlLDOSet +#endif +#ifdef ROM_SysCtlLDOGet +#define MAP_SysCtlLDOGet \ + ROM_SysCtlLDOGet +#else +#define MAP_SysCtlLDOGet \ + SysCtlLDOGet +#endif +#ifdef ROM_SysCtlReset +#define MAP_SysCtlReset \ + ROM_SysCtlReset +#else +#define MAP_SysCtlReset \ + SysCtlReset +#endif +#ifdef ROM_SysCtlDeepSleep +#define MAP_SysCtlDeepSleep \ + ROM_SysCtlDeepSleep +#else +#define MAP_SysCtlDeepSleep \ + SysCtlDeepSleep +#endif +#ifdef ROM_SysCtlResetCauseGet +#define MAP_SysCtlResetCauseGet \ + ROM_SysCtlResetCauseGet +#else +#define MAP_SysCtlResetCauseGet \ + SysCtlResetCauseGet +#endif +#ifdef ROM_SysCtlResetCauseClear +#define MAP_SysCtlResetCauseClear \ + ROM_SysCtlResetCauseClear +#else +#define MAP_SysCtlResetCauseClear \ + SysCtlResetCauseClear +#endif +#ifdef ROM_SysCtlClockSet +#define MAP_SysCtlClockSet \ + ROM_SysCtlClockSet +#else +#define MAP_SysCtlClockSet \ + SysCtlClockSet +#endif +#ifdef ROM_SysCtlClockGet +#define MAP_SysCtlClockGet \ + ROM_SysCtlClockGet +#else +#define MAP_SysCtlClockGet \ + SysCtlClockGet +#endif +#ifdef ROM_SysCtlPWMClockSet +#define MAP_SysCtlPWMClockSet \ + ROM_SysCtlPWMClockSet +#else +#define MAP_SysCtlPWMClockSet \ + SysCtlPWMClockSet +#endif +#ifdef ROM_SysCtlPWMClockGet +#define MAP_SysCtlPWMClockGet \ + ROM_SysCtlPWMClockGet +#else +#define MAP_SysCtlPWMClockGet \ + SysCtlPWMClockGet +#endif +#ifdef ROM_SysCtlADCSpeedSet +#define MAP_SysCtlADCSpeedSet \ + ROM_SysCtlADCSpeedSet +#else +#define MAP_SysCtlADCSpeedSet \ + SysCtlADCSpeedSet +#endif +#ifdef ROM_SysCtlADCSpeedGet +#define MAP_SysCtlADCSpeedGet \ + ROM_SysCtlADCSpeedGet +#else +#define MAP_SysCtlADCSpeedGet \ + SysCtlADCSpeedGet +#endif +#ifdef ROM_SysCtlGPIOAHBEnable +#define MAP_SysCtlGPIOAHBEnable \ + ROM_SysCtlGPIOAHBEnable +#else +#define MAP_SysCtlGPIOAHBEnable \ + SysCtlGPIOAHBEnable +#endif +#ifdef ROM_SysCtlGPIOAHBDisable +#define MAP_SysCtlGPIOAHBDisable \ + ROM_SysCtlGPIOAHBDisable +#else +#define MAP_SysCtlGPIOAHBDisable \ + SysCtlGPIOAHBDisable +#endif +#ifdef ROM_SysCtlUSBPLLEnable +#define MAP_SysCtlUSBPLLEnable \ + ROM_SysCtlUSBPLLEnable +#else +#define MAP_SysCtlUSBPLLEnable \ + SysCtlUSBPLLEnable +#endif +#ifdef ROM_SysCtlUSBPLLDisable +#define MAP_SysCtlUSBPLLDisable \ + ROM_SysCtlUSBPLLDisable +#else +#define MAP_SysCtlUSBPLLDisable \ + SysCtlUSBPLLDisable +#endif +#ifdef ROM_SysCtlI2SMClkSet +#define MAP_SysCtlI2SMClkSet \ + ROM_SysCtlI2SMClkSet +#else +#define MAP_SysCtlI2SMClkSet \ + SysCtlI2SMClkSet +#endif +#ifdef ROM_SysCtlDelay +#define MAP_SysCtlDelay \ + ROM_SysCtlDelay +#else +#define MAP_SysCtlDelay \ + SysCtlDelay +#endif + +//***************************************************************************** +// +// Macros for the SysTick API. +// +//***************************************************************************** +#ifdef ROM_SysTickValueGet +#define MAP_SysTickValueGet \ + ROM_SysTickValueGet +#else +#define MAP_SysTickValueGet \ + SysTickValueGet +#endif +#ifdef ROM_SysTickEnable +#define MAP_SysTickEnable \ + ROM_SysTickEnable +#else +#define MAP_SysTickEnable \ + SysTickEnable +#endif +#ifdef ROM_SysTickDisable +#define MAP_SysTickDisable \ + ROM_SysTickDisable +#else +#define MAP_SysTickDisable \ + SysTickDisable +#endif +#ifdef ROM_SysTickIntEnable +#define MAP_SysTickIntEnable \ + ROM_SysTickIntEnable +#else +#define MAP_SysTickIntEnable \ + SysTickIntEnable +#endif +#ifdef ROM_SysTickIntDisable +#define MAP_SysTickIntDisable \ + ROM_SysTickIntDisable +#else +#define MAP_SysTickIntDisable \ + SysTickIntDisable +#endif +#ifdef ROM_SysTickPeriodSet +#define MAP_SysTickPeriodSet \ + ROM_SysTickPeriodSet +#else +#define MAP_SysTickPeriodSet \ + SysTickPeriodSet +#endif +#ifdef ROM_SysTickPeriodGet +#define MAP_SysTickPeriodGet \ + ROM_SysTickPeriodGet +#else +#define MAP_SysTickPeriodGet \ + SysTickPeriodGet +#endif + +//***************************************************************************** +// +// Macros for the Timer API. +// +//***************************************************************************** +#ifdef ROM_TimerIntClear +#define MAP_TimerIntClear \ + ROM_TimerIntClear +#else +#define MAP_TimerIntClear \ + TimerIntClear +#endif +#ifdef ROM_TimerEnable +#define MAP_TimerEnable \ + ROM_TimerEnable +#else +#define MAP_TimerEnable \ + TimerEnable +#endif +#ifdef ROM_TimerDisable +#define MAP_TimerDisable \ + ROM_TimerDisable +#else +#define MAP_TimerDisable \ + TimerDisable +#endif +#ifdef ROM_TimerConfigure +#define MAP_TimerConfigure \ + ROM_TimerConfigure +#else +#define MAP_TimerConfigure \ + TimerConfigure +#endif +#ifdef ROM_TimerControlLevel +#define MAP_TimerControlLevel \ + ROM_TimerControlLevel +#else +#define MAP_TimerControlLevel \ + TimerControlLevel +#endif +#ifdef ROM_TimerControlTrigger +#define MAP_TimerControlTrigger \ + ROM_TimerControlTrigger +#else +#define MAP_TimerControlTrigger \ + TimerControlTrigger +#endif +#ifdef ROM_TimerControlEvent +#define MAP_TimerControlEvent \ + ROM_TimerControlEvent +#else +#define MAP_TimerControlEvent \ + TimerControlEvent +#endif +#ifdef ROM_TimerControlStall +#define MAP_TimerControlStall \ + ROM_TimerControlStall +#else +#define MAP_TimerControlStall \ + TimerControlStall +#endif +#ifdef ROM_TimerRTCEnable +#define MAP_TimerRTCEnable \ + ROM_TimerRTCEnable +#else +#define MAP_TimerRTCEnable \ + TimerRTCEnable +#endif +#ifdef ROM_TimerRTCDisable +#define MAP_TimerRTCDisable \ + ROM_TimerRTCDisable +#else +#define MAP_TimerRTCDisable \ + TimerRTCDisable +#endif +#ifdef ROM_TimerPrescaleSet +#define MAP_TimerPrescaleSet \ + ROM_TimerPrescaleSet +#else +#define MAP_TimerPrescaleSet \ + TimerPrescaleSet +#endif +#ifdef ROM_TimerPrescaleGet +#define MAP_TimerPrescaleGet \ + ROM_TimerPrescaleGet +#else +#define MAP_TimerPrescaleGet \ + TimerPrescaleGet +#endif +#ifdef ROM_TimerPrescaleMatchSet +#define MAP_TimerPrescaleMatchSet \ + ROM_TimerPrescaleMatchSet +#else +#define MAP_TimerPrescaleMatchSet \ + TimerPrescaleMatchSet +#endif +#ifdef ROM_TimerPrescaleMatchGet +#define MAP_TimerPrescaleMatchGet \ + ROM_TimerPrescaleMatchGet +#else +#define MAP_TimerPrescaleMatchGet \ + TimerPrescaleMatchGet +#endif +#ifdef ROM_TimerLoadSet +#define MAP_TimerLoadSet \ + ROM_TimerLoadSet +#else +#define MAP_TimerLoadSet \ + TimerLoadSet +#endif +#ifdef ROM_TimerLoadGet +#define MAP_TimerLoadGet \ + ROM_TimerLoadGet +#else +#define MAP_TimerLoadGet \ + TimerLoadGet +#endif +#ifdef ROM_TimerValueGet +#define MAP_TimerValueGet \ + ROM_TimerValueGet +#else +#define MAP_TimerValueGet \ + TimerValueGet +#endif +#ifdef ROM_TimerMatchSet +#define MAP_TimerMatchSet \ + ROM_TimerMatchSet +#else +#define MAP_TimerMatchSet \ + TimerMatchSet +#endif +#ifdef ROM_TimerMatchGet +#define MAP_TimerMatchGet \ + ROM_TimerMatchGet +#else +#define MAP_TimerMatchGet \ + TimerMatchGet +#endif +#ifdef ROM_TimerIntEnable +#define MAP_TimerIntEnable \ + ROM_TimerIntEnable +#else +#define MAP_TimerIntEnable \ + TimerIntEnable +#endif +#ifdef ROM_TimerIntDisable +#define MAP_TimerIntDisable \ + ROM_TimerIntDisable +#else +#define MAP_TimerIntDisable \ + TimerIntDisable +#endif +#ifdef ROM_TimerIntStatus +#define MAP_TimerIntStatus \ + ROM_TimerIntStatus +#else +#define MAP_TimerIntStatus \ + TimerIntStatus +#endif +#ifdef ROM_TimerControlWaitOnTrigger +#define MAP_TimerControlWaitOnTrigger \ + ROM_TimerControlWaitOnTrigger +#else +#define MAP_TimerControlWaitOnTrigger \ + TimerControlWaitOnTrigger +#endif + +//***************************************************************************** +// +// Macros for the UART API. +// +//***************************************************************************** +#ifdef ROM_UARTCharPut +#define MAP_UARTCharPut \ + ROM_UARTCharPut +#else +#define MAP_UARTCharPut \ + UARTCharPut +#endif +#ifdef ROM_UARTParityModeSet +#define MAP_UARTParityModeSet \ + ROM_UARTParityModeSet +#else +#define MAP_UARTParityModeSet \ + UARTParityModeSet +#endif +#ifdef ROM_UARTParityModeGet +#define MAP_UARTParityModeGet \ + ROM_UARTParityModeGet +#else +#define MAP_UARTParityModeGet \ + UARTParityModeGet +#endif +#ifdef ROM_UARTFIFOLevelSet +#define MAP_UARTFIFOLevelSet \ + ROM_UARTFIFOLevelSet +#else +#define MAP_UARTFIFOLevelSet \ + UARTFIFOLevelSet +#endif +#ifdef ROM_UARTFIFOLevelGet +#define MAP_UARTFIFOLevelGet \ + ROM_UARTFIFOLevelGet +#else +#define MAP_UARTFIFOLevelGet \ + UARTFIFOLevelGet +#endif +#ifdef ROM_UARTConfigSetExpClk +#define MAP_UARTConfigSetExpClk \ + ROM_UARTConfigSetExpClk +#else +#define MAP_UARTConfigSetExpClk \ + UARTConfigSetExpClk +#endif +#ifdef ROM_UARTConfigGetExpClk +#define MAP_UARTConfigGetExpClk \ + ROM_UARTConfigGetExpClk +#else +#define MAP_UARTConfigGetExpClk \ + UARTConfigGetExpClk +#endif +#ifdef ROM_UARTEnable +#define MAP_UARTEnable \ + ROM_UARTEnable +#else +#define MAP_UARTEnable \ + UARTEnable +#endif +#ifdef ROM_UARTDisable +#define MAP_UARTDisable \ + ROM_UARTDisable +#else +#define MAP_UARTDisable \ + UARTDisable +#endif +#ifdef ROM_UARTEnableSIR +#define MAP_UARTEnableSIR \ + ROM_UARTEnableSIR +#else +#define MAP_UARTEnableSIR \ + UARTEnableSIR +#endif +#ifdef ROM_UARTDisableSIR +#define MAP_UARTDisableSIR \ + ROM_UARTDisableSIR +#else +#define MAP_UARTDisableSIR \ + UARTDisableSIR +#endif +#ifdef ROM_UARTCharsAvail +#define MAP_UARTCharsAvail \ + ROM_UARTCharsAvail +#else +#define MAP_UARTCharsAvail \ + UARTCharsAvail +#endif +#ifdef ROM_UARTSpaceAvail +#define MAP_UARTSpaceAvail \ + ROM_UARTSpaceAvail +#else +#define MAP_UARTSpaceAvail \ + UARTSpaceAvail +#endif +#ifdef ROM_UARTCharGetNonBlocking +#define MAP_UARTCharGetNonBlocking \ + ROM_UARTCharGetNonBlocking +#else +#define MAP_UARTCharGetNonBlocking \ + UARTCharGetNonBlocking +#endif +#ifdef ROM_UARTCharGet +#define MAP_UARTCharGet \ + ROM_UARTCharGet +#else +#define MAP_UARTCharGet \ + UARTCharGet +#endif +#ifdef ROM_UARTCharPutNonBlocking +#define MAP_UARTCharPutNonBlocking \ + ROM_UARTCharPutNonBlocking +#else +#define MAP_UARTCharPutNonBlocking \ + UARTCharPutNonBlocking +#endif +#ifdef ROM_UARTBreakCtl +#define MAP_UARTBreakCtl \ + ROM_UARTBreakCtl +#else +#define MAP_UARTBreakCtl \ + UARTBreakCtl +#endif +#ifdef ROM_UARTIntEnable +#define MAP_UARTIntEnable \ + ROM_UARTIntEnable +#else +#define MAP_UARTIntEnable \ + UARTIntEnable +#endif +#ifdef ROM_UARTIntDisable +#define MAP_UARTIntDisable \ + ROM_UARTIntDisable +#else +#define MAP_UARTIntDisable \ + UARTIntDisable +#endif +#ifdef ROM_UARTIntStatus +#define MAP_UARTIntStatus \ + ROM_UARTIntStatus +#else +#define MAP_UARTIntStatus \ + UARTIntStatus +#endif +#ifdef ROM_UARTIntClear +#define MAP_UARTIntClear \ + ROM_UARTIntClear +#else +#define MAP_UARTIntClear \ + UARTIntClear +#endif +#ifdef ROM_UARTDMAEnable +#define MAP_UARTDMAEnable \ + ROM_UARTDMAEnable +#else +#define MAP_UARTDMAEnable \ + UARTDMAEnable +#endif +#ifdef ROM_UARTDMADisable +#define MAP_UARTDMADisable \ + ROM_UARTDMADisable +#else +#define MAP_UARTDMADisable \ + UARTDMADisable +#endif +#ifdef ROM_UARTFIFOEnable +#define MAP_UARTFIFOEnable \ + ROM_UARTFIFOEnable +#else +#define MAP_UARTFIFOEnable \ + UARTFIFOEnable +#endif +#ifdef ROM_UARTFIFODisable +#define MAP_UARTFIFODisable \ + ROM_UARTFIFODisable +#else +#define MAP_UARTFIFODisable \ + UARTFIFODisable +#endif +#ifdef ROM_UARTBusy +#define MAP_UARTBusy \ + ROM_UARTBusy +#else +#define MAP_UARTBusy \ + UARTBusy +#endif +#ifdef ROM_UARTTxIntModeSet +#define MAP_UARTTxIntModeSet \ + ROM_UARTTxIntModeSet +#else +#define MAP_UARTTxIntModeSet \ + UARTTxIntModeSet +#endif +#ifdef ROM_UARTTxIntModeGet +#define MAP_UARTTxIntModeGet \ + ROM_UARTTxIntModeGet +#else +#define MAP_UARTTxIntModeGet \ + UARTTxIntModeGet +#endif +#ifdef ROM_UARTRxErrorGet +#define MAP_UARTRxErrorGet \ + ROM_UARTRxErrorGet +#else +#define MAP_UARTRxErrorGet \ + UARTRxErrorGet +#endif +#ifdef ROM_UARTRxErrorClear +#define MAP_UARTRxErrorClear \ + ROM_UARTRxErrorClear +#else +#define MAP_UARTRxErrorClear \ + UARTRxErrorClear +#endif + +//***************************************************************************** +// +// Macros for the uDMA API. +// +//***************************************************************************** +#ifdef ROM_uDMAChannelTransferSet +#define MAP_uDMAChannelTransferSet \ + ROM_uDMAChannelTransferSet +#else +#define MAP_uDMAChannelTransferSet \ + uDMAChannelTransferSet +#endif +#ifdef ROM_uDMAEnable +#define MAP_uDMAEnable \ + ROM_uDMAEnable +#else +#define MAP_uDMAEnable \ + uDMAEnable +#endif +#ifdef ROM_uDMADisable +#define MAP_uDMADisable \ + ROM_uDMADisable +#else +#define MAP_uDMADisable \ + uDMADisable +#endif +#ifdef ROM_uDMAErrorStatusGet +#define MAP_uDMAErrorStatusGet \ + ROM_uDMAErrorStatusGet +#else +#define MAP_uDMAErrorStatusGet \ + uDMAErrorStatusGet +#endif +#ifdef ROM_uDMAErrorStatusClear +#define MAP_uDMAErrorStatusClear \ + ROM_uDMAErrorStatusClear +#else +#define MAP_uDMAErrorStatusClear \ + uDMAErrorStatusClear +#endif +#ifdef ROM_uDMAChannelEnable +#define MAP_uDMAChannelEnable \ + ROM_uDMAChannelEnable +#else +#define MAP_uDMAChannelEnable \ + uDMAChannelEnable +#endif +#ifdef ROM_uDMAChannelDisable +#define MAP_uDMAChannelDisable \ + ROM_uDMAChannelDisable +#else +#define MAP_uDMAChannelDisable \ + uDMAChannelDisable +#endif +#ifdef ROM_uDMAChannelIsEnabled +#define MAP_uDMAChannelIsEnabled \ + ROM_uDMAChannelIsEnabled +#else +#define MAP_uDMAChannelIsEnabled \ + uDMAChannelIsEnabled +#endif +#ifdef ROM_uDMAControlBaseSet +#define MAP_uDMAControlBaseSet \ + ROM_uDMAControlBaseSet +#else +#define MAP_uDMAControlBaseSet \ + uDMAControlBaseSet +#endif +#ifdef ROM_uDMAControlBaseGet +#define MAP_uDMAControlBaseGet \ + ROM_uDMAControlBaseGet +#else +#define MAP_uDMAControlBaseGet \ + uDMAControlBaseGet +#endif +#ifdef ROM_uDMAChannelRequest +#define MAP_uDMAChannelRequest \ + ROM_uDMAChannelRequest +#else +#define MAP_uDMAChannelRequest \ + uDMAChannelRequest +#endif +#ifdef ROM_uDMAChannelAttributeEnable +#define MAP_uDMAChannelAttributeEnable \ + ROM_uDMAChannelAttributeEnable +#else +#define MAP_uDMAChannelAttributeEnable \ + uDMAChannelAttributeEnable +#endif +#ifdef ROM_uDMAChannelAttributeDisable +#define MAP_uDMAChannelAttributeDisable \ + ROM_uDMAChannelAttributeDisable +#else +#define MAP_uDMAChannelAttributeDisable \ + uDMAChannelAttributeDisable +#endif +#ifdef ROM_uDMAChannelAttributeGet +#define MAP_uDMAChannelAttributeGet \ + ROM_uDMAChannelAttributeGet +#else +#define MAP_uDMAChannelAttributeGet \ + uDMAChannelAttributeGet +#endif +#ifdef ROM_uDMAChannelControlSet +#define MAP_uDMAChannelControlSet \ + ROM_uDMAChannelControlSet +#else +#define MAP_uDMAChannelControlSet \ + uDMAChannelControlSet +#endif +#ifdef ROM_uDMAChannelSizeGet +#define MAP_uDMAChannelSizeGet \ + ROM_uDMAChannelSizeGet +#else +#define MAP_uDMAChannelSizeGet \ + uDMAChannelSizeGet +#endif +#ifdef ROM_uDMAChannelModeGet +#define MAP_uDMAChannelModeGet \ + ROM_uDMAChannelModeGet +#else +#define MAP_uDMAChannelModeGet \ + uDMAChannelModeGet +#endif +#ifdef ROM_uDMAChannelSelectSecondary +#define MAP_uDMAChannelSelectSecondary \ + ROM_uDMAChannelSelectSecondary +#else +#define MAP_uDMAChannelSelectSecondary \ + uDMAChannelSelectSecondary +#endif +#ifdef ROM_uDMAChannelSelectDefault +#define MAP_uDMAChannelSelectDefault \ + ROM_uDMAChannelSelectDefault +#else +#define MAP_uDMAChannelSelectDefault \ + uDMAChannelSelectDefault +#endif + +//***************************************************************************** +// +// Macros for the USB API. +// +//***************************************************************************** +#ifdef ROM_USBIntStatus +#define MAP_USBIntStatus \ + ROM_USBIntStatus +#else +#define MAP_USBIntStatus \ + USBIntStatus +#endif +#ifdef ROM_USBDevAddrGet +#define MAP_USBDevAddrGet \ + ROM_USBDevAddrGet +#else +#define MAP_USBDevAddrGet \ + USBDevAddrGet +#endif +#ifdef ROM_USBDevAddrSet +#define MAP_USBDevAddrSet \ + ROM_USBDevAddrSet +#else +#define MAP_USBDevAddrSet \ + USBDevAddrSet +#endif +#ifdef ROM_USBDevConnect +#define MAP_USBDevConnect \ + ROM_USBDevConnect +#else +#define MAP_USBDevConnect \ + USBDevConnect +#endif +#ifdef ROM_USBDevDisconnect +#define MAP_USBDevDisconnect \ + ROM_USBDevDisconnect +#else +#define MAP_USBDevDisconnect \ + USBDevDisconnect +#endif +#ifdef ROM_USBDevEndpointConfigSet +#define MAP_USBDevEndpointConfigSet \ + ROM_USBDevEndpointConfigSet +#else +#define MAP_USBDevEndpointConfigSet \ + USBDevEndpointConfigSet +#endif +#ifdef ROM_USBDevEndpointDataAck +#define MAP_USBDevEndpointDataAck \ + ROM_USBDevEndpointDataAck +#else +#define MAP_USBDevEndpointDataAck \ + USBDevEndpointDataAck +#endif +#ifdef ROM_USBDevEndpointStall +#define MAP_USBDevEndpointStall \ + ROM_USBDevEndpointStall +#else +#define MAP_USBDevEndpointStall \ + USBDevEndpointStall +#endif +#ifdef ROM_USBDevEndpointStatusClear +#define MAP_USBDevEndpointStatusClear \ + ROM_USBDevEndpointStatusClear +#else +#define MAP_USBDevEndpointStatusClear \ + USBDevEndpointStatusClear +#endif +#ifdef ROM_USBEndpointDataGet +#define MAP_USBEndpointDataGet \ + ROM_USBEndpointDataGet +#else +#define MAP_USBEndpointDataGet \ + USBEndpointDataGet +#endif +#ifdef ROM_USBEndpointDataPut +#define MAP_USBEndpointDataPut \ + ROM_USBEndpointDataPut +#else +#define MAP_USBEndpointDataPut \ + USBEndpointDataPut +#endif +#ifdef ROM_USBEndpointDataSend +#define MAP_USBEndpointDataSend \ + ROM_USBEndpointDataSend +#else +#define MAP_USBEndpointDataSend \ + USBEndpointDataSend +#endif +#ifdef ROM_USBEndpointDataToggleClear +#define MAP_USBEndpointDataToggleClear \ + ROM_USBEndpointDataToggleClear +#else +#define MAP_USBEndpointDataToggleClear \ + USBEndpointDataToggleClear +#endif +#ifdef ROM_USBEndpointStatus +#define MAP_USBEndpointStatus \ + ROM_USBEndpointStatus +#else +#define MAP_USBEndpointStatus \ + USBEndpointStatus +#endif +#ifdef ROM_USBFIFOAddrGet +#define MAP_USBFIFOAddrGet \ + ROM_USBFIFOAddrGet +#else +#define MAP_USBFIFOAddrGet \ + USBFIFOAddrGet +#endif +#ifdef ROM_USBFIFOConfigGet +#define MAP_USBFIFOConfigGet \ + ROM_USBFIFOConfigGet +#else +#define MAP_USBFIFOConfigGet \ + USBFIFOConfigGet +#endif +#ifdef ROM_USBFIFOConfigSet +#define MAP_USBFIFOConfigSet \ + ROM_USBFIFOConfigSet +#else +#define MAP_USBFIFOConfigSet \ + USBFIFOConfigSet +#endif +#ifdef ROM_USBFrameNumberGet +#define MAP_USBFrameNumberGet \ + ROM_USBFrameNumberGet +#else +#define MAP_USBFrameNumberGet \ + USBFrameNumberGet +#endif +#ifdef ROM_USBHostAddrGet +#define MAP_USBHostAddrGet \ + ROM_USBHostAddrGet +#else +#define MAP_USBHostAddrGet \ + USBHostAddrGet +#endif +#ifdef ROM_USBHostAddrSet +#define MAP_USBHostAddrSet \ + ROM_USBHostAddrSet +#else +#define MAP_USBHostAddrSet \ + USBHostAddrSet +#endif +#ifdef ROM_USBHostEndpointConfig +#define MAP_USBHostEndpointConfig \ + ROM_USBHostEndpointConfig +#else +#define MAP_USBHostEndpointConfig \ + USBHostEndpointConfig +#endif +#ifdef ROM_USBHostEndpointDataAck +#define MAP_USBHostEndpointDataAck \ + ROM_USBHostEndpointDataAck +#else +#define MAP_USBHostEndpointDataAck \ + USBHostEndpointDataAck +#endif +#ifdef ROM_USBHostEndpointDataToggle +#define MAP_USBHostEndpointDataToggle \ + ROM_USBHostEndpointDataToggle +#else +#define MAP_USBHostEndpointDataToggle \ + USBHostEndpointDataToggle +#endif +#ifdef ROM_USBHostEndpointStatusClear +#define MAP_USBHostEndpointStatusClear \ + ROM_USBHostEndpointStatusClear +#else +#define MAP_USBHostEndpointStatusClear \ + USBHostEndpointStatusClear +#endif +#ifdef ROM_USBHostHubAddrGet +#define MAP_USBHostHubAddrGet \ + ROM_USBHostHubAddrGet +#else +#define MAP_USBHostHubAddrGet \ + USBHostHubAddrGet +#endif +#ifdef ROM_USBHostHubAddrSet +#define MAP_USBHostHubAddrSet \ + ROM_USBHostHubAddrSet +#else +#define MAP_USBHostHubAddrSet \ + USBHostHubAddrSet +#endif +#ifdef ROM_USBHostPwrDisable +#define MAP_USBHostPwrDisable \ + ROM_USBHostPwrDisable +#else +#define MAP_USBHostPwrDisable \ + USBHostPwrDisable +#endif +#ifdef ROM_USBHostPwrEnable +#define MAP_USBHostPwrEnable \ + ROM_USBHostPwrEnable +#else +#define MAP_USBHostPwrEnable \ + USBHostPwrEnable +#endif +#ifdef ROM_USBHostPwrConfig +#define MAP_USBHostPwrConfig \ + ROM_USBHostPwrConfig +#else +#define MAP_USBHostPwrConfig \ + USBHostPwrConfig +#endif +#ifdef ROM_USBHostPwrFaultDisable +#define MAP_USBHostPwrFaultDisable \ + ROM_USBHostPwrFaultDisable +#else +#define MAP_USBHostPwrFaultDisable \ + USBHostPwrFaultDisable +#endif +#ifdef ROM_USBHostPwrFaultEnable +#define MAP_USBHostPwrFaultEnable \ + ROM_USBHostPwrFaultEnable +#else +#define MAP_USBHostPwrFaultEnable \ + USBHostPwrFaultEnable +#endif +#ifdef ROM_USBHostRequestIN +#define MAP_USBHostRequestIN \ + ROM_USBHostRequestIN +#else +#define MAP_USBHostRequestIN \ + USBHostRequestIN +#endif +#ifdef ROM_USBHostRequestStatus +#define MAP_USBHostRequestStatus \ + ROM_USBHostRequestStatus +#else +#define MAP_USBHostRequestStatus \ + USBHostRequestStatus +#endif +#ifdef ROM_USBHostReset +#define MAP_USBHostReset \ + ROM_USBHostReset +#else +#define MAP_USBHostReset \ + USBHostReset +#endif +#ifdef ROM_USBHostResume +#define MAP_USBHostResume \ + ROM_USBHostResume +#else +#define MAP_USBHostResume \ + USBHostResume +#endif +#ifdef ROM_USBHostSpeedGet +#define MAP_USBHostSpeedGet \ + ROM_USBHostSpeedGet +#else +#define MAP_USBHostSpeedGet \ + USBHostSpeedGet +#endif +#ifdef ROM_USBHostSuspend +#define MAP_USBHostSuspend \ + ROM_USBHostSuspend +#else +#define MAP_USBHostSuspend \ + USBHostSuspend +#endif +#ifdef ROM_USBIntDisable +#define MAP_USBIntDisable \ + ROM_USBIntDisable +#else +#define MAP_USBIntDisable \ + USBIntDisable +#endif +#ifdef ROM_USBIntEnable +#define MAP_USBIntEnable \ + ROM_USBIntEnable +#else +#define MAP_USBIntEnable \ + USBIntEnable +#endif +#ifdef ROM_USBDevEndpointConfigGet +#define MAP_USBDevEndpointConfigGet \ + ROM_USBDevEndpointConfigGet +#else +#define MAP_USBDevEndpointConfigGet \ + USBDevEndpointConfigGet +#endif +#ifdef ROM_USBEndpointDataAvail +#define MAP_USBEndpointDataAvail \ + ROM_USBEndpointDataAvail +#else +#define MAP_USBEndpointDataAvail \ + USBEndpointDataAvail +#endif +#ifdef ROM_USBOTGHostRequest +#define MAP_USBOTGHostRequest \ + ROM_USBOTGHostRequest +#else +#define MAP_USBOTGHostRequest \ + USBOTGHostRequest +#endif +#ifdef ROM_USBModeGet +#define MAP_USBModeGet \ + ROM_USBModeGet +#else +#define MAP_USBModeGet \ + USBModeGet +#endif +#ifdef ROM_USBEndpointDMAChannel +#define MAP_USBEndpointDMAChannel \ + ROM_USBEndpointDMAChannel +#else +#define MAP_USBEndpointDMAChannel \ + USBEndpointDMAChannel +#endif +#ifdef ROM_USBIntDisableControl +#define MAP_USBIntDisableControl \ + ROM_USBIntDisableControl +#else +#define MAP_USBIntDisableControl \ + USBIntDisableControl +#endif +#ifdef ROM_USBIntEnableControl +#define MAP_USBIntEnableControl \ + ROM_USBIntEnableControl +#else +#define MAP_USBIntEnableControl \ + USBIntEnableControl +#endif +#ifdef ROM_USBIntStatusControl +#define MAP_USBIntStatusControl \ + ROM_USBIntStatusControl +#else +#define MAP_USBIntStatusControl \ + USBIntStatusControl +#endif +#ifdef ROM_USBIntDisableEndpoint +#define MAP_USBIntDisableEndpoint \ + ROM_USBIntDisableEndpoint +#else +#define MAP_USBIntDisableEndpoint \ + USBIntDisableEndpoint +#endif +#ifdef ROM_USBIntEnableEndpoint +#define MAP_USBIntEnableEndpoint \ + ROM_USBIntEnableEndpoint +#else +#define MAP_USBIntEnableEndpoint \ + USBIntEnableEndpoint +#endif +#ifdef ROM_USBIntStatusEndpoint +#define MAP_USBIntStatusEndpoint \ + ROM_USBIntStatusEndpoint +#else +#define MAP_USBIntStatusEndpoint \ + USBIntStatusEndpoint +#endif + +//***************************************************************************** +// +// Macros for the Watchdog API. +// +//***************************************************************************** +#ifdef ROM_WatchdogIntClear +#define MAP_WatchdogIntClear \ + ROM_WatchdogIntClear +#else +#define MAP_WatchdogIntClear \ + WatchdogIntClear +#endif +#ifdef ROM_WatchdogRunning +#define MAP_WatchdogRunning \ + ROM_WatchdogRunning +#else +#define MAP_WatchdogRunning \ + WatchdogRunning +#endif +#ifdef ROM_WatchdogEnable +#define MAP_WatchdogEnable \ + ROM_WatchdogEnable +#else +#define MAP_WatchdogEnable \ + WatchdogEnable +#endif +#ifdef ROM_WatchdogResetEnable +#define MAP_WatchdogResetEnable \ + ROM_WatchdogResetEnable +#else +#define MAP_WatchdogResetEnable \ + WatchdogResetEnable +#endif +#ifdef ROM_WatchdogResetDisable +#define MAP_WatchdogResetDisable \ + ROM_WatchdogResetDisable +#else +#define MAP_WatchdogResetDisable \ + WatchdogResetDisable +#endif +#ifdef ROM_WatchdogLock +#define MAP_WatchdogLock \ + ROM_WatchdogLock +#else +#define MAP_WatchdogLock \ + WatchdogLock +#endif +#ifdef ROM_WatchdogUnlock +#define MAP_WatchdogUnlock \ + ROM_WatchdogUnlock +#else +#define MAP_WatchdogUnlock \ + WatchdogUnlock +#endif +#ifdef ROM_WatchdogLockState +#define MAP_WatchdogLockState \ + ROM_WatchdogLockState +#else +#define MAP_WatchdogLockState \ + WatchdogLockState +#endif +#ifdef ROM_WatchdogReloadSet +#define MAP_WatchdogReloadSet \ + ROM_WatchdogReloadSet +#else +#define MAP_WatchdogReloadSet \ + WatchdogReloadSet +#endif +#ifdef ROM_WatchdogReloadGet +#define MAP_WatchdogReloadGet \ + ROM_WatchdogReloadGet +#else +#define MAP_WatchdogReloadGet \ + WatchdogReloadGet +#endif +#ifdef ROM_WatchdogValueGet +#define MAP_WatchdogValueGet \ + ROM_WatchdogValueGet +#else +#define MAP_WatchdogValueGet \ + WatchdogValueGet +#endif +#ifdef ROM_WatchdogIntEnable +#define MAP_WatchdogIntEnable \ + ROM_WatchdogIntEnable +#else +#define MAP_WatchdogIntEnable \ + WatchdogIntEnable +#endif +#ifdef ROM_WatchdogIntStatus +#define MAP_WatchdogIntStatus \ + ROM_WatchdogIntStatus +#else +#define MAP_WatchdogIntStatus \ + WatchdogIntStatus +#endif +#ifdef ROM_WatchdogStallEnable +#define MAP_WatchdogStallEnable \ + ROM_WatchdogStallEnable +#else +#define MAP_WatchdogStallEnable \ + WatchdogStallEnable +#endif +#ifdef ROM_WatchdogStallDisable +#define MAP_WatchdogStallDisable \ + ROM_WatchdogStallDisable +#else +#define MAP_WatchdogStallDisable \ + WatchdogStallDisable +#endif + +//***************************************************************************** +// +// Deprecated ROM functions. +// +//***************************************************************************** +#ifndef DEPRECATED +#define MAP_FlashIntGetStatus \ + MAP_FlashIntStatus +#define MAP_USBDevEndpointConfig \ + MAP_USBDevEndpointConfigSet +#define MAP_USBHostPwrFaultConfig \ + MAP_USBHostPwrConfig +#endif + +#endif // __ROM_MAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.c new file mode 100644 index 00000000..48923091 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.c @@ -0,0 +1,706 @@ +//***************************************************************************** +// +// ssi.c - Driver for Synchronous Serial Interface. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup ssi_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_ssi.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/ssi.h" + +//***************************************************************************** +// +//! Configures the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulSSIClk is the rate of the clock supplied to the SSI module. +//! \param ulProtocol specifies the data transfer protocol. +//! \param ulMode specifies the mode of operation. +//! \param ulBitRate specifies the clock rate. +//! \param ulDataWidth specifies number of bits transferred per frame. +//! +//! This function configures the synchronous serial interface. It sets +//! the SSI protocol, mode of operation, bit rate, and data width. +//! +//! The \e ulProtocol parameter defines the data frame format. The +//! \e ulProtocol parameter can be one of the following values: +//! \b SSI_FRF_MOTO_MODE_0, \b SSI_FRF_MOTO_MODE_1, \b SSI_FRF_MOTO_MODE_2, +//! \b SSI_FRF_MOTO_MODE_3, \b SSI_FRF_TI, or \b SSI_FRF_NMW. The Motorola +//! frame formats imply the following polarity and phase configurations: +//! +//!
+//! Polarity Phase       Mode
+//!   0       0   SSI_FRF_MOTO_MODE_0
+//!   0       1   SSI_FRF_MOTO_MODE_1
+//!   1       0   SSI_FRF_MOTO_MODE_2
+//!   1       1   SSI_FRF_MOTO_MODE_3
+//! 
+//! +//! The \e ulMode parameter defines the operating mode of the SSI module. The +//! SSI module can operate as a master or slave; if a slave, the SSI can be +//! configured to disable output on its serial output line. The \e ulMode +//! parameter can be one of the following values: \b SSI_MODE_MASTER, +//! \b SSI_MODE_SLAVE, or \b SSI_MODE_SLAVE_OD. +//! +//! The \e ulBitRate parameter defines the bit rate for the SSI. This bit rate +//! must satisfy the following clock ratio criteria: +//! +//! - FSSI >= 2 * bit rate (master mode) +//! - FSSI >= 12 * bit rate (slave modes) +//! +//! where FSSI is the frequency of the clock supplied to the SSI module. +//! +//! The \e ulDataWidth parameter defines the width of the data transfers, and +//! can be a value between 4 and 16, inclusive. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original SSIConfig() API and performs the same +//! actions. A macro is provided in ssi.h to map the original API to +//! this API. +//! +//! \return None. +// +//***************************************************************************** +void +SSIConfigSetExpClk(unsigned long ulBase, unsigned long ulSSIClk, + unsigned long ulProtocol, unsigned long ulMode, + unsigned long ulBitRate, unsigned long ulDataWidth) +{ + unsigned long ulMaxBitRate; + unsigned long ulRegVal; + unsigned long ulPreDiv; + unsigned long ulSCR; + unsigned long ulSPH_SPO; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulProtocol == SSI_FRF_MOTO_MODE_0) || + (ulProtocol == SSI_FRF_MOTO_MODE_1) || + (ulProtocol == SSI_FRF_MOTO_MODE_2) || + (ulProtocol == SSI_FRF_MOTO_MODE_3) || + (ulProtocol == SSI_FRF_TI) || + (ulProtocol == SSI_FRF_NMW)); + ASSERT((ulMode == SSI_MODE_MASTER) || + (ulMode == SSI_MODE_SLAVE) || + (ulMode == SSI_MODE_SLAVE_OD)); + ASSERT(((ulMode == SSI_MODE_MASTER) && (ulBitRate <= (ulSSIClk / 2))) || + ((ulMode != SSI_MODE_MASTER) && (ulBitRate <= (ulSSIClk / 12)))); + ASSERT((ulSSIClk / ulBitRate) <= (254 * 256)); + ASSERT((ulDataWidth >= 4) && (ulDataWidth <= 16)); + + // + // Set the mode. + // + ulRegVal = (ulMode == SSI_MODE_SLAVE_OD) ? SSI_CR1_SOD : 0; + ulRegVal |= (ulMode == SSI_MODE_MASTER) ? 0 : SSI_CR1_MS; + HWREG(ulBase + SSI_O_CR1) = ulRegVal; + + // + // Set the clock predivider. + // + ulMaxBitRate = ulSSIClk / ulBitRate; + ulPreDiv = 0; + do + { + ulPreDiv += 2; + ulSCR = (ulMaxBitRate / ulPreDiv) - 1; + } + while(ulSCR > 255); + HWREG(ulBase + SSI_O_CPSR) = ulPreDiv; + + // + // Set protocol and clock rate. + // + ulSPH_SPO = (ulProtocol & 3) << 6; + ulProtocol &= SSI_CR0_FRF_M; + ulRegVal = (ulSCR << 8) | ulSPH_SPO | ulProtocol | (ulDataWidth - 1); + HWREG(ulBase + SSI_O_CR0) = ulRegVal; +} + +//***************************************************************************** +// +//! Enables the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function enables operation of the synchronous serial interface. The +//! synchronous serial interface must be configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +SSIEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + SSI_O_CR1) |= SSI_CR1_SSE; +} + +//***************************************************************************** +// +//! Disables the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function disables operation of the synchronous serial interface. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + SSI_O_CR1) &= ~(SSI_CR1_SSE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! synchronous serial interface interrupt occurs. +//! +//! This sets the handler to be called when an SSI interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific SSI interrupts must be enabled via SSIIntEnable(). If necessary, +//! it is the interrupt handler's responsibility to clear the interrupt source +//! via SSIIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine the interrupt number based on the SSI port. + // + ulInt = (ulBase == SSI0_BASE) ? INT_SSI0 : INT_SSI1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the synchronous serial interface interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function will clear the handler to be called when a SSI +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine the interrupt number based on the SSI port. + // + ulInt = (ulBase == SSI0_BASE) ? INT_SSI0 : INT_SSI1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated SSI interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. The \e ulIntFlags parameter can be any of the +//! \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, or \b SSI_RXOR values. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + SSI_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated SSI interrupt sources. The \e ulIntFlags parameter +//! can be any of the \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, or \b SSI_RXOR +//! values. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + SSI_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase specifies the SSI module base address. +//! \param bMasked is \b false if the raw interrupt status is required or +//! \b true if the masked interrupt status is required. +//! +//! This function returns the interrupt status for the SSI module. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, and \b SSI_RXOR. +// +//***************************************************************************** +unsigned long +SSIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + SSI_O_MIS)); + } + else + { + return(HWREG(ulBase + SSI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified SSI interrupt sources are cleared so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupts from being recognized again immediately upon exit. The +//! \e ulIntFlags parameter can consist of either or both the \b SSI_RXTO and +//! \b SSI_RXOR values. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + SSI_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Puts a data element into the SSI transmit FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulData is the data to be transmitted over the SSI interface. +//! +//! This function places the supplied data into the transmit FIFO of the +//! specified SSI module. +//! +//! \note The upper 32 - N bits of the \e ulData are discarded by the hardware, +//! where N is the data width as configured by SSIConfigSetExpClk(). For +//! example, if the interface is configured for 8-bit data width, the upper 24 +//! bits of \e ulData are discarded. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDataPut(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulData & (0xfffffffe << (HWREG(ulBase + SSI_O_CR0) & + SSI_CR0_DSS_M))) == 0); + + // + // Wait until there is space. + // + while(!(HWREG(ulBase + SSI_O_SR) & SSI_SR_TNF)) + { + } + + // + // Write the data to the SSI. + // + HWREG(ulBase + SSI_O_DR) = ulData; +} + +//***************************************************************************** +// +//! Puts a data element into the SSI transmit FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulData is the data to be transmitted over the SSI interface. +//! +//! This function places the supplied data into the transmit FIFO of the +//! specified SSI module. If there is no space in the FIFO, then this function +//! returns a zero. +//! +//! This function replaces the original SSIDataNonBlockingPut() API and +//! performs the same actions. A macro is provided in ssi.h to map +//! the original API to this API. +//! +//! \note The upper 32 - N bits of the \e ulData are discarded by the hardware, +//! where N is the data width as configured by SSIConfigSetExpClk(). For +//! example, if the interface is configured for 8-bit data width, the upper 24 +//! bits of \e ulData are discarded. +//! +//! \return Returns the number of elements written to the SSI transmit FIFO. +// +//***************************************************************************** +long +SSIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulData & (0xfffffffe << (HWREG(ulBase + SSI_O_CR0) & + SSI_CR0_DSS_M))) == 0); + + // + // Check for space to write. + // + if(HWREG(ulBase + SSI_O_SR) & SSI_SR_TNF) + { + HWREG(ulBase + SSI_O_DR) = ulData; + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Gets a data element from the SSI receive FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pulData is a pointer to a storage location for data that was +//! received over the SSI interface. +//! +//! This function gets received data from the receive FIFO of the specified +//! SSI module and places that data into the location specified by the +//! \e pulData parameter. +//! +//! \note Only the lower N bits of the value written to \e pulData contain +//! valid data, where N is the data width as configured by +//! SSIConfigSetExpClk(). For example, if the interface is configured for +//! 8-bit data width, only the lower 8 bits of the value written to \e pulData +//! contain valid data. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDataGet(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Wait until there is data to be read. + // + while(!(HWREG(ulBase + SSI_O_SR) & SSI_SR_RNE)) + { + } + + // + // Read data from SSI. + // + *pulData = HWREG(ulBase + SSI_O_DR); +} + +//***************************************************************************** +// +//! Gets a data element from the SSI receive FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pulData is a pointer to a storage location for data that was +//! received over the SSI interface. +//! +//! This function gets received data from the receive FIFO of the specified SSI +//! module and places that data into the location specified by the \e ulData +//! parameter. If there is no data in the FIFO, then this function returns a +//! zero. +//! +//! This function replaces the original SSIDataNonBlockingGet() API and +//! performs the same actions. A macro is provided in ssi.h to map +//! the original API to this API. +//! +//! \note Only the lower N bits of the value written to \e pulData contain +//! valid data, where N is the data width as configured by +//! SSIConfigSetExpClk(). For example, if the interface is configured for +//! 8-bit data width, only the lower 8 bits of the value written to \e pulData +//! contain valid data. +//! +//! \return Returns the number of elements read from the SSI receive FIFO. +// +//***************************************************************************** +long +SSIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Check for data to read. + // + if(HWREG(ulBase + SSI_O_SR) & SSI_SR_RNE) + { + *pulData = HWREG(ulBase + SSI_O_DR); + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Enable SSI DMA operation. +//! +//! \param ulBase is the base address of the SSI port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified SSI DMA features are enabled. The SSI can be +//! configured to use DMA for transmit and/or receive data transfers. +//! The \e ulDMAFlags parameter is the logical OR of any of the following +//! values: +//! +//! - SSI_DMA_RX - enable DMA for receive +//! - SSI_DMA_TX - enable DMA for transmit +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the SSI. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + SSI_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable SSI DMA operation. +//! +//! \param ulBase is the base address of the SSI port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable SSI DMA features that were enabled +//! by SSIDMAEnable(). The specified SSI DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - SSI_DMA_RX - disable DMA for receive +//! - SSI_DMA_TX - disable DMA for transmit +//! +//! \return None. +// +//***************************************************************************** +void +SSIDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + SSI_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Determines whether the SSI transmitter is busy or not. +//! +//! \param ulBase is the base address of the SSI port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, then the transmit FIFO +//! is empty and all bits of the last transmitted word have left the hardware +//! shift register. +//! +//! \return Returns \b true if the SSI is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +SSIBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine if the SSI is busy. + // + return((HWREG(ulBase + SSI_O_SR) & SSI_SR_BSY) ? true : false); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.h new file mode 100644 index 00000000..7970bdda --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/ssi.h @@ -0,0 +1,125 @@ +//***************************************************************************** +// +// ssi.h - Prototypes for the Synchronous Serial Interface Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SSI_H__ +#define __SSI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to SSIIntEnable, SSIIntDisable, and SSIIntClear +// as the ulIntFlags parameter, and returned by SSIIntStatus. +// +//***************************************************************************** +#define SSI_TXFF 0x00000008 // TX FIFO half full or less +#define SSI_RXFF 0x00000004 // RX FIFO half full or more +#define SSI_RXTO 0x00000002 // RX timeout +#define SSI_RXOR 0x00000001 // RX overrun + +//***************************************************************************** +// +// Values that can be passed to SSIConfigSetExpClk. +// +//***************************************************************************** +#define SSI_FRF_MOTO_MODE_0 0x00000000 // Moto fmt, polarity 0, phase 0 +#define SSI_FRF_MOTO_MODE_1 0x00000002 // Moto fmt, polarity 0, phase 1 +#define SSI_FRF_MOTO_MODE_2 0x00000001 // Moto fmt, polarity 1, phase 0 +#define SSI_FRF_MOTO_MODE_3 0x00000003 // Moto fmt, polarity 1, phase 1 +#define SSI_FRF_TI 0x00000010 // TI frame format +#define SSI_FRF_NMW 0x00000020 // National MicroWire frame format + +#define SSI_MODE_MASTER 0x00000000 // SSI master +#define SSI_MODE_SLAVE 0x00000001 // SSI slave +#define SSI_MODE_SLAVE_OD 0x00000002 // SSI slave with output disabled + +//***************************************************************************** +// +// Values that can be passed to SSIDMAEnable() and SSIDMADisable(). +// +//***************************************************************************** +#define SSI_DMA_TX 0x00000002 // Enable DMA for transmit +#define SSI_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void SSIConfigSetExpClk(unsigned long ulBase, unsigned long ulSSIClk, + unsigned long ulProtocol, unsigned long ulMode, + unsigned long ulBitRate, + unsigned long ulDataWidth); +extern void SSIDataGet(unsigned long ulBase, unsigned long *pulData); +extern long SSIDataGetNonBlocking(unsigned long ulBase, + unsigned long *pulData); +extern void SSIDataPut(unsigned long ulBase, unsigned long ulData); +extern long SSIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData); +extern void SSIDisable(unsigned long ulBase); +extern void SSIEnable(unsigned long ulBase); +extern void SSIIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern unsigned long SSIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void SSIIntUnregister(unsigned long ulBase); +extern void SSIDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void SSIDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern tBoolean SSIBusy(unsigned long ulBase); + +//***************************************************************************** +// +// Several SSI APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define SSIConfig(a, b, c, d, e) \ + SSIConfigSetExpClk(a, SysCtlClockGet(), b, c, d, e) +#define SSIDataNonBlockingGet(a, b) \ + SSIDataGetNonBlocking(a, b) +#define SSIDataNonBlockingPut(a, b) \ + SSIDataPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SSI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.c new file mode 100644 index 00000000..e0023a9d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.c @@ -0,0 +1,2366 @@ +//***************************************************************************** +// +// sysctl.c - Driver for the system controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup sysctl_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/cpu.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// This macro extracts the array index out of the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_INDEX(a) (((a) >> 28) & 0xf) + +//***************************************************************************** +// +// This macro constructs the peripheral bit mask from the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_MASK(a) (((a) & 0xffff) << (((a) & 0x001f0000) >> 16)) + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL DC? register that +// contains the peripheral present bit for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCRegs[] = +{ + SYSCTL_DC1, + SYSCTL_DC2, + SYSCTL_DC4, + SYSCTL_DC1 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SRCR? register that +// controls the software reset for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSRCRRegs[] = +{ + SYSCTL_SRCR0, + SYSCTL_SRCR1, + SYSCTL_SRCR2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_RCGC? register that +// controls the run-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulRCGCRegs[] = +{ + SYSCTL_RCGC0, + SYSCTL_RCGC1, + SYSCTL_RCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SCGC? register that +// controls the sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSCGCRegs[] = +{ + SYSCTL_SCGC0, + SYSCTL_SCGC1, + SYSCTL_SCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_DCGC? register that +// controls the deep-sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCGCRegs[] = +{ + SYSCTL_DCGC0, + SYSCTL_DCGC1, + SYSCTL_DCGC2 +}; + +//***************************************************************************** +// +// An array that maps the crystal number in RCC to a frequency. +// +//***************************************************************************** +static const unsigned long g_pulXtals[] = +{ + 1000000, + 1843200, + 2000000, + 2457600, + 3579545, + 3686400, + 4000000, + 4096000, + 4915200, + 5000000, + 5120000, + 6000000, + 6144000, + 7372800, + 8000000, + 8192000, + 10000000, + 12000000, + 12288000, + 13560000, + 14318180, + 16000000, + 16384000 +}; + +//***************************************************************************** +// +//! \internal +//! Checks a peripheral identifier. +//! +//! \param ulPeripheral is the peripheral identifier. +//! +//! This function determines if a peripheral identifier is valid. +//! +//! \return Returns \b true if the peripheral identifier is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +SysCtlPeripheralValid(unsigned long ulPeripheral) +{ + return((ulPeripheral == SYSCTL_PERIPH_ADC0) || + (ulPeripheral == SYSCTL_PERIPH_ADC1) || + (ulPeripheral == SYSCTL_PERIPH_CAN0) || + (ulPeripheral == SYSCTL_PERIPH_CAN1) || + (ulPeripheral == SYSCTL_PERIPH_CAN2) || + (ulPeripheral == SYSCTL_PERIPH_COMP0) || + (ulPeripheral == SYSCTL_PERIPH_COMP1) || + (ulPeripheral == SYSCTL_PERIPH_COMP2) || + (ulPeripheral == SYSCTL_PERIPH_EPI0) || + (ulPeripheral == SYSCTL_PERIPH_ETH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOJ) || + (ulPeripheral == SYSCTL_PERIPH_HIBERNATE) || + (ulPeripheral == SYSCTL_PERIPH_I2C0) || + (ulPeripheral == SYSCTL_PERIPH_I2C1) || + (ulPeripheral == SYSCTL_PERIPH_I2S0) || + (ulPeripheral == SYSCTL_PERIPH_IEEE1588) || + (ulPeripheral == SYSCTL_PERIPH_MPU) || + (ulPeripheral == SYSCTL_PERIPH_PLL) || + (ulPeripheral == SYSCTL_PERIPH_PWM) || + (ulPeripheral == SYSCTL_PERIPH_QEI0) || + (ulPeripheral == SYSCTL_PERIPH_QEI1) || + (ulPeripheral == SYSCTL_PERIPH_SSI0) || + (ulPeripheral == SYSCTL_PERIPH_SSI1) || + (ulPeripheral == SYSCTL_PERIPH_TEMP) || + (ulPeripheral == SYSCTL_PERIPH_TIMER0) || + (ulPeripheral == SYSCTL_PERIPH_TIMER1) || + (ulPeripheral == SYSCTL_PERIPH_TIMER2) || + (ulPeripheral == SYSCTL_PERIPH_TIMER3) || + (ulPeripheral == SYSCTL_PERIPH_UART0) || + (ulPeripheral == SYSCTL_PERIPH_UART1) || + (ulPeripheral == SYSCTL_PERIPH_UART2) || + (ulPeripheral == SYSCTL_PERIPH_UDMA) || + (ulPeripheral == SYSCTL_PERIPH_USB0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG1)); +} +#endif + +//***************************************************************************** +// +//! Gets the size of the SRAM. +//! +//! This function determines the size of the SRAM on the Stellaris device. +//! +//! \return The total number of bytes of SRAM. +// +//***************************************************************************** +unsigned long +SysCtlSRAMSizeGet(void) +{ + // + // Compute the size of the SRAM. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_SRAMSZ_M) >> 8) + 0x100); +} + +//***************************************************************************** +// +//! Gets the size of the flash. +//! +//! This function determines the size of the flash on the Stellaris device. +//! +//! \return The total number of bytes of flash. +// +//***************************************************************************** +unsigned long +SysCtlFlashSizeGet(void) +{ + // + // Compute the size of the flash. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_M) << 11) + 0x800); +} + +//***************************************************************************** +// +//! Determines if a pin is present. +//! +//! \param ulPin is the pin in question. +//! +//! Determines if a particular pin is present in the device. The PWM, analog +//! comparators, ADC, and timers have a varying number of pins across members +//! of the Stellaris family; this will determine which are present on this +//! device. +//! +//! The \e ulPin argument must be only one of the following values: +//! \b SYSCTL_PIN_PWM0, \b SYSCTL_PIN_PWM1, \b SYSCTL_PIN_PWM2, +//! \b SYSCTL_PIN_PWM3, \b SYSCTL_PIN_PWM4, \b SYSCTL_PIN_PWM5, +//! \b SYSCTL_PIN_C0MINUS, \b SYSCTL_PIN_C0PLUS, \b SYSCTL_PIN_C0O, +//! \b SYSCTL_PIN_C1MINUS, \b SYSCTL_PIN_C1PLUS, \b SYSCTL_PIN_C1O, +//! \b SYSCTL_PIN_C2MINUS, \b SYSCTL_PIN_C2PLUS, \b SYSCTL_PIN_C2O, +//! \b SYSCTL_PIN_ADC0, \b SYSCTL_PIN_ADC1, \b SYSCTL_PIN_ADC2, +//! \b SYSCTL_PIN_ADC3, \b SYSCTL_PIN_ADC4, \b SYSCTL_PIN_ADC5, +//! \b SYSCTL_PIN_ADC6, \b SYSCTL_PIN_ADC7, \b SYSCTL_PIN_CCP0, +//! \b SYSCTL_PIN_CCP1, \b SYSCTL_PIN_CCP2, \b SYSCTL_PIN_CCP3, +//! \b SYSCTL_PIN_CCP4, \b SYSCTL_PIN_CCP5, \b SYSCTL_PIN_CCP6, +//! \b SYSCTL_PIN_CCP7, \b SYSCTL_PIN_32KHZ, or \b SYSCTL_PIN_MC_FAULT0. +//! +//! \return Returns \b true if the specified pin is present and \b false if it +//! is not. +// +//***************************************************************************** +tBoolean +SysCtlPinPresent(unsigned long ulPin) +{ + // + // Check the arguments. + // + ASSERT((ulPin == SYSCTL_PIN_PWM0) || + (ulPin == SYSCTL_PIN_PWM1) || + (ulPin == SYSCTL_PIN_PWM2) || + (ulPin == SYSCTL_PIN_PWM3) || + (ulPin == SYSCTL_PIN_PWM4) || + (ulPin == SYSCTL_PIN_PWM5) || + (ulPin == SYSCTL_PIN_C0MINUS) || + (ulPin == SYSCTL_PIN_C0PLUS) || + (ulPin == SYSCTL_PIN_C0O) || + (ulPin == SYSCTL_PIN_C1MINUS) || + (ulPin == SYSCTL_PIN_C1PLUS) || + (ulPin == SYSCTL_PIN_C1O) || + (ulPin == SYSCTL_PIN_C2MINUS) || + (ulPin == SYSCTL_PIN_C2PLUS) || + (ulPin == SYSCTL_PIN_C2O) || + (ulPin == SYSCTL_PIN_MC_FAULT0) || + (ulPin == SYSCTL_PIN_ADC0) || + (ulPin == SYSCTL_PIN_ADC1) || + (ulPin == SYSCTL_PIN_ADC2) || + (ulPin == SYSCTL_PIN_ADC3) || + (ulPin == SYSCTL_PIN_ADC4) || + (ulPin == SYSCTL_PIN_ADC5) || + (ulPin == SYSCTL_PIN_ADC6) || + (ulPin == SYSCTL_PIN_ADC7) || + (ulPin == SYSCTL_PIN_CCP0) || + (ulPin == SYSCTL_PIN_CCP1) || + (ulPin == SYSCTL_PIN_CCP2) || + (ulPin == SYSCTL_PIN_CCP3) || + (ulPin == SYSCTL_PIN_CCP4) || + (ulPin == SYSCTL_PIN_CCP5) || + (ulPin == SYSCTL_PIN_32KHZ)); + + // + // Determine if this pin is present. + // + if(HWREG(SYSCTL_DC3) & ulPin) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Determines if a peripheral is present. +//! +//! \param ulPeripheral is the peripheral in question. +//! +//! Determines if a particular peripheral is present in the device. Each +//! member of the Stellaris family has a different peripheral set; this will +//! determine which are present on this device. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_IEEE1588, +//! \b SYSCTL_PERIPH_MPU, \b SYSCTL_PERIPH_PLL, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return Returns \b true if the specified peripheral is present and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +SysCtlPeripheralPresent(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Read the correct DC register and determine if this peripheral exists. + // + if(ulPeripheral == SYSCTL_PERIPH_USB0) + { + // + // USB is a special case since the DC bit is missing for USB0. + // + if(HWREG(SYSCTL_DC6) & SYSCTL_DC6_USB0_M) + { + return(true); + } + else + { + return(false); + } + } + else if(HWREG(g_pulDCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) & + SYSCTL_PERIPH_MASK(ulPeripheral)) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Performs a software reset of a peripheral. +//! +//! \param ulPeripheral is the peripheral to reset. +//! +//! This function performs a software reset of the specified peripheral. An +//! individual peripheral reset signal is asserted for a brief period and then +//! deasserted, returning the internal state of the peripheral to its reset +//! condition. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralReset(unsigned long ulPeripheral) +{ + volatile unsigned long ulDelay; + + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Put the peripheral into the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); + + // + // Delay for a little bit. + // + for(ulDelay = 0; ulDelay < 16; ulDelay++) + { + } + + // + // Take the peripheral out of the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral. +//! +//! \param ulPeripheral is the peripheral to enable. +//! +//! Peripherals are enabled with this function. At power-up, all peripherals +//! are disabled; they must be enabled in order to operate or respond to +//! register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \note It takes five clock cycles after the write to enable a peripheral +//! before the the peripheral is actually enabled. During this time, attempts +//! to access the peripheral will result in a bus fault. Care should be taken +//! to ensure that the peripheral is not accessed during this brief time +//! period. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral. +//! +//! \param ulPeripheral is the peripheral to disable. +//! +//! Peripherals are disabled with this function. Once disabled, they will not +//! operate or respond to register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into sleep mode. Since the clocking configuration of the device does +//! not change, any peripheral can safely continue operating while the +//! processor is in sleep mode, and can therefore wake the processor from sleep +//! mode. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into sleep mode. Disabling peripherals while in sleep mode helps to lower +//! the current draw of the device. If enabled (via SysCtlPeripheralEnable()), +//! the peripheral will automatically resume operation when the processor +//! leaves sleep mode, maintaining its entire state from before sleep mode was +//! entered. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in deep-sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into deep-sleep mode. Since the clocking configuration of the device +//! may change, not all peripherals can safely continue operating while the +//! processor is in sleep mode. Those that must run at a particular frequency +//! (such as a UART) will not work as expected if the clock changes. It is the +//! responsibility of the caller to make sensible choices. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in deep-sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps +//! to lower the current draw of the device, and can keep peripherals that +//! require a particular clock frequency from operating when the clock changes +//! as a result of entering deep-sleep mode. If enabled (via +//! SysCtlPeripheralEnable()), the peripheral will automatically resume +//! operation when the processor leaves deep-sleep mode, maintaining its entire +//! state from before deep-sleep mode was entered. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Controls peripheral clock gating in sleep and deep-sleep mode. +//! +//! \param bEnable is a boolean that is \b true if the sleep and deep-sleep +//! peripheral configuration should be used and \b false if not. +//! +//! This function controls how peripherals are clocked when the processor goes +//! into sleep or deep-sleep mode. By default, the peripherals are clocked the +//! same as in run mode; if peripheral clock gating is enabled they are clocked +//! according to the configuration set by SysCtlPeripheralSleepEnable(), +//! SysCtlPeripheralSleepDisable(), SysCtlPeripheralDeepSleepEnable(), and +//! SysCtlPeripheralDeepSleepDisable(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralClockGating(tBoolean bEnable) +{ + // + // Enable peripheral clock gating as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_ACG; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_ACG); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the system control interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the system +//! control interrupt occurs. +//! +//! This sets the handler to be called when a system control interrupt occurs. +//! This will enable the global interrupt in the interrupt controller; specific +//! system control interrupts must be enabled via SysCtlIntEnable(). It is the +//! interrupt handler's responsibility to clear the interrupt source via +//! SysCtlIntClear(). +//! +//! System control can generate interrupts when the PLL achieves lock, if the +//! internal LDO current limit is exceeded, if the internal oscillator fails, +//! if the main oscillator fails, if the internal LDO output voltage droops too +//! much, if the external voltage droops too much, or if the PLL fails. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_SYSCTL, pfnHandler); + + // + // Enable the system control interrupt. + // + IntEnable(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the system control interrupt. +//! +//! This function will clear the handler to be called when a system control +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_SYSCTL); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Enables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be enabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Enables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntEnable(unsigned long ulInts) +{ + // + // Enable the specified interrupts. + // + HWREG(SYSCTL_IMC) |= ulInts; +} + +//***************************************************************************** +// +//! Disables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be disabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Disables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntDisable(unsigned long ulInts) +{ + // + // Disable the specified interrupts. + // + HWREG(SYSCTL_IMC) &= ~(ulInts); +} + +//***************************************************************************** +// +//! Clears system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be cleared. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! The specified system control interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntClear(unsigned long ulInts) +{ + // + // Clear the requested interrupt sources. + // + HWREG(SYSCTL_MISC) = ulInts; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the system controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, \b SYSCTL_INT_IOSC_FAIL, +//! \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, \b SYSCTL_INT_BOR, and +//! \b SYSCTL_INT_PLL_FAIL. +// +//***************************************************************************** +unsigned long +SysCtlIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(SYSCTL_MISC)); + } + else + { + return(HWREG(SYSCTL_RIS)); + } +} + +//***************************************************************************** +// +//! Sets the output voltage of the LDO. +//! +//! \param ulVoltage is the required output voltage from the LDO. Must be one +//! of \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +//! +//! This function sets the output voltage of the LDO. The default voltage is +//! 2.5 V; it can be adjusted +/- 10%. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOSet(unsigned long ulVoltage) +{ + // + // Check the arguments. + // + ASSERT((ulVoltage == SYSCTL_LDO_2_25V) || + (ulVoltage == SYSCTL_LDO_2_30V) || + (ulVoltage == SYSCTL_LDO_2_35V) || + (ulVoltage == SYSCTL_LDO_2_40V) || + (ulVoltage == SYSCTL_LDO_2_45V) || + (ulVoltage == SYSCTL_LDO_2_50V) || + (ulVoltage == SYSCTL_LDO_2_55V) || + (ulVoltage == SYSCTL_LDO_2_60V) || + (ulVoltage == SYSCTL_LDO_2_65V) || + (ulVoltage == SYSCTL_LDO_2_70V) || + (ulVoltage == SYSCTL_LDO_2_75V)); + + // + // Set the LDO voltage to the requested value. + // + HWREG(SYSCTL_LDOPCTL) = ulVoltage; +} + +//***************************************************************************** +// +//! Gets the output voltage of the LDO. +//! +//! This function determines the output voltage of the LDO, as specified by the +//! control register. +//! +//! \return Returns the current voltage of the LDO; will be one of +//! \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +// +//***************************************************************************** +unsigned long +SysCtlLDOGet(void) +{ + // + // Return the LDO voltage setting. + // + return(HWREG(SYSCTL_LDOPCTL)); +} + +//***************************************************************************** +// +//! Configures the LDO failure control. +//! +//! \param ulConfig is the required LDO failure control setting; can be either +//! \b SYSCTL_LDOCFG_ARST or \b SYSCTL_LDOCFG_NORST. +//! +//! This function allows the LDO to be configured to cause a processor reset +//! when the output voltage becomes unregulated. +//! +//! The LDO failure control is only available on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOConfigSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_LDOCFG_ARST) || + (ulConfig == SYSCTL_LDOCFG_NORST)); + + // + // Set the reset control as requested. + // + HWREG(SYSCTL_LDOARST) = ulConfig; +} + +//***************************************************************************** +// +//! Resets the device. +//! +//! This function will perform a software reset of the entire device. The +//! processor and all peripherals will be reset and all device registers will +//! return to their default values (with the exception of the reset cause +//! register, which will maintain its current value but have the software reset +//! bit set as well). +//! +//! \return This function does not return. +// +//***************************************************************************** +void +SysCtlReset(void) +{ + // + // Perform a software reset request. This will cause the device to reset, + // no further code will be executed. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ; + + // + // The device should have reset, so this should never be reached. Just in + // case, loop forever. + // + while(1) + { + } +} + +//***************************************************************************** +// +//! Puts the processor into sleep mode. +//! +//! This function places the processor into sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralSleepEnable() continue to operate and can wake up the +//! processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlSleep(void) +{ + // + // Wait for an interrupt. + // + CPUwfi(); +} + +//***************************************************************************** +// +//! Puts the processor into deep-sleep mode. +//! +//! This function places the processor into deep-sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralDeepSleepEnable() continue to operate and can wake up +//! the processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlDeepSleep(void) +{ + // + // Enable deep-sleep. + // + HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP; + + // + // Wait for an interrupt. + // + CPUwfi(); + + // + // Disable deep-sleep so that a future sleep will work correctly. + // + HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP); +} + +//***************************************************************************** +// +//! Gets the reason for a reset. +//! +//! This function will return the reason(s) for a reset. Since the reset +//! reasons are sticky until either cleared by software or an external reset, +//! multiple reset reasons may be returned if multiple resets have occurred. +//! The reset reason will be a logical OR of \b SYSCTL_CAUSE_LDO, +//! \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, \b SYSCTL_CAUSE_BOR, +//! \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! \return Returns the reason(s) for a reset. +// +//***************************************************************************** +unsigned long +SysCtlResetCauseGet(void) +{ + // + // Return the reset reasons. + // + return(HWREG(SYSCTL_RESC)); +} + +//***************************************************************************** +// +//! Clears reset reasons. +//! +//! \param ulCauses are the reset causes to be cleared; must be a logical OR of +//! \b SYSCTL_CAUSE_LDO, \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, +//! \b SYSCTL_CAUSE_BOR, \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! This function clears the specified sticky reset reasons. Once cleared, +//! another reset for the same reason can be detected, and a reset for a +//! different reason can be distinguished (instead of having two reset causes +//! set). If the reset reason is used by an application, all reset causes +//! should be cleared after they are retrieved with SysCtlResetCauseGet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlResetCauseClear(unsigned long ulCauses) +{ + // + // Clear the given reset reasons. + // + HWREG(SYSCTL_RESC) &= ~(ulCauses); +} + +//***************************************************************************** +// +//! Configures the brown-out control. +//! +//! \param ulConfig is the desired configuration of the brown-out control. +//! Must be the logical OR of \b SYSCTL_BOR_RESET and/or +//! \b SYSCTL_BOR_RESAMPLE. +//! \param ulDelay is the number of internal oscillator cycles to wait before +//! resampling an asserted brown-out signal. This value only has meaning when +//! \b SYSCTL_BOR_RESAMPLE is set and must be less than 8192. +//! +//! This function configures how the brown-out control operates. It can detect +//! a brown-out by looking at only the brown-out output, or it can wait for it +//! to be active for two consecutive samples separated by a configurable time. +//! When it detects a brown-out condition, it can either reset the device or +//! generate a processor interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) +{ + // + // Check the arguments. + // + ASSERT(!(ulConfig & ~(SYSCTL_BOR_RESET | SYSCTL_BOR_RESAMPLE))); + ASSERT(ulDelay < 8192); + + // + // Configure the brown-out reset control. + // + HWREG(SYSCTL_PBORCTL) = (ulDelay << SYSCTL_PBORCTL_BORTIM_S) | ulConfig; +} + +//***************************************************************************** +// +//! Provides a small delay. +//! +//! \param ulCount is the number of delay loop iterations to perform. +//! +//! This function provides a means of generating a constant length delay. It +//! is written in assembly to keep the delay consistent across tool chains, +//! avoiding the need to tune the delay based on the tool chain in use. +//! +//! The loop takes 3 cycles/loop. +//! +//! \return None. +// +//***************************************************************************** +#if defined(ewarm) || defined(DOXYGEN) +void +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +SysCtlDelay(unsigned long ulCount) +{ + subs r0, #1; + bne SysCtlDelay; + bx lr; +} +#endif +// +// For CCS implement this function in pure assembly. This prevents the TI +// compiler from doing funny things with the optimizer. +// +#if defined(ccs) + __asm(" .sect \".text:SysCtlDelay\"\n" + " .clink\n" + " .thumbfunc SysCtlDelay\n" + " .thumb\n" + " .global SysCtlDelay\n" + "SysCtlDelay:\n" + " subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr\n"); +#endif + + +//***************************************************************************** +// +//! Sets the clocking of the device. +//! +//! \param ulConfig is the required configuration of the device clocking. +//! +//! This function configures the clocking of the device. The input crystal +//! frequency, oscillator to be used, use of the PLL, and the system clock +//! divider are all configured with this function. +//! +//! The \e ulConfig parameter is the logical OR of several different values, +//! many of which are grouped into sets where only one can be chosen. +//! +//! The system clock divider is chosen with one of the following values: +//! \b SYSCTL_SYSDIV_1, \b SYSCTL_SYSDIV_2, \b SYSCTL_SYSDIV_3, ... +//! \b SYSCTL_SYSDIV_64. Only \b SYSCTL_SYSDIV_1 through \b SYSCTL_SYSDIV_16 +//! are valid on Sandstorm-class devices. +//! +//! The use of the PLL is chosen with either \b SYSCTL_USE_PLL or +//! \b SYSCTL_USE_OSC. +//! +//! The external crystal frequency is chosen with one of the following values: +//! \b SYSCTL_XTAL_1MHZ, \b SYSCTL_XTAL_1_84MHZ, \b SYSCTL_XTAL_2MHZ, +//! \b SYSCTL_XTAL_2_45MHZ, \b SYSCTL_XTAL_3_57MHZ, \b SYSCTL_XTAL_3_68MHZ, +//! \b SYSCTL_XTAL_4MHZ, \b SYSCTL_XTAL_4_09MHZ, \b SYSCTL_XTAL_4_91MHZ, +//! \b SYSCTL_XTAL_5MHZ, \b SYSCTL_XTAL_5_12MHZ, \b SYSCTL_XTAL_6MHZ, +//! \b SYSCTL_XTAL_6_14MHZ, \b SYSCTL_XTAL_7_37MHZ, \b SYSCTL_XTAL_8MHZ, +//! \b SYSCTL_XTAL_8_19MHZ, \b SYSCTL_XTAL_10MHZ, \b SYSCTL_XTAL_12MHZ, +//! \b SYSCTL_XTAL_12_2MHZ, \b SYSCTL_XTAL_13_5MHZ, \b SYSCTL_XTAL_14_3MHZ, +//! \b SYSCTL_XTAL_16MHZ, or \b SYSCTL_XTAL_16_3MHZ. Values below +//! \b SYSCTL_XTAL_3_57MHZ are not valid when the PLL is in operation. On +//! Sandstorm- and Fury-class devices, values above \b SYSCTL_XTAL_8_19MHZ are +//! not valid. +//! +//! The oscillator source is chosen with one of the following values: +//! \b SYSCTL_OSC_MAIN, \b SYSCTL_OSC_INT, \b SYSCTL_OSC_INT4, +//! \b SYSCTL_OSC_INT30, or \b SYSCTL_OSC_EXT32. On Sandstorm-class devices, +//! \b SYSCTL_OSC_INT30 and \b SYSCTL_OSC_EXT32 are not valid. +//! \b SYSCTL_OSC_EXT32 is only available on devices with the hibernate module, +//! and then only when the hibernate module has been enabled. +//! +//! The internal and main oscillators are disabled with the +//! \b SYSCTL_INT_OSC_DIS and \b SYSCTL_MAIN_OSC_DIS flags, respectively. +//! The external oscillator must be enabled in order to use an external clock +//! source. Note that attempts to disable the oscillator used to clock the +//! device will be prevented by the hardware. +//! +//! To clock the system from an external source (such as an external crystal +//! oscillator), use \b SYSCTL_USE_OSC \b | \b SYSCTL_OSC_MAIN. To clock the +//! system from the main oscillator, use \b SYSCTL_USE_OSC \b | +//! \b SYSCTL_OSC_MAIN. To clock the system from the PLL, use +//! \b SYSCTL_USE_PLL \b | \b SYSCTL_OSC_MAIN, and select the appropriate +//! crystal with one of the \b SYSCTL_XTAL_xxx values. +//! +//! \note If selecting the PLL as the system clock source (that is, via +//! \b SYSCTL_USE_PLL), this function will poll the PLL lock interrupt to +//! determine when the PLL has locked. If an interrupt handler for the +//! system control interrupt is in place, and it responds to and clears the +//! PLL lock interrupt, this function will delay until its timeout has occurred +//! instead of completing as soon as PLL lock is achieved. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClockSet(unsigned long ulConfig) +{ + unsigned long ulDelay, ulRCC, ulRCC2; + + // + // See if this is a Sandstorm-class device and clocking features from newer + // devices were requested. + // + if(CLASS_IS_SANDSTORM && (ulConfig & SYSCTL_RCC2_USERCC2)) + { + // + // Return without changing the clocking since the requested + // configuration can not be achieved. + // + return; + } + + // + // Get the current value of the RCC and RCC2 registers. If using a + // Sandstorm-class device, the RCC2 register will read back as zero and the + // writes to it from within this function will be ignored. + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Bypass the PLL and system clock dividers for now. + // + ulRCC |= SYSCTL_RCC_BYPASS; + ulRCC &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= SYSCTL_RCC2_BYPASS2; + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // See if either oscillator needs to be enabled. + // + if(((ulRCC & SYSCTL_RCC_IOSCDIS) && !(ulConfig & SYSCTL_RCC_IOSCDIS)) || + ((ulRCC & SYSCTL_RCC_MOSCDIS) && !(ulConfig & SYSCTL_RCC_MOSCDIS))) + { + // + // Make sure that the required oscillators are enabled. For now, the + // previously enabled oscillators must be enabled along with the newly + // requested oscillators. + // + ulRCC &= (~(SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS) | + (ulConfig & (SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS))); + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + + // + // Wait for a bit, giving the oscillator time to stabilize. The number + // of iterations is adjusted based on the current clock source; a + // smaller number of iterations is required for slower clock rates. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && + (((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_30) || + ((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_32))) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + ((ulRCC & SYSCTL_RCC_OSCSRC_M) == SYSCTL_RCC_OSCSRC_30))) + { + // + // Delay for 4096 iterations. + // + SysCtlDelay(4096); + } + else + { + // + // Delay for 524,288 iterations. + // + SysCtlDelay(524288); + } + } + + // + // Set the new crystal value, oscillator source, and PLL configuration. + // Since the OSCSRC2 field in RCC2 overlaps the XTAL field in RCC, the + // OSCSRC field has a special encoding within ulConfig to avoid the + // overlap. + // + ulRCC &= ~(SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC |= ulConfig & (SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC2 &= ~(SYSCTL_RCC2_USERCC2 | SYSCTL_RCC2_OSCSRC2_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_USERCC2 | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= (ulConfig & 0x00000008) << 3; + + // + // Clear the PLL lock interrupt. + // + HWREG(SYSCTL_MISC) = SYSCTL_INT_PLL_LOCK; + + // + // Write the new RCC value. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + HWREG(SYSCTL_RCC2) = ulRCC2; + HWREG(SYSCTL_RCC) = ulRCC; + } + else + { + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + } + + // + // Wait for a bit so that new crystal value and oscillator source can take + // effect. + // + SysCtlDelay(16); + + // + // Set the requested system divider and disable the appropriate + // oscillators. This will not get written immediately. + // + ulRCC &= ~(SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC |= ulConfig & (SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC2 &= ~(SYSCTL_RCC2_SYSDIV2_M); + ulRCC2 |= ulConfig & SYSCTL_RCC2_SYSDIV2_M; + if(ulConfig & SYSCTL_RCC2_DIV400) + { + ulRCC |= SYSCTL_RCC_USESYSDIV; + ulRCC2 &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_DIV400 | SYSCTL_RCC2_SYSDIV2LSB); + } + else + { + ulRCC2 &= ~(SYSCTL_RCC2_DIV400); + } + + // + // See if the PLL output is being used to clock the system. + // + if(!(ulConfig & SYSCTL_RCC_BYPASS)) + { + // + // Wait until the PLL has locked. + // + for(ulDelay = 32768; ulDelay > 0; ulDelay--) + { + if(HWREG(SYSCTL_RIS) & SYSCTL_INT_PLL_LOCK) + { + break; + } + } + + // + // Enable use of the PLL. + // + ulRCC &= ~(SYSCTL_RCC_BYPASS); + ulRCC2 &= ~(SYSCTL_RCC2_BYPASS2); + } + + // + // Write the final RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // Delay for a little bit so that the system divider takes effect. + // + SysCtlDelay(16); +} + +//***************************************************************************** +// +//! Gets the processor clock rate. +//! +//! This function determines the clock rate of the processor clock. This is +//! also the clock rate of all the peripheral modules (with the exception of +//! PWM, which has its own clock divider). +//! +//! \note This will not return accurate results if SysCtlClockSet() has not +//! been called to configure the clocking of the device, or if the device is +//! directly clocked from a crystal (or a clock source) that is not one of the +//! supported crystal frequencies. In the later case, this function should be +//! modified to directly return the correct system clock rate. +//! +//! \return The processor clock rate. +// +//***************************************************************************** +unsigned long +SysCtlClockGet(void) +{ + unsigned long ulRCC, ulRCC2, ulPLL, ulClk; + + // + // Read RCC and RCC2. For Sandstorm-class devices (which do not have + // RCC2), the RCC2 read will return 0, which indicates that RCC2 is + // disabled (since the SYSCTL_RCC2_USERCC2 bit is clear). + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Get the base clock rate. + // + switch((ulRCC2 & SYSCTL_RCC2_USERCC2) ? + (ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) : + (ulRCC & SYSCTL_RCC_OSCSRC_M)) + { + // + // The main oscillator is the clock source. Determine its rate from + // the crystal setting field. + // + case SYSCTL_RCC_OSCSRC_MAIN: + { + ulClk = g_pulXtals[(ulRCC & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + break; + } + + // + // The internal oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000; + } + else + { + // + // The internal oscillator on all other devices is 16 MHz. + // + ulClk = 16000000; + } + break; + } + + // + // The internal oscillator divided by four is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT4: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000 / 4; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000 / 4; + } + else + { + // + // The internal oscillator on a Tempest-class device is 16 MHz. + // + ulClk = 16000000 / 4; + } + break; + } + + // + // The internal 30 KHz oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_30: + { + // + // The internal 30 KHz oscillator has an accuracy of +/- 30%. + // + ulClk = 30000; + break; + } + + // + // The 4.19 MHz clock from the hibernate module is the clock source. + // + case SYSCTL_RCC2_OSCSRC2_419: + { + ulClk = 4194304; + break; + } + + // + // The 32 KHz clock from the hibernate module is the source clock. + // + case SYSCTL_RCC2_OSCSRC2_32: + { + ulClk = 32768; + break; + } + + // + // An unknown setting, so return a zero clock (that is, an unknown + // clock rate). + // + default: + { + return(0); + } + } + + // + // See if the PLL is being used. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC & SYSCTL_RCC_BYPASS))) + { + // + // Get the PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Sandstorm-class devices is + // "(xtal * (f + 2)) / (r + 2)". + // + ulClk = ((ulClk * (((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S) + 2)) / + (((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 2)); + } + else + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Fury-class device is + // "(xtal * f) / ((r + 1) * 2)". + // + ulClk = ((ulClk * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1) * 2)); + } + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulClk /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulClk /= 4; + } + + // + // Force the system divider to be enabled. It is always used when + // using the PLL, but in some cases it will not read as being enabled. + // + ulRCC |= SYSCTL_RCC_USESYSDIV; + } + + // + // See if the system divider is being used. + // + if(ulRCC & SYSCTL_RCC_USESYSDIV) + { + // + // Adjust the clock rate by the system clock divider. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + if((ulRCC2 & SYSCTL_RCC2_DIV400) && + (((ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC & SYSCTL_RCC_BYPASS)))) + + { + ulClk = ((ulClk * 2) / (((ulRCC2 & (SYSCTL_RCC2_SYSDIV2_M | + SYSCTL_RCC2_SYSDIV2LSB)) >> + (SYSCTL_RCC2_SYSDIV2_S - 1)) + 1)); + } + else + { + ulClk /= (((ulRCC2 & SYSCTL_RCC2_SYSDIV2_M) >> + SYSCTL_RCC2_SYSDIV2_S) + 1); + } + } + else + { + ulClk /= (((ulRCC & SYSCTL_RCC_SYSDIV_M) >> SYSCTL_RCC_SYSDIV_S) + + 1); + } + } + + // + // Return the computed clock rate. + // + return(ulClk); +} + +//***************************************************************************** +// +//! Sets the PWM clock configuration. +//! +//! \param ulConfig is the configuration for the PWM clock; it must be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +//! +//! This function sets the rate of the clock provided to the PWM module as a +//! ratio of the processor clock. This clock is used by the PWM module to +//! generate PWM signals; its rate forms the basis for all PWM signals. +//! +//! \note The clocking of the PWM is dependent upon the system clock rate as +//! configured by SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPWMClockSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_PWMDIV_1) || + (ulConfig == SYSCTL_PWMDIV_2) || + (ulConfig == SYSCTL_PWMDIV_4) || + (ulConfig == SYSCTL_PWMDIV_8) || + (ulConfig == SYSCTL_PWMDIV_16) || + (ulConfig == SYSCTL_PWMDIV_32) || + (ulConfig == SYSCTL_PWMDIV_64)); + + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Set the PWM clock configuration into the run-mode clock configuration + // register. + // + HWREG(SYSCTL_RCC) = ((HWREG(SYSCTL_RCC) & + ~(SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)) | + ulConfig); +} + +//***************************************************************************** +// +//! Gets the current PWM clock configuration. +//! +//! This function returns the current PWM clock configuration. +//! +//! \return Returns the current PWM clock configuration; will be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +// +//***************************************************************************** +unsigned long +SysCtlPWMClockGet(void) +{ + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Return the current PWM clock configuration. Make sure that + // SYSCTL_PWMDIV_1 is returned in all cases where the divider is disabled. + // + if(!(HWREG(SYSCTL_RCC) & SYSCTL_RCC_USEPWMDIV)) + { + // + // The divider is not active so reflect this in the value we return. + // + return(SYSCTL_PWMDIV_1); + } + else + { + // + // The divider is active so directly return the masked register value. + // + return(HWREG(SYSCTL_RCC) & + (SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)); + } +} + +//***************************************************************************** +// +//! Sets the sample rate of the ADC. +//! +//! \param ulSpeed is the desired sample rate of the ADC; must be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +//! +//! This function sets the rate at which the ADC samples are captured by the +//! ADC block. The sampling speed may be limited by the hardware, so the +//! sample rate may end up being slower than requested. SysCtlADCSpeedGet() +//! will return the actual speed in use. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlADCSpeedSet(unsigned long ulSpeed) +{ + // + // Check the arguments. + // + ASSERT((ulSpeed == SYSCTL_ADCSPEED_1MSPS) || + (ulSpeed == SYSCTL_ADCSPEED_500KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_250KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_125KSPS)); + + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Set the ADC speed in run, sleep, and deep-sleep mode. + // + HWREG(SYSCTL_RCGC0) = ((HWREG(SYSCTL_RCGC0) & ~(SYSCTL_RCGC0_ADCSPD_M)) | + ulSpeed); + HWREG(SYSCTL_SCGC0) = ((HWREG(SYSCTL_SCGC0) & ~(SYSCTL_SCGC0_ADCSPD_M)) | + ulSpeed); +} + +//***************************************************************************** +// +//! Gets the sample rate of the ADC. +//! +//! This function gets the current sample rate of the ADC. +//! +//! \return Returns the current ADC sample rate; will be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +// +//***************************************************************************** +unsigned long +SysCtlADCSpeedGet(void) +{ + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Return the current ADC speed. + // + return(HWREG(SYSCTL_RCGC0) & SYSCTL_RCGC0_ADCSPD_M); +} + +//***************************************************************************** +// +//! Configures the internal oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the internal oscillator +//! verification timer should be enabled. +//! +//! This function allows the internal oscillator verification timer to be +//! enabled or disabled. When enabled, an interrupt will be generated if the +//! internal oscillator ceases to operate. +//! +//! The internal oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the main oscillator will verify the +//! internal oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the internal oscillator verification timer as + // requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_IOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_IOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the main oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the main oscillator +//! verification timer should be enabled. +//! +//! This function allows the main oscillator verification timer to be enabled +//! or disabled. When enabled, an interrupt will be generated if the main +//! oscillator ceases to operate. +//! +//! The main oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the internal oscillator will verify the +//! main oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlMOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the main oscillator verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_MOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_MOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the PLL verification timer. +//! +//! \param bEnable is a boolean that is \b true if the PLL verification timer +//! should be enabled. +//! +//! This function allows the PLL verification timer to be enabled or disabled. +//! When enabled, an interrupt will be generated if the PLL ceases to operate. +//! +//! The PLL verification timer is only available on Sandstorm-class devices. +//! +//! \note The main oscillator must be enabled for this verification timer to +//! operate as it is used to check the PLL. Also, the verification timer +//! should be disabled while the PLL is being reconfigured via +//! SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPLLVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the PLL verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_PLLVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_PLLVER); + } +} + +//***************************************************************************** +// +//! Clears the clock verification status. +//! +//! This function clears the status of the clock verification timers, allowing +//! them to assert another failure if detected. +//! +//! The clock verification timers are only available on Sandstorm-class +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClkVerificationClear(void) +{ + // + // Clear the clock verification. + // + HWREG(SYSCTL_CLKVCLR) = SYSCTL_CLKVCLR_VERCLR; + + // + // The bit does not self-reset, so clear it. + // + HWREG(SYSCTL_CLKVCLR) = 0; +} + +//***************************************************************************** +// +//! Enables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to enable. +//! +//! This function is used to enable the specified GPIO peripheral to be +//! accessed from the Advanced Host Bus (AHB) instead of the legacy Advanced +//! Peripheral Bus (APB). When a GPIO peripheral is enabled for AHB access, +//! the \b _AHB_BASE form of the base address should be used for GPIO +//! functions. For example, instead of using \b GPIO_PORTA_BASE as the base +//! address for GPIO functions, use \b GPIO_PORTA_AHB_BASE instead. +//! +//! The \e ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Enable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) |= ulGPIOPeripheral & 0xFFFF; +} + +//***************************************************************************** +// +//! Disables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to disable. +//! +//! This function disables the specified GPIO peripheral for access from the +//! Advanced Host Bus (AHB). Once disabled, the GPIO peripheral is accessed +//! from the legacy Advanced Peripheral Bus (AHB). +//! +//! The \b ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Disable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) &= ~(ulGPIOPeripheral & 0xFFFF); +} + +//***************************************************************************** +// +//! Powers up the USB PLL. +//! +//! This function will enable the USB controller's PLL which is used by it's +//! physical layer. This call is necessary before connecting to any external +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLEnable(void) +{ + // + // Turn on the USB PLL. + // + HWREG(SYSCTL_RCC2) &= ~SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Powers down the USB PLL. +//! +//! This function will disable the USB controller's PLL which is used by it's +//! physical layer. The USB registers are still accessible, but the physical +//! layer will no longer function. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLDisable(void) +{ + // + // Turn of USB PLL. + // + HWREG(SYSCTL_RCC2) |= SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Sets the MCLK frequency provided to the I2S module. +//! +//! \param ulInputClock is the input clock to the MCLK divider. If this is +//! zero, the value is computed from the current PLL configuration. +//! \param ulMClk is the desired MCLK frequency. If this is zero, MCLK output +//! is disabled. +//! +//! This function sets the dividers to provide MCLK to the I2S module. A MCLK +//! divider will be chosen that produces the MCLK frequency that is the closest +//! possible to the requested frequency, which may be above or below the +//! requested frequency. +//! +//! The actual MCLK frequency will be returned. It is the responsibility of +//! the application to determine if the selected MCLK is acceptable; in general +//! the human ear can not discern the frequency difference if it is within 0.3% +//! of the desired frequency (though there is a very small percentage of the +//! population that can discern lower frequency deviations). +//! +//! \return Returns the actual MCLK frequency. +// +//***************************************************************************** +unsigned long +SysCtlI2SMClkSet(unsigned long ulInputClock, unsigned long ulMClk) +{ + unsigned long ulDivInt, ulDivFrac, ulPLL; + + // + // See if the I2S MCLK should be disabled. + // + if(ulMClk == 0) + { + // + // Disable the I2S MCLK and return. + // + HWREG(SYSCTL_I2SMCLKCFG) = 0; + return(0); + } + + // + // See if the input clock was specified. + // + if(ulInputClock == 0) + { + // + // The input clock was not specified, so compute the output frequency + // of the PLL. Get the current PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // Get the frequency of the crystal in use. + // + ulInputClock = g_pulXtals[(HWREG(SYSCTL_RCC) & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + + // + // Calculate the PLL output frequency. + // + ulInputClock = ((ulInputClock * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1))); + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulInputClock /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulInputClock /= 4; + } + } + + // + // Verify that the requested MCLK frequency is attainable. + // + ASSERT(ulMClk < ulInputClock); + + // + // Add a rounding factor to the input clock, so that the MCLK frequency + // that is closest to the desire value is selected. + // + ulInputClock += (ulMClk / 32) - 1; + + // + // Compute the integer portion of the MCLK divider. + // + ulDivInt = ulInputClock / ulMClk; + + // + // If the divisor is too large, then simply use the maximum divisor. + // + if(CLASS_IS_TEMPEST && REVISION_IS_B1 && (ulDivInt > 255)) + { + ulDivInt = 255; + ulDivFrac = 15; + } + else if(ulDivInt > 1023) + { + ulDivInt = 1023; + ulDivFrac = 15; + } + else + { + // + // Compute the fractional portion of the MCLK divider. + // + ulDivFrac = ((ulInputClock - (ulDivInt * ulMClk)) * 16) / ulMClk; + } + + // + // Set the divisor for the Tx and Rx MCLK generators and enable the clocks. + // + HWREG(SYSCTL_I2SMCLKCFG) = (SYSCTL_I2SMCLKCFG_RXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_RXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_RXF_S) | + SYSCTL_I2SMCLKCFG_TXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_TXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_TXF_S)); + + // + // Return the actual MCLK frequency. + // + ulInputClock -= (ulMClk / 32) - 1; + ulDivInt = (ulDivInt * 16) + ulDivFrac; + ulMClk = (ulInputClock / ulDivInt) * 16; + ulMClk += ((ulInputClock - ((ulMClk / 16) * ulDivInt)) * 16) / ulDivInt; + return(ulMClk); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.h new file mode 100644 index 00000000..d5b00681 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/sysctl.h @@ -0,0 +1,466 @@ +//***************************************************************************** +// +// sysctl.h - Prototypes for the system control driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSCTL_H__ +#define __SYSCTL_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to the +// SysCtlPeripheralPresent(), SysCtlPeripheralEnable(), +// SysCtlPeripheralDisable(), and SysCtlPeripheralReset() APIs as the +// ulPeripheral parameter. The peripherals in the fourth group (upper nibble +// is 3) can only be used with the SysCtlPeripheralPresent() API. +// +//***************************************************************************** +#ifndef DEPRECATED +#define SYSCTL_PERIPH_WDOG 0x00000008 // Watchdog +#endif +#define SYSCTL_PERIPH_WDOG0 0x00000008 // Watchdog 0 +#define SYSCTL_PERIPH_HIBERNATE 0x00000040 // Hibernation module +#ifndef DEPRECATED +#define SYSCTL_PERIPH_ADC 0x00100001 // ADC +#endif +#define SYSCTL_PERIPH_ADC0 0x00100001 // ADC0 +#define SYSCTL_PERIPH_ADC1 0x00100002 // ADC1 +#define SYSCTL_PERIPH_PWM 0x00100010 // PWM +#define SYSCTL_PERIPH_CAN0 0x00100100 // CAN 0 +#define SYSCTL_PERIPH_CAN1 0x00100200 // CAN 1 +#define SYSCTL_PERIPH_CAN2 0x00100400 // CAN 2 +#define SYSCTL_PERIPH_WDOG1 0x00101000 // Watchdog 1 +#define SYSCTL_PERIPH_UART0 0x10000001 // UART 0 +#define SYSCTL_PERIPH_UART1 0x10000002 // UART 1 +#define SYSCTL_PERIPH_UART2 0x10000004 // UART 2 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_SSI 0x10000010 // SSI +#endif +#define SYSCTL_PERIPH_SSI0 0x10000010 // SSI 0 +#define SYSCTL_PERIPH_SSI1 0x10000020 // SSI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_QEI 0x10000100 // QEI +#endif +#define SYSCTL_PERIPH_QEI0 0x10000100 // QEI 0 +#define SYSCTL_PERIPH_QEI1 0x10000200 // QEI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_I2C 0x10001000 // I2C +#endif +#define SYSCTL_PERIPH_I2C0 0x10001000 // I2C 0 +#define SYSCTL_PERIPH_I2C1 0x10004000 // I2C 1 +#define SYSCTL_PERIPH_TIMER0 0x10100001 // Timer 0 +#define SYSCTL_PERIPH_TIMER1 0x10100002 // Timer 1 +#define SYSCTL_PERIPH_TIMER2 0x10100004 // Timer 2 +#define SYSCTL_PERIPH_TIMER3 0x10100008 // Timer 3 +#define SYSCTL_PERIPH_COMP0 0x10100100 // Analog comparator 0 +#define SYSCTL_PERIPH_COMP1 0x10100200 // Analog comparator 1 +#define SYSCTL_PERIPH_COMP2 0x10100400 // Analog comparator 2 +#define SYSCTL_PERIPH_I2S0 0x10101000 // I2S0 +#define SYSCTL_PERIPH_EPI0 0x10104000 // EPI0 +#define SYSCTL_PERIPH_GPIOA 0x20000001 // GPIO A +#define SYSCTL_PERIPH_GPIOB 0x20000002 // GPIO B +#define SYSCTL_PERIPH_GPIOC 0x20000004 // GPIO C +#define SYSCTL_PERIPH_GPIOD 0x20000008 // GPIO D +#define SYSCTL_PERIPH_GPIOE 0x20000010 // GPIO E +#define SYSCTL_PERIPH_GPIOF 0x20000020 // GPIO F +#define SYSCTL_PERIPH_GPIOG 0x20000040 // GPIO G +#define SYSCTL_PERIPH_GPIOH 0x20000080 // GPIO H +#define SYSCTL_PERIPH_GPIOJ 0x20000100 // GPIO J +#define SYSCTL_PERIPH_UDMA 0x20002000 // uDMA +#define SYSCTL_PERIPH_USB0 0x20100001 // USB0 +#define SYSCTL_PERIPH_ETH 0x20105000 // ETH +#define SYSCTL_PERIPH_IEEE1588 0x20100100 // IEEE1588 +#define SYSCTL_PERIPH_PLL 0x30000010 // PLL +#define SYSCTL_PERIPH_TEMP 0x30000020 // Temperature sensor +#define SYSCTL_PERIPH_MPU 0x30000080 // Cortex M3 MPU + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPinPresent() API +// as the ulPin parameter. +// +//***************************************************************************** +#define SYSCTL_PIN_PWM0 0x00000001 // PWM0 pin +#define SYSCTL_PIN_PWM1 0x00000002 // PWM1 pin +#define SYSCTL_PIN_PWM2 0x00000004 // PWM2 pin +#define SYSCTL_PIN_PWM3 0x00000008 // PWM3 pin +#define SYSCTL_PIN_PWM4 0x00000010 // PWM4 pin +#define SYSCTL_PIN_PWM5 0x00000020 // PWM5 pin +#define SYSCTL_PIN_PWM6 0x00000040 // PWM6 pin +#define SYSCTL_PIN_PWM7 0x00000080 // PWM7 pin +#define SYSCTL_PIN_C0MINUS 0x00000040 // C0- pin +#define SYSCTL_PIN_C0PLUS 0x00000080 // C0+ pin +#define SYSCTL_PIN_C0O 0x00000100 // C0o pin +#define SYSCTL_PIN_C1MINUS 0x00000200 // C1- pin +#define SYSCTL_PIN_C1PLUS 0x00000400 // C1+ pin +#define SYSCTL_PIN_C1O 0x00000800 // C1o pin +#define SYSCTL_PIN_C2MINUS 0x00001000 // C2- pin +#define SYSCTL_PIN_C2PLUS 0x00002000 // C2+ pin +#define SYSCTL_PIN_C2O 0x00004000 // C2o pin +#define SYSCTL_PIN_MC_FAULT0 0x00008000 // MC0 Fault pin +#define SYSCTL_PIN_ADC0 0x00010000 // ADC0 pin +#define SYSCTL_PIN_ADC1 0x00020000 // ADC1 pin +#define SYSCTL_PIN_ADC2 0x00040000 // ADC2 pin +#define SYSCTL_PIN_ADC3 0x00080000 // ADC3 pin +#define SYSCTL_PIN_ADC4 0x00100000 // ADC4 pin +#define SYSCTL_PIN_ADC5 0x00200000 // ADC5 pin +#define SYSCTL_PIN_ADC6 0x00400000 // ADC6 pin +#define SYSCTL_PIN_ADC7 0x00800000 // ADC7 pin +#define SYSCTL_PIN_CCP0 0x01000000 // CCP0 pin +#define SYSCTL_PIN_CCP1 0x02000000 // CCP1 pin +#define SYSCTL_PIN_CCP2 0x04000000 // CCP2 pin +#define SYSCTL_PIN_CCP3 0x08000000 // CCP3 pin +#define SYSCTL_PIN_CCP4 0x10000000 // CCP4 pin +#define SYSCTL_PIN_CCP5 0x20000000 // CCP5 pin +#define SYSCTL_PIN_32KHZ 0x80000000 // 32kHz pin + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOSet() API as +// the ulVoltage value, or returned by the SysCtlLDOGet() API. +// +//***************************************************************************** +#define SYSCTL_LDO_2_25V 0x00000005 // LDO output of 2.25V +#define SYSCTL_LDO_2_30V 0x00000004 // LDO output of 2.30V +#define SYSCTL_LDO_2_35V 0x00000003 // LDO output of 2.35V +#define SYSCTL_LDO_2_40V 0x00000002 // LDO output of 2.40V +#define SYSCTL_LDO_2_45V 0x00000001 // LDO output of 2.45V +#define SYSCTL_LDO_2_50V 0x00000000 // LDO output of 2.50V +#define SYSCTL_LDO_2_55V 0x0000001f // LDO output of 2.55V +#define SYSCTL_LDO_2_60V 0x0000001e // LDO output of 2.60V +#define SYSCTL_LDO_2_65V 0x0000001d // LDO output of 2.65V +#define SYSCTL_LDO_2_70V 0x0000001c // LDO output of 2.70V +#define SYSCTL_LDO_2_75V 0x0000001b // LDO output of 2.75V + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOConfigSet() API. +// +//***************************************************************************** +#define SYSCTL_LDOCFG_ARST 0x00000001 // Allow LDO failure to reset +#define SYSCTL_LDOCFG_NORST 0x00000000 // Do not reset on LDO failure + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlIntEnable(), +// SysCtlIntDisable(), and SysCtlIntClear() APIs, or returned in the bit mask +// by the SysCtlIntStatus() API. +// +//***************************************************************************** +#define SYSCTL_INT_MOSC_PUP 0x00000100 // MOSC power-up interrupt +#define SYSCTL_INT_USBPLL_LOCK 0x00000080 // USB PLL lock interrupt +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlResetCauseClear() +// API or returned by the SysCtlResetCauseGet() API. +// +//***************************************************************************** +#define SYSCTL_CAUSE_LDO 0x00000020 // LDO power not OK reset +#define SYSCTL_CAUSE_SW 0x00000010 // Software reset +#define SYSCTL_CAUSE_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset +#define SYSCTL_CAUSE_POR 0x00000002 // Power on reset +#define SYSCTL_CAUSE_EXT 0x00000001 // External reset + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlBrownOutConfigSet() +// API as the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_BOR_RESET 0x00000002 // Reset instead of interrupting +#define SYSCTL_BOR_RESAMPLE 0x00000001 // Resample BOR before asserting + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPWMClockSet() API +// as the ulConfig parameter, and can be returned by the SysCtlPWMClockGet() +// API. +// +//***************************************************************************** +#define SYSCTL_PWMDIV_1 0x00000000 // PWM clock is processor clock /1 +#define SYSCTL_PWMDIV_2 0x00100000 // PWM clock is processor clock /2 +#define SYSCTL_PWMDIV_4 0x00120000 // PWM clock is processor clock /4 +#define SYSCTL_PWMDIV_8 0x00140000 // PWM clock is processor clock /8 +#define SYSCTL_PWMDIV_16 0x00160000 // PWM clock is processor clock /16 +#define SYSCTL_PWMDIV_32 0x00180000 // PWM clock is processor clock /32 +#define SYSCTL_PWMDIV_64 0x001A0000 // PWM clock is processor clock /64 + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlADCSpeedSet() API +// as the ulSpeed parameter, and can be returned by the SyCtlADCSpeedGet() +// API. +// +//***************************************************************************** +#define SYSCTL_ADCSPEED_1MSPS 0x00000F00 // 1,000,000 samples per second +#define SYSCTL_ADCSPEED_500KSPS 0x00000A00 // 500,000 samples per second +#define SYSCTL_ADCSPEED_250KSPS 0x00000500 // 250,000 samples per second +#define SYSCTL_ADCSPEED_125KSPS 0x00000000 // 125,000 samples per second + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlClockSet() API as +// the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_SYSDIV_1 0x07800000 // Processor clock is osc/pll /1 +#define SYSCTL_SYSDIV_2 0x00C00000 // Processor clock is osc/pll /2 +#define SYSCTL_SYSDIV_3 0x01400000 // Processor clock is osc/pll /3 +#define SYSCTL_SYSDIV_4 0x01C00000 // Processor clock is osc/pll /4 +#define SYSCTL_SYSDIV_5 0x02400000 // Processor clock is osc/pll /5 +#define SYSCTL_SYSDIV_6 0x02C00000 // Processor clock is osc/pll /6 +#define SYSCTL_SYSDIV_7 0x03400000 // Processor clock is osc/pll /7 +#define SYSCTL_SYSDIV_8 0x03C00000 // Processor clock is osc/pll /8 +#define SYSCTL_SYSDIV_9 0x04400000 // Processor clock is osc/pll /9 +#define SYSCTL_SYSDIV_10 0x04C00000 // Processor clock is osc/pll /10 +#define SYSCTL_SYSDIV_11 0x05400000 // Processor clock is osc/pll /11 +#define SYSCTL_SYSDIV_12 0x05C00000 // Processor clock is osc/pll /12 +#define SYSCTL_SYSDIV_13 0x06400000 // Processor clock is osc/pll /13 +#define SYSCTL_SYSDIV_14 0x06C00000 // Processor clock is osc/pll /14 +#define SYSCTL_SYSDIV_15 0x07400000 // Processor clock is osc/pll /15 +#define SYSCTL_SYSDIV_16 0x07C00000 // Processor clock is osc/pll /16 +#define SYSCTL_SYSDIV_17 0x88400000 // Processor clock is osc/pll /17 +#define SYSCTL_SYSDIV_18 0x88C00000 // Processor clock is osc/pll /18 +#define SYSCTL_SYSDIV_19 0x89400000 // Processor clock is osc/pll /19 +#define SYSCTL_SYSDIV_20 0x89C00000 // Processor clock is osc/pll /20 +#define SYSCTL_SYSDIV_21 0x8A400000 // Processor clock is osc/pll /21 +#define SYSCTL_SYSDIV_22 0x8AC00000 // Processor clock is osc/pll /22 +#define SYSCTL_SYSDIV_23 0x8B400000 // Processor clock is osc/pll /23 +#define SYSCTL_SYSDIV_24 0x8BC00000 // Processor clock is osc/pll /24 +#define SYSCTL_SYSDIV_25 0x8C400000 // Processor clock is osc/pll /25 +#define SYSCTL_SYSDIV_26 0x8CC00000 // Processor clock is osc/pll /26 +#define SYSCTL_SYSDIV_27 0x8D400000 // Processor clock is osc/pll /27 +#define SYSCTL_SYSDIV_28 0x8DC00000 // Processor clock is osc/pll /28 +#define SYSCTL_SYSDIV_29 0x8E400000 // Processor clock is osc/pll /29 +#define SYSCTL_SYSDIV_30 0x8EC00000 // Processor clock is osc/pll /30 +#define SYSCTL_SYSDIV_31 0x8F400000 // Processor clock is osc/pll /31 +#define SYSCTL_SYSDIV_32 0x8FC00000 // Processor clock is osc/pll /32 +#define SYSCTL_SYSDIV_33 0x90400000 // Processor clock is osc/pll /33 +#define SYSCTL_SYSDIV_34 0x90C00000 // Processor clock is osc/pll /34 +#define SYSCTL_SYSDIV_35 0x91400000 // Processor clock is osc/pll /35 +#define SYSCTL_SYSDIV_36 0x91C00000 // Processor clock is osc/pll /36 +#define SYSCTL_SYSDIV_37 0x92400000 // Processor clock is osc/pll /37 +#define SYSCTL_SYSDIV_38 0x92C00000 // Processor clock is osc/pll /38 +#define SYSCTL_SYSDIV_39 0x93400000 // Processor clock is osc/pll /39 +#define SYSCTL_SYSDIV_40 0x93C00000 // Processor clock is osc/pll /40 +#define SYSCTL_SYSDIV_41 0x94400000 // Processor clock is osc/pll /41 +#define SYSCTL_SYSDIV_42 0x94C00000 // Processor clock is osc/pll /42 +#define SYSCTL_SYSDIV_43 0x95400000 // Processor clock is osc/pll /43 +#define SYSCTL_SYSDIV_44 0x95C00000 // Processor clock is osc/pll /44 +#define SYSCTL_SYSDIV_45 0x96400000 // Processor clock is osc/pll /45 +#define SYSCTL_SYSDIV_46 0x96C00000 // Processor clock is osc/pll /46 +#define SYSCTL_SYSDIV_47 0x97400000 // Processor clock is osc/pll /47 +#define SYSCTL_SYSDIV_48 0x97C00000 // Processor clock is osc/pll /48 +#define SYSCTL_SYSDIV_49 0x98400000 // Processor clock is osc/pll /49 +#define SYSCTL_SYSDIV_50 0x98C00000 // Processor clock is osc/pll /50 +#define SYSCTL_SYSDIV_51 0x99400000 // Processor clock is osc/pll /51 +#define SYSCTL_SYSDIV_52 0x99C00000 // Processor clock is osc/pll /52 +#define SYSCTL_SYSDIV_53 0x9A400000 // Processor clock is osc/pll /53 +#define SYSCTL_SYSDIV_54 0x9AC00000 // Processor clock is osc/pll /54 +#define SYSCTL_SYSDIV_55 0x9B400000 // Processor clock is osc/pll /55 +#define SYSCTL_SYSDIV_56 0x9BC00000 // Processor clock is osc/pll /56 +#define SYSCTL_SYSDIV_57 0x9C400000 // Processor clock is osc/pll /57 +#define SYSCTL_SYSDIV_58 0x9CC00000 // Processor clock is osc/pll /58 +#define SYSCTL_SYSDIV_59 0x9D400000 // Processor clock is osc/pll /59 +#define SYSCTL_SYSDIV_60 0x9DC00000 // Processor clock is osc/pll /60 +#define SYSCTL_SYSDIV_61 0x9E400000 // Processor clock is osc/pll /61 +#define SYSCTL_SYSDIV_62 0x9EC00000 // Processor clock is osc/pll /62 +#define SYSCTL_SYSDIV_63 0x9F400000 // Processor clock is osc/pll /63 +#define SYSCTL_SYSDIV_64 0x9FC00000 // Processor clock is osc/pll /64 +#define SYSCTL_SYSDIV_2_5 0xC1000000 // Processor clock is pll / 2.5 +#define SYSCTL_SYSDIV_3_5 0xC1800000 // Processor clock is pll / 3.5 +#define SYSCTL_SYSDIV_4_5 0xC2000000 // Processor clock is pll / 4.5 +#define SYSCTL_SYSDIV_5_5 0xC2800000 // Processor clock is pll / 5.5 +#define SYSCTL_SYSDIV_6_5 0xC3000000 // Processor clock is pll / 6.5 +#define SYSCTL_SYSDIV_7_5 0xC3800000 // Processor clock is pll / 7.5 +#define SYSCTL_SYSDIV_8_5 0xC4000000 // Processor clock is pll / 8.5 +#define SYSCTL_SYSDIV_9_5 0xC4800000 // Processor clock is pll / 9.5 +#define SYSCTL_SYSDIV_10_5 0xC5000000 // Processor clock is pll / 10.5 +#define SYSCTL_SYSDIV_11_5 0xC5800000 // Processor clock is pll / 11.5 +#define SYSCTL_SYSDIV_12_5 0xC6000000 // Processor clock is pll / 12.5 +#define SYSCTL_SYSDIV_13_5 0xC6800000 // Processor clock is pll / 13.5 +#define SYSCTL_SYSDIV_14_5 0xC7000000 // Processor clock is pll / 14.5 +#define SYSCTL_SYSDIV_15_5 0xC7800000 // Processor clock is pll / 15.5 +#define SYSCTL_SYSDIV_16_5 0xC8000000 // Processor clock is pll / 16.5 +#define SYSCTL_SYSDIV_17_5 0xC8800000 // Processor clock is pll / 17.5 +#define SYSCTL_SYSDIV_18_5 0xC9000000 // Processor clock is pll / 18.5 +#define SYSCTL_SYSDIV_19_5 0xC9800000 // Processor clock is pll / 19.5 +#define SYSCTL_SYSDIV_20_5 0xCA000000 // Processor clock is pll / 20.5 +#define SYSCTL_SYSDIV_21_5 0xCA800000 // Processor clock is pll / 21.5 +#define SYSCTL_SYSDIV_22_5 0xCB000000 // Processor clock is pll / 22.5 +#define SYSCTL_SYSDIV_23_5 0xCB800000 // Processor clock is pll / 23.5 +#define SYSCTL_SYSDIV_24_5 0xCC000000 // Processor clock is pll / 24.5 +#define SYSCTL_SYSDIV_25_5 0xCC800000 // Processor clock is pll / 25.5 +#define SYSCTL_SYSDIV_26_5 0xCD000000 // Processor clock is pll / 26.5 +#define SYSCTL_SYSDIV_27_5 0xCD800000 // Processor clock is pll / 27.5 +#define SYSCTL_SYSDIV_28_5 0xCE000000 // Processor clock is pll / 28.5 +#define SYSCTL_SYSDIV_29_5 0xCE800000 // Processor clock is pll / 29.5 +#define SYSCTL_SYSDIV_30_5 0xCF000000 // Processor clock is pll / 30.5 +#define SYSCTL_SYSDIV_31_5 0xCF800000 // Processor clock is pll / 31.5 +#define SYSCTL_SYSDIV_32_5 0xD0000000 // Processor clock is pll / 32.5 +#define SYSCTL_SYSDIV_33_5 0xD0800000 // Processor clock is pll / 33.5 +#define SYSCTL_SYSDIV_34_5 0xD1000000 // Processor clock is pll / 34.5 +#define SYSCTL_SYSDIV_35_5 0xD1800000 // Processor clock is pll / 35.5 +#define SYSCTL_SYSDIV_36_5 0xD2000000 // Processor clock is pll / 36.5 +#define SYSCTL_SYSDIV_37_5 0xD2800000 // Processor clock is pll / 37.5 +#define SYSCTL_SYSDIV_38_5 0xD3000000 // Processor clock is pll / 38.5 +#define SYSCTL_SYSDIV_39_5 0xD3800000 // Processor clock is pll / 39.5 +#define SYSCTL_SYSDIV_40_5 0xD4000000 // Processor clock is pll / 40.5 +#define SYSCTL_SYSDIV_41_5 0xD4800000 // Processor clock is pll / 41.5 +#define SYSCTL_SYSDIV_42_5 0xD5000000 // Processor clock is pll / 42.5 +#define SYSCTL_SYSDIV_43_5 0xD5800000 // Processor clock is pll / 43.5 +#define SYSCTL_SYSDIV_44_5 0xD6000000 // Processor clock is pll / 44.5 +#define SYSCTL_SYSDIV_45_5 0xD6800000 // Processor clock is pll / 45.5 +#define SYSCTL_SYSDIV_46_5 0xD7000000 // Processor clock is pll / 46.5 +#define SYSCTL_SYSDIV_47_5 0xD7800000 // Processor clock is pll / 47.5 +#define SYSCTL_SYSDIV_48_5 0xD8000000 // Processor clock is pll / 48.5 +#define SYSCTL_SYSDIV_49_5 0xD8800000 // Processor clock is pll / 49.5 +#define SYSCTL_SYSDIV_50_5 0xD9000000 // Processor clock is pll / 50.5 +#define SYSCTL_SYSDIV_51_5 0xD9800000 // Processor clock is pll / 51.5 +#define SYSCTL_SYSDIV_52_5 0xDA000000 // Processor clock is pll / 52.5 +#define SYSCTL_SYSDIV_53_5 0xDA800000 // Processor clock is pll / 53.5 +#define SYSCTL_SYSDIV_54_5 0xDB000000 // Processor clock is pll / 54.5 +#define SYSCTL_SYSDIV_55_5 0xDB800000 // Processor clock is pll / 55.5 +#define SYSCTL_SYSDIV_56_5 0xDC000000 // Processor clock is pll / 56.5 +#define SYSCTL_SYSDIV_57_5 0xDC800000 // Processor clock is pll / 57.5 +#define SYSCTL_SYSDIV_58_5 0xDD000000 // Processor clock is pll / 58.5 +#define SYSCTL_SYSDIV_59_5 0xDD800000 // Processor clock is pll / 59.5 +#define SYSCTL_SYSDIV_60_5 0xDE000000 // Processor clock is pll / 60.5 +#define SYSCTL_SYSDIV_61_5 0xDE800000 // Processor clock is pll / 61.5 +#define SYSCTL_SYSDIV_62_5 0xDF000000 // Processor clock is pll / 62.5 +#define SYSCTL_SYSDIV_63_5 0xDF800000 // Processor clock is pll / 63.5 +#define SYSCTL_USE_PLL 0x00000000 // System clock is the PLL clock +#define SYSCTL_USE_OSC 0x00003800 // System clock is the osc clock +#define SYSCTL_XTAL_1MHZ 0x00000000 // External crystal is 1MHz +#define SYSCTL_XTAL_1_84MHZ 0x00000040 // External crystal is 1.8432MHz +#define SYSCTL_XTAL_2MHZ 0x00000080 // External crystal is 2MHz +#define SYSCTL_XTAL_2_45MHZ 0x000000C0 // External crystal is 2.4576MHz +#define SYSCTL_XTAL_3_57MHZ 0x00000100 // External crystal is 3.579545MHz +#define SYSCTL_XTAL_3_68MHZ 0x00000140 // External crystal is 3.6864MHz +#define SYSCTL_XTAL_4MHZ 0x00000180 // External crystal is 4MHz +#define SYSCTL_XTAL_4_09MHZ 0x000001C0 // External crystal is 4.096MHz +#define SYSCTL_XTAL_4_91MHZ 0x00000200 // External crystal is 4.9152MHz +#define SYSCTL_XTAL_5MHZ 0x00000240 // External crystal is 5MHz +#define SYSCTL_XTAL_5_12MHZ 0x00000280 // External crystal is 5.12MHz +#define SYSCTL_XTAL_6MHZ 0x000002C0 // External crystal is 6MHz +#define SYSCTL_XTAL_6_14MHZ 0x00000300 // External crystal is 6.144MHz +#define SYSCTL_XTAL_7_37MHZ 0x00000340 // External crystal is 7.3728MHz +#define SYSCTL_XTAL_8MHZ 0x00000380 // External crystal is 8MHz +#define SYSCTL_XTAL_8_19MHZ 0x000003C0 // External crystal is 8.192MHz +#define SYSCTL_XTAL_10MHZ 0x00000400 // External crystal is 10 MHz +#define SYSCTL_XTAL_12MHZ 0x00000440 // External crystal is 12 MHz +#define SYSCTL_XTAL_12_2MHZ 0x00000480 // External crystal is 12.288 MHz +#define SYSCTL_XTAL_13_5MHZ 0x000004C0 // External crystal is 13.56 MHz +#define SYSCTL_XTAL_14_3MHZ 0x00000500 // External crystal is 14.31818 MHz +#define SYSCTL_XTAL_16MHZ 0x00000540 // External crystal is 16 MHz +#define SYSCTL_XTAL_16_3MHZ 0x00000580 // External crystal is 16.384 MHz +#define SYSCTL_OSC_MAIN 0x00000000 // Osc source is main osc +#define SYSCTL_OSC_INT 0x00000010 // Osc source is int. osc +#define SYSCTL_OSC_INT4 0x00000020 // Osc source is int. osc /4 +#define SYSCTL_OSC_INT30 0x00000030 // Osc source is int. 30 KHz +#define SYSCTL_OSC_EXT4_19 0x80000028 // Osc source is ext. 4.19 MHz +#define SYSCTL_OSC_EXT32 0x80000038 // Osc source is ext. 32 KHz +#define SYSCTL_INT_PIOSC_DIS 0x00000004 // Disable interal precision osc. +#define SYSCTL_INT_OSC_DIS 0x00000002 // Disable internal oscillator +#define SYSCTL_MAIN_OSC_DIS 0x00000001 // Disable main oscillator + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long SysCtlSRAMSizeGet(void); +extern unsigned long SysCtlFlashSizeGet(void); +extern tBoolean SysCtlPinPresent(unsigned long ulPin); +extern tBoolean SysCtlPeripheralPresent(unsigned long ulPeripheral); +extern void SysCtlPeripheralReset(unsigned long ulPeripheral); +extern void SysCtlPeripheralEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralClockGating(tBoolean bEnable); +extern void SysCtlIntRegister(void (*pfnHandler)(void)); +extern void SysCtlIntUnregister(void); +extern void SysCtlIntEnable(unsigned long ulInts); +extern void SysCtlIntDisable(unsigned long ulInts); +extern void SysCtlIntClear(unsigned long ulInts); +extern unsigned long SysCtlIntStatus(tBoolean bMasked); +extern void SysCtlLDOSet(unsigned long ulVoltage); +extern unsigned long SysCtlLDOGet(void); +extern void SysCtlLDOConfigSet(unsigned long ulConfig); +extern void SysCtlReset(void); +extern void SysCtlSleep(void); +extern void SysCtlDeepSleep(void); +extern unsigned long SysCtlResetCauseGet(void); +extern void SysCtlResetCauseClear(unsigned long ulCauses); +extern void SysCtlBrownOutConfigSet(unsigned long ulConfig, + unsigned long ulDelay); +extern void SysCtlDelay(unsigned long ulCount); +extern void SysCtlClockSet(unsigned long ulConfig); +extern unsigned long SysCtlClockGet(void); +extern void SysCtlPWMClockSet(unsigned long ulConfig); +extern unsigned long SysCtlPWMClockGet(void); +extern void SysCtlADCSpeedSet(unsigned long ulSpeed); +extern unsigned long SysCtlADCSpeedGet(void); +extern void SysCtlIOSCVerificationSet(tBoolean bEnable); +extern void SysCtlMOSCVerificationSet(tBoolean bEnable); +extern void SysCtlPLLVerificationSet(tBoolean bEnable); +extern void SysCtlClkVerificationClear(void); +extern void SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral); +extern void SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral); +extern void SysCtlUSBPLLEnable(void); +extern void SysCtlUSBPLLDisable(void); +extern unsigned long SysCtlI2SMClkSet(unsigned long ulInputClock, + unsigned long ulMClk); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.c new file mode 100644 index 00000000..f19f19e7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.c @@ -0,0 +1,259 @@ +//***************************************************************************** +// +// systick.c - Driver for the SysTick timer in NVIC. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup systick_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/systick.h" + +//***************************************************************************** +// +//! Enables the SysTick counter. +//! +//! This will start the SysTick counter. If an interrupt handler has been +//! registered, it will be called when the SysTick counter rolls over. +//! +//! \note Calling this function will cause the SysTick counter to (re)commence +//! counting from its current value. The counter is not automatically reloaded +//! with the period as specified in a previous call to SysTickPeriodSet(). If +//! an immediate reload is required, the \b NVIC_ST_CURRENT register must be +//! written to force this. Any write to this register clears the SysTick +//! counter to 0 and will cause a reload with the supplied period on the next +//! clock. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickEnable(void) +{ + // + // Enable SysTick. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the SysTick counter. +//! +//! This will stop the SysTick counter. If an interrupt handler has been +//! registered, it will no longer be called until SysTick is restarted. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickDisable(void) +{ + // + // Disable SysTick. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_ENABLE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the SysTick interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the +//! SysTick interrupt occurs. +//! +//! This sets the handler to be called when a SysTick interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(FAULT_SYSTICK, pfnHandler); + + // + // Enable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the SysTick interrupt. +//! +//! This function will clear the handler to be called when a SysTick interrupt +//! occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntUnregister(void) +{ + // + // Disable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + + // + // Unregister the interrupt handler. + // + IntUnregister(FAULT_SYSTICK); +} + +//***************************************************************************** +// +//! Enables the SysTick interrupt. +//! +//! This function will enable the SysTick interrupt, allowing it to be +//! reflected to the processor. +//! +//! \note The SysTick interrupt handler does not need to clear the SysTick +//! interrupt source as this is done automatically by NVIC when the interrupt +//! handler is called. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntEnable(void) +{ + // + // Enable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; +} + +//***************************************************************************** +// +//! Disables the SysTick interrupt. +//! +//! This function will disable the SysTick interrupt, preventing it from being +//! reflected to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntDisable(void) +{ + // + // Disable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); +} + +//***************************************************************************** +// +//! Sets the period of the SysTick counter. +//! +//! \param ulPeriod is the number of clock ticks in each period of the SysTick +//! counter; must be between 1 and 16,777,216, inclusive. +//! +//! This function sets the rate at which the SysTick counter wraps; this +//! equates to the number of processor clocks between interrupts. +//! +//! \note Calling this function does not cause the SysTick counter to reload +//! immediately. If an immediate reload is required, the \b NVIC_ST_CURRENT +//! register must be written. Any write to this register clears the SysTick +//! counter to 0 and will cause a reload with the \e ulPeriod supplied here on +//! the next clock after the SysTick is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickPeriodSet(unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT((ulPeriod > 0) && (ulPeriod <= 16777216)); + + // + // Set the period of the SysTick counter. + // + HWREG(NVIC_ST_RELOAD) = ulPeriod - 1; +} + +//***************************************************************************** +// +//! Gets the period of the SysTick counter. +//! +//! This function returns the rate at which the SysTick counter wraps; this +//! equates to the number of processor clocks between interrupts. +//! +//! \return Returns the period of the SysTick counter. +// +//***************************************************************************** +unsigned long +SysTickPeriodGet(void) +{ + // + // Return the period of the SysTick counter. + // + return(HWREG(NVIC_ST_RELOAD) + 1); +} + +//***************************************************************************** +// +//! Gets the current value of the SysTick counter. +//! +//! This function returns the current value of the SysTick counter; this will +//! be a value between the period - 1 and zero, inclusive. +//! +//! \return Returns the current value of the SysTick counter. +// +//***************************************************************************** +unsigned long +SysTickValueGet(void) +{ + // + // Return the current value of the SysTick counter. + // + return(HWREG(NVIC_ST_CURRENT)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.h new file mode 100644 index 00000000..31a7e5d1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/systick.h @@ -0,0 +1,63 @@ +//***************************************************************************** +// +// systick.h - Prototypes for the SysTick driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSTICK_H__ +#define __SYSTICK_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void SysTickEnable(void); +extern void SysTickDisable(void); +extern void SysTickIntRegister(void (*pfnHandler)(void)); +extern void SysTickIntUnregister(void); +extern void SysTickIntEnable(void); +extern void SysTickIntDisable(void); +extern void SysTickPeriodSet(unsigned long ulPeriod); +extern unsigned long SysTickPeriodGet(void); +extern unsigned long SysTickValueGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSTICK_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.c new file mode 100644 index 00000000..9fd98c8a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.c @@ -0,0 +1,1161 @@ +//***************************************************************************** +// +// timer.c - Driver for the timer module. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup timer_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_timer.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/timer.h" + +//***************************************************************************** +// +//! \internal +//! Checks a timer base address. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function determines if a timer module base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +TimerBaseValid(unsigned long ulBase) +{ + return((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) || + (ulBase == TIMER2_BASE) || (ulBase == TIMER3_BASE)); +} +#endif + +//***************************************************************************** +// +//! Enables the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to enable; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! +//! This will enable operation of the timer module. The timer must be +//! configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +TimerEnable(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Enable the timer(s) module. + // + HWREG(ulBase + TIMER_O_CTL) |= ulTimer & (TIMER_CTL_TAEN | TIMER_CTL_TBEN); +} + +//***************************************************************************** +// +//! Disables the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to disable; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! +//! This will disable operation of the timer module. +//! +//! \return None. +// +//***************************************************************************** +void +TimerDisable(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Disable the timer module. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(ulTimer & + (TIMER_CTL_TAEN | TIMER_CTL_TBEN)); +} + +//***************************************************************************** +// +//! Configures the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulConfig is the configuration for the timer. +//! +//! This function configures the operating mode of the timer(s). The timer +//! module is disabled before being configured, and is left in the disabled +//! state. The configuration is specified in \e ulConfig as one of the +//! following values: +//! +//! - \b TIMER_CFG_32_BIT_OS - 32-bit one-shot timer +//! - \b TIMER_CFG_32_BIT_OS_UP - 32-bit one-shot timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_32_BIT_PER - 32-bit periodic timer +//! - \b TIMER_CFG_32_BIT_PER_UP - 32-bit periodic timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_32_RTC - 32-bit real time clock timer +//! - \b TIMER_CFG_16_BIT_PAIR - Two 16-bit timers +//! +//! When configured for a pair of 16-bit timers, each timer is separately +//! configured. The first timer is configured by setting \e ulConfig to +//! the result of a logical OR operation between one of the following values +//! and \e ulConfig: +//! +//! - \b TIMER_CFG_A_ONE_SHOT - 16-bit one-shot timer +//! - \b TIMER_CFG_A_ONE_SHOT_UP - 16-bit one-shot timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_A_PERIODIC - 16-bit periodic timer +//! - \b TIMER_CFG_A_PERIODIC_UP - 16-bit periodic timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_A_CAP_COUNT - 16-bit edge count capture +//! - \b TIMER_CFG_A_CAP_TIME - 16-bit edge time capture +//! - \b TIMER_CFG_A_PWM - 16-bit PWM output +//! +//! Similarly, the second timer is configured by setting \e ulConfig to +//! the result of a logical OR operation between one of the corresponding +//! \b TIMER_CFG_B_* values and \e ulConfig. +//! +//! \return None. +// +//***************************************************************************** +void +TimerConfigure(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulConfig == TIMER_CFG_32_BIT_OS) || + (ulConfig == TIMER_CFG_32_BIT_OS_UP) || + (ulConfig == TIMER_CFG_32_BIT_PER) || + (ulConfig == TIMER_CFG_32_BIT_PER_UP) || + (ulConfig == TIMER_CFG_32_RTC) || + ((ulConfig & 0xff000000) == TIMER_CFG_16_BIT_PAIR)); + ASSERT(((ulConfig & 0xff000000) != TIMER_CFG_16_BIT_PAIR) || + ((((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT_UP) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC_UP) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_COUNT) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_TIME) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PWM)) && + (((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT_UP) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PERIODIC) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PERIODIC_UP) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_CAP_COUNT) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_CAP_TIME) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PWM)))); + + // + // Disable the timers. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(TIMER_CTL_TAEN | TIMER_CTL_TBEN); + + // + // Set the global timer configuration. + // + HWREG(ulBase + TIMER_O_CFG) = ulConfig >> 24; + + // + // Set the configuration of the A and B timers. Note that the B timer + // configuration is ignored by the hardware in 32-bit modes. + // + HWREG(ulBase + TIMER_O_TAMR) = ulConfig & 255; + HWREG(ulBase + TIMER_O_TBMR) = (ulConfig >> 8) & 255; +} + +//***************************************************************************** +// +//! Controls the output level. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param bInvert specifies the output level. +//! +//! This function sets the PWM output level for the specified timer. If the +//! \e bInvert parameter is \b true, then the timer's output will be made +//! active low; otherwise, it will be made active high. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlLevel(unsigned long ulBase, unsigned long ulTimer, + tBoolean bInvert) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the output levels as requested. + // + ulTimer &= TIMER_CTL_TAPWML | TIMER_CTL_TBPWML; + HWREG(ulBase + TIMER_O_CTL) = (bInvert ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Enables or disables the trigger output. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param bEnable specifies the desired trigger state. +//! +//! This function controls the trigger output for the specified timer. If the +//! \e bEnable parameter is \b true, then the timer's output trigger is +//! enabled; otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bEnable) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the trigger output as requested. + // + ulTimer &= TIMER_CTL_TAOTE | TIMER_CTL_TBOTE; + HWREG(ulBase + TIMER_O_CTL) = (bEnable ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Controls the event type. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param ulEvent specifies the type of event; must be one of +//! \b TIMER_EVENT_POS_EDGE, \b TIMER_EVENT_NEG_EDGE, or +//! \b TIMER_EVENT_BOTH_EDGES. +//! +//! This function sets the signal edge(s) that will trigger the timer when in +//! capture mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlEvent(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulEvent) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the event type. + // + ulEvent &= ulTimer & (TIMER_CTL_TAEVENT_M | TIMER_CTL_TBEVENT_M); + HWREG(ulBase + TIMER_O_CTL) = ((HWREG(ulBase + TIMER_O_CTL) & + ~(TIMER_CTL_TAEVENT_M | + TIMER_CTL_TBEVENT_M)) | ulEvent); +} + +//***************************************************************************** +// +//! Controls the stall handling. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param bStall specifies the response to a stall signal. +//! +//! This function controls the stall response for the specified timer. If the +//! \e bStall parameter is \b true, then the timer will stop counting if the +//! processor enters debug mode; otherwise the timer will keep running while in +//! debug mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlStall(unsigned long ulBase, unsigned long ulTimer, + tBoolean bStall) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the stall mode. + // + ulTimer &= TIMER_CTL_TASTALL | TIMER_CTL_TBSTALL; + HWREG(ulBase + TIMER_O_CTL) = (bStall ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Controls the wait on trigger handling. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param bWait specifies if the timer should wait for a trigger input. +//! +//! This function controls whether or not a timer waits for a trigger input to +//! start counting. When enabled, the previous timer in the trigger chain must +//! count to its timeout in order for this timer to start counting. Refer to +//! the part's data sheet for a description of the trigger chain. +//! +//! \note This functionality is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlWaitOnTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bWait) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the wait on trigger mode for timer A. + // + if((ulTimer & TIMER_A) != 0) + { + if(bWait) + { + HWREG(ulBase + TIMER_O_TAMR) |= TIMER_TAMR_TAWOT; + } + else + { + HWREG(ulBase + TIMER_O_TAMR) &= ~(TIMER_TAMR_TAWOT); + } + } + + // + // Set the wait on trigger mode for timer A. + // + if((ulTimer & TIMER_B) != 0) + { + if(bWait) + { + HWREG(ulBase + TIMER_O_TBMR) |= TIMER_TBMR_TBWOT; + } + else + { + HWREG(ulBase + TIMER_O_TBMR) &= ~(TIMER_TBMR_TBWOT); + } + } +} + +//***************************************************************************** +// +//! Enable RTC counting. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function causes the timer to start counting when in RTC mode. If not +//! configured for RTC mode, this will do nothing. +//! +//! \return None. +// +//***************************************************************************** +void +TimerRTCEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Enable RTC counting. + // + HWREG(ulBase + TIMER_O_CTL) |= TIMER_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Disable RTC counting. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function causes the timer to stop counting when in RTC mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerRTCDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable RTC counting. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(TIMER_CTL_RTCEN); +} + +//***************************************************************************** +// +//! Set the timer prescale value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param ulValue is the timer prescale value; must be between 0 and 255, +//! inclusive. +//! +//! This function sets the value of the input clock prescaler. The prescaler +//! is only operational when in 16-bit mode and is used to extend the range of +//! the 16-bit timer modes. +//! +//! \return None. +// +//***************************************************************************** +void +TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + ASSERT(ulValue < 256); + + // + // Set the timer A prescaler if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAPR) = ulValue; + } + + // + // Set the timer B prescaler if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBPR) = ulValue; + } +} + +//***************************************************************************** +// +//! Get the timer prescale value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. +//! +//! This function gets the value of the input clock prescaler. The prescaler +//! is only operational when in 16-bit mode and is used to extend the range of +//! the 16-bit timer modes. +//! +//! \return The value of the timer prescaler. +// +//***************************************************************************** +unsigned long +TimerPrescaleGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Return the appropriate prescale value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAPR) : + HWREG(ulBase + TIMER_O_TBPR)); +} + +//***************************************************************************** +// +//! Set the timer prescale match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param ulValue is the timer prescale match value; must be between 0 and +//! 255, inclusive. +//! +//! This function sets the value of the input clock prescaler match value. +//! When in a 16-bit mode that uses the counter match and the prescaler, the +//! prescale match effectively extends the range of the counter to 24-bits. +//! +//! \note This functionality is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + ASSERT(ulValue < 256); + + // + // Set the timer A prescale match if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAPMR) = ulValue; + } + + // + // Set the timer B prescale match if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBPMR) = ulValue; + } +} + +//***************************************************************************** +// +//! Get the timer prescale match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. +//! +//! This function gets the value of the input clock prescaler match value. +//! When in a 16-bit mode that uses the counter match and prescaler, the +//! prescale match effectively extends the range of the counter to 24-bits. +//! +//! \note This functionality is not available on all parts. +//! +//! \return The value of the timer prescale match. +// +//***************************************************************************** +unsigned long +TimerPrescaleMatchGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Return the appropriate prescale match value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAPMR) : + HWREG(ulBase + TIMER_O_TBPMR)); +} + +//***************************************************************************** +// +//! Sets the timer load value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. Only \b TIMER_A should be used when the +//! timer is configured for 32-bit operation. +//! \param ulValue is the load value. +//! +//! This function sets the timer load value; if the timer is running then the +//! value will be immediately loaded into the timer. +//! +//! \return None. +// +//***************************************************************************** +void +TimerLoadSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the timer A load value if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAILR) = ulValue; + } + + // + // Set the timer B load value if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBILR) = ulValue; + } +} + +//***************************************************************************** +// +//! Gets the timer load value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function gets the currently programmed interval load value for the +//! specified timer. +//! +//! \return Returns the load value for the timer. +// +//***************************************************************************** +unsigned long +TimerLoadGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate load value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAILR) : + HWREG(ulBase + TIMER_O_TBILR)); +} + +//***************************************************************************** +// +//! Gets the current timer value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function reads the current value of the specified timer. +//! +//! \return Returns the current value of the timer. +// +//***************************************************************************** +unsigned long +TimerValueGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate timer value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAR) : + HWREG(ulBase + TIMER_O_TBR)); +} + +//***************************************************************************** +// +//! Sets the timer match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. Only \b TIMER_A should be used when the +//! timer is configured for 32-bit operation. +//! \param ulValue is the match value. +//! +//! This function sets the match value for a timer. This is used in capture +//! count mode to determine when to interrupt the processor and in PWM mode to +//! determine the duty cycle of the output signal. +//! +//! \return None. +// +//***************************************************************************** +void +TimerMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the timer A match value if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAMATCHR) = ulValue; + } + + // + // Set the timer B match value if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBMATCHR) = ulValue; + } +} + +//***************************************************************************** +// +//! Gets the timer match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function gets the match value for the specified timer. +//! +//! \return Returns the match value for the timer. +// +//***************************************************************************** +unsigned long +TimerMatchGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate match value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAMATCHR) : + HWREG(ulBase + TIMER_O_TBMATCHR)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the timer interrupt. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param pfnHandler is a pointer to the function to be called when the timer +//! interrupt occurs. +//! +//! This sets the handler to be called when a timer interrupt occurs. This +//! will enable the global interrupt in the interrupt controller; specific +//! timer interrupts must be enabled via TimerIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source via TimerIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, + void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Get the interrupt number for this timer module. + // + ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A : + ((ulBase == TIMER1_BASE) ? INT_TIMER1A : + ((ulBase == TIMER2_BASE) ? INT_TIMER2A : INT_TIMER3A))); + + // + // Register an interrupt handler for timer A if requested. + // + if(ulTimer & TIMER_A) + { + // + // Register the interrupt handler. + // + IntRegister(ulBase, pfnHandler); + + // + // Enable the interrupt. + // + IntEnable(ulBase); + } + + // + // Register an interrupt handler for timer B if requested. + // + if(ulTimer & TIMER_B) + { + // + // Register the interrupt handler. + // + IntRegister(ulBase + 1, pfnHandler); + + // + // Enable the interrupt. + // + IntEnable(ulBase + 1); + } +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the timer interrupt. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! +//! This function will clear the handler to be called when a timer interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Get the interrupt number for this timer module. + // + ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A : + ((ulBase == TIMER1_BASE) ? INT_TIMER1A : + ((ulBase == TIMER2_BASE) ? INT_TIMER2A : INT_TIMER3A))); + + // + // Unregister the interrupt handler for timer A if requested. + // + if(ulTimer & TIMER_A) + { + // + // Disable the interrupt. + // + IntDisable(ulBase); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulBase); + } + + // + // Unregister the interrupt handler for timer B if requested. + // + if(ulTimer & TIMER_B) + { + // + // Disable the interrupt. + // + IntDisable(ulBase + 1); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulBase + 1); + } +} + +//***************************************************************************** +// +//! Enables individual timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated timer interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter must be the logical OR of any combination of +//! the following: +//! +//! - \b TIMER_CAPB_EVENT - Capture B event interrupt +//! - \b TIMER_CAPB_MATCH - Capture B match interrupt +//! - \b TIMER_TIMB_TIMEOUT - Timer B timeout interrupt +//! - \b TIMER_RTC_MATCH - RTC interrupt mask +//! - \b TIMER_CAPA_EVENT - Capture A event interrupt +//! - \b TIMER_CAPA_MATCH - Capture A match interrupt +//! - \b TIMER_TIMA_TIMEOUT - Timer A timeout interrupt +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + TIMER_O_IMR) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated timer interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to TimerIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + TIMER_O_IMR) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the timer module. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the timer module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! values described in TimerIntEnable(). +// +//***************************************************************************** +unsigned long +TimerIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + return(bMasked ? HWREG(ulBase + TIMER_O_MIS) : + HWREG(ulBase + TIMER_O_RIS)); +} + +//***************************************************************************** +// +//! Clears timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified timer interrupt sources are cleared, so that they no longer +//! assert. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to TimerIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + TIMER_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +// Puts the timer into its reset state. +// +// \param ulBase is the base address of the timer module. +// +// The specified timer is disabled, and all its interrupts are disabled, +// cleared, and unregistered. Then the timer registers are set to their reset +// value. +// +// \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +TimerQuiesce(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable the timer. + // + HWREG(ulBase + TIMER_O_CTL) = TIMER_RV_CTL; + + // + // Disable all the timer interrupts. + // + HWREG(ulBase + TIMER_O_IMR) = TIMER_RV_IMR; + + // + // Clear all the timer interrupts. + // + HWREG(ulBase + TIMER_O_ICR) = 0xFFFFFFFF; + + // + // Unregister the interrupt handler. This also disables interrupts to the + // core. + // + TimerIntUnregister(ulBase, TIMER_BOTH); + + // + // Set all the registers to their reset value. + // + HWREG(ulBase + TIMER_O_CFG) = TIMER_RV_CFG; + HWREG(ulBase + TIMER_O_TAMR) = TIMER_RV_TAMR; + HWREG(ulBase + TIMER_O_TBMR) = TIMER_RV_TBMR; + HWREG(ulBase + TIMER_O_RIS) = TIMER_RV_RIS; + HWREG(ulBase + TIMER_O_MIS) = TIMER_RV_MIS; + HWREG(ulBase + TIMER_O_TAILR) = TIMER_RV_TAILR; + HWREG(ulBase + TIMER_O_TBILR) = TIMER_RV_TBILR; + HWREG(ulBase + TIMER_O_TAMATCHR) = TIMER_RV_TAMATCHR; + HWREG(ulBase + TIMER_O_TBMATCHR) = TIMER_RV_TBMATCHR; + HWREG(ulBase + TIMER_O_TAPR) = TIMER_RV_TAPR; + HWREG(ulBase + TIMER_O_TBPR) = TIMER_RV_TBPR; + HWREG(ulBase + TIMER_O_TAPMR) = TIMER_RV_TAPMR; + HWREG(ulBase + TIMER_O_TBPMR) = TIMER_RV_TBPMR; + HWREG(ulBase + TIMER_O_TAR) = TIMER_RV_TAR; + HWREG(ulBase + TIMER_O_TBR) = TIMER_RV_TBR; +} +#endif // DEPRECATED + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.h new file mode 100644 index 00000000..e59b1e9e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/timer.h @@ -0,0 +1,165 @@ +//***************************************************************************** +// +// timer.h - Prototypes for the timer module +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __TIMER_H__ +#define __TIMER_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to TimerConfigure as the ulConfig parameter. +// +//***************************************************************************** +#define TIMER_CFG_32_BIT_OS 0x00000001 // 32-bit one-shot timer +#define TIMER_CFG_32_BIT_OS_UP 0x00000011 // 32-bit one-shot up-count timer +#define TIMER_CFG_32_BIT_PER 0x00000002 // 32-bit periodic timer +#define TIMER_CFG_32_BIT_PER_UP 0x00000012 // 32-bit periodic up-count timer +#define TIMER_CFG_32_RTC 0x01000000 // 32-bit RTC timer +#define TIMER_CFG_16_BIT_PAIR 0x04000000 // Two 16-bit timers +#define TIMER_CFG_A_ONE_SHOT 0x00000001 // Timer A one-shot timer +#define TIMER_CFG_A_ONE_SHOT_UP 0x00000011 // Timer A one-shot up-count timer +#define TIMER_CFG_A_PERIODIC 0x00000002 // Timer A periodic timer +#define TIMER_CFG_A_PERIODIC_UP 0x00000012 // Timer A periodic up-count timer +#define TIMER_CFG_A_CAP_COUNT 0x00000003 // Timer A event counter +#define TIMER_CFG_A_CAP_TIME 0x00000007 // Timer A event timer +#define TIMER_CFG_A_PWM 0x0000000A // Timer A PWM output +#define TIMER_CFG_B_ONE_SHOT 0x00000100 // Timer B one-shot timer +#define TIMER_CFG_B_ONE_SHOT_UP 0x00001100 // Timer B one-shot up-count timer +#define TIMER_CFG_B_PERIODIC 0x00000200 // Timer B periodic timer +#define TIMER_CFG_B_PERIODIC_UP 0x00001200 // Timer B periodic up-count timer +#define TIMER_CFG_B_CAP_COUNT 0x00000300 // Timer B event counter +#define TIMER_CFG_B_CAP_TIME 0x00000700 // Timer B event timer +#define TIMER_CFG_B_PWM 0x00000A00 // Timer B PWM output + +//***************************************************************************** +// +// Values that can be passed to TimerIntEnable, TimerIntDisable, and +// TimerIntClear as the ulIntFlags parameter, and returned from TimerIntStatus. +// +//***************************************************************************** +#define TIMER_TIMB_MATCH 0x00000800 // TimerB match interrupt +#define TIMER_CAPB_EVENT 0x00000400 // CaptureB event interrupt +#define TIMER_CAPB_MATCH 0x00000200 // CaptureB match interrupt +#define TIMER_TIMB_TIMEOUT 0x00000100 // TimerB time out interrupt +#define TIMER_TIMA_MATCH 0x00000010 // TimerA match interrupt +#define TIMER_RTC_MATCH 0x00000008 // RTC interrupt mask +#define TIMER_CAPA_EVENT 0x00000004 // CaptureA event interrupt +#define TIMER_CAPA_MATCH 0x00000002 // CaptureA match interrupt +#define TIMER_TIMA_TIMEOUT 0x00000001 // TimerA time out interrupt + +//***************************************************************************** +// +// Values that can be passed to TimerControlEvent as the ulEvent parameter. +// +//***************************************************************************** +#define TIMER_EVENT_POS_EDGE 0x00000000 // Count positive edges +#define TIMER_EVENT_NEG_EDGE 0x00000404 // Count negative edges +#define TIMER_EVENT_BOTH_EDGES 0x00000C0C // Count both edges + +//***************************************************************************** +// +// Values that can be passed to most of the timer APIs as the ulTimer +// parameter. +// +//***************************************************************************** +#define TIMER_A 0x000000ff // Timer A +#define TIMER_B 0x0000ff00 // Timer B +#define TIMER_BOTH 0x0000ffff // Timer Both + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void TimerEnable(unsigned long ulBase, unsigned long ulTimer); +extern void TimerDisable(unsigned long ulBase, unsigned long ulTimer); +extern void TimerConfigure(unsigned long ulBase, unsigned long ulConfig); +extern void TimerControlLevel(unsigned long ulBase, unsigned long ulTimer, + tBoolean bInvert); +extern void TimerControlTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bEnable); +extern void TimerControlEvent(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulEvent); +extern void TimerControlStall(unsigned long ulBase, unsigned long ulTimer, + tBoolean bStall); +extern void TimerControlWaitOnTrigger(unsigned long ulBase, + unsigned long ulTimer, + tBoolean bWait); +extern void TimerRTCEnable(unsigned long ulBase); +extern void TimerRTCDisable(unsigned long ulBase); +extern void TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerPrescaleGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerPrescaleMatchGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerLoadSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerLoadGet(unsigned long ulBase, unsigned long ulTimer); +extern unsigned long TimerValueGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerMatchGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, + void (*pfnHandler)(void)); +extern void TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer); +extern void TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long TimerIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags); + +//***************************************************************************** +// +// TimerQuiesce() has been deprecated. SysCtlPeripheralReset() should be used +// instead to return the timer to its reset state. +// +//***************************************************************************** +#ifndef DEPRECATED +extern void TimerQuiesce(unsigned long ulBase); +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __TIMER_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.c new file mode 100644 index 00000000..51f8ab81 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.c @@ -0,0 +1,1611 @@ +//***************************************************************************** +// +// uart.c - Driver for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup uart_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "inc/hw_uart.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/uart.h" + +//***************************************************************************** +// +// The system clock divider defining the maximum baud rate supported by the +// UART. +// +//***************************************************************************** +#define UART_CLK_DIVIDER ((CLASS_IS_SANDSTORM || \ + (CLASS_IS_FURY && REVISION_IS_A2) || \ + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) ? \ + 16 : 8) + +//***************************************************************************** +// +//! \internal +//! Checks a UART base address. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function determines if a UART port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +UARTBaseValid(unsigned long ulBase) +{ + return((ulBase == UART0_BASE) || (ulBase == UART1_BASE) || + (ulBase == UART2_BASE)); +} +#endif + +//***************************************************************************** +// +//! Sets the type of parity. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulParity specifies the type of parity to use. +//! +//! Sets the type of parity to use for transmitting and expect when receiving. +//! The \e ulParity parameter must be one of \b UART_CONFIG_PAR_NONE, +//! \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, +//! or \b UART_CONFIG_PAR_ZERO. The last two allow direct control of the +//! parity bit; it is always either one or zero based on the mode. +//! +//! \return None. +// +//***************************************************************************** +void +UARTParityModeSet(unsigned long ulBase, unsigned long ulParity) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulParity == UART_CONFIG_PAR_NONE) || + (ulParity == UART_CONFIG_PAR_EVEN) || + (ulParity == UART_CONFIG_PAR_ODD) || + (ulParity == UART_CONFIG_PAR_ONE) || + (ulParity == UART_CONFIG_PAR_ZERO)); + + // + // Set the parity mode. + // + HWREG(ulBase + UART_O_LCRH) = ((HWREG(ulBase + UART_O_LCRH) & + ~(UART_LCRH_SPS | UART_LCRH_EPS | + UART_LCRH_PEN)) | ulParity); +} + +//***************************************************************************** +// +//! Gets the type of parity currently being used. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function gets the type of parity used for transmitting data and +//! expected when receiving data. +//! +//! \return Returns the current parity settings, specified as one of +//! \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, +//! \b UART_CONFIG_PAR_ONE, or \b UART_CONFIG_PAR_ZERO. +// +//***************************************************************************** +unsigned long +UARTParityModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current parity setting. + // + return(HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Sets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulTxLevel is the transmit FIFO interrupt level, specified as one of +//! \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, \b UART_FIFO_TX4_8, +//! \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param ulRxLevel is the receive FIFO interrupt level, specified as one of +//! \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, \b UART_FIFO_RX4_8, +//! \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function sets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulTxLevel == UART_FIFO_TX1_8) || + (ulTxLevel == UART_FIFO_TX2_8) || + (ulTxLevel == UART_FIFO_TX4_8) || + (ulTxLevel == UART_FIFO_TX6_8) || + (ulTxLevel == UART_FIFO_TX7_8)); + ASSERT((ulRxLevel == UART_FIFO_RX1_8) || + (ulRxLevel == UART_FIFO_RX2_8) || + (ulRxLevel == UART_FIFO_RX4_8) || + (ulRxLevel == UART_FIFO_RX6_8) || + (ulRxLevel == UART_FIFO_RX7_8)); + + // + // Set the FIFO interrupt levels. + // + HWREG(ulBase + UART_O_IFLS) = ulTxLevel | ulRxLevel; +} + +//***************************************************************************** +// +//! Gets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param pulTxLevel is a pointer to storage for the transmit FIFO level, +//! returned as one of \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, +//! \b UART_FIFO_TX4_8, \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param pulRxLevel is a pointer to storage for the receive FIFO level, +//! returned as one of \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, +//! \b UART_FIFO_RX4_8, \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function gets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Read the FIFO level register. + // + ulTemp = HWREG(ulBase + UART_O_IFLS); + + // + // Extract the transmit and receive FIFO levels. + // + *pulTxLevel = ulTemp & UART_IFLS_TX_M; + *pulRxLevel = ulTemp & UART_IFLS_RX_M; +} + +//***************************************************************************** +// +//! Sets the configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param ulBaud is the desired baud rate. +//! \param ulConfig is the data format for the port (number of data bits, +//! number of stop bits, and parity). +//! +//! This function configures the UART for operation in the specified data +//! format. The baud rate is provided in the \e ulBaud parameter and the data +//! format in the \e ulConfig parameter. +//! +//! The \e ulConfig parameter is the logical OR of three values: the number of +//! data bits, the number of stop bits, and the parity. \b UART_CONFIG_WLEN_8, +//! \b UART_CONFIG_WLEN_7, \b UART_CONFIG_WLEN_6, and \b UART_CONFIG_WLEN_5 +//! select from eight to five data bits per byte (respectively). +//! \b UART_CONFIG_STOP_ONE and \b UART_CONFIG_STOP_TWO select one or two stop +//! bits (respectively). \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, +//! \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, and \b UART_CONFIG_PAR_ZERO +//! select the parity mode (no parity bit, even parity bit, odd parity bit, +//! parity bit always one, and parity bit always zero, respectively). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigSet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT(ulBaud != 0); + ASSERT(ulUARTClk >= (ulBaud * UART_CLK_DIVIDER)); + + // + // Stop the UART. + // + UARTDisable(ulBase); + + // + // Is the required baud rate greater than the maximum rate supported + // without the use of high speed mode? + // + if((ulBaud * 16) > ulUARTClk) + { + // + // Enable high speed mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_HSE; + + // + // Half the supplied baud rate to compensate for enabling high speed + // mode. This allows the following code to be common to both cases. + // + ulBaud /= 2; + } + else + { + // + // Disable high speed mode. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_HSE); + } + + // + // Compute the fractional baud rate divider. + // + ulDiv = (((ulUARTClk * 8) / ulBaud) + 1) / 2; + + // + // Set the baud rate. + // + HWREG(ulBase + UART_O_IBRD) = ulDiv / 64; + HWREG(ulBase + UART_O_FBRD) = ulDiv % 64; + + // + // Set parity, data length, and number of stop bits. + // + HWREG(ulBase + UART_O_LCRH) = ulConfig; + + // + // Clear the flags register. + // + HWREG(ulBase + UART_O_FR) = 0; + + // + // Start the UART. + // + UARTEnable(ulBase); +} + +//***************************************************************************** +// +//! Gets the current configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param pulBaud is a pointer to storage for the baud rate. +//! \param pulConfig is a pointer to storage for the data format. +//! +//! The baud rate and data format for the UART is determined, given an +//! explicitly provided peripheral clock (hence the ExpClk suffix). The +//! returned baud rate is the actual baud rate; it may not be the exact baud +//! rate requested or an ``official'' baud rate. The data format returned in +//! \e pulConfig is enumerated the same as the \e ulConfig parameter of +//! UARTConfigSetExpClk(). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigGet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, unsigned long *pulConfig) +{ + unsigned long ulInt, ulFrac; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Compute the baud rate. + // + ulInt = HWREG(ulBase + UART_O_IBRD); + ulFrac = HWREG(ulBase + UART_O_FBRD); + *pulBaud = (ulUARTClk * 4) / ((64 * ulInt) + ulFrac); + + // + // See if high speed mode enabled. + // + if(HWREG(ulBase + UART_O_CTL) & UART_CTL_HSE) + { + // + // High speed mode is enabled so the actual baud rate is actually + // double what was just calculated. + // + *pulBaud *= 2; + } + + // + // Get the parity, data length, and number of stop bits. + // + *pulConfig = (HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_WLEN_M | UART_LCRH_STP2 | + UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Enables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Sets the UARTEN, TXE, and RXE bits, and enables the transmit and receive +//! FIFOs. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; + + // + // Enable RX, TX, and the UART. + // + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Disables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the UARTEN, TXE, and RXE bits, then waits for the end of +//! transmission of the current character, and flushes the transmit FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait for end of TX. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) + { + } + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); + + // + // Disable the UART. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Enables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions enables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; +} + +//***************************************************************************** +// +//! Disables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions disables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFODisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); +} + +//***************************************************************************** +// +//! Enables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param bLowPower indicates if SIR Low Power Mode is to be used. +//! +//! Enables the SIREN control bit for IrDA mode on the UART. If the +//! \e bLowPower flag is set, then SIRLP bit will also be set. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable SIR and SIRLP (if appropriate). + // + if(bLowPower) + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN | UART_CTL_SIRLP); + } + else + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN); + } +} + +//***************************************************************************** +// +//! Disables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SIREN (IrDA) and SIRLP (Low Power) bits. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisableSIR(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable SIR and SIRLP (if appropriate). + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_SIREN | UART_CTL_SIRLP); +} + +//***************************************************************************** +// +//! Enables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Enables the SMART control bit for ISO 7816 smart card mode on the UART. +//! This call also sets 8 bit word length and even parity as required by ISO +//! 7816. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardEnable(unsigned long ulBase) +{ + unsigned long ulVal; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Set 8 bit word length, even parity, 2 stop bits (even though the STP2 + // bit is ignored when in smartcard mode, this lets the caller read back + // the actual setting in use). + // + ulVal = HWREG(ulBase + UART_O_LCRH); + ulVal &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN | + UART_LCRH_WLEN_M); + ulVal |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | UART_LCRH_STP2; + HWREG(ulBase + UART_O_LCRH) = ulVal; + + // + // Enable SMART mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Disables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SMART (ISO 7816 smart card) bits in the UART control register. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the SMART bit. + // + HWREG(ulBase + UART_O_CTL) &= ~UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Sets the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Sets the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlSet(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp |= (ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Clears the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Clears the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlClear(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp &= ~(ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the states of the DTR and RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the two UART modem control signals, +//! DTR and RTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_OUTPUT_RTS and +//! \b UART_OUTPUT_DTR where the presence of each flag indicates that the +//! associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_CTL) & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); +} + +//***************************************************************************** +// +//! Gets the states of the RI, DCD, DSR and CTS modem status signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the four UART modem status signals, +//! RI, DCD, DSR and CTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_INPUT_RI, \b +//! UART_INPUT_DCD, \b UART_INPUT_CTS and \b UART_INPUT_DSR where the +//! presence of each flag indicates that the associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemStatusGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD | + UART_INPUT_CTS | UART_INPUT_DSR)); +} + +//***************************************************************************** +// +//! Sets the UART hardware flow control mode to be used. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode indicates the flow control modes to be used. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX and \b +//! UART_FLOWCONTROL_RX to enable hardware transmit (CTS) and receive (RTS) +//! flow control or \b UART_FLOWCONTROL_NONE to disable hardware flow control. +//! +//! Sets the required hardware flow control modes. If \e ulMode contains +//! flag \b UART_FLOWCONTROL_TX, data is only transmitted if the incoming CTS +//! signal is asserted. If \e ulMode contains flag \b UART_FLOWCONTROL_RX, +//! the RTS output is controlled by the hardware and is asserted only when +//! there is space available in the receive FIFO. If no hardware flow control +//! is required, UART_FLOWCONTROL_NONE should be passed. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode & ~(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX)) == 0); + + // + // Set the flow control mode as requested. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the UART hardware flow control mode currently in use. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current hardware flow control mode. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns the current flow control mode in use. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX if transmit +//! (CTS) flow control is enabled and \b UART_FLOWCONTROL_RX if receive (RTS) +//! flow control is in use. If hardware flow control is disabled, \b +//! UART_FLOWCONTROL_NONE will be returned. +// +//***************************************************************************** +unsigned long +UARTFlowControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + return(HWREG(ulBase + UART_O_CTL) & (UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)); +} + +//***************************************************************************** +// +//! Sets the operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode is the operating mode for the transmit interrupt. It may be +//! \b UART_TXINT_MODE_EOT to trigger interrupts when the transmitter is idle +//! or \b UART_TXINT_MODE_FIFO to trigger based on the current transmit FIFO +//! level. +//! +//! This function allows the mode of the UART transmit interrupt to be set. By +//! default, the transmit interrupt is asserted when the FIFO level falls past +//! a threshold set via a call to UARTFIFOLevelSet(). Alternatively, if this +//! function is called with \e ulMode set to \b UART_TXINT_MODE_EOT, the +//! transmit interrupt will only be asserted once the transmitter is completely +//! idle - the transmit FIFO is empty and all bits, including any stop bits, +//! have cleared the transmitter. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode == UART_TXINT_MODE_EOT) || + (ulMode == UART_TXINT_MODE_FIFO)); + + // + // Set or clear the EOT bit of the UART control register as appropriate. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the current operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current operating mode for the UART transmit +//! interrupt. The return value will be \b UART_TXINT_MODE_EOT if the +//! transmit interrupt is currently set to be asserted once the transmitter is +//! completely idle - the transmit FIFO is empty and all bits, including any +//! stop bits, have cleared the transmitter. The return value will be \b +//! UART_TXINT_MODE_FIFO if the interrupt is set to be asserted based upon the +//! level of the transmit FIFO. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns \b UART_TXINT_MODE_FIFO or \b UART_TXINT_MODE_EOT. +// +//***************************************************************************** +unsigned long +UARTTxIntModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current transmit interrupt mode. + // + return(HWREG(ulBase + UART_O_CTL) & (UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)); +} + +//***************************************************************************** +// +//! Determines if there are any characters in the receive FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is data +//! available in the receive FIFO. +//! +//! \return Returns \b true if there is data in the receive FIFO or \b false +//! if there is no data in the receive FIFO. +// +//***************************************************************************** +tBoolean +UARTCharsAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of characters. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) ? false : true); +} + +//***************************************************************************** +// +//! Determines if there is any space in the transmit FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is space +//! available in the transmit FIFO. +//! +//! \return Returns \b true if there is space available in the transmit FIFO +//! or \b false if there is no space available in the transmit FIFO. +// +//***************************************************************************** +tBoolean +UARTSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of space. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) ? false : true); +} + +//***************************************************************************** +// +//! Receives a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. +//! +//! This function replaces the original UARTCharNonBlockingGet() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. A \b -1 is returned if there are no characters present in the +//! receive FIFO. The UARTCharsAvail() function should be called before +//! attempting to call this function. +// +//***************************************************************************** +long +UARTCharGetNonBlocking(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there are any characters in the receive FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)) + { + // + // Read and return the next character. + // + return(HWREG(ulBase + UART_O_DR)); + } + else + { + // + // There are no characters, so return a failure. + // + return(-1); + } +} + +//***************************************************************************** +// +//! Waits for a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. If there +//! are no characters available, this function waits until a character is +//! received before returning. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. +// +//***************************************************************************** +long +UARTCharGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until a char is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) + { + } + + // + // Now get the char. + // + return(HWREG(ulBase + UART_O_DR)); +} + +//***************************************************************************** +// +//! Sends a character to the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Writes the character \e ucData to the transmit FIFO for the specified port. +//! This function does not block, so if there is no space available, then a +//! \b false is returned, and the application must retry the function later. +//! +//! This function replaces the original UARTCharNonBlockingPut() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns \b true if the character was successfully placed in the +//! transmit FIFO or \b false if there was no space available in the transmit +//! FIFO. +// +//***************************************************************************** +tBoolean +UARTCharPutNonBlocking(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there is space in the transmit FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF)) + { + // + // Write this character to the transmit FIFO. + // + HWREG(ulBase + UART_O_DR) = ucData; + + // + // Success. + // + return(true); + } + else + { + // + // There is no space in the transmit FIFO, so return a failure. + // + return(false); + } +} + +//***************************************************************************** +// +//! Waits to send a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Sends the character \e ucData to the transmit FIFO for the specified port. +//! If there is no space available in the transmit FIFO, this function waits +//! until there is space available before returning. +//! +//! \return None. +// +//***************************************************************************** +void +UARTCharPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until space is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) + { + } + + // + // Send the char. + // + HWREG(ulBase + UART_O_DR) = ucData; +} + +//***************************************************************************** +// +//! Causes a BREAK to be sent. +//! +//! \param ulBase is the base address of the UART port. +//! \param bBreakState controls the output level. +//! +//! Calling this function with \e bBreakState set to \b true asserts a break +//! condition on the UART. Calling this function with \e bBreakState set to +//! \b false removes the break condition. For proper transmission of a break +//! command, the break must be asserted for at least two complete frames. +//! +//! \return None. +// +//***************************************************************************** +void +UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the break condition as requested. + // + HWREG(ulBase + UART_O_LCRH) = + (bBreakState ? + (HWREG(ulBase + UART_O_LCRH) | UART_LCRH_BRK) : + (HWREG(ulBase + UART_O_LCRH) & ~(UART_LCRH_BRK))); +} + +//***************************************************************************** +// +//! Determines whether the UART transmitter is busy or not. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, the transmit FIFO is +//! empty and all bits of the last transmitted character, including all stop +//! bits, have left the hardware shift register. +//! +//! \return Returns \b true if the UART is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +UARTBusy(unsigned long ulBase) +{ + // + // Check the argument. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine if the UART is busy. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) ? true : false); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param pfnHandler is a pointer to the function to be called when the +//! UART interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; specific UART +//! interrupts must be enabled via UARTIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the UART interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function does the actual unregistering of the interrupt handler. It +//! will clear the handler to be called when a UART interrupt occurs. This +//! will also mask off the interrupt in the interrupt controller so that the +//! interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b UART_INT_OE - Overrun Error interrupt +//! - \b UART_INT_BE - Break Error interrupt +//! - \b UART_INT_PE - Parity Error interrupt +//! - \b UART_INT_FE - Framing Error interrupt +//! - \b UART_INT_RT - Receive Timeout interrupt +//! - \b UART_INT_TX - Transmit interrupt +//! - \b UART_INT_RX - Receive interrupt +//! - \b UART_INT_DSR - DSR interrupt +//! - \b UART_INT_DCD - DCD interrupt +//! - \b UART_INT_CTS - CTS interrupt +//! - \b UART_INT_RI - RI interrupt +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the UART port. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified UART. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in UARTIntEnable(). +// +//***************************************************************************** +unsigned long +UARTIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + UART_O_MIS)); + } + else + { + return(HWREG(ulBase + UART_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified UART interrupt sources are cleared, so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupt from being recognized again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + UART_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Enable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified UART DMA features are enabled. The UART can be +//! configured to use DMA for transmit or receive, and to disable +//! receive if an error occurs. The \e ulDMAFlags parameter is the +//! logical OR of any of the following values: +//! +//! - UART_DMA_RX - enable DMA for receive +//! - UART_DMA_TX - enable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - disable DMA receive on UART error +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable UART DMA features that were enabled +//! by UARTDMAEnable(). The specified UART DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - UART_DMA_RX - disable DMA for receive +//! - UART_DMA_TX - disable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - do not disable DMA receive on UART error +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Gets current receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current state of each of the 4 receiver error +//! sources. The returned errors are equivalent to the four error bits +//! returned via the previous call to UARTCharGet() or UARTCharGetNonBlocking() +//! with the exception that the overrun error is set immediately the overrun +//! occurs rather than when a character is next read. +//! +//! \return Returns a logical OR combination of the receiver error flags, +//! \b UART_RXERROR_FRAMING, \b UART_RXERROR_PARITY, \b UART_RXERROR_BREAK +//! and \b UART_RXERROR_OVERRUN. +// +//***************************************************************************** +unsigned long +UARTRxErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current value of the receive status register. + // + return(HWREG(ulBase + UART_O_RSR) & 0x0000000F); +} + +//***************************************************************************** +// +//! Clears all reported receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function is used to clear all receiver error conditions reported via +//! UARTRxErrorGet(). If using the overrun, framing error, parity error or +//! break interrupts, this function must be called after clearing the interrupt +//! to ensure that later errors of the same type trigger another interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +UARTRxErrorClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Any write to the Error Clear Register will clear all bits which are + // currently set. + // + HWREG(ulBase + UART_O_ECR) = 0; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.h new file mode 100644 index 00000000..2a23fa63 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/uart.h @@ -0,0 +1,243 @@ +//***************************************************************************** +// +// uart.h - Defines and Macros for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UART_H__ +#define __UART_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to UARTIntEnable, UARTIntDisable, and UARTIntClear +// as the ulIntFlags parameter, and returned from UARTIntStatus. +// +//***************************************************************************** +#define UART_INT_OE 0x400 // Overrun Error Interrupt Mask +#define UART_INT_BE 0x200 // Break Error Interrupt Mask +#define UART_INT_PE 0x100 // Parity Error Interrupt Mask +#define UART_INT_FE 0x080 // Framing Error Interrupt Mask +#define UART_INT_RT 0x040 // Receive Timeout Interrupt Mask +#define UART_INT_TX 0x020 // Transmit Interrupt Mask +#define UART_INT_RX 0x010 // Receive Interrupt Mask +#define UART_INT_DSR 0x008 // DSR Modem Interrupt Mask +#define UART_INT_DCD 0x004 // DCD Modem Interrupt Mask +#define UART_INT_CTS 0x002 // CTS Modem Interrupt Mask +#define UART_INT_RI 0x001 // RI Modem Interrupt Mask + +//***************************************************************************** +// +// Values that can be passed to UARTConfigSetExpClk as the ulConfig parameter +// and returned by UARTConfigGetExpClk in the pulConfig parameter. +// Additionally, the UART_CONFIG_PAR_* subset can be passed to +// UARTParityModeSet as the ulParity parameter, and are returned by +// UARTParityModeGet. +// +//***************************************************************************** +#define UART_CONFIG_WLEN_MASK 0x00000060 // Mask for extracting word length +#define UART_CONFIG_WLEN_8 0x00000060 // 8 bit data +#define UART_CONFIG_WLEN_7 0x00000040 // 7 bit data +#define UART_CONFIG_WLEN_6 0x00000020 // 6 bit data +#define UART_CONFIG_WLEN_5 0x00000000 // 5 bit data +#define UART_CONFIG_STOP_MASK 0x00000008 // Mask for extracting stop bits +#define UART_CONFIG_STOP_ONE 0x00000000 // One stop bit +#define UART_CONFIG_STOP_TWO 0x00000008 // Two stop bits +#define UART_CONFIG_PAR_MASK 0x00000086 // Mask for extracting parity +#define UART_CONFIG_PAR_NONE 0x00000000 // No parity +#define UART_CONFIG_PAR_EVEN 0x00000006 // Even parity +#define UART_CONFIG_PAR_ODD 0x00000002 // Odd parity +#define UART_CONFIG_PAR_ONE 0x00000082 // Parity bit is one +#define UART_CONFIG_PAR_ZERO 0x00000086 // Parity bit is zero + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulTxLevel parameter and +// returned by UARTFIFOLevelGet in the pulTxLevel. +// +//***************************************************************************** +#define UART_FIFO_TX1_8 0x00000000 // Transmit interrupt at 1/8 Full +#define UART_FIFO_TX2_8 0x00000001 // Transmit interrupt at 1/4 Full +#define UART_FIFO_TX4_8 0x00000002 // Transmit interrupt at 1/2 Full +#define UART_FIFO_TX6_8 0x00000003 // Transmit interrupt at 3/4 Full +#define UART_FIFO_TX7_8 0x00000004 // Transmit interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulRxLevel parameter and +// returned by UARTFIFOLevelGet in the pulRxLevel. +// +//***************************************************************************** +#define UART_FIFO_RX1_8 0x00000000 // Receive interrupt at 1/8 Full +#define UART_FIFO_RX2_8 0x00000008 // Receive interrupt at 1/4 Full +#define UART_FIFO_RX4_8 0x00000010 // Receive interrupt at 1/2 Full +#define UART_FIFO_RX6_8 0x00000018 // Receive interrupt at 3/4 Full +#define UART_FIFO_RX7_8 0x00000020 // Receive interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTDMAEnable() and UARTDMADisable(). +// +//***************************************************************************** +#define UART_DMA_ERR_RXSTOP 0x00000004 // Stop DMA receive if UART error +#define UART_DMA_TX 0x00000002 // Enable DMA for transmit +#define UART_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Values returned from UARTRxErrorGet(). +// +//***************************************************************************** +#define UART_RXERROR_OVERRUN 0x00000008 +#define UART_RXERROR_BREAK 0x00000004 +#define UART_RXERROR_PARITY 0x00000002 +#define UART_RXERROR_FRAMING 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTHandshakeOutputsSet() or returned from +// UARTHandshakeOutputGet(). +// +//***************************************************************************** +#define UART_OUTPUT_RTS 0x00000800 +#define UART_OUTPUT_DTR 0x00000400 + +//***************************************************************************** +// +// Values that can be returned from UARTHandshakeInputsGet(). +// +//***************************************************************************** +#define UART_INPUT_RI 0x00000100 +#define UART_INPUT_DCD 0x00000004 +#define UART_INPUT_DSR 0x00000002 +#define UART_INPUT_CTS 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTFlowControl() or returned from +// UARTFlowControlGet(). +// +//***************************************************************************** +#define UART_FLOWCONTROL_TX 0x00008000 +#define UART_FLOWCONTROL_RX 0x00004000 +#define UART_FLOWCONTROL_NONE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to UARTTxIntModeSet() or returned from +// UARTTxIntModeGet(). +// +//***************************************************************************** +#define UART_TXINT_MODE_FIFO 0x00000000 +#define UART_TXINT_MODE_EOT 0x00000010 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void UARTParityModeSet(unsigned long ulBase, unsigned long ulParity); +extern unsigned long UARTParityModeGet(unsigned long ulBase); +extern void UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel); +extern void UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel); +extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig); +extern void UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, + unsigned long *pulConfig); +extern void UARTEnable(unsigned long ulBase); +extern void UARTDisable(unsigned long ulBase); +extern void UARTFIFOEnable(unsigned long ulBase); +extern void UARTFIFODisable(unsigned long ulBase); +extern void UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower); +extern void UARTDisableSIR(unsigned long ulBase); +extern tBoolean UARTCharsAvail(unsigned long ulBase); +extern tBoolean UARTSpaceAvail(unsigned long ulBase); +extern long UARTCharGetNonBlocking(unsigned long ulBase); +extern long UARTCharGet(unsigned long ulBase); +extern tBoolean UARTCharPutNonBlocking(unsigned long ulBase, + unsigned char ucData); +extern void UARTCharPut(unsigned long ulBase, unsigned char ucData); +extern void UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState); +extern tBoolean UARTBusy(unsigned long ulBase); +extern void UARTIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void UARTIntUnregister(unsigned long ulBase); +extern void UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long UARTIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern unsigned long UARTRxErrorGet(unsigned long ulBase); +extern void UARTRxErrorClear(unsigned long ulBase); +extern void UARTSmartCardEnable(unsigned long ulBase); +extern void UARTSmartCardDisable(unsigned long ulBase); +extern void UARTModemControlSet(unsigned long ulBase, + unsigned long ulControl); +extern void UARTModemControlClear(unsigned long ulBase, + unsigned long ulControl); +extern unsigned long UARTModemControlGet(unsigned long ulBase); +extern unsigned long UARTModemStatusGet(unsigned long ulBase); +extern void UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTFlowControlGet(unsigned long ulBase); +extern void UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTTxIntModeGet(unsigned long ulBase); + +//***************************************************************************** +// +// Several UART APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define UARTConfigSet(a, b, c) \ + UARTConfigSetExpClk(a, SysCtlClockGet(), b, c) +#define UARTConfigGet(a, b, c) \ + UARTConfigGetExpClk(a, SysCtlClockGet(), b, c) +#define UARTCharNonBlockingGet(a) \ + UARTCharGetNonBlocking(a) +#define UARTCharNonBlockingPut(a, b) \ + UARTCharPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.c new file mode 100644 index 00000000..a9596641 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.c @@ -0,0 +1,1178 @@ +//***************************************************************************** +// +// udma.c - Driver for the micro-DMA controller. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup udma_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_types.h" +#include "inc/hw_udma.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/udma.h" + +//***************************************************************************** +// +//! Enables the uDMA controller for use. +//! +//! This function enables the uDMA controller. The uDMA controller must be +//! enabled before it can be configured and used. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAEnable(void) +{ + // + // Set the master enable bit in the config register. + // + HWREG(UDMA_CFG) = UDMA_CFG_MASTEN; +} + +//***************************************************************************** +// +//! Disables the uDMA controller for use. +//! +//! This function disables the uDMA controller. Once disabled, the uDMA +//! controller will not operate until re-enabled with uDMAEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +uDMADisable(void) +{ + // + // Clear the master enable bit in the config register. + // + HWREG(UDMA_CFG) = 0; +} + +//***************************************************************************** +// +//! Gets the uDMA error status. +//! +//! This function returns the uDMA error status. It should be called from +//! within the uDMA error interrupt handler to determine if a uDMA error +//! occurred. +//! +//! \return Returns non-zero if a uDMA error is pending. +// +//***************************************************************************** +unsigned long +uDMAErrorStatusGet(void) +{ + // + // Return the uDMA error status. + // + return(HWREG(UDMA_ERRCLR)); +} + +//***************************************************************************** +// +//! Clears the uDMA error interrupt. +//! +//! This function clears a pending uDMA error interrupt. It should be called +//! from within the uDMA error interrupt handler to clear the interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAErrorStatusClear(void) +{ + // + // Clear the uDMA error interrupt. + // + HWREG(UDMA_ERRCLR) = 1; +} + +//***************************************************************************** +// +//! Enables a uDMA channel for operation. +//! +//! \param ulChannelNum is the channel number to enable. +//! +//! This function enables a specific uDMA channel for use. This function must +//! be used to enable a channel before it can be used to perform a uDMA +//! transfer. +//! +//! When a uDMA transfer is completed, the channel will be automatically +//! disabled by the uDMA controller. Therefore, this function should be called +//! prior to starting up any new transfer. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelEnable(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the enable set register. + // + HWREG(UDMA_ENASET) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Disables a uDMA channel for operation. +//! +//! \param ulChannelNum is the channel number to disable. +//! +//! This function disables a specific uDMA channel. Once disabled, a channel +//! will not respond to uDMA transfer requests until re-enabled via +//! uDMAChannelEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelDisable(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the enable clear register. + // + HWREG(UDMA_ENACLR) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Checks if a uDMA channel is enabled for operation. +//! +//! \param ulChannelNum is the channel number to check. +//! +//! This function checks to see if a specific uDMA channel is enabled. This +//! can be used to check the status of a transfer, since the channel will +//! be automatically disabled at the end of a transfer. +//! +//! \return Returns \b true if the channel is enabled, \b false if disabled. +// +//***************************************************************************** +tBoolean +uDMAChannelIsEnabled(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // AND the specified channel bit with the enable register, and return the + // result. + // + return((HWREG(UDMA_ENASET) & (1 << ulChannelNum)) ? true : false); +} + +//***************************************************************************** +// +//! Sets the base address for the channel control table. +//! +//! \param pControlTable is a pointer to the 1024 byte aligned base address +//! of the uDMA channel control table. +//! +//! This function sets the base address of the channel control table. This +//! table resides in system memory and holds control information for each uDMA +//! channel. The table must be aligned on a 1024 byte boundary. The base +//! address must be set before any of the channel functions can be used. +//! +//! The size of the channel control table depends on the number of uDMA +//! channels, and which transfer modes are used. Refer to the introductory +//! text and the microcontroller datasheet for more information about the +//! channel control table. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAControlBaseSet(void *pControlTable) +{ + // + // Check the arguments. + // + ASSERT(((unsigned long)pControlTable & ~0x3FF) == + (unsigned long)pControlTable); + ASSERT((unsigned long)pControlTable >= 0x20000000); + + // + // Program the base address into the register. + // + HWREG(UDMA_CTLBASE) = (unsigned long)pControlTable; +} + +//***************************************************************************** +// +//! Gets the base address for the channel control table. +//! +//! This function gets the base address of the channel control table. This +//! table resides in system memory and holds control information for each uDMA +//! channel. +//! +//! \return Returns a pointer to the base address of the channel control table. +// +//***************************************************************************** +void * +uDMAControlBaseGet(void) +{ + // + // Read the current value of the control base register, and return it to + // the caller. + // + return((void *)HWREG(UDMA_CTLBASE)); +} + +//***************************************************************************** +// +//! Gets the base address for the channel control table alternate structures. +//! +//! This function gets the base address of the second half of the channel +//! control table that holds the alternate control structures for each channel. +//! +//! \return Returns a pointer to the base address of the second half of the +//! channel control table. +// +//***************************************************************************** +void * +uDMAControlAlternateBaseGet(void) +{ + // + // Read the current value of the control base register, and return it to + // the caller. + // + return((void *)HWREG(UDMA_ALTBASE)); +} + +//***************************************************************************** +// +//! Requests a uDMA channel to start a transfer. +//! +//! \param ulChannelNum is the channel number on which to request a uDMA +//! transfer. +//! +//! This function allows software to request a uDMA channel to begin a +//! transfer. This could be used for performing a memory to memory transfer, +//! or if for some reason a transfer needs to be initiated by software instead +//! of the peripheral associated with that channel. +//! +//! \note If the channel is \b UDMA_CHANNEL_SW and interrupts are used, then +//! the completion will be signaled on the uDMA dedicated interrupt. If a +//! peripheral channel is used, then the completion will be signaled on the +//! peripheral's interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelRequest(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the software uDMA request register. + // + HWREG(UDMA_SWREQ) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Enables attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! \param ulAttr is a combination of attributes for the channel. +//! +//! The \e ulAttr parameter is the logical OR of any of the following: +//! +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel (it is very unlikely that this flag should be used) +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelAttributeEnable(unsigned long ulChannelNum, unsigned long ulAttr) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + ASSERT((ulAttr & ~(UDMA_ATTR_USEBURST | UDMA_ATTR_ALTSELECT | + UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK)) == 0); + + // + // Set the useburst bit for this channel if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_USEBURST) + { + HWREG(UDMA_USEBURSTSET) = 1 << ulChannelNum; + } + + // + // Set the alternate control select bit for this channel, + // if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_ALTSELECT) + { + HWREG(UDMA_ALTSET) = 1 << ulChannelNum; + } + + // + // Set the high priority bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_HIGH_PRIORITY) + { + HWREG(UDMA_PRIOSET) = 1 << ulChannelNum; + } + + // + // Set the request mask bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_REQMASK) + { + HWREG(UDMA_REQMASKSET) = 1 << ulChannelNum; + } +} + +//***************************************************************************** +// +//! Disables attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! \param ulAttr is a combination of attributes for the channel. +//! +//! This function is used to disable attributes of a uDMA channel. +//! +//! The \e ulAttr parameter is the logical OR of any of the following: +//! +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel. +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority. +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelAttributeDisable(unsigned long ulChannelNum, unsigned long ulAttr) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + ASSERT((ulAttr & ~(UDMA_ATTR_USEBURST | UDMA_ATTR_ALTSELECT | + UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK)) == 0); + + // + // Clear the useburst bit for this channel if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_USEBURST) + { + HWREG(UDMA_USEBURSTCLR) = 1 << ulChannelNum; + } + + // + // Clear the alternate control select bit for this channel, if set in + // ulConfig. + // + if(ulAttr & UDMA_ATTR_ALTSELECT) + { + HWREG(UDMA_ALTCLR) = 1 << ulChannelNum; + } + + // + // Clear the high priority bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_HIGH_PRIORITY) + { + HWREG(UDMA_PRIOCLR) = 1 << ulChannelNum; + } + + // + // Clear the request mask bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_REQMASK) + { + HWREG(UDMA_REQMASKCLR) = 1 << ulChannelNum; + } +} + +//***************************************************************************** +// +//! Gets the enabled attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! +//! This function returns a combination of flags representing the attributes of +//! the uDMA channel. +//! +//! \return Returns the logical OR of the attributes of the uDMA channel, which +//! can be any of the following: +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel. +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority. +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +// +//***************************************************************************** +unsigned long +uDMAChannelAttributeGet(unsigned long ulChannelNum) +{ + unsigned long ulAttr = 0; + + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Check to see if useburst bit is set for this channel. + // + if(HWREG(UDMA_USEBURSTSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_USEBURST; + } + + // + // Check to see if the alternate control bit is set for this channel. + // + if(HWREG(UDMA_ALTSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_ALTSELECT; + } + + // + // Check to see if the high priority bit is set for this channel. + // + if(HWREG(UDMA_PRIOSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_HIGH_PRIORITY; + } + + // + // Check to see if the request mask bit is set for this channel. + // + if(HWREG(UDMA_REQMASKSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_REQMASK; + } + + // + // Return the configuration flags. + // + return(ulAttr); +} + +//***************************************************************************** +// +//! Sets the control parameters for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! \param ulControl is logical OR of several control values to set the control +//! parameters for the channel. +//! +//! This function is used to set control parameters for a uDMA transfer. These +//! are typically parameters that are not changed often. +//! +//! The \e ulChannelStructIndex parameter should be the logical OR of the +//! channel number with one of \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT to +//! choose whether the primary or alternate data structure is used. +//! +//! The \e ulControl parameter is the logical OR of five values: the data size, +//! the source address increment, the destination address increment, the +//! arbitration size, and the use burst flag. The choices available for each +//! of these values is described below. +//! +//! Choose the data size from one of \b UDMA_SIZE_8, \b UDMA_SIZE_16, or +//! \b UDMA_SIZE_32 to select a data size of 8, 16, or 32 bits. +//! +//! Choose the source address increment from one of \b UDMA_SRC_INC_8, +//! \b UDMA_SRC_INC_16, \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE to select +//! an address increment of 8-bit bytes, 16-bit halfwords, 32-bit words, or +//! to select non-incrementing. +//! +//! Choose the destination address increment from one of \b UDMA_DST_INC_8, +//! \b UDMA_DST_INC_16, \b UDMA_DST_INC_32, or \b UDMA_DST_INC_NONE to select +//! an address increment of 8-bit bytes, 16-bit halfwords, 32-bit words, or +//! to select non-incrementing. +//! +//! The arbitration size determines how many items are transferred before +//! the uDMA controller re-arbitrates for the bus. Choose the arbitration size +//! from one of \b UDMA_ARB_1, \b UDMA_ARB_2, \b UDMA_ARB_4, \b UDMA_ARB_8, +//! through \b UDMA_ARB_1024 to select the arbitration size from 1 to 1024 +//! items, in powers of 2. +//! +//! The value \b UDMA_NEXT_USEBURST is used to force the channel to only +//! respond to burst requests at the tail end of a scatter-gather transfer. +//! +//! \note The address increment cannot be smaller than the data size. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelControlSet(unsigned long ulChannelStructIndex, + unsigned long ulControl) +{ + tDMAControlTable *pCtl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pCtl = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off the fields to be + // changed, then OR in the new settings. + // + pCtl[ulChannelStructIndex].ulControl = + ((pCtl[ulChannelStructIndex].ulControl & + ~(UDMA_CHCTL_DSTINC_M | + UDMA_CHCTL_DSTSIZE_M | + UDMA_CHCTL_SRCINC_M | + UDMA_CHCTL_SRCSIZE_M | + UDMA_CHCTL_ARBSIZE_M | + UDMA_CHCTL_NXTUSEBURST)) | + ulControl); +} + +//***************************************************************************** +// +//! Sets the transfer parameters for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! \param ulMode is the type of uDMA transfer. +//! \param pvSrcAddr is the source address for the transfer. +//! \param pvDstAddr is the destination address for the transfer. +//! \param ulTransferSize is the number of data items to transfer. +//! +//! This function is used to set the parameters for a uDMA transfer. These are +//! typically parameters that are changed often. The function +//! uDMAChannelControlSet() MUST be called at least once for this channel prior +//! to calling this function. +//! +//! The \e ulChannelStructIndex parameter should be the logical OR of the +//! channel number with one of \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT to +//! choose whether the primary or alternate data structure is used. +//! +//! The \e ulMode parameter should be one of the following values: +//! +//! - \b UDMA_MODE_STOP stops the uDMA transfer. The controller sets the mode +//! to this value at the end of a transfer. +//! - \b UDMA_MODE_BASIC to perform a basic transfer based on request. +//! - \b UDMA_MODE_AUTO to perform a transfer that will always complete once +//! started even if request is removed. +//! - \b UDMA_MODE_PINGPONG to set up a transfer that switches between the +//! primary and alternate control structures for the channel. This allows +//! use of ping-pong buffering for uDMA transfers. +//! - \b UDMA_MODE_MEM_SCATTER_GATHER to set up a memory scatter-gather +//! transfer. +//! - \b UDMA_MODE_PER_SCATTER_GATHER to set up a peripheral scatter-gather +//! transfer. +//! +//! The \e pvSrcAddr and \e pvDstAddr parameters are pointers to the first +//! location of the data to be transferred. These addresses should be aligned +//! according to the item size. The compiler will take care of this if the +//! pointers are pointing to storage of the appropriate data type. +//! +//! The \e ulTransferSize parameter is the number of data items, not the number +//! of bytes. +//! +//! The two scatter/gather modes, memory and peripheral, are actually different +//! depending on whether the primary or alternate control structure is +//! selected. This function will look for the \b UDMA_PRI_SELECT and +//! \b UDMA_ALT_SELECT flag along with the channel number and will set the +//! scatter/gather mode as appropriate for the primary or alternate control +//! structure. +//! +//! The channel must also be enabled using uDMAChannelEnable() after calling +//! this function. The transfer will not begin until the channel has been set +//! up and enabled. Note that the channel is automatically disabled after the +//! transfer is completed, meaning that uDMAChannelEnable() must be called +//! again after setting up the next transfer. +//! +//! \note Great care must be taken to not modify a channel control structure +//! that is in use or else the results will be unpredictable, including the +//! possibility of undesired data transfers to or from memory or peripherals. +//! For BASIC and AUTO modes, it is safe to make changes when the channel is +//! disabled, or the uDMAChannelModeGet() returns \b UDMA_MODE_STOP. For +//! PINGPONG or one of the SCATTER_GATHER modes, it is safe to modify the +//! primary or alternate control structure only when the other is being used. +//! The uDMAChannelModeGet() function will return \b UDMA_MODE_STOP when a +//! channel control structure is inactive and safe to modify. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelTransferSet(unsigned long ulChannelStructIndex, + unsigned long ulMode, void *pvSrcAddr, void *pvDstAddr, + unsigned long ulTransferSize) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + unsigned long ulInc; + unsigned long ulBufferBytes; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + ASSERT(ulMode <= UDMA_MODE_PER_SCATTER_GATHER); + ASSERT((unsigned long)pvSrcAddr >= 0x20000000); + ASSERT((unsigned long)pvDstAddr >= 0x20000000); + ASSERT((ulTransferSize != 0) && (ulTransferSize <= 1024)); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off the mode and size + // fields. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + ~(UDMA_CHCTL_XFERSIZE_M | UDMA_CHCTL_XFERMODE_M)); + + // + // Adjust the mode if the alt control structure is selected. + // + if(ulChannelStructIndex & UDMA_ALT_SELECT) + { + if((ulMode == UDMA_MODE_MEM_SCATTER_GATHER) || + (ulMode == UDMA_MODE_PER_SCATTER_GATHER)) + { + ulMode |= UDMA_MODE_ALT_SELECT; + } + } + + // + // Set the transfer size and mode in the control word (but don't write the + // control word yet as it could kick off a transfer). + // + ulControl |= ulMode | ((ulTransferSize - 1) << 4); + + // + // Get the address increment value for the source, from the control word. + // + ulInc = (ulControl & UDMA_CHCTL_SRCINC_M); + + // + // Compute the ending source address of the transfer. If the source + // increment is set to none, then the ending address is the same as the + // beginning. + // + if(ulInc != UDMA_SRC_INC_NONE) + { + ulInc = ulInc >> 26; + ulBufferBytes = ulTransferSize << ulInc; + pvSrcAddr = (void *)((unsigned long)pvSrcAddr + ulBufferBytes - 1); + } + + // + // Load the source ending address into the control block. + // + pControlTable[ulChannelStructIndex].pvSrcEndAddr = pvSrcAddr; + + // + // Get the address increment value for the destination, from the control + // word. + // + ulInc = ulControl & UDMA_CHCTL_DSTINC_M; + + // + // Compute the ending destination address of the transfer. If the + // destination increment is set to none, then the ending address is the + // same as the beginning. + // + if(ulInc != UDMA_DST_INC_NONE) + { + // + // There is a special case if this is setting up a scatter-gather + // transfer. The destination pointer needs to point to the end of + // the alternate structure for this channel instead of calculating + // the end of the buffer in the normal way. + // + if((ulMode == UDMA_MODE_MEM_SCATTER_GATHER) || + (ulMode == UDMA_MODE_PER_SCATTER_GATHER)) + { + pvDstAddr = + (void *)&pControlTable[ulChannelStructIndex | + UDMA_ALT_SELECT].ulSpare; + } + // + // Not a scatter-gather transfer, calculate end pointer normally. + // + else + { + ulInc = ulInc >> 30; + ulBufferBytes = ulTransferSize << ulInc; + pvDstAddr = (void *)((unsigned long)pvDstAddr + ulBufferBytes - 1); + } + } + + // + // Load the destination ending address into the control block. + // + pControlTable[ulChannelStructIndex].pvDstEndAddr = pvDstAddr; + + // + // Write the new control word value. + // + pControlTable[ulChannelStructIndex].ulControl = ulControl; +} + +//***************************************************************************** +// +//! Configures a uDMA channel for scatter-gather mode. +//! +//! \param ulChannelNum is the uDMA channel number. +//! \param ulTaskCount is the number of scatter-gather tasks to execute. +//! \param pvTaskList is a pointer to the beginning of the scatter-gather +//! task list. +//! \param ulIsPeriphSG is a flag to indicate it is a peripheral scatter-gather +//! transfer (else it will be memory scatter-gather transfer) +//! +//! This function is used to configure a channel for scatter-gather mode. +//! The caller must have already set up a task list, and pass a pointer to +//! the start of the task list as the \e pvTaskList parameter. The +//! \e ulTaskCount parameter is the count of tasks in the task list, not the +//! size of the task list. The flag \e bIsPeriphSG should be used to indicate +//! if the scatter-gather should be configured for a peripheral or memory +//! scatter-gather operation. +//! +//! \sa uDMATaskStructEntry +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelScatterGatherSet(unsigned long ulChannelNum, unsigned ulTaskCount, + void *pvTaskList, unsigned long ulIsPeriphSG) +{ + tDMAControlTable *pControlTable; + tDMAControlTable *pTaskTable; + + // + // Check the parameters + // + ASSERT(ulChannelNum < 32); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + ASSERT(pvTaskList != 0); + ASSERT(ulTaskCount <= 1024); + ASSERT(ulTaskCount != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get a handy pointer to the task list + // + pTaskTable = (tDMAControlTable *)pvTaskList; + + // + // Compute the ending address for the source pointer. This will be the + // last element of the last task in the task table + // + pControlTable[ulChannelNum].pvSrcEndAddr = + &pTaskTable[ulTaskCount - 1].ulSpare; + + // + // Compute the ending address for the destination pointer. This will be + // the end of the alternate structure for this channel. + // + pControlTable[ulChannelNum].pvDstEndAddr = + &pControlTable[ulChannelNum | UDMA_ALT_SELECT].ulSpare; + + // + // Compute the control word. Most configurable items are fixed for + // scatter-gather. Item and increment sizes are all 32-bit and arb + // size must be 4. The count is the number of items in the task list + // times 4 (4 words per task). + // + pControlTable[ulChannelNum].ulControl = + (UDMA_CHCTL_DSTINC_32 | UDMA_CHCTL_DSTSIZE_32 | + UDMA_CHCTL_SRCINC_32 | UDMA_CHCTL_SRCSIZE_32 | + UDMA_CHCTL_ARBSIZE_4 | + (((ulTaskCount * 4) - 1) << UDMA_CHCTL_XFERSIZE_S) | + (ulIsPeriphSG ? UDMA_CHCTL_XFERMODE_PER_SG : + UDMA_CHCTL_XFERMODE_MEM_SG)); +} + +//***************************************************************************** +// +//! Gets the current transfer size for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! +//! This function is used to get the uDMA transfer size for a channel. The +//! transfer size is the number of items to transfer, where the size of an item +//! might be 8, 16, or 32 bits. If a partial transfer has already occurred, +//! then the number of remaining items will be returned. If the transfer is +//! complete, then 0 will be returned. +//! +//! \return Returns the number of items remaining to transfer. +// +//***************************************************************************** +unsigned long +uDMAChannelSizeGet(unsigned long ulChannelStructIndex) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off all but the size field + // and the mode field. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + (UDMA_CHCTL_XFERSIZE_M | UDMA_CHCTL_XFERMODE_M)); + + // + // If the size field and mode field are 0 then the transfer is finished + // and there are no more items to transfer + // + if(ulControl == 0) + { + return(0); + } + + // + // Otherwise, if either the size field or more field is non-zero, then + // not all the items have been transferred. + // + else + { + // + // Shift the size field and add one, then return to user. + // + return((ulControl >> 4) + 1); + } +} + +//***************************************************************************** +// +//! Gets the transfer mode for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! +//! This function is used to get the transfer mode for the uDMA channel. It +//! can be used to query the status of a transfer on a channel. When the +//! transfer is complete the mode will be \b UDMA_MODE_STOP. +//! +//! \return Returns the transfer mode of the specified channel and control +//! structure, which will be one of the following values: \b UDMA_MODE_STOP, +//! \b UDMA_MODE_BASIC, \b UDMA_MODE_AUTO, \b UDMA_MODE_PINGPONG, +//! \b UDMA_MODE_MEM_SCATTER_GATHER, or \b UDMA_MODE_PER_SCATTER_GATHER. +// +//***************************************************************************** +unsigned long +uDMAChannelModeGet(unsigned long ulChannelStructIndex) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off all but the mode field. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + UDMA_CHCTL_XFERMODE_M); + + // + // Check if scatter/gather mode, and if so, mask off the alt bit. + // + if(((ulControl & ~UDMA_MODE_ALT_SELECT) == UDMA_MODE_MEM_SCATTER_GATHER) || + ((ulControl & ~UDMA_MODE_ALT_SELECT) == UDMA_MODE_PER_SCATTER_GATHER)) + { + ulControl &= ~UDMA_MODE_ALT_SELECT; + } + + // + // Return the mode to the caller. + // + return(ulControl); +} + +//***************************************************************************** +// +//! Selects the secondary peripheral for a set of uDMA channels. +//! +//! \param ulSecPeriphs is the logical or of the uDMA channels for which to +//! use the secondary peripheral, instead of the default peripheral. +//! +//! This function is used to select the secondary peripheral assignment for +//! a set of uDMA channels. By selecting the secondary peripheral assignment +//! for a channel, the default peripheral assignment is no longer available +//! for that channel. +//! +//! The parameter \e ulSecPeriphs can be the logical OR of any of the +//! following macros. If one of the macros below is in the list passed +//! to this function, then the secondary peripheral (marked as \b _SEC_) +//! will be selected. +//! +//! - \b UDMA_DEF_USBEP1RX_SEC_UART2RX +//! - \b UDMA_DEF_USBEP1TX_SEC_UART2TX +//! - \b UDMA_DEF_USBEP2RX_SEC_TMR3A +//! - \b UDMA_DEF_USBEP2TX_SEC_TMR3B +//! - \b UDMA_DEF_USBEP3RX_SEC_TMR2A +//! - \b UDMA_DEF_USBEP3TX_SEC_TMR2B +//! - \b UDMA_DEF_ETH0RX_SEC_TMR2A +//! - \b UDMA_DEF_ETH0TX_SEC_TMR2B +//! - \b UDMA_DEF_UART0RX_SEC_UART1RX +//! - \b UDMA_DEF_UART0TX_SEC_UART1TX +//! - \b UDMA_DEF_SSI0RX_SEC_SSI1RX +//! - \b UDMA_DEF_SSI0TX_SEC_SSI1TX +//! - \b UDMA_DEF_RESERVED_SEC_UART2RX +//! - \b UDMA_DEF_RESERVED_SEC_UART2TX +//! - \b UDMA_DEF_ADC00_SEC_TMR2A +//! - \b UDMA_DEF_ADC01_SEC_TMR2B +//! - \b UDMA_DEF_ADC02_SEC_RESERVED +//! - \b UDMA_DEF_ADC03_SEC_RESERVED +//! - \b UDMA_DEF_TMR0A_SEC_TMR1A +//! - \b UDMA_DEF_TMR0B_SEC_TMR1B +//! - \b UDMA_DEF_TMR1A_SEC_EPI0RX +//! - \b UDMA_DEF_TMR1B_SEC_EPI0TX +//! - \b UDMA_DEF_UART1RX_SEC_RESERVED +//! - \b UDMA_DEF_UART1TX_SEC_RESERVED +//! - \b UDMA_DEF_SSI1RX_SEC_ADC10 +//! - \b UDMA_DEF_SSI1TX_SEC_ADC11 +//! - \b UDMA_DEF_RESERVED_SEC_ADC12 +//! - \b UDMA_DEF_RESERVED_SEC_ADC13 +//! - \b UDMA_DEF_I2S0RX_SEC_RESERVED +//! - \b UDMA_DEF_I2S0TX_SEC_RESERVED +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelSelectSecondary(unsigned long ulSecPeriphs) +{ + // + // Select the secondary peripheral for the specified channels. + // + HWREG(UDMA_CHASGN) |= ulSecPeriphs; +} + +//***************************************************************************** +// +//! Selects the default peripheral for a set of uDMA channels. +//! +//! \param ulDefPeriphs is the logical or of the uDMA channels for which to +//! use the default peripheral, instead of the secondary peripheral. +//! +//! This function is used to select the default peripheral assignment for +//! a set of uDMA channels. +//! +//! The parameter \e ulDefPeriphs can be the logical OR of any of the +//! following macros. If one of the macros below is in the list passed +//! to this function, then the default peripheral (marked as \b _DEF_) +//! will be selected. +//! +//! - \b UDMA_DEF_USBEP1RX_SEC_UART2RX +//! - \b UDMA_DEF_USBEP1TX_SEC_UART2TX +//! - \b UDMA_DEF_USBEP2RX_SEC_TMR3A +//! - \b UDMA_DEF_USBEP2TX_SEC_TMR3B +//! - \b UDMA_DEF_USBEP3RX_SEC_TMR2A +//! - \b UDMA_DEF_USBEP3TX_SEC_TMR2B +//! - \b UDMA_DEF_ETH0RX_SEC_TMR2A +//! - \b UDMA_DEF_ETH0TX_SEC_TMR2B +//! - \b UDMA_DEF_UART0RX_SEC_UART1RX +//! - \b UDMA_DEF_UART0TX_SEC_UART1TX +//! - \b UDMA_DEF_SSI0RX_SEC_SSI1RX +//! - \b UDMA_DEF_SSI0TX_SEC_SSI1TX +//! - \b UDMA_DEF_RESERVED_SEC_UART2RX +//! - \b UDMA_DEF_RESERVED_SEC_UART2TX +//! - \b UDMA_DEF_ADC00_SEC_TMR2A +//! - \b UDMA_DEF_ADC01_SEC_TMR2B +//! - \b UDMA_DEF_ADC02_SEC_RESERVED +//! - \b UDMA_DEF_ADC03_SEC_RESERVED +//! - \b UDMA_DEF_TMR0A_SEC_TMR1A +//! - \b UDMA_DEF_TMR0B_SEC_TMR1B +//! - \b UDMA_DEF_TMR1A_SEC_EPI0RX +//! - \b UDMA_DEF_TMR1B_SEC_EPI0TX +//! - \b UDMA_DEF_UART1RX_SEC_RESERVED +//! - \b UDMA_DEF_UART1TX_SEC_RESERVED +//! - \b UDMA_DEF_SSI1RX_SEC_ADC10 +//! - \b UDMA_DEF_SSI1TX_SEC_ADC11 +//! - \b UDMA_DEF_RESERVED_SEC_ADC12 +//! - \b UDMA_DEF_RESERVED_SEC_ADC13 +//! - \b UDMA_DEF_I2S0RX_SEC_RESERVED +//! - \b UDMA_DEF_I2S0TX_SEC_RESERVED +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelSelectDefault(unsigned long ulDefPeriphs) +{ + // + // Select the default peripheral for the specified channels. + // + HWREG(UDMA_CHASGN) &= ~ulDefPeriphs; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the uDMA controller. +//! +//! \param ulIntChannel identifies which uDMA interrupt is to be registered. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the uDMA controller +//! generates an interrupt. The \e ulIntChannel parameter should be one of the +//! following: +//! +//! - \b UDMA_INT_SW to register an interrupt handler to process interrupts +//! from the uDMA software channel (UDMA_CHANNEL_SW) +//! - \b UDMA_INT_ERR to register an interrupt handler to process uDMA error +//! interrupts +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \note The interrupt handler for uDMA is for transfer completion when the +//! channel UDMA_CHANNEL_SW is used, and for error interrupts. The +//! interrupts for each peripheral channel are handled through the individual +//! peripheral interrupt handlers. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAIntRegister(unsigned long ulIntChannel, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(pfnHandler); + ASSERT((ulIntChannel == UDMA_INT_SW) || (ulIntChannel == UDMA_INT_ERR)); + + // + // Register the interrupt handler. + // + IntRegister(ulIntChannel, pfnHandler); + + // + // Enable the memory management fault. + // + IntEnable(ulIntChannel); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the uDMA controller. +//! +//! \param ulIntChannel identifies which uDMA interrupt to unregister. +//! +//! This function will disable and clear the handler to be called for the +//! specified uDMA interrupt. The \e ulIntChannel parameter should be one of +//! \b UDMA_INT_SW or \b UDMA_INT_ERR as documented for the function +//! uDMAIntRegister(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAIntUnregister(unsigned long ulIntChannel) +{ + // + // Disable the interrupt. + // + IntDisable(ulIntChannel); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulIntChannel); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.h new file mode 100644 index 00000000..5a876fdb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/udma.h @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// udma.h - Prototypes and macros for the uDMA controller. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UDMA_H__ +#define __UDMA_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +//! \addtogroup udma_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// A structure that defines an entry in the channel control table. These +// fields are used by the uDMA controller and normally it is not necessary for +// software to directly read or write fields in the table. +// +//***************************************************************************** +typedef struct +{ + // + // The ending source address of the data transfer. + // + volatile void *pvSrcEndAddr; + + // + // The ending destination address of the data transfer. + // + volatile void *pvDstEndAddr; + + // + // The channel control mode. + // + volatile unsigned long ulControl; + + // + // An unused location. + // + volatile unsigned long ulSpare; +} +tDMAControlTable; + +//***************************************************************************** +// +//! A helper macro for building scatter-gather task table entries. +//! +//! \param ulTransferCount is the count of items to transfer for this task. +//! \param ulItemSize is the bit size of the items to transfer for this task. +//! \param ulSrcIncrement is the bit size increment for source data. +//! \param pvSrcAddr is the starting address of the data to transfer. +//! \param ulDstIncrement is the bit size increment for destination data. +//! \param pvDstAddr is the starting address of the destination data. +//! \param ulArbSize is the arbitration size to use for the transfer task. +//! \param ulMode is the transfer mode for this task. +//! +//! This macro is intended to be used to help populate a table of uDMA tasks +//! for a scatter-gather transfer. This macro will calculate the values for +//! the fields of a task structure entry based on the input parameters. +//! +//! There are specific requirements for the values of each parameter. No +//! checking is done so it is up to the caller to ensure that correct values +//! are used for the parameters. +//! +//! The \e ulTransferCount parameter is the number of items that will be +//! transferred by this task. It must be in the range 1-1024. +//! +//! The \e ulItemSize parameter is the bit size of the transfer data. It must +//! be one of \b UDMA_SIZE_8, \b UDMA_SIZE_16, or \b UDMA_SIZE_32. +//! +//! The \e ulSrcIncrement parameter is the increment size for the source data. +//! It must be one of \b UDMA_SRC_INC_8, \b UDMA_SRC_INC_16, +//! \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE. +//! +//! The \e pvSrcAddr parameter is a void pointer to the beginning of the source +//! data. +//! +//! The \e ulDstIncrement parameter is the increment size for the destination +//! data. It must be one of \b UDMA_SRC_INC_8, \b UDMA_SRC_INC_16, +//! \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE. +//! +//! The \e pvDstAddr parameter is a void pointer to the beginning of the +//! location where the data will be transferred. +//! +//! The \e ulArbSize parameter is the arbitration size for the transfer, and +//! must be one of \b UDMA_ARB_1, \b UDMA_ARB_2, \b UDMA_ARB_4, and so on +//! up to \b UDMA_ARB_1024. This is used to select the arbitration size in +//! powers of 2, from 1 to 1024. +//! +//! The \e ulMode parameter is the mode to use for this transfer task. It +//! must be one of \b UDMA_MODE_BASIC, \b UDMA_MODE_AUTO, +//! \b UDMA_MODE_MEM_SCATTER_GATHER, or \b UDMA_MODE_PER_SCATTER_GATHER. Note +//! that normally all tasks will be one of the scatter-gather modes while the +//! last task is a task list will be AUTO or BASIC. +//! +//! This macro is intended to be used to initialize individual entries of +//! a structure of tDMAControlTable type, like this: +//! +//! \verbatim +//! tDMAControlTable MyTaskList[] = +//! { +//! uDMATaskStructEntry(Task1Count, UDMA_SIZE_8, +//! UDMA_SRC_INC_8, MySourceBuf, +//! UDMA_DST_INC_8, MyDestBuf, +//! UDMA_ARB_8, UDMA_MODE_MEM_SCATTER_GATHER), +//! uDMATaskStructEntry(Task2Count, ... ), +//! } +//! \endverbatim +//! +//! \return Nothing; this is not a function. +// +//***************************************************************************** +#define uDMATaskStructEntry(ulTransferCount, \ + ulItemSize, \ + ulSrcIncrement, \ + pvSrcAddr, \ + ulDstIncrement, \ + pvDstAddr, \ + ulArbSize, \ + ulMode) \ + { \ + (((ulSrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ + ((void *)(&((unsigned char *)(pvSrcAddr))[((ulTransferCount) << \ + ((ulSrcIncrement) >> 26)) - 1]))), \ + (((ulDstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ + ((void *)(&((unsigned char *)(pvDstAddr))[((ulTransferCount) << \ + ((ulDstIncrement) >> 30)) - 1]))), \ + (ulSrcIncrement) | (ulDstIncrement) | (ulItemSize) | (ulArbSize) | \ + (((ulTransferCount) - 1) << 4) | \ + ((((ulMode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ + ((ulMode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ + (ulMode) | UDMA_MODE_ALT_SELECT : (ulMode)), 0 \ + } + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +//***************************************************************************** +// +// Flags that can be passed to uDMAChannelAttributeEnable(), +// uDMAChannelAttributeDisable(), and returned from uDMAChannelAttributeGet(). +// +//***************************************************************************** +#define UDMA_ATTR_USEBURST 0x00000001 +#define UDMA_ATTR_ALTSELECT 0x00000002 +#define UDMA_ATTR_HIGH_PRIORITY 0x00000004 +#define UDMA_ATTR_REQMASK 0x00000008 +#define UDMA_ATTR_ALL 0x0000000F + +//***************************************************************************** +// +// DMA control modes that can be passed to uDMAModeSet() and returned +// uDMAModeGet(). +// +//***************************************************************************** +#define UDMA_MODE_STOP 0x00000000 +#define UDMA_MODE_BASIC 0x00000001 +#define UDMA_MODE_AUTO 0x00000002 +#define UDMA_MODE_PINGPONG 0x00000003 +#define UDMA_MODE_MEM_SCATTER_GATHER \ + 0x00000004 +#define UDMA_MODE_PER_SCATTER_GATHER \ + 0x00000006 +#define UDMA_MODE_ALT_SELECT 0x00000001 + +//***************************************************************************** +// +// Channel configuration values that can be passed to uDMAControlSet(). +// +//***************************************************************************** +#define UDMA_DST_INC_8 0x00000000 +#define UDMA_DST_INC_16 0x40000000 +#define UDMA_DST_INC_32 0x80000000 +#define UDMA_DST_INC_NONE 0xc0000000 +#define UDMA_SRC_INC_8 0x00000000 +#define UDMA_SRC_INC_16 0x04000000 +#define UDMA_SRC_INC_32 0x08000000 +#define UDMA_SRC_INC_NONE 0x0c000000 +#define UDMA_SIZE_8 0x00000000 +#define UDMA_SIZE_16 0x11000000 +#define UDMA_SIZE_32 0x22000000 +#define UDMA_ARB_1 0x00000000 +#define UDMA_ARB_2 0x00004000 +#define UDMA_ARB_4 0x00008000 +#define UDMA_ARB_8 0x0000c000 +#define UDMA_ARB_16 0x00010000 +#define UDMA_ARB_32 0x00014000 +#define UDMA_ARB_64 0x00018000 +#define UDMA_ARB_128 0x0001c000 +#define UDMA_ARB_256 0x00020000 +#define UDMA_ARB_512 0x00024000 +#define UDMA_ARB_1024 0x00028000 +#define UDMA_NEXT_USEBURST 0x00000008 + +//***************************************************************************** +// +// Channel numbers to be passed to API functions that require a channel number +// ID. +// +//***************************************************************************** +#define UDMA_CHANNEL_USBEP1RX 0 +#define UDMA_CHANNEL_USBEP1TX 1 +#define UDMA_CHANNEL_USBEP2RX 2 +#define UDMA_CHANNEL_USBEP2TX 3 +#define UDMA_CHANNEL_USBEP3RX 4 +#define UDMA_CHANNEL_USBEP3TX 5 +#define UDMA_CHANNEL_ETH0RX 6 +#define UDMA_CHANNEL_ETH0TX 7 +#define UDMA_CHANNEL_UART0RX 8 +#define UDMA_CHANNEL_UART0TX 9 +#define UDMA_CHANNEL_SSI0RX 10 +#define UDMA_CHANNEL_SSI0TX 11 +#define UDMA_CHANNEL_ADC0 14 +#define UDMA_CHANNEL_ADC1 15 +#define UDMA_CHANNEL_ADC2 16 +#define UDMA_CHANNEL_ADC3 17 +#define UDMA_CHANNEL_TMR0A 18 +#define UDMA_CHANNEL_TMR0B 19 +#define UDMA_CHANNEL_TMR1A 20 +#define UDMA_CHANNEL_TMR1B 21 +#define UDMA_CHANNEL_UART1RX 22 +#define UDMA_CHANNEL_UART1TX 23 +#define UDMA_CHANNEL_SSI1RX 24 +#define UDMA_CHANNEL_SSI1TX 25 +#define UDMA_CHANNEL_I2S0RX 28 +#define UDMA_CHANNEL_I2S0TX 29 +#define UDMA_CHANNEL_SW 30 + +//***************************************************************************** +// +// Flags to be OR'd with the channel ID to indicate if the primary or alternate +// control structure should be used. +// +//***************************************************************************** +#define UDMA_PRI_SELECT 0x00000000 +#define UDMA_ALT_SELECT 0x00000020 + +//***************************************************************************** +// +// uDMA interrupt sources, to be passed to uDMAIntRegister() and +// uDMAIntUnregister(). +// +//***************************************************************************** +#define UDMA_INT_SW 62 +#define UDMA_INT_ERR 63 + +//***************************************************************************** +// +// Channel numbers to be passed to API functions that require a channel number +// ID. These are for secondary peripheral assignments. +// +//***************************************************************************** +#define UDMA_SEC_CHANNEL_UART2RX_0 \ + 0 +#define UDMA_SEC_CHANNEL_UART2TX_1 \ + 1 +#define UDMA_SEC_CHANNEL_TMR3A 2 +#define UDMA_SEC_CHANNEL_TMR3B 3 +#define UDMA_SEC_CHANNEL_TMR2A_4 \ + 4 +#define UDMA_SEC_CHANNEL_TMR2B_5 \ + 5 +#define UDMA_SEC_CHANNEL_TMR2A_6 \ + 6 +#define UDMA_SEC_CHANNEL_TMR2B_7 \ + 7 +#define UDMA_SEC_CHANNEL_UART1RX \ + 8 +#define UDMA_SEC_CHANNEL_UART1TX \ + 9 +#define UDMA_SEC_CHANNEL_SSI1RX 10 +#define UDMA_SEC_CHANNEL_SSI1TX 11 +#define UDMA_SEC_CHANNEL_UART2RX_12 \ + 12 +#define UDMA_SEC_CHANNEL_UART2TX_13 \ + 13 +#define UDMA_SEC_CHANNEL_TMR2A_14 \ + 14 +#define UDMA_SEC_CHANNEL_TMR2B_15 \ + 15 +#define UDMA_SEC_CHANNEL_TMR1A 18 +#define UDMA_SEC_CHANNEL_TMR1B 19 +#define UDMA_SEC_CHANNEL_EPI0RX 20 +#define UDMA_SEC_CHANNEL_EPI0TX 21 +#define UDMA_SEC_CHANNEL_ADC10 24 +#define UDMA_SEC_CHANNEL_ADC11 25 +#define UDMA_SEC_CHANNEL_ADC12 26 +#define UDMA_SEC_CHANNEL_ADC13 27 +#define UDMA_SEC_CHANNEL_SW 30 + +//***************************************************************************** +// +// uDMA default/secondary peripheral selections, to be passed to +// uDMAChannelSelectSecondary() and uDMAChannelSelectDefault(). +// +//***************************************************************************** +#define UDMA_DEF_USBEP1RX_SEC_UART2RX \ + 0x00000001 +#define UDMA_DEF_USBEP1TX_SEC_UART2TX \ + 0x00000002 +#define UDMA_DEF_USBEP2RX_SEC_TMR3A \ + 0x00000004 +#define UDMA_DEF_USBEP2TX_SEC_TMR3B \ + 0x00000008 +#define UDMA_DEF_USBEP3RX_SEC_TMR2A \ + 0x00000010 +#define UDMA_DEF_USBEP3TX_SEC_TMR2B \ + 0x00000020 +#define UDMA_DEF_ETH0RX_SEC_TMR2A \ + 0x00000040 +#define UDMA_DEF_ETH0TX_SEC_TMR2B \ + 0x00000080 +#define UDMA_DEF_UART0RX_SEC_UART1RX \ + 0x00000100 +#define UDMA_DEF_UART0TX_SEC_UART1TX \ + 0x00000200 +#define UDMA_DEF_SSI0RX_SEC_SSI1RX \ + 0x00000400 +#define UDMA_DEF_SSI0TX_SEC_SSI1TX \ + 0x00000800 +#define UDMA_DEF_RESERVED_SEC_UART2RX \ + 0x00001000 +#define UDMA_DEF_RESERVED_SEC_UART2TX \ + 0x00002000 +#define UDMA_DEF_ADC00_SEC_TMR2A \ + 0x00004000 +#define UDMA_DEF_ADC01_SEC_TMR2B \ + 0x00008000 +#define UDMA_DEF_ADC02_SEC_RESERVED \ + 0x00010000 +#define UDMA_DEF_ADC03_SEC_RESERVED \ + 0x00020000 +#define UDMA_DEF_TMR0A_SEC_TMR1A \ + 0x00040000 +#define UDMA_DEF_TMR0B_SEC_TMR1B \ + 0x00080000 +#define UDMA_DEF_TMR1A_SEC_EPI0RX \ + 0x00100000 +#define UDMA_DEF_TMR1B_SEC_EPI0TX \ + 0x00200000 +#define UDMA_DEF_UART1RX_SEC_RESERVED \ + 0x00400000 +#define UDMA_DEF_UART1TX_SEC_RESERVED \ + 0x00800000 +#define UDMA_DEF_SSI1RX_SEC_ADC10 \ + 0x01000000 +#define UDMA_DEF_SSI1TX_SEC_ADC11 \ + 0x02000000 +#define UDMA_DEF_RESERVED_SEC_ADC12 \ + 0x04000000 +#define UDMA_DEF_RESERVED_SEC_ADC13 \ + 0x08000000 +#define UDMA_DEF_I2S0RX_SEC_RESERVED \ + 0x10000000 +#define UDMA_DEF_I2S0TX_SEC_RESERVED \ + 0x20000000 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void uDMAEnable(void); +extern void uDMADisable(void); +extern unsigned long uDMAErrorStatusGet(void); +extern void uDMAErrorStatusClear(void); +extern void uDMAChannelEnable(unsigned long ulChannelNum); +extern void uDMAChannelDisable(unsigned long ulChannelNum); +extern tBoolean uDMAChannelIsEnabled(unsigned long ulChannelNum); +extern void uDMAControlBaseSet(void *pControlTable); +extern void *uDMAControlBaseGet(void); +extern void *uDMAControlAlternateBaseGet(void); +extern void uDMAChannelRequest(unsigned long ulChannelNum); +extern void uDMAChannelAttributeEnable(unsigned long ulChannelNum, + unsigned long ulAttr); +extern void uDMAChannelAttributeDisable(unsigned long ulChannelNum, + unsigned long ulAttr); +extern unsigned long uDMAChannelAttributeGet(unsigned long ulChannelNum); +extern void uDMAChannelControlSet(unsigned long ulChannelStructIndex, + unsigned long ulControl); +extern void uDMAChannelTransferSet(unsigned long ulChannelStructIndex, + unsigned long ulMode, void *pvSrcAddr, + void *pvDstAddr, + unsigned long ulTransferSize); +extern void uDMAChannelScatterGatherSet(unsigned long ulChannelNum, + unsigned ulTaskCount, void *pvTaskList, + unsigned long ulIsPeriphSG); +extern unsigned long uDMAChannelSizeGet(unsigned long ulChannelStructIndex); +extern unsigned long uDMAChannelModeGet(unsigned long ulChannelStructIndex); +extern void uDMAIntRegister(unsigned long ulIntChannel, + void (*pfnHandler)(void)); +extern void uDMAIntUnregister(unsigned long ulIntChannel); +extern void uDMAChannelSelectDefault(unsigned long ulDefPeriphs); +extern void uDMAChannelSelectSecondary(unsigned long ulSecPeriphs); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UDMA_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.c new file mode 100644 index 00000000..e8511711 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.c @@ -0,0 +1,3871 @@ +//***************************************************************************** +// +// usb.c - Driver for the USB Interface. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup usb_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "inc/hw_usb.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/udma.h" +#include "driverlib/usb.h" + +//***************************************************************************** +// +// Amount to shift the RX interrupt sources by in the flags used in the +// interrupt calls. +// +//***************************************************************************** +#ifndef DEPRECATED +#define USB_INT_RX_SHIFT 8 +#endif +#define USB_INTEP_RX_SHIFT 16 + +//***************************************************************************** +// +// Amount to shift the status interrupt sources by in the flags used in the +// interrupt calls. +// +//***************************************************************************** +#ifndef DEPRECATED +#define USB_INT_STATUS_SHIFT 24 +#endif + +//***************************************************************************** +// +// Amount to shift the RX endpoint status sources by in the flags used in the +// calls. +// +//***************************************************************************** +#define USB_RX_EPSTATUS_SHIFT 16 + +//***************************************************************************** +// +// Converts from an endpoint specifier to the offset of the endpoint's +// control/status registers. +// +//***************************************************************************** +#define EP_OFFSET(Endpoint) (Endpoint - 0x10) + +//***************************************************************************** +// +// Sets one of the indexed registers. +// +// \param ulBase specifies the USB module base address. +// \param ulEndpoint is the endpoint index to target for this write. +// \param ulIndexedReg is the indexed register to write to. +// \param ucValue is the value to write to the register. +// +// This function is used to access the indexed registers for each endpoint. +// The only registers that are indexed are the FIFO configuration registers +// which are not used after configuration. +// +// \return None. +// +//***************************************************************************** +static void +USBIndexWrite(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulIndexedReg, unsigned long ulValue, + unsigned long ulSize) +{ + unsigned long ulIndex; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == 0) || (ulEndpoint == 1) || (ulEndpoint == 2) || + (ulEndpoint == 3)); + ASSERT((ulSize == 1) || (ulSize == 2)); + + // + // Save the old index in case it was in use. + // + ulIndex = HWREGB(ulBase + USB_O_EPIDX); + + // + // Set the index. + // + HWREGB(ulBase + USB_O_EPIDX) = ulEndpoint; + + // + // Determine the size of the register value. + // + if(ulSize == 1) + { + // + // Set the value. + // + HWREGB(ulBase + ulIndexedReg) = ulValue; + } + else + { + // + // Set the value. + // + HWREGH(ulBase + ulIndexedReg) = ulValue; + } + + // + // Restore the old index in case it was in use. + // + HWREGB(ulBase + USB_O_EPIDX) = ulIndex; +} + +//***************************************************************************** +// +// Reads one of the indexed registers. +// +// \param ulBase specifies the USB module base address. +// \param ulEndpoint is the endpoint index to target for this write. +// \param ulIndexedReg is the indexed register to write to. +// +// This function is used internally to access the indexed registers for each +// endpoint. The only registers that are indexed are the FIFO configuration +// registers which are not used after configuration. +// +// \return The value in the register requested. +// +//***************************************************************************** +static unsigned long +USBIndexRead(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulIndexedReg, unsigned long ulSize) +{ + unsigned char ulIndex; + unsigned char ulValue; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == 0) || (ulEndpoint == 1) || (ulEndpoint == 2) || + (ulEndpoint == 3)); + ASSERT((ulSize == 1) || (ulSize == 2)); + + // + // Save the old index in case it was in use. + // + ulIndex = HWREGB(ulBase + USB_O_EPIDX); + + // + // Set the index. + // + HWREGB(ulBase + USB_O_EPIDX) = ulEndpoint; + + // + // Determine the size of the register value. + // + if(ulSize == 1) + { + // + // Get the value. + // + ulValue = HWREGB(ulBase + ulIndexedReg); + } + else + { + // + // Get the value. + // + ulValue = HWREGH(ulBase + ulIndexedReg); + } + + // + // Restore the old index in case it was in use. + // + HWREGB(ulBase + USB_O_EPIDX) = ulIndex; + + // + // Return the register's value. + // + return(ulValue); +} + +//***************************************************************************** +// +//! Puts the USB bus in a suspended state. +//! +//! \param ulBase specifies the USB module base address. +//! +//! When used in host mode, this function will put the USB bus in the suspended +//! state. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostSuspend(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send the suspend signaling to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_SUSPEND; +} + +//***************************************************************************** +// +//! Handles the USB bus reset condition. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies whether to start or stop signaling reset on the USB +//! bus. +//! +//! When this function is called with the \e bStart parameter set to \b true, +//! this function will cause the start of a reset condition on the USB bus. +//! The caller should then delay at least 20ms before calling this function +//! again with the \e bStart parameter set to \b false. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostReset(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send a reset signal to the bus. + // + if(bStart) + { + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_RESET; + } + else + { + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_RESET; + } +} + +//***************************************************************************** +// +//! Handles the USB bus resume condition. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies if the USB controller is entering or leaving the +//! resume signaling state. +//! +//! When in device mode this function will bring the USB controller out of the +//! suspend state. This call should first be made with the \e bStart parameter +//! set to \b true to start resume signaling. The device application should +//! then delay at least 10ms but not more than 15ms before calling this +//! function with the \e bStart parameter set to \b false. +//! +//! When in host mode this function will signal devices to leave the suspend +//! state. This call should first be made with the \e bStart parameter set to +//! \b true to start resume signaling. The host application should then delay +//! at least 20ms before calling this function with the \e bStart parameter set +//! to \b false. This will cause the controller to complete the resume +//! signaling on the USB bus. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostResume(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send a resume signal to the bus. + // + if(bStart) + { + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_RESUME; + } + else + { + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_RESUME; + } +} + +//***************************************************************************** +// +//! Returns the current speed of the USB device connected. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will return the current speed of the USB bus. +//! +//! \note This function should only be called in host mode. +//! +//! \return Returns either \b USB_LOW_SPEED, \b USB_FULL_SPEED, or +//! \b USB_UNDEF_SPEED. +// +//***************************************************************************** +unsigned long +USBHostSpeedGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // If the Full Speed device bit is set, then this is a full speed device. + // + if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_FSDEV) + { + return(USB_FULL_SPEED); + } + + // + // If the Low Speed device bit is set, then this is a low speed device. + // + if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_LSDEV) + { + return(USB_LOW_SPEED); + } + + // + // The device speed is not known. + // + return(USB_UNDEF_SPEED); +} + +//***************************************************************************** +// +//! Returns the status of the USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read the source of the interrupt for the USB controller. +//! There are three groups of interrupt sources, IN Endpoints, OUT Endpoints, +//! and general status changes. This call will return the current status for +//! all of these interrupts. The bit values returned should be compared +//! against the \b USB_HOST_IN, \b USB_HOST_OUT, \b USB_HOST_EP0, +//! \b USB_DEV_IN, \b USB_DEV_OUT, and \b USB_DEV_EP0 values. +//! +//! \note This call will clear the source of all of the general status +//! interrupts. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntStatusControl() or USBIntStatusEndpoint() should be +//! used instead. +//! +//! \return Returns the status of the sources for the USB controller's +//! interrupt. +// +//***************************************************************************** +#ifndef DEPRECATED +unsigned long +USBIntStatus(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the transmit interrupt status. + // + ulStatus = (HWREGB(ulBase + USB_O_TXIS)); + + // + // Get the receive interrupt status, these bits go into the second byte of + // the returned value. + // + ulStatus |= (HWREGB(ulBase + USB_O_RXIS) << USB_INT_RX_SHIFT); + + // + // Get the general interrupt status, these bits go into the upper 8 bits + // of the returned value. + // + ulStatus |= (HWREGB(ulBase + USB_O_IS) << USB_INT_STATUS_SHIFT); + + // + // Add the power fault status. + // + if(HWREG(ulBase + USB_O_EPCISC) & USB_EPCISC_PF) + { + // + // Indicate a power fault was detected. + // + ulStatus |= USB_INT_POWER_FAULT; + + // + // Clear the power fault interrupt. + // + HWREGB(ulBase + USB_O_EPCISC) |= USB_EPCISC_PF; + } + + if(HWREG(USB0_BASE + USB_O_IDVISC) & USB_IDVRIS_ID) + { + // + // Indicate a id detection was detected. + // + ulStatus |= USB_INT_MODE_DETECT; + + // + // Clear the id detection interrupt. + // + HWREG(USB0_BASE + USB_O_IDVISC) |= USB_IDVRIS_ID; + } + + // + // Return the combined interrupt status. + // + return(ulStatus); +} +#endif + +//***************************************************************************** +// +//! Disables the sources for USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which interrupts to disable. +//! +//! This function will disable the USB controller from generating the +//! interrupts indicated by the \e ulFlags parameter. There are three groups +//! of interrupt sources, IN Endpoints, OUT Endpoints, and general status +//! changes, specified by \b USB_INT_HOST_IN, \b USB_INT_HOST_OUT, +//! \b USB_INT_DEV_IN, \b USB_INT_DEV_OUT, and \b USB_INT_STATUS. If +//! \b USB_INT_ALL is specified then all interrupts will be disabled. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntDisableControl() or USBIntDisableEndpoint() should be +//! used instead. +//! +//! \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +USBIntDisable(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_INT_ALL)) == 0); + + // + // If any transmit interrupts were disabled then write the transmit + // interrupt settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)) + { + HWREGH(ulBase + USB_O_TXIE) &= + ~(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)); + } + + // + // If any receive interrupts were disabled then write the receive interrupt + // settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) + { + HWREGH(ulBase + USB_O_RXIE) &= + ~((ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) >> + USB_INT_RX_SHIFT); + } + + // + // If any general interrupts were disabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INT_STATUS) + { + HWREGB(ulBase + USB_O_IE) &= + ~((ulFlags & USB_INT_STATUS) >> USB_INT_STATUS_SHIFT); + } + + // + // Disable the power fault interrupt. + // + if(ulFlags & USB_INT_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = 0; + } + + // + // Disable the ID pin detect interrupt. + // + if(ulFlags & USB_INT_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = 0; + } +} +#endif + +//***************************************************************************** +// +//! Enables the sources for USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which interrupts to enable. +//! +//! This function will enable the USB controller's ability to generate the +//! interrupts indicated by the \e ulFlags parameter. There are three +//! groups of interrupt sources, IN Endpoints, OUT Endpoints, and +//! general status changes, specified by \b USB_INT_HOST_IN, +//! \b USB_INT_HOST_OUT, \b USB_INT_DEV_IN, \b USB_INT_DEV_OUT, and +//! \b USB_STATUS. If \b USB_INT_ALL is specified then all interrupts will be +//! enabled. +//! +//! \note A call must be made to enable the interrupt in the main interrupt +//! controller to receive interrupts. The USBIntRegister() API performs this +//! controller level interrupt enable. However if static interrupt handlers +//! are used then then a call to IntEnable() must be made in order to allow any +//! USB interrupts to occur. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntEnableControl() or USBIntEnableEndpoint() should be +//! used instead. +//! +//! \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +USBIntEnable(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & (~USB_INT_ALL)) == 0); + + // + // If any transmit interrupts were enabled then write the transmit + // interrupt settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)) + { + HWREGH(ulBase + USB_O_TXIE) |= + ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0); + } + + // + // If any receive interrupts were enabled then write the receive interrupt + // settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) + { + HWREGH(ulBase + USB_O_RXIE) |= + ((ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) >> + USB_INT_RX_SHIFT); + } + + // + // If any general interrupts were enabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INT_STATUS) + { + HWREGB(ulBase + USB_O_IE) |= + (ulFlags & USB_INT_STATUS) >> USB_INT_STATUS_SHIFT; + } + + // + // Enable the power fault interrupt. + // + if(ulFlags & USB_INT_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = USB_EPCIM_PF; + } + + // + // Enable the ID pin detect interrupt. + // + if(ulFlags & USB_INT_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = USB_IDVIM_ID; + } +} +#endif + +//***************************************************************************** +// +//! Disable control interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which control interrupts to disable. +//! +//! This function will disable the control interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which control interrupts to disable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTCTRL_* and +//! not any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntDisableControl(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_INTCTRL_ALL)) == 0); + + // + // If any general interrupts were disabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INTCTRL_STATUS) + { + HWREGB(ulBase + USB_O_IE) &= ~(ulFlags & USB_INTCTRL_STATUS); + } + + // + // Disable the power fault interrupt. + // + if(ulFlags & USB_INTCTRL_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = 0; + } + + // + // Disable the ID pin detect interrupt. + // + if(ulFlags & USB_INTCTRL_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = 0; + } +} + +//***************************************************************************** +// +//! Enable control interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which control interrupts to enable. +//! +//! This function will enable the control interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which control interrupts to enable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTCTRL_* and +//! not any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntEnableControl(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & (~USB_INTCTRL_ALL)) == 0); + + // + // If any general interrupts were enabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INTCTRL_STATUS) + { + HWREGB(ulBase + USB_O_IE) |= ulFlags; + } + + // + // Enable the power fault interrupt. + // + if(ulFlags & USB_INTCTRL_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = USB_EPCIM_PF; + } + + // + // Enable the ID pin detect interrupt. + // + if(ulFlags & USB_INTCTRL_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = USB_IDVIM_ID; + } +} + +//***************************************************************************** +// +//! Returns the control interrupt status on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read control interrupt status for a USB controller. +//! This call will return the current status for control interrupts only, the +//! endpoint interrupt status is retrieved by calling USBIntStatusEndpoint(). +//! The bit values returned should be compared against the \b USB_INTCTRL_* +//! values. +//! +//! The following are the meanings of all \b USB_INCTRL_ flags and the modes +//! for which they are valid. These values apply to any calls to +//! USBIntStatusControl(), USBIntEnableControl(), and USBIntDisableConrol(). +//! Some of these flags are only valid in the following modes as indicated in +//! the parenthesis: Host, Device, and OTG. +//! +//! - \b USB_INTCTRL_ALL - A full mask of all control interrupt sources. +//! - \b USB_INTCTRL_VBUS_ERR - A VBUS error has occurred (Host Only). +//! - \b USB_INTCTRL_SESSION - Session Start Detected on A-side of cable +//! (OTG Only). +//! - \b USB_INTCTRL_SESSION_END - Session End Detected (Device Only) +//! - \b USB_INTCTRL_DISCONNECT - Device Disconnect Detected (Host Only) +//! - \b USB_INTCTRL_CONNECT - Device Connect Detected (Host Only) +//! - \b USB_INTCTRL_SOF - Start of Frame Detected. +//! - \b USB_INTCTRL_BABBLE - USB controller detected a device signaling past +//! the end of a frame. (Host Only) +//! - \b USB_INTCTRL_RESET - Reset signaling detected by device. (Device Only) +//! - \b USB_INTCTRL_RESUME - Resume signaling detected. +//! - \b USB_INTCTRL_SUSPEND - Suspend signaling detected by device (Device +//! Only) +//! - \b USB_INTCTRL_MODE_DETECT - OTG cable mode detection has completed +//! (OTG Only) +//! - \b USB_INTCTRL_POWER_FAULT - Power Fault detected. (Host Only) +//! +//! \note This call will clear the source of all of the control status +//! interrupts. +//! +//! \return Returns the status of the control interrupts for a USB controller. +// +//***************************************************************************** +unsigned long +USBIntStatusControl(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the general interrupt status, these bits go into the upper 8 bits + // of the returned value. + // + ulStatus = HWREGB(ulBase + USB_O_IS); + + // + // Add the power fault status. + // + if(HWREG(ulBase + USB_O_EPCISC) & USB_EPCISC_PF) + { + // + // Indicate a power fault was detected. + // + ulStatus |= USB_INTCTRL_POWER_FAULT; + + // + // Clear the power fault interrupt. + // + HWREGB(ulBase + USB_O_EPCISC) |= USB_EPCISC_PF; + } + + if(HWREG(USB0_BASE + USB_O_IDVISC) & USB_IDVRIS_ID) + { + // + // Indicate a id detection was detected. + // + ulStatus |= USB_INTCTRL_MODE_DETECT; + + // + // Clear the id detection interrupt. + // + HWREG(USB0_BASE + USB_O_IDVISC) |= USB_IDVRIS_ID; + } + + // + // Return the combined interrupt status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Disable endpoint interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which endpoint interrupts to disable. +//! +//! This function will disable endpoint interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which endpoint interrupts to disable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTEP_* and not +//! any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntDisableEndpoint(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // If any transmit interrupts were disabled then write the transmit + // interrupt settings out to the hardware. + // + HWREGH(ulBase + USB_O_TXIE) &= + ~(ulFlags & (USB_INTEP_HOST_OUT | USB_INTEP_DEV_IN | USB_INTEP_0)); + + // + // If any receive interrupts were disabled then write the receive interrupt + // settings out to the hardware. + // + HWREGH(ulBase + USB_O_RXIE) &= + ~((ulFlags & (USB_INTEP_HOST_IN | USB_INTEP_DEV_OUT)) >> + USB_INTEP_RX_SHIFT); +} + +//***************************************************************************** +// +//! Enable endpoint interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which endpoint interrupts to enable. +//! +//! This function will enable endpoint interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which endpoint interrupts to enable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTEP_* and not +//! any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntEnableEndpoint(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable any transmit endpoint interrupts. + // + HWREGH(ulBase + USB_O_TXIE) |= + ulFlags & (USB_INTEP_HOST_OUT | USB_INTEP_DEV_IN | USB_INTEP_0); + + // + // Enable any receive endpoint interrupts. + // + HWREGH(ulBase + USB_O_RXIE) |= + ((ulFlags & (USB_INTEP_HOST_IN | USB_INTEP_DEV_OUT)) >> + USB_INTEP_RX_SHIFT); +} + +//***************************************************************************** +// +//! Returns the endpoint interrupt status on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read endpoint interrupt status for a USB controller. +//! This call will return the current status for endpoint interrupts only, the +//! control interrupt status is retrieved by calling USBIntStatusControl(). +//! The bit values returned should be compared against the \b USB_INTEP_* +//! values. These are grouped into classes for \b USB_INTEP_HOST_* and +//! \b USB_INTEP_DEV_* values to handle both host and device modes with all +//! endpoints. +//! +//! \note This call will clear the source of all of the endpoint interrupts. +//! +//! \return Returns the status of the endpoint interrupts for a USB controller. +// +//***************************************************************************** +unsigned long +USBIntStatusEndpoint(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the transmit interrupt status. + // + ulStatus = HWREGH(ulBase + USB_O_TXIS); + + ulStatus |= (HWREGH(ulBase + USB_O_RXIS) << USB_INTEP_RX_SHIFT); + + // + // Return the combined interrupt status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param pfnHandler is a pointer to the function to be called when a USB +//! interrupt occurs. +//! +//! This sets the handler to be called when a USB interrupt occurs. This will +//! also enable the global USB interrupt in the interrupt controller. The +//! specific desired USB interrupts must be enabled via a separate call to +//! USBIntEnable(). It is the interrupt handler's responsibility to clear the +//! interrupt sources via a calls to USBIntStatusControl() and +//! USBIntStatusEndpoint(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntRegister(unsigned long ulBase, void(*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Register the interrupt handler. + // + IntRegister(INT_USB0, pfnHandler); + + // + // Enable the USB interrupt. + // + IntEnable(INT_USB0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function unregister the interrupt handler. This function will also +//! disable the USB interrupt in the interrupt controller. +//! +//! \sa IntRegister() for important information about registering or +//! unregistering interrupt handlers. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_USB0); + + // + // Disable the CAN interrupt. + // + IntDisable(INT_USB0); +} + +//***************************************************************************** +// +//! Returns the current status of an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will return the status of a given endpoint. If any of these +//! status bits need to be cleared, then these these values must be cleared by +//! calling the USBDevEndpointStatusClear() or USBHostEndpointStatusClear() +//! functions. +//! +//! The following are the status flags for host mode: +//! +//! - \b USB_HOST_IN_PID_ERROR - PID error on the given endpoint. +//! - \b USB_HOST_IN_NOT_COMP - The device failed to respond to an IN request. +//! - \b USB_HOST_IN_STALL - A stall was received on an IN endpoint. +//! - \b USB_HOST_IN_DATA_ERROR - There was a CRC or bit-stuff error on an IN +//! endpoint in Isochronous mode. +//! - \b USB_HOST_IN_NAK_TO - NAKs received on this IN endpoint for more than +//! the specified timeout period. +//! - \b USB_HOST_IN_ERROR - Failed to communicate with a device using this IN +//! endpoint. +//! - \b USB_HOST_IN_FIFO_FULL - This IN endpoint's FIFO is full. +//! - \b USB_HOST_IN_PKTRDY - Data packet ready on this IN endpoint. +//! - \b USB_HOST_OUT_NAK_TO - NAKs received on this OUT endpoint for more than +//! the specified timeout period. +//! - \b USB_HOST_OUT_NOT_COMP - The device failed to respond to an OUT +//! request. +//! - \b USB_HOST_OUT_STALL - A stall was received on this OUT endpoint. +//! - \b USB_HOST_OUT_ERROR - Failed to communicate with a device using this +//! OUT endpoint. +//! - \b USB_HOST_OUT_FIFO_NE - This endpoint's OUT FIFO is not empty. +//! - \b USB_HOST_OUT_PKTPEND - The data transfer on this OUT endpoint has not +//! completed. +//! - \b USB_HOST_EP0_NAK_TO - NAKs received on endpoint zero for more than the +//! specified timeout period. +//! - \b USB_HOST_EP0_ERROR - The device failed to respond to a request on +//! endpoint zero. +//! - \b USB_HOST_EP0_IN_STALL - A stall was received on endpoint zero for an +//! IN transaction. +//! - \b USB_HOST_EP0_IN_PKTRDY - Data packet ready on endpoint zero for an IN +//! transaction. +//! +//! The following are the status flags for device mode: +//! +//! - \b USB_DEV_OUT_SENT_STALL - A stall was sent on this OUT endpoint. +//! - \b USB_DEV_OUT_DATA_ERROR - There was a CRC or bit-stuff error on an OUT +//! endpoint. +//! - \b USB_DEV_OUT_OVERRUN - An OUT packet was not loaded due to a full FIFO. +//! - \b USB_DEV_OUT_FIFO_FULL - The OUT endpoint's FIFO is full. +//! - \b USB_DEV_OUT_PKTRDY - There is a data packet ready in the OUT +//! endpoint's FIFO. +//! - \b USB_DEV_IN_NOT_COMP - A larger packet was split up, more data to come. +//! - \b USB_DEV_IN_SENT_STALL - A stall was sent on this IN endpoint. +//! - \b USB_DEV_IN_UNDERRUN - Data was requested on the IN endpoint and no +//! data was ready. +//! - \b USB_DEV_IN_FIFO_NE - The IN endpoint's FIFO is not empty. +//! - \b USB_DEV_IN_PKTPEND - The data transfer on this IN endpoint has not +//! completed. +//! - \b USB_DEV_EP0_SETUP_END - A control transaction ended before Data End +//! condition was sent. +//! - \b USB_DEV_EP0_SENT_STALL - A stall was sent on endpoint zero. +//! - \b USB_DEV_EP0_IN_PKTPEND - The data transfer on endpoint zero has not +//! completed. +//! - \b USB_DEV_EP0_OUT_PKTRDY - There is a data packet ready in endpoint +//! zero's OUT FIFO. +//! +//! \return The current status flags for the endpoint depending on mode. +// +//***************************************************************************** +unsigned long +USBEndpointStatus(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the TX portion of the endpoint status. + // + ulStatus = HWREGH(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRL1); + + // + // Get the RX portion of the endpoint status. + // + ulStatus |= ((HWREGH(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRL1)) << + USB_RX_EPSTATUS_SHIFT); + + // + // Return the endpoint status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears the status bits in this endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags are the status bits that will be cleared. +//! +//! This function will clear the status of any bits that are passed in the +//! \e ulFlags parameter. The \e ulFlags parameter can take the value returned +//! from the USBEndpointStatus() call. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointStatusClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Clear the specified flags for the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~ulFlags; + } + else + { + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= ~ulFlags; + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(ulFlags >> USB_RX_EPSTATUS_SHIFT); + } +} + +//***************************************************************************** +// +//! Clears the status bits in this endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags are the status bits that will be cleared. +//! +//! This function will clear the status of any bits that are passed in the +//! \e ulFlags parameter. The \e ulFlags parameter can take the value returned +//! from the USBEndpointStatus() call. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStatusClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // If this is endpoint 0 then the bits have different meaning and map into + // the TX memory location. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the Serviced RxPktRdy bit to clear the RxPktRdy. + // + if(ulFlags & USB_DEV_EP0_OUT_PKTRDY) + { + HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_RXRDYC; + } + + // + // Set the serviced Setup End bit to clear the SetupEnd status. + // + if(ulFlags & USB_DEV_EP0_SETUP_END) + { + HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_SETENDC; + } + + // + // Clear the Sent Stall status flag. + // + if(ulFlags & USB_DEV_EP0_SENT_STALL) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~(USB_DEV_EP0_SENT_STALL); + } + } + else + { + // + // Clear out any TX flags that were passed in. Only + // USB_DEV_TX_SENT_STALL and USB_DEV_TX_UNDERRUN should be cleared. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(ulFlags & (USB_DEV_TX_SENT_STALL | USB_DEV_TX_UNDERRUN)); + + // + // Clear out valid RX flags that were passed in. Only + // USB_DEV_RX_SENT_STALL, USB_DEV_RX_DATA_ERROR, and USB_DEV_RX_OVERRUN + // should be cleared. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~((ulFlags & (USB_DEV_RX_SENT_STALL | USB_DEV_RX_DATA_ERROR | + USB_DEV_RX_OVERRUN)) >> USB_RX_EPSTATUS_SHIFT); + } +} + +//***************************************************************************** +// +//! Sets the value data toggle on an endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to reset the data toggle. +//! \param bDataToggle specifies whether to set the state to DATA0 or DATA1. +//! \param ulFlags specifies whether to set the IN or OUT endpoint. +//! +//! This function is used to force the state of the data toggle in host mode. +//! If the value passed in the \e bDataToggle parameter is \b false, then the +//! data toggle will be set to the DATA0 state, and if it is \b true it will be +//! set to the DATA1 state. The \e ulFlags parameter can be \b USB_EP_HOST_IN +//! or \b USB_EP_HOST_OUT to access the desired portion of this endpoint. The +//! \e ulFlags parameter is ignored for endpoint zero. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointDataToggle(unsigned long ulBase, unsigned long ulEndpoint, + tBoolean bDataToggle, unsigned long ulFlags) +{ + unsigned long ulDataToggle; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // The data toggle defaults to DATA0. + // + ulDataToggle = 0; + + // + // See if the data toggle should be set to DATA1. + // + if(bDataToggle) + { + // + // Select the data toggle bit based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulDataToggle = USB_CSRH0_DT; + } + else if(ulFlags == USB_EP_HOST_IN) + { + ulDataToggle = USB_RXCSRH1_DT; + } + else + { + ulDataToggle = USB_TXCSRH1_DT; + } + } + + // + // Set the data toggle based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the write enable and the bit value for endpoint zero. + // + HWREGB(ulBase + USB_O_CSRH0) = + ((HWREGB(ulBase + USB_O_CSRH0) & + ~(USB_CSRH0_DTWE | USB_CSRH0_DT)) | + (ulDataToggle | USB_CSRH0_DTWE)); + } + else if(ulFlags == USB_EP_HOST_IN) + { + // + // Set the Write enable and the bit value for an IN endpoint. + // + HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) = + ((HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) & + ~(USB_RXCSRH1_DTWE | USB_RXCSRH1_DT)) | + (ulDataToggle | USB_RXCSRH1_DTWE)); + } + else + { + // + // Set the Write enable and the bit value for an OUT endpoint. + // + HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) = + ((HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) & + ~(USB_TXCSRH1_DTWE | USB_TXCSRH1_DT)) | + (ulDataToggle | USB_TXCSRH1_DTWE)); + } +} + +//***************************************************************************** +// +//! Sets the Data toggle on an endpoint to zero. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to reset the data toggle. +//! \param ulFlags specifies whether to access the IN or OUT endpoint. +//! +//! This function will cause the controller to clear the data toggle for an +//! endpoint. This call is not valid for endpoint zero and can be made with +//! host or device controllers. +//! +//! The \e ulFlags parameter should be one of \b USB_EP_HOST_OUT, +//! \b USB_EP_HOST_IN, \b USB_EP_DEV_OUT, or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDataToggleClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive data toggle should be cleared. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_CLRDT; + } + else + { + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Stalls the specified endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to stall. +//! \param ulFlags specifies whether to stall the IN or OUT endpoint. +//! +//! This function will cause to endpoint number passed in to go into a stall +//! condition. If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall +//! will be issued on the IN portion of this endpoint. If the \e ulFlags +//! parameter is \b USB_EP_DEV_OUT then the stall will be issued on the OUT +//! portion of this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStall(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0) + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Determine how to stall this endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Perform a stall on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) |= + (USB_CSRL0_STALL | USB_CSRL0_RXRDYC); + } + else if(ulFlags == USB_EP_DEV_IN) + { + // + // Perform a stall on an IN endpoint. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_STALL; + } + else + { + // + // Perform a stall on an OUT endpoint. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_STALL; + } +} + +//***************************************************************************** +// +//! Clears the stall condition on the specified endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint to remove the stall condition. +//! \param ulFlags specifies whether to remove the stall condition from the IN +//! or the OUT portion of this endpoint. +//! +//! This function will cause the endpoint number passed in to exit the stall +//! condition. If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall +//! will be cleared on the IN portion of this endpoint. If the \e ulFlags +//! parameter is \b USB_EP_DEV_OUT then the stall will be cleared on the OUT +//! portion of this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStallClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0) + + // + // Determine how to clear the stall on this endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Clear the stall on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) &= ~USB_CSRL0_STALLED; + } + else if(ulFlags == USB_EP_DEV_IN) + { + // + // Clear the stall on an IN endpoint. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_TXCSRL1_STALL | USB_TXCSRL1_STALLED); + + // + // Reset the data toggle. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_CLRDT; + } + else + { + // + // Clear the stall on an OUT endpoint. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_STALL | USB_RXCSRL1_STALLED); + + // + // Reset the data toggle. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Connects the USB controller to the bus in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will cause the soft connect feature of the USB controller to +//! be enabled. Call USBDisconnect() to remove the USB device from the bus. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevConnect(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable connection to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_SOFTCONN; +} + +//***************************************************************************** +// +//! Removes the USB controller from the bus in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will cause the soft connect feature of the USB controller to +//! remove the device from the USB bus. A call to USBDevConnect() is needed to +//! reconnect to the bus. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevDisconnect(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Disable connection to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) &= (~USB_POWER_SOFTCONN); +} + +//***************************************************************************** +// +//! Sets the address in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulAddress is the address to use for a device. +//! +//! This function will set the device address on the USB bus. This address was +//! likely received via a SET ADDRESS command from the host controller. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevAddrSet(unsigned long ulBase, unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the function address in the correct location. + // + HWREGB(ulBase + USB_O_FADDR) = (unsigned char)ulAddress; +} + +//***************************************************************************** +// +//! Returns the current device address in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will return the current device address. This address was set +//! by a call to USBDevAddrSet(). +//! +//! \note This function should only be called in device mode. +//! +//! \return The current device address. +// +//***************************************************************************** +unsigned long +USBDevAddrGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Return the function address. + // + return(HWREGB(ulBase + USB_O_FADDR)); +} + +//***************************************************************************** +// +//! Sets the base configuration for a host endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulMaxPayload is the maximum payload for this endpoint. +//! \param ulNAKPollInterval is the either the NAK timeout limit or the polling +//! interval depending on the type of endpoint. +//! \param ulTargetEndpoint is the endpoint that the host endpoint is +//! targeting. +//! \param ulFlags are used to configure other endpoint settings. +//! +//! This function will set the basic configuration for the transmit or receive +//! portion of an endpoint in host mode. The \e ulFlags parameter determines +//! some of the configuration while the other parameters provide the rest. The +//! \e ulFlags parameter determines whether this is an IN endpoint +//! (USB_EP_HOST_IN or USB_EP_DEV_IN) or an OUT endpoint (USB_EP_HOST_OUT or +//! USB_EP_DEV_OUT), whether this is a Full speed endpoint (USB_EP_SPEED_FULL) +//! or a Low speed endpoint (USB_EP_SPEED_LOW). +//! +//! The \b USB_EP_MODE_ flags control the type of the endpoint. +//! - \b USB_EP_MODE_CTRL is a control endpoint. +//! - \b USB_EP_MODE_ISOC is an isochronous endpoint. +//! - \b USB_EP_MODE_BULK is a bulk endpoint. +//! - \b USB_EP_MODE_INT is an interrupt endpoint. +//! +//! The \e ulNAKPollInterval parameter has different meanings based on the +//! \b USB_EP_MODE value and whether or not this call is being made for +//! endpoint zero or another endpoint. For endpoint zero or any Bulk +//! endpoints, this value always indicates the number of frames to allow a +//! device to NAK before considering it a timeout. If this endpoint is an +//! isochronous or interrupt endpoint, this value is the polling interval for +//! this endpoint. +//! +//! For interrupt endpoints the polling interval is simply the number of +//! frames between polling an interrupt endpoint. For isochronous endpoints +//! this value represents a polling interval of 2 ^ (\e ulNAKPollInterval - 1) +//! frames. When used as a NAK timeout, the \e ulNAKPollInterval value +//! specifies 2 ^ (\e ulNAKPollInterval - 1) frames before issuing a time out. +//! There are two special time out values that can be specified when setting +//! the \e ulNAKPollInterval value. The first is \b MAX_NAK_LIMIT which is the +//! maximum value that can be passed in this variable. The other is +//! \b DISABLE_NAK_LIMIT which indicates that there should be no limit on the +//! number of NAKs. +//! +//! The \b USB_EP_DMA_MODE_ flags enables the type of DMA used to access the +//! endpoint's data FIFOs. The choice of the DMA mode depends on how the DMA +//! controller is configured and how it is being used. See the ``Using USB +//! with the uDMA Controller'' section for more information on DMA +//! configuration. +//! +//! When configuring the OUT portion of an endpoint, the \b USB_EP_AUTO_SET bit +//! is specified to cause the transmission of data on the USB bus to start +//! as soon as the number of bytes specified by \e ulMaxPayload have been +//! written into the OUT FIFO for this endpoint. +//! +//! When configuring the IN portion of an endpoint, the \b USB_EP_AUTO_REQUEST +//! bit can be specified to trigger the request for more data once the FIFO has +//! been drained enough to fit \e ulMaxPayload bytes. The \b USB_EP_AUTO_CLEAR +//! bit can be used to clear the data packet ready flag automatically once the +//! data has been read from the FIFO. If this is not used, this flag must be +//! manually cleared via a call to USBDevEndpointStatusClear() or +//! USBHostEndpointStatusClear(). +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointConfig(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulMaxPayload, + unsigned long ulNAKPollInterval, + unsigned long ulTargetEndpoint, unsigned long ulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + ASSERT(ulNAKPollInterval <= MAX_NAK_LIMIT); + + // + // Endpoint zero is configured differently than the other endpoints, so see + // if this is endpoint zero. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the NAK timeout. + // + HWREGB(ulBase + USB_O_NAKLMT) = ulNAKPollInterval; + + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TYPE0) = + ((ulFlags & USB_EP_SPEED_FULL) ? USB_TYPE0_SPEED_FULL : + USB_TYPE0_SPEED_LOW); + } + else + { + // + // Start with the target endpoint. + // + ulRegister = ulTargetEndpoint; + + // + // Set the speed for the device using this endpoint. + // + if(ulFlags & USB_EP_SPEED_FULL) + { + ulRegister |= USB_TXTYPE1_SPEED_FULL; + } + else + { + ulRegister |= USB_TXTYPE1_SPEED_LOW; + } + + // + // Set the protocol for the device using this endpoint. + // + switch(ulFlags & USB_EP_MODE_MASK) + { + // + // The bulk protocol is being used. + // + case USB_EP_MODE_BULK: + { + ulRegister |= USB_TXTYPE1_PROTO_BULK; + break; + } + + // + // The isochronous protocol is being used. + // + case USB_EP_MODE_ISOC: + { + ulRegister |= USB_TXTYPE1_PROTO_ISOC; + break; + } + + // + // The interrupt protocol is being used. + // + case USB_EP_MODE_INT: + { + ulRegister |= USB_TXTYPE1_PROTO_INT; + break; + } + + // + // The control protocol is being used. + // + case USB_EP_MODE_CTRL: + { + ulRegister |= USB_TXTYPE1_PROTO_CTRL; + break; + } + } + + // + // See if the transmit or receive endpoint is being configured. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXTYPE1) = + ulRegister; + + // + // Set the NAK timeout or polling interval. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXINTERVAL1) = + ulNAKPollInterval; + + // + // Set the Maximum Payload per transaction. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXMAXP1) = + ulMaxPayload; + + // + // Set the transmit control value to zero. + // + ulRegister = 0; + + // + // Allow auto setting of TxPktRdy when max packet size has been + // loaded into the FIFO. + // + if(ulFlags & USB_EP_AUTO_SET) + { + ulRegister |= USB_TXCSRH1_AUTOSET; + } + + // + // Configure the DMA Mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_TXCSRH1_DMAEN | USB_TXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_TXCSRH1_DMAEN; + } + + // + // Write out the transmit control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) = + (unsigned char)ulRegister; + } + else + { + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXTYPE1) = + ulRegister; + + // + // Set the NAK timeout or polling interval. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXINTERVAL1) = + ulNAKPollInterval; + + // + // Set the receive control value to zero. + // + ulRegister = 0; + + // + // Allow auto clearing of RxPktRdy when packet of size max packet + // has been unloaded from the FIFO. + // + if(ulFlags & USB_EP_AUTO_CLEAR) + { + ulRegister |= USB_RXCSRH1_AUTOCL; + } + + // + // Configure the DMA Mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_RXCSRH1_DMAEN | USB_RXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_RXCSRH1_DMAEN; + } + + // + // Write out the receive control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) = + (unsigned char)ulRegister; + } + } +} + +//***************************************************************************** +// +//! Sets the configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulMaxPacketSize is the maximum packet size for this endpoint. +//! \param ulFlags are used to configure other endpoint settings. +//! +//! This function will set the basic configuration for an endpoint in device +//! mode. Endpoint zero does not have a dynamic configuration, so this +//! function should not be called for endpoint zero. The \e ulFlags parameter +//! determines some of the configuration while the other parameters provide the +//! rest. +//! +//! The \b USB_EP_MODE_ flags define what the type is for the given endpoint. +//! +//! - \b USB_EP_MODE_CTRL is a control endpoint. +//! - \b USB_EP_MODE_ISOC is an isochronous endpoint. +//! - \b USB_EP_MODE_BULK is a bulk endpoint. +//! - \b USB_EP_MODE_INT is an interrupt endpoint. +//! +//! The \b USB_EP_DMA_MODE_ flags determines the type of DMA access to the +//! endpoint data FIFOs. The choice of the DMA mode depends on how the DMA +//! controller is configured and how it is being used. See the ``Using USB +//! with the uDMA Controller'' section for more information on DMA +//! configuration. +//! +//! When configuring an IN endpoint, the \b USB_EP_AUTO_SET bit can be +//! specified to cause the automatic transmission of data on the USB bus as +//! soon as \e ulMaxPacketSize bytes of data are written into the FIFO for +//! this endpoint. This is commonly used with DMA as no interaction is +//! required to start the transmission of data. +//! +//! When configuring an OUT endpoint, the \b USB_EP_AUTO_REQUEST bit is +//! specified to trigger the request for more data once the FIFO has been +//! drained enough to receive \e ulMaxPacketSize more bytes of data. Also for +//! OUT endpoints, the \b USB_EP_AUTO_CLEAR bit can be used to clear the data +//! packet ready flag automatically once the data has been read from the FIFO. +//! If this is not used, this flag must be manually cleared via a call to +//! USBDevEndpointStatusClear(). Both of these settings can be used to remove +//! the need for extra calls when using the controller in DMA mode. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, unsigned long ulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // Determine if a transmit or receive endpoint is being configured. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Set the maximum packet size. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXMAXP1) = + ulMaxPacketSize; + + // + // The transmit control value is zero unless options are enabled. + // + ulRegister = 0; + + // + // Allow auto setting of TxPktRdy when max packet size has been loaded + // into the FIFO. + // + if(ulFlags & USB_EP_AUTO_SET) + { + ulRegister |= USB_TXCSRH1_AUTOSET; + } + + // + // Configure the DMA mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_TXCSRH1_DMAEN | USB_TXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_TXCSRH1_DMAEN; + } + + // + // Enable isochronous mode if requested. + // + if((ulFlags & USB_EP_MODE_MASK) == USB_EP_MODE_ISOC) + { + ulRegister |= USB_TXCSRH1_ISO; + } + + // + // Write the transmit control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) = + (unsigned char)ulRegister; + + // + // Reset the Data toggle to zero. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRL1) = + USB_TXCSRL1_CLRDT; + } + else + { + // + // Set the MaxPacketSize. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXMAXP1) = + ulMaxPacketSize; + + // + // The receive control value is zero unless options are enabled. + // + ulRegister = 0; + + // + // Allow auto clearing of RxPktRdy when packet of size max packet + // has been unloaded from the FIFO. + // + if(ulFlags & USB_EP_AUTO_CLEAR) + { + ulRegister = USB_RXCSRH1_AUTOCL; + } + + // + // Configure the DMA mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_RXCSRH1_DMAEN | USB_RXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_RXCSRH1_DMAEN; + } + + // + // Enable isochronous mode if requested. + // + if((ulFlags & USB_EP_MODE_MASK) == USB_EP_MODE_ISOC) + { + ulRegister |= USB_RXCSRH1_ISO; + } + + // + // Write the receive control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) = + (unsigned char)ulRegister; + + // + // Reset the Data toggle to zero. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRL1) = + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Gets the current configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pulMaxPacketSize is a pointer which will be written with the +//! maximum packet size for this endpoint. +//! \param pulFlags is a pointer which will be written with the current +//! endpoint settings. On entry to the function, this pointer must contain +//! either \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT to indicate whether the IN or +//! OUT endpoint is to be queried. +//! +//! This function will return the basic configuration for an endpoint in device +//! mode. The values returned in \e *pulMaxPacketSize and \e *pulFlags are +//! equivalent to the \e ulMaxPacketSize and \e ulFlags previously passed to +//! USBDevEndpointConfigSet() for this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulMaxPacketSize, + unsigned long *pulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT(pulMaxPacketSize && pulFlags); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // Determine if a transmit or receive endpoint is being queried. + // + if(*pulFlags & USB_EP_DEV_IN) + { + // + // Clear the flags other than the direction bit. + // + *pulFlags = USB_EP_DEV_IN; + + // + // Get the maximum packet size. + // + *pulMaxPacketSize = (unsigned long)HWREGB(ulBase + + EP_OFFSET(ulEndpoint) + + USB_O_TXMAXP1); + + // + // Get the current transmit control register value. + // + ulRegister = (unsigned long)HWREGB(ulBase + EP_OFFSET(ulEndpoint) + + USB_O_TXCSRH1); + + // + // Are we allowing auto setting of TxPktRdy when max packet size has + // been loaded into the FIFO? + // + if(ulRegister & USB_TXCSRH1_AUTOSET) + { + *pulFlags |= USB_EP_AUTO_SET; + } + + // + // Get the DMA mode. + // + if(ulRegister & USB_TXCSRH1_DMAEN) + { + if(ulRegister & USB_TXCSRH1_DMAMOD) + { + *pulFlags |= USB_EP_DMA_MODE_1; + } + else + { + *pulFlags |= USB_EP_DMA_MODE_0; + } + } + + // + // Are we in isochronous mode? + // + if(ulRegister & USB_TXCSRH1_ISO) + { + *pulFlags |= USB_EP_MODE_ISOC; + } + else + { + // + // The hardware doesn't differentiate between bulk, interrupt + // and control mode for the endpoint so we just set something + // that isn't isochronous. This ensures that anyone modifying + // the returned flags in preparation for a call to + // USBDevEndpointConfigSet will not see an unexpected mode change. + // If they decode the returned mode, however, they may be in for + // a surprise. + // + *pulFlags |= USB_EP_MODE_BULK; + } + } + else + { + // + // Clear the flags other than the direction bit. + // + *pulFlags = USB_EP_DEV_OUT; + + // + // Get the MaxPacketSize. + // + *pulMaxPacketSize = (unsigned long)HWREGB(ulBase + + EP_OFFSET(ulEndpoint) + + USB_O_RXMAXP1); + + // + // Get the current receive control register value. + // + ulRegister = (unsigned long)HWREGB(ulBase + EP_OFFSET(ulEndpoint) + + USB_O_RXCSRH1); + + // + // Are we allowing auto clearing of RxPktRdy when packet of size max + // packet has been unloaded from the FIFO? + // + if(ulRegister & USB_RXCSRH1_AUTOCL) + { + *pulFlags |= USB_EP_AUTO_CLEAR; + } + + // + // Get the DMA mode. + // + if(ulRegister & USB_RXCSRH1_DMAEN) + { + if(ulRegister & USB_RXCSRH1_DMAMOD) + { + *pulFlags |= USB_EP_DMA_MODE_1; + } + else + { + *pulFlags |= USB_EP_DMA_MODE_0; + } + } + + // + // Are we in isochronous mode? + // + if(ulRegister & USB_RXCSRH1_ISO) + { + *pulFlags |= USB_EP_MODE_ISOC; + } + else + { + // + // The hardware doesn't differentiate between bulk, interrupt + // and control mode for the endpoint so we just set something + // that isn't isochronous. This ensures that anyone modifying + // the returned flags in preparation for a call to + // USBDevEndpointConfigSet will not see an unexpected mode change. + // If they decode the returned mode, however, they may be in for + // a surprise. + // + *pulFlags |= USB_EP_MODE_BULK; + } + } +} + +//***************************************************************************** +// +//! Sets the FIFO configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFIFOAddress is the starting address for the FIFO. +//! \param ulFIFOSize is the size of the FIFO in bytes. +//! \param ulFlags specifies what information to set in the FIFO configuration. +//! +//! This function will set the starting FIFO RAM address and size of the FIFO +//! for a given endpoint. Endpoint zero does not have a dynamically +//! configurable FIFO so this function should not be called for endpoint zero. +//! The \e ulFIFOSize parameter should be one of the values in the +//! \b USB_FIFO_SZ_ values. If the endpoint is going to use double buffering +//! it should use the values with the \b _DB at the end of the value. For +//! example, use \b USB_FIFO_SZ_16_DB to configure an endpoint to have a 16 +//! byte double buffered FIFO. If a double buffered FIFO is used, then the +//! actual size of the FIFO will be twice the size indicated by the +//! \e ulFIFOSize parameter. This means that the \b USB_FIFO_SZ_16_DB value +//! will use 32 bytes of the USB controller's FIFO memory. +//! +//! The \e ulFIFOAddress value should be a multiple of 8 bytes and directly +//! indicates the starting address in the USB controller's FIFO RAM. For +//! example, a value of 64 indicates that the FIFO should start 64 bytes into +//! the USB controller's FIFO memory. The \e ulFlags value specifies whether +//! the endpoint's OUT or IN FIFO should be configured. If in host mode, use +//! \b USB_EP_HOST_OUT or \b USB_EP_HOST_IN, and if in device mode use +//! \b USB_EP_DEV_OUT or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFIFOAddress, unsigned long ulFIFOSize, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive FIFO is being configured. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Set the transmit FIFO location and size for this endpoint. + // + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_TXFIFOSZ, ulFIFOSize, 1); + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_TXFIFOADD, + ulFIFOAddress >> 3, 2); + } + else + { + // + // Set the receive FIFO location and size for this endpoint. + // + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_RXFIFOSZ, ulFIFOSize, 1); + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_RXFIFOADD, + ulFIFOAddress >> 3, 2); + } +} + +//***************************************************************************** +// +//! Returns the FIFO configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pulFIFOAddress is the starting address for the FIFO. +//! \param pulFIFOSize is the size of the FIFO in bytes. +//! \param ulFlags specifies what information to retrieve from the FIFO +//! configuration. +//! +//! This function will return the starting address and size of the FIFO for a +//! given endpoint. Endpoint zero does not have a dynamically configurable +//! FIFO so this function should not be called for endpoint zero. The +//! \e ulFlags parameter specifies whether the endpoint's OUT or IN FIFO should +//! be read. If in host mode, the \e ulFlags parameter should be +//! \b USB_EP_HOST_OUT or \b USB_EP_HOST_IN, and if in device mode the +//! \e ulFlags parameter should be either \b USB_EP_DEV_OUT or +//! \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulFIFOAddress, unsigned long *pulFIFOSize, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive FIFO is being configured. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Get the transmit FIFO location and size for this endpoint. + // + *pulFIFOAddress = (USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_TXFIFOADD, + 2)) << 3; + *pulFIFOSize = USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_TXFIFOSZ, 1); + + } + else + { + // + // Get the receive FIFO location and size for this endpoint. + // + *pulFIFOAddress = (USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_RXFIFOADD, + 2)) << 3; + *pulFIFOSize = USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_RXFIFOSZ, 1); + } +} + +//***************************************************************************** +// +//! Enable DMA on a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies which direction and what mode to use when enabling +//! DMA. +//! +//! This function will enable DMA on a given endpoint and set the mode according +//! to the values in the \e ulFlags parameter. The \e ulFlags parameter should +//! have \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT set. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDMAEnable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // See if the transmit DMA is being enabled. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Enable DMA on the transmit end point. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) |= + USB_TXCSRH1_DMAEN; + } + else + { + // + // Enable DMA on the receive end point. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) |= + USB_RXCSRH1_DMAEN; + } +} + +//***************************************************************************** +// +//! Disable DMA on a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies which direction to disable. +//! +//! This function will disable DMA on a given end point to allow non-DMA +//! USB transactions to generate interrupts normally. The ulFlags should be +//! \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT all other bits are ignored. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDMADisable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // If this was a request to disable DMA on the IN portion of the end point + // then handle it. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Just disable DMA leave the mode setting. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) &= + ~USB_TXCSRH1_DMAEN; + } + else + { + // + // Just disable DMA leave the mode setting. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) &= + ~USB_RXCSRH1_DMAEN; + } +} + +//***************************************************************************** +// +//! Determine the number of bytes of data available in a given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will return the number of bytes of data currently available +//! in the FIFO for the given receive (OUT) endpoint. It may be used prior to +//! calling USBEndpointDataGet() to determine the size of buffer required to +//! hold the newly-received packet. +//! +//! \return This call will return the number of bytes available in a given +//! endpoint FIFO. +// +//***************************************************************************** +unsigned long +USBEndpointDataAvail(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the address of the receive status register to use, based on the + // endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Is there a packet ready in the FIFO? + // + if((HWREGH(ulBase + ulRegister) & USB_CSRL0_RXRDY) == 0) + { + return(0); + } + + // + // Return the byte count in the FIFO. + // + return(HWREGH(ulBase + USB_O_COUNT0 + ulEndpoint)); +} + +//***************************************************************************** +// +//! Retrieves data from the given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pucData is a pointer to the data area used to return the data from +//! the FIFO. +//! \param pulSize is initially the size of the buffer passed into this call +//! via the \e pucData parameter. It will be set to the amount of data +//! returned in the buffer. +//! +//! This function will return the data from the FIFO for the given endpoint. +//! The \e pulSize parameter should indicate the size of the buffer passed in +//! the \e pulData parameter. The data in the \e pulSize parameter will be +//! changed to match the amount of data returned in the \e pucData parameter. +//! If a zero byte packet was received this call will not return a error but +//! will instead just return a zero in the \e pulSize parameter. The only +//! error case occurs when there is no data packet available. +//! +//! \return This call will return 0, or -1 if no packet was received. +// +//***************************************************************************** +long +USBEndpointDataGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long *pulSize) +{ + unsigned long ulRegister, ulByteCount, ulFIFO; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the address of the receive status register to use, based on the + // endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Don't allow reading of data if the RxPktRdy bit is not set. + // + if((HWREGH(ulBase + ulRegister) & USB_CSRL0_RXRDY) == 0) + { + // + // Can't read the data because none is available. + // + *pulSize = 0; + + // + // Return a failure since there is no data to read. + // + return(-1); + } + + // + // Get the byte count in the FIFO. + // + ulByteCount = HWREGH(ulBase + USB_O_COUNT0 + ulEndpoint); + + // + // Determine how many bytes we will actually copy. + // + ulByteCount = (ulByteCount < *pulSize) ? ulByteCount : *pulSize; + + // + // Return the number of bytes we are going to read. + // + *pulSize = ulByteCount; + + // + // Calculate the FIFO address. + // + ulFIFO = ulBase + USB_O_FIFO0 + (ulEndpoint >> 2); + + // + // Read the data out of the FIFO. + // + for(; ulByteCount > 0; ulByteCount--) + { + // + // Read a byte at a time from the FIFO. + // + *pucData++ = HWREGB(ulFIFO); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Acknowledge that data was read from the given endpoint's FIFO in device +//! mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param bIsLastPacket indicates if this is the last packet. +//! +//! This function acknowledges that the data was read from the endpoint's FIFO. +//! The \e bIsLastPacket parameter is set to a \b true value if this is the +//! last in a series of data packets on endpoint zero. The \e bIsLastPacket +//! parameter is not used for endpoints other than endpoint zero. This call +//! can be used if processing is required between reading the data and +//! acknowledging that the data has been read. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointDataAck(unsigned long ulBase, unsigned long ulEndpoint, + tBoolean bIsLastPacket) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Determine which endpoint is being acked. + // + if(ulEndpoint == USB_EP_0) + { + // + // Clear RxPktRdy, and optionally DataEnd, on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) = + USB_CSRL0_RXRDYC | (bIsLastPacket ? USB_CSRL0_DATAEND : 0); + } + else + { + // + // Clear RxPktRdy on all other endpoints. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_RXRDY); + } +} + +//***************************************************************************** +// +//! Acknowledge that data was read from the given endpoint's FIFO in host +//! mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function acknowledges that the data was read from the endpoint's FIFO. +//! This call is used if processing is required between reading the data and +//! acknowledging that the data has been read. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointDataAck(unsigned long ulBase, unsigned long ulEndpoint) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Clear RxPktRdy. + // + if(ulEndpoint == USB_EP_0) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~USB_CSRL0_RXRDY; + } + else + { + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_RXRDY); + } +} + +//***************************************************************************** +// +//! Puts data into the given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pucData is a pointer to the data area used as the source for the +//! data to put into the FIFO. +//! \param ulSize is the amount of data to put into the FIFO. +//! +//! This function will put the data from the \e pucData parameter into the FIFO +//! for this endpoint. If a packet is already pending for transmission then +//! this call will not put any of the data into the FIFO and will return -1. +//! Care should be taken to not write more data than can fit into the FIFO +//! allocated by the call to USBFIFOConfig(). +//! +//! \return This call will return 0 on success, or -1 to indicate that the FIFO +//! is in use and cannot be written. +// +//***************************************************************************** +long +USBEndpointDataPut(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long ulSize) +{ + unsigned long ulFIFO; + unsigned char ucTxPktRdy; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the bit position of TxPktRdy based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ucTxPktRdy = USB_CSRL0_TXRDY; + } + else + { + ucTxPktRdy = USB_TXCSRL1_TXRDY; + } + + // + // Don't allow transmit of data if the TxPktRdy bit is already set. + // + if(HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) & ucTxPktRdy) + { + return(-1); + } + + // + // Calculate the FIFO address. + // + ulFIFO = ulBase + USB_O_FIFO0 + (ulEndpoint >> 2); + + // + // Write the data to the FIFO. + // + for(; ulSize > 0; ulSize--) + { + HWREGB(ulFIFO) = *pucData++; + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Starts the transfer of data from an endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulTransType is set to indicate what type of data is being sent. +//! +//! This function will start the transfer of data from the FIFO for a given +//! endpoint. This is necessary if the \b USB_EP_AUTO_SET bit was not enabled +//! for the endpoint. Setting the \e ulTransType parameter will allow the +//! appropriate signaling on the USB bus for the type of transaction being +//! requested. The \e ulTransType parameter should be one of the following: +//! +//! - USB_TRANS_OUT for OUT transaction on any endpoint in host mode. +//! - USB_TRANS_IN for IN transaction on any endpoint in device mode. +//! - USB_TRANS_IN_LAST for the last IN transactions on endpoint zero in a +//! sequence of IN transactions. +//! - USB_TRANS_SETUP for setup transactions on endpoint zero. +//! - USB_TRANS_STATUS for status results on endpoint zero. +//! +//! \return This call will return 0 on success, or -1 if a transmission is +//! already in progress. +// +//***************************************************************************** +long +USBEndpointDataSend(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulTransType) +{ + unsigned long ulTxPktRdy; + + // + // CHeck the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the bit position of TxPktRdy based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulTxPktRdy = ulTransType & 0xff; + } + else + { + ulTxPktRdy = (ulTransType >> 8) & 0xff; + } + + // + // Don't allow transmit of data if the TxPktRdy bit is already set. + // + if(HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) & USB_CSRL0_TXRDY) + { + return(-1); + } + + // + // Set TxPktRdy in order to send the data. + // + HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) = ulTxPktRdy; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Forces a flush of an endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies if the IN or OUT endpoint should be accessed. +//! +//! This function will force the controller to flush out the data in the FIFO. +//! The function can be called with either host or device controllers and +//! requires the \e ulFlags parameter be one of \b USB_EP_HOST_OUT, +//! \b USB_EP_HOST_IN, \b USB_EP_DEV_OUT, or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOFlush(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Endpoint zero has a different register set for FIFO flushing. + // + if(ulEndpoint == USB_EP_0) + { + // + // Nothing in the FIFO if neither of these bits are set. + // + if((HWREGB(ulBase + USB_O_CSRL0) & + (USB_CSRL0_RXRDY | USB_CSRL0_TXRDY)) != 0) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_CSRH0) = USB_CSRH0_FLUSH; + } + } + else + { + // + // Only reset the IN or OUT FIFO. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Make sure the FIFO is not empty. + // + if(HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) & + USB_TXCSRL1_TXRDY) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_FLUSH; + } + } + else + { + // + // Make sure that the FIFO is not empty. + // + if(HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) & + USB_RXCSRL1_RXRDY) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_FLUSH; + } + } + } +} + +//***************************************************************************** +// +//! Schedules a request for an IN transaction on an endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will schedule a request for an IN transaction. When the USB +//! device being communicated with responds the data, the data can be retrieved +//! by calling USBEndpointDataGet() or via a DMA transfer. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostRequestIN(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Endpoint zero uses a different offset than the other endpoints. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Set the request for an IN transaction. + // + HWREGB(ulBase + ulRegister) = USB_RXCSRL1_REQPKT; +} + +//***************************************************************************** +// +//! Issues a request for a status IN transaction on endpoint zero. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function is used to cause a request for an status IN transaction from +//! a device on endpoint zero. This function can only be used with endpoint +//! zero as that is the only control endpoint that supports this ability. This +//! is used to complete the last phase of a control transaction to a device and +//! an interrupt will be signaled when the status packet has been received. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostRequestStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the request for a status IN transaction. + // + HWREGB(ulBase + USB_O_CSRL0) = USB_CSRL0_REQPKT | USB_CSRL0_STATUS; +} + +//***************************************************************************** +// +//! Sets the functional address for the device that is connected to an +//! endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulAddr is the functional address for the controller to use for this +//! endpoint. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will set the functional address for a device that is using +//! this endpoint for communication. This \e ulAddr parameter is the address +//! of the target device that this endpoint will be used to communicate with. +//! The \e ulFlags parameter indicates if the IN or OUT endpoint should be set. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive address should be set. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the transmit address. + // + HWREGB(ulBase + USB_O_TXFUNCADDR0 + (ulEndpoint >> 1)) = ulAddr; + } + else + { + // + // Set the receive address. + // + HWREGB(ulBase + USB_O_TXFUNCADDR0 + 4 + (ulEndpoint >> 1)) = ulAddr; + } +} + +//***************************************************************************** +// +//! Gets the current functional device address for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function returns the current functional address that an endpoint is +//! using to communicate with a device. The \e ulFlags parameter determines if +//! the IN or OUT endpoint's device address is returned. +//! +//! \note This function should only be called in host mode. +//! +//! \return Returns the current function address being used by an endpoint. +// +//***************************************************************************** +unsigned long +USBHostAddrGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive address should be returned. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Return this endpoint's transmit address. + // + return(HWREGB(ulBase + USB_O_TXFUNCADDR0 + (ulEndpoint >> 1))); + } + else + { + // + // Return this endpoint's receive address. + // + return(HWREGB(ulBase + USB_O_TXFUNCADDR0 + 4 + (ulEndpoint >> 1))); + } +} + +//***************************************************************************** +// +//! Set the hub address for the device that is connected to an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulAddr is the hub address for the device using this endpoint. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will set the hub address for a device that is using this +//! endpoint for communication. The \e ulFlags parameter determines if the +//! device address for the IN or the OUT endpoint is set by this call. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostHubAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the hub transmit or receive address is being set. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the hub transmit address for this endpoint. + // + HWREGB(ulBase + USB_O_TXHUBADDR0 + (ulEndpoint >> 1)) = ulAddr; + } + else + { + // + // Set the hub receive address for this endpoint. + // + HWREGB(ulBase + USB_O_TXHUBADDR0 + 4 + (ulEndpoint >> 1)) = ulAddr; + } +} + +//***************************************************************************** +// +//! Get the current device hub address for this endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will return the current hub address that an endpoint is using +//! to communicate with a device. The \e ulFlags parameter determines if the +//! device address for the IN or OUT endpoint is returned. +//! +//! \note This function should only be called in host mode. +//! +//! \return This function returns the current hub address being used by an +//! endpoint. +// +//***************************************************************************** +unsigned long +USBHostHubAddrGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the hub transmit or receive address should be returned. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Return the hub transmit address for this endpoint. + // + return(HWREGB(ulBase + USB_O_TXHUBADDR0 + (ulEndpoint >> 1))); + } + else + { + // + // Return the hub receive address for this endpoint. + // + return(HWREGB(ulBase + USB_O_TXHUBADDR0 + 4 + (ulEndpoint >> 1))); + } +} + +//***************************************************************************** +// +//! Sets the configuration for USB power fault. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies the configuration of the power fault. +//! +//! This function controls how the USB controller uses its external power +//! control pins(USBnPFTL and USBnEPEN). The flags specify the power +//! fault level sensitivity, the power fault action, and the power enable level +//! and source. +//! +//! One of the following can be selected as the power fault level +//! sensitivity: +//! +//! - \b USB_HOST_PWRFLT_LOW - An external power fault is indicated by the pin +//! being driven low. +//! - \b USB_HOST_PWRFLT_HIGH - An external power fault is indicated by the pin +//! being driven high. +//! +//! One of the following can be selected as the power fault action: +//! +//! - \b USB_HOST_PWRFLT_EP_NONE - No automatic action when power fault +//! detected. +//! - \b USB_HOST_PWRFLT_EP_TRI - Automatically Tri-state the USBnEPEN pin on a +//! power fault. +//! - \b USB_HOST_PWRFLT_EP_LOW - Automatically drive USBnEPEN pin low on a +//! power fault. +//! - \b USB_HOST_PWRFLT_EP_HIGH - Automatically drive USBnEPEN pin high on a +//! power fault. +//! +//! One of the following can be selected as the power enable level and source: +//! +//! - \b USB_HOST_PWREN_MAN_LOW - USBEPEN is driven low by the USB controller +//! when USBHostPwrEnable() is called. +//! - \b USB_HOST_PWREN_MAN_HIGH - USBEPEN is driven high by the USB controller +//! when USBHostPwrEnable() is called. +//! - \b USB_HOST_PWREN_AUTOLOW - USBEPEN is driven low by the USB controller +//! automatically if USBOTGSessionRequest() has +//! enabled a session. +//! - \b USB_HOST_PWREN_AUTOHIGH - USBEPEN is driven high by the USB controller +//! automatically if USBOTGSessionRequest() has +//! enabled a session. +//! +//! On devices that support the VBUS glitch filter, the +//! \b USB_HOST_PWREN_FILTER can be added to ignore small short drops in VBUS +//! level caused by high power consumption. This is mainly used to avoid +//! causing VBUS errors caused by devices with high in-rush current. +//! +//! \note The following values have been deprecated and should no longer be +//! used. +//! - \b USB_HOST_PWREN_LOW - Automatically drive USBnEPEN low when power is +//! enabled. +//! - \b USB_HOST_PWREN_HIGH - Automatically drive USBnEPEN high when power is +//! enabled. +//! - \b USB_HOST_PWREN_VBLOW - Automatically drive USBnEPEN low when power is +//! enabled. +//! - \b USB_HOST_PWREN_VBHIGH - Automatically drive USBnEPEN high when power is +//! enabled. +//! +//! \note This function should only be called on microcontrollers that support +//! host mode or OTG operation. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrConfig(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_HOST_PWREN_FILTER | USB_EPC_PFLTACT_M | + USB_EPC_PFLTAEN | USB_EPC_PFLTSEN_HIGH | + USB_EPC_EPEN_M)) == 0); + + // + // If requested, enable VBUS droop detection on parts that support this + // feature. + // + HWREG(ulBase + USB_O_VDC) = ulFlags >> 16; + + // + // Set the power fault configuration as specified. This will not change + // whether fault detection is enabled or not. + // + HWREGH(ulBase + USB_O_EPC) = + (ulFlags | (HWREGH(ulBase + USB_O_EPC) & + ~(USB_EPC_PFLTACT_M | USB_EPC_PFLTAEN | + USB_EPC_PFLTSEN_HIGH | USB_EPC_EPEN_M))); +} + +//***************************************************************************** +// +//! Enables power fault detection. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function enables power fault detection in the USB controller. If the +//! USBPFLT pin is not in use this function should not be used. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrFaultEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable power fault input. + // + HWREGH(ulBase + USB_O_EPC) |= USB_EPC_PFLTEN; +} + +//***************************************************************************** +// +//! Disables power fault detection. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function disables power fault detection in the USB controller. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrFaultDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable power fault input. + // + HWREGH(ulBase + USB_O_EPC) &= ~USB_EPC_PFLTEN; +} + +//***************************************************************************** +// +//! Enables the external power pin. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function enables the USBEPEN signal to enable an external power supply +//! in host mode operation. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable the external power supply enable signal. + // + HWREGH(ulBase + USB_O_EPC) |= USB_EPC_EPENDE; +} + +//***************************************************************************** +// +//! Disables the external power pin. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function disables the USBEPEN signal to disable an external power +//! supply in host mode operation. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Disable the external power supply enable signal. + // + HWREGH(ulBase + USB_O_EPC) &= ~USB_EPC_EPENDE; +} + +//***************************************************************************** +// +//! Get the current frame number. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function returns the last frame number received. +//! +//! \return The last frame number received. +// +//***************************************************************************** +unsigned long +USBFrameNumberGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Return the most recent frame number. + // + return(HWREGH(ulBase + USB_O_FRAME)); +} + +//***************************************************************************** +// +//! Starts or ends a session. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies if this call starts or ends a session. +//! +//! This function is used in OTG mode to start a session request or end a +//! session. If the \e bStart parameter is set to \b true, then this function +//! start a session and if it is \b false it will end a session. +//! +//! \return None. +// +//***************************************************************************** +void +USBOTGSessionRequest(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Start or end the session as directed. + // + if(bStart) + { + HWREGB(ulBase + USB_O_DEVCTL) |= USB_DEVCTL_SESSION; + } + else + { + HWREGB(ulBase + USB_O_DEVCTL) &= ~USB_DEVCTL_SESSION; + } +} + +//***************************************************************************** +// +//! Returns the absolute FIFO address for a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint's FIFO address to return. +//! +//! This function returns the actual physical address of the FIFO. This is +//! needed when the USB is going to be used with the uDMA controller and the +//! source or destination address needs to be set to the physical FIFO address +//! for a given endpoint. +//! +//! \return None. +// +//***************************************************************************** +unsigned long +USBFIFOAddrGet(unsigned long ulBase, unsigned long ulEndpoint) +{ + // + // Return the FIFO address for this endpoint. + // + return(ulBase + USB_O_FIFO0 + (ulEndpoint >> 2)); +} + +//***************************************************************************** +// +//! Returns the current operating mode of the controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function returns the current operating mode on USB controllers with +//! OTG or Dual mode functionality. +//! +//! For OTG controllers: +//! +//! The function will return on of the following values on OTG controllers: +//! \b USB_OTG_MODE_ASIDE_HOST, \b USB_OTG_MODE_ASIDE_DEV, +//! \b USB_OTG_MODE_BSIDE_HOST, \b USB_OTG_MODE_BSIDE_DEV, +//! \b USB_OTG_MODE_NONE. +//! +//! \b USB_OTG_MODE_ASIDE_HOST indicates that the controller is in host mode +//! on the A-side of the cable. +//! +//! \b USB_OTG_MODE_ASIDE_DEV indicates that the controller is in device mode +//! on the A-side of the cable. +//! +//! \b USB_OTG_MODE_BSIDE_HOST indicates that the controller is in host mode +//! on the B-side of the cable. +//! +//! \b USB_OTG_MODE_BSIDE_DEV indicates that the controller is in device mode +//! on the B-side of the cable. If and OTG session request is started with no +//! cable in place this is the default mode for the controller. +//! +//! \b USB_OTG_MODE_NONE indicates that the controller is not attempting to +//! determine its role in the system. +//! +//! For Dual Mode controllers: +//! +//! The function will return on of the following values: +//! \b USB_DUAL_MODE_HOST, \b USB_DUAL_MODE_DEVICE, or +//! \b USB_DUAL_MODE_NONE. +//! +//! \b USB_DUAL_MODE_HOST indicates that the controller is acting as a host. +//! +//! \b USB_DUAL_MODE_DEVICE indicates that the controller acting as a device. +//! +//! \b USB_DUAL_MODE_NONE indicates that the controller is not active as +//! either a host or device. +//! +//! \return Returns \b USB_OTG_MODE_ASIDE_HOST, \b USB_OTG_MODE_ASIDE_DEV, +//! \b USB_OTG_MODE_BSIDE_HOST, \b USB_OTG_MODE_BSIDE_DEV, +//! \b USB_OTG_MODE_NONE, \b USB_DUAL_MODE_HOST, \b USB_DUAL_MODE_DEVICE, or +//! \b USB_DUAL_MODE_NONE. +// +//***************************************************************************** +unsigned long +USBModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Checks the current mode in the USB_O_DEVCTL and returns the current + // mode. + // + // USB_OTG_MODE_ASIDE_HOST: USB_DEVCTL_HOST | USB_DEVCTL_SESSION + // USB_OTG_MODE_ASIDE_DEV: USB_DEVCTL_SESSION + // USB_OTG_MODE_BSIDE_HOST: USB_DEVCTL_DEV | USB_DEVCTL_SESSION | + // USB_DEVCTL_HOST + // USB_OTG_MODE_BSIDE_DEV: USB_DEVCTL_DEV | USB_DEVCTL_SESSION + // USB_OTG_MODE_NONE: USB_DEVCTL_DEV + // + return(HWREGB(ulBase + USB_O_DEVCTL) & + (USB_DEVCTL_DEV | USB_DEVCTL_HOST | USB_DEVCTL_SESSION | + USB_DEVCTL_VBUS_M)); +} + +//***************************************************************************** +// +//! Sets the DMA channel to use for a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint's FIFO address to return. +//! \param ulChannel specifies which DMA channel to use for which endpoint. +//! +//! This function is used to configure which DMA channel to use with a given +//! endpoint. Receive DMA channels can only be used with receive endpoints +//! and transmit DMA channels can only be used with transmit endpoints. This +//! allows the 3 receive and 3 transmit DMA channels to be mapped to any +//! endpoint other than 0. The values that should be passed into the \e +//! ulChannel value are the UDMA_CHANNEL_USBEP* values defined in udma.h. +//! +//! \note This function only has an effect on microcontrollers that have the +//! ability to change the DMA channel for an endpoint. Calling this function +//! on other devices will have no effect. +//! +//! \return None. +//! +//***************************************************************************** +void +USBEndpointDMAChannel(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulChannel) +{ + unsigned long ulMask; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + ASSERT(ulChannel <= UDMA_CHANNEL_USBEP3TX); + + // + // The input select mask needs to be shifted into the correct position + // based on the channel. + // + ulMask = 0xf << (ulChannel * 4); + + // + // Clear out the current selection for the channel. + // + ulMask = HWREG(ulBase + USB_O_DMASEL) & (~ulMask); + + // + // The input select is now shifted into the correct position based on the + // channel. + // + ulMask |= (USB_EP_TO_INDEX(ulEndpoint)) << (ulChannel * 4); + + // + // Write the value out to the register. + // + HWREG(ulBase + USB_O_DMASEL) = ulMask; +} + +//***************************************************************************** +// +//! Change the mode of the USB controller to host. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function changes the mode of the USB controller to host mode. This +//! is only valid on microcontrollers that have the host and device +//! capabilities and not the OTG capabilities. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostMode(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Force mode in OTG parts that support forcing USB controller mode. + // This bit is not writable in USB controllers that do not support + // forcing the mode. Not setting the USB_GPCS_DEVMOD bit makes this a + // force of host mode. + // + HWREGB(ulBase + USB_O_GPCS) = USB_GPCS_DEVMODOTG; +} + +//***************************************************************************** +// +//! Change the mode of the USB controller to device. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function changes the mode of the USB controller to device mode. This +//! is only valid on microcontrollers that have the host and device +//! capabilities and not the OTG capabilities. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevMode(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the USB controller mode to device. + // + HWREGB(ulBase + USB_O_GPCS) = USB_GPCS_DEVMODOTG | USB_GPCS_DEVMOD; +} + +//***************************************************************************** +// +//! Powers off the USB PHY. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will power off the USB PHY, reducing the current consuption +//! of the device. While in the powered off state, the USB controller will be +//! unable to operate. +//! +//! \return None. +// +//***************************************************************************** +void +USBPHYPowerOff(unsigned long ulBase) +{ + // + // Set the PWRDNPHY bit in the PHY, putting it into its low power mode. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_PWRDNPHY; +} + +//***************************************************************************** +// +//! Powers on the USB PHY. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will power on the USB PHY, enabling it return to normal +//! operation. By default, the PHY is powered on, so this function only needs +//! to be called if USBPHYPowerOff() has previously been called. +//! +//! \return None. +// +//***************************************************************************** +void +USBPHYPowerOn(unsigned long ulBase) +{ + // + // Clear the PWRDNPHY bit in the PHY, putting it into normal operating + // mode. + // + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_PWRDNPHY; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.h new file mode 100644 index 00000000..c5b3b7f2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/usb.h @@ -0,0 +1,567 @@ +//***************************************************************************** +// +// usb.h - Prototypes for the USB Interface Driver. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __USB_H__ +#define __USB_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnableControl() and +// USBIntDisableControl() as the ulFlags parameter, and are returned from +// USBIntStatusControl(). +// +//***************************************************************************** +#define USB_INTCTRL_ALL 0x000003FF // All control interrupt sources +#define USB_INTCTRL_STATUS 0x000000FF // Status Interrupts +#define USB_INTCTRL_VBUS_ERR 0x00000080 // VBUS Error +#define USB_INTCTRL_SESSION 0x00000040 // Session Start Detected +#define USB_INTCTRL_SESSION_END 0x00000040 // Session End Detected +#define USB_INTCTRL_DISCONNECT 0x00000020 // Disconnect Detected +#define USB_INTCTRL_CONNECT 0x00000010 // Device Connect Detected +#define USB_INTCTRL_SOF 0x00000008 // Start of Frame Detected +#define USB_INTCTRL_BABBLE 0x00000004 // Babble signaled +#define USB_INTCTRL_RESET 0x00000004 // Reset signaled +#define USB_INTCTRL_RESUME 0x00000002 // Resume detected +#define USB_INTCTRL_SUSPEND 0x00000001 // Suspend detected +#define USB_INTCTRL_MODE_DETECT 0x00000200 // Mode value valid +#define USB_INTCTRL_POWER_FAULT 0x00000100 // Power Fault detected + +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnableEndpoint() and +// USBIntDisableEndpoint() as the ulFlags parameter, and are returned from +// USBIntStatusEndpoint(). +// +//***************************************************************************** +#define USB_INTEP_ALL 0xFFFFFFFF // Host IN Interrupts +#define USB_INTEP_HOST_IN 0xFFFE0000 // Host IN Interrupts +#define USB_INTEP_HOST_IN_15 0x80000000 // Endpoint 15 Host IN Interrupt +#define USB_INTEP_HOST_IN_14 0x40000000 // Endpoint 14 Host IN Interrupt +#define USB_INTEP_HOST_IN_13 0x20000000 // Endpoint 13 Host IN Interrupt +#define USB_INTEP_HOST_IN_12 0x10000000 // Endpoint 12 Host IN Interrupt +#define USB_INTEP_HOST_IN_11 0x08000000 // Endpoint 11 Host IN Interrupt +#define USB_INTEP_HOST_IN_10 0x04000000 // Endpoint 10 Host IN Interrupt +#define USB_INTEP_HOST_IN_9 0x02000000 // Endpoint 9 Host IN Interrupt +#define USB_INTEP_HOST_IN_8 0x01000000 // Endpoint 8 Host IN Interrupt +#define USB_INTEP_HOST_IN_7 0x00800000 // Endpoint 7 Host IN Interrupt +#define USB_INTEP_HOST_IN_6 0x00400000 // Endpoint 6 Host IN Interrupt +#define USB_INTEP_HOST_IN_5 0x00200000 // Endpoint 5 Host IN Interrupt +#define USB_INTEP_HOST_IN_4 0x00100000 // Endpoint 4 Host IN Interrupt +#define USB_INTEP_HOST_IN_3 0x00080000 // Endpoint 3 Host IN Interrupt +#define USB_INTEP_HOST_IN_2 0x00040000 // Endpoint 2 Host IN Interrupt +#define USB_INTEP_HOST_IN_1 0x00020000 // Endpoint 1 Host IN Interrupt + +#define USB_INTEP_DEV_OUT 0xFFFE0000 // Device OUT Interrupts +#define USB_INTEP_DEV_OUT_15 0x80000000 // Endpoint 15 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_14 0x40000000 // Endpoint 14 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_13 0x20000000 // Endpoint 13 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_12 0x10000000 // Endpoint 12 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_11 0x08000000 // Endpoint 11 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_10 0x04000000 // Endpoint 10 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_9 0x02000000 // Endpoint 9 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_8 0x01000000 // Endpoint 8 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_7 0x00800000 // Endpoint 7 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_6 0x00400000 // Endpoint 6 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_5 0x00200000 // Endpoint 5 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_4 0x00100000 // Endpoint 4 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_3 0x00080000 // Endpoint 3 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_2 0x00040000 // Endpoint 2 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_1 0x00020000 // Endpoint 1 Device OUT Interrupt + +#define USB_INTEP_HOST_OUT 0x0000FFFE // Host OUT Interrupts +#define USB_INTEP_HOST_OUT_15 0x00008000 // Endpoint 15 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_14 0x00004000 // Endpoint 14 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_13 0x00002000 // Endpoint 13 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_12 0x00001000 // Endpoint 12 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_11 0x00000800 // Endpoint 11 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_10 0x00000400 // Endpoint 10 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_9 0x00000200 // Endpoint 9 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_8 0x00000100 // Endpoint 8 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_7 0x00000080 // Endpoint 7 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_6 0x00000040 // Endpoint 6 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_5 0x00000020 // Endpoint 5 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_4 0x00000010 // Endpoint 4 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_3 0x00000008 // Endpoint 3 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_2 0x00000004 // Endpoint 2 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_1 0x00000002 // Endpoint 1 Host OUT Interrupt + +#define USB_INTEP_DEV_IN 0x0000FFFE // Device IN Interrupts +#define USB_INTEP_DEV_IN_15 0x00008000 // Endpoint 15 Device IN Interrupt +#define USB_INTEP_DEV_IN_14 0x00004000 // Endpoint 14 Device IN Interrupt +#define USB_INTEP_DEV_IN_13 0x00002000 // Endpoint 13 Device IN Interrupt +#define USB_INTEP_DEV_IN_12 0x00001000 // Endpoint 12 Device IN Interrupt +#define USB_INTEP_DEV_IN_11 0x00000800 // Endpoint 11 Device IN Interrupt +#define USB_INTEP_DEV_IN_10 0x00000400 // Endpoint 10 Device IN Interrupt +#define USB_INTEP_DEV_IN_9 0x00000200 // Endpoint 9 Device IN Interrupt +#define USB_INTEP_DEV_IN_8 0x00000100 // Endpoint 8 Device IN Interrupt +#define USB_INTEP_DEV_IN_7 0x00000080 // Endpoint 7 Device IN Interrupt +#define USB_INTEP_DEV_IN_6 0x00000040 // Endpoint 6 Device IN Interrupt +#define USB_INTEP_DEV_IN_5 0x00000020 // Endpoint 5 Device IN Interrupt +#define USB_INTEP_DEV_IN_4 0x00000010 // Endpoint 4 Device IN Interrupt +#define USB_INTEP_DEV_IN_3 0x00000008 // Endpoint 3 Device IN Interrupt +#define USB_INTEP_DEV_IN_2 0x00000004 // Endpoint 2 Device IN Interrupt +#define USB_INTEP_DEV_IN_1 0x00000002 // Endpoint 1 Device IN Interrupt + +#define USB_INTEP_0 0x00000001 // Endpoint 0 Interrupt + +//***************************************************************************** +// +// The following are values that are returned from USBSpeedGet(). +// +//***************************************************************************** +#define USB_UNDEF_SPEED 0x80000000 // Current speed is undefined +#define USB_FULL_SPEED 0x00000001 // Current speed is Full Speed +#define USB_LOW_SPEED 0x00000000 // Current speed is Low Speed + +//***************************************************************************** +// +// The following are values that are returned from USBEndpointStatus(). The +// USB_HOST_* values are used when the USB controller is in host mode and the +// USB_DEV_* values are used when the USB controller is in device mode. +// +//***************************************************************************** +#define USB_HOST_IN_PID_ERROR 0x01000000 // Stall on this endpoint received +#define USB_HOST_IN_NOT_COMP 0x00100000 // Device failed to respond +#define USB_HOST_IN_STALL 0x00400000 // Stall on this endpoint received +#define USB_HOST_IN_DATA_ERROR 0x00080000 // CRC or bit-stuff error + // (ISOC Mode) +#define USB_HOST_IN_NAK_TO 0x00080000 // NAK received for more than the + // specified timeout period +#define USB_HOST_IN_ERROR 0x00040000 // Failed to communicate with a + // device +#define USB_HOST_IN_FIFO_FULL 0x00020000 // RX FIFO full +#define USB_HOST_IN_PKTRDY 0x00010000 // Data packet ready +#define USB_HOST_OUT_NAK_TO 0x00000080 // NAK received for more than the + // specified timeout period +#define USB_HOST_OUT_NOT_COMP 0x00000080 // No response from device + // (ISOC mode) +#define USB_HOST_OUT_STALL 0x00000020 // Stall on this endpoint received +#define USB_HOST_OUT_ERROR 0x00000004 // Failed to communicate with a + // device +#define USB_HOST_OUT_FIFO_NE 0x00000002 // TX FIFO is not empty +#define USB_HOST_OUT_PKTPEND 0x00000001 // Transmit still being transmitted +#define USB_HOST_EP0_NAK_TO 0x00000080 // NAK received for more than the + // specified timeout period +#define USB_HOST_EP0_STATUS 0x00000040 // This was a status packet +#define USB_HOST_EP0_ERROR 0x00000010 // Failed to communicate with a + // device +#define USB_HOST_EP0_RX_STALL 0x00000004 // Stall on this endpoint received +#define USB_HOST_EP0_RXPKTRDY 0x00000001 // Receive data packet ready +#define USB_DEV_RX_SENT_STALL 0x00400000 // Stall was sent on this endpoint +#define USB_DEV_RX_DATA_ERROR 0x00080000 // CRC error on the data +#define USB_DEV_RX_OVERRUN 0x00040000 // OUT packet was not loaded due to + // a full FIFO +#define USB_DEV_RX_FIFO_FULL 0x00020000 // RX FIFO full +#define USB_DEV_RX_PKT_RDY 0x00010000 // Data packet ready +#define USB_DEV_TX_NOT_COMP 0x00000080 // Large packet split up, more data + // to come +#define USB_DEV_TX_SENT_STALL 0x00000020 // Stall was sent on this endpoint +#define USB_DEV_TX_UNDERRUN 0x00000004 // IN received with no data ready +#define USB_DEV_TX_FIFO_NE 0x00000002 // The TX FIFO is not empty +#define USB_DEV_TX_TXPKTRDY 0x00000001 // Transmit still being transmitted +#define USB_DEV_EP0_SETUP_END 0x00000010 // Control transaction ended before + // Data End seen +#define USB_DEV_EP0_SENT_STALL 0x00000004 // Stall was sent on this endpoint +#define USB_DEV_EP0_IN_PKTPEND 0x00000002 // Transmit data packet pending +#define USB_DEV_EP0_OUT_PKTRDY 0x00000001 // Receive data packet ready + +//***************************************************************************** +// +// The following are values that can be passed to USBHostEndpointConfig() and +// USBDevEndpointConfigSet() as the ulFlags parameter. +// +//***************************************************************************** +#define USB_EP_AUTO_SET 0x00000001 // Auto set feature enabled +#define USB_EP_AUTO_REQUEST 0x00000002 // Auto request feature enabled +#define USB_EP_AUTO_CLEAR 0x00000004 // Auto clear feature enabled +#define USB_EP_DMA_MODE_0 0x00000008 // Enable DMA access using mode 0 +#define USB_EP_DMA_MODE_1 0x00000010 // Enable DMA access using mode 1 +#define USB_EP_MODE_ISOC 0x00000000 // Isochronous endpoint +#define USB_EP_MODE_BULK 0x00000100 // Bulk endpoint +#define USB_EP_MODE_INT 0x00000200 // Interrupt endpoint +#define USB_EP_MODE_CTRL 0x00000300 // Control endpoint +#define USB_EP_MODE_MASK 0x00000300 // Mode Mask +#define USB_EP_SPEED_LOW 0x00000000 // Low Speed +#define USB_EP_SPEED_FULL 0x00001000 // Full Speed +#define USB_EP_HOST_IN 0x00000000 // Host IN endpoint +#define USB_EP_HOST_OUT 0x00002000 // Host OUT endpoint +#define USB_EP_DEV_IN 0x00002000 // Device IN endpoint +#define USB_EP_DEV_OUT 0x00000000 // Device OUT endpoint + +//***************************************************************************** +// +// The following are values that can be passed to USBHostPwrConfig() as +// the ulFlags parameter. +// +//***************************************************************************** +#define USB_HOST_PWRFLT_LOW 0x00000010 +#define USB_HOST_PWRFLT_HIGH 0x00000030 +#define USB_HOST_PWRFLT_EP_NONE 0x00000000 +#define USB_HOST_PWRFLT_EP_TRI 0x00000140 +#define USB_HOST_PWRFLT_EP_LOW 0x00000240 +#define USB_HOST_PWRFLT_EP_HIGH 0x00000340 +#ifndef DEPRECATED +#define USB_HOST_PWREN_LOW 0x00000002 +#define USB_HOST_PWREN_HIGH 0x00000003 +#define USB_HOST_PWREN_VBLOW 0x00000002 +#define USB_HOST_PWREN_VBHIGH 0x00000003 +#endif +#define USB_HOST_PWREN_MAN_LOW 0x00000000 +#define USB_HOST_PWREN_MAN_HIGH 0x00000001 +#define USB_HOST_PWREN_AUTOLOW 0x00000002 +#define USB_HOST_PWREN_AUTOHIGH 0x00000003 +#define USB_HOST_PWREN_FILTER 0x00010000 + +//***************************************************************************** +// +// The following are special values that can be passed to +// USBHostEndpointConfig() as the ulNAKPollInterval parameter. +// +//***************************************************************************** +#define MAX_NAK_LIMIT 31 // Maximum NAK interval +#define DISABLE_NAK_LIMIT 0 // No NAK timeouts + +//***************************************************************************** +// +// This value specifies the maximum size of transfers on endpoint 0 as 64 +// bytes. This value is fixed in hardware as the FIFO size for endpoint 0. +// +//***************************************************************************** +#define MAX_PACKET_SIZE_EP0 64 + +//***************************************************************************** +// +// These values are used to indicate which endpoint to access. +// +//***************************************************************************** +#define USB_EP_0 0x00000000 // Endpoint 0 +#define USB_EP_1 0x00000010 // Endpoint 1 +#define USB_EP_2 0x00000020 // Endpoint 2 +#define USB_EP_3 0x00000030 // Endpoint 3 +#define USB_EP_4 0x00000040 // Endpoint 4 +#define USB_EP_5 0x00000050 // Endpoint 5 +#define USB_EP_6 0x00000060 // Endpoint 6 +#define USB_EP_7 0x00000070 // Endpoint 7 +#define USB_EP_8 0x00000080 // Endpoint 8 +#define USB_EP_9 0x00000090 // Endpoint 9 +#define USB_EP_10 0x000000A0 // Endpoint 10 +#define USB_EP_11 0x000000B0 // Endpoint 11 +#define USB_EP_12 0x000000C0 // Endpoint 12 +#define USB_EP_13 0x000000D0 // Endpoint 13 +#define USB_EP_14 0x000000E0 // Endpoint 14 +#define USB_EP_15 0x000000F0 // Endpoint 15 +#define NUM_USB_EP 16 // Number of supported endpoints + +//***************************************************************************** +// +// These macros allow conversion between 0-based endpoint indices and the +// USB_EP_x values required when calling various USB APIs. +// +//***************************************************************************** +#define INDEX_TO_USB_EP(x) ((x) << 4) +#define USB_EP_TO_INDEX(x) ((x) >> 4) + +//***************************************************************************** +// +// The following are values that can be passed to USBFIFOConfigSet() as the +// ulFIFOSize parameter. +// +//***************************************************************************** +#define USB_FIFO_SZ_8 0x00000000 // 8 byte FIFO +#define USB_FIFO_SZ_16 0x00000001 // 16 byte FIFO +#define USB_FIFO_SZ_32 0x00000002 // 32 byte FIFO +#define USB_FIFO_SZ_64 0x00000003 // 64 byte FIFO +#define USB_FIFO_SZ_128 0x00000004 // 128 byte FIFO +#define USB_FIFO_SZ_256 0x00000005 // 256 byte FIFO +#define USB_FIFO_SZ_512 0x00000006 // 512 byte FIFO +#define USB_FIFO_SZ_1024 0x00000007 // 1024 byte FIFO +#define USB_FIFO_SZ_2048 0x00000008 // 2048 byte FIFO +#define USB_FIFO_SZ_4096 0x00000009 // 4096 byte FIFO +#define USB_FIFO_SZ_8_DB 0x00000010 // 8 byte double buffered FIFO + // (occupying 16 bytes) +#define USB_FIFO_SZ_16_DB 0x00000011 // 16 byte double buffered FIFO + // (occupying 32 bytes) +#define USB_FIFO_SZ_32_DB 0x00000012 // 32 byte double buffered FIFO + // (occupying 64 bytes) +#define USB_FIFO_SZ_64_DB 0x00000013 // 64 byte double buffered FIFO + // (occupying 128 bytes) +#define USB_FIFO_SZ_128_DB 0x00000014 // 128 byte double buffered FIFO + // (occupying 256 bytes) +#define USB_FIFO_SZ_256_DB 0x00000015 // 256 byte double buffered FIFO + // (occupying 512 bytes) +#define USB_FIFO_SZ_512_DB 0x00000016 // 512 byte double buffered FIFO + // (occupying 1024 bytes) +#define USB_FIFO_SZ_1024_DB 0x00000017 // 1024 byte double buffered FIFO + // (occupying 2048 bytes) +#define USB_FIFO_SZ_2048_DB 0x00000018 // 2048 byte double buffered FIFO + // (occupying 4096 bytes) + +//***************************************************************************** +// +// This macro allow conversion from a FIFO size label as defined above to +// a number of bytes +// +//***************************************************************************** +#define USB_FIFO_SIZE_DB_FLAG 0x00000010 +#define USB_FIFO_SZ_TO_BYTES(x) ((8 << ((x) & ~ USB_FIFO_SIZE_DB_FLAG)) * \ + (((x) & USB_FIFO_SIZE_DB_FLAG) ? 2 : 1)) + +//***************************************************************************** +// +// The following are values that can be passed to USBEndpointDataSend() as the +// ulTransType parameter. +// +//***************************************************************************** +#define USB_TRANS_OUT 0x00000102 // Normal OUT transaction +#define USB_TRANS_IN 0x00000102 // Normal IN transaction +#define USB_TRANS_IN_LAST 0x0000010a // Final IN transaction (for + // endpoint 0 in device mode) +#define USB_TRANS_SETUP 0x0000110a // Setup transaction (for endpoint + // 0) +#define USB_TRANS_STATUS 0x00000142 // Status transaction (for endpoint + // 0) + +//***************************************************************************** +// +// The following are values are returned by the USBModeGet function. +// +//***************************************************************************** +#define USB_DUAL_MODE_HOST 0x00000001 // Dual mode controller is in Host + // mode. +#define USB_DUAL_MODE_DEVICE 0x00000081 // Dual mode controller is in + // Device mode. +#define USB_DUAL_MODE_NONE 0x00000080 // Dual mode controller mode is not + // set. +#define USB_OTG_MODE_ASIDE_HOST 0x0000001d // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_ASIDE_NPWR 0x00000001 // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_ASIDE_SESS 0x00000009 // OTG controller on the A side of + // the cable Session Valid. +#define USB_OTG_MODE_ASIDE_AVAL 0x00000011 // OTG controller on the A side of + // the cable A valid. +#define USB_OTG_MODE_ASIDE_DEV 0x00000019 // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_BSIDE_HOST 0x0000009d // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_BSIDE_DEV 0x00000099 // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_BSIDE_NPWR 0x00000081 // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_NONE 0x00000080 // OTG controller mode is not set. + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long USBDevAddrGet(unsigned long ulBase); +extern void USBDevAddrSet(unsigned long ulBase, unsigned long ulAddress); +extern void USBDevConnect(unsigned long ulBase); +extern void USBDevDisconnect(unsigned long ulBase); +extern void USBDevEndpointConfigSet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, + unsigned long ulFlags); +extern void USBDevEndpointConfigGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long *pulMaxPacketSize, + unsigned long *pulFlags); +extern void USBDevEndpointDataAck(unsigned long ulBase, + unsigned long ulEndpoint, + tBoolean bIsLastPacket); +extern void USBDevEndpointStall(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBDevEndpointStallClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBDevEndpointStatusClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBEndpointDataAvail(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBEndpointDMAEnable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBEndpointDMADisable(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern long USBEndpointDataGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long *pulSize); +extern long USBEndpointDataPut(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long ulSize); +extern long USBEndpointDataSend(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulTransType); +extern void USBEndpointDataToggleClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBEndpointStatus(unsigned long ulBase, + unsigned long ulEndpoint); +extern unsigned long USBFIFOAddrGet(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBFIFOConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulFIFOAddress, + unsigned long *pulFIFOSize, + unsigned long ulFlags); +extern void USBFIFOConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFIFOAddress, + unsigned long ulFIFOSize, unsigned long ulFlags); +extern void USBFIFOFlush(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBFrameNumberGet(unsigned long ulBase); +extern unsigned long USBHostAddrGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBHostAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags); +extern void USBHostEndpointConfig(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, + unsigned long ulNAKPollInterval, + unsigned long ulTargetEndpoint, + unsigned long ulFlags); +extern void USBHostEndpointDataAck(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBHostEndpointDataToggle(unsigned long ulBase, + unsigned long ulEndpoint, + tBoolean bDataToggle, + unsigned long ulFlags); +extern void USBHostEndpointStatusClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBHostHubAddrGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBHostHubAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags); +extern void USBHostPwrDisable(unsigned long ulBase); +extern void USBHostPwrEnable(unsigned long ulBase); +extern void USBHostPwrConfig(unsigned long ulBase, unsigned long ulFlags); +#ifndef DEPRECATED +#define USBHostPwrFaultConfig USBHostPwrConfig +#endif +extern void USBHostPwrFaultDisable(unsigned long ulBase); +extern void USBHostPwrFaultEnable(unsigned long ulBase); +extern void USBHostRequestIN(unsigned long ulBase, unsigned long ulEndpoint); +extern void USBHostRequestStatus(unsigned long ulBase); +extern void USBHostReset(unsigned long ulBase, tBoolean bStart); +extern void USBHostResume(unsigned long ulBase, tBoolean bStart); +extern unsigned long USBHostSpeedGet(unsigned long ulBase); +extern void USBHostSuspend(unsigned long ulBase); +extern void USBIntDisableControl(unsigned long ulBase, + unsigned long ulIntFlags); +extern void USBIntEnableControl(unsigned long ulBase, + unsigned long ulIntFlags); +extern unsigned long USBIntStatusControl(unsigned long ulBase); +extern void USBIntDisableEndpoint(unsigned long ulBase, + unsigned long ulIntFlags); +extern void USBIntEnableEndpoint(unsigned long ulBase, + unsigned long ulIntFlags); +extern unsigned long USBIntStatusEndpoint(unsigned long ulBase); +extern void USBIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void USBIntUnregister(unsigned long ulBase); +extern void USBOTGSessionRequest(unsigned long ulBase, tBoolean bStart); +extern unsigned long USBModeGet(unsigned long ulBase); +extern void USBEndpointDMAChannel(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulChannel); +extern void USBHostMode(unsigned long ulBase); +extern void USBHostMode(unsigned long ulBase); +extern void USBDevMode(unsigned long ulBase); +extern void USBPHYPowerOff(unsigned long ulBase); +extern void USBPHYPowerOn(unsigned long ulBase); + +//***************************************************************************** +// +// Several USB APIs have been renamed, with the original function name being +// deprecated. These defines and function protypes provide backward +// compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnable() and +// USBIntDisable() as the ulIntFlags parameter, and are returned from +// USBIntStatus(). +// +//***************************************************************************** +#define USB_INT_ALL 0xFF030E0F // All Interrupt sources +#define USB_INT_STATUS 0xFF000000 // Status Interrupts +#define USB_INT_VBUS_ERR 0x80000000 // VBUS Error +#define USB_INT_SESSION_START 0x40000000 // Session Start Detected +#define USB_INT_SESSION_END 0x20000000 // Session End Detected +#define USB_INT_DISCONNECT 0x20000000 // Disconnect Detected +#define USB_INT_CONNECT 0x10000000 // Device Connect Detected +#define USB_INT_SOF 0x08000000 // Start of Frame Detected +#define USB_INT_BABBLE 0x04000000 // Babble signaled +#define USB_INT_RESET 0x04000000 // Reset signaled +#define USB_INT_RESUME 0x02000000 // Resume detected +#define USB_INT_SUSPEND 0x01000000 // Suspend detected +#define USB_INT_MODE_DETECT 0x00020000 // Mode value valid +#define USB_INT_POWER_FAULT 0x00010000 // Power Fault detected +#define USB_INT_HOST_IN 0x00000E00 // Host IN Interrupts +#define USB_INT_DEV_OUT 0x00000E00 // Device OUT Interrupts +#define USB_INT_HOST_IN_EP3 0x00000800 // Endpoint 3 Host IN Interrupt +#define USB_INT_HOST_IN_EP2 0x00000400 // Endpoint 2 Host IN Interrupt +#define USB_INT_HOST_IN_EP1 0x00000200 // Endpoint 1 Host IN Interrupt +#define USB_INT_DEV_OUT_EP3 0x00000800 // Endpoint 3 Device OUT Interrupt +#define USB_INT_DEV_OUT_EP2 0x00000400 // Endpoint 2 Device OUT Interrupt +#define USB_INT_DEV_OUT_EP1 0x00000200 // Endpoint 1 Device OUT Interrupt +#define USB_INT_HOST_OUT 0x0000000E // Host OUT Interrupts +#define USB_INT_DEV_IN 0x0000000E // Device IN Interrupts +#define USB_INT_HOST_OUT_EP3 0x00000008 // Endpoint 3 HOST_OUT Interrupt +#define USB_INT_HOST_OUT_EP2 0x00000004 // Endpoint 2 HOST_OUT Interrupt +#define USB_INT_HOST_OUT_EP1 0x00000002 // Endpoint 1 HOST_OUT Interrupt +#define USB_INT_DEV_IN_EP3 0x00000008 // Endpoint 3 DEV_IN Interrupt +#define USB_INT_DEV_IN_EP2 0x00000004 // Endpoint 2 DEV_IN Interrupt +#define USB_INT_DEV_IN_EP1 0x00000002 // Endpoint 1 DEV_IN Interrupt +#define USB_INT_EP0 0x00000001 // Endpoint 0 Interrupt + +#define USBDevEndpointConfig USBDevEndpointConfigSet +extern void USBIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void USBIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long USBIntStatus(unsigned long ulBase); +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __USB_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.c new file mode 100644 index 00000000..e9d66c9d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.c @@ -0,0 +1,564 @@ +//***************************************************************************** +// +// watchdog.c - Driver for the Watchdog Timer Module. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup watchdog_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "inc/hw_watchdog.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/watchdog.h" + +//***************************************************************************** +// +//! Determines if the watchdog timer is enabled. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This will check to see if the watchdog timer is enabled. +//! +//! \return Returns \b true if the watchdog timer is enabled, and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +WatchdogRunning(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // See if the watchdog timer module is enabled, and return. + // + return(HWREG(ulBase + WDT_O_CTL) & WDT_CTL_INTEN); +} + +//***************************************************************************** +// +//! Enables the watchdog timer. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This will enable the watchdog timer counter and interrupt. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog timer module. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_INTEN; +} + +//***************************************************************************** +// +//! Enables the watchdog timer reset. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables the capability of the watchdog timer to issue a reset to the +//! processor upon a second timeout condition. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogResetEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog reset. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_RESEN; +} + +//***************************************************************************** +// +//! Disables the watchdog timer reset. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Disables the capability of the watchdog timer to issue a reset to the +//! processor upon a second timeout condition. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogResetDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable the watchdog reset. + // + HWREG(ulBase + WDT_O_CTL) &= ~(WDT_CTL_RESEN); +} + +//***************************************************************************** +// +//! Enables the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Locks out write access to the watchdog timer configuration registers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogLock(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Lock out watchdog register writes. Writing anything to the WDT_O_LOCK + // register causes the lock to go into effect. + // + HWREG(ulBase + WDT_O_LOCK) = WDT_LOCK_LOCKED; +} + +//***************************************************************************** +// +//! Disables the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables write access to the watchdog timer configuration registers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogUnlock(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Unlock watchdog register writes. + // + HWREG(ulBase + WDT_O_LOCK) = WDT_LOCK_UNLOCK; +} + +//***************************************************************************** +// +//! Gets the state of the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Returns the lock state of the watchdog timer registers. +//! +//! \return Returns \b true if the watchdog timer registers are locked, and +//! \b false if they are not locked. +// +//***************************************************************************** +tBoolean +WatchdogLockState(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the lock state. + // + return((HWREG(ulBase + WDT_O_LOCK) == WDT_LOCK_LOCKED) ? true : false); +} + +//***************************************************************************** +// +//! Sets the watchdog timer reload value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param ulLoadVal is the load value for the watchdog timer. +//! +//! This function sets the value to load into the watchdog timer when the count +//! reaches zero for the first time; if the watchdog timer is running when this +//! function is called, then the value will be immediately loaded into the +//! watchdog timer counter. If the \e ulLoadVal parameter is 0, then an +//! interrupt is immediately generated. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock(), WatchdogReloadGet() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogReloadSet(unsigned long ulBase, unsigned long ulLoadVal) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Set the load register. + // + HWREG(ulBase + WDT_O_LOAD) = ulLoadVal; +} + +//***************************************************************************** +// +//! Gets the watchdog timer reload value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function gets the value that is loaded into the watchdog timer when +//! the count reaches zero for the first time. +//! +//! \sa WatchdogReloadSet() +//! +//! \return None. +// +//***************************************************************************** +unsigned long +WatchdogReloadGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the load register. + // + return(HWREG(ulBase + WDT_O_LOAD)); +} + +//***************************************************************************** +// +//! Gets the current watchdog timer value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function reads the current value of the watchdog timer. +//! +//! \return Returns the current value of the watchdog timer. +// +//***************************************************************************** +unsigned long +WatchdogValueGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the current watchdog timer register value. + // + return(HWREG(ulBase + WDT_O_VALUE)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param pfnHandler is a pointer to the function to be called when the +//! watchdog timer interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; the watchdog +//! timer interrupt must be enabled via WatchdogEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source via +//! WatchdogIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Register the interrupt handler. + // + IntRegister(INT_WATCHDOG, pfnHandler); + + // + // Enable the watchdog timer interrupt. + // + IntEnable(INT_WATCHDOG); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function does the actual unregistering of the interrupt handler. This +//! function will clear the handler to be called when a watchdog timer +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable the interrupt. + // + IntDisable(INT_WATCHDOG); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_WATCHDOG); +} + +//***************************************************************************** +// +//! Enables the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables the watchdog timer interrupt. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock(), WatchdogEnable() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog interrupt. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_INTEN; +} + +//***************************************************************************** +// +//! Gets the current watchdog timer interrupt status. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the watchdog timer module. Either +//! the raw interrupt status or the status of interrupt that is allowed to +//! reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, where a 1 indicates that the +//! watchdog interrupt is active, and a 0 indicates that it is not active. +// +//***************************************************************************** +unsigned long +WatchdogIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + WDT_O_MIS)); + } + else + { + return(HWREG(ulBase + WDT_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! The watchdog timer interrupt source is cleared, so that it no longer +//! asserts. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Clear the interrupt source. + // + HWREG(ulBase + WDT_O_ICR) = WDT_INT_TIMEOUT; +} + +//***************************************************************************** +// +//! Enables stalling of the watchdog timer during debug events. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function allows the watchdog timer to stop counting when the processor +//! is stopped by the debugger. By doing so, the watchdog is prevented from +//! expiring (typically almost immediately from a human time perspective) and +//! resetting the system (if reset is enabled). The watchdog will instead +//! expired after the appropriate number of processor cycles have been executed +//! while debugging (or at the appropriate time after the processor has been +//! restarted). +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogStallEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable timer stalling. + // + HWREG(ulBase + WDT_O_TEST) |= WDT_TEST_STALL; +} + +//***************************************************************************** +// +//! Disables stalling of the watchdog timer during debug events. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function disables the debug mode stall of the watchdog timer. By +//! doing so, the watchdog timer continues to count regardless of the processor +//! debug state. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogStallDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable timer stalling. + // + HWREG(ulBase + WDT_O_TEST) &= ~(WDT_TEST_STALL); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.h new file mode 100644 index 00000000..93b38879 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/driverlib/watchdog.h @@ -0,0 +1,71 @@ +//***************************************************************************** +// +// watchdog.h - Prototypes for the Watchdog Timer API +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __WATCHDOG_H__ +#define __WATCHDOG_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean WatchdogRunning(unsigned long ulBase); +extern void WatchdogEnable(unsigned long ulBase); +extern void WatchdogResetEnable(unsigned long ulBase); +extern void WatchdogResetDisable(unsigned long ulBase); +extern void WatchdogLock(unsigned long ulBase); +extern void WatchdogUnlock(unsigned long ulBase); +extern tBoolean WatchdogLockState(unsigned long ulBase); +extern void WatchdogReloadSet(unsigned long ulBase, unsigned long ulLoadVal); +extern unsigned long WatchdogReloadGet(unsigned long ulBase); +extern unsigned long WatchdogValueGet(unsigned long ulBase); +extern void WatchdogIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void WatchdogIntUnregister(unsigned long ulBase); +extern void WatchdogIntEnable(unsigned long ulBase); +extern unsigned long WatchdogIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void WatchdogIntClear(unsigned long ulBase); +extern void WatchdogStallEnable(unsigned long ulBase); +extern void WatchdogStallDisable(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __WATCHDOG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/asmdefs.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/asmdefs.h new file mode 100644 index 00000000..6a134fd1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/asmdefs.h @@ -0,0 +1,212 @@ +//***************************************************************************** +// +// asmdefs.h - Macros to allow assembly code be portable among toolchains. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __ASMDEFS_H__ +#define __ASMDEFS_H__ + +//***************************************************************************** +// +// The defines required for code_red. +// +//***************************************************************************** +#ifdef codered + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // codered + +//***************************************************************************** +// +// The defines required for EW-ARM. +// +//***************************************************************************** +#ifdef ewarm + +// +// Section headers. +// +#define __LIBRARY__ module +#define __TEXT__ rseg CODE:CODE(2) +#define __DATA__ rseg DATA:DATA(2) +#define __BSS__ rseg DATA:DATA(2) +#define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) + +// +// Assembler nmenonics. +// +#define __ALIGN__ alignrom 2 +#define __END__ end +#define __EXPORT__ export +#define __IMPORT__ import +#define __LABEL__ +#define __STR__ dcb +#define __THUMB_LABEL__ thumb +#define __WORD__ dcd +#define __INLINE_DATA__ data + +#endif // ewarm + +//***************************************************************************** +// +// The defines required for GCC. +// +//***************************************************************************** +#if defined(gcc) + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // gcc + +//***************************************************************************** +// +// The defines required for RV-MDK. +// +//***************************************************************************** +#ifdef rvmdk + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + thumb + require8 + preserve8 + +// +// Section headers. +// +#define __LIBRARY__ ; +#define __TEXT__ area ||.text||, code, readonly, align=2 +#define __DATA__ area ||.data||, data, align=2 +#define __BSS__ area ||.bss||, noinit, align=2 +#define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 + +// +// Assembler nmenonics. +// +#define __ALIGN__ align 4 +#define __END__ end +#define __EXPORT__ export +#define __IMPORT__ import +#define __LABEL__ +#define __STR__ dcb +#define __THUMB_LABEL__ +#define __WORD__ dcd +#define __INLINE_DATA__ + +#endif // rvmdk + +//***************************************************************************** +// +// The defines required for Sourcery G++. +// +//***************************************************************************** +#if defined(sourcerygxx) + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // sourcerygxx + +#endif // __ASMDEF_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_adc.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_adc.h new file mode 100644 index 00000000..872ad6f5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_adc.h @@ -0,0 +1,1193 @@ +//***************************************************************************** +// +// hw_adc.h - Macros used when accessing the ADC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_ADC_H__ +#define __HW_ADC_H__ + +//***************************************************************************** +// +// The following are defines for the ADC register offsets. +// +//***************************************************************************** +#define ADC_O_ACTSS 0x00000000 // ADC Active Sample Sequencer +#define ADC_O_RIS 0x00000004 // ADC Raw Interrupt Status +#define ADC_O_IM 0x00000008 // ADC Interrupt Mask +#define ADC_O_ISC 0x0000000C // ADC Interrupt Status and Clear +#define ADC_O_OSTAT 0x00000010 // ADC Overflow Status +#define ADC_O_EMUX 0x00000014 // ADC Event Multiplexer Select +#define ADC_O_USTAT 0x00000018 // ADC Underflow Status +#define ADC_O_SSPRI 0x00000020 // ADC Sample Sequencer Priority +#define ADC_O_SPC 0x00000024 // ADC Sample Phase Control +#define ADC_O_PSSI 0x00000028 // ADC Processor Sample Sequence + // Initiate +#define ADC_O_SAC 0x00000030 // ADC Sample Averaging Control +#define ADC_O_DCISC 0x00000034 // ADC Digital Comparator Interrupt + // Status and Clear +#define ADC_O_CTL 0x00000038 // ADC Control +#define ADC_O_SSMUX0 0x00000040 // ADC Sample Sequence Input + // Multiplexer Select 0 +#define ADC_O_SSCTL0 0x00000044 // ADC Sample Sequence Control 0 +#define ADC_O_SSFIFO0 0x00000048 // ADC Sample Sequence Result FIFO + // 0 +#define ADC_O_SSFSTAT0 0x0000004C // ADC Sample Sequence FIFO 0 + // Status +#define ADC_O_SSOP0 0x00000050 // ADC Sample Sequence 0 Operation +#define ADC_O_SSDC0 0x00000054 // ADC Sample Sequence 0 Digital + // Comparator Select +#define ADC_O_SSMUX1 0x00000060 // ADC Sample Sequence Input + // Multiplexer Select 1 +#define ADC_O_SSCTL1 0x00000064 // ADC Sample Sequence Control 1 +#define ADC_O_SSFIFO1 0x00000068 // ADC Sample Sequence Result FIFO + // 1 +#define ADC_O_SSFSTAT1 0x0000006C // ADC Sample Sequence FIFO 1 + // Status +#define ADC_O_SSOP1 0x00000070 // ADC Sample Sequence 1 Operation +#define ADC_O_SSDC1 0x00000074 // ADC Sample Sequence 1 Digital + // Comparator Select +#define ADC_O_SSMUX2 0x00000080 // ADC Sample Sequence Input + // Multiplexer Select 2 +#define ADC_O_SSCTL2 0x00000084 // ADC Sample Sequence Control 2 +#define ADC_O_SSFIFO2 0x00000088 // ADC Sample Sequence Result FIFO + // 2 +#define ADC_O_SSFSTAT2 0x0000008C // ADC Sample Sequence FIFO 2 + // Status +#define ADC_O_SSOP2 0x00000090 // ADC Sample Sequence 2 Operation +#define ADC_O_SSDC2 0x00000094 // ADC Sample Sequence 2 Digital + // Comparator Select +#define ADC_O_SSMUX3 0x000000A0 // ADC Sample Sequence Input + // Multiplexer Select 3 +#define ADC_O_SSCTL3 0x000000A4 // ADC Sample Sequence Control 3 +#define ADC_O_SSFIFO3 0x000000A8 // ADC Sample Sequence Result FIFO + // 3 +#define ADC_O_SSFSTAT3 0x000000AC // ADC Sample Sequence FIFO 3 + // Status +#define ADC_O_SSOP3 0x000000B0 // ADC Sample Sequence 3 Operation +#define ADC_O_SSDC3 0x000000B4 // ADC Sample Sequence 3 Digital + // Comparator Select +#define ADC_O_TMLB 0x00000100 // ADC Test Mode Loopback +#define ADC_O_DCRIC 0x00000D00 // ADC Digital Comparator Reset + // Initial Conditions +#define ADC_O_DCCTL0 0x00000E00 // ADC Digital Comparator Control 0 +#define ADC_O_DCCTL1 0x00000E04 // ADC Digital Comparator Control 1 +#define ADC_O_DCCTL2 0x00000E08 // ADC Digital Comparator Control 2 +#define ADC_O_DCCTL3 0x00000E0C // ADC Digital Comparator Control 3 +#define ADC_O_DCCTL4 0x00000E10 // ADC Digital Comparator Control 4 +#define ADC_O_DCCTL5 0x00000E14 // ADC Digital Comparator Control 5 +#define ADC_O_DCCTL6 0x00000E18 // ADC Digital Comparator Control 6 +#define ADC_O_DCCTL7 0x00000E1C // ADC Digital Comparator Control 7 +#define ADC_O_DCCMP0 0x00000E40 // ADC Digital Comparator Range 0 +#define ADC_O_DCCMP1 0x00000E44 // ADC Digital Comparator Range 1 +#define ADC_O_DCCMP2 0x00000E48 // ADC Digital Comparator Range 2 +#define ADC_O_DCCMP3 0x00000E4C // ADC Digital Comparator Range 3 +#define ADC_O_DCCMP4 0x00000E50 // ADC Digital Comparator Range 4 +#define ADC_O_DCCMP5 0x00000E54 // ADC Digital Comparator Range 5 +#define ADC_O_DCCMP6 0x00000E58 // ADC Digital Comparator Range 6 +#define ADC_O_DCCMP7 0x00000E5C // ADC Digital Comparator Range 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ACTSS register. +// +//***************************************************************************** +#define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable +#define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable +#define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable +#define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_RIS register. +// +//***************************************************************************** +#define ADC_RIS_INRDC 0x00010000 // Digital Comparator Raw Interrupt + // Status +#define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status +#define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status +#define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status +#define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_IM register. +// +//***************************************************************************** +#define ADC_IM_DCONSS3 0x00080000 // Digital Comparator Interrupt on + // SS3 +#define ADC_IM_DCONSS2 0x00040000 // Digital Comparator Interrupt on + // SS2 +#define ADC_IM_DCONSS1 0x00020000 // Digital Comparator Interrupt on + // SS1 +#define ADC_IM_DCONSS0 0x00010000 // Digital Comparator Interrupt on + // SS0 +#define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask +#define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask +#define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask +#define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ISC register. +// +//***************************************************************************** +#define ADC_ISC_DCINSS3 0x00080000 // Digital Comparator Interrupt + // Status on SS3 +#define ADC_ISC_DCINSS2 0x00040000 // Digital Comparator Interrupt + // Status on SS2 +#define ADC_ISC_DCINSS1 0x00020000 // Digital Comparator Interrupt + // Status on SS1 +#define ADC_ISC_DCINSS0 0x00010000 // Digital Comparator Interrupt + // Status on SS0 +#define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear +#define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear +#define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear +#define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_OSTAT register. +// +//***************************************************************************** +#define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow +#define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow +#define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow +#define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_EMUX register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select +#define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0 +#define ADC_EMUX_EM3_COMP1 0x00002000 // Analog Comparator 1 +#define ADC_EMUX_EM3_COMP2 0x00003000 // Analog Comparator 2 +#define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO PB4) +#define ADC_EMUX_EM3_TIMER 0x00005000 // Timer +#define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0 +#define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1 +#define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2 +#define ADC_EMUX_EM3_PWM3 0x00009000 // PWM3 +#define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample) +#define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select +#define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0 +#define ADC_EMUX_EM2_COMP1 0x00000200 // Analog Comparator 1 +#define ADC_EMUX_EM2_COMP2 0x00000300 // Analog Comparator 2 +#define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO PB4) +#define ADC_EMUX_EM2_TIMER 0x00000500 // Timer +#define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0 +#define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1 +#define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2 +#define ADC_EMUX_EM2_PWM3 0x00000900 // PWM3 +#define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample) +#define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select +#define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0 +#define ADC_EMUX_EM1_COMP1 0x00000020 // Analog Comparator 1 +#define ADC_EMUX_EM1_COMP2 0x00000030 // Analog Comparator 2 +#define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO PB4) +#define ADC_EMUX_EM1_TIMER 0x00000050 // Timer +#define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0 +#define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1 +#define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2 +#define ADC_EMUX_EM1_PWM3 0x00000090 // PWM3 +#define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample) +#define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select +#define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0 +#define ADC_EMUX_EM0_COMP1 0x00000002 // Analog Comparator 1 +#define ADC_EMUX_EM0_COMP2 0x00000003 // Analog Comparator 2 +#define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO PB4) +#define ADC_EMUX_EM0_TIMER 0x00000005 // Timer +#define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0 +#define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1 +#define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2 +#define ADC_EMUX_EM0_PWM3 0x00000009 // PWM3 +#define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample) + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_USTAT register. +// +//***************************************************************************** +#define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow +#define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow +#define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow +#define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSPRI register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority +#define ADC_SSPRI_SS3_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority +#define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority +#define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority +#define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority +#define ADC_SSPRI_SS2_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority +#define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority +#define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority +#define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority +#define ADC_SSPRI_SS1_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority +#define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority +#define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority +#define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority +#define ADC_SSPRI_SS0_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority +#define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority +#define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SPC register. +// +//***************************************************************************** +#define ADC_SPC_PHASE_M 0x0000000F // Phase Difference +#define ADC_SPC_PHASE_0 0x00000000 // ADC sample lags by 0.0 +#define ADC_SPC_PHASE_22_5 0x00000001 // ADC sample lags by 22.5 +#define ADC_SPC_PHASE_45 0x00000002 // ADC sample lags by 45.0 +#define ADC_SPC_PHASE_67_5 0x00000003 // ADC sample lags by 67.5 +#define ADC_SPC_PHASE_90 0x00000004 // ADC sample lags by 90.0 +#define ADC_SPC_PHASE_112_5 0x00000005 // ADC sample lags by 112.5 +#define ADC_SPC_PHASE_135 0x00000006 // ADC sample lags by 135.0 +#define ADC_SPC_PHASE_157_5 0x00000007 // ADC sample lags by 157.5 +#define ADC_SPC_PHASE_180 0x00000008 // ADC sample lags by 180.0 +#define ADC_SPC_PHASE_202_5 0x00000009 // ADC sample lags by 202.5 +#define ADC_SPC_PHASE_225 0x0000000A // ADC sample lags by 225.0 +#define ADC_SPC_PHASE_247_5 0x0000000B // ADC sample lags by 247.5 +#define ADC_SPC_PHASE_270 0x0000000C // ADC sample lags by 270.0 +#define ADC_SPC_PHASE_292_5 0x0000000D // ADC sample lags by 292.5 +#define ADC_SPC_PHASE_315 0x0000000E // ADC sample lags by 315.0 +#define ADC_SPC_PHASE_337_5 0x0000000F // ADC sample lags by 337.5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_PSSI register. +// +//***************************************************************************** +#define ADC_PSSI_GSYNC 0x80000000 // Global Synchronize +#define ADC_PSSI_SYNCWAIT 0x08000000 // Synchronize Wait +#define ADC_PSSI_SS3 0x00000008 // SS3 Initiate +#define ADC_PSSI_SS2 0x00000004 // SS2 Initiate +#define ADC_PSSI_SS1 0x00000002 // SS1 Initiate +#define ADC_PSSI_SS0 0x00000001 // SS0 Initiate + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SAC register. +// +//***************************************************************************** +#define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control +#define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling +#define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling +#define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling +#define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling +#define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling +#define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling +#define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCISC register. +// +//***************************************************************************** +#define ADC_DCISC_DCINT7 0x00000080 // Digital Comparator 7 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT6 0x00000040 // Digital Comparator 6 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT5 0x00000020 // Digital Comparator 5 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT4 0x00000010 // Digital Comparator 4 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT3 0x00000008 // Digital Comparator 3 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT2 0x00000004 // Digital Comparator 2 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT1 0x00000002 // Digital Comparator 1 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT0 0x00000001 // Digital Comparator 0 Interrupt + // Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_CTL register. +// +//***************************************************************************** +#define ADC_CTL_VREF 0x00000001 // Voltage Reference Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX0 register. +// +//***************************************************************************** +#define ADC_SSMUX0_MUX7_M 0xF0000000 // 8th Sample Input Select +#define ADC_SSMUX0_MUX6_M 0x0F000000 // 7th Sample Input Select +#define ADC_SSMUX0_MUX5_M 0x00F00000 // 6th Sample Input Select +#define ADC_SSMUX0_MUX4_M 0x000F0000 // 5th Sample Input Select +#define ADC_SSMUX0_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX0_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX0_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX0_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX0_MUX7_S 28 +#define ADC_SSMUX0_MUX6_S 24 +#define ADC_SSMUX0_MUX5_S 20 +#define ADC_SSMUX0_MUX4_S 16 +#define ADC_SSMUX0_MUX3_S 12 +#define ADC_SSMUX0_MUX2_S 8 +#define ADC_SSMUX0_MUX1_S 4 +#define ADC_SSMUX0_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL0 register. +// +//***************************************************************************** +#define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select +#define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable +#define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence +#define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select +#define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select +#define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable +#define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence +#define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select +#define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select +#define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable +#define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence +#define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select +#define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select +#define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable +#define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence +#define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select +#define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO0 register. +// +//***************************************************************************** +#define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT0 register. +// +//***************************************************************************** +#define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT0_HPTR_S 4 +#define ADC_SSFSTAT0_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP0 register. +// +//***************************************************************************** +#define ADC_SSOP0_S7DCOP 0x10000000 // Sample 7 Digital Comparator + // Operation +#define ADC_SSOP0_S6DCOP 0x01000000 // Sample 6 Digital Comparator + // Operation +#define ADC_SSOP0_S5DCOP 0x00100000 // Sample 5 Digital Comparator + // Operation +#define ADC_SSOP0_S4DCOP 0x00010000 // Sample 4 Digital Comparator + // Operation +#define ADC_SSOP0_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP0_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP0_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP0_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC0 register. +// +//***************************************************************************** +#define ADC_SSDC0_S7DCSEL_M 0xF0000000 // Sample 7 Digital Comparator + // Select +#define ADC_SSDC0_S6DCSEL_M 0x0F000000 // Sample 6 Digital Comparator + // Select +#define ADC_SSDC0_S5DCSEL_M 0x00F00000 // Sample 5 Digital Comparator + // Select +#define ADC_SSDC0_S4DCSEL_M 0x000F0000 // Sample 4 Digital Comparator + // Select +#define ADC_SSDC0_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC0_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC0_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC0_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC0_S6DCSEL_S 24 +#define ADC_SSDC0_S5DCSEL_S 20 +#define ADC_SSDC0_S4DCSEL_S 16 +#define ADC_SSDC0_S3DCSEL_S 12 +#define ADC_SSDC0_S2DCSEL_S 8 +#define ADC_SSDC0_S1DCSEL_S 4 +#define ADC_SSDC0_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX1 register. +// +//***************************************************************************** +#define ADC_SSMUX1_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX1_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX1_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX1_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX1_MUX3_S 12 +#define ADC_SSMUX1_MUX2_S 8 +#define ADC_SSMUX1_MUX1_S 4 +#define ADC_SSMUX1_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL1 register. +// +//***************************************************************************** +#define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO1 register. +// +//***************************************************************************** +#define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT1 register. +// +//***************************************************************************** +#define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT1_HPTR_S 4 +#define ADC_SSFSTAT1_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP1 register. +// +//***************************************************************************** +#define ADC_SSOP1_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP1_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP1_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP1_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC1 register. +// +//***************************************************************************** +#define ADC_SSDC1_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC1_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC1_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC1_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC1_S2DCSEL_S 8 +#define ADC_SSDC1_S1DCSEL_S 4 +#define ADC_SSDC1_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX2 register. +// +//***************************************************************************** +#define ADC_SSMUX2_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX2_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX2_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX2_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX2_MUX3_S 12 +#define ADC_SSMUX2_MUX2_S 8 +#define ADC_SSMUX2_MUX1_S 4 +#define ADC_SSMUX2_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL2 register. +// +//***************************************************************************** +#define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO2 register. +// +//***************************************************************************** +#define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT2 register. +// +//***************************************************************************** +#define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT2_HPTR_S 4 +#define ADC_SSFSTAT2_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP2 register. +// +//***************************************************************************** +#define ADC_SSOP2_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP2_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP2_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP2_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC2 register. +// +//***************************************************************************** +#define ADC_SSDC2_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC2_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC2_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC2_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC2_S2DCSEL_S 8 +#define ADC_SSDC2_S1DCSEL_S 4 +#define ADC_SSDC2_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX3 register. +// +//***************************************************************************** +#define ADC_SSMUX3_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX3_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL3 register. +// +//***************************************************************************** +#define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO3 register. +// +//***************************************************************************** +#define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT3 register. +// +//***************************************************************************** +#define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT3_HPTR_S 4 +#define ADC_SSFSTAT3_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP3 register. +// +//***************************************************************************** +#define ADC_SSOP3_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC3 register. +// +//***************************************************************************** +#define ADC_SSDC3_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_TMLB register. +// +//***************************************************************************** +#define ADC_TMLB_LB 0x00000001 // Loopback Mode Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCRIC register. +// +//***************************************************************************** +#define ADC_DCRIC_DCTRIG7 0x00800000 // Digital Comparator Trigger 7 +#define ADC_DCRIC_DCTRIG6 0x00400000 // Digital Comparator Trigger 6 +#define ADC_DCRIC_DCTRIG5 0x00200000 // Digital Comparator Trigger 5 +#define ADC_DCRIC_DCTRIG4 0x00100000 // Digital Comparator Trigger 4 +#define ADC_DCRIC_DCTRIG3 0x00080000 // Digital Comparator Trigger 3 +#define ADC_DCRIC_DCTRIG2 0x00040000 // Digital Comparator Trigger 2 +#define ADC_DCRIC_DCTRIG1 0x00020000 // Digital Comparator Trigger 1 +#define ADC_DCRIC_DCTRIG0 0x00010000 // Digital Comparator Trigger 0 +#define ADC_DCRIC_DCINT7 0x00000080 // Digital Comparator Interrupt 7 +#define ADC_DCRIC_DCINT6 0x00000040 // Digital Comparator Interrupt 6 +#define ADC_DCRIC_DCINT5 0x00000020 // Digital Comparator Interrupt 5 +#define ADC_DCRIC_DCINT4 0x00000010 // Digital Comparator Interrupt 4 +#define ADC_DCRIC_DCINT3 0x00000008 // Digital Comparator Interrupt 3 +#define ADC_DCRIC_DCINT2 0x00000004 // Digital Comparator Interrupt 2 +#define ADC_DCRIC_DCINT1 0x00000002 // Digital Comparator Interrupt 1 +#define ADC_DCRIC_DCINT0 0x00000001 // Digital Comparator Interrupt 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL0 register. +// +//***************************************************************************** +#define ADC_DCCTL0_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL0_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL0_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL0_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL0_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL0_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL0_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL0_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL0_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL0_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL0_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL0_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL0_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL0_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL0_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL0_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL0_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL0_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL0_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL0_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL1 register. +// +//***************************************************************************** +#define ADC_DCCTL1_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL1_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL1_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL1_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL1_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL1_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL1_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL1_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL1_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL1_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL1_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL1_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL1_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL1_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL1_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL1_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL1_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL1_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL1_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL1_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL2 register. +// +//***************************************************************************** +#define ADC_DCCTL2_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL2_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL2_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL2_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL2_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL2_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL2_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL2_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL2_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL2_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL2_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL2_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL2_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL2_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL2_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL2_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL2_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL2_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL2_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL2_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL3 register. +// +//***************************************************************************** +#define ADC_DCCTL3_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL3_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL3_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL3_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL3_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL3_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL3_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL3_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL3_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL3_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL3_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL3_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL3_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL3_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL3_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL3_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL3_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL3_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL3_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL3_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL4 register. +// +//***************************************************************************** +#define ADC_DCCTL4_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL4_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL4_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL4_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL4_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL4_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL4_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL4_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL4_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL4_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL4_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL4_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL4_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL4_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL4_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL4_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL4_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL4_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL4_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL4_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL5 register. +// +//***************************************************************************** +#define ADC_DCCTL5_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL5_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL5_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL5_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL5_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL5_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL5_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL5_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL5_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL5_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL5_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL5_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL5_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL5_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL5_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL5_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL5_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL5_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL5_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL5_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL6 register. +// +//***************************************************************************** +#define ADC_DCCTL6_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL6_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL6_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL6_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL6_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL6_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL6_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL6_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL6_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL6_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL6_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL6_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL6_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL6_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL6_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL6_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL6_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL6_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL6_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL6_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL7 register. +// +//***************************************************************************** +#define ADC_DCCTL7_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL7_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL7_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL7_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL7_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL7_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL7_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL7_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL7_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL7_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL7_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL7_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL7_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL7_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL7_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL7_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL7_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL7_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL7_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL7_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP0 register. +// +//***************************************************************************** +#define ADC_DCCMP0_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP0_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP0_COMP1_S 16 +#define ADC_DCCMP0_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP1 register. +// +//***************************************************************************** +#define ADC_DCCMP1_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP1_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP1_COMP1_S 16 +#define ADC_DCCMP1_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP2 register. +// +//***************************************************************************** +#define ADC_DCCMP2_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP2_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP2_COMP1_S 16 +#define ADC_DCCMP2_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP3 register. +// +//***************************************************************************** +#define ADC_DCCMP3_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP3_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP3_COMP1_S 16 +#define ADC_DCCMP3_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP4 register. +// +//***************************************************************************** +#define ADC_DCCMP4_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP4_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP4_COMP1_S 16 +#define ADC_DCCMP4_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP5 register. +// +//***************************************************************************** +#define ADC_DCCMP5_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP5_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP5_COMP1_S 16 +#define ADC_DCCMP5_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP6 register. +// +//***************************************************************************** +#define ADC_DCCMP6_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP6_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP6_COMP1_S 16 +#define ADC_DCCMP6_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP7 register. +// +//***************************************************************************** +#define ADC_DCCMP7_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP7_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP7_COMP1_S 16 +#define ADC_DCCMP7_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the the interpretation of the data in the +// SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift +#define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_O_EMUX +// register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_MASK 0x0000F000 // Event mux 3 mask +#define ADC_EMUX_EM2_MASK 0x00000F00 // Event mux 2 mask +#define ADC_EMUX_EM1_MASK 0x000000F0 // Event mux 1 mask +#define ADC_EMUX_EM0_MASK 0x0000000F // Event mux 0 mask +#define ADC_EMUX_EM3_SHIFT 12 // The shift for the fourth event +#define ADC_EMUX_EM2_SHIFT 8 // The shift for the third event +#define ADC_EMUX_EM1_SHIFT 4 // The shift for the second event +#define ADC_EMUX_EM0_SHIFT 0 // The shift for the first event + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_O_SSPRI +// register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_MASK 0x00003000 // Sequencer 3 priority mask +#define ADC_SSPRI_SS2_MASK 0x00000300 // Sequencer 2 priority mask +#define ADC_SSPRI_SS1_MASK 0x00000030 // Sequencer 1 priority mask +#define ADC_SSPRI_SS0_MASK 0x00000003 // Sequencer 0 priority mask + +//***************************************************************************** +// +// The following are deprecated defines for the ADC sequence register offsets.. +// +//***************************************************************************** +#define ADC_O_SEQ 0x00000040 // Offset to the first sequence +#define ADC_O_SEQ_STEP 0x00000020 // Increment to the next sequence +#define ADC_O_X_SSFSTAT 0x0000000C // FIFO status register +#define ADC_O_X_SSFIFO 0x00000008 // Result FIFO register +#define ADC_O_X_SSCTL 0x00000004 // Sample sequence control register +#define ADC_O_X_SSMUX 0x00000000 // Multiplexer select register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSMUX0, +// ADC_SSMUX1, ADC_SSMUX2, and ADC_SSMUX3 registers. Not all fields are present +// in all registers.. +// +//***************************************************************************** +#define ADC_SSMUX_MUX7_MASK 0x70000000 // 8th mux select mask +#define ADC_SSMUX_MUX6_MASK 0x07000000 // 7th mux select mask +#define ADC_SSMUX_MUX5_MASK 0x00700000 // 6th mux select mask +#define ADC_SSMUX_MUX4_MASK 0x00070000 // 5th mux select mask +#define ADC_SSMUX_MUX3_MASK 0x00007000 // 4th mux select mask +#define ADC_SSMUX_MUX2_MASK 0x00000700 // 3rd mux select mask +#define ADC_SSMUX_MUX1_MASK 0x00000070 // 2nd mux select mask +#define ADC_SSMUX_MUX0_MASK 0x00000007 // 1st mux select mask +#define ADC_SSMUX_MUX7_SHIFT 28 +#define ADC_SSMUX_MUX6_SHIFT 24 +#define ADC_SSMUX_MUX5_SHIFT 20 +#define ADC_SSMUX_MUX4_SHIFT 16 +#define ADC_SSMUX_MUX3_SHIFT 12 +#define ADC_SSMUX_MUX2_SHIFT 8 +#define ADC_SSMUX_MUX1_SHIFT 4 +#define ADC_SSMUX_MUX0_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSCTL0, +// ADC_SSCTL1, ADC_SSCTL2, and ADC_SSCTL3 registers. Not all fields are present +// in all registers. +// +//***************************************************************************** +#define ADC_SSCTL_TS7 0x80000000 // 8th temperature sensor select +#define ADC_SSCTL_IE7 0x40000000 // 8th interrupt enable +#define ADC_SSCTL_END7 0x20000000 // 8th sequence end select +#define ADC_SSCTL_D7 0x10000000 // 8th differential select +#define ADC_SSCTL_TS6 0x08000000 // 7th temperature sensor select +#define ADC_SSCTL_IE6 0x04000000 // 7th interrupt enable +#define ADC_SSCTL_END6 0x02000000 // 7th sequence end select +#define ADC_SSCTL_D6 0x01000000 // 7th differential select +#define ADC_SSCTL_TS5 0x00800000 // 6th temperature sensor select +#define ADC_SSCTL_IE5 0x00400000 // 6th interrupt enable +#define ADC_SSCTL_END5 0x00200000 // 6th sequence end select +#define ADC_SSCTL_D5 0x00100000 // 6th differential select +#define ADC_SSCTL_TS4 0x00080000 // 5th temperature sensor select +#define ADC_SSCTL_IE4 0x00040000 // 5th interrupt enable +#define ADC_SSCTL_END4 0x00020000 // 5th sequence end select +#define ADC_SSCTL_D4 0x00010000 // 5th differential select +#define ADC_SSCTL_TS3 0x00008000 // 4th temperature sensor select +#define ADC_SSCTL_IE3 0x00004000 // 4th interrupt enable +#define ADC_SSCTL_END3 0x00002000 // 4th sequence end select +#define ADC_SSCTL_D3 0x00001000 // 4th differential select +#define ADC_SSCTL_TS2 0x00000800 // 3rd temperature sensor select +#define ADC_SSCTL_IE2 0x00000400 // 3rd interrupt enable +#define ADC_SSCTL_END2 0x00000200 // 3rd sequence end select +#define ADC_SSCTL_D2 0x00000100 // 3rd differential select +#define ADC_SSCTL_TS1 0x00000080 // 2nd temperature sensor select +#define ADC_SSCTL_IE1 0x00000040 // 2nd interrupt enable +#define ADC_SSCTL_END1 0x00000020 // 2nd sequence end select +#define ADC_SSCTL_D1 0x00000010 // 2nd differential select +#define ADC_SSCTL_TS0 0x00000008 // 1st temperature sensor select +#define ADC_SSCTL_IE0 0x00000004 // 1st interrupt enable +#define ADC_SSCTL_END0 0x00000002 // 1st sequence end select +#define ADC_SSCTL_D0 0x00000001 // 1st differential select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSFIFO0, +// ADC_SSFIFO1, ADC_SSFIFO2, and ADC_SSFIFO3 registers. +// +//***************************************************************************** +#define ADC_SSFIFO_DATA_MASK 0x000003FF // Sample data +#define ADC_SSFIFO_DATA_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSFSTAT0, +// ADC_SSFSTAT1, ADC_SSFSTAT2, and ADC_SSFSTAT3 registers. +// +//***************************************************************************** +#define ADC_SSFSTAT_FULL 0x00001000 // FIFO is full +#define ADC_SSFSTAT_EMPTY 0x00000100 // FIFO is empty +#define ADC_SSFSTAT_HPTR 0x000000F0 // FIFO head pointer +#define ADC_SSFSTAT_TPTR 0x0000000F // FIFO tail pointer + +//***************************************************************************** +// +// The following are deprecated defines for the the interpretation of the data +// in the SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_TMLB_CNT_S 6 // Sample counter shift +#define ADC_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the loopback ADC +// data. +// +//***************************************************************************** +#define ADC_LB_CNT_MASK 0x000003C0 // Sample counter mask +#define ADC_LB_CONT 0x00000020 // Continuation sample +#define ADC_LB_DIFF 0x00000010 // Differential sample +#define ADC_LB_TS 0x00000008 // Temperature sensor sample +#define ADC_LB_MUX_MASK 0x00000007 // Input channel number mask +#define ADC_LB_CNT_SHIFT 6 // Sample counter shift +#define ADC_LB_MUX_SHIFT 0 // Input channel number shift + +#endif + +#endif // __HW_ADC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_can.h new file mode 100644 index 00000000..f8ee925c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_can.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_can.h - Defines and macros used when accessing the CAN controllers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_CAN_H__ +#define __HW_CAN_H__ + +//***************************************************************************** +// +// The following are defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_CTL 0x00000000 // CAN Control +#define CAN_O_STS 0x00000004 // CAN Status +#define CAN_O_ERR 0x00000008 // CAN Error Counter +#define CAN_O_BIT 0x0000000C // CAN Bit Timing +#define CAN_O_INT 0x00000010 // CAN Interrupt +#define CAN_O_TST 0x00000014 // CAN Test +#define CAN_O_BRPE 0x00000018 // CAN Baud Rate Prescaler + // Extension +#define CAN_O_IF1CRQ 0x00000020 // CAN IF1 Command Request +#define CAN_O_IF1CMSK 0x00000024 // CAN IF1 Command Mask +#define CAN_O_IF1MSK1 0x00000028 // CAN IF1 Mask 1 +#define CAN_O_IF1MSK2 0x0000002C // CAN IF1 Mask 2 +#define CAN_O_IF1ARB1 0x00000030 // CAN IF1 Arbitration 1 +#define CAN_O_IF1ARB2 0x00000034 // CAN IF1 Arbitration 2 +#define CAN_O_IF1MCTL 0x00000038 // CAN IF1 Message Control +#define CAN_O_IF1DA1 0x0000003C // CAN IF1 Data A1 +#define CAN_O_IF1DA2 0x00000040 // CAN IF1 Data A2 +#define CAN_O_IF1DB1 0x00000044 // CAN IF1 Data B1 +#define CAN_O_IF1DB2 0x00000048 // CAN IF1 Data B2 +#define CAN_O_IF2CRQ 0x00000080 // CAN IF2 Command Request +#define CAN_O_IF2CMSK 0x00000084 // CAN IF2 Command Mask +#define CAN_O_IF2MSK1 0x00000088 // CAN IF2 Mask 1 +#define CAN_O_IF2MSK2 0x0000008C // CAN IF2 Mask 2 +#define CAN_O_IF2ARB1 0x00000090 // CAN IF2 Arbitration 1 +#define CAN_O_IF2ARB2 0x00000094 // CAN IF2 Arbitration 2 +#define CAN_O_IF2MCTL 0x00000098 // CAN IF2 Message Control +#define CAN_O_IF2DA1 0x0000009C // CAN IF2 Data A1 +#define CAN_O_IF2DA2 0x000000A0 // CAN IF2 Data A2 +#define CAN_O_IF2DB1 0x000000A4 // CAN IF2 Data B1 +#define CAN_O_IF2DB2 0x000000A8 // CAN IF2 Data B2 +#define CAN_O_TXRQ1 0x00000100 // CAN Transmission Request 1 +#define CAN_O_TXRQ2 0x00000104 // CAN Transmission Request 2 +#define CAN_O_NWDA1 0x00000120 // CAN New Data 1 +#define CAN_O_NWDA2 0x00000124 // CAN New Data 2 +#define CAN_O_MSG1INT 0x00000140 // CAN Message 1 Interrupt Pending +#define CAN_O_MSG2INT 0x00000144 // CAN Message 2 Interrupt Pending +#define CAN_O_MSG1VAL 0x00000160 // CAN Message 1 Valid +#define CAN_O_MSG2VAL 0x00000164 // CAN Message 2 Valid + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_CTL register. +// +//***************************************************************************** +#define CAN_CTL_TEST 0x00000080 // Test Mode Enable +#define CAN_CTL_CCE 0x00000040 // Configuration Change Enable +#define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission +#define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable +#define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable +#define CAN_CTL_IE 0x00000002 // CAN Interrupt Enable +#define CAN_CTL_INIT 0x00000001 // Initialization + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_STS register. +// +//***************************************************************************** +#define CAN_STS_BOFF 0x00000080 // Bus-Off Status +#define CAN_STS_EWARN 0x00000040 // Warning Status +#define CAN_STS_EPASS 0x00000020 // Error Passive +#define CAN_STS_RXOK 0x00000010 // Received a Message Successfully +#define CAN_STS_TXOK 0x00000008 // Transmitted a Message + // Successfully +#define CAN_STS_LEC_M 0x00000007 // Last Error Code +#define CAN_STS_LEC_NONE 0x00000000 // No Error +#define CAN_STS_LEC_STUFF 0x00000001 // Stuff Error +#define CAN_STS_LEC_FORM 0x00000002 // Format Error +#define CAN_STS_LEC_ACK 0x00000003 // ACK Error +#define CAN_STS_LEC_BIT1 0x00000004 // Bit 1 Error +#define CAN_STS_LEC_BIT0 0x00000005 // Bit 0 Error +#define CAN_STS_LEC_CRC 0x00000006 // CRC Error +#define CAN_STS_LEC_NOEVENT 0x00000007 // No Event + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_ERR register. +// +//***************************************************************************** +#define CAN_ERR_RP 0x00008000 // Received Error Passive +#define CAN_ERR_REC_M 0x00007F00 // Receive Error Counter +#define CAN_ERR_TEC_M 0x000000FF // Transmit Error Counter +#define CAN_ERR_REC_S 8 +#define CAN_ERR_TEC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BIT register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2_M 0x00007000 // Time Segment after Sample Point +#define CAN_BIT_TSEG1_M 0x00000F00 // Time Segment Before Sample Point +#define CAN_BIT_SJW_M 0x000000C0 // (Re)Synchronization Jump Width +#define CAN_BIT_BRP_M 0x0000003F // Baud Rate Prescaler +#define CAN_BIT_TSEG2_S 12 +#define CAN_BIT_TSEG1_S 8 +#define CAN_BIT_SJW_S 6 +#define CAN_BIT_BRP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_INT register. +// +//***************************************************************************** +#define CAN_INT_INTID_M 0x0000FFFF // Interrupt Identifier +#define CAN_INT_INTID_NONE 0x00000000 // No interrupt pending +#define CAN_INT_INTID_STATUS 0x00008000 // Status Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TST register. +// +//***************************************************************************** +#define CAN_TST_RX 0x00000080 // Receive Observation +#define CAN_TST_TX_M 0x00000060 // Transmit Control +#define CAN_TST_TX_CANCTL 0x00000000 // CAN Module Control +#define CAN_TST_TX_SAMPLE 0x00000020 // Sample Point +#define CAN_TST_TX_DOMINANT 0x00000040 // Driven Low +#define CAN_TST_TX_RECESSIVE 0x00000060 // Driven High +#define CAN_TST_LBACK 0x00000010 // Loopback Mode +#define CAN_TST_SILENT 0x00000008 // Silent Mode +#define CAN_TST_BASIC 0x00000004 // Basic Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BRPE register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE_M 0x0000000F // Baud Rate Prescaler Extension +#define CAN_BRPE_BRPE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CRQ register. +// +//***************************************************************************** +#define CAN_IF1CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF1CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF1CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF1CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CMSK register. +// +//***************************************************************************** +#define CAN_IF1CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF1CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF1CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF1CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF1CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF1CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF1CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF1CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF1CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK1 register. +// +//***************************************************************************** +#define CAN_IF1MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF1MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK2 register. +// +//***************************************************************************** +#define CAN_IF1MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF1MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF1MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF1MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB1 register. +// +//***************************************************************************** +#define CAN_IF1ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF1ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB2 register. +// +//***************************************************************************** +#define CAN_IF1ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF1ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF1ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF1ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF1ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MCTL register. +// +//***************************************************************************** +#define CAN_IF1MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF1MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF1MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF1MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF1MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF1MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF1MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF1MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF1MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF1MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF1MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA1 register. +// +//***************************************************************************** +#define CAN_IF1DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA2 register. +// +//***************************************************************************** +#define CAN_IF1DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB1 register. +// +//***************************************************************************** +#define CAN_IF1DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB2 register. +// +//***************************************************************************** +#define CAN_IF1DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CRQ register. +// +//***************************************************************************** +#define CAN_IF2CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF2CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF2CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF2CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CMSK register. +// +//***************************************************************************** +#define CAN_IF2CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF2CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF2CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF2CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF2CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF2CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF2CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF2CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF2CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK1 register. +// +//***************************************************************************** +#define CAN_IF2MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF2MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK2 register. +// +//***************************************************************************** +#define CAN_IF2MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF2MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF2MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF2MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB1 register. +// +//***************************************************************************** +#define CAN_IF2ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF2ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB2 register. +// +//***************************************************************************** +#define CAN_IF2ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF2ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF2ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF2ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF2ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MCTL register. +// +//***************************************************************************** +#define CAN_IF2MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF2MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF2MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF2MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF2MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF2MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF2MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF2MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF2MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF2MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF2MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA1 register. +// +//***************************************************************************** +#define CAN_IF2DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA2 register. +// +//***************************************************************************** +#define CAN_IF2DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB1 register. +// +//***************************************************************************** +#define CAN_IF2DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB2 register. +// +//***************************************************************************** +#define CAN_IF2DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ1 register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ1_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ2 register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ2_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA1 register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA1_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA2 register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA2_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1INT register. +// +//***************************************************************************** +#define CAN_MSG1INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG1INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2INT register. +// +//***************************************************************************** +#define CAN_MSG2INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG2INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1VAL register. +// +//***************************************************************************** +#define CAN_MSG1VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG1VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2VAL register. +// +//***************************************************************************** +#define CAN_MSG2VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG2VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_MSGINT1 0x00000140 // Intr. Pending in Msg Obj 1 reg +#define CAN_O_MSGINT2 0x00000144 // Intr. Pending in Msg Obj 2 reg +#define CAN_O_MSGVAL1 0x00000160 // Message Valid in Msg Obj 1 reg +#define CAN_O_MSGVAL2 0x00000164 // Message Valid in Msg Obj 2 reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_STS +// register. +// +//***************************************************************************** +#define CAN_STS_LEC_MSK 0x00000007 // Last Error Code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_ERR +// register. +// +//***************************************************************************** +#define CAN_ERR_REC_MASK 0x00007F00 // Receive error counter status +#define CAN_ERR_TEC_MASK 0x000000FF // Transmit error counter status +#define CAN_ERR_REC_SHIFT 8 // Receive error counter bit pos +#define CAN_ERR_TEC_SHIFT 0 // Transmit error counter bit pos + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BIT +// register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2 0x00007000 // Time segment after sample point +#define CAN_BIT_TSEG1 0x00000F00 // Time segment before sample point +#define CAN_BIT_SJW 0x000000C0 // (Re)Synchronization jump width +#define CAN_BIT_BRP 0x0000003F // Baud rate prescaler + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_INT +// register. +// +//***************************************************************************** +#define CAN_INT_INTID_MSK 0x0000FFFF // Interrupt Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TST +// register. +// +//***************************************************************************** +#define CAN_TST_TX_MSK 0x00000060 // Overide control of CAN_TX pin + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BRPE +// register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE 0x0000000F // Baud rate prescaler extension + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ1 +// register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ2 +// register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA1 +// register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA2 +// register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT1 +// register. +// +//***************************************************************************** +#define CAN_MSGINT1_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT2 +// register. +// +//***************************************************************************** +#define CAN_MSGINT2_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL1 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL1_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL2 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL2_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the can +// registers. +// +//***************************************************************************** +#define CAN_RV_IF1MSK2 0x0000FFFF +#define CAN_RV_IF1MSK1 0x0000FFFF +#define CAN_RV_IF2MSK1 0x0000FFFF +#define CAN_RV_IF2MSK2 0x0000FFFF +#define CAN_RV_BIT 0x00002301 +#define CAN_RV_CTL 0x00000001 +#define CAN_RV_IF1CRQ 0x00000001 +#define CAN_RV_IF2CRQ 0x00000001 +#define CAN_RV_TXRQ2 0x00000000 +#define CAN_RV_IF2DB1 0x00000000 +#define CAN_RV_INT 0x00000000 +#define CAN_RV_IF1DB2 0x00000000 +#define CAN_RV_BRPE 0x00000000 +#define CAN_RV_IF2DA2 0x00000000 +#define CAN_RV_MSGVAL2 0x00000000 +#define CAN_RV_TXRQ1 0x00000000 +#define CAN_RV_IF1MCTL 0x00000000 +#define CAN_RV_IF1DB1 0x00000000 +#define CAN_RV_STS 0x00000000 +#define CAN_RV_MSGINT1 0x00000000 +#define CAN_RV_IF1DA2 0x00000000 +#define CAN_RV_TST 0x00000000 +#define CAN_RV_IF1ARB1 0x00000000 +#define CAN_RV_IF1ARB2 0x00000000 +#define CAN_RV_NWDA2 0x00000000 +#define CAN_RV_IF2CMSK 0x00000000 +#define CAN_RV_NWDA1 0x00000000 +#define CAN_RV_IF1DA1 0x00000000 +#define CAN_RV_IF2DA1 0x00000000 +#define CAN_RV_IF2MCTL 0x00000000 +#define CAN_RV_MSGVAL1 0x00000000 +#define CAN_RV_IF1CMSK 0x00000000 +#define CAN_RV_ERR 0x00000000 +#define CAN_RV_IF2ARB2 0x00000000 +#define CAN_RV_MSGINT2 0x00000000 +#define CAN_RV_IF2ARB1 0x00000000 +#define CAN_RV_IF2DB2 0x00000000 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CRQ +// and CAN_IF1CRQ registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCRQ_BUSY 0x00008000 // Busy flag status +#define CAN_IFCRQ_MNUM_MSK 0x0000003F // Message Number + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CMSK +// and CAN_IF2CMSK registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCMSK_WRNRD 0x00000080 // Write, not Read +#define CAN_IFCMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IFCMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IFCMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IFCMSK_CLRINTPND 0x00000008 // Clear interrupt pending Bit +#define CAN_IFCMSK_TXRQST 0x00000004 // Access Tx request bit (WRNRD=1) +#define CAN_IFCMSK_NEWDAT 0x00000004 // Access New Data bit (WRNRD=0) +#define CAN_IFCMSK_DATAA 0x00000002 // DataA access - bytes 0 to 3 +#define CAN_IFCMSK_DATAB 0x00000001 // DataB access - bytes 4 to 7 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK1 +// and CAN_IF2MSK1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK1_MSK 0x0000FFFF // Identifier Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK2 +// and CAN_IF2MSK2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK2_MXTD 0x00008000 // Mask extended identifier +#define CAN_IFMSK2_MDIR 0x00004000 // Mask message direction +#define CAN_IFMSK2_MSK 0x00001FFF // Mask identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB1 +// and CAN_IF2ARB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB1_ID 0x0000FFFF // Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB2 +// and CAN_IF2ARB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB2_MSGVAL 0x00008000 // Message valid +#define CAN_IFARB2_XTD 0x00004000 // Extended identifier +#define CAN_IFARB2_DIR 0x00002000 // Message direction +#define CAN_IFARB2_ID 0x00001FFF // Message identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MCTL +// and CAN_IF2MCTL registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMCTL_NEWDAT 0x00008000 // New Data +#define CAN_IFMCTL_MSGLST 0x00004000 // Message lost +#define CAN_IFMCTL_INTPND 0x00002000 // Interrupt pending +#define CAN_IFMCTL_UMASK 0x00001000 // Use acceptance mask +#define CAN_IFMCTL_TXIE 0x00000800 // Transmit interrupt enable +#define CAN_IFMCTL_RXIE 0x00000400 // Receive interrupt enable +#define CAN_IFMCTL_RMTEN 0x00000200 // Remote enable +#define CAN_IFMCTL_TXRQST 0x00000100 // Transmit request +#define CAN_IFMCTL_EOB 0x00000080 // End of buffer +#define CAN_IFMCTL_DLC 0x0000000F // Data length code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA1 +// and CAN_IF2DA1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA1_DATA 0x0000FFFF // Data - bytes 1 and 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA2 +// and CAN_IF2DA2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA2_DATA 0x0000FFFF // Data - bytes 3 and 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB1 +// and CAN_IF2DB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB1_DATA 0x0000FFFF // Data - bytes 5 and 4 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB2 +// and CAN_IF2DB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB2_DATA 0x0000FFFF // Data - bytes 7 and 6 + +#endif + +#endif // __HW_CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_comp.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_comp.h new file mode 100644 index 00000000..4b58bbf5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_comp.h @@ -0,0 +1,277 @@ +//***************************************************************************** +// +// hw_comp.h - Macros used when accessing the comparator hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_COMP_H__ +#define __HW_COMP_H__ + +//***************************************************************************** +// +// The following are defines for the Comparator register offsets. +// +//***************************************************************************** +#define COMP_O_ACMIS 0x00000000 // Analog Comparator Masked + // Interrupt Status +#define COMP_O_ACRIS 0x00000004 // Analog Comparator Raw Interrupt + // Status +#define COMP_O_ACINTEN 0x00000008 // Analog Comparator Interrupt + // Enable +#define COMP_O_ACREFCTL 0x00000010 // Analog Comparator Reference + // Voltage Control +#define COMP_O_ACSTAT0 0x00000020 // Analog Comparator Status 0 +#define COMP_O_ACCTL0 0x00000024 // Analog Comparator Control 0 +#define COMP_O_ACSTAT1 0x00000040 // Analog Comparator Status 1 +#define COMP_O_ACCTL1 0x00000044 // Analog Comparator Control 1 +#define COMP_O_ACSTAT2 0x00000060 // Analog Comparator Status 2 +#define COMP_O_ACCTL2 0x00000064 // Analog Comparator Control 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACMIS register. +// +//***************************************************************************** +#define COMP_ACMIS_IN2 0x00000004 // Comparator 2 Masked Interrupt + // Status +#define COMP_ACMIS_IN1 0x00000002 // Comparator 1 Masked Interrupt + // Status +#define COMP_ACMIS_IN0 0x00000001 // Comparator 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACRIS register. +// +//***************************************************************************** +#define COMP_ACRIS_IN2 0x00000004 // Comparator 2 Interrupt Status +#define COMP_ACRIS_IN1 0x00000002 // Comparator 1 Interrupt Status +#define COMP_ACRIS_IN0 0x00000001 // Comparator 0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACINTEN register. +// +//***************************************************************************** +#define COMP_ACINTEN_IN2 0x00000004 // Comparator 2 Interrupt Enable +#define COMP_ACINTEN_IN1 0x00000002 // Comparator 1 Interrupt Enable +#define COMP_ACINTEN_IN0 0x00000001 // Comparator 0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACREFCTL +// register. +// +//***************************************************************************** +#define COMP_ACREFCTL_EN 0x00000200 // Resistor Ladder Enable +#define COMP_ACREFCTL_RNG 0x00000100 // Resistor Ladder Range +#define COMP_ACREFCTL_VREF_M 0x0000000F // Resistor Ladder Voltage Ref +#define COMP_ACREFCTL_VREF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT0 register. +// +//***************************************************************************** +#define COMP_ACSTAT0_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL0 register. +// +//***************************************************************************** +#define COMP_ACCTL0_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL0_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL0_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL0_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL0_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL0_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL0_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL0_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL0_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL0_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL0_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL0_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL0_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL0_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL0_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL0_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL0_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL0_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT1 register. +// +//***************************************************************************** +#define COMP_ACSTAT1_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL1 register. +// +//***************************************************************************** +#define COMP_ACCTL1_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL1_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL1_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL1_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL1_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL1_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL1_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL1_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL1_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL1_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL1_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL1_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL1_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL1_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL1_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL1_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL1_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL1_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT2 register. +// +//***************************************************************************** +#define COMP_ACSTAT2_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL2 register. +// +//***************************************************************************** +#define COMP_ACCTL2_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL2_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL2_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL2_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL2_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL2_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL2_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL2_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL2_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL2_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL2_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL2_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL2_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL2_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL2_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL2_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL2_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL2_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Comparator register offsets. +// +//***************************************************************************** +#define COMP_O_MIS 0x00000000 // Interrupt status register +#define COMP_O_RIS 0x00000004 // Raw interrupt status register +#define COMP_O_INTEN 0x00000008 // Interrupt enable register +#define COMP_O_REFCTL 0x00000010 // Reference voltage control reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_O_REFCTL +// register. +// +//***************************************************************************** +#define COMP_REFCTL_EN 0x00000200 // Reference voltage enable +#define COMP_REFCTL_RNG 0x00000100 // Reference voltage range +#define COMP_REFCTL_VREF_MASK 0x0000000F // Reference voltage select mask +#define COMP_REFCTL_VREF_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_MIS, +// COMP_RIS, and COMP_INTEN registers. +// +//***************************************************************************** +#define COMP_INT_2 0x00000004 // Comp2 interrupt +#define COMP_INT_1 0x00000002 // Comp1 interrupt +#define COMP_INT_0 0x00000001 // Comp0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_ACSTAT0, +// COMP_ACSTAT1, and COMP_ACSTAT2 registers. +// +//***************************************************************************** +#define COMP_ACSTAT_OVAL 0x00000002 // Comparator output value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_ACCTL0, +// COMP_ACCTL1, and COMP_ACCTL2 registers. +// +//***************************************************************************** +#define COMP_ACCTL_TMASK 0x00000800 // Trigger enable +#define COMP_ACCTL_ASRCP_MASK 0x00000600 // Vin+ source select mask +#define COMP_ACCTL_ASRCP_PIN 0x00000000 // Dedicated Comp+ pin +#define COMP_ACCTL_ASRCP_PIN0 0x00000200 // Comp0+ pin +#define COMP_ACCTL_ASRCP_REF 0x00000400 // Internal voltage reference +#define COMP_ACCTL_ASRCP_RES 0x00000600 // Reserved +#define COMP_ACCTL_OEN 0x00000100 // Comparator output enable +#define COMP_ACCTL_TSVAL 0x00000080 // Trigger polarity select +#define COMP_ACCTL_TSEN_MASK 0x00000060 // Trigger sense mask +#define COMP_ACCTL_TSEN_LEVEL 0x00000000 // Trigger is level sense +#define COMP_ACCTL_TSEN_FALL 0x00000020 // Trigger is falling edge +#define COMP_ACCTL_TSEN_RISE 0x00000040 // Trigger is rising edge +#define COMP_ACCTL_TSEN_BOTH 0x00000060 // Trigger is both edges +#define COMP_ACCTL_ISLVAL 0x00000010 // Interrupt polarity select +#define COMP_ACCTL_ISEN_MASK 0x0000000C // Interrupt sense mask +#define COMP_ACCTL_ISEN_LEVEL 0x00000000 // Interrupt is level sense +#define COMP_ACCTL_ISEN_FALL 0x00000004 // Interrupt is falling edge +#define COMP_ACCTL_ISEN_RISE 0x00000008 // Interrupt is rising edge +#define COMP_ACCTL_ISEN_BOTH 0x0000000C // Interrupt is both edges +#define COMP_ACCTL_CINV 0x00000002 // Comparator output invert + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the comparator +// registers. +// +//***************************************************************************** +#define COMP_RV_ACCTL1 0x00000000 // Comp1 control register +#define COMP_RV_ACSTAT2 0x00000000 // Comp2 status register +#define COMP_RV_ACSTAT0 0x00000000 // Comp0 status register +#define COMP_RV_RIS 0x00000000 // Raw interrupt status register +#define COMP_RV_INTEN 0x00000000 // Interrupt enable register +#define COMP_RV_ACCTL2 0x00000000 // Comp2 control register +#define COMP_RV_MIS 0x00000000 // Interrupt status register +#define COMP_RV_ACCTL0 0x00000000 // Comp0 control register +#define COMP_RV_ACSTAT1 0x00000000 // Comp1 status register +#define COMP_RV_REFCTL 0x00000000 // Reference voltage control reg + +#endif + +#endif // __HW_COMP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_epi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_epi.h new file mode 100644 index 00000000..8ed9d165 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_epi.h @@ -0,0 +1,499 @@ +//***************************************************************************** +// +// hw_epi.h - Macros for use in accessing the EPI registers. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_EPI_H__ +#define __HW_EPI_H__ + +//***************************************************************************** +// +// The following are defines for the External Peripheral Interface register +// offsets. +// +//***************************************************************************** +#define EPI_O_CFG 0x00000000 // EPI Configuration +#define EPI_O_BAUD 0x00000004 // EPI Main Baud Rate +#define EPI_O_HB16CFG 0x00000010 // EPI Host-Bus 16 Configuration +#define EPI_O_GPCFG 0x00000010 // EPI General-Purpose + // Configuration +#define EPI_O_SDRAMCFG 0x00000010 // EPI SDRAM Configuration +#define EPI_O_HB8CFG 0x00000010 // EPI Host-Bus 8 Configuration +#define EPI_O_HB8CFG2 0x00000014 // EPI Host-Bus 8 Configuration 2 +#define EPI_O_HB16CFG2 0x00000014 // EPI Host-Bus 16 Configuration 2 +#define EPI_O_GPCFG2 0x00000014 // EPI General-Purpose + // Configuration 2 +#define EPI_O_ADDRMAP 0x0000001C // EPI Address Map +#define EPI_O_RSIZE0 0x00000020 // EPI Read Size 0 +#define EPI_O_RADDR0 0x00000024 // EPI Read Address 0 +#define EPI_O_RPSTD0 0x00000028 // EPI Non-Blocking Read Data 0 +#define EPI_O_RSIZE1 0x00000030 // EPI Read Size 1 +#define EPI_O_RADDR1 0x00000034 // EPI Read Address 1 +#define EPI_O_RPSTD1 0x00000038 // EPI Non-Blocking Read Data 1 +#define EPI_O_STAT 0x00000060 // EPI Status +#define EPI_O_RFIFOCNT 0x0000006C // EPI Read FIFO Count +#define EPI_O_READFIFO 0x00000070 // EPI Read FIFO +#define EPI_O_READFIFO1 0x00000074 // EPI Read FIFO Alias 1 +#define EPI_O_READFIFO2 0x00000078 // EPI Read FIFO Alias 2 +#define EPI_O_READFIFO3 0x0000007C // EPI Read FIFO Alias 3 +#define EPI_O_READFIFO4 0x00000080 // EPI Read FIFO Alias 4 +#define EPI_O_READFIFO5 0x00000084 // EPI Read FIFO Alias 5 +#define EPI_O_READFIFO6 0x00000088 // EPI Read FIFO Alias 6 +#define EPI_O_READFIFO7 0x0000008C // EPI Read FIFO Alias 7 +#define EPI_O_FIFOLVL 0x00000200 // EPI FIFO Level Selects +#define EPI_O_WFIFOCNT 0x00000204 // EPI Write FIFO Count +#define EPI_O_IM 0x00000210 // EPI Interrupt Mask +#define EPI_O_RIS 0x00000214 // EPI Raw Interrupt Status +#define EPI_O_MIS 0x00000218 // EPI Masked Interrupt Status +#define EPI_O_EISC 0x0000021C // EPI Error Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_CFG register. +// +//***************************************************************************** +#define EPI_CFG_BLKEN 0x00000010 // Block Enable +#define EPI_CFG_MODE_M 0x0000000F // Mode Select +#define EPI_CFG_MODE_NONE 0x00000000 // General Purpose +#define EPI_CFG_MODE_SDRAM 0x00000001 // SDRAM +#define EPI_CFG_MODE_HB8 0x00000002 // 8-Bit Host-Bus (HB8) +#define EPI_CFG_MODE_HB16 0x00000003 // 16-Bit Host-Bus (HB16) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_BAUD register. +// +//***************************************************************************** +#define EPI_BAUD_COUNT1_M 0xFFFF0000 // Baud Rate Counter 1 +#define EPI_BAUD_COUNT0_M 0x0000FFFF // Baud Rate Counter 0 +#define EPI_BAUD_COUNT1_S 16 +#define EPI_BAUD_COUNT0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB16CFG register. +// +//***************************************************************************** +#define EPI_HB16CFG_XFFEN 0x00800000 // External FIFO FULL Enable +#define EPI_HB16CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable +#define EPI_HB16CFG_WRHIGH 0x00200000 // WRITE Strobe Polarity +#define EPI_HB16CFG_RDHIGH 0x00100000 // READ Strobe Polarity +#define EPI_HB16CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_HB16CFG_WRWS_M 0x000000C0 // CS0n Write Wait States +#define EPI_HB16CFG_WRWS_0 0x00000000 // No wait states +#define EPI_HB16CFG_WRWS_1 0x00000040 // 1 wait state +#define EPI_HB16CFG_WRWS_2 0x00000080 // 2 wait states +#define EPI_HB16CFG_WRWS_3 0x000000C0 // 3 wait states +#define EPI_HB16CFG_RDWS_M 0x00000030 // CS0n Read Wait States +#define EPI_HB16CFG_RDWS_0 0x00000000 // No wait states +#define EPI_HB16CFG_RDWS_1 0x00000010 // 1 wait state +#define EPI_HB16CFG_RDWS_2 0x00000020 // 2 wait states +#define EPI_HB16CFG_RDWS_3 0x00000030 // 3 wait states +#define EPI_HB16CFG_BSEL 0x00000004 // Byte Select Configuration +#define EPI_HB16CFG_MODE_M 0x00000003 // Host Bus Sub-Mode +#define EPI_HB16CFG_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0] +#define EPI_HB16CFG_MODE_ADNMUX 0x00000001 // ADNONMUX - D[15:0] +#define EPI_HB16CFG_MODE_SRAM 0x00000002 // Continuous Read - D[15:0] +#define EPI_HB16CFG_MODE_XFIFO 0x00000003 // XFIFO - D[15:0] +#define EPI_HB16CFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_GPCFG register. +// +//***************************************************************************** +#define EPI_GPCFG_CLKPIN 0x80000000 // Clock Pin +#define EPI_GPCFG_CLKGATE 0x40000000 // Clock Gated +#define EPI_GPCFG_RDYEN 0x10000000 // Ready Enable +#define EPI_GPCFG_FRMPIN 0x08000000 // Framing Pin +#define EPI_GPCFG_FRM50 0x04000000 // 50/50 Frame +#define EPI_GPCFG_FRMCNT_M 0x03C00000 // Frame Count +#define EPI_GPCFG_RW 0x00200000 // Read and Write +#define EPI_GPCFG_WR2CYC 0x00080000 // 2-Cycle Writes +#define EPI_GPCFG_RD2CYC 0x00040000 // 2-Cycle Reads +#define EPI_GPCFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_GPCFG_ASIZE_M 0x00000030 // Address Bus Size +#define EPI_GPCFG_ASIZE_NONE 0x00000000 // No address +#define EPI_GPCFG_ASIZE_4BIT 0x00000010 // Up to 4 bits wide +#define EPI_GPCFG_ASIZE_12BIT 0x00000020 // Up to 12 bits wide. This size + // cannot be used with 24-bit data +#define EPI_GPCFG_ASIZE_20BIT 0x00000030 // Up to 20 bits wide. This size + // cannot be used with data sizes + // other than 8 +#define EPI_GPCFG_DSIZE_M 0x00000003 // Size of Data Bus +#define EPI_GPCFG_DSIZE_4BIT 0x00000000 // 8 Bits Wide (EPI0S0 to EPI0S7) +#define EPI_GPCFG_DSIZE_16BIT 0x00000001 // 16 Bits Wide (EPI0S0 to EPI0S15) +#define EPI_GPCFG_DSIZE_24BIT 0x00000002 // 24 Bits Wide (EPI0S0 to EPI0S23) +#define EPI_GPCFG_DSIZE_32BIT 0x00000003 // 32 Bits Wide (EPI0S0 to EPI0S31) +#define EPI_GPCFG_FRMCNT_S 22 +#define EPI_GPCFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_SDRAMCFG register. +// +//***************************************************************************** +#define EPI_SDRAMCFG_FREQ_M 0xC0000000 // Frequency Range +#define EPI_SDRAMCFG_FREQ_NONE 0x00000000 // 0 - 15 MHz +#define EPI_SDRAMCFG_FREQ_15MHZ 0x40000000 // 15 - 30 MHz +#define EPI_SDRAMCFG_FREQ_30MHZ 0x80000000 // 30 - 50 MHz +#define EPI_SDRAMCFG_FREQ_50MHZ 0xC0000000 // 50 - 100 MHz +#define EPI_SDRAMCFG_RFSH_M 0x07FF0000 // Refresh Counter +#define EPI_SDRAMCFG_SLEEP 0x00000200 // Sleep Mode +#define EPI_SDRAMCFG_SIZE_M 0x00000003 // Size of SDRAM +#define EPI_SDRAMCFG_SIZE_8MB 0x00000000 // 64 megabits (8MB) +#define EPI_SDRAMCFG_SIZE_16MB 0x00000001 // 128 megabits (16MB) +#define EPI_SDRAMCFG_SIZE_32MB 0x00000002 // 256 megabits (32MB) +#define EPI_SDRAMCFG_SIZE_64MB 0x00000003 // 512 megabits (64MB) +#define EPI_SDRAMCFG_RFSH_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB8CFG register. +// +//***************************************************************************** +#define EPI_HB8CFG_XFFEN 0x00800000 // External FIFO FULL Enable +#define EPI_HB8CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable +#define EPI_HB8CFG_WRHIGH 0x00200000 // CS0n WRITE Strobe Polarity +#define EPI_HB8CFG_RDHIGH 0x00100000 // CS0n READ Strobe Polarity +#define EPI_HB8CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_HB8CFG_WRWS_M 0x000000C0 // Write Wait States +#define EPI_HB8CFG_WRWS_0 0x00000000 // No wait states +#define EPI_HB8CFG_WRWS_1 0x00000040 // 1 wait state +#define EPI_HB8CFG_WRWS_2 0x00000080 // 2 wait states +#define EPI_HB8CFG_WRWS_3 0x000000C0 // 3 wait states +#define EPI_HB8CFG_RDWS_M 0x00000030 // Read Wait States +#define EPI_HB8CFG_RDWS_0 0x00000000 // No wait states +#define EPI_HB8CFG_RDWS_1 0x00000010 // 1 wait state +#define EPI_HB8CFG_RDWS_2 0x00000020 // 2 wait states +#define EPI_HB8CFG_RDWS_3 0x00000030 // 3 wait states +#define EPI_HB8CFG_MODE_M 0x00000003 // Host Bus Sub-Mode +#define EPI_HB8CFG_MODE_MUX 0x00000000 // ADMUX - AD[7:0] +#define EPI_HB8CFG_MODE_NMUX 0x00000001 // ADNONMUX - D[7:0] +#define EPI_HB8CFG_MODE_SRAM 0x00000002 // Continuous Read - D[7:0] +#define EPI_HB8CFG_MODE_FIFO 0x00000003 // XFIFO - D[7:0] +#define EPI_HB8CFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB8CFG2 register. +// +//***************************************************************************** +#define EPI_HB8CFG2_WORD 0x80000000 // Word Access Mode +#define EPI_HB8CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate +#define EPI_HB8CFG2_CSCFG_M 0x03000000 // Chip Select Configuration +#define EPI_HB8CFG2_CSCFG_ALE 0x00000000 // ALE Configuration +#define EPI_HB8CFG2_CSCFG_CS 0x01000000 // CSn Configuration +#define EPI_HB8CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration +#define EPI_HB8CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB16CFG2 register. +// +//***************************************************************************** +#define EPI_HB16CFG2_WORD 0x80000000 // Word Access Mode +#define EPI_HB16CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate +#define EPI_HB16CFG2_CSCFG_M 0x03000000 // Chip Select Configuration +#define EPI_HB16CFG2_CSCFG_ALE 0x00000000 // ALE Configuration +#define EPI_HB16CFG2_CSCFG_CS 0x01000000 // CSn Configuration +#define EPI_HB16CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration +#define EPI_HB16CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_GPCFG2 register. +// +//***************************************************************************** +#define EPI_GPCFG2_WORD 0x80000000 // Word Access Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_ADDRMAP register. +// +//***************************************************************************** +#define EPI_ADDRMAP_EPSZ_M 0x000000C0 // External Peripheral Size +#define EPI_ADDRMAP_EPSZ_256B 0x00000000 // 256 bytes; lower address range: + // 0x00 to 0xFF +#define EPI_ADDRMAP_EPSZ_64KB 0x00000040 // 64 KB; lower address range: + // 0x0000 to 0xFFFF +#define EPI_ADDRMAP_EPSZ_16MB 0x00000080 // 16 MB; lower address range: + // 0x00.0000 to 0xFF.FFFF +#define EPI_ADDRMAP_EPSZ_256MB 0x000000C0 // 256 MB; lower address range: + // 0x000.0000 to 0xFFF.FFFF +#define EPI_ADDRMAP_EPADR_M 0x00000030 // External Peripheral Address +#define EPI_ADDRMAP_EPADR_NONE 0x00000000 // Not mapped +#define EPI_ADDRMAP_EPADR_A000 0x00000010 // At 0xA000.0000 +#define EPI_ADDRMAP_EPADR_C000 0x00000020 // At 0xC000.0000 +#define EPI_ADDRMAP_ERSZ_M 0x0000000C // External RAM Size +#define EPI_ADDRMAP_ERSZ_256B 0x00000000 // 256 bytes; lower address range: + // 0x00 to 0xFF +#define EPI_ADDRMAP_ERSZ_64KB 0x00000004 // 64 KB; lower address range: + // 0x0000 to 0xFFFF +#define EPI_ADDRMAP_ERSZ_16MB 0x00000008 // 16 MB; lower address range: + // 0x00.0000 to 0xFF.FFFF +#define EPI_ADDRMAP_ERSZ_256MB 0x0000000C // 256 MB; lower address range: + // 0x000.0000 to 0xFFF.FFFF +#define EPI_ADDRMAP_ERADR_M 0x00000003 // External RAM Address +#define EPI_ADDRMAP_ERADR_NONE 0x00000000 // Not mapped +#define EPI_ADDRMAP_ERADR_6000 0x00000001 // At 0x6000.0000 +#define EPI_ADDRMAP_ERADR_8000 0x00000002 // At 0x8000.0000 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RSIZE0 register. +// +//***************************************************************************** +#define EPI_RSIZE0_SIZE_M 0x00000003 // Current Size +#define EPI_RSIZE0_SIZE_8BIT 0x00000001 // Byte (8 bits) +#define EPI_RSIZE0_SIZE_16BIT 0x00000002 // Half-word (16 bits) +#define EPI_RSIZE0_SIZE_32BIT 0x00000003 // Word (32 bits) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RADDR0 register. +// +//***************************************************************************** +#define EPI_RADDR0_ADDR_M 0x1FFFFFFF // Current Address +#define EPI_RADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RPSTD0 register. +// +//***************************************************************************** +#define EPI_RPSTD0_POSTCNT_M 0x00001FFF // Post Count +#define EPI_RPSTD0_POSTCNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RSIZE1 register. +// +//***************************************************************************** +#define EPI_RSIZE1_SIZE_M 0x00000003 // Current Size +#define EPI_RSIZE1_SIZE_8BIT 0x00000001 // Byte (8 bits) +#define EPI_RSIZE1_SIZE_16BIT 0x00000002 // Half-word (16 bits) +#define EPI_RSIZE1_SIZE_32BIT 0x00000003 // Word (32 bits) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RADDR1 register. +// +//***************************************************************************** +#define EPI_RADDR1_ADDR_M 0x1FFFFFFF // Current Address +#define EPI_RADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RPSTD1 register. +// +//***************************************************************************** +#define EPI_RPSTD1_POSTCNT_M 0x00001FFF // Post Count +#define EPI_RPSTD1_POSTCNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_STAT register. +// +//***************************************************************************** +#define EPI_STAT_CELOW 0x00000200 // Clock Enable Low +#define EPI_STAT_XFFULL 0x00000100 // External FIFO Full +#define EPI_STAT_XFEMPTY 0x00000080 // External FIFO Empty +#define EPI_STAT_INITSEQ 0x00000040 // Initialization Sequence +#define EPI_STAT_WBUSY 0x00000020 // Write Busy +#define EPI_STAT_NBRBUSY 0x00000010 // Non-Blocking Read Busy +#define EPI_STAT_ACTIVE 0x00000001 // Register Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RFIFOCNT register. +// +//***************************************************************************** +#define EPI_RFIFOCNT_COUNT_M 0x00000007 // FIFO Count +#define EPI_RFIFOCNT_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO register. +// +//***************************************************************************** +#define EPI_READFIFO_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO1 +// register. +// +//***************************************************************************** +#define EPI_READFIFO1_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO2 +// register. +// +//***************************************************************************** +#define EPI_READFIFO2_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO3 +// register. +// +//***************************************************************************** +#define EPI_READFIFO3_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO4 +// register. +// +//***************************************************************************** +#define EPI_READFIFO4_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO4_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO5 +// register. +// +//***************************************************************************** +#define EPI_READFIFO5_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO5_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO6 +// register. +// +//***************************************************************************** +#define EPI_READFIFO6_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO6_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO7 +// register. +// +//***************************************************************************** +#define EPI_READFIFO7_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO7_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_FIFOLVL register. +// +//***************************************************************************** +#define EPI_FIFOLVL_WFERR 0x00020000 // Write Full Error +#define EPI_FIFOLVL_RSERR 0x00010000 // Read Stall Error +#define EPI_FIFOLVL_WRFIFO_M 0x00000070 // Write FIFO +#define EPI_FIFOLVL_WRFIFO_EMPT 0x00000000 // Trigger when there are 1 to 4 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_1_4 0x00000020 // Trigger when there are 1 to 3 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_1_2 0x00000030 // Trigger when there are 1 to 2 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_3_4 0x00000040 // Trigger when there is 1 space + // available in the WFIFO +#define EPI_FIFOLVL_RDFIFO_M 0x00000007 // Read FIFO +#define EPI_FIFOLVL_RDFIFO_EMPT 0x00000000 // Empty +#define EPI_FIFOLVL_RDFIFO_1_8 0x00000001 // Trigger when there are 1 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_1_4 0x00000002 // Trigger when there are 2 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_1_2 0x00000003 // Trigger when there are 4 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_3_4 0x00000004 // Trigger when there are 6 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_7_8 0x00000005 // Trigger when there are 7 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_FULL 0x00000006 // Trigger when there are 8 entries + // in the NBRFIFO + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_WFIFOCNT register. +// +//***************************************************************************** +#define EPI_WFIFOCNT_WTAV_M 0x00000007 // Available Write Transactions +#define EPI_WFIFOCNT_WTAV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_IM register. +// +//***************************************************************************** +#define EPI_IM_WRIM 0x00000004 // Write Interrupt Mask +#define EPI_IM_RDIM 0x00000002 // Read Interrupt Mask +#define EPI_IM_ERRIM 0x00000001 // Error Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RIS register. +// +//***************************************************************************** +#define EPI_RIS_WRRIS 0x00000004 // Write Raw Interrupt Status +#define EPI_RIS_RDRIS 0x00000002 // Read Raw Interrupt Status +#define EPI_RIS_ERRRIS 0x00000001 // Error Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_MIS register. +// +//***************************************************************************** +#define EPI_MIS_WRMIS 0x00000004 // Write Masked Interrupt Status +#define EPI_MIS_RDMIS 0x00000002 // Read Masked Interrupt Status +#define EPI_MIS_ERRMIS 0x00000001 // Error Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_EISC register. +// +//***************************************************************************** +#define EPI_EISC_WTFULL 0x00000004 // Write FIFO Full Error +#define EPI_EISC_RSTALL 0x00000002 // Read Stalled Error +#define EPI_EISC_TOUT 0x00000001 // Timeout Error + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the EPI_O_BAUD +// register. +// +//***************************************************************************** +#define EPI_BAUD_COUNT_M 0x0000FFFF // Baud Rate Counter +#define EPI_BAUD_COUNT_S 0 + +#endif + +#endif // __HW_EPI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ethernet.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ethernet.h new file mode 100644 index 00000000..742db3ff --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ethernet.h @@ -0,0 +1,679 @@ +//***************************************************************************** +// +// hw_ethernet.h - Macros used when accessing the Ethernet hardware. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_ETHERNET_H__ +#define __HW_ETHERNET_H__ + +//***************************************************************************** +// +// The following are defines for the Ethernet MAC register offsets. +// +//***************************************************************************** +#define MAC_O_RIS 0x00000000 // Ethernet MAC Raw Interrupt + // Status/Acknowledge +#define MAC_O_IACK 0x00000000 // Ethernet MAC Raw Interrupt + // Status/Acknowledge +#define MAC_O_IM 0x00000004 // Ethernet MAC Interrupt Mask +#define MAC_O_RCTL 0x00000008 // Ethernet MAC Receive Control +#define MAC_O_TCTL 0x0000000C // Ethernet MAC Transmit Control +#define MAC_O_DATA 0x00000010 // Ethernet MAC Data +#define MAC_O_IA0 0x00000014 // Ethernet MAC Individual Address + // 0 +#define MAC_O_IA1 0x00000018 // Ethernet MAC Individual Address + // 1 +#define MAC_O_THR 0x0000001C // Ethernet MAC Threshold +#define MAC_O_MCTL 0x00000020 // Ethernet MAC Management Control +#define MAC_O_MDV 0x00000024 // Ethernet MAC Management Divider +#define MAC_O_MTXD 0x0000002C // Ethernet MAC Management Transmit + // Data +#define MAC_O_MRXD 0x00000030 // Ethernet MAC Management Receive + // Data +#define MAC_O_NP 0x00000034 // Ethernet MAC Number of Packets +#define MAC_O_TR 0x00000038 // Ethernet MAC Transmission + // Request +#define MAC_O_TS 0x0000003C // Ethernet MAC Timer Support +#define MAC_O_LED 0x00000040 // Ethernet MAC LED Encoding +#define MAC_O_MDIX 0x00000044 // Ethernet PHY MDIX + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RIS register. +// +//***************************************************************************** +#define MAC_RIS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_RIS_MDINT 0x00000020 // MII Transaction Complete +#define MAC_RIS_RXER 0x00000010 // Receive Error +#define MAC_RIS_FOV 0x00000008 // FIFO Overrun +#define MAC_RIS_TXEMP 0x00000004 // Transmit FIFO Empty +#define MAC_RIS_TXER 0x00000002 // Transmit Error +#define MAC_RIS_RXINT 0x00000001 // Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IACK register. +// +//***************************************************************************** +#define MAC_IACK_PHYINT 0x00000040 // Clear PHY Interrupt +#define MAC_IACK_MDINT 0x00000020 // Clear MII Transaction Complete +#define MAC_IACK_RXER 0x00000010 // Clear Receive Error +#define MAC_IACK_FOV 0x00000008 // Clear FIFO Overrun +#define MAC_IACK_TXEMP 0x00000004 // Clear Transmit FIFO Empty +#define MAC_IACK_TXER 0x00000002 // Clear Transmit Error +#define MAC_IACK_RXINT 0x00000001 // Clear Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IM register. +// +//***************************************************************************** +#define MAC_IM_PHYINTM 0x00000040 // Mask PHY Interrupt +#define MAC_IM_MDINTM 0x00000020 // Mask MII Transaction Complete +#define MAC_IM_RXERM 0x00000010 // Mask Receive Error +#define MAC_IM_FOVM 0x00000008 // Mask FIFO Overrun +#define MAC_IM_TXEMPM 0x00000004 // Mask Transmit FIFO Empty +#define MAC_IM_TXERM 0x00000002 // Mask Transmit Error +#define MAC_IM_RXINTM 0x00000001 // Mask Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RCTL register. +// +//***************************************************************************** +#define MAC_RCTL_RSTFIFO 0x00000010 // Clear Receive FIFO +#define MAC_RCTL_BADCRC 0x00000008 // Enable Reject Bad CRC +#define MAC_RCTL_PRMS 0x00000004 // Enable Promiscuous Mode +#define MAC_RCTL_AMUL 0x00000002 // Enable Multicast Frames +#define MAC_RCTL_RXEN 0x00000001 // Enable Receiver + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TCTL register. +// +//***************************************************************************** +#define MAC_TCTL_DUPLEX 0x00000010 // Enable Duplex Mode +#define MAC_TCTL_CRC 0x00000004 // Enable CRC Generation +#define MAC_TCTL_PADEN 0x00000002 // Enable Packet Padding +#define MAC_TCTL_TXEN 0x00000001 // Enable Transmitter + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_DATA register. +// +//***************************************************************************** +#define MAC_DATA_TXDATA_M 0xFFFFFFFF // Transmit FIFO Data +#define MAC_DATA_RXDATA_M 0xFFFFFFFF // Receive FIFO Data +#define MAC_DATA_RXDATA_S 0 +#define MAC_DATA_TXDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA0 register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4_M 0xFF000000 // MAC Address Octet 4 +#define MAC_IA0_MACOCT3_M 0x00FF0000 // MAC Address Octet 3 +#define MAC_IA0_MACOCT2_M 0x0000FF00 // MAC Address Octet 2 +#define MAC_IA0_MACOCT1_M 0x000000FF // MAC Address Octet 1 +#define MAC_IA0_MACOCT4_S 24 +#define MAC_IA0_MACOCT3_S 16 +#define MAC_IA0_MACOCT2_S 8 +#define MAC_IA0_MACOCT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA1 register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6_M 0x0000FF00 // MAC Address Octet 6 +#define MAC_IA1_MACOCT5_M 0x000000FF // MAC Address Octet 5 +#define MAC_IA1_MACOCT6_S 8 +#define MAC_IA1_MACOCT5_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_THR register. +// +//***************************************************************************** +#define MAC_THR_THRESH_M 0x0000003F // Threshold Value +#define MAC_THR_THRESH_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MCTL register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR_M 0x000000F8 // MII Register Address +#define MAC_MCTL_WRITE 0x00000002 // MII Register Transaction Type +#define MAC_MCTL_START 0x00000001 // MII Register Transaction Enable +#define MAC_MCTL_REGADR_S 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDV register. +// +//***************************************************************************** +#define MAC_MDV_DIV_M 0x000000FF // Clock Divider +#define MAC_MDV_DIV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MTXD register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX_M 0x0000FFFF // MII Register Transmit Data +#define MAC_MTXD_MDTX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MRXD register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX_M 0x0000FFFF // MII Register Receive Data +#define MAC_MRXD_MDRX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_NP register. +// +//***************************************************************************** +#define MAC_NP_NPR_M 0x0000003F // Number of Packets in Receive + // FIFO +#define MAC_NP_NPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TR register. +// +//***************************************************************************** +#define MAC_TR_NEWTX 0x00000001 // New Transmission + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TS register. +// +//***************************************************************************** +#define MAC_TS_TSEN 0x00000001 // Time Stamp Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_LED register. +// +//***************************************************************************** +#define MAC_LED_LED1_M 0x00000F00 // LED1 Source +#define MAC_LED_LED1_LINK 0x00000000 // Link OK +#define MAC_LED_LED1_RXTX 0x00000100 // RX or TX Activity (Default LED1) +#define MAC_LED_LED1_100 0x00000500 // 100BASE-TX mode +#define MAC_LED_LED1_10 0x00000600 // 10BASE-T mode +#define MAC_LED_LED1_DUPLEX 0x00000700 // Full-Duplex +#define MAC_LED_LED1_LINKACT 0x00000800 // Link OK & Blink=RX or TX + // Activity +#define MAC_LED_LED0_M 0x0000000F // LED0 Source +#define MAC_LED_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define MAC_LED_LED0_RXTX 0x00000001 // RX or TX Activity +#define MAC_LED_LED0_100 0x00000005 // 100BASE-TX mode +#define MAC_LED_LED0_10 0x00000006 // 10BASE-T mode +#define MAC_LED_LED0_DUPLEX 0x00000007 // Full-Duplex +#define MAC_LED_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDIX register. +// +//***************************************************************************** +#define MAC_MDIX_EN 0x00000001 // MDI/MDI-X Enable + +//***************************************************************************** +// +// The following are defines for the Ethernet Controller PHY registers. +// +//***************************************************************************** +#define PHY_MR0 0x00000000 // Ethernet PHY Management Register + // 0 - Control +#define PHY_MR1 0x00000001 // Ethernet PHY Management Register + // 1 - Status +#define PHY_MR2 0x00000002 // Ethernet PHY Management Register + // 2 - PHY Identifier 1 +#define PHY_MR3 0x00000003 // Ethernet PHY Management Register + // 3 - PHY Identifier 2 +#define PHY_MR4 0x00000004 // Ethernet PHY Management Register + // 4 - Auto-Negotiation + // Advertisement +#define PHY_MR5 0x00000005 // Ethernet PHY Management Register + // 5 - Auto-Negotiation Link + // Partner Base Page Ability +#define PHY_MR6 0x00000006 // Ethernet PHY Management Register + // 6 - Auto-Negotiation Expansion +#define PHY_MR16 0x00000010 // Ethernet PHY Management Register + // 16 - Vendor-Specific +#define PHY_MR17 0x00000011 // Ethernet PHY Management Register + // 17 - Mode Control/Status +#define PHY_MR18 0x00000012 // Ethernet PHY Management Register + // 18 - Diagnostic +#define PHY_MR19 0x00000013 // Ethernet PHY Management Register + // 19 - Transceiver Control +#define PHY_MR23 0x00000017 // Ethernet PHY Management Register + // 23 - LED Configuration +#define PHY_MR24 0x00000018 // Ethernet PHY Management Register + // 24 -MDI/MDIX Control +#define PHY_MR27 0x0000001B // Ethernet PHY Management Register + // 27 - Special Control/Status +#define PHY_MR29 0x0000001D // Ethernet PHY Management Register + // 29 - Interrupt Status +#define PHY_MR30 0x0000001E // Ethernet PHY Management Register + // 30 - Interrupt Mask +#define PHY_MR31 0x0000001F // Ethernet PHY Management Register + // 31 - PHY Special Control/Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR0 register. +// +//***************************************************************************** +#define PHY_MR0_RESET 0x00008000 // Reset Registers +#define PHY_MR0_LOOPBK 0x00004000 // Loopback Mode +#define PHY_MR0_SPEEDSL 0x00002000 // Speed Select +#define PHY_MR0_ANEGEN 0x00001000 // Auto-Negotiation Enable +#define PHY_MR0_PWRDN 0x00000800 // Power Down +#define PHY_MR0_ISO 0x00000400 // Isolate +#define PHY_MR0_RANEG 0x00000200 // Restart Auto-Negotiation +#define PHY_MR0_DUPLEX 0x00000100 // Set Duplex Mode +#define PHY_MR0_COLT 0x00000080 // Collision Test + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR1 register. +// +//***************************************************************************** +#define PHY_MR1_100X_F 0x00004000 // 100BASE-TX Full-Duplex Mode +#define PHY_MR1_100X_H 0x00002000 // 100BASE-TX Half-Duplex Mode +#define PHY_MR1_10T_F 0x00001000 // 10BASE-T Full-Duplex Mode +#define PHY_MR1_10T_H 0x00000800 // 10BASE-T Half-Duplex Mode +#define PHY_MR1_MFPS 0x00000040 // Management Frames with Preamble + // Suppressed +#define PHY_MR1_ANEGC 0x00000020 // Auto-Negotiation Complete +#define PHY_MR1_RFAULT 0x00000010 // Remote Fault +#define PHY_MR1_ANEGA 0x00000008 // Auto-Negotiation +#define PHY_MR1_LINK 0x00000004 // Link Made +#define PHY_MR1_JAB 0x00000002 // Jabber Condition +#define PHY_MR1_EXTD 0x00000001 // Extended Capabilities + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR2 register. +// +//***************************************************************************** +#define PHY_MR2_OUI_M 0x0000FFFF // Organizationally Unique + // Identifier[21:6] +#define PHY_MR2_OUI_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR3 register. +// +//***************************************************************************** +#define PHY_MR3_OUI_M 0x0000FC00 // Organizationally Unique + // Identifier[5:0] +#define PHY_MR3_MN_M 0x000003F0 // Model Number +#define PHY_MR3_RN_M 0x0000000F // Revision Number +#define PHY_MR3_OUI_S 10 +#define PHY_MR3_MN_S 4 +#define PHY_MR3_RN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR4 register. +// +//***************************************************************************** +#define PHY_MR4_NP 0x00008000 // Next Page +#define PHY_MR4_RF 0x00002000 // Remote Fault +#define PHY_MR4_A3 0x00000100 // Technology Ability Field [3] +#define PHY_MR4_A2 0x00000080 // Technology Ability Field [2] +#define PHY_MR4_A1 0x00000040 // Technology Ability Field [1] +#define PHY_MR4_A0 0x00000020 // Technology Ability Field [0] +#define PHY_MR4_S_M 0x0000001F // Selector Field +#define PHY_MR4_S_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR5 register. +// +//***************************************************************************** +#define PHY_MR5_NP 0x00008000 // Next Page +#define PHY_MR5_ACK 0x00004000 // Acknowledge +#define PHY_MR5_RF 0x00002000 // Remote Fault +#define PHY_MR5_A_M 0x00001FE0 // Technology Ability Field +#define PHY_MR5_S_M 0x0000001F // Selector Field +#define PHY_MR5_S_8023 0x00000001 // IEEE Std 802.3 +#define PHY_MR5_S_8029 0x00000002 // IEEE Std 802.9 ISLAN-16T +#define PHY_MR5_S_8025 0x00000003 // IEEE Std 802.5 +#define PHY_MR5_S_1394 0x00000004 // IEEE Std 1394 +#define PHY_MR5_A_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR6 register. +// +//***************************************************************************** +#define PHY_MR6_PDF 0x00000010 // Parallel Detection Fault +#define PHY_MR6_LPNPA 0x00000008 // Link Partner is Next Page Able +#define PHY_MR6_PRX 0x00000002 // New Page Received +#define PHY_MR6_LPANEGA 0x00000001 // Link Partner is Auto-Negotiation + // Able + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR16 register. +// +//***************************************************************************** +#define PHY_MR16_RPTR 0x00008000 // Repeater Mode +#define PHY_MR16_INPOL 0x00004000 // Interrupt Polarity +#define PHY_MR16_TXHIM 0x00001000 // Transmit High Impedance Mode +#define PHY_MR16_SQEI 0x00000800 // SQE Inhibit Testing +#define PHY_MR16_NL10 0x00000400 // Natural Loopback Mode +#define PHY_MR16_SR_M 0x000003C0 // Silicon Revision Identifier +#define PHY_MR16_APOL 0x00000020 // Auto-Polarity Disable +#define PHY_MR16_RVSPOL 0x00000010 // Receive Data Polarity +#define PHY_MR16_PCSBP 0x00000002 // PCS Bypass +#define PHY_MR16_RXCC 0x00000001 // Receive Clock Control +#define PHY_MR16_SR_S 6 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR17 register. +// +//***************************************************************************** +#define PHY_MR17_JABBER_IE 0x00008000 // Jabber Interrupt Enable +#define PHY_MR17_FASTRIP 0x00004000 // 10-BASE-T Fast Mode Enable +#define PHY_MR17_RXER_IE 0x00004000 // Receive Error Interrupt Enable +#define PHY_MR17_EDPD 0x00002000 // Enable Energy Detect Power Down +#define PHY_MR17_PRX_IE 0x00002000 // Page Received Interrupt Enable +#define PHY_MR17_PDF_IE 0x00001000 // Parallel Detection Fault + // Interrupt Enable +#define PHY_MR17_LSQE 0x00000800 // Low Squelch Enable +#define PHY_MR17_LPACK_IE 0x00000800 // LP Acknowledge Interrupt Enable +#define PHY_MR17_LSCHG_IE 0x00000400 // Link Status Change Interrupt + // Enable +#define PHY_MR17_RFAULT_IE 0x00000200 // Remote Fault Interrupt Enable +#define PHY_MR17_ANEGCOMP_IE 0x00000100 // Auto-Negotiation Complete + // Interrupt Enable +#define PHY_MR17_FASTEST 0x00000100 // Auto-Negotiation Test Mode +#define PHY_MR17_JABBER_INT 0x00000080 // Jabber Event Interrupt +#define PHY_MR17_RXER_INT 0x00000040 // Receive Error Interrupt +#define PHY_MR17_PRX_INT 0x00000020 // Page Receive Interrupt +#define PHY_MR17_PDF_INT 0x00000010 // Parallel Detection Fault + // Interrupt +#define PHY_MR17_LPACK_INT 0x00000008 // LP Acknowledge Interrupt +#define PHY_MR17_LSCHG_INT 0x00000004 // Link Status Change Interrupt +#define PHY_MR17_FGLS 0x00000004 // Force Good Link Status +#define PHY_MR17_RFAULT_INT 0x00000002 // Remote Fault Interrupt +#define PHY_MR17_ENON 0x00000002 // Energy On +#define PHY_MR17_ANEGCOMP_INT 0x00000001 // Auto-Negotiation Complete + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR18 register. +// +//***************************************************************************** +#define PHY_MR18_ANEGF 0x00001000 // Auto-Negotiation Failure +#define PHY_MR18_DPLX 0x00000800 // Duplex Mode +#define PHY_MR18_RATE 0x00000400 // Rate +#define PHY_MR18_RXSD 0x00000200 // Receive Detection +#define PHY_MR18_RX_LOCK 0x00000100 // Receive PLL Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR19 register. +// +//***************************************************************************** +#define PHY_MR19_TXO_M 0x0000C000 // Transmit Amplitude Selection +#define PHY_MR19_TXO_00DB 0x00000000 // Gain set for 0.0dB of insertion + // loss +#define PHY_MR19_TXO_04DB 0x00004000 // Gain set for 0.4dB of insertion + // loss +#define PHY_MR19_TXO_08DB 0x00008000 // Gain set for 0.8dB of insertion + // loss +#define PHY_MR19_TXO_12DB 0x0000C000 // Gain set for 1.2dB of insertion + // loss + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR23 register. +// +//***************************************************************************** +#define PHY_MR23_LED1_M 0x000000F0 // LED1 Source +#define PHY_MR23_LED1_LINK 0x00000000 // Link OK +#define PHY_MR23_LED1_RXTX 0x00000010 // RX or TX Activity (Default LED1) +#define PHY_MR23_LED1_100 0x00000050 // 100BASE-TX mode +#define PHY_MR23_LED1_10 0x00000060 // 10BASE-T mode +#define PHY_MR23_LED1_DUPLEX 0x00000070 // Full-Duplex +#define PHY_MR23_LED1_LINKACT 0x00000080 // Link OK & Blink=RX or TX + // Activity +#define PHY_MR23_LED0_M 0x0000000F // LED0 Source +#define PHY_MR23_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define PHY_MR23_LED0_RXTX 0x00000001 // RX or TX Activity +#define PHY_MR23_LED0_100 0x00000005 // 100BASE-TX mode +#define PHY_MR23_LED0_10 0x00000006 // 10BASE-T mode +#define PHY_MR23_LED0_DUPLEX 0x00000007 // Full-Duplex +#define PHY_MR23_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR24 register. +// +//***************************************************************************** +#define PHY_MR24_PD_MODE 0x00000080 // Parallel Detection Mode +#define PHY_MR24_AUTO_SW 0x00000040 // Auto-Switching Enable +#define PHY_MR24_MDIX 0x00000020 // Auto-Switching Configuration +#define PHY_MR24_MDIX_CM 0x00000010 // Auto-Switching Complete +#define PHY_MR24_MDIX_SD_M 0x0000000F // Auto-Switching Seed +#define PHY_MR24_MDIX_SD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR27 register. +// +//***************************************************************************** +#define PHY_MR27_XPOL 0x00000010 // Polarity State of 10 BASE-T + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR29 register. +// +//***************************************************************************** +#define PHY_MR29_EONIS 0x00000080 // ENERGYON Interrupt +#define PHY_MR29_ANCOMPIS 0x00000040 // Auto-Negotiation Complete + // Interrupt +#define PHY_MR29_RFLTIS 0x00000020 // Remote Fault Interrupt +#define PHY_MR29_LDIS 0x00000010 // Link Down Interrupt +#define PHY_MR29_LPACKIS 0x00000008 // Auto-Negotiation LP Acknowledge +#define PHY_MR29_PDFIS 0x00000004 // Parallel Detection Fault +#define PHY_MR29_PRXIS 0x00000002 // Auto Negotiation Page Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR30 register. +// +//***************************************************************************** +#define PHY_MR30_EONIM 0x00000080 // ENERGYON Interrupt Enabled +#define PHY_MR30_ANCOMPIM 0x00000040 // Auto-Negotiation Complete + // Interrupt Enabled +#define PHY_MR30_RFLTIM 0x00000020 // Remote Fault Interrupt Enabled +#define PHY_MR30_LDIM 0x00000010 // Link Down Interrupt Enabled +#define PHY_MR30_LPACKIM 0x00000008 // Auto-Negotiation LP Acknowledge + // Enabled +#define PHY_MR30_PDFIM 0x00000004 // Parallel Detection Fault Enabled +#define PHY_MR30_PRXIM 0x00000002 // Auto Negotiation Page Received + // Enabled + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR31 register. +// +//***************************************************************************** +#define PHY_MR31_AUTODONE 0x00001000 // Auto Negotiation Done +#define PHY_MR31_SPEED_M 0x0000001C // HCD Speed Value +#define PHY_MR31_SPEED_10HD 0x00000004 // 10BASE-T half duplex +#define PHY_MR31_SPEED_100HD 0x00000008 // 100BASE-T half duplex +#define PHY_MR31_SPEED_10FD 0x00000014 // 10BASE-T full duplex +#define PHY_MR31_SPEED_100FD 0x00000018 // 100BASE-T full duplex +#define PHY_MR31_SCRDIS 0x00000001 // Scramble Disable + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Ethernet MAC register offsets. +// +//***************************************************************************** +#define MAC_O_IS 0x00000000 // Interrupt Status Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IS +// register. +// +//***************************************************************************** +#define MAC_IS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_IS_MDINT 0x00000020 // MDI Transaction Complete +#define MAC_IS_RXER 0x00000010 // RX Error +#define MAC_IS_FOV 0x00000008 // RX FIFO Overrun +#define MAC_IS_TXEMP 0x00000004 // TX FIFO Empy +#define MAC_IS_TXER 0x00000002 // TX Error +#define MAC_IS_RXINT 0x00000001 // RX Packet Available + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IA0 +// register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4 0xFF000000 // 4th Octet of MAC address +#define MAC_IA0_MACOCT3 0x00FF0000 // 3rd Octet of MAC address +#define MAC_IA0_MACOCT2 0x0000FF00 // 2nd Octet of MAC address +#define MAC_IA0_MACOCT1 0x000000FF // 1st Octet of MAC address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IA1 +// register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6 0x0000FF00 // 6th Octet of MAC address +#define MAC_IA1_MACOCT5 0x000000FF // 5th Octet of MAC address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_THR +// register. +// +//***************************************************************************** +#define MAC_THR_THRESH 0x0000003F // Transmit Threshold Value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MCTL +// register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR 0x000000F8 // Address for Next MII Transaction + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MDV +// register. +// +//***************************************************************************** +#define MAC_MDV_DIV 0x000000FF // Clock Divider for MDC for TX + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MTXD +// register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX 0x0000FFFF // Data for Next MII Transaction + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MRXD +// register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX 0x0000FFFF // Data Read from Last MII Trans + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_NP +// register. +// +//***************************************************************************** +#define MAC_NP_NPR 0x0000003F // Number of RX Frames in FIFO + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PHY_MR23 +// register. +// +//***************************************************************************** +#define PHY_MR23_LED1_TX 0x00000020 // TX Activity +#define PHY_MR23_LED1_RX 0x00000030 // RX Activity +#define PHY_MR23_LED1_COL 0x00000040 // Collision +#define PHY_MR23_LED0_TX 0x00000002 // TX Activity +#define PHY_MR23_LED0_RX 0x00000003 // RX Activity +#define PHY_MR23_LED0_COL 0x00000004 // Collision + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the MAC +// registers. +// +//***************************************************************************** +#define MAC_RV_MDV 0x00000080 +#define MAC_RV_IM 0x0000007F +#define MAC_RV_THR 0x0000003F +#define MAC_RV_RCTL 0x00000008 +#define MAC_RV_IA0 0x00000000 +#define MAC_RV_TCTL 0x00000000 +#define MAC_RV_DATA 0x00000000 +#define MAC_RV_MRXD 0x00000000 +#define MAC_RV_TR 0x00000000 +#define MAC_RV_IS 0x00000000 +#define MAC_RV_NP 0x00000000 +#define MAC_RV_MCTL 0x00000000 +#define MAC_RV_MTXD 0x00000000 +#define MAC_RV_IA1 0x00000000 +#define MAC_RV_IACK 0x00000000 +#define MAC_RV_MADD 0x00000000 + +#endif + +#endif // __HW_ETHERNET_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_flash.h new file mode 100644 index 00000000..13a013e5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_flash.h @@ -0,0 +1,381 @@ +//***************************************************************************** +// +// hw_flash.h - Macros used when accessing the flash controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_FLASH_H__ +#define __HW_FLASH_H__ + +//***************************************************************************** +// +// The following are defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_FMA 0x400FD000 // Flash Memory Address +#define FLASH_FMD 0x400FD004 // Flash Memory Data +#define FLASH_FMC 0x400FD008 // Flash Memory Control +#define FLASH_FCRIS 0x400FD00C // Flash Controller Raw Interrupt + // Status +#define FLASH_FCIM 0x400FD010 // Flash Controller Interrupt Mask +#define FLASH_FCMISC 0x400FD014 // Flash Controller Masked + // Interrupt Status and Clear +#define FLASH_FMC2 0x400FD020 // Flash Memory Control 2 +#define FLASH_FWBVAL 0x400FD030 // Flash Write Buffer Valid +#define FLASH_FCTL 0x400FD0F8 // Flash Control +#define FLASH_FWBN 0x400FD100 // Flash Write Buffer n +#define FLASH_RMCTL 0x400FE0F0 // ROM Control +#define FLASH_FMPRE 0x400FE130 // Flash Memory Protection Read + // Enable +#define FLASH_FMPPE 0x400FE134 // Flash Memory Protection Program + // Enable +#define FLASH_USECRL 0x400FE140 // USec Reload +#define FLASH_USERDBG 0x400FE1D0 // User Debug +#define FLASH_BOOTCFG 0x400FE1D0 // Boot Configuration +#define FLASH_USERREG0 0x400FE1E0 // User Register 0 +#define FLASH_USERREG1 0x400FE1E4 // User Register 1 +#define FLASH_USERREG2 0x400FE1E8 // User Register 2 +#define FLASH_USERREG3 0x400FE1EC // User Register 3 +#define FLASH_FMPRE0 0x400FE200 // Flash Memory Protection Read + // Enable 0 +#define FLASH_FMPRE1 0x400FE204 // Flash Memory Protection Read + // Enable 1 +#define FLASH_FMPRE2 0x400FE208 // Flash Memory Protection Read + // Enable 2 +#define FLASH_FMPRE3 0x400FE20C // Flash Memory Protection Read + // Enable 3 +#define FLASH_FMPPE0 0x400FE400 // Flash Memory Protection Program + // Enable 0 +#define FLASH_FMPPE1 0x400FE404 // Flash Memory Protection Program + // Enable 1 +#define FLASH_FMPPE2 0x400FE408 // Flash Memory Protection Program + // Enable 2 +#define FLASH_FMPPE3 0x400FE40C // Flash Memory Protection Program + // Enable 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC2 register. +// +//***************************************************************************** +#define FLASH_FMC2_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC2_WRBUF 0x00000001 // Buffered Flash Memory Write + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBVAL register. +// +//***************************************************************************** +#define FLASH_FWBVAL_FWB_M 0xFFFFFFFF // Flash Memory Write Buffer + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCTL register. +// +//***************************************************************************** +#define FLASH_FCTL_USDACK 0x00000002 // User Shut Down Acknowledge +#define FLASH_FCTL_USDREQ 0x00000001 // User Shut Down Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBN register. +// +//***************************************************************************** +#define FLASH_FWBN_DATA_M 0xFFFFFFFF // Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_RMCTL register. +// +//***************************************************************************** +#define FLASH_RMCTL_BA 0x00000001 // Boot Alias + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_BOOTCFG register. +// +//***************************************************************************** +#define FLASH_BOOTCFG_NW 0x80000000 // Not Written +#define FLASH_BOOTCFG_PORT_M 0x0000E000 // Boot GPIO Port +#define FLASH_BOOTCFG_PORT_A 0x00000000 // Port A +#define FLASH_BOOTCFG_PORT_B 0x00002000 // Port B +#define FLASH_BOOTCFG_PORT_C 0x00004000 // Port C +#define FLASH_BOOTCFG_PORT_D 0x00006000 // Port D +#define FLASH_BOOTCFG_PORT_E 0x00008000 // Port E +#define FLASH_BOOTCFG_PORT_F 0x0000A000 // Port F +#define FLASH_BOOTCFG_PORT_G 0x0000C000 // Port G +#define FLASH_BOOTCFG_PORT_H 0x0000E000 // Port H +#define FLASH_BOOTCFG_PIN_M 0x00001C00 // Boot GPIO Pin +#define FLASH_BOOTCFG_PIN_0 0x00000000 // Pin 0 +#define FLASH_BOOTCFG_PIN_1 0x00000400 // Pin 1 +#define FLASH_BOOTCFG_PIN_2 0x00000800 // Pin 2 +#define FLASH_BOOTCFG_PIN_3 0x00000C00 // Pin 3 +#define FLASH_BOOTCFG_PIN_4 0x00001000 // Pin 4 +#define FLASH_BOOTCFG_PIN_5 0x00001400 // Pin 5 +#define FLASH_BOOTCFG_PIN_6 0x00001800 // Pin 6 +#define FLASH_BOOTCFG_PIN_7 0x00001C00 // Pin 7 +#define FLASH_BOOTCFG_POL 0x00000200 // Boot GPIO Polarity +#define FLASH_BOOTCFG_EN 0x00000100 // Boot GPIO Enable +#define FLASH_BOOTCFG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_BOOTCFG_DBG0 0x00000001 // Debug Control 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG2 register. +// +//***************************************************************************** +#define FLASH_USERREG2_NW 0x80000000 // Not Written +#define FLASH_USERREG2_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG3 register. +// +//***************************************************************************** +#define FLASH_USERREG3_NW 0x80000000 // Not Written +#define FLASH_USERREG3_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMPRE and +// FLASH_FMPPE registers. +// +//***************************************************************************** +#define FLASH_FMP_BLOCK_31 0x80000000 // Enable for block 31 +#define FLASH_FMP_BLOCK_30 0x40000000 // Enable for block 30 +#define FLASH_FMP_BLOCK_29 0x20000000 // Enable for block 29 +#define FLASH_FMP_BLOCK_28 0x10000000 // Enable for block 28 +#define FLASH_FMP_BLOCK_27 0x08000000 // Enable for block 27 +#define FLASH_FMP_BLOCK_26 0x04000000 // Enable for block 26 +#define FLASH_FMP_BLOCK_25 0x02000000 // Enable for block 25 +#define FLASH_FMP_BLOCK_24 0x01000000 // Enable for block 24 +#define FLASH_FMP_BLOCK_23 0x00800000 // Enable for block 23 +#define FLASH_FMP_BLOCK_22 0x00400000 // Enable for block 22 +#define FLASH_FMP_BLOCK_21 0x00200000 // Enable for block 21 +#define FLASH_FMP_BLOCK_20 0x00100000 // Enable for block 20 +#define FLASH_FMP_BLOCK_19 0x00080000 // Enable for block 19 +#define FLASH_FMP_BLOCK_18 0x00040000 // Enable for block 18 +#define FLASH_FMP_BLOCK_17 0x00020000 // Enable for block 17 +#define FLASH_FMP_BLOCK_16 0x00010000 // Enable for block 16 +#define FLASH_FMP_BLOCK_15 0x00008000 // Enable for block 15 +#define FLASH_FMP_BLOCK_14 0x00004000 // Enable for block 14 +#define FLASH_FMP_BLOCK_13 0x00002000 // Enable for block 13 +#define FLASH_FMP_BLOCK_12 0x00001000 // Enable for block 12 +#define FLASH_FMP_BLOCK_11 0x00000800 // Enable for block 11 +#define FLASH_FMP_BLOCK_10 0x00000400 // Enable for block 10 +#define FLASH_FMP_BLOCK_9 0x00000200 // Enable for block 9 +#define FLASH_FMP_BLOCK_8 0x00000100 // Enable for block 8 +#define FLASH_FMP_BLOCK_7 0x00000080 // Enable for block 7 +#define FLASH_FMP_BLOCK_6 0x00000040 // Enable for block 6 +#define FLASH_FMP_BLOCK_5 0x00000020 // Enable for block 5 +#define FLASH_FMP_BLOCK_4 0x00000010 // Enable for block 4 +#define FLASH_FMP_BLOCK_3 0x00000008 // Enable for block 3 +#define FLASH_FMP_BLOCK_2 0x00000004 // Enable for block 2 +#define FLASH_FMP_BLOCK_1 0x00000002 // Enable for block 1 +#define FLASH_FMP_BLOCK_0 0x00000001 // Enable for block 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_RMVER 0x400FE0F4 // ROM Version Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FMC +// register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_MASK 0xFFFF0000 // FLASH write key mask +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCRIS +// register. +// +//***************************************************************************** +#define FLASH_FCRIS_PROGRAM 0x00000002 // Programming status +#define FLASH_FCRIS_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCIM +// register. +// +//***************************************************************************** +#define FLASH_FCIM_PROGRAM 0x00000002 // Programming mask +#define FLASH_FCIM_ACCESS 0x00000001 // Invalid access mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCMISC +// register. +// +//***************************************************************************** +#define FLASH_FCMISC_PROGRAM 0x00000002 // Programming status +#define FLASH_FCMISC_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_RMVER +// register. +// +//***************************************************************************** +#define FLASH_RMVER_CONT_M 0xFF000000 // ROM Contents +#define FLASH_RMVER_CONT_LM 0x00000000 // Stellaris Boot Loader & + // DriverLib +#define FLASH_RMVER_CONT_LM_AES 0x02000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_CONT_LM_AES_SAFERTOS \ + 0x03000000 // Stellaris Boot Loader & + // DriverLib with AES and SAFERTOS +#define FLASH_RMVER_CONT_LM_AES2 \ + 0x05000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_VER_M 0x0000FF00 // ROM Version +#define FLASH_RMVER_REV_M 0x000000FF // ROM Revision +#define FLASH_RMVER_VER_S 8 +#define FLASH_RMVER_REV_S 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_USECRL +// register. +// +//***************************************************************************** +#define FLASH_USECRL_MASK 0x000000FF // Clock per uSec +#define FLASH_USECRL_SHIFT 0 + +#endif + +#endif // __HW_FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_gpio.h new file mode 100644 index 00000000..acdb2984 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_gpio.h @@ -0,0 +1,592 @@ +//***************************************************************************** +// +// hw_gpio.h - Defines and Macros for GPIO hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_GPIO_H__ +#define __HW_GPIO_H__ + +//***************************************************************************** +// +// The following are defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_DATA 0x00000000 // GPIO Data +#define GPIO_O_DIR 0x00000400 // GPIO Direction +#define GPIO_O_IS 0x00000404 // GPIO Interrupt Sense +#define GPIO_O_IBE 0x00000408 // GPIO Interrupt Both Edges +#define GPIO_O_IEV 0x0000040C // GPIO Interrupt Event +#define GPIO_O_IM 0x00000410 // GPIO Interrupt Mask +#define GPIO_O_RIS 0x00000414 // GPIO Raw Interrupt Status +#define GPIO_O_MIS 0x00000418 // GPIO Masked Interrupt Status +#define GPIO_O_ICR 0x0000041C // GPIO Interrupt Clear +#define GPIO_O_AFSEL 0x00000420 // GPIO Alternate Function Select +#define GPIO_O_DR2R 0x00000500 // GPIO 2-mA Drive Select +#define GPIO_O_DR4R 0x00000504 // GPIO 4-mA Drive Select +#define GPIO_O_DR8R 0x00000508 // GPIO 8-mA Drive Select +#define GPIO_O_ODR 0x0000050C // GPIO Open Drain Select +#define GPIO_O_PUR 0x00000510 // GPIO Pull-Up Select +#define GPIO_O_PDR 0x00000514 // GPIO Pull-Down Select +#define GPIO_O_SLR 0x00000518 // GPIO Slew Rate Control Select +#define GPIO_O_DEN 0x0000051C // GPIO Digital Enable +#define GPIO_O_LOCK 0x00000520 // GPIO Lock +#define GPIO_O_CR 0x00000524 // GPIO Commit +#define GPIO_O_AMSEL 0x00000528 // GPIO Analog Mode Select +#define GPIO_O_PCTL 0x0000052C // GPIO Port Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register +#define GPIO_LOCK_KEY_DD 0x4C4F434B // Unlocks the GPIO_CR register on + // DustDevil-class devices and + // later + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port A. +// +//***************************************************************************** +#define GPIO_PCTL_PA0_M 0x0000000F // PA0 mask +#define GPIO_PCTL_PA0_U0RX 0x00000001 // U0RX on PA0 +#define GPIO_PCTL_PA0_I2C1SCL 0x00000008 // I2C1SCL on PA0 +#define GPIO_PCTL_PA0_U1RX 0x00000009 // U1RX on PA0 +#define GPIO_PCTL_PA1_M 0x000000F0 // PA1 mask +#define GPIO_PCTL_PA1_U0TX 0x00000010 // U0TX on PA1 +#define GPIO_PCTL_PA1_I2C1SDA 0x00000080 // I2C1SDA on PA1 +#define GPIO_PCTL_PA1_U1TX 0x00000090 // U1TX on PA1 +#define GPIO_PCTL_PA2_M 0x00000F00 // PA2 mask +#define GPIO_PCTL_PA2_SSI0CLK 0x00000100 // SSI0CLK on PA2 +#define GPIO_PCTL_PA2_PWM4 0x00000400 // PWM4 on PA2 +#define GPIO_PCTL_PA2_I2S0RXSD 0x00000900 // I2S0RXSD on PA2 +#define GPIO_PCTL_PA3_M 0x0000F000 // PA3 mask +#define GPIO_PCTL_PA3_SSI0FSS 0x00001000 // SSI0FSS on PA3 +#define GPIO_PCTL_PA3_PWM5 0x00004000 // PWM5 on PA3 +#define GPIO_PCTL_PA3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PA3 +#define GPIO_PCTL_PA4_M 0x000F0000 // PA4 mask +#define GPIO_PCTL_PA4_SSI0RX 0x00010000 // SSI0RX on PA4 +#define GPIO_PCTL_PA4_PWM6 0x00040000 // PWM6 on PA4 +#define GPIO_PCTL_PA4_CAN0RX 0x00050000 // CAN0RX on PA4 +#define GPIO_PCTL_PA4_I2S0TXSCK 0x00090000 // I2S0TXSCK on PA4 +#define GPIO_PCTL_PA5_M 0x00F00000 // PA5 mask +#define GPIO_PCTL_PA5_SSI0TX 0x00100000 // SSI0TX on PA5 +#define GPIO_PCTL_PA5_PWM7 0x00400000 // PWM7 on PA5 +#define GPIO_PCTL_PA5_CAN0TX 0x00500000 // CAN0TX on PA5 +#define GPIO_PCTL_PA5_I2S0TXWS 0x00900000 // I2S0TXWS on PA5 +#define GPIO_PCTL_PA6_M 0x0F000000 // PA6 mask +#define GPIO_PCTL_PA6_I2C1SCL 0x01000000 // I2C1SCL on PA6 +#define GPIO_PCTL_PA6_CCP1 0x02000000 // CCP1 on PA6 +#define GPIO_PCTL_PA6_PWM0 0x04000000 // PWM0 on PA6 +#define GPIO_PCTL_PA6_PWM4 0x05000000 // PWM4 on PA6 +#define GPIO_PCTL_PA6_CAN0RX 0x06000000 // CAN0RX on PA6 +#define GPIO_PCTL_PA6_USB0EPEN 0x08000000 // USB0EPEN on PA6 +#define GPIO_PCTL_PA6_U1CTS 0x09000000 // U1CTS on PA6 +#define GPIO_PCTL_PA7_M 0xF0000000 // PA7 mask +#define GPIO_PCTL_PA7_I2C1SDA 0x10000000 // I2C1SDA on PA7 +#define GPIO_PCTL_PA7_CCP4 0x20000000 // CCP4 on PA7 +#define GPIO_PCTL_PA7_PWM1 0x40000000 // PWM1 on PA7 +#define GPIO_PCTL_PA7_PWM5 0x50000000 // PWM5 on PA7 +#define GPIO_PCTL_PA7_CAN0TX 0x60000000 // CAN0TX on PA7 +#define GPIO_PCTL_PA7_CCP3 0x70000000 // CCP3 on PA7 +#define GPIO_PCTL_PA7_USB0PFLT 0x80000000 // USB0PFLT on PA7 +#define GPIO_PCTL_PA7_U1DCD 0x90000000 // U1DCD on PA7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port B. +// +//***************************************************************************** +#define GPIO_PCTL_PB0_M 0x0000000F // PB0 mask +#define GPIO_PCTL_PB0_CCP0 0x00000001 // CCP0 on PB0 +#define GPIO_PCTL_PB0_PWM2 0x00000002 // PWM2 on PB0 +#define GPIO_PCTL_PB0_U1RX 0x00000005 // U1RX on PB0 +#define GPIO_PCTL_PB1_M 0x000000F0 // PB1 mask +#define GPIO_PCTL_PB1_CCP2 0x00000010 // CCP2 on PB1 +#define GPIO_PCTL_PB1_PWM3 0x00000020 // PWM3 on PB1 +#define GPIO_PCTL_PB1_CCP1 0x00000040 // CCP1 on PB1 +#define GPIO_PCTL_PB1_U1TX 0x00000050 // U1TX on PB1 +#define GPIO_PCTL_PB2_M 0x00000F00 // PB2 mask +#define GPIO_PCTL_PB2_I2C0SCL 0x00000100 // I2C0SCL on PB2 +#define GPIO_PCTL_PB2_IDX0 0x00000200 // IDX0 on PB2 +#define GPIO_PCTL_PB2_CCP3 0x00000400 // CCP3 on PB2 +#define GPIO_PCTL_PB2_CCP0 0x00000500 // CCP0 on PB2 +#define GPIO_PCTL_PB2_USB0EPEN 0x00000800 // USB0EPEN on PB2 +#define GPIO_PCTL_PB3_M 0x0000F000 // PB3 mask +#define GPIO_PCTL_PB3_I2C0SDA 0x00001000 // I2C0SDA on PB3 +#define GPIO_PCTL_PB3_FAULT0 0x00002000 // FAULT0 on PB3 +#define GPIO_PCTL_PB3_FAULT3 0x00004000 // FAULT3 on PB3 +#define GPIO_PCTL_PB3_USB0PFLT 0x00008000 // USB0PFLT on PB3 +#define GPIO_PCTL_PB4_M 0x000F0000 // PB4 mask +#define GPIO_PCTL_PB4_U2RX 0x00040000 // U2RX on PB4 +#define GPIO_PCTL_PB4_CAN0RX 0x00050000 // CAN0RX on PB4 +#define GPIO_PCTL_PB4_IDX0 0x00060000 // IDX0 on PB4 +#define GPIO_PCTL_PB4_U1RX 0x00070000 // U1RX on PB4 +#define GPIO_PCTL_PB4_EPI0S23 0x00080000 // EPI0S23 on PB4 +#define GPIO_PCTL_PB5_M 0x00F00000 // PB5 mask +#define GPIO_PCTL_PB5_C0O 0x00100000 // C0O on PB5 +#define GPIO_PCTL_PB5_CCP5 0x00200000 // CCP5 on PB5 +#define GPIO_PCTL_PB5_CCP6 0x00300000 // CCP6 on PB5 +#define GPIO_PCTL_PB5_CCP0 0x00400000 // CCP0 on PB5 +#define GPIO_PCTL_PB5_CAN0TX 0x00500000 // CAN0TX on PB5 +#define GPIO_PCTL_PB5_CCP2 0x00600000 // CCP2 on PB5 +#define GPIO_PCTL_PB5_U1TX 0x00700000 // U1TX on PB5 +#define GPIO_PCTL_PB5_EPI0S22 0x00800000 // EPI0S22 on PB5 +#define GPIO_PCTL_PB6_M 0x0F000000 // PB6 mask +#define GPIO_PCTL_PB6_CCP1 0x01000000 // CCP1 on PB6 +#define GPIO_PCTL_PB6_CCP7 0x02000000 // CCP7 on PB6 +#define GPIO_PCTL_PB6_C0O 0x03000000 // C0O on PB6 +#define GPIO_PCTL_PB6_FAULT1 0x04000000 // FAULT1 on PB6 +#define GPIO_PCTL_PB6_IDX0 0x05000000 // IDX0 on PB6 +#define GPIO_PCTL_PB6_CCP5 0x06000000 // CCP5 on PB6 +#define GPIO_PCTL_PB6_I2S0TXSCK 0x09000000 // I2S0TXSCK on PB6 +#define GPIO_PCTL_PB7_M 0xF0000000 // PB7 mask +#define GPIO_PCTL_PB7_NMI 0x40000000 // NMI on PB7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port C. +// +//***************************************************************************** +#define GPIO_PCTL_PC0_M 0x0000000F // PC0 mask +#define GPIO_PCTL_PC0_TCK 0x00000003 // TCK on PC0 +#define GPIO_PCTL_PC1_M 0x000000F0 // PC1 mask +#define GPIO_PCTL_PC1_TMS 0x00000030 // TMS on PC1 +#define GPIO_PCTL_PC2_M 0x00000F00 // PC2 mask +#define GPIO_PCTL_PC2_TDI 0x00000300 // TDI on PC2 +#define GPIO_PCTL_PC3_M 0x0000F000 // PC3 mask +#define GPIO_PCTL_PC3_TDO 0x00003000 // TDO on PC3 +#define GPIO_PCTL_PC4_M 0x000F0000 // PC4 mask +#define GPIO_PCTL_PC4_CCP5 0x00010000 // CCP5 on PC4 +#define GPIO_PCTL_PC4_PHA0 0x00020000 // PHA0 on PC4 +#define GPIO_PCTL_PC4_PWM6 0x00040000 // PWM6 on PC4 +#define GPIO_PCTL_PC4_CCP2 0x00050000 // CCP2 on PC4 +#define GPIO_PCTL_PC4_CCP4 0x00060000 // CCP4 on PC4 +#define GPIO_PCTL_PC4_EPI0S2 0x00080000 // EPI0S2 on PC4 +#define GPIO_PCTL_PC4_CCP1 0x00090000 // CCP1 on PC4 +#define GPIO_PCTL_PC5_M 0x00F00000 // PC5 mask +#define GPIO_PCTL_PC5_CCP1 0x00100000 // CCP1 on PC5 +#define GPIO_PCTL_PC5_C1O 0x00200000 // C1O on PC5 +#define GPIO_PCTL_PC5_C0O 0x00300000 // C0O on PC5 +#define GPIO_PCTL_PC5_FAULT2 0x00400000 // FAULT2 on PC5 +#define GPIO_PCTL_PC5_CCP3 0x00500000 // CCP3 on PC5 +#define GPIO_PCTL_PC5_USB0EPEN 0x00600000 // USB0EPEN on PC5 +#define GPIO_PCTL_PC5_EPI0S3 0x00800000 // EPI0S3 on PC5 +#define GPIO_PCTL_PC6_M 0x0F000000 // PC6 mask +#define GPIO_PCTL_PC6_CCP3 0x01000000 // CCP3 on PC6 +#define GPIO_PCTL_PC6_PHB0 0x02000000 // PHB0 on PC6 +#define GPIO_PCTL_PC6_C2O 0x03000000 // C2O on PC6 +#define GPIO_PCTL_PC6_PWM7 0x04000000 // PWM7 on PC6 +#define GPIO_PCTL_PC6_U1RX 0x05000000 // U1RX on PC6 +#define GPIO_PCTL_PC6_CCP0 0x06000000 // CCP0 on PC6 +#define GPIO_PCTL_PC6_USB0PFLT 0x07000000 // USB0PFLT on PC6 +#define GPIO_PCTL_PC6_EPI0S4 0x08000000 // EPI0S4 on PC6 +#define GPIO_PCTL_PC7_M 0xF0000000 // PC7 mask +#define GPIO_PCTL_PC7_CCP4 0x10000000 // CCP4 on PC7 +#define GPIO_PCTL_PC7_PHB0 0x20000000 // PHB0 on PC7 +#define GPIO_PCTL_PC7_CCP0 0x40000000 // CCP0 on PC7 +#define GPIO_PCTL_PC7_U1TX 0x50000000 // U1TX on PC7 +#define GPIO_PCTL_PC7_USB0PFLT 0x60000000 // USB0PFLT on PC7 +#define GPIO_PCTL_PC7_C1O 0x70000000 // C1O on PC7 +#define GPIO_PCTL_PC7_EPI0S5 0x80000000 // EPI0S5 on PC7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port D. +// +//***************************************************************************** +#define GPIO_PCTL_PD0_M 0x0000000F // PD0 mask +#define GPIO_PCTL_PD0_PWM0 0x00000001 // PWM0 on PD0 +#define GPIO_PCTL_PD0_CAN0RX 0x00000002 // CAN0RX on PD0 +#define GPIO_PCTL_PD0_IDX0 0x00000003 // IDX0 on PD0 +#define GPIO_PCTL_PD0_U2RX 0x00000004 // U2RX on PD0 +#define GPIO_PCTL_PD0_U1RX 0x00000005 // U1RX on PD0 +#define GPIO_PCTL_PD0_CCP6 0x00000006 // CCP6 on PD0 +#define GPIO_PCTL_PD0_I2S0RXSCK 0x00000008 // I2S0RXSCK on PD0 +#define GPIO_PCTL_PD0_U1CTS 0x00000009 // U1CTS on PD0 +#define GPIO_PCTL_PD1_M 0x000000F0 // PD1 mask +#define GPIO_PCTL_PD1_PWM1 0x00000010 // PWM1 on PD1 +#define GPIO_PCTL_PD1_CAN0TX 0x00000020 // CAN0TX on PD1 +#define GPIO_PCTL_PD1_PHA0 0x00000030 // PHA0 on PD1 +#define GPIO_PCTL_PD1_U2TX 0x00000040 // U2TX on PD1 +#define GPIO_PCTL_PD1_U1TX 0x00000050 // U1TX on PD1 +#define GPIO_PCTL_PD1_CCP7 0x00000060 // CCP7 on PD1 +#define GPIO_PCTL_PD1_I2S0RXWS 0x00000080 // I2S0RXWS on PD1 +#define GPIO_PCTL_PD1_U1DCD 0x00000090 // U1DCD on PD1 +#define GPIO_PCTL_PD1_CCP2 0x000000A0 // CCP2 on PD1 +#define GPIO_PCTL_PD1_PHB1 0x000000B0 // PHB1 on PD1 +#define GPIO_PCTL_PD2_M 0x00000F00 // PD2 mask +#define GPIO_PCTL_PD2_U1RX 0x00000100 // U1RX on PD2 +#define GPIO_PCTL_PD2_CCP6 0x00000200 // CCP6 on PD2 +#define GPIO_PCTL_PD2_PWM2 0x00000300 // PWM2 on PD2 +#define GPIO_PCTL_PD2_CCP5 0x00000400 // CCP5 on PD2 +#define GPIO_PCTL_PD2_EPI0S20 0x00000800 // EPI0S20 on PD2 +#define GPIO_PCTL_PD3_M 0x0000F000 // PD3 mask +#define GPIO_PCTL_PD3_U1TX 0x00001000 // U1TX on PD3 +#define GPIO_PCTL_PD3_CCP7 0x00002000 // CCP7 on PD3 +#define GPIO_PCTL_PD3_PWM3 0x00003000 // PWM3 on PD3 +#define GPIO_PCTL_PD3_CCP0 0x00004000 // CCP0 on PD3 +#define GPIO_PCTL_PD3_EPI0S21 0x00008000 // EPI0S21 on PD3 +#define GPIO_PCTL_PD4_M 0x000F0000 // PD4 mask +#define GPIO_PCTL_PD4_CCP0 0x00010000 // CCP0 on PD4 +#define GPIO_PCTL_PD4_CCP3 0x00020000 // CCP3 on PD4 +#define GPIO_PCTL_PD4_I2S0RXSD 0x00080000 // I2S0RXSD on PD4 +#define GPIO_PCTL_PD4_U1RI 0x00090000 // U1RI on PD4 +#define GPIO_PCTL_PD4_EPI0S19 0x000A0000 // EPI0S19 on PD4 +#define GPIO_PCTL_PD5_M 0x00F00000 // PD5 mask +#define GPIO_PCTL_PD5_CCP2 0x00100000 // CCP2 on PD5 +#define GPIO_PCTL_PD5_CCP4 0x00200000 // CCP4 on PD5 +#define GPIO_PCTL_PD5_I2S0RXMCLK \ + 0x00800000 // I2S0RXMCLK on PD5 +#define GPIO_PCTL_PD5_U2RX 0x00900000 // U2RX on PD5 +#define GPIO_PCTL_PD5_EPI0S28 0x00A00000 // EPI0S28 on PD5 +#define GPIO_PCTL_PD6_M 0x0F000000 // PD6 mask +#define GPIO_PCTL_PD6_FAULT0 0x01000000 // FAULT0 on PD6 +#define GPIO_PCTL_PD6_I2S0TXSCK 0x08000000 // I2S0TXSCK on PD6 +#define GPIO_PCTL_PD6_U2TX 0x09000000 // U2TX on PD6 +#define GPIO_PCTL_PD6_EPI0S29 0x0A000000 // EPI0S29 on PD6 +#define GPIO_PCTL_PD7_M 0xF0000000 // PD7 mask +#define GPIO_PCTL_PD7_IDX0 0x10000000 // IDX0 on PD7 +#define GPIO_PCTL_PD7_C0O 0x20000000 // C0O on PD7 +#define GPIO_PCTL_PD7_CCP1 0x30000000 // CCP1 on PD7 +#define GPIO_PCTL_PD7_I2S0TXWS 0x80000000 // I2S0TXWS on PD7 +#define GPIO_PCTL_PD7_U1DTR 0x90000000 // U1DTR on PD7 +#define GPIO_PCTL_PD7_EPI0S30 0xA0000000 // EPI0S30 on PD7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port E. +// +//***************************************************************************** +#define GPIO_PCTL_PE0_M 0x0000000F // PE0 mask +#define GPIO_PCTL_PE0_PWM4 0x00000001 // PWM4 on PE0 +#define GPIO_PCTL_PE0_SSI1CLK 0x00000002 // SSI1CLK on PE0 +#define GPIO_PCTL_PE0_CCP3 0x00000003 // CCP3 on PE0 +#define GPIO_PCTL_PE0_EPI0S8 0x00000008 // EPI0S8 on PE0 +#define GPIO_PCTL_PE0_USB0PFLT 0x00000009 // USB0PFLT on PE0 +#define GPIO_PCTL_PE1_M 0x000000F0 // PE1 mask +#define GPIO_PCTL_PE1_PWM5 0x00000010 // PWM5 on PE1 +#define GPIO_PCTL_PE1_SSI1FSS 0x00000020 // SSI1FSS on PE1 +#define GPIO_PCTL_PE1_FAULT0 0x00000030 // FAULT0 on PE1 +#define GPIO_PCTL_PE1_CCP2 0x00000040 // CCP2 on PE1 +#define GPIO_PCTL_PE1_CCP6 0x00000050 // CCP6 on PE1 +#define GPIO_PCTL_PE1_EPI0S9 0x00000080 // EPI0S9 on PE1 +#define GPIO_PCTL_PE2_M 0x00000F00 // PE2 mask +#define GPIO_PCTL_PE2_CCP4 0x00000100 // CCP4 on PE2 +#define GPIO_PCTL_PE2_SSI1RX 0x00000200 // SSI1RX on PE2 +#define GPIO_PCTL_PE2_PHB1 0x00000300 // PHB1 on PE2 +#define GPIO_PCTL_PE2_PHA0 0x00000400 // PHA0 on PE2 +#define GPIO_PCTL_PE2_CCP2 0x00000500 // CCP2 on PE2 +#define GPIO_PCTL_PE2_EPI0S24 0x00000800 // EPI0S24 on PE2 +#define GPIO_PCTL_PE3_M 0x0000F000 // PE3 mask +#define GPIO_PCTL_PE3_CCP1 0x00001000 // CCP1 on PE3 +#define GPIO_PCTL_PE3_SSI1TX 0x00002000 // SSI1TX on PE3 +#define GPIO_PCTL_PE3_PHA1 0x00003000 // PHA1 on PE3 +#define GPIO_PCTL_PE3_PHB0 0x00004000 // PHB0 on PE3 +#define GPIO_PCTL_PE3_CCP7 0x00005000 // CCP7 on PE3 +#define GPIO_PCTL_PE3_EPI0S25 0x00008000 // EPI0S25 on PE3 +#define GPIO_PCTL_PE4_M 0x000F0000 // PE4 mask +#define GPIO_PCTL_PE4_CCP3 0x00010000 // CCP3 on PE4 +#define GPIO_PCTL_PE4_FAULT0 0x00040000 // FAULT0 on PE4 +#define GPIO_PCTL_PE4_U2TX 0x00050000 // U2TX on PE4 +#define GPIO_PCTL_PE4_CCP2 0x00060000 // CCP2 on PE4 +#define GPIO_PCTL_PE4_I2S0TXWS 0x00090000 // I2S0TXWS on PE4 +#define GPIO_PCTL_PE5_M 0x00F00000 // PE5 mask +#define GPIO_PCTL_PE5_CCP5 0x00100000 // CCP5 on PE5 +#define GPIO_PCTL_PE5_I2S0TXSD 0x00900000 // I2S0TXSD on PE5 +#define GPIO_PCTL_PE6_M 0x0F000000 // PE6 mask +#define GPIO_PCTL_PE6_PWM4 0x01000000 // PWM4 on PE6 +#define GPIO_PCTL_PE6_C1O 0x02000000 // C1O on PE6 +#define GPIO_PCTL_PE6_U1CTS 0x09000000 // U1CTS on PE6 +#define GPIO_PCTL_PE7_M 0xF0000000 // PE7 mask +#define GPIO_PCTL_PE7_PWM5 0x10000000 // PWM5 on PE7 +#define GPIO_PCTL_PE7_C2O 0x20000000 // C2O on PE7 +#define GPIO_PCTL_PE7_U1DCD 0x90000000 // U1DCD on PE7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port F. +// +//***************************************************************************** +#define GPIO_PCTL_PF0_M 0x0000000F // PF0 mask +#define GPIO_PCTL_PF0_CAN1RX 0x00000001 // CAN1RX on PF0 +#define GPIO_PCTL_PF0_PHB0 0x00000002 // PHB0 on PF0 +#define GPIO_PCTL_PF0_PWM0 0x00000003 // PWM0 on PF0 +#define GPIO_PCTL_PF0_I2S0TXSD 0x00000008 // I2S0TXSD on PF0 +#define GPIO_PCTL_PF0_U1DSR 0x00000009 // U1DSR on PF0 +#define GPIO_PCTL_PF1_M 0x000000F0 // PF1 mask +#define GPIO_PCTL_PF1_CAN1TX 0x00000010 // CAN1TX on PF1 +#define GPIO_PCTL_PF1_IDX1 0x00000020 // IDX1 on PF1 +#define GPIO_PCTL_PF1_PWM1 0x00000030 // PWM1 on PF1 +#define GPIO_PCTL_PF1_I2S0TXMCLK \ + 0x00000080 // I2S0TXMCLK on PF1 +#define GPIO_PCTL_PF1_U1RTS 0x00000090 // U1RTS on PF1 +#define GPIO_PCTL_PF1_CCP3 0x000000A0 // CCP3 on PF1 +#define GPIO_PCTL_PF2_M 0x00000F00 // PF2 mask +#define GPIO_PCTL_PF2_LED1 0x00000100 // LED1 on PF2 +#define GPIO_PCTL_PF2_PWM4 0x00000200 // PWM4 on PF2 +#define GPIO_PCTL_PF2_PWM2 0x00000400 // PWM2 on PF2 +#define GPIO_PCTL_PF2_SSI1CLK 0x00000900 // SSI1CLK on PF2 +#define GPIO_PCTL_PF3_M 0x0000F000 // PF3 mask +#define GPIO_PCTL_PF3_LED0 0x00001000 // LED0 on PF3 +#define GPIO_PCTL_PF3_PWM5 0x00002000 // PWM5 on PF3 +#define GPIO_PCTL_PF3_PWM3 0x00004000 // PWM3 on PF3 +#define GPIO_PCTL_PF3_SSI1FSS 0x00009000 // SSI1FSS on PF3 +#define GPIO_PCTL_PF4_M 0x000F0000 // PF4 mask +#define GPIO_PCTL_PF4_CCP0 0x00010000 // CCP0 on PF4 +#define GPIO_PCTL_PF4_C0O 0x00020000 // C0O on PF4 +#define GPIO_PCTL_PF4_FAULT0 0x00040000 // FAULT0 on PF4 +#define GPIO_PCTL_PF4_EPI0S12 0x00080000 // EPI0S12 on PF4 +#define GPIO_PCTL_PF4_SSI1RX 0x00090000 // SSI1RX on PF4 +#define GPIO_PCTL_PF5_M 0x00F00000 // PF5 mask +#define GPIO_PCTL_PF5_CCP2 0x00100000 // CCP2 on PF5 +#define GPIO_PCTL_PF5_C1O 0x00200000 // C1O on PF5 +#define GPIO_PCTL_PF5_EPI0S15 0x00800000 // EPI0S15 on PF5 +#define GPIO_PCTL_PF5_SSI1TX 0x00900000 // SSI1TX on PF5 +#define GPIO_PCTL_PF6_M 0x0F000000 // PF6 mask +#define GPIO_PCTL_PF6_CCP1 0x01000000 // CCP1 on PF6 +#define GPIO_PCTL_PF6_C2O 0x02000000 // C2O on PF6 +#define GPIO_PCTL_PF6_PHA0 0x04000000 // PHA0 on PF6 +#define GPIO_PCTL_PF6_I2S0TXMCLK \ + 0x09000000 // I2S0TXMCLK on PF6 +#define GPIO_PCTL_PF6_U1RTS 0x0A000000 // U1RTS on PF6 +#define GPIO_PCTL_PF7_M 0xF0000000 // PF7 mask +#define GPIO_PCTL_PF7_CCP4 0x10000000 // CCP4 on PF7 +#define GPIO_PCTL_PF7_PHB0 0x40000000 // PHB0 on PF7 +#define GPIO_PCTL_PF7_EPI0S12 0x80000000 // EPI0S12 on PF7 +#define GPIO_PCTL_PF7_FAULT1 0x90000000 // FAULT1 on PF7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port G. +// +//***************************************************************************** +#define GPIO_PCTL_PG0_M 0x0000000F // PG0 mask +#define GPIO_PCTL_PG0_U2RX 0x00000001 // U2RX on PG0 +#define GPIO_PCTL_PG0_PWM0 0x00000002 // PWM0 on PG0 +#define GPIO_PCTL_PG0_I2C1SCL 0x00000003 // I2C1SCL on PG0 +#define GPIO_PCTL_PG0_PWM4 0x00000004 // PWM4 on PG0 +#define GPIO_PCTL_PG0_USB0EPEN 0x00000007 // USB0EPEN on PG0 +#define GPIO_PCTL_PG0_EPI0S13 0x00000008 // EPI0S13 on PG0 +#define GPIO_PCTL_PG1_M 0x000000F0 // PG1 mask +#define GPIO_PCTL_PG1_U2TX 0x00000010 // U2TX on PG1 +#define GPIO_PCTL_PG1_PWM1 0x00000020 // PWM1 on PG1 +#define GPIO_PCTL_PG1_I2C1SDA 0x00000030 // I2C1SDA on PG1 +#define GPIO_PCTL_PG1_PWM5 0x00000040 // PWM5 on PG1 +#define GPIO_PCTL_PG1_EPI0S14 0x00000080 // EPI0S14 on PG1 +#define GPIO_PCTL_PG2_M 0x00000F00 // PG2 mask +#define GPIO_PCTL_PG2_PWM0 0x00000100 // PWM0 on PG2 +#define GPIO_PCTL_PG2_FAULT0 0x00000400 // FAULT0 on PG2 +#define GPIO_PCTL_PG2_IDX1 0x00000800 // IDX1 on PG2 +#define GPIO_PCTL_PG2_I2S0RXSD 0x00000900 // I2S0RXSD on PG2 +#define GPIO_PCTL_PG3_M 0x0000F000 // PG3 mask +#define GPIO_PCTL_PG3_PWM1 0x00001000 // PWM1 on PG3 +#define GPIO_PCTL_PG3_FAULT2 0x00004000 // FAULT2 on PG3 +#define GPIO_PCTL_PG3_FAULT0 0x00008000 // FAULT0 on PG3 +#define GPIO_PCTL_PG3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PG3 +#define GPIO_PCTL_PG4_M 0x000F0000 // PG4 mask +#define GPIO_PCTL_PG4_CCP3 0x00010000 // CCP3 on PG4 +#define GPIO_PCTL_PG4_FAULT1 0x00040000 // FAULT1 on PG4 +#define GPIO_PCTL_PG4_EPI0S15 0x00080000 // EPI0S15 on PG4 +#define GPIO_PCTL_PG4_PWM6 0x00090000 // PWM6 on PG4 +#define GPIO_PCTL_PG4_U1RI 0x000A0000 // U1RI on PG4 +#define GPIO_PCTL_PG5_M 0x00F00000 // PG5 mask +#define GPIO_PCTL_PG5_CCP5 0x00100000 // CCP5 on PG5 +#define GPIO_PCTL_PG5_IDX0 0x00400000 // IDX0 on PG5 +#define GPIO_PCTL_PG5_FAULT1 0x00500000 // FAULT1 on PG5 +#define GPIO_PCTL_PG5_PWM7 0x00800000 // PWM7 on PG5 +#define GPIO_PCTL_PG5_I2S0RXSCK 0x00900000 // I2S0RXSCK on PG5 +#define GPIO_PCTL_PG5_U1DTR 0x00A00000 // U1DTR on PG5 +#define GPIO_PCTL_PG6_M 0x0F000000 // PG6 mask +#define GPIO_PCTL_PG6_PHA1 0x01000000 // PHA1 on PG6 +#define GPIO_PCTL_PG6_PWM6 0x04000000 // PWM6 on PG6 +#define GPIO_PCTL_PG6_FAULT1 0x08000000 // FAULT1 on PG6 +#define GPIO_PCTL_PG6_I2S0RXWS 0x09000000 // I2S0RXWS on PG6 +#define GPIO_PCTL_PG6_U1RI 0x0A000000 // U1RI on PG6 +#define GPIO_PCTL_PG7_M 0xF0000000 // PG7 mask +#define GPIO_PCTL_PG7_PHB1 0x10000000 // PHB1 on PG7 +#define GPIO_PCTL_PG7_PWM7 0x40000000 // PWM7 on PG7 +#define GPIO_PCTL_PG7_CCP5 0x80000000 // CCP5 on PG7 +#define GPIO_PCTL_PG7_EPI0S31 0x90000000 // EPI0S31 on PG7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port H. +// +//***************************************************************************** +#define GPIO_PCTL_PH0_M 0x0000000F // PH0 mask +#define GPIO_PCTL_PH0_CCP6 0x00000001 // CCP6 on PH0 +#define GPIO_PCTL_PH0_PWM2 0x00000002 // PWM2 on PH0 +#define GPIO_PCTL_PH0_EPI0S6 0x00000008 // EPI0S6 on PH0 +#define GPIO_PCTL_PH0_PWM4 0x00000009 // PWM4 on PH0 +#define GPIO_PCTL_PH1_M 0x000000F0 // PH1 mask +#define GPIO_PCTL_PH1_CCP7 0x00000010 // CCP7 on PH1 +#define GPIO_PCTL_PH1_PWM3 0x00000020 // PWM3 on PH1 +#define GPIO_PCTL_PH1_EPI0S7 0x00000080 // EPI0S7 on PH1 +#define GPIO_PCTL_PH1_PWM5 0x00000090 // PWM5 on PH1 +#define GPIO_PCTL_PH2_M 0x00000F00 // PH2 mask +#define GPIO_PCTL_PH2_IDX1 0x00000100 // IDX1 on PH2 +#define GPIO_PCTL_PH2_C1O 0x00000200 // C1O on PH2 +#define GPIO_PCTL_PH2_FAULT3 0x00000400 // FAULT3 on PH2 +#define GPIO_PCTL_PH2_EPI0S1 0x00000800 // EPI0S1 on PH2 +#define GPIO_PCTL_PH3_M 0x0000F000 // PH3 mask +#define GPIO_PCTL_PH3_PHB0 0x00001000 // PHB0 on PH3 +#define GPIO_PCTL_PH3_FAULT0 0x00002000 // FAULT0 on PH3 +#define GPIO_PCTL_PH3_USB0EPEN 0x00004000 // USB0EPEN on PH3 +#define GPIO_PCTL_PH3_EPI0S0 0x00008000 // EPI0S0 on PH3 +#define GPIO_PCTL_PH4_M 0x000F0000 // PH4 mask +#define GPIO_PCTL_PH4_USB0PFLT 0x00040000 // USB0PFLT on PH4 +#define GPIO_PCTL_PH4_EPI0S10 0x00080000 // EPI0S10 on PH4 +#define GPIO_PCTL_PH4_SSI1CLK 0x000B0000 // SSI1CLK on PH4 +#define GPIO_PCTL_PH5_M 0x00F00000 // PH5 mask +#define GPIO_PCTL_PH5_EPI0S11 0x00800000 // EPI0S11 on PH5 +#define GPIO_PCTL_PH5_FAULT2 0x00A00000 // FAULT2 on PH5 +#define GPIO_PCTL_PH5_SSI1FSS 0x00B00000 // SSI1FSS on PH5 +#define GPIO_PCTL_PH6_M 0x0F000000 // PH6 mask +#define GPIO_PCTL_PH6_EPI0S26 0x08000000 // EPI0S26 on PH6 +#define GPIO_PCTL_PH6_PWM4 0x0A000000 // PWM4 on PH6 +#define GPIO_PCTL_PH6_SSI1RX 0x0B000000 // SSI1RX on PH6 +#define GPIO_PCTL_PH7_M 0xF0000000 // PH7 mask +#define GPIO_PCTL_PH7_EPI0S27 0x80000000 // EPI0S27 on PH7 +#define GPIO_PCTL_PH7_PWM5 0xA0000000 // PWM5 on PH7 +#define GPIO_PCTL_PH7_SSI1TX 0xB0000000 // SSI1TX on PH7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port J. +// +//***************************************************************************** +#define GPIO_PCTL_PJ0_M 0x0000000F // PJ0 mask +#define GPIO_PCTL_PJ0_EPI0S16 0x00000008 // EPI0S16 on PJ0 +#define GPIO_PCTL_PJ0_PWM0 0x0000000A // PWM0 on PJ0 +#define GPIO_PCTL_PJ0_I2C1SCL 0x0000000B // I2C1SCL on PJ0 +#define GPIO_PCTL_PJ1_M 0x000000F0 // PJ1 mask +#define GPIO_PCTL_PJ1_EPI0S17 0x00000080 // EPI0S17 on PJ1 +#define GPIO_PCTL_PJ1_USB0PFLT 0x00000090 // USB0PFLT on PJ1 +#define GPIO_PCTL_PJ1_PWM1 0x000000A0 // PWM1 on PJ1 +#define GPIO_PCTL_PJ1_I2C1SDA 0x000000B0 // I2C1SDA on PJ1 +#define GPIO_PCTL_PJ2_M 0x00000F00 // PJ2 mask +#define GPIO_PCTL_PJ2_EPI0S18 0x00000800 // EPI0S18 on PJ2 +#define GPIO_PCTL_PJ2_CCP0 0x00000900 // CCP0 on PJ2 +#define GPIO_PCTL_PJ2_FAULT0 0x00000A00 // FAULT0 on PJ2 +#define GPIO_PCTL_PJ3_M 0x0000F000 // PJ3 mask +#define GPIO_PCTL_PJ3_EPI0S19 0x00008000 // EPI0S19 on PJ3 +#define GPIO_PCTL_PJ3_U1CTS 0x00009000 // U1CTS on PJ3 +#define GPIO_PCTL_PJ3_CCP6 0x0000A000 // CCP6 on PJ3 +#define GPIO_PCTL_PJ4_M 0x000F0000 // PJ4 mask +#define GPIO_PCTL_PJ4_EPI0S28 0x00080000 // EPI0S28 on PJ4 +#define GPIO_PCTL_PJ4_U1DCD 0x00090000 // U1DCD on PJ4 +#define GPIO_PCTL_PJ4_CCP4 0x000A0000 // CCP4 on PJ4 +#define GPIO_PCTL_PJ5_M 0x00F00000 // PJ5 mask +#define GPIO_PCTL_PJ5_EPI0S29 0x00800000 // EPI0S29 on PJ5 +#define GPIO_PCTL_PJ5_U1DSR 0x00900000 // U1DSR on PJ5 +#define GPIO_PCTL_PJ5_CCP2 0x00A00000 // CCP2 on PJ5 +#define GPIO_PCTL_PJ6_M 0x0F000000 // PJ6 mask +#define GPIO_PCTL_PJ6_EPI0S30 0x08000000 // EPI0S30 on PJ6 +#define GPIO_PCTL_PJ6_U1RTS 0x09000000 // U1RTS on PJ6 +#define GPIO_PCTL_PJ6_CCP1 0x0A000000 // CCP1 on PJ6 +#define GPIO_PCTL_PJ7_M 0xF0000000 // PJ7 mask +#define GPIO_PCTL_PJ7_U1DTR 0x90000000 // U1DTR on PJ7 +#define GPIO_PCTL_PJ7_CCP0 0xA0000000 // CCP0 on PJ7 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_PeriphID4 0x00000FD0 +#define GPIO_O_PeriphID5 0x00000FD4 +#define GPIO_O_PeriphID6 0x00000FD8 +#define GPIO_O_PeriphID7 0x00000FDC +#define GPIO_O_PeriphID0 0x00000FE0 +#define GPIO_O_PeriphID1 0x00000FE4 +#define GPIO_O_PeriphID2 0x00000FE8 +#define GPIO_O_PeriphID3 0x00000FEC +#define GPIO_O_PCellID0 0x00000FF0 +#define GPIO_O_PCellID1 0x00000FF4 +#define GPIO_O_PCellID2 0x00000FF8 +#define GPIO_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO Register reset values. +// +//***************************************************************************** +#define GPIO_RV_DEN 0x000000FF // Digital input enable reg RV +#define GPIO_RV_PUR 0x000000FF // Pull up select reg RV +#define GPIO_RV_DR2R 0x000000FF // 2ma drive select reg RV +#define GPIO_RV_PCellID1 0x000000F0 +#define GPIO_RV_PCellID3 0x000000B1 +#define GPIO_RV_PeriphID0 0x00000061 +#define GPIO_RV_PeriphID1 0x00000010 +#define GPIO_RV_PCellID0 0x0000000D +#define GPIO_RV_PCellID2 0x00000005 +#define GPIO_RV_PeriphID2 0x00000004 +#define GPIO_RV_LOCK 0x00000001 // Lock register RV +#define GPIO_RV_PeriphID7 0x00000000 +#define GPIO_RV_PDR 0x00000000 // Pull down select reg RV +#define GPIO_RV_IC 0x00000000 // Interrupt clear reg RV +#define GPIO_RV_SLR 0x00000000 // Slew rate control enable reg RV +#define GPIO_RV_ODR 0x00000000 // Open drain select reg RV +#define GPIO_RV_IBE 0x00000000 // Interrupt both edges reg RV +#define GPIO_RV_AFSEL 0x00000000 // Mode control select reg RV +#define GPIO_RV_IS 0x00000000 // Interrupt sense reg RV +#define GPIO_RV_IM 0x00000000 // Interrupt mask reg RV +#define GPIO_RV_PeriphID4 0x00000000 +#define GPIO_RV_PeriphID5 0x00000000 +#define GPIO_RV_DR8R 0x00000000 // 8ma drive select reg RV +#define GPIO_RV_RIS 0x00000000 // Raw interrupt status reg RV +#define GPIO_RV_DR4R 0x00000000 // 4ma drive select reg RV +#define GPIO_RV_IEV 0x00000000 // Intterupt event reg RV +#define GPIO_RV_DIR 0x00000000 // Data direction reg RV +#define GPIO_RV_PeriphID6 0x00000000 +#define GPIO_RV_PeriphID3 0x00000000 +#define GPIO_RV_DATA 0x00000000 // Data register reset value +#define GPIO_RV_MIS 0x00000000 // Masked interrupt status reg RV + +#endif + +#endif // __HW_GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_hibernate.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_hibernate.h new file mode 100644 index 00000000..5c286da2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_hibernate.h @@ -0,0 +1,242 @@ +//***************************************************************************** +// +// hw_hibernate.h - Defines and Macros for the Hibernation module. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_HIBERNATE_H__ +#define __HW_HIBERNATE_H__ + +//***************************************************************************** +// +// The following are defines for the Hibernation module register addresses. +// +//***************************************************************************** +#define HIB_RTCC 0x400FC000 // Hibernation RTC Counter +#define HIB_RTCM0 0x400FC004 // Hibernation RTC Match 0 +#define HIB_RTCM1 0x400FC008 // Hibernation RTC Match 1 +#define HIB_RTCLD 0x400FC00C // Hibernation RTC Load +#define HIB_CTL 0x400FC010 // Hibernation Control +#define HIB_IM 0x400FC014 // Hibernation Interrupt Mask +#define HIB_RIS 0x400FC018 // Hibernation Raw Interrupt Status +#define HIB_MIS 0x400FC01C // Hibernation Masked Interrupt + // Status +#define HIB_IC 0x400FC020 // Hibernation Interrupt Clear +#define HIB_RTCT 0x400FC024 // Hibernation RTC Trim +#define HIB_DATA 0x400FC030 // Hibernation Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCC register. +// +//***************************************************************************** +#define HIB_RTCC_M 0xFFFFFFFF // RTC Counter +#define HIB_RTCC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM0 register. +// +//***************************************************************************** +#define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0 +#define HIB_RTCM0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM1 register. +// +//***************************************************************************** +#define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1 +#define HIB_RTCM1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCLD register. +// +//***************************************************************************** +#define HIB_RTCLD_M 0xFFFFFFFF // RTC Load +#define HIB_RTCLD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_CTL register. +// +//***************************************************************************** +#define HIB_CTL_WRC 0x80000000 // Write Complete/Capable +#define HIB_CTL_VDD3ON 0x00000100 // VDD Powered +#define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable +#define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable +#define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable +#define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable +#define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable +#define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select +#define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request +#define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IM register. +// +//***************************************************************************** +#define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask +#define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt + // Mask +#define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask +#define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RIS register. +// +//***************************************************************************** +#define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt + // Status +#define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw + // Interrupt Status +#define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status +#define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_MIS register. +// +//***************************************************************************** +#define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Status +#define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Status +#define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt + // Status +#define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IC register. +// +//***************************************************************************** +#define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Clear +#define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Clear +#define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt + // Clear +#define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCT register. +// +//***************************************************************************** +#define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value +#define HIB_RTCT_TRIM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_DATA register. +// +//***************************************************************************** +#define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data +#define HIB_DATA_RTD_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Hibernation module register +// addresses. +// +//***************************************************************************** +#define HIB_DATA_END 0x400FC130 // end of data area, exclusive + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCC +// register. +// +//***************************************************************************** +#define HIB_RTCC_MASK 0xFFFFFFFF // RTC counter mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCM0 +// register. +// +//***************************************************************************** +#define HIB_RTCM0_MASK 0xFFFFFFFF // RTC match 0 mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCM1 +// register. +// +//***************************************************************************** +#define HIB_RTCM1_MASK 0xFFFFFFFF // RTC match 1 mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCLD +// register. +// +//***************************************************************************** +#define HIB_RTCLD_MASK 0xFFFFFFFF // RTC load mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RIS +// register. +// +//***************************************************************************** +#define HIB_RID_RTCALT0 0x00000001 // RTC match 0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_MIS +// register. +// +//***************************************************************************** +#define HIB_MID_RTCALT0 0x00000001 // RTC match 0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCT +// register. +// +//***************************************************************************** +#define HIB_RTCT_MASK 0x0000FFFF // RTC trim mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_DATA +// register. +// +//***************************************************************************** +#define HIB_DATA_MASK 0xFFFFFFFF // NV memory data mask + +#endif + +#endif // __HW_HIBERNATE_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2c.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2c.h new file mode 100644 index 00000000..e956d376 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2c.h @@ -0,0 +1,407 @@ +//***************************************************************************** +// +// hw_i2c.h - Macros used when accessing the I2C master and slave hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_I2C_H__ +#define __HW_I2C_H__ + +//***************************************************************************** +// +// The following are defines for the I2C register offsets. +// +//***************************************************************************** +#define I2C_O_MSA 0x00000000 // I2C Master Slave Address +#define I2C_O_SOAR 0x00000000 // I2C Slave Own Address +#define I2C_O_SCSR 0x00000004 // I2C Slave Control/Status +#define I2C_O_MCS 0x00000004 // I2C Master Control/Status +#define I2C_O_SDR 0x00000008 // I2C Slave Data +#define I2C_O_MDR 0x00000008 // I2C Master Data +#define I2C_O_MTPR 0x0000000C // I2C Master Timer Period +#define I2C_O_SIMR 0x0000000C // I2C Slave Interrupt Mask +#define I2C_O_SRIS 0x00000010 // I2C Slave Raw Interrupt Status +#define I2C_O_MIMR 0x00000010 // I2C Master Interrupt Mask +#define I2C_O_MRIS 0x00000014 // I2C Master Raw Interrupt Status +#define I2C_O_SMIS 0x00000014 // I2C Slave Masked Interrupt + // Status +#define I2C_O_SICR 0x00000018 // I2C Slave Interrupt Clear +#define I2C_O_MMIS 0x00000018 // I2C Master Masked Interrupt + // Status +#define I2C_O_MICR 0x0000001C // I2C Master Interrupt Clear +#define I2C_O_MCR 0x00000020 // I2C Master Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MSA register. +// +//***************************************************************************** +#define I2C_MSA_SA_M 0x000000FE // I2C Slave Address +#define I2C_MSA_RS 0x00000001 // Receive not send +#define I2C_MSA_SA_S 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SOAR register. +// +//***************************************************************************** +#define I2C_SOAR_OAR_M 0x0000007F // I2C Slave Own Address +#define I2C_SOAR_OAR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SCSR register. +// +//***************************************************************************** +#define I2C_SCSR_FBR 0x00000004 // First Byte Received +#define I2C_SCSR_TREQ 0x00000002 // Transmit Request +#define I2C_SCSR_DA 0x00000001 // Device Active +#define I2C_SCSR_RREQ 0x00000001 // Receive Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCS register. +// +//***************************************************************************** +#define I2C_MCS_BUSBSY 0x00000040 // Bus Busy +#define I2C_MCS_IDLE 0x00000020 // I2C Idle +#define I2C_MCS_ARBLST 0x00000010 // Arbitration Lost +#define I2C_MCS_ACK 0x00000008 // Data Acknowledge Enable +#define I2C_MCS_DATACK 0x00000008 // Acknowledge Data +#define I2C_MCS_ADRACK 0x00000004 // Acknowledge Address +#define I2C_MCS_STOP 0x00000004 // Generate STOP +#define I2C_MCS_START 0x00000002 // Generate START +#define I2C_MCS_ERROR 0x00000002 // Error +#define I2C_MCS_RUN 0x00000001 // I2C Master Enable +#define I2C_MCS_BUSY 0x00000001 // I2C Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SDR register. +// +//***************************************************************************** +#define I2C_SDR_DATA_M 0x000000FF // Data for Transfer +#define I2C_SDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MDR register. +// +//***************************************************************************** +#define I2C_MDR_DATA_M 0x000000FF // Data Transferred +#define I2C_MDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MTPR register. +// +//***************************************************************************** +#define I2C_MTPR_TPR_M 0x0000007F // SCL Clock Period +#define I2C_MTPR_TPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_STOPIM 0x00000004 // Stop Condition Interrupt Mask +#define I2C_SIMR_STARTIM 0x00000002 // Start Condition Interrupt Mask +#define I2C_SIMR_DATAIM 0x00000001 // Data Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_STOPRIS 0x00000004 // Stop Condition Raw Interrupt + // Status +#define I2C_SRIS_STARTRIS 0x00000002 // Start Condition Raw Interrupt + // Status +#define I2C_SRIS_DATARIS 0x00000001 // Data Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MIMR register. +// +//***************************************************************************** +#define I2C_MIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MRIS register. +// +//***************************************************************************** +#define I2C_MRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_STOPMIS 0x00000004 // Stop Condition Masked Interrupt + // Status +#define I2C_SMIS_STARTMIS 0x00000002 // Start Condition Masked Interrupt + // Status +#define I2C_SMIS_DATAMIS 0x00000001 // Data Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_STOPIC 0x00000004 // Stop Condition Interrupt Clear +#define I2C_SICR_STARTIC 0x00000002 // Start Condition Interrupt Clear +#define I2C_SICR_DATAIC 0x00000001 // Data Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MMIS register. +// +//***************************************************************************** +#define I2C_MMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MICR register. +// +//***************************************************************************** +#define I2C_MICR_IC 0x00000001 // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCR register. +// +//***************************************************************************** +#define I2C_MCR_SFE 0x00000020 // I2C Slave Function Enable +#define I2C_MCR_MFE 0x00000010 // I2C Master Function Enable +#define I2C_MCR_LPBK 0x00000001 // I2C Loopback + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the I2C register offsets. +// +//***************************************************************************** +#define I2C_O_SLAVE 0x00000800 // Offset from master to slave + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SIMR +// register. +// +//***************************************************************************** +#define I2C_SIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SRIS +// register. +// +//***************************************************************************** +#define I2C_SRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SMIS +// register. +// +//***************************************************************************** +#define I2C_SMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SICR +// register. +// +//***************************************************************************** +#define I2C_SICR_IC 0x00000001 // Clear Interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the I2C master register offsets. +// +//***************************************************************************** +#define I2C_MASTER_O_SA 0x00000000 // Slave address register +#define I2C_MASTER_O_CS 0x00000004 // Control and Status register +#define I2C_MASTER_O_DR 0x00000008 // Data register +#define I2C_MASTER_O_TPR 0x0000000C // Timer period register +#define I2C_MASTER_O_IMR 0x00000010 // Interrupt mask register +#define I2C_MASTER_O_RIS 0x00000014 // Raw interrupt status register +#define I2C_MASTER_O_MIS 0x00000018 // Masked interrupt status reg +#define I2C_MASTER_O_MICR 0x0000001C // Interrupt clear register +#define I2C_MASTER_O_CR 0x00000020 // Configuration register + +//***************************************************************************** +// +// The following are deprecated defines for the I2C slave register offsets. +// +//***************************************************************************** +#define I2C_SLAVE_O_SICR 0x00000018 // Interrupt clear register +#define I2C_SLAVE_O_MIS 0x00000014 // Masked interrupt status reg +#define I2C_SLAVE_O_RIS 0x00000010 // Raw interrupt status register +#define I2C_SLAVE_O_IM 0x0000000C // Interrupt mask register +#define I2C_SLAVE_O_DR 0x00000008 // Data register +#define I2C_SLAVE_O_CSR 0x00000004 // Control/Status register +#define I2C_SLAVE_O_OAR 0x00000000 // Own address register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C master +// slave address register. +// +//***************************************************************************** +#define I2C_MASTER_SA_SA_MASK 0x000000FE // Slave address +#define I2C_MASTER_SA_RS 0x00000001 // Receive/send +#define I2C_MASTER_SA_SA_SHIFT 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Control and Status register. +// +//***************************************************************************** +#define I2C_MASTER_CS_BUS_BUSY 0x00000040 // Bus busy +#define I2C_MASTER_CS_IDLE 0x00000020 // Idle +#define I2C_MASTER_CS_ERR_MASK 0x0000001C +#define I2C_MASTER_CS_BUSY 0x00000001 // Controller is TX/RX data +#define I2C_MASTER_CS_ERROR 0x00000002 // Error occurred +#define I2C_MASTER_CS_ADDR_ACK 0x00000004 // Address byte not acknowledged +#define I2C_MASTER_CS_DATA_ACK 0x00000008 // Data byte not acknowledged +#define I2C_MASTER_CS_ARB_LOST 0x00000010 // Lost arbitration +#define I2C_MASTER_CS_ACK 0x00000008 // Acknowlegde +#define I2C_MASTER_CS_STOP 0x00000004 // Stop +#define I2C_MASTER_CS_START 0x00000002 // Start +#define I2C_MASTER_CS_RUN 0x00000001 // Run + +//***************************************************************************** +// +// The following are deprecated defines for the values used in determining the +// contents of the I2C Master Timer Period register. +// +//***************************************************************************** +#define I2C_SCL_FAST 400000 // SCL fast frequency +#define I2C_SCL_STANDARD 100000 // SCL standard frequency +#define I2C_MASTER_TPR_SCL_LP 0x00000006 // SCL low period +#define I2C_MASTER_TPR_SCL_HP 0x00000004 // SCL high period +#define I2C_MASTER_TPR_SCL (I2C_MASTER_TPR_SCL_HP + I2C_MASTER_TPR_SCL_LP) + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Interrupt Mask register. +// +//***************************************************************************** +#define I2C_MASTER_IMR_IM 0x00000001 // Master interrupt mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Raw Interrupt Status register. +// +//***************************************************************************** +#define I2C_MASTER_RIS_RIS 0x00000001 // Master raw interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Masked Interrupt Status register. +// +//***************************************************************************** +#define I2C_MASTER_MIS_MIS 0x00000001 // Master masked interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Interrupt Clear register. +// +//***************************************************************************** +#define I2C_MASTER_MICR_IC 0x00000001 // Master interrupt clear + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Configuration register. +// +//***************************************************************************** +#define I2C_MASTER_CR_SFE 0x00000020 // Slave function enable +#define I2C_MASTER_CR_MFE 0x00000010 // Master function enable +#define I2C_MASTER_CR_LPBK 0x00000001 // Loopback enable + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave Own +// Address register. +// +//***************************************************************************** +#define I2C_SLAVE_SOAR_OAR_MASK 0x0000007F // Slave address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Control/Status register. +// +//***************************************************************************** +#define I2C_SLAVE_CSR_FBR 0x00000004 // First byte received from master +#define I2C_SLAVE_CSR_TREQ 0x00000002 // Transmit request received +#define I2C_SLAVE_CSR_DA 0x00000001 // Enable the device +#define I2C_SLAVE_CSR_RREQ 0x00000001 // Receive data from I2C master + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Interrupt Mask register. +// +//***************************************************************************** +#define I2C_SLAVE_IMR_IM 0x00000001 // Slave interrupt mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave Raw +// Interrupt Status register. +// +//***************************************************************************** +#define I2C_SLAVE_RIS_RIS 0x00000001 // Slave raw interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Masked Interrupt Status register. +// +//***************************************************************************** +#define I2C_SLAVE_MIS_MIS 0x00000001 // Slave masked interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Interrupt Clear register. +// +//***************************************************************************** +#define I2C_SLAVE_SICR_IC 0x00000001 // Slave interrupt clear + +#endif + +#endif // __HW_I2C_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2s.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2s.h new file mode 100644 index 00000000..f02ce94c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_i2s.h @@ -0,0 +1,224 @@ +//***************************************************************************** +// +// hw_i2s.h - Macros for use in accessing the I2S registers. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_I2S_H__ +#define __HW_I2S_H__ + +//***************************************************************************** +// +// The following are defines for the Inter-Integrated Circuit Sound register +// offsets. +// +//***************************************************************************** +#define I2S_O_TXFIFO 0x00000000 // I2S Transmit FIFO Data +#define I2S_O_TXFIFOCFG 0x00000004 // I2S Transmit FIFO Configuration +#define I2S_O_TXCFG 0x00000008 // I2S Transmit Module + // Configuration +#define I2S_O_TXLIMIT 0x0000000C // I2S Transmit FIFO Limit +#define I2S_O_TXISM 0x00000010 // I2S Transmit Interrupt Status + // and Mask +#define I2S_O_TXLEV 0x00000018 // I2S Transmit FIFO Level +#define I2S_O_RXFIFO 0x00000800 // I2S Receive FIFO Data +#define I2S_O_RXFIFOCFG 0x00000804 // I2S Receive FIFO Configuration +#define I2S_O_RXCFG 0x00000808 // I2S Receive Module Configuration +#define I2S_O_RXLIMIT 0x0000080C // I2S Receive FIFO Limit +#define I2S_O_RXISM 0x00000810 // I2S Receive Interrupt Status and + // Mask +#define I2S_O_RXLEV 0x00000818 // I2S Receive FIFO Level +#define I2S_O_CFG 0x00000C00 // I2S Module Configuration +#define I2S_O_IM 0x00000C10 // I2S Interrupt Mask +#define I2S_O_RIS 0x00000C14 // I2S Raw Interrupt Status +#define I2S_O_MIS 0x00000C18 // I2S Masked Interrupt Status +#define I2S_O_IC 0x00000C1C // I2S Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXFIFO register. +// +//***************************************************************************** +#define I2S_TXFIFO_M 0xFFFFFFFF // TX Data +#define I2S_TXFIFO_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXFIFOCFG +// register. +// +//***************************************************************************** +#define I2S_TXFIFOCFG_CSS 0x00000002 // Compact Stereo Sample Size +#define I2S_TXFIFOCFG_LRS 0x00000001 // Left-Right Sample Indicator + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXCFG register. +// +//***************************************************************************** +#define I2S_TXCFG_JST 0x20000000 // Justification of Output Data +#define I2S_TXCFG_DLY 0x10000000 // Data Delay +#define I2S_TXCFG_SCP 0x08000000 // SCLK Polarity +#define I2S_TXCFG_LRP 0x04000000 // Left/Right Clock Polarity +#define I2S_TXCFG_WM_M 0x03000000 // Write Mode +#define I2S_TXCFG_WM_DUAL 0x00000000 // Stereo mode +#define I2S_TXCFG_WM_COMPACT 0x01000000 // Compact Stereo mode +#define I2S_TXCFG_WM_MONO 0x02000000 // Mono mode +#define I2S_TXCFG_FMT 0x00800000 // FIFO Empty +#define I2S_TXCFG_MSL 0x00400000 // SCLK Master/Slave +#define I2S_TXCFG_SSZ_M 0x0000FC00 // Sample Size +#define I2S_TXCFG_SDSZ_M 0x000003F0 // System Data Size +#define I2S_TXCFG_SSZ_S 10 +#define I2S_TXCFG_SDSZ_S 4 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXLIMIT register. +// +//***************************************************************************** +#define I2S_TXLIMIT_LIMIT_M 0x0000001F // FIFO Limit +#define I2S_TXLIMIT_LIMIT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXISM register. +// +//***************************************************************************** +#define I2S_TXISM_FFI 0x00010000 // Transmit FIFO Service Request + // Interrupt +#define I2S_TXISM_FFM 0x00000001 // FIFO Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXLEV register. +// +//***************************************************************************** +#define I2S_TXLEV_LEVEL_M 0x0000001F // Number of Audio Samples +#define I2S_TXLEV_LEVEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXFIFO register. +// +//***************************************************************************** +#define I2S_RXFIFO_M 0xFFFFFFFF // RX Data +#define I2S_RXFIFO_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXFIFOCFG +// register. +// +//***************************************************************************** +#define I2S_RXFIFOCFG_FMM 0x00000004 // FIFO Mono Mode +#define I2S_RXFIFOCFG_CSS 0x00000002 // Compact Stereo Sample Size +#define I2S_RXFIFOCFG_LRS 0x00000001 // Left-Right Sample Indicator + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXCFG register. +// +//***************************************************************************** +#define I2S_RXCFG_JST 0x20000000 // Justification of Input Data +#define I2S_RXCFG_DLY 0x10000000 // Data Delay +#define I2S_RXCFG_SCP 0x08000000 // SCLK Polarity +#define I2S_RXCFG_LRP 0x04000000 // Left/Right Clock Polarity +#define I2S_RXCFG_RM 0x01000000 // Read Mode +#define I2S_RXCFG_MSL 0x00400000 // SCLK Master/Slave +#define I2S_RXCFG_SSZ_M 0x0000FC00 // Sample Size +#define I2S_RXCFG_SDSZ_M 0x000003F0 // System Data Size +#define I2S_RXCFG_SSZ_S 10 +#define I2S_RXCFG_SDSZ_S 4 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXLIMIT register. +// +//***************************************************************************** +#define I2S_RXLIMIT_LIMIT_M 0x0000001F // FIFO Limit +#define I2S_RXLIMIT_LIMIT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXISM register. +// +//***************************************************************************** +#define I2S_RXISM_FFI 0x00010000 // Receive FIFO Service Request + // Interrupt +#define I2S_RXISM_FFM 0x00000001 // FIFO Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXLEV register. +// +//***************************************************************************** +#define I2S_RXLEV_LEVEL_M 0x0000001F // Number of Audio Samples +#define I2S_RXLEV_LEVEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_CFG register. +// +//***************************************************************************** +#define I2S_CFG_RXSLV 0x00000020 // Use External I2S0RXMCLK +#define I2S_CFG_TXSLV 0x00000010 // Use External I2S0TXMCLK +#define I2S_CFG_RXEN 0x00000002 // Serial Receive Engine Enable +#define I2S_CFG_TXEN 0x00000001 // Serial Transmit Engine Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_IM register. +// +//***************************************************************************** +#define I2S_IM_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_IM_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_IM_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_IM_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RIS register. +// +//***************************************************************************** +#define I2S_RIS_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_RIS_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_RIS_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_RIS_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_MIS register. +// +//***************************************************************************** +#define I2S_MIS_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_MIS_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_MIS_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_MIS_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_IC register. +// +//***************************************************************************** +#define I2S_IC_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_IC_TXWE 0x00000002 // Transmit FIFO Write Error + +#endif // __HW_I2S_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ints.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ints.h new file mode 100644 index 00000000..1eb1e34e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ints.h @@ -0,0 +1,141 @@ +//***************************************************************************** +// +// hw_ints.h - Macros that define the interrupt assignment on Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_INTS_H__ +#define __HW_INTS_H__ + +//***************************************************************************** +// +// The following are defines for the fault assignments. +// +//***************************************************************************** +#define FAULT_NMI 2 // NMI fault +#define FAULT_HARD 3 // Hard fault +#define FAULT_MPU 4 // MPU fault +#define FAULT_BUS 5 // Bus fault +#define FAULT_USAGE 6 // Usage fault +#define FAULT_SVCALL 11 // SVCall +#define FAULT_DEBUG 12 // Debug monitor +#define FAULT_PENDSV 14 // PendSV +#define FAULT_SYSTICK 15 // System Tick + +//***************************************************************************** +// +// The following are defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_GPIOA 16 // GPIO Port A +#define INT_GPIOB 17 // GPIO Port B +#define INT_GPIOC 18 // GPIO Port C +#define INT_GPIOD 19 // GPIO Port D +#define INT_GPIOE 20 // GPIO Port E +#define INT_UART0 21 // UART0 Rx and Tx +#define INT_UART1 22 // UART1 Rx and Tx +#define INT_SSI0 23 // SSI0 Rx and Tx +#define INT_I2C0 24 // I2C0 Master and Slave +#define INT_PWM_FAULT 25 // PWM Fault +#define INT_PWM0 26 // PWM Generator 0 +#define INT_PWM1 27 // PWM Generator 1 +#define INT_PWM2 28 // PWM Generator 2 +#define INT_QEI0 29 // Quadrature Encoder 0 +#define INT_ADC0SS0 30 // ADC0 Sequence 0 +#define INT_ADC0SS1 31 // ADC0 Sequence 1 +#define INT_ADC0SS2 32 // ADC0 Sequence 2 +#define INT_ADC0SS3 33 // ADC0 Sequence 3 +#define INT_WATCHDOG 34 // Watchdog timer +#define INT_TIMER0A 35 // Timer 0 subtimer A +#define INT_TIMER0B 36 // Timer 0 subtimer B +#define INT_TIMER1A 37 // Timer 1 subtimer A +#define INT_TIMER1B 38 // Timer 1 subtimer B +#define INT_TIMER2A 39 // Timer 2 subtimer A +#define INT_TIMER2B 40 // Timer 2 subtimer B +#define INT_COMP0 41 // Analog Comparator 0 +#define INT_COMP1 42 // Analog Comparator 1 +#define INT_COMP2 43 // Analog Comparator 2 +#define INT_SYSCTL 44 // System Control (PLL, OSC, BO) +#define INT_FLASH 45 // FLASH Control +#define INT_GPIOF 46 // GPIO Port F +#define INT_GPIOG 47 // GPIO Port G +#define INT_GPIOH 48 // GPIO Port H +#define INT_UART2 49 // UART2 Rx and Tx +#define INT_SSI1 50 // SSI1 Rx and Tx +#define INT_TIMER3A 51 // Timer 3 subtimer A +#define INT_TIMER3B 52 // Timer 3 subtimer B +#define INT_I2C1 53 // I2C1 Master and Slave +#define INT_QEI1 54 // Quadrature Encoder 1 +#define INT_CAN0 55 // CAN0 +#define INT_CAN1 56 // CAN1 +#define INT_CAN2 57 // CAN2 +#define INT_ETH 58 // Ethernet +#define INT_HIBERNATE 59 // Hibernation module +#define INT_USB0 60 // USB 0 Controller +#define INT_PWM3 61 // PWM Generator 3 +#define INT_UDMA 62 // uDMA controller +#define INT_UDMAERR 63 // uDMA Error +#define INT_ADC1SS0 64 // ADC1 Sequence 0 +#define INT_ADC1SS1 65 // ADC1 Sequence 1 +#define INT_ADC1SS2 66 // ADC1 Sequence 2 +#define INT_ADC1SS3 67 // ADC1 Sequence 3 +#define INT_I2S0 68 // I2S0 +#define INT_EPI0 69 // EPI0 +#define INT_GPIOJ 70 // GPIO Port J + +//***************************************************************************** +// +// The following are defines for the total number of interrupts. +// +//***************************************************************************** +#define NUM_INTERRUPTS 71 + +//***************************************************************************** +// +// The following are defines for the total number of priority levels. +// +//***************************************************************************** +#define NUM_PRIORITY 8 +#define NUM_PRIORITY_BITS 3 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_SSI 23 // SSI Rx and Tx +#define INT_I2C 24 // I2C Master and Slave +#define INT_QEI 29 // Quadrature Encoder +#define INT_ADC0 30 // ADC Sequence 0 +#define INT_ADC1 31 // ADC Sequence 1 +#define INT_ADC2 32 // ADC Sequence 2 +#define INT_ADC3 33 // ADC Sequence 3 + +#endif + +#endif // __HW_INTS_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_memmap.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_memmap.h new file mode 100644 index 00000000..144f9d25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_memmap.h @@ -0,0 +1,115 @@ +//***************************************************************************** +// +// hw_memmap.h - Macros defining the memory map of Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_MEMMAP_H__ +#define __HW_MEMMAP_H__ + +//***************************************************************************** +// +// The following are defines for the base address of the memories and +// peripherals. +// +//***************************************************************************** +#define FLASH_BASE 0x00000000 // FLASH memory +#define SRAM_BASE 0x20000000 // SRAM memory +#define WATCHDOG0_BASE 0x40000000 // Watchdog0 +#define WATCHDOG1_BASE 0x40001000 // Watchdog1 +#define GPIO_PORTA_BASE 0x40004000 // GPIO Port A +#define GPIO_PORTB_BASE 0x40005000 // GPIO Port B +#define GPIO_PORTC_BASE 0x40006000 // GPIO Port C +#define GPIO_PORTD_BASE 0x40007000 // GPIO Port D +#define SSI0_BASE 0x40008000 // SSI0 +#define SSI1_BASE 0x40009000 // SSI1 +#define UART0_BASE 0x4000C000 // UART0 +#define UART1_BASE 0x4000D000 // UART1 +#define UART2_BASE 0x4000E000 // UART2 +#define I2C0_MASTER_BASE 0x40020000 // I2C0 Master +#define I2C0_SLAVE_BASE 0x40020800 // I2C0 Slave +#define I2C1_MASTER_BASE 0x40021000 // I2C1 Master +#define I2C1_SLAVE_BASE 0x40021800 // I2C1 Slave +#define GPIO_PORTE_BASE 0x40024000 // GPIO Port E +#define GPIO_PORTF_BASE 0x40025000 // GPIO Port F +#define GPIO_PORTG_BASE 0x40026000 // GPIO Port G +#define GPIO_PORTH_BASE 0x40027000 // GPIO Port H +#define PWM_BASE 0x40028000 // PWM +#define QEI0_BASE 0x4002C000 // QEI0 +#define QEI1_BASE 0x4002D000 // QEI1 +#define TIMER0_BASE 0x40030000 // Timer0 +#define TIMER1_BASE 0x40031000 // Timer1 +#define TIMER2_BASE 0x40032000 // Timer2 +#define TIMER3_BASE 0x40033000 // Timer3 +#define ADC0_BASE 0x40038000 // ADC0 +#define ADC1_BASE 0x40039000 // ADC1 +#define COMP_BASE 0x4003C000 // Analog comparators +#define GPIO_PORTJ_BASE 0x4003D000 // GPIO Port J +#define CAN0_BASE 0x40040000 // CAN0 +#define CAN1_BASE 0x40041000 // CAN1 +#define CAN2_BASE 0x40042000 // CAN2 +#define ETH_BASE 0x40048000 // Ethernet +#define MAC_BASE 0x40048000 // Ethernet +#define USB0_BASE 0x40050000 // USB 0 Controller +#define I2S0_BASE 0x40054000 // I2S0 +#define GPIO_PORTA_AHB_BASE 0x40058000 // GPIO Port A (high speed) +#define GPIO_PORTB_AHB_BASE 0x40059000 // GPIO Port B (high speed) +#define GPIO_PORTC_AHB_BASE 0x4005A000 // GPIO Port C (high speed) +#define GPIO_PORTD_AHB_BASE 0x4005B000 // GPIO Port D (high speed) +#define GPIO_PORTE_AHB_BASE 0x4005C000 // GPIO Port E (high speed) +#define GPIO_PORTF_AHB_BASE 0x4005D000 // GPIO Port F (high speed) +#define GPIO_PORTG_AHB_BASE 0x4005E000 // GPIO Port G (high speed) +#define GPIO_PORTH_AHB_BASE 0x4005F000 // GPIO Port H (high speed) +#define GPIO_PORTJ_AHB_BASE 0x40060000 // GPIO Port J (high speed) +#define EPI0_BASE 0x400D0000 // EPI0 +#define HIB_BASE 0x400FC000 // Hibernation Module +#define FLASH_CTRL_BASE 0x400FD000 // FLASH Controller +#define SYSCTL_BASE 0x400FE000 // System Control +#define UDMA_BASE 0x400FF000 // uDMA Controller +#define ITM_BASE 0xE0000000 // Instrumentation Trace Macrocell +#define DWT_BASE 0xE0001000 // Data Watchpoint and Trace +#define FPB_BASE 0xE0002000 // FLASH Patch and Breakpoint +#define NVIC_BASE 0xE000E000 // Nested Vectored Interrupt Ctrl +#define TPIU_BASE 0xE0040000 // Trace Port Interface Unit + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the base address of the memories +// and peripherals. +// +//***************************************************************************** +#define WATCHDOG_BASE 0x40000000 // Watchdog +#define SSI_BASE 0x40008000 // SSI +#define I2C_MASTER_BASE 0x40020000 // I2C Master +#define I2C_SLAVE_BASE 0x40020800 // I2C Slave +#define QEI_BASE 0x4002C000 // QEI +#define ADC_BASE 0x40038000 // ADC + +#endif + +#endif // __HW_MEMMAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_nvic.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_nvic.h new file mode 100644 index 00000000..5ac7bafb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_nvic.h @@ -0,0 +1,1189 @@ +//***************************************************************************** +// +// hw_nvic.h - Macros used when accessing the NVIC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_NVIC_H__ +#define __HW_NVIC_H__ + +//***************************************************************************** +// +// The following are defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg +#define NVIC_ACTLR 0xE000E008 // Auxiliary Control +#define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status + // Register +#define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register +#define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register +#define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg +#define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable +#define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable +#define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable +#define NVIC_DIS1 0xE000E184 // Interrupt 32-54 Clear Enable +#define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending +#define NVIC_PEND1 0xE000E204 // Interrupt 32-54 Set Pending +#define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending +#define NVIC_UNPEND1 0xE000E284 // Interrupt 32-54 Clear Pending +#define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit +#define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-54 Active Bit +#define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority +#define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority +#define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority +#define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority +#define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority +#define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority +#define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority +#define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority +#define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority +#define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority +#define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority +#define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority +#define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority +#define NVIC_PRI13 0xE000E434 // Interrupt 52-53 Priority +#define NVIC_CPUID 0xE000ED00 // CPU ID Base +#define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State +#define NVIC_VTABLE 0xE000ED08 // Vector Table Offset +#define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset + // Control +#define NVIC_SYS_CTRL 0xE000ED10 // System Control +#define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control +#define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 +#define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2 +#define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3 +#define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State +#define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status +#define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status +#define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register +#define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address +#define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address +#define NVIC_MPU_TYPE 0xE000ED90 // MPU Type +#define NVIC_MPU_CTRL 0xE000ED94 // MPU Control +#define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number +#define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address +#define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size +#define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 +#define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size + // Alias 1 +#define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 +#define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size + // Alias 2 +#define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 +#define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size + // Alias 3 +#define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg +#define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select +#define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data +#define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control +#define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTLR register. +// +//***************************************************************************** +#define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding +#define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer +#define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple + // Cycle Instructions + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x007FFFFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable +#define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable +#define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable +#define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable +#define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable +#define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable +#define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable +#define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00FFFFFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00FFFFFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00FFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00FFFFFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI11 register. +// +//***************************************************************************** +#define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask +#define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask +#define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask +#define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask +#define NVIC_PRI11_INT47_S 29 +#define NVIC_PRI11_INT46_S 21 +#define NVIC_PRI11_INT45_S 13 +#define NVIC_PRI11_INT44_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI12 register. +// +//***************************************************************************** +#define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask +#define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask +#define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask +#define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask +#define NVIC_PRI12_INT51_S 29 +#define NVIC_PRI12_INT50_S 21 +#define NVIC_PRI12_INT49_S 13 +#define NVIC_PRI12_INT48_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI13 register. +// +//***************************************************************************** +#define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask +#define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask +#define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask +#define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask +#define NVIC_PRI13_INT55_S 29 +#define NVIC_PRI13_INT54_S 21 +#define NVIC_PRI13_INT53_S 13 +#define NVIC_PRI13_INT52_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0007F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_S 12 +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFE00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 9 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +#endif // __HW_NVIC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_pwm.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_pwm.h new file mode 100644 index 00000000..a59f3edb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_pwm.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_pwm.h - Defines and Macros for Pulse Width Modulation (PWM) ports. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_PWM_H__ +#define __HW_PWM_H__ + +//***************************************************************************** +// +// The following are defines for the PWM register offsets. +// +//***************************************************************************** +#define PWM_O_CTL 0x00000000 // PWM Master Control +#define PWM_O_SYNC 0x00000004 // PWM Time Base Sync +#define PWM_O_ENABLE 0x00000008 // PWM Output Enable +#define PWM_O_INVERT 0x0000000C // PWM Output Inversion +#define PWM_O_FAULT 0x00000010 // PWM Output Fault +#define PWM_O_INTEN 0x00000014 // PWM Interrupt Enable +#define PWM_O_RIS 0x00000018 // PWM Raw Interrupt Status +#define PWM_O_ISC 0x0000001C // PWM Interrupt Status and Clear +#define PWM_O_STATUS 0x00000020 // PWM Status +#define PWM_O_FAULTVAL 0x00000024 // PWM Fault Condition Value +#define PWM_O_ENUPD 0x00000028 // PWM Enable Update +#define PWM_O_0_CTL 0x00000040 // PWM0 Control +#define PWM_O_0_INTEN 0x00000044 // PWM0 Interrupt and Trigger + // Enable +#define PWM_O_0_RIS 0x00000048 // PWM0 Raw Interrupt Status +#define PWM_O_0_ISC 0x0000004C // PWM0 Interrupt Status and Clear +#define PWM_O_0_LOAD 0x00000050 // PWM0 Load +#define PWM_O_0_COUNT 0x00000054 // PWM0 Counter +#define PWM_O_0_CMPA 0x00000058 // PWM0 Compare A +#define PWM_O_0_CMPB 0x0000005C // PWM0 Compare B +#define PWM_O_0_GENA 0x00000060 // PWM0 Generator A Control +#define PWM_O_0_GENB 0x00000064 // PWM0 Generator B Control +#define PWM_O_0_DBCTL 0x00000068 // PWM0 Dead-Band Control +#define PWM_O_0_DBRISE 0x0000006C // PWM0 Dead-Band Rising-Edge Delay +#define PWM_O_0_DBFALL 0x00000070 // PWM0 Dead-Band + // Falling-Edge-Delay +#define PWM_O_0_FLTSRC0 0x00000074 // PWM0 Fault Source 0 +#define PWM_O_0_FLTSRC1 0x00000078 // PWM0 Fault Source 1 +#define PWM_O_0_MINFLTPER 0x0000007C // PWM0 Minimum Fault Period +#define PWM_O_1_CTL 0x00000080 // PWM1 Control +#define PWM_O_1_INTEN 0x00000084 // PWM1 Interrupt and Trigger + // Enable +#define PWM_O_1_RIS 0x00000088 // PWM1 Raw Interrupt Status +#define PWM_O_1_ISC 0x0000008C // PWM1 Interrupt Status and Clear +#define PWM_O_1_LOAD 0x00000090 // PWM1 Load +#define PWM_O_1_COUNT 0x00000094 // PWM1 Counter +#define PWM_O_1_CMPA 0x00000098 // PWM1 Compare A +#define PWM_O_1_CMPB 0x0000009C // PWM1 Compare B +#define PWM_O_1_GENA 0x000000A0 // PWM1 Generator A Control +#define PWM_O_1_GENB 0x000000A4 // PWM1 Generator B Control +#define PWM_O_1_DBCTL 0x000000A8 // PWM1 Dead-Band Control +#define PWM_O_1_DBRISE 0x000000AC // PWM1 Dead-Band Rising-Edge Delay +#define PWM_O_1_DBFALL 0x000000B0 // PWM1 Dead-Band + // Falling-Edge-Delay +#define PWM_O_1_FLTSRC0 0x000000B4 // PWM1 Fault Source 0 +#define PWM_O_1_FLTSRC1 0x000000B8 // PWM1 Fault Source 1 +#define PWM_O_1_MINFLTPER 0x000000BC // PWM1 Minimum Fault Period +#define PWM_O_2_CTL 0x000000C0 // PWM2 Control +#define PWM_O_2_INTEN 0x000000C4 // PWM2 Interrupt and Trigger + // Enable +#define PWM_O_2_RIS 0x000000C8 // PWM2 Raw Interrupt Status +#define PWM_O_2_ISC 0x000000CC // PWM2 Interrupt Status and Clear +#define PWM_O_2_LOAD 0x000000D0 // PWM2 Load +#define PWM_O_2_COUNT 0x000000D4 // PWM2 Counter +#define PWM_O_2_CMPA 0x000000D8 // PWM2 Compare A +#define PWM_O_2_CMPB 0x000000DC // PWM2 Compare B +#define PWM_O_2_GENA 0x000000E0 // PWM2 Generator A Control +#define PWM_O_2_GENB 0x000000E4 // PWM2 Generator B Control +#define PWM_O_2_DBCTL 0x000000E8 // PWM2 Dead-Band Control +#define PWM_O_2_DBRISE 0x000000EC // PWM2 Dead-Band Rising-Edge Delay +#define PWM_O_2_DBFALL 0x000000F0 // PWM2 Dead-Band + // Falling-Edge-Delay +#define PWM_O_2_FLTSRC0 0x000000F4 // PWM2 Fault Source 0 +#define PWM_O_2_FLTSRC1 0x000000F8 // PWM2 Fault Source 1 +#define PWM_O_2_MINFLTPER 0x000000FC // PWM2 Minimum Fault Period +#define PWM_O_3_CTL 0x00000100 // PWM3 Control +#define PWM_O_3_INTEN 0x00000104 // PWM3 Interrupt and Trigger + // Enable +#define PWM_O_3_RIS 0x00000108 // PWM3 Raw Interrupt Status +#define PWM_O_3_ISC 0x0000010C // PWM3 Interrupt Status and Clear +#define PWM_O_3_LOAD 0x00000110 // PWM3 Load +#define PWM_O_3_COUNT 0x00000114 // PWM3 Counter +#define PWM_O_3_CMPA 0x00000118 // PWM3 Compare A +#define PWM_O_3_CMPB 0x0000011C // PWM3 Compare B +#define PWM_O_3_GENA 0x00000120 // PWM3 Generator A Control +#define PWM_O_3_GENB 0x00000124 // PWM3 Generator B Control +#define PWM_O_3_DBCTL 0x00000128 // PWM3 Dead-Band Control +#define PWM_O_3_DBRISE 0x0000012C // PWM3 Dead-Band Rising-Edge Delay +#define PWM_O_3_DBFALL 0x00000130 // PWM3 Dead-Band + // Falling-Edge-Delay +#define PWM_O_3_FLTSRC0 0x00000134 // PWM3 Fault Source 0 +#define PWM_O_3_FLTSRC1 0x00000138 // PWM3 Fault Source 1 +#define PWM_O_3_MINFLTPER 0x0000013C // PWM3 Minimum Fault Period +#define PWM_O_0_FLTSEN 0x00000800 // PWM0 Fault Pin Logic Sense +#define PWM_O_0_FLTSTAT0 0x00000804 // PWM0 Fault Status 0 +#define PWM_O_0_FLTSTAT1 0x00000808 // PWM0 Fault Status 1 +#define PWM_O_1_FLTSEN 0x00000880 // PWM1 Fault Pin Logic Sense +#define PWM_O_1_FLTSTAT0 0x00000884 // PWM1 Fault Status 0 +#define PWM_O_1_FLTSTAT1 0x00000888 // PWM1 Fault Status 1 +#define PWM_O_2_FLTSEN 0x00000900 // PWM2 Fault Pin Logic Sense +#define PWM_O_2_FLTSTAT0 0x00000904 // PWM2 Fault Status 0 +#define PWM_O_2_FLTSTAT1 0x00000908 // PWM2 Fault Status 1 +#define PWM_O_3_FLTSEN 0x00000980 // PWM3 Fault Pin Logic Sense +#define PWM_O_3_FLTSTAT0 0x00000984 // PWM3 Fault Status 0 +#define PWM_O_3_FLTSTAT1 0x00000988 // PWM3 Fault Status 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_CTL register. +// +//***************************************************************************** +#define PWM_CTL_GLOBALSYNC3 0x00000008 // Update PWM Generator 3 +#define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2 +#define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1 +#define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_SYNC register. +// +//***************************************************************************** +#define PWM_SYNC_SYNC3 0x00000008 // Reset Generator 3 Counter +#define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter +#define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter +#define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENABLE register. +// +//***************************************************************************** +#define PWM_ENABLE_PWM7EN 0x00000080 // PWM7 Output Enable +#define PWM_ENABLE_PWM6EN 0x00000040 // PWM6 Output Enable +#define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable +#define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable +#define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable +#define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable +#define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable +#define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INVERT register. +// +//***************************************************************************** +#define PWM_INVERT_PWM7INV 0x00000080 // Invert PWM7 Signal +#define PWM_INVERT_PWM6INV 0x00000040 // Invert PWM6 Signal +#define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal +#define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal +#define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal +#define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal +#define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal +#define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULT register. +// +//***************************************************************************** +#define PWM_FAULT_FAULT7 0x00000080 // PWM7 Fault +#define PWM_FAULT_FAULT6 0x00000040 // PWM6 Fault +#define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault +#define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault +#define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault +#define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault +#define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault +#define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INTEN register. +// +//***************************************************************************** +#define PWM_INTEN_INTFAULT3 0x00080000 // Interrupt Fault 3 +#define PWM_INTEN_INTFAULT2 0x00040000 // Interrupt Fault 2 +#define PWM_INTEN_INTFAULT1 0x00020000 // Interrupt Fault 1 +#define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable +#define PWM_INTEN_INTFAULT0 0x00010000 // Interrupt Fault 0 +#define PWM_INTEN_INTPWM3 0x00000008 // PWM3 Interrupt Enable +#define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable +#define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable +#define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_RIS register. +// +//***************************************************************************** +#define PWM_RIS_INTFAULT3 0x00080000 // Interrupt Fault PWM 3 +#define PWM_RIS_INTFAULT2 0x00040000 // Interrupt Fault PWM 2 +#define PWM_RIS_INTFAULT1 0x00020000 // Interrupt Fault PWM 1 +#define PWM_RIS_INTFAULT0 0x00010000 // Interrupt Fault PWM 0 +#define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_RIS_INTPWM3 0x00000008 // PWM3 Interrupt Asserted +#define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted +#define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted +#define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ISC register. +// +//***************************************************************************** +#define PWM_ISC_INTFAULT3 0x00080000 // FAULT3 Interrupt Asserted +#define PWM_ISC_INTFAULT2 0x00040000 // FAULT2 Interrupt Asserted +#define PWM_ISC_INTFAULT1 0x00020000 // FAULT1 Interrupt Asserted +#define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_ISC_INTFAULT0 0x00010000 // FAULT0 Interrupt Asserted +#define PWM_ISC_INTPWM3 0x00000008 // PWM3 Interrupt Status +#define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status +#define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status +#define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_STATUS register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT3 0x00000008 // Generator 3 Fault Status +#define PWM_STATUS_FAULT2 0x00000004 // Generator 2 Fault Status +#define PWM_STATUS_FAULT1 0x00000002 // Generator 1 Fault Status +#define PWM_STATUS_FAULT0 0x00000001 // Generator 0 Fault Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULTVAL register. +// +//***************************************************************************** +#define PWM_FAULTVAL_PWM7 0x00000080 // PWM7 Fault Value +#define PWM_FAULTVAL_PWM6 0x00000040 // PWM6 Fault Value +#define PWM_FAULTVAL_PWM5 0x00000020 // PWM5 Fault Value +#define PWM_FAULTVAL_PWM4 0x00000010 // PWM4 Fault Value +#define PWM_FAULTVAL_PWM3 0x00000008 // PWM3 Fault Value +#define PWM_FAULTVAL_PWM2 0x00000004 // PWM2 Fault Value +#define PWM_FAULTVAL_PWM1 0x00000002 // PWM1 Fault Value +#define PWM_FAULTVAL_PWM0 0x00000001 // PWM0 Fault Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENUPD register. +// +//***************************************************************************** +#define PWM_ENUPD_ENUPD7_M 0x0000C000 // PWM7 Enable Update Mode +#define PWM_ENUPD_ENUPD7_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD7_LSYNC 0x00008000 // Locally Synchronized +#define PWM_ENUPD_ENUPD7_GSYNC 0x0000C000 // Globally Synchronized +#define PWM_ENUPD_ENUPD6_M 0x00003000 // PWM6 Enable Update Mode +#define PWM_ENUPD_ENUPD6_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD6_LSYNC 0x00002000 // Locally Synchronized +#define PWM_ENUPD_ENUPD6_GSYNC 0x00003000 // Globally Synchronized +#define PWM_ENUPD_ENUPD5_M 0x00000C00 // PWM5 Enable Update Mode +#define PWM_ENUPD_ENUPD5_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD5_LSYNC 0x00000800 // Locally Synchronized +#define PWM_ENUPD_ENUPD5_GSYNC 0x00000C00 // Globally Synchronized +#define PWM_ENUPD_ENUPD4_M 0x00000300 // PWM4 Enable Update Mode +#define PWM_ENUPD_ENUPD4_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD4_LSYNC 0x00000200 // Locally Synchronized +#define PWM_ENUPD_ENUPD4_GSYNC 0x00000300 // Globally Synchronized +#define PWM_ENUPD_ENUPD3_M 0x000000C0 // PWM3 Enable Update Mode +#define PWM_ENUPD_ENUPD3_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD3_LSYNC 0x00000080 // Locally Synchronized +#define PWM_ENUPD_ENUPD3_GSYNC 0x000000C0 // Globally Synchronized +#define PWM_ENUPD_ENUPD2_M 0x00000030 // PWM2 Enable Update Mode +#define PWM_ENUPD_ENUPD2_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD2_LSYNC 0x00000020 // Locally Synchronized +#define PWM_ENUPD_ENUPD2_GSYNC 0x00000030 // Globally Synchronized +#define PWM_ENUPD_ENUPD1_M 0x0000000C // PWM1 Enable Update Mode +#define PWM_ENUPD_ENUPD1_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD1_LSYNC 0x00000008 // Locally Synchronized +#define PWM_ENUPD_ENUPD1_GSYNC 0x0000000C // Globally Synchronized +#define PWM_ENUPD_ENUPD0_M 0x00000003 // PWM0 Enable Update Mode +#define PWM_ENUPD_ENUPD0_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD0_LSYNC 0x00000002 // Locally Synchronized +#define PWM_ENUPD_ENUPD0_GSYNC 0x00000003 // Globally Synchronized + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CTL register. +// +//***************************************************************************** +#define PWM_X_CTL_LATCH 0x00040000 // Latch Fault Input +#define PWM_X_CTL_MINFLTPER 0x00020000 // Minimum Fault Period +#define PWM_X_CTL_FLTSRC 0x00010000 // Fault Condition Source +#define PWM_X_CTL_DBFALLUPD_M 0x0000C000 // PWMnDBFALL Update Mode +#define PWM_X_CTL_DBFALLUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBFALLUPD_LS 0x00008000 // Locally Synchronized +#define PWM_X_CTL_DBFALLUPD_GS 0x0000C000 // Globally Synchronized +#define PWM_X_CTL_DBRISEUPD_M 0x00003000 // PWMnDBRISE Update Mode +#define PWM_X_CTL_DBRISEUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBRISEUPD_LS 0x00002000 // Locally Synchronized +#define PWM_X_CTL_DBRISEUPD_GS 0x00003000 // Globally Synchronized +#define PWM_X_CTL_DBCTLUPD_M 0x00000C00 // PWMnDBCTL Update Mode +#define PWM_X_CTL_DBCTLUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBCTLUPD_LS 0x00000800 // Locally Synchronized +#define PWM_X_CTL_DBCTLUPD_GS 0x00000C00 // Globally Synchronized +#define PWM_X_CTL_GENBUPD_M 0x00000300 // PWMnGENB Update Mode +#define PWM_X_CTL_GENBUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_GENBUPD_LS 0x00000200 // Locally Synchronized +#define PWM_X_CTL_GENBUPD_GS 0x00000300 // Globally Synchronized +#define PWM_X_CTL_GENAUPD_M 0x000000C0 // PWMnGENA Update Mode +#define PWM_X_CTL_GENAUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_GENAUPD_LS 0x00000080 // Locally Synchronized +#define PWM_X_CTL_GENAUPD_GS 0x000000C0 // Globally Synchronized +#define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode +#define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode +#define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode +#define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode +#define PWM_X_CTL_MODE 0x00000002 // Counter Mode +#define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_INTEN register. +// +//***************************************************************************** +#define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up +#define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up +#define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD +#define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0 +#define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB + // Up +#define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA + // Up +#define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD +#define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_RIS register. +// +//***************************************************************************** +#define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt + // Status +#define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status +#define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt + // Status +#define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status +#define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status +#define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_ISC register. +// +//***************************************************************************** +#define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt +#define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt +#define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt +#define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt +#define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt +#define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_LOAD register. +// +//***************************************************************************** +#define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value +#define PWM_X_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_COUNT register. +// +//***************************************************************************** +#define PWM_X_COUNT_M 0x0000FFFF // Counter Value +#define PWM_X_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPA register. +// +//***************************************************************************** +#define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value +#define PWM_X_CMPA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPB register. +// +//***************************************************************************** +#define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value +#define PWM_X_CMPB_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENA register. +// +//***************************************************************************** +#define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENA_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA +#define PWM_X_GENA_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High +#define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENA_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA +#define PWM_X_GENA_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENA_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA +#define PWM_X_GENA_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENA_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA +#define PWM_X_GENA_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High +#define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA +#define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low +#define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High +#define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA +#define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low +#define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENB register. +// +//***************************************************************************** +#define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENB_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB +#define PWM_X_GENB_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High +#define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENB_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB +#define PWM_X_GENB_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENB_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB +#define PWM_X_GENB_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENB_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB +#define PWM_X_GENB_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High +#define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB +#define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low +#define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High +#define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB +#define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low +#define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBCTL register. +// +//***************************************************************************** +#define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBRISE register. +// +//***************************************************************************** +#define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay +#define PWM_X_DBRISE_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBFALL register. +// +//***************************************************************************** +#define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay +#define PWM_X_DBFALL_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSRC0 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSRC0_FAULT3 0x00000008 // Fault3 Input +#define PWM_X_FLTSRC0_FAULT2 0x00000004 // Fault2 Input +#define PWM_X_FLTSRC0_FAULT1 0x00000002 // Fault1 Input +#define PWM_X_FLTSRC0_FAULT0 0x00000001 // Fault0 Input + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSRC1 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSRC1_DCMP7 0x00000080 // Digital Comparator 7 +#define PWM_X_FLTSRC1_DCMP6 0x00000040 // Digital Comparator 6 +#define PWM_X_FLTSRC1_DCMP5 0x00000020 // Digital Comparator 5 +#define PWM_X_FLTSRC1_DCMP4 0x00000010 // Digital Comparator 4 +#define PWM_X_FLTSRC1_DCMP3 0x00000008 // Digital Comparator 3 +#define PWM_X_FLTSRC1_DCMP2 0x00000004 // Digital Comparator 2 +#define PWM_X_FLTSRC1_DCMP1 0x00000002 // Digital Comparator 1 +#define PWM_X_FLTSRC1_DCMP0 0x00000001 // Digital Comparator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_MINFLTPER +// register. +// +//***************************************************************************** +#define PWM_X_MINFLTPER_M 0x0000FFFF // Minimum Fault Period +#define PWM_X_MINFLTPER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSEN register. +// +//***************************************************************************** +#define PWM_X_FLTSEN_FAULT3 0x00000008 // Fault3 Sense +#define PWM_X_FLTSEN_FAULT2 0x00000004 // Fault2 Sense +#define PWM_X_FLTSEN_FAULT1 0x00000002 // Fault1 Sense +#define PWM_X_FLTSEN_FAULT0 0x00000001 // Fault0 Sense + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSTAT0 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSTAT0_FAULT3 0x00000008 // Fault Input 3 +#define PWM_X_FLTSTAT0_FAULT2 0x00000004 // Fault Input 2 +#define PWM_X_FLTSTAT0_FAULT1 0x00000002 // Fault Input 1 +#define PWM_X_FLTSTAT0_FAULT0 0x00000001 // Fault Input 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSTAT1 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSTAT1_DCMP7 0x00000080 // Digital Comparator 7 Trigger +#define PWM_X_FLTSTAT1_DCMP6 0x00000040 // Digital Comparator 6 Trigger +#define PWM_X_FLTSTAT1_DCMP5 0x00000020 // Digital Comparator 5 Trigger +#define PWM_X_FLTSTAT1_DCMP4 0x00000010 // Digital Comparator 4 Trigger +#define PWM_X_FLTSTAT1_DCMP3 0x00000008 // Digital Comparator 3 Trigger +#define PWM_X_FLTSTAT1_DCMP2 0x00000004 // Digital Comparator 2 Trigger +#define PWM_X_FLTSTAT1_DCMP1 0x00000002 // Digital Comparator 1 Trigger +#define PWM_X_FLTSTAT1_DCMP0 0x00000001 // Digital Comparator 0 Trigger + +//***************************************************************************** +// +// The following are defines for the PWM Generator standard offsets. +// +//***************************************************************************** +#define PWM_O_X_CTL 0x00000000 // Gen Control Reg +#define PWM_O_X_INTEN 0x00000004 // Gen Int/Trig Enable Reg +#define PWM_O_X_RIS 0x00000008 // Gen Raw Int Status Reg +#define PWM_O_X_ISC 0x0000000C // Gen Int Status Reg +#define PWM_O_X_LOAD 0x00000010 // Gen Load Reg +#define PWM_O_X_COUNT 0x00000014 // Gen Counter Reg +#define PWM_O_X_CMPA 0x00000018 // Gen Compare A Reg +#define PWM_O_X_CMPB 0x0000001C // Gen Compare B Reg +#define PWM_O_X_GENA 0x00000020 // Gen Generator A Ctrl Reg +#define PWM_O_X_GENB 0x00000024 // Gen Generator B Ctrl Reg +#define PWM_O_X_DBCTL 0x00000028 // Gen Dead Band Ctrl Reg +#define PWM_O_X_DBRISE 0x0000002C // Gen DB Rising Edge Delay Reg +#define PWM_O_X_DBFALL 0x00000030 // Gen DB Falling Edge Delay Reg +#define PWM_O_X_FLTSRC0 0x00000034 // Fault pin, comparator condition +#define PWM_O_X_FLTSRC1 0x00000038 // Digital comparator condition +#define PWM_O_X_MINFLTPER 0x0000003C // Fault minimum period extension +#define PWM_GEN_0_OFFSET 0x00000040 // PWM0 base +#define PWM_GEN_1_OFFSET 0x00000080 // PWM1 base +#define PWM_GEN_2_OFFSET 0x000000C0 // PWM2 base +#define PWM_GEN_3_OFFSET 0x00000100 // PWM3 base + +//***************************************************************************** +// +// The following are defines for the PWM Generator extended offsets. +// +//***************************************************************************** +#define PWM_O_X_FLTSEN 0x00000000 // Fault logic sense +#define PWM_O_X_FLTSTAT0 0x00000004 // Pin and comparator status +#define PWM_O_X_FLTSTAT1 0x00000008 // Digital comparator status +#define PWM_EXT_0_OFFSET 0x00000800 // PWM0 extended base +#define PWM_EXT_1_OFFSET 0x00000880 // PWM1 extended base +#define PWM_EXT_2_OFFSET 0x00000900 // PWM2 extended base +#define PWM_EXT_3_OFFSET 0x00000980 // PWM3 extended base + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PWM_O_CTL +// register. +// +//***************************************************************************** +#define PWM_CTL_GLOBAL_SYNC2 0x00000004 // Global sync generator 2 +#define PWM_CTL_GLOBAL_SYNC1 0x00000002 // Global sync generator 1 +#define PWM_CTL_GLOBAL_SYNC0 0x00000001 // Global sync generator 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PWM_O_STATUS +// register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the PWM Interrupt Register bit +// definitions. +// +//***************************************************************************** +#define PWM_INT_INTFAULT 0x00010000 // Fault interrupt pending + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Interrupt Status Register +// bit definitions. +// +//***************************************************************************** +#define PWM_X_INT_INTCMPBD 0x00000020 // PWM_X_COUNT = PWM_X_CMPB D rcvd +#define PWM_X_INT_INTCMPBU 0x00000010 // PWM_X_COUNT = PWM_X_CMPB U rcvd +#define PWM_X_INT_INTCMPAD 0x00000008 // PWM_X_COUNT = PWM_X_CMPA D rcvd +#define PWM_X_INT_INTCMPAU 0x00000004 // PWM_X_COUNT = PWM_X_CMPA U rcvd +#define PWM_X_INT_INTCNTLOAD 0x00000002 // PWM_X_COUNT = PWM_X_LOAD rcvd +#define PWM_X_INT_INTCNTZERO 0x00000001 // PWM_X_COUNT = 0 received + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Generator A/B Control +// Register bit definitions. +// +//***************************************************************************** +#define PWM_X_GEN_Y_ACTCMPBD 0x00000C00 // Act PWM_X_COUNT = PWM_X_CMPB D +#define PWM_X_GEN_Y_ACTCMPBU 0x00000300 // Act PWM_X_COUNT = PWM_X_CMPB U +#define PWM_X_GEN_Y_ACTCMPAD 0x000000C0 // Act PWM_X_COUNT = PWM_X_CMPA D +#define PWM_X_GEN_Y_ACTCMPAU 0x00000030 // Act PWM_X_COUNT = PWM_X_CMPA U +#define PWM_X_GEN_Y_ACTLOAD 0x0000000C // Act PWM_X_COUNT = PWM_X_LOAD +#define PWM_X_GEN_Y_ACTZERO 0x00000003 // Act PWM_X_COUNT = 0 + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Generator A/B Control +// Register action definitions. +// +//***************************************************************************** +#define PWM_GEN_ACT_ONE 0x00000003 // Set the output signal to one +#define PWM_GEN_ACT_ZERO 0x00000002 // Set the output signal to zero +#define PWM_GEN_ACT_INV 0x00000001 // Invert the output signal +#define PWM_GEN_ACT_NONE 0x00000000 // Do nothing +#define PWM_GEN_ACT_B_DN_SHIFT 10 // Shift amount for the B dn action +#define PWM_GEN_ACT_B_UP_SHIFT 8 // Shift amount for the B up action +#define PWM_GEN_ACT_A_DN_SHIFT 6 // Shift amount for the A dn action +#define PWM_GEN_ACT_A_UP_SHIFT 4 // Shift amount for the A up action +#define PWM_GEN_ACT_LOAD_SHIFT 2 // Shift amount for the load action +#define PWM_GEN_ACT_ZERO_SHIFT 0 // Shift amount for the zero action + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Dead Band Control +// Register bit definitions. +// +//***************************************************************************** +#define PWM_DBCTL_ENABLE 0x00000001 // Enable dead band insertion + +//***************************************************************************** +// +// The following are deprecated defines for the PWM Register reset values. +// +//***************************************************************************** +#define PWM_RV_X_DBCTL 0x00000000 // Control the dead band generator +#define PWM_RV_STATUS 0x00000000 // Status +#define PWM_RV_X_ISC 0x00000000 // Interrupt status and clearing +#define PWM_RV_X_RIS 0x00000000 // Raw interrupt status +#define PWM_RV_X_CTL 0x00000000 // Master control of the PWM + // generator block +#define PWM_RV_SYNC 0x00000000 // Counter synch for PWM generators +#define PWM_RV_X_DBFALL 0x00000000 // The dead band falling edge delay + // count +#define PWM_RV_X_INTEN 0x00000000 // Interrupt and trigger enable +#define PWM_RV_X_LOAD 0x00000000 // The load value for the counter +#define PWM_RV_X_GENA 0x00000000 // Controls PWM generator A +#define PWM_RV_CTL 0x00000000 // Master control of the PWM module +#define PWM_RV_FAULT 0x00000000 // Fault handling for the PWM + // output pins +#define PWM_RV_RIS 0x00000000 // Raw interrupt status +#define PWM_RV_X_CMPA 0x00000000 // The comparator A value +#define PWM_RV_INVERT 0x00000000 // Inversion control for PWM output + // pins +#define PWM_RV_X_DBRISE 0x00000000 // The dead band rising edge delay + // count +#define PWM_RV_ENABLE 0x00000000 // Master enable for the PWM output + // pins +#define PWM_RV_X_GENB 0x00000000 // Controls PWM generator B +#define PWM_RV_X_CMPB 0x00000000 // The comparator B value +#define PWM_RV_ISC 0x00000000 // Interrupt status and clearing +#define PWM_RV_INTEN 0x00000000 // Interrupt enable +#define PWM_RV_X_COUNT 0x00000000 // The current counter value + +#endif + +#endif // __HW_PWM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_qei.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_qei.h new file mode 100644 index 00000000..2b6dbd54 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_qei.h @@ -0,0 +1,201 @@ +//***************************************************************************** +// +// hw_qei.h - Macros used when accessing the QEI hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_QEI_H__ +#define __HW_QEI_H__ + +//***************************************************************************** +// +// The following are defines for the QEI register offsets. +// +//***************************************************************************** +#define QEI_O_CTL 0x00000000 // QEI Control +#define QEI_O_STAT 0x00000004 // QEI Status +#define QEI_O_POS 0x00000008 // QEI Position +#define QEI_O_MAXPOS 0x0000000C // QEI Maximum Position +#define QEI_O_LOAD 0x00000010 // QEI Timer Load +#define QEI_O_TIME 0x00000014 // QEI Timer +#define QEI_O_COUNT 0x00000018 // QEI Velocity Counter +#define QEI_O_SPEED 0x0000001C // QEI Velocity +#define QEI_O_INTEN 0x00000020 // QEI Interrupt Enable +#define QEI_O_RIS 0x00000024 // QEI Raw Interrupt Status +#define QEI_O_ISC 0x00000028 // QEI Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_CTL register. +// +//***************************************************************************** +#define QEI_CTL_FILTCNT_M 0x000F0000 // Input Filter Prescale Count +#define QEI_CTL_FILTEN 0x00002000 // Enable Input Filter +#define QEI_CTL_STALLEN 0x00001000 // Stall QEI +#define QEI_CTL_INVI 0x00000800 // Invert Index Pulse +#define QEI_CTL_INVB 0x00000400 // Invert PhB +#define QEI_CTL_INVA 0x00000200 // Invert PhA +#define QEI_CTL_VELDIV_M 0x000001C0 // Predivide Velocity +#define QEI_CTL_VELDIV_1 0x00000000 // QEI clock /1 +#define QEI_CTL_VELDIV_2 0x00000040 // QEI clock /2 +#define QEI_CTL_VELDIV_4 0x00000080 // QEI clock /4 +#define QEI_CTL_VELDIV_8 0x000000C0 // QEI clock /8 +#define QEI_CTL_VELDIV_16 0x00000100 // QEI clock /16 +#define QEI_CTL_VELDIV_32 0x00000140 // QEI clock /32 +#define QEI_CTL_VELDIV_64 0x00000180 // QEI clock /64 +#define QEI_CTL_VELDIV_128 0x000001C0 // QEI clock /128 +#define QEI_CTL_VELEN 0x00000020 // Capture Velocity +#define QEI_CTL_RESMODE 0x00000010 // Reset Mode +#define QEI_CTL_CAPMODE 0x00000008 // Capture Mode +#define QEI_CTL_SIGMODE 0x00000004 // Signal Mode +#define QEI_CTL_SWAP 0x00000002 // Swap Signals +#define QEI_CTL_ENABLE 0x00000001 // Enable QEI +#define QEI_CTL_FILTCNT_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_STAT register. +// +//***************************************************************************** +#define QEI_STAT_DIRECTION 0x00000002 // Direction of Rotation +#define QEI_STAT_ERROR 0x00000001 // Error Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_POS register. +// +//***************************************************************************** +#define QEI_POS_M 0xFFFFFFFF // Current Position Integrator + // Value +#define QEI_POS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_MAXPOS register. +// +//***************************************************************************** +#define QEI_MAXPOS_M 0xFFFFFFFF // Maximum Position Integrator + // Value +#define QEI_MAXPOS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_LOAD register. +// +//***************************************************************************** +#define QEI_LOAD_M 0xFFFFFFFF // Velocity Timer Load Value +#define QEI_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_TIME register. +// +//***************************************************************************** +#define QEI_TIME_M 0xFFFFFFFF // Velocity Timer Current Value +#define QEI_TIME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_COUNT register. +// +//***************************************************************************** +#define QEI_COUNT_M 0xFFFFFFFF // Velocity Pulse Count +#define QEI_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_SPEED register. +// +//***************************************************************************** +#define QEI_SPEED_M 0xFFFFFFFF // Velocity +#define QEI_SPEED_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_INTEN register. +// +//***************************************************************************** +#define QEI_INTEN_ERROR 0x00000008 // Phase Error Interrupt Enable +#define QEI_INTEN_DIR 0x00000004 // Direction Change Interrupt + // Enable +#define QEI_INTEN_TIMER 0x00000002 // Timer Expires Interrupt Enable +#define QEI_INTEN_INDEX 0x00000001 // Index Pulse Detected Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_RIS register. +// +//***************************************************************************** +#define QEI_RIS_ERROR 0x00000008 // Phase Error Detected +#define QEI_RIS_DIR 0x00000004 // Direction Change Detected +#define QEI_RIS_TIMER 0x00000002 // Velocity Timer Expired +#define QEI_RIS_INDEX 0x00000001 // Index Pulse Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_ISC register. +// +//***************************************************************************** +#define QEI_ISC_ERROR 0x00000008 // Phase Error Interrupt +#define QEI_ISC_DIR 0x00000004 // Direction Change Interrupt +#define QEI_ISC_TIMER 0x00000002 // Velocity Timer Expired Interrupt +#define QEI_ISC_INDEX 0x00000001 // Index Pulse Interrupt + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the QEI_ISC +// register. +// +//***************************************************************************** +#define QEI_INT_ERROR 0x00000008 // Phase error detected +#define QEI_INT_DIR 0x00000004 // Direction change +#define QEI_INT_TIMER 0x00000002 // Velocity timer expired +#define QEI_INT_INDEX 0x00000001 // Index pulse detected + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the QEI +// registers. +// +//***************************************************************************** +#define QEI_RV_POS 0x00000000 // Current position register +#define QEI_RV_LOAD 0x00000000 // Velocity timer load register +#define QEI_RV_CTL 0x00000000 // Configuration and control reg +#define QEI_RV_RIS 0x00000000 // Raw interrupt status register +#define QEI_RV_ISC 0x00000000 // Interrupt status register +#define QEI_RV_SPEED 0x00000000 // Velocity speed register +#define QEI_RV_INTEN 0x00000000 // Interrupt enable register +#define QEI_RV_STAT 0x00000000 // Status register +#define QEI_RV_COUNT 0x00000000 // Velocity pulse count register +#define QEI_RV_MAXPOS 0x00000000 // Maximum position register +#define QEI_RV_TIME 0x00000000 // Velocity timer register + +#endif + +#endif // __HW_QEI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ssi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ssi.h new file mode 100644 index 00000000..22706961 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_ssi.h @@ -0,0 +1,217 @@ +//***************************************************************************** +// +// hw_ssi.h - Macros used when accessing the SSI hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SSI_H__ +#define __HW_SSI_H__ + +//***************************************************************************** +// +// The following are defines for the SSI register offsets. +// +//***************************************************************************** +#define SSI_O_CR0 0x00000000 // SSI Control 0 +#define SSI_O_CR1 0x00000004 // SSI Control 1 +#define SSI_O_DR 0x00000008 // SSI Data +#define SSI_O_SR 0x0000000C // SSI Status +#define SSI_O_CPSR 0x00000010 // SSI Clock Prescale +#define SSI_O_IM 0x00000014 // SSI Interrupt Mask +#define SSI_O_RIS 0x00000018 // SSI Raw Interrupt Status +#define SSI_O_MIS 0x0000001C // SSI Masked Interrupt Status +#define SSI_O_ICR 0x00000020 // SSI Interrupt Clear +#define SSI_O_DMACTL 0x00000024 // SSI DMA Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR0 register. +// +//***************************************************************************** +#define SSI_CR0_SCR_M 0x0000FF00 // SSI Serial Clock Rate +#define SSI_CR0_SPH 0x00000080 // SSI Serial Clock Phase +#define SSI_CR0_SPO 0x00000040 // SSI Serial Clock Polarity +#define SSI_CR0_FRF_M 0x00000030 // SSI Frame Format Select +#define SSI_CR0_FRF_MOTO 0x00000000 // Freescale SPI Frame Format +#define SSI_CR0_FRF_TI 0x00000010 // Texas Instruments Synchronous + // Serial Frame Format +#define SSI_CR0_FRF_NMW 0x00000020 // MICROWIRE Frame Format +#define SSI_CR0_DSS_M 0x0000000F // SSI Data Size Select +#define SSI_CR0_DSS_4 0x00000003 // 4-bit data +#define SSI_CR0_DSS_5 0x00000004 // 5-bit data +#define SSI_CR0_DSS_6 0x00000005 // 6-bit data +#define SSI_CR0_DSS_7 0x00000006 // 7-bit data +#define SSI_CR0_DSS_8 0x00000007 // 8-bit data +#define SSI_CR0_DSS_9 0x00000008 // 9-bit data +#define SSI_CR0_DSS_10 0x00000009 // 10-bit data +#define SSI_CR0_DSS_11 0x0000000A // 11-bit data +#define SSI_CR0_DSS_12 0x0000000B // 12-bit data +#define SSI_CR0_DSS_13 0x0000000C // 13-bit data +#define SSI_CR0_DSS_14 0x0000000D // 14-bit data +#define SSI_CR0_DSS_15 0x0000000E // 15-bit data +#define SSI_CR0_DSS_16 0x0000000F // 16-bit data +#define SSI_CR0_SCR_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR1 register. +// +//***************************************************************************** +#define SSI_CR1_EOT 0x00000010 // End of Transmission +#define SSI_CR1_SOD 0x00000008 // SSI Slave Mode Output Disable +#define SSI_CR1_MS 0x00000004 // SSI Master/Slave Select +#define SSI_CR1_SSE 0x00000002 // SSI Synchronous Serial Port + // Enable +#define SSI_CR1_LBM 0x00000001 // SSI Loopback Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DR register. +// +//***************************************************************************** +#define SSI_DR_DATA_M 0x0000FFFF // SSI Receive/Transmit Data +#define SSI_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_SR register. +// +//***************************************************************************** +#define SSI_SR_BSY 0x00000010 // SSI Busy Bit +#define SSI_SR_RFF 0x00000008 // SSI Receive FIFO Full +#define SSI_SR_RNE 0x00000004 // SSI Receive FIFO Not Empty +#define SSI_SR_TNF 0x00000002 // SSI Transmit FIFO Not Full +#define SSI_SR_TFE 0x00000001 // SSI Transmit FIFO Empty + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CPSR register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_M 0x000000FF // SSI Clock Prescale Divisor +#define SSI_CPSR_CPSDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_IM register. +// +//***************************************************************************** +#define SSI_IM_TXIM 0x00000008 // SSI Transmit FIFO Interrupt Mask +#define SSI_IM_RXIM 0x00000004 // SSI Receive FIFO Interrupt Mask +#define SSI_IM_RTIM 0x00000002 // SSI Receive Time-Out Interrupt + // Mask +#define SSI_IM_RORIM 0x00000001 // SSI Receive Overrun Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_RIS register. +// +//***************************************************************************** +#define SSI_RIS_TXRIS 0x00000008 // SSI Transmit FIFO Raw Interrupt + // Status +#define SSI_RIS_RXRIS 0x00000004 // SSI Receive FIFO Raw Interrupt + // Status +#define SSI_RIS_RTRIS 0x00000002 // SSI Receive Time-Out Raw + // Interrupt Status +#define SSI_RIS_RORRIS 0x00000001 // SSI Receive Overrun Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_MIS register. +// +//***************************************************************************** +#define SSI_MIS_TXMIS 0x00000008 // SSI Transmit FIFO Masked + // Interrupt Status +#define SSI_MIS_RXMIS 0x00000004 // SSI Receive FIFO Masked + // Interrupt Status +#define SSI_MIS_RTMIS 0x00000002 // SSI Receive Time-Out Masked + // Interrupt Status +#define SSI_MIS_RORMIS 0x00000001 // SSI Receive Overrun Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_ICR register. +// +//***************************************************************************** +#define SSI_ICR_RTIC 0x00000002 // SSI Receive Time-Out Interrupt + // Clear +#define SSI_ICR_RORIC 0x00000001 // SSI Receive Overrun Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DMACTL register. +// +//***************************************************************************** +#define SSI_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define SSI_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SSI_O_CR0 +// register. +// +//***************************************************************************** +#define SSI_CR0_SCR 0x0000FF00 // Serial clock rate +#define SSI_CR0_FRF_MASK 0x00000030 // Frame format mask +#define SSI_CR0_DSS 0x0000000F // Data size select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SSI_O_CPSR +// register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_MASK 0x000000FF // Clock prescale + +//***************************************************************************** +// +// The following are deprecated defines for the SSI controller's FIFO size. +// +//***************************************************************************** +#define TX_FIFO_SIZE (8) // Number of entries in the TX FIFO +#define RX_FIFO_SIZE (8) // Number of entries in the RX FIFO + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the interrupt +// mask set and clear, raw interrupt, masked interrupt, and interrupt clear +// registers. +// +//***************************************************************************** +#define SSI_INT_TXFF 0x00000008 // TX FIFO interrupt +#define SSI_INT_RXFF 0x00000004 // RX FIFO interrupt +#define SSI_INT_RXTO 0x00000002 // RX timeout interrupt +#define SSI_INT_RXOR 0x00000001 // RX overrun interrupt + +#endif + +#endif // __HW_SSI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_sysctl.h new file mode 100644 index 00000000..2bcd8c71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_sysctl.h @@ -0,0 +1,1687 @@ +//***************************************************************************** +// +// hw_sysctl.h - Macros used when accessing the system control hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SYSCTL_H__ +#define __HW_SYSCTL_H__ + +//***************************************************************************** +// +// The following are defines for the System Control register addresses. +// +//***************************************************************************** +#define SYSCTL_DID0 0x400FE000 // Device Identification 0 +#define SYSCTL_DID1 0x400FE004 // Device Identification 1 +#define SYSCTL_DC0 0x400FE008 // Device Capabilities 0 +#define SYSCTL_DC1 0x400FE010 // Device Capabilities 1 +#define SYSCTL_DC2 0x400FE014 // Device Capabilities 2 +#define SYSCTL_DC3 0x400FE018 // Device Capabilities 3 +#define SYSCTL_DC4 0x400FE01C // Device Capabilities 4 +#define SYSCTL_DC5 0x400FE020 // Device Capabilities 5 +#define SYSCTL_DC6 0x400FE024 // Device Capabilities 6 +#define SYSCTL_DC7 0x400FE028 // Device Capabilities 7 +#define SYSCTL_DC8 0x400FE02C // Device Capabilities 8 ADC + // Channels +#define SYSCTL_PBORCTL 0x400FE030 // Brown-Out Reset Control +#define SYSCTL_LDOPCTL 0x400FE034 // LDO Power Control +#define SYSCTL_SRCR0 0x400FE040 // Software Reset Control 0 +#define SYSCTL_SRCR1 0x400FE044 // Software Reset Control 1 +#define SYSCTL_SRCR2 0x400FE048 // Software Reset Control 2 +#define SYSCTL_RIS 0x400FE050 // Raw Interrupt Status +#define SYSCTL_IMC 0x400FE054 // Interrupt Mask Control +#define SYSCTL_MISC 0x400FE058 // Masked Interrupt Status and + // Clear +#define SYSCTL_RESC 0x400FE05C // Reset Cause +#define SYSCTL_RCC 0x400FE060 // Run-Mode Clock Configuration +#define SYSCTL_PLLCFG 0x400FE064 // XTAL to PLL Translation +#define SYSCTL_GPIOHBCTL 0x400FE06C // GPIO High-Performance Bus + // Control +#define SYSCTL_RCC2 0x400FE070 // Run-Mode Clock Configuration 2 +#define SYSCTL_MOSCCTL 0x400FE07C // Main Oscillator Control +#define SYSCTL_RCGC0 0x400FE100 // Run Mode Clock Gating Control + // Register 0 +#define SYSCTL_RCGC1 0x400FE104 // Run Mode Clock Gating Control + // Register 1 +#define SYSCTL_RCGC2 0x400FE108 // Run Mode Clock Gating Control + // Register 2 +#define SYSCTL_SCGC0 0x400FE110 // Sleep Mode Clock Gating Control + // Register 0 +#define SYSCTL_SCGC1 0x400FE114 // Sleep Mode Clock Gating Control + // Register 1 +#define SYSCTL_SCGC2 0x400FE118 // Sleep Mode Clock Gating Control + // Register 2 +#define SYSCTL_DCGC0 0x400FE120 // Deep Sleep Mode Clock Gating + // Control Register 0 +#define SYSCTL_DCGC1 0x400FE124 // Deep-Sleep Mode Clock Gating + // Control Register 1 +#define SYSCTL_DCGC2 0x400FE128 // Deep Sleep Mode Clock Gating + // Control Register 2 +#define SYSCTL_DSLPCLKCFG 0x400FE144 // Deep Sleep Clock Configuration +#define SYSCTL_PIOSCCAL 0x400FE150 // Precision Internal Oscillator + // Calibration +#define SYSCTL_CLKVCLR 0x400FE150 // Clock Verification Clear +#define SYSCTL_PIOSCSTAT 0x400FE154 // Precision Internal Oscillator + // Statistics +#define SYSCTL_LDOARST 0x400FE160 // Allow Unregulated LDO to Reset + // the Part +#define SYSCTL_I2SMCLKCFG 0x400FE170 // I2S MCLK Configuration +#define SYSCTL_DC9 0x400FE190 // Device Capabilities 9 ADC + // Digital Comparators +#define SYSCTL_NVMSTAT 0x400FE1A0 // Non-Volatile Memory Information + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_0 0x00000000 // Initial DID0 register format + // definition for Stellaris(R) + // Sandstorm-class devices +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_SANDSTORM \ + 0x00000000 // Sandstorm-class Device +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_CLASS_DUSTDEVIL \ + 0x00030000 // Stellaris(R) DustDevil-class + // devices +#define SYSCTL_DID0_CLASS_TEMPEST \ + 0x00040000 // Stellaris(R) Tempest-class + // microcontrollers +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change +#define SYSCTL_DID0_MIN_3 0x00000003 // Minor revision 3 +#define SYSCTL_DID0_MIN_4 0x00000004 // Minor revision 4 +#define SYSCTL_DID0_MIN_5 0x00000005 // Minor revision 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_0 0x00000000 // Initial DID1 register format + // definition, indicating a + // Stellaris LM3Snnn device +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_101 0x00010000 // LM3S101 +#define SYSCTL_DID1_PRTNO_102 0x00020000 // LM3S102 +#define SYSCTL_DID1_PRTNO_300 0x00190000 // LM3S300 +#define SYSCTL_DID1_PRTNO_301 0x00110000 // LM3S301 +#define SYSCTL_DID1_PRTNO_308 0x001A0000 // LM3S308 +#define SYSCTL_DID1_PRTNO_310 0x00120000 // LM3S310 +#define SYSCTL_DID1_PRTNO_315 0x00130000 // LM3S315 +#define SYSCTL_DID1_PRTNO_316 0x00140000 // LM3S316 +#define SYSCTL_DID1_PRTNO_317 0x00170000 // LM3S317 +#define SYSCTL_DID1_PRTNO_328 0x00150000 // LM3S328 +#define SYSCTL_DID1_PRTNO_600 0x002A0000 // LM3S600 +#define SYSCTL_DID1_PRTNO_601 0x00210000 // LM3S601 +#define SYSCTL_DID1_PRTNO_608 0x002B0000 // LM3S608 +#define SYSCTL_DID1_PRTNO_610 0x00220000 // LM3S610 +#define SYSCTL_DID1_PRTNO_611 0x00230000 // LM3S611 +#define SYSCTL_DID1_PRTNO_612 0x00240000 // LM3S612 +#define SYSCTL_DID1_PRTNO_613 0x00250000 // LM3S613 +#define SYSCTL_DID1_PRTNO_615 0x00260000 // LM3S615 +#define SYSCTL_DID1_PRTNO_617 0x00280000 // LM3S617 +#define SYSCTL_DID1_PRTNO_618 0x00290000 // LM3S618 +#define SYSCTL_DID1_PRTNO_628 0x00270000 // LM3S628 +#define SYSCTL_DID1_PRTNO_800 0x00380000 // LM3S800 +#define SYSCTL_DID1_PRTNO_801 0x00310000 // LM3S801 +#define SYSCTL_DID1_PRTNO_808 0x00390000 // LM3S808 +#define SYSCTL_DID1_PRTNO_811 0x00320000 // LM3S811 +#define SYSCTL_DID1_PRTNO_812 0x00330000 // LM3S812 +#define SYSCTL_DID1_PRTNO_815 0x00340000 // LM3S815 +#define SYSCTL_DID1_PRTNO_817 0x00360000 // LM3S817 +#define SYSCTL_DID1_PRTNO_818 0x00370000 // LM3S818 +#define SYSCTL_DID1_PRTNO_828 0x00350000 // LM3S828 +#define SYSCTL_DID1_PRTNO_1110 0x00BF0000 // LM3S1110 +#define SYSCTL_DID1_PRTNO_1133 0x00C30000 // LM3S1133 +#define SYSCTL_DID1_PRTNO_1138 0x00C50000 // LM3S1138 +#define SYSCTL_DID1_PRTNO_1150 0x00C10000 // LM3S1150 +#define SYSCTL_DID1_PRTNO_1162 0x00C40000 // LM3S1162 +#define SYSCTL_DID1_PRTNO_1165 0x00C20000 // LM3S1165 +#define SYSCTL_DID1_PRTNO_1332 0x00C60000 // LM3S1332 +#define SYSCTL_DID1_PRTNO_1435 0x00BC0000 // LM3S1435 +#define SYSCTL_DID1_PRTNO_1439 0x00BA0000 // LM3S1439 +#define SYSCTL_DID1_PRTNO_1512 0x00BB0000 // LM3S1512 +#define SYSCTL_DID1_PRTNO_1538 0x00C70000 // LM3S1538 +#define SYSCTL_DID1_PRTNO_1601 0x00DB0000 // LM3S1601 +#define SYSCTL_DID1_PRTNO_1607 0x00060000 // LM3S1607 +#define SYSCTL_DID1_PRTNO_1608 0x00DA0000 // LM3S1608 +#define SYSCTL_DID1_PRTNO_1620 0x00C00000 // LM3S1620 +#define SYSCTL_DID1_PRTNO_1625 0x00030000 // LM3S1625 +#define SYSCTL_DID1_PRTNO_1626 0x00040000 // LM3S1626 +#define SYSCTL_DID1_PRTNO_1627 0x00050000 // LM3S1627 +#define SYSCTL_DID1_PRTNO_1635 0x00B30000 // LM3S1635 +#define SYSCTL_DID1_PRTNO_1637 0x00BD0000 // LM3S1637 +#define SYSCTL_DID1_PRTNO_1651 0x00B10000 // LM3S1651 +#define SYSCTL_DID1_PRTNO_1751 0x00B90000 // LM3S1751 +#define SYSCTL_DID1_PRTNO_1776 0x00100000 // LM3S1776 +#define SYSCTL_DID1_PRTNO_1811 0x00160000 // LM3S1811 +#define SYSCTL_DID1_PRTNO_1816 0x003D0000 // LM3S1816 +#define SYSCTL_DID1_PRTNO_1850 0x00B40000 // LM3S1850 +#define SYSCTL_DID1_PRTNO_1911 0x00DD0000 // LM3S1911 +#define SYSCTL_DID1_PRTNO_1918 0x00DC0000 // LM3S1918 +#define SYSCTL_DID1_PRTNO_1937 0x00B70000 // LM3S1937 +#define SYSCTL_DID1_PRTNO_1958 0x00BE0000 // LM3S1958 +#define SYSCTL_DID1_PRTNO_1960 0x00B50000 // LM3S1960 +#define SYSCTL_DID1_PRTNO_1968 0x00B80000 // LM3S1968 +#define SYSCTL_DID1_PRTNO_1J11 0x000F0000 // LM3S1J11 +#define SYSCTL_DID1_PRTNO_1J16 0x003C0000 // LM3S1J16 +#define SYSCTL_DID1_PRTNO_1N11 0x000E0000 // LM3S1N11 +#define SYSCTL_DID1_PRTNO_1N16 0x003B0000 // LM3S1N16 +#define SYSCTL_DID1_PRTNO_1P51 0x00B20000 // LM3S1P51 +#define SYSCTL_DID1_PRTNO_1R21 0x009E0000 // LM3S1R21 +#define SYSCTL_DID1_PRTNO_1W16 0x00300000 // LM3S1W16 +#define SYSCTL_DID1_PRTNO_1Z16 0x002F0000 // LM3S1Z16 +#define SYSCTL_DID1_PRTNO_2110 0x00510000 // LM3S2110 +#define SYSCTL_DID1_PRTNO_2139 0x00840000 // LM3S2139 +#define SYSCTL_DID1_PRTNO_2276 0x00390000 // LM3S2276 +#define SYSCTL_DID1_PRTNO_2410 0x00A20000 // LM3S2410 +#define SYSCTL_DID1_PRTNO_2412 0x00590000 // LM3S2412 +#define SYSCTL_DID1_PRTNO_2432 0x00560000 // LM3S2432 +#define SYSCTL_DID1_PRTNO_2533 0x005A0000 // LM3S2533 +#define SYSCTL_DID1_PRTNO_2601 0x00E10000 // LM3S2601 +#define SYSCTL_DID1_PRTNO_2608 0x00E00000 // LM3S2608 +#define SYSCTL_DID1_PRTNO_2616 0x00330000 // LM3S2616 +#define SYSCTL_DID1_PRTNO_2620 0x00570000 // LM3S2620 +#define SYSCTL_DID1_PRTNO_2637 0x00850000 // LM3S2637 +#define SYSCTL_DID1_PRTNO_2651 0x00530000 // LM3S2651 +#define SYSCTL_DID1_PRTNO_2671 0x00800000 // LM3S2671 +#define SYSCTL_DID1_PRTNO_2678 0x00500000 // LM3S2678 +#define SYSCTL_DID1_PRTNO_2730 0x00A40000 // LM3S2730 +#define SYSCTL_DID1_PRTNO_2739 0x00520000 // LM3S2739 +#define SYSCTL_DID1_PRTNO_2776 0x003A0000 // LM3S2776 +#define SYSCTL_DID1_PRTNO_2793 0x006D0000 // LM3S2793 +#define SYSCTL_DID1_PRTNO_2911 0x00E30000 // LM3S2911 +#define SYSCTL_DID1_PRTNO_2918 0x00E20000 // LM3S2918 +#define SYSCTL_DID1_PRTNO_2939 0x00540000 // LM3S2939 +#define SYSCTL_DID1_PRTNO_2948 0x008F0000 // LM3S2948 +#define SYSCTL_DID1_PRTNO_2950 0x00580000 // LM3S2950 +#define SYSCTL_DID1_PRTNO_2965 0x00550000 // LM3S2965 +#define SYSCTL_DID1_PRTNO_2B93 0x006C0000 // LM3S2B93 +#define SYSCTL_DID1_PRTNO_3634 0x00080000 // LM3S3634 +#define SYSCTL_DID1_PRTNO_3651 0x00430000 // LM3S3651 +#define SYSCTL_DID1_PRTNO_3739 0x00440000 // LM3S3739 +#define SYSCTL_DID1_PRTNO_3748 0x00490000 // LM3S3748 +#define SYSCTL_DID1_PRTNO_3749 0x00450000 // LM3S3749 +#define SYSCTL_DID1_PRTNO_3826 0x00420000 // LM3S3826 +#define SYSCTL_DID1_PRTNO_3J26 0x00410000 // LM3S3J26 +#define SYSCTL_DID1_PRTNO_3N26 0x00400000 // LM3S3N26 +#define SYSCTL_DID1_PRTNO_3W26 0x003F0000 // LM3S3W26 +#define SYSCTL_DID1_PRTNO_3Z26 0x003E0000 // LM3S3Z26 +#define SYSCTL_DID1_PRTNO_5632 0x00810000 // LM3S5632 +#define SYSCTL_DID1_PRTNO_5651 0x000C0000 // LM3S5651 +#define SYSCTL_DID1_PRTNO_5652 0x008A0000 // LM3S5652 +#define SYSCTL_DID1_PRTNO_5656 0x004D0000 // LM3S5656 +#define SYSCTL_DID1_PRTNO_5662 0x00910000 // LM3S5662 +#define SYSCTL_DID1_PRTNO_5732 0x00960000 // LM3S5732 +#define SYSCTL_DID1_PRTNO_5737 0x00970000 // LM3S5737 +#define SYSCTL_DID1_PRTNO_5739 0x00A00000 // LM3S5739 +#define SYSCTL_DID1_PRTNO_5747 0x00990000 // LM3S5747 +#define SYSCTL_DID1_PRTNO_5749 0x00A70000 // LM3S5749 +#define SYSCTL_DID1_PRTNO_5752 0x009A0000 // LM3S5752 +#define SYSCTL_DID1_PRTNO_5762 0x009C0000 // LM3S5762 +#define SYSCTL_DID1_PRTNO_5791 0x00690000 // LM3S5791 +#define SYSCTL_DID1_PRTNO_5951 0x000B0000 // LM3S5951 +#define SYSCTL_DID1_PRTNO_5956 0x004E0000 // LM3S5956 +#define SYSCTL_DID1_PRTNO_5B91 0x00680000 // LM3S5B91 +#define SYSCTL_DID1_PRTNO_5K31 0x00090000 // LM3S5K31 +#define SYSCTL_DID1_PRTNO_5K36 0x004A0000 // LM3S5K36 +#define SYSCTL_DID1_PRTNO_5P31 0x000A0000 // LM3S5P31 +#define SYSCTL_DID1_PRTNO_5P36 0x00480000 // LM3S5P36 +#define SYSCTL_DID1_PRTNO_5P51 0x000D0000 // LM3S5P51 +#define SYSCTL_DID1_PRTNO_5P56 0x004C0000 // LM3S5P56 +#define SYSCTL_DID1_PRTNO_5R31 0x00070000 // LM3S5R31 +#define SYSCTL_DID1_PRTNO_5R36 0x004B0000 // LM3S5R36 +#define SYSCTL_DID1_PRTNO_5T36 0x00470000 // LM3S5T36 +#define SYSCTL_DID1_PRTNO_5Y36 0x00460000 // LM3S5Y36 +#define SYSCTL_DID1_PRTNO_6100 0x00A10000 // LM3S6100 +#define SYSCTL_DID1_PRTNO_6110 0x00740000 // LM3S6110 +#define SYSCTL_DID1_PRTNO_6420 0x00A50000 // LM3S6420 +#define SYSCTL_DID1_PRTNO_6422 0x00820000 // LM3S6422 +#define SYSCTL_DID1_PRTNO_6432 0x00750000 // LM3S6432 +#define SYSCTL_DID1_PRTNO_6537 0x00760000 // LM3S6537 +#define SYSCTL_DID1_PRTNO_6610 0x00710000 // LM3S6610 +#define SYSCTL_DID1_PRTNO_6611 0x00E70000 // LM3S6611 +#define SYSCTL_DID1_PRTNO_6618 0x00E60000 // LM3S6618 +#define SYSCTL_DID1_PRTNO_6633 0x00830000 // LM3S6633 +#define SYSCTL_DID1_PRTNO_6637 0x008B0000 // LM3S6637 +#define SYSCTL_DID1_PRTNO_6730 0x00A30000 // LM3S6730 +#define SYSCTL_DID1_PRTNO_6753 0x00770000 // LM3S6753 +#define SYSCTL_DID1_PRTNO_6911 0x00E90000 // LM3S6911 +#define SYSCTL_DID1_PRTNO_6918 0x00E80000 // LM3S6918 +#define SYSCTL_DID1_PRTNO_6938 0x00890000 // LM3S6938 +#define SYSCTL_DID1_PRTNO_6950 0x00720000 // LM3S6950 +#define SYSCTL_DID1_PRTNO_6952 0x00780000 // LM3S6952 +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PRTNO_8530 0x00640000 // LM3S8530 +#define SYSCTL_DID1_PRTNO_8538 0x008E0000 // LM3S8538 +#define SYSCTL_DID1_PRTNO_8630 0x00610000 // LM3S8630 +#define SYSCTL_DID1_PRTNO_8730 0x00630000 // LM3S8730 +#define SYSCTL_DID1_PRTNO_8733 0x008D0000 // LM3S8733 +#define SYSCTL_DID1_PRTNO_8738 0x00860000 // LM3S8738 +#define SYSCTL_DID1_PRTNO_8930 0x00650000 // LM3S8930 +#define SYSCTL_DID1_PRTNO_8933 0x008C0000 // LM3S8933 +#define SYSCTL_DID1_PRTNO_8938 0x00880000 // LM3S8938 +#define SYSCTL_DID1_PRTNO_8962 0x00A60000 // LM3S8962 +#define SYSCTL_DID1_PRTNO_8970 0x00620000 // LM3S8970 +#define SYSCTL_DID1_PRTNO_8971 0x00D70000 // LM3S8971 +#define SYSCTL_DID1_PRTNO_9790 0x00670000 // LM3S9790 +#define SYSCTL_DID1_PRTNO_9792 0x006B0000 // LM3S9792 +#define SYSCTL_DID1_PRTNO_9997 0x00200000 // LM3S9997 +#define SYSCTL_DID1_PRTNO_9B90 0x00660000 // LM3S9B90 +#define SYSCTL_DID1_PRTNO_9B92 0x006A0000 // LM3S9B92 +#define SYSCTL_DID1_PRTNO_9B95 0x006E0000 // LM3S9B95 +#define SYSCTL_DID1_PRTNO_9B96 0x006F0000 // LM3S9B96 +#define SYSCTL_DID1_PRTNO_9L97 0x00180000 // LM3S9L97 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_28 0x00000000 // 28 pin package +#define SYSCTL_DID1_PINCNT_48 0x00002000 // 48-pin package +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_PINCNT_64 0x00006000 // 64-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_PKG_QFN 0x00000018 // QFN package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified +#define SYSCTL_DID1_PRTNO_S 16 // Part number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_2KB 0x00070000 // 2 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_4KB 0x000F0000 // 4 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_6KB 0x00170000 // 6 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_8KB 0x001F0000 // 8 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_12KB 0x002F0000 // 12 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_16KB 0x003F0000 // 16 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_20KB 0x004F0000 // 20 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_24KB 0x005F0000 // 24 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_32KB 0x007F0000 // 32 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_96KB 0x017F0000 // 96 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_8KB 0x00000003 // 8 KB of Flash +#define SYSCTL_DC0_FLASHSZ_16KB 0x00000007 // 16 KB of Flash +#define SYSCTL_DC0_FLASHSZ_32KB 0x0000000F // 32 KB of Flash +#define SYSCTL_DC0_FLASHSZ_64KB 0x0000001F // 64 KB of Flash +#define SYSCTL_DC0_FLASHSZ_96KB 0x0000002F // 96 KB of Flash +#define SYSCTL_DC0_FLASHSZ_128K 0x0000003F // 128 KB of Flash +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT1 0x10000000 // Watchdog Timer1 Present +#define SYSCTL_DC1_CAN2 0x04000000 // CAN Module 2 Present +#define SYSCTL_DC1_CAN1 0x02000000 // CAN Module 1 Present +#define SYSCTL_DC1_CAN0 0x01000000 // CAN Module 0 Present +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC1 0x00020000 // ADC Module 1 Present +#define SYSCTL_DC1_ADC0 0x00010000 // ADC Module 0 Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_100 \ + 0x00001000 // Divide VCO (400MHZ) by 5 minimum +#define SYSCTL_DC1_MINSYSDIV_66 0x00002000 // Divide VCO (400MHZ) by 2*2 + 2 = + // 6 minimum +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_MINSYSDIV_25 0x00007000 // Specifies a 25-MHz clock with a + // PLL divider of 8 +#define SYSCTL_DC1_MINSYSDIV_20 0x00009000 // Specifies a 20-MHz clock with a + // PLL divider of 10 +#define SYSCTL_DC1_ADCSPD_M 0x00000F00 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_DC1_ADCSPD_250K 0x00000100 // 250K samples/second +#define SYSCTL_DC1_ADCSPD_500K 0x00000200 // 500K samples/second +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_ADC1SPD_M 0x00000C00 // Max ADC1 Speed +#define SYSCTL_DC1_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_DC1_ADC0SPD_M 0x00000300 // Max ADC0 Speed +#define SYSCTL_DC1_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_EPI0 0x40000000 // EPI Module 0 Present +#define SYSCTL_DC2_I2S0 0x10000000 // I2S Module 0 Present +#define SYSCTL_DC2_COMP2 0x04000000 // Analog Comparator 2 Present +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI1 0x00000020 // SSI Module 1 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP5 0x20000000 // CCP5 Pin Present +#define SYSCTL_DC3_CCP4 0x10000000 // CCP4 Pin Present +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC0AIN7 0x00800000 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC3_ADC0AIN6 0x00400000 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC3_ADC0AIN5 0x00200000 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC3_ADC0AIN4 0x00100000 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC3_ADC0AIN3 0x00080000 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC3_ADC0AIN2 0x00040000 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC3_ADC0AIN1 0x00020000 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC3_ADC0AIN0 0x00010000 // ADC Module 0 AIN0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C2O 0x00004000 // C2o Pin Present +#define SYSCTL_DC3_C2PLUS 0x00002000 // C2+ Pin Present +#define SYSCTL_DC3_C2MINUS 0x00001000 // C2- Pin Present +#define SYSCTL_DC3_C1O 0x00000800 // C1o Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_ETH 0x50000000 // Ethernet present +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_E1588 0x01000000 // 1588 Capable +#define SYSCTL_DC4_PICAL 0x00040000 // PIOSC Calibrate +#define SYSCTL_DC4_CCP7 0x00008000 // CCP7 Pin Present +#define SYSCTL_DC4_CCP6 0x00004000 // CCP6 Pin Present +#define SYSCTL_DC4_UDMA 0x00002000 // Micro-DMA Module Present +#define SYSCTL_DC4_ROM 0x00001000 // Internal Code ROM Present +#define SYSCTL_DC4_GPIOJ 0x00000100 // GPIO Port J Present +#define SYSCTL_DC4_GPIOH 0x00000080 // GPIO Port H Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC5 register. +// +//***************************************************************************** +#define SYSCTL_DC5_PWMFAULT3 0x08000000 // PWM Fault 3 Pin Present +#define SYSCTL_DC5_PWMFAULT2 0x04000000 // PWM Fault 2 Pin Present +#define SYSCTL_DC5_PWMFAULT1 0x02000000 // PWM Fault 1 Pin Present +#define SYSCTL_DC5_PWMFAULT0 0x01000000 // PWM Fault 0 Pin Present +#define SYSCTL_DC5_PWMEFLT 0x00200000 // PWM Extended Fault Active +#define SYSCTL_DC5_PWMESYNC 0x00100000 // PWM Extended SYNC Active +#define SYSCTL_DC5_PWM7 0x00000080 // PWM7 Pin Present +#define SYSCTL_DC5_PWM6 0x00000040 // PWM6 Pin Present +#define SYSCTL_DC5_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC5_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC5_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC5_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC5_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC5_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC6 register. +// +//***************************************************************************** +#define SYSCTL_DC6_USB0PHY 0x00000010 // USB Module 0 PHY Present +#define SYSCTL_DC6_USB0_M 0x00000003 // USB Module 0 Present +#define SYSCTL_DC6_USB0_DEV 0x00000001 // USB0 is Device Only +#define SYSCTL_DC6_USB0_HOSTDEV 0x00000002 // USB is Device or Host +#define SYSCTL_DC6_USB0_OTG 0x00000003 // USB0 is OTG + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC7 register. +// +//***************************************************************************** +#define SYSCTL_DC7_SW 0x40000000 // Software transfer on uDMA Ch30 +#define SYSCTL_DC7_DMACH30 0x40000000 // SW +#define SYSCTL_DC7_DMACH29 0x20000000 // I2S0_TX / CAN1_TX +#define SYSCTL_DC7_DMACH28 0x10000000 // I2S0_RX / CAN1_RX +#define SYSCTL_DC7_DMACH27 0x08000000 // CAN1_TX / ADC1_SS3 +#define SYSCTL_DC7_DMACH26 0x04000000 // CAN1_RX / ADC1_SS2 +#define SYSCTL_DC7_DMACH25 0x02000000 // SSI1_TX / ADC1_SS1 +#define SYSCTL_DC7_SSI1_TX 0x02000000 // SSI1 TX on uDMA Ch25 +#define SYSCTL_DC7_SSI1_RX 0x01000000 // SSI1 RX on uDMA Ch24 +#define SYSCTL_DC7_DMACH24 0x01000000 // SSI1_RX / ADC1_SS0 +#define SYSCTL_DC7_UART1_TX 0x00800000 // UART1 TX on uDMA Ch23 +#define SYSCTL_DC7_DMACH23 0x00800000 // UART1_TX / CAN2_TX +#define SYSCTL_DC7_DMACH22 0x00400000 // UART1_RX / CAN2_RX +#define SYSCTL_DC7_UART1_RX 0x00400000 // UART1 RX on uDMA Ch22 +#define SYSCTL_DC7_DMACH21 0x00200000 // Timer1B / EPI0_WFIFO +#define SYSCTL_DC7_DMACH20 0x00100000 // Timer1A / EPI0_NBRFIFO +#define SYSCTL_DC7_DMACH19 0x00080000 // Timer0B / Timer1B +#define SYSCTL_DC7_DMACH18 0x00040000 // Timer0A / Timer1A +#define SYSCTL_DC7_DMACH17 0x00020000 // ADC0_SS3 +#define SYSCTL_DC7_DMACH16 0x00010000 // ADC0_SS2 +#define SYSCTL_DC7_DMACH15 0x00008000 // ADC0_SS1 / Timer2B +#define SYSCTL_DC7_DMACH14 0x00004000 // ADC0_SS0 / Timer2A +#define SYSCTL_DC7_DMACH13 0x00002000 // CAN0_TX / UART2_TX +#define SYSCTL_DC7_DMACH12 0x00001000 // CAN0_RX / UART2_RX +#define SYSCTL_DC7_SSI0_TX 0x00000800 // SSI0 TX on uDMA Ch11 +#define SYSCTL_DC7_DMACH11 0x00000800 // SSI0_TX / SSI1_TX +#define SYSCTL_DC7_SSI0_RX 0x00000400 // SSI0 RX on uDMA Ch10 +#define SYSCTL_DC7_DMACH10 0x00000400 // SSI0_RX / SSI1_RX +#define SYSCTL_DC7_UART0_TX 0x00000200 // UART0 TX on uDMA Ch9 +#define SYSCTL_DC7_DMACH9 0x00000200 // UART0_TX / UART1_TX +#define SYSCTL_DC7_DMACH8 0x00000100 // UART0_RX / UART1_RX +#define SYSCTL_DC7_UART0_RX 0x00000100 // UART0 RX on uDMA Ch8 +#define SYSCTL_DC7_DMACH7 0x00000080 // ETH_TX / Timer2B +#define SYSCTL_DC7_DMACH6 0x00000040 // ETH_RX / Timer2A +#define SYSCTL_DC7_DMACH5 0x00000020 // USB_EP3_TX / Timer2B +#define SYSCTL_DC7_USB_EP3_TX 0x00000020 // USB EP3 TX on uDMA Ch5 +#define SYSCTL_DC7_USB_EP3_RX 0x00000010 // USB EP3 RX on uDMA Ch4 +#define SYSCTL_DC7_DMACH4 0x00000010 // USB_EP3_RX / Timer2A +#define SYSCTL_DC7_USB_EP2_TX 0x00000008 // USB EP2 TX on uDMA Ch3 +#define SYSCTL_DC7_DMACH3 0x00000008 // USB_EP2_TX / Timer3B +#define SYSCTL_DC7_USB_EP2_RX 0x00000004 // USB EP2 RX on uDMA Ch2 +#define SYSCTL_DC7_DMACH2 0x00000004 // USB_EP2_RX / Timer3A +#define SYSCTL_DC7_USB_EP1_TX 0x00000002 // USB EP1 TX on uDMA Ch1 +#define SYSCTL_DC7_DMACH1 0x00000002 // USB_EP1_TX / UART2_TX +#define SYSCTL_DC7_DMACH0 0x00000001 // USB_EP1_RX / UART2_RX +#define SYSCTL_DC7_USB_EP1_RX 0x00000001 // USB EP1 RX on uDMA Ch0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC8 register. +// +//***************************************************************************** +#define SYSCTL_DC8_ADC1AIN15 0x80000000 // ADC Module 1 AIN15 Pin Present +#define SYSCTL_DC8_ADC1AIN14 0x40000000 // ADC Module 1 AIN14 Pin Present +#define SYSCTL_DC8_ADC1AIN13 0x20000000 // ADC Module 1 AIN13 Pin Present +#define SYSCTL_DC8_ADC1AIN12 0x10000000 // ADC Module 1 AIN12 Pin Present +#define SYSCTL_DC8_ADC1AIN11 0x08000000 // ADC Module 1 AIN11 Pin Present +#define SYSCTL_DC8_ADC1AIN10 0x04000000 // ADC Module 1 AIN10 Pin Present +#define SYSCTL_DC8_ADC1AIN9 0x02000000 // ADC Module 1 AIN9 Pin Present +#define SYSCTL_DC8_ADC1AIN8 0x01000000 // ADC Module 1 AIN8 Pin Present +#define SYSCTL_DC8_ADC1AIN7 0x00800000 // ADC Module 1 AIN7 Pin Present +#define SYSCTL_DC8_ADC1AIN6 0x00400000 // ADC Module 1 AIN6 Pin Present +#define SYSCTL_DC8_ADC1AIN5 0x00200000 // ADC Module 1 AIN5 Pin Present +#define SYSCTL_DC8_ADC1AIN4 0x00100000 // ADC Module 1 AIN4 Pin Present +#define SYSCTL_DC8_ADC1AIN3 0x00080000 // ADC Module 1 AIN3 Pin Present +#define SYSCTL_DC8_ADC1AIN2 0x00040000 // ADC Module 1 AIN2 Pin Present +#define SYSCTL_DC8_ADC1AIN1 0x00020000 // ADC Module 1 AIN1 Pin Present +#define SYSCTL_DC8_ADC1AIN0 0x00010000 // ADC Module 1 AIN0 Pin Present +#define SYSCTL_DC8_ADC0AIN15 0x00008000 // ADC Module 0 AIN15 Pin Present +#define SYSCTL_DC8_ADC0AIN14 0x00004000 // ADC Module 0 AIN14 Pin Present +#define SYSCTL_DC8_ADC0AIN13 0x00002000 // ADC Module 0 AIN13 Pin Present +#define SYSCTL_DC8_ADC0AIN12 0x00001000 // ADC Module 0 AIN12 Pin Present +#define SYSCTL_DC8_ADC0AIN11 0x00000800 // ADC Module 0 AIN11 Pin Present +#define SYSCTL_DC8_ADC0AIN10 0x00000400 // ADC Module 0 AIN10 Pin Present +#define SYSCTL_DC8_ADC0AIN9 0x00000200 // ADC Module 0 AIN9 Pin Present +#define SYSCTL_DC8_ADC0AIN8 0x00000100 // ADC Module 0 AIN8 Pin Present +#define SYSCTL_DC8_ADC0AIN7 0x00000080 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC8_ADC0AIN6 0x00000040 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC8_ADC0AIN5 0x00000020 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC8_ADC0AIN4 0x00000010 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC8_ADC0AIN3 0x00000008 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC8_ADC0AIN2 0x00000004 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC8_ADC0AIN1 0x00000002 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC8_ADC0AIN0 0x00000001 // ADC Module 0 AIN0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORTIM_M 0x0000FFFC // BOR Time Delay +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset +#define SYSCTL_PBORCTL_BORWT 0x00000001 // BOR Wait and Check for Noise +#define SYSCTL_PBORCTL_BORTIM_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_WDT1 0x10000000 // WDT1 Reset Control +#define SYSCTL_SRCR0_CAN2 0x04000000 // CAN2 Reset Control +#define SYSCTL_SRCR0_CAN1 0x02000000 // CAN1 Reset Control +#define SYSCTL_SRCR0_CAN0 0x01000000 // CAN0 Reset Control +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC1 0x00020000 // ADC1 Reset Control +#define SYSCTL_SRCR0_ADC0 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT0 0x00000008 // WDT0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_EPI0 0x40000000 // EPI0 Reset Control +#define SYSCTL_SRCR1_I2S0 0x10000000 // I2S0 Reset Control +#define SYSCTL_SRCR1_COMP2 0x04000000 // Analog Comp 2 Reset Control +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI1 0x00000020 // SSI1 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_USB0 0x00010000 // USB0 Reset Control +#define SYSCTL_SRCR2_UDMA 0x00002000 // Micro-DMA Reset Control +#define SYSCTL_SRCR2_GPIOJ 0x00000100 // Port J Reset Control +#define SYSCTL_SRCR2_GPIOH 0x00000080 // Port H Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_MOSCPUPRIS 0x00000100 // MOSC Power Up Raw Interrupt + // Status +#define SYSCTL_RIS_USBPLLLRIS 0x00000080 // USB PLL Lock Raw Interrupt + // Status +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_CLRIS 0x00000020 // Current Limit Raw Interrupt + // Status +#define SYSCTL_RIS_IOFRIS 0x00000010 // Internal Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_MOFRIS 0x00000008 // Main Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_LDORIS 0x00000004 // LDO Power Unregulated Raw + // Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status +#define SYSCTL_RIS_PLLFRIS 0x00000001 // PLL Fault Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_MOSCPUPIM 0x00000100 // MOSC Power Up Interrupt Mask +#define SYSCTL_IMC_USBPLLLIM 0x00000080 // USB PLL Lock Interrupt Mask +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_CLIM 0x00000020 // Current Limit Interrupt Mask +#define SYSCTL_IMC_IOFIM 0x00000010 // Internal Oscillator Fault + // Interrupt Mask +#define SYSCTL_IMC_MOFIM 0x00000008 // Main Oscillator Fault Interrupt + // Mask +#define SYSCTL_IMC_LDOIM 0x00000004 // LDO Power Unregulated Interrupt + // Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask +#define SYSCTL_IMC_PLLFIM 0x00000001 // PLL Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_MOSCPUPMIS 0x00000100 // MOSC Power Up Masked Interrupt + // Status +#define SYSCTL_MISC_USBPLLLMIS 0x00000080 // USB PLL Lock Masked Interrupt + // Status +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_CLMIS 0x00000020 // Current Limit Masked Interrupt + // Status +#define SYSCTL_MISC_IOFMIS 0x00000010 // Internal Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_MOFMIS 0x00000008 // Main Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_LDOMIS 0x00000004 // LDO Power Unregulated Masked + // Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_MOSCFAIL 0x00010000 // MOSC Failure Reset +#define SYSCTL_RESC_LDO 0x00000020 // LDO Reset +#define SYSCTL_RESC_WDT1 0x00000020 // Watchdog Timer 1 Reset +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT0 0x00000008 // Watchdog Timer 0 Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_OEN 0x00001000 // PLL Output Enable +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000007C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_XTAL_10MHZ 0x00000400 // 10 MHz +#define SYSCTL_RCC_XTAL_12MHZ 0x00000440 // 12 MHz +#define SYSCTL_RCC_XTAL_12_2MHZ 0x00000480 // 12.288 MHz +#define SYSCTL_RCC_XTAL_13_5MHZ 0x000004C0 // 13.56 MHz +#define SYSCTL_RCC_XTAL_14_3MHZ 0x00000500 // 14.31818 MHz +#define SYSCTL_RCC_XTAL_16MHZ 0x00000540 // 16 MHz +#define SYSCTL_RCC_XTAL_16_3MHZ 0x00000580 // 16.384 MHz +#define SYSCTL_RCC_PLLVER 0x00000400 // PLL Verification +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCVER 0x00000008 // Internal Oscillator Verification + // Timer +#define SYSCTL_RCC_MOSCVER 0x00000004 // Main Oscillator Verification + // Timer +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 +#define SYSCTL_RCC_PWMDIV_S 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_S 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_S 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_M 0x0000C000 // PLL OD Value +#define SYSCTL_PLLCFG_OD_1 0x00000000 // Divide by 1 +#define SYSCTL_PLLCFG_OD_2 0x00004000 // Divide by 2 +#define SYSCTL_PLLCFG_OD_4 0x00008000 // Divide by 4 +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_GPIOHBCTL +// register. +// +//***************************************************************************** +#define SYSCTL_GPIOHBCTL_PORTJ 0x00000100 // Port J Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTH 0x00000080 // Port H Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTG 0x00000040 // Port G Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTF 0x00000020 // Port F Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTE 0x00000010 // Port E Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTD 0x00000008 // Port D Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTC 0x00000004 // Port C Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTB 0x00000002 // Port B Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTA 0x00000001 // Port A Advanced High-Performance + // Bus + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_DIV400 0x40000000 // Divide PLL as 400 MHz vs. 200 + // MHz +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_SYSDIV2LSB 0x00400000 // Additional LSB for SYSDIV2 +#define SYSCTL_RCC2_USBPWRDN 0x00004000 // Power-Down USB PLL +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_419 0x00000060 // 4.194304 MHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MOSCCTL register. +// +//***************************************************************************** +#define SYSCTL_MOSCCTL_CVAL 0x00000001 // Clock Validation for MOSC + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_RCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_RCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_RCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_RCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_RCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_RCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_RCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_RCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_RCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_RCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_RCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_RCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_RCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_RCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_SCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_SCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_SCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_SCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_SCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_SCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_SCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_SCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_SCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_SCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_SCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_SCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_SCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_SCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_DCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_DCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_DCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_DCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_DCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_DCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_DCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_DCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_DCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_IOSC 0x00000001 // IOSC Clock Source +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCCAL +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCCAL_UTEN 0x80000000 // Use User Trim Value +#define SYSCTL_PIOSCCAL_CAL 0x00000200 // Start Calibration +#define SYSCTL_PIOSCCAL_UPDATE 0x00000100 // Update Trim +#define SYSCTL_PIOSCCAL_UT_M 0x0000007F // User Trim Value +#define SYSCTL_PIOSCCAL_UT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_VERCLR 0x00000001 // Clock Verification Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCSTAT +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCSTAT_DT_M 0x007F0000 // Default Trim Value +#define SYSCTL_PIOSCSTAT_CR_M 0x00000300 // Calibration Result +#define SYSCTL_PIOSCSTAT_CRNONE 0x00000000 // Calibration has not been + // attempted +#define SYSCTL_PIOSCSTAT_CRPASS 0x00000100 // The last calibration operation + // completed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CRFAIL 0x00000200 // The last calibration operation + // failed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CT_M 0x0000007F // Calibration Trim Value +#define SYSCTL_PIOSCSTAT_DT_S 16 +#define SYSCTL_PIOSCSTAT_CT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_LDOARST 0x00000001 // LDO Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_I2SMCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_I2SMCLKCFG_RXEN 0x80000000 // RX Clock Enable +#define SYSCTL_I2SMCLKCFG_RXI_M 0x3FF00000 // RX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_RXF_M 0x000F0000 // RX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_TXEN 0x00008000 // TX Clock Enable +#define SYSCTL_I2SMCLKCFG_TXI_M 0x00003FF0 // TX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_TXF_M 0x0000000F // TX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_RXI_S 20 +#define SYSCTL_I2SMCLKCFG_RXF_S 16 +#define SYSCTL_I2SMCLKCFG_TXI_S 4 +#define SYSCTL_I2SMCLKCFG_TXF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC9 register. +// +//***************************************************************************** +#define SYSCTL_DC9_ADC1DC7 0x00800000 // ADC1 DC7 Present +#define SYSCTL_DC9_ADC1DC6 0x00400000 // ADC1 DC6 Present +#define SYSCTL_DC9_ADC1DC5 0x00200000 // ADC1 DC5 Present +#define SYSCTL_DC9_ADC1DC4 0x00100000 // ADC1 DC4 Present +#define SYSCTL_DC9_ADC1DC3 0x00080000 // ADC1 DC3 Present +#define SYSCTL_DC9_ADC1DC2 0x00040000 // ADC1 DC2 Present +#define SYSCTL_DC9_ADC1DC1 0x00020000 // ADC1 DC1 Present +#define SYSCTL_DC9_ADC1DC0 0x00010000 // ADC1 DC0 Present +#define SYSCTL_DC9_ADC0DC7 0x00000080 // ADC0 DC7 Present +#define SYSCTL_DC9_ADC0DC6 0x00000040 // ADC0 DC6 Present +#define SYSCTL_DC9_ADC0DC5 0x00000020 // ADC0 DC5 Present +#define SYSCTL_DC9_ADC0DC4 0x00000010 // ADC0 DC4 Present +#define SYSCTL_DC9_ADC0DC3 0x00000008 // ADC0 DC3 Present +#define SYSCTL_DC9_ADC0DC2 0x00000004 // ADC0 DC2 Present +#define SYSCTL_DC9_ADC0DC1 0x00000002 // ADC0 DC1 Present +#define SYSCTL_DC9_ADC0DC0 0x00000001 // ADC0 DC0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_NVMSTAT register. +// +//***************************************************************************** +#define SYSCTL_NVMSTAT_TPSW 0x00000010 // Third Party Software Present +#define SYSCTL_NVMSTAT_FWB 0x00000001 // 32 Word Flash Write Buffer + // Active + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the System Control register +// addresses. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL 0x400FE06C // GPIO High-Speed Control +#define SYSCTL_USER0 0x400FE1E0 // NV User Register 0 +#define SYSCTL_USER1 0x400FE1E4 // NV User Register 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID0 +// register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_MASK 0x70000000 // DID0 version mask +#define SYSCTL_DID0_CLASS_MASK 0x00FF0000 // Device Class +#define SYSCTL_DID0_MAJ_MASK 0x0000FF00 // Major revision mask +#define SYSCTL_DID0_MAJ_A 0x00000000 // Major revision A +#define SYSCTL_DID0_MAJ_B 0x00000100 // Major revision B +#define SYSCTL_DID0_MAJ_C 0x00000200 // Major revision C +#define SYSCTL_DID0_MIN_MASK 0x000000FF // Minor revision mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID1 +// register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_MASK 0xF0000000 // Register version mask +#define SYSCTL_DID1_FAM_MASK 0x0F000000 // Family mask +#define SYSCTL_DID1_FAM_S 0x00000000 // Stellaris family +#define SYSCTL_DID1_PRTNO_MASK 0x00FF0000 // Part number mask +#define SYSCTL_DID1_PINCNT_MASK 0x0000E000 // Pin count +#define SYSCTL_DID1_TEMP_MASK 0x000000E0 // Temperature range mask +#define SYSCTL_DID1_PKG_MASK 0x00000018 // Package mask +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package +#define SYSCTL_DID1_QUAL_MASK 0x00000003 // Qualification status mask +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PRTNO_SHIFT 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_MASK 0xFFFF0000 // SRAM size mask +#define SYSCTL_DC0_FLASHSZ_MASK 0x0000FFFF // Flash size mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC1 +// register. +// +//***************************************************************************** +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_SYSDIV_MASK 0x0000F000 // Minimum system divider mask +#define SYSCTL_DC1_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_DC1_WDOG 0x00000008 // Watchdog present +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC2 +// register. +// +//***************************************************************************** +#define SYSCTL_DC2_I2C 0x00001000 // I2C present +#define SYSCTL_DC2_QEI 0x00000100 // QEI present +#define SYSCTL_DC2_SSI 0x00000010 // SSI present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC3 +// register. +// +//***************************************************************************** +#define SYSCTL_DC3_ADC7 0x00800000 // ADC7 Pin Present +#define SYSCTL_DC3_ADC6 0x00400000 // ADC6 Pin Present +#define SYSCTL_DC3_ADC5 0x00200000 // ADC5 Pin Present +#define SYSCTL_DC3_ADC4 0x00100000 // ADC4 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_MC_FAULT0 0x00008000 // MC0 fault pin present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BOR_MASK 0x0000FFFC // BOR wait timer +#define SYSCTL_PBORCTL_BOR_SH 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_MASK 0x0000003F // Voltage adjust mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0 +// register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RESC +// register. +// +//***************************************************************************** +#define SYSCTL_RESC_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC +// register. +// +//***************************************************************************** +#define SYSCTL_RCC_SYSDIV_MASK 0x07800000 // System clock divider +#define SYSCTL_RCC_USE_SYSDIV 0x00400000 // Use sytem clock divider +#define SYSCTL_RCC_USE_PWMDIV 0x00100000 // Use PWM clock divider +#define SYSCTL_RCC_PWMDIV_MASK 0x000E0000 // PWM clock divider +#define SYSCTL_RCC_OE 0x00001000 // PLL output enable +#define SYSCTL_RCC_XTAL_3_68MHz 0x00000140 // Using a 3.6864 MHz crystal +#define SYSCTL_RCC_XTAL_4MHz 0x00000180 // Using a 4 MHz crystal +#define SYSCTL_RCC_XTAL_MASK 0x000003C0 // Crystal attached to main osc +#define SYSCTL_RCC_OSCSRC_MASK 0x00000030 // Oscillator input select +#define SYSCTL_RCC_SYSDIV_SHIFT 23 // Shift to the SYSDIV field +#define SYSCTL_RCC_PWMDIV_SHIFT 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_SHIFT 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_SHIFT 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_PLLCFG +// register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_MASK 0x0000C000 // Output divider +#define SYSCTL_PLLCFG_F_MASK 0x00003FE0 // PLL multiplier +#define SYSCTL_PLLCFG_R_MASK 0x0000001F // Input predivider +#define SYSCTL_PLLCFG_F_SHIFT 5 +#define SYSCTL_PLLCFG_R_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_GPIOHSCTL register. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL_PORTA 0x00000001 // Port A High-Speed +#define SYSCTL_GPIOHSCTL_PORTB 0x00000002 // Port B High-Speed +#define SYSCTL_GPIOHSCTL_PORTC 0x00000004 // Port C High-Speed +#define SYSCTL_GPIOHSCTL_PORTD 0x00000008 // Port D High-Speed +#define SYSCTL_GPIOHSCTL_PORTE 0x00000010 // Port E High-Speed +#define SYSCTL_GPIOHSCTL_PORTF 0x00000020 // Port F High-Speed +#define SYSCTL_GPIOHSCTL_PORTG 0x00000040 // Port G High-Speed +#define SYSCTL_GPIOHSCTL_PORTH 0x00000080 // Port H High-Speed + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC2 +// register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USEFRACT 0x40000000 // Use fractional divider +#define SYSCTL_RCC2_SYSDIV2_MSK 0x1F800000 // System clock divider +#define SYSCTL_RCC2_FRACT 0x00400000 // Fractional divide +#define SYSCTL_RCC2_OSCSRC2_MSK 0x00000070 // Oscillator input select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_DSLPCLKCFG register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_MSK 0x1F800000 // Deep sleep system clock override +#define SYSCTL_DSLPCLKCFG_O_MSK 0x00000070 // Deep sleep oscillator override + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_CLR 0x00000001 // Clear clock verification fault + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_ARST 0x00000001 // Allow LDO to reset device + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0, +// SYSCTL_RCGC0, SYSCTL_SCGC0, and SYSCTL_DCGC0 registers. +// +//***************************************************************************** +#define SYSCTL_SET0_CAN2 0x04000000 // CAN 2 module +#define SYSCTL_SET0_CAN1 0x02000000 // CAN 1 module +#define SYSCTL_SET0_CAN0 0x01000000 // CAN 0 module +#define SYSCTL_SET0_PWM 0x00100000 // PWM module +#define SYSCTL_SET0_ADC 0x00010000 // ADC module +#define SYSCTL_SET0_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_SET0_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_SET0_ADCSPD_250K 0x00000100 // 250Ksps ADC +#define SYSCTL_SET0_ADCSPD_500K 0x00000200 // 500Ksps ADC +#define SYSCTL_SET0_ADCSPD_1M 0x00000300 // 1Msps ADC +#define SYSCTL_SET0_HIB 0x00000040 // Hibernation module +#define SYSCTL_SET0_WDOG 0x00000008 // Watchdog module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR1, +// SYSCTL_RCGC1, SYSCTL_SCGC1, and SYSCTL_DCGC1 registers. +// +//***************************************************************************** +#define SYSCTL_SET1_COMP2 0x04000000 // Analog comparator module 2 +#define SYSCTL_SET1_COMP1 0x02000000 // Analog comparator module 1 +#define SYSCTL_SET1_COMP0 0x01000000 // Analog comparator module 0 +#define SYSCTL_SET1_TIMER3 0x00080000 // Timer module 3 +#define SYSCTL_SET1_TIMER2 0x00040000 // Timer module 2 +#define SYSCTL_SET1_TIMER1 0x00020000 // Timer module 1 +#define SYSCTL_SET1_TIMER0 0x00010000 // Timer module 0 +#define SYSCTL_SET1_I2C1 0x00002000 // I2C module 1 +#define SYSCTL_SET1_I2C0 0x00001000 // I2C module 0 +#define SYSCTL_SET1_I2C 0x00001000 // I2C module +#define SYSCTL_SET1_QEI1 0x00000200 // QEI module 1 +#define SYSCTL_SET1_QEI 0x00000100 // QEI module +#define SYSCTL_SET1_QEI0 0x00000100 // QEI module 0 +#define SYSCTL_SET1_SSI1 0x00000020 // SSI module 1 +#define SYSCTL_SET1_SSI0 0x00000010 // SSI module 0 +#define SYSCTL_SET1_SSI 0x00000010 // SSI module +#define SYSCTL_SET1_UART2 0x00000004 // UART module 2 +#define SYSCTL_SET1_UART1 0x00000002 // UART module 1 +#define SYSCTL_SET1_UART0 0x00000001 // UART module 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR2, +// SYSCTL_RCGC2, SYSCTL_SCGC2, and SYSCTL_DCGC2 registers. +// +//***************************************************************************** +#define SYSCTL_SET2_ETH 0x50000000 // ETH module +#define SYSCTL_SET2_GPIOH 0x00000080 // GPIO H module +#define SYSCTL_SET2_GPIOG 0x00000040 // GPIO G module +#define SYSCTL_SET2_GPIOF 0x00000020 // GPIO F module +#define SYSCTL_SET2_GPIOE 0x00000010 // GPIO E module +#define SYSCTL_SET2_GPIOD 0x00000008 // GPIO D module +#define SYSCTL_SET2_GPIOC 0x00000004 // GPIO C module +#define SYSCTL_SET2_GPIOB 0x00000002 // GPIO B module +#define SYSCTL_SET2_GPIOA 0x00000001 // GIPO A module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RIS, +// SYSCTL_IMC, and SYSCTL_IMS registers. +// +//***************************************************************************** +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +#endif + +#endif // __HW_SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_timer.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_timer.h new file mode 100644 index 00000000..2a2cac71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_timer.h @@ -0,0 +1,474 @@ +//***************************************************************************** +// +// hw_timer.h - Defines and macros used when accessing the timer. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TIMER_H__ +#define __HW_TIMER_H__ + +//***************************************************************************** +// +// The following are defines for the Timer register offsets. +// +//***************************************************************************** +#define TIMER_O_CFG 0x00000000 // GPTM Configuration +#define TIMER_O_TAMR 0x00000004 // GPTM Timer A Mode +#define TIMER_O_TBMR 0x00000008 // GPTM Timer B Mode +#define TIMER_O_CTL 0x0000000C // GPTM Control +#define TIMER_O_IMR 0x00000018 // GPTM Interrupt Mask +#define TIMER_O_RIS 0x0000001C // GPTM Raw Interrupt Status +#define TIMER_O_MIS 0x00000020 // GPTM Masked Interrupt Status +#define TIMER_O_ICR 0x00000024 // GPTM Interrupt Clear +#define TIMER_O_TAILR 0x00000028 // GPTM Timer A Interval Load +#define TIMER_O_TBILR 0x0000002C // GPTM Timer B Interval Load +#define TIMER_O_TAMATCHR 0x00000030 // GPTM Timer A Match +#define TIMER_O_TBMATCHR 0x00000034 // GPTM Timer B Match +#define TIMER_O_TAPR 0x00000038 // GPTM Timer A Prescale +#define TIMER_O_TBPR 0x0000003C // GPTM Timer B Prescale +#define TIMER_O_TAPMR 0x00000040 // GPTM TimerA Prescale Match +#define TIMER_O_TBPMR 0x00000044 // GPTM TimerB Prescale Match +#define TIMER_O_TAR 0x00000048 // GPTM Timer A +#define TIMER_O_TBR 0x0000004C // GPTM Timer B +#define TIMER_O_TAV 0x00000050 // GPTM Timer A Value +#define TIMER_O_TBV 0x00000054 // GPTM Timer B Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CFG register. +// +//***************************************************************************** +#define TIMER_CFG_M 0x00000007 // GPTM Configuration +#define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration +#define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC) + // counter configuration +#define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The + // function is controlled by bits + // 1:0 of GPTMTAMR and GPTMTBMR + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMR register. +// +//***************************************************************************** +#define TIMER_TAMR_TASNAPS 0x00000080 // GPTM Timer A Snap-Shot Mode +#define TIMER_TAMR_TAWOT 0x00000040 // GPTM Timer A Wait-on-Trigger +#define TIMER_TAMR_TAMIE 0x00000020 // GPTM Timer A Match Interrupt + // Enable +#define TIMER_TAMR_TACDIR 0x00000010 // GPTM Timer A Count Direction +#define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode + // Select +#define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode +#define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode +#define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMR register. +// +//***************************************************************************** +#define TIMER_TBMR_TBSNAPS 0x00000080 // GPTM Timer B Snap-Shot Mode +#define TIMER_TBMR_TBWOT 0x00000040 // GPTM Timer B Wait-on-Trigger +#define TIMER_TBMR_TBMIE 0x00000020 // GPTM Timer B Match Interrupt + // Enable +#define TIMER_TBMR_TBCDIR 0x00000010 // GPTM Timer B Count Direction +#define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode + // Select +#define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode +#define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode +#define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CTL register. +// +//***************************************************************************** +#define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level +#define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger + // Enable +#define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode +#define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge +#define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges +#define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable +#define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable +#define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level +#define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger + // Enable +#define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable +#define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode +#define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge +#define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges +#define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable +#define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_IMR register. +// +//***************************************************************************** +#define TIMER_IMR_TBMIM 0x00000800 // GPTM Timer B Mode Match + // Interrupt Mask +#define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt + // Mask +#define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt + // Mask +#define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt + // Mask +#define TIMER_IMR_TAMIM 0x00000010 // GPTM Timer A Mode Match + // Interrupt Mask +#define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask +#define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt + // Mask +#define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt + // Mask +#define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_RIS register. +// +//***************************************************************************** +#define TIMER_RIS_TBMRIS 0x00000800 // GPTM Timer B Mode Match Raw + // Interrupt +#define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw + // Interrupt +#define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw + // Interrupt +#define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw + // Interrupt +#define TIMER_RIS_TAMRIS 0x00000010 // GPTM Timer A Mode Match Raw + // Interrupt +#define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt +#define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw + // Interrupt +#define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw + // Interrupt +#define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_MIS register. +// +//***************************************************************************** +#define TIMER_MIS_TBMMIS 0x00000800 // GPTM Timer B Mode Match Masked + // Interrupt +#define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked + // Interrupt +#define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked + // Interrupt +#define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked + // Interrupt +#define TIMER_MIS_TAMMIS 0x00000010 // GPTM Timer A Mode Match Masked + // Interrupt +#define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt +#define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked + // Interrupt +#define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked + // Interrupt +#define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_ICR register. +// +//***************************************************************************** +#define TIMER_ICR_TBMCINT 0x00000800 // GPTM Timer B Mode Match + // Interrupt Clear +#define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt + // Clear +#define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt + // Clear +#define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt + // Clear +#define TIMER_ICR_TAMCINT 0x00000010 // GPTM Timer A Mode Match + // Interrupt Clear +#define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear +#define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt + // Clear +#define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt + // Clear +#define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAILR register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load + // Register High +#define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load + // Register Low +#define TIMER_TAILR_TAILRH_S 16 +#define TIMER_TAILR_TAILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBILR register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load + // Register +#define TIMER_TBILR_TBILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High +#define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low +#define TIMER_TAMATCHR_TAMRH_S 16 +#define TIMER_TAMATCHR_TAMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low +#define TIMER_TBMATCHR_TBMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPR register. +// +//***************************************************************************** +#define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale +#define TIMER_TAPR_TAPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPR register. +// +//***************************************************************************** +#define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale +#define TIMER_TBPR_TBPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPMR register. +// +//***************************************************************************** +#define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match +#define TIMER_TAPMR_TAPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPMR register. +// +//***************************************************************************** +#define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match +#define TIMER_TBPMR_TBPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAR register. +// +//***************************************************************************** +#define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High +#define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAR_TARH_S 16 +#define TIMER_TAR_TARL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBR register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL_M 0x00FFFFFF // GPTM Timer B +#define TIMER_TBR_TBRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAV register. +// +//***************************************************************************** +#define TIMER_TAV_TAVH_M 0xFFFF0000 // GPTM Timer A Value High +#define TIMER_TAV_TAVL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAV_TAVH_S 16 +#define TIMER_TAV_TAVL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBV register. +// +//***************************************************************************** +#define TIMER_TBV_TBVL_M 0x0000FFFF // GPTM Timer B Register +#define TIMER_TBV_TBVL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_CFG +// register. +// +//***************************************************************************** +#define TIMER_CFG_CFG_MSK 0x00000007 // Configuration options mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_CTL +// register. +// +//***************************************************************************** +#define TIMER_CTL_TBEVENT_MSK 0x00000C00 // TimerB event mode mask +#define TIMER_CTL_TAEVENT_MSK 0x0000000C // TimerA event mode mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_RIS +// register. +// +//***************************************************************************** +#define TIMER_RIS_CBEMIS 0x00000400 // CaptureB event masked int status +#define TIMER_RIS_CBMMIS 0x00000200 // CaptureB match masked int status +#define TIMER_RIS_TBTOMIS 0x00000100 // TimerB time out masked int stat +#define TIMER_RIS_RTCMIS 0x00000008 // RTC masked int status +#define TIMER_RIS_CAEMIS 0x00000004 // CaptureA event masked int status +#define TIMER_RIS_CAMMIS 0x00000002 // CaptureA match masked int status +#define TIMER_RIS_TATOMIS 0x00000001 // TimerA time out masked int stat + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TAILR +// register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH 0xFFFF0000 // TimerB load val in 32 bit mode +#define TIMER_TAILR_TAILRL 0x0000FFFF // TimerA interval load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TBILR +// register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL 0x0000FFFF // TimerB interval load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// TIMER_O_TAMATCHR register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH 0xFFFF0000 // TimerB match val in 32 bit mode +#define TIMER_TAMATCHR_TAMRL 0x0000FFFF // TimerA match value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// TIMER_O_TBMATCHR register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL 0x0000FFFF // TimerB match load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TAR +// register. +// +//***************************************************************************** +#define TIMER_TAR_TARH 0xFFFF0000 // TimerB val in 32 bit mode +#define TIMER_TAR_TARL 0x0000FFFF // TimerA value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TBR +// register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL 0x0000FFFF // TimerB value + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the timer +// registers. +// +//***************************************************************************** +#define TIMER_RV_TAILR 0xFFFFFFFF // TimerA interval load reg RV +#define TIMER_RV_TAR 0xFFFFFFFF // TimerA register RV +#define TIMER_RV_TAMATCHR 0xFFFFFFFF // TimerA match register RV +#define TIMER_RV_TBILR 0x0000FFFF // TimerB interval load reg RV +#define TIMER_RV_TBMATCHR 0x0000FFFF // TimerB match register RV +#define TIMER_RV_TBR 0x0000FFFF // TimerB register RV +#define TIMER_RV_TAPR 0x00000000 // TimerA prescale register RV +#define TIMER_RV_CFG 0x00000000 // Configuration register RV +#define TIMER_RV_TBPMR 0x00000000 // TimerB prescale match regi RV +#define TIMER_RV_TAPMR 0x00000000 // TimerA prescale match reg RV +#define TIMER_RV_CTL 0x00000000 // Control register RV +#define TIMER_RV_ICR 0x00000000 // Interrupt clear register RV +#define TIMER_RV_TBMR 0x00000000 // TimerB mode register RV +#define TIMER_RV_MIS 0x00000000 // Masked interrupt status reg RV +#define TIMER_RV_RIS 0x00000000 // Interrupt status register RV +#define TIMER_RV_TBPR 0x00000000 // TimerB prescale register RV +#define TIMER_RV_IMR 0x00000000 // Interrupt mask register RV +#define TIMER_RV_TAMR 0x00000000 // TimerA mode register RV + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnMR +// register. +// +//***************************************************************************** +#define TIMER_TNMR_TNAMS 0x00000008 // Alternate mode select +#define TIMER_TNMR_TNCMR 0x00000004 // Capture mode - count or time +#define TIMER_TNMR_TNTMR_MSK 0x00000003 // Timer mode mask +#define TIMER_TNMR_TNTMR_1_SHOT 0x00000001 // Mode - one shot +#define TIMER_TNMR_TNTMR_PERIOD 0x00000002 // Mode - periodic +#define TIMER_TNMR_TNTMR_CAP 0x00000003 // Mode - capture + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnPR +// register. +// +//***************************************************************************** +#define TIMER_TNPR_TNPSR 0x000000FF // TimerN prescale value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnPMR +// register. +// +//***************************************************************************** +#define TIMER_TNPMR_TNPSMR 0x000000FF // TimerN prescale match value + +#endif + +#endif // __HW_TIMER_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_types.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_types.h new file mode 100644 index 00000000..c62428aa --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_types.h @@ -0,0 +1,185 @@ +//***************************************************************************** +// +// hw_types.h - Common types and macros. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TYPES_H__ +#define __HW_TYPES_H__ + +//***************************************************************************** +// +// Define a boolean type, and values for true and false. +// +//***************************************************************************** +typedef unsigned char tBoolean; + +#ifndef true +#define true 1 +#endif + +#ifndef false +#define false 0 +#endif + +//***************************************************************************** +// +// Macros for hardware access, both direct and via the bit-band region. +// +//***************************************************************************** +#define HWREG(x) \ + (*((volatile unsigned long *)(x))) +#define HWREGH(x) \ + (*((volatile unsigned short *)(x))) +#define HWREGB(x) \ + (*((volatile unsigned char *)(x))) +#define HWREGBITW(x, b) \ + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITH(x, b) \ + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITB(x, b) \ + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + +//***************************************************************************** +// +// Helper Macros for determining silicon revisions, etc. +// +// These macros will be used by Driverlib at "run-time" to create necessary +// conditional code blocks that will allow a single version of the Driverlib +// "binary" code to support multiple(all) Stellaris silicon revisions. +// +// It is expected that these macros will be used inside of a standard 'C' +// conditional block of code, e.g. +// +// if(CLASS_IS_SANDSTORM) +// { +// do some Sandstorm-class specific code here. +// } +// +// By default, these macros will be defined as run-time checks of the +// appropriate register(s) to allow creation of run-time conditional code +// blocks for a common DriverLib across the entire Stellaris family. +// +// However, if code-space optimization is required, these macros can be "hard- +// coded" for a specific version of Stellaris silicon. Many compilers will +// then detect the "hard-coded" conditionals, and appropriately optimize the +// code blocks, eliminating any "unreachable" code. This would result in +// a smaller Driverlib, thus producing a smaller final application size, but +// at the cost of limiting the Driverlib binary to a specific Stellaris +// silicon revision. +// +//***************************************************************************** +#ifndef CLASS_IS_SANDSTORM +#define CLASS_IS_SANDSTORM \ + (((HWREG(SYSCTL_DID0) & SYSCTL_DID0_VER_M) == SYSCTL_DID0_VER_0) || \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_SANDSTORM))) +#endif + +#ifndef CLASS_IS_FURY +#define CLASS_IS_FURY \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_FURY)) +#endif + +#ifndef CLASS_IS_DUSTDEVIL +#define CLASS_IS_DUSTDEVIL \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_DUSTDEVIL)) +#endif + +#ifndef CLASS_IS_TEMPEST +#define CLASS_IS_TEMPEST \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TEMPEST)) +#endif + +#ifndef REVISION_IS_A0 +#define REVISION_IS_A0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A1 +#define REVISION_IS_A1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A2 +#define REVISION_IS_A2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_B0 +#define REVISION_IS_B0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_B1 +#define REVISION_IS_B1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C0 +#define REVISION_IS_C0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_C1 +#define REVISION_IS_C1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C2 +#define REVISION_IS_C2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_C3 +#define REVISION_IS_C3 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_3)) +#endif + +//***************************************************************************** +// +// Deprecated silicon class and revision detection macros. +// +//***************************************************************************** +#ifndef DEPRECATED +#define DEVICE_IS_SANDSTORM CLASS_IS_SANDSTORM +#define DEVICE_IS_FURY CLASS_IS_FURY +#define DEVICE_IS_REVA2 REVISION_IS_A2 +#define DEVICE_IS_REVC1 REVISION_IS_C1 +#define DEVICE_IS_REVC2 REVISION_IS_C2 +#endif + +#endif // __HW_TYPES_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_uart.h new file mode 100644 index 00000000..b6613861 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_uart.h @@ -0,0 +1,458 @@ +//***************************************************************************** +// +// hw_uart.h - Macros and defines used when accessing the UART hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UART_H__ +#define __HW_UART_H__ + +//***************************************************************************** +// +// The following are defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_DR 0x00000000 // UART Data +#define UART_O_RSR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_ECR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_FR 0x00000018 // UART Flag +#define UART_O_ILPR 0x00000020 // UART IrDA Low-Power Register +#define UART_O_IBRD 0x00000024 // UART Integer Baud-Rate Divisor +#define UART_O_FBRD 0x00000028 // UART Fractional Baud-Rate + // Divisor +#define UART_O_LCRH 0x0000002C // UART Line Control +#define UART_O_CTL 0x00000030 // UART Control +#define UART_O_IFLS 0x00000034 // UART Interrupt FIFO Level Select +#define UART_O_IM 0x00000038 // UART Interrupt Mask +#define UART_O_RIS 0x0000003C // UART Raw Interrupt Status +#define UART_O_MIS 0x00000040 // UART Masked Interrupt Status +#define UART_O_ICR 0x00000044 // UART Interrupt Clear +#define UART_O_DMACTL 0x00000048 // UART DMA Control +#define UART_O_LCTL 0x00000090 // UART LIN Control +#define UART_O_LSS 0x00000094 // UART LIN Snap Shot +#define UART_O_LTIM 0x00000098 // UART LIN Timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_RI 0x00000100 // Ring Indicator +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy +#define UART_FR_DCD 0x00000004 // Data Carrier Detect +#define UART_FR_DSR 0x00000002 // Data Set Ready +#define UART_FR_CTS 0x00000001 // Clear To Send + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_CTSEN 0x00008000 // Enable Clear To Send +#define UART_CTL_RTSEN 0x00004000 // Enable Request to Send +#define UART_CTL_RTS 0x00000800 // Request to Send +#define UART_CTL_DTR 0x00000400 // Data Terminal Ready +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_LIN 0x00000040 // LIN Mode Enable +#define UART_CTL_HSE 0x00000020 // High-Speed Enable +#define UART_CTL_EOT 0x00000010 // End of Transmission +#define UART_CTL_SMART 0x00000008 // ISO 7816 Smart Card Support +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_LME5IM 0x00008000 // LIN Mode Edge 5 Interrupt Mask +#define UART_IM_LME1IM 0x00004000 // LIN Mode Edge 1 Interrupt Mask +#define UART_IM_LMSBIM 0x00002000 // LIN Mode Sync Break Interrupt + // Mask +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask +#define UART_IM_DSRMIM 0x00000008 // UART Data Set Ready Modem + // Interrupt Mask +#define UART_IM_DCDMIM 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Mask +#define UART_IM_CTSMIM 0x00000002 // UART Clear to Send Modem + // Interrupt Mask +#define UART_IM_RIMIM 0x00000001 // UART Ring Indicator Modem + // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_LME5RIS 0x00008000 // LIN Mode Edge 5 Raw Interrupt + // Status +#define UART_RIS_LME1RIS 0x00004000 // LIN Mode Edge 1 Raw Interrupt + // Status +#define UART_RIS_LMSBRIS 0x00002000 // LIN Mode Sync Break Raw + // Interrupt Status +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status +#define UART_RIS_DSRRIS 0x00000008 // UART Data Set Ready Modem Raw + // Interrupt Status +#define UART_RIS_DCDRIS 0x00000004 // UART Data Carrier Detect Modem + // Raw Interrupt Status +#define UART_RIS_CTSRIS 0x00000002 // UART Clear to Send Modem Raw + // Interrupt Status +#define UART_RIS_RIRIS 0x00000001 // UART Ring Indicator Modem Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_LME5MIS 0x00008000 // LIN Mode Edge 5 Masked Interrupt + // Status +#define UART_MIS_LME1MIS 0x00004000 // LIN Mode Edge 1 Masked Interrupt + // Status +#define UART_MIS_LMSBMIS 0x00002000 // LIN Mode Sync Break Masked + // Interrupt Status +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status +#define UART_MIS_DSRMIS 0x00000008 // UART Data Set Ready Modem Masked + // Interrupt Status +#define UART_MIS_DCDMIS 0x00000004 // UART Data Carrier Detect Modem + // Masked Interrupt Status +#define UART_MIS_CTSMIS 0x00000002 // UART Clear to Send Modem Masked + // Interrupt Status +#define UART_MIS_RIMIS 0x00000001 // UART Ring Indicator Modem Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_LME5MIC 0x00008000 // LIN Mode Edge 5 Interrupt Clear +#define UART_ICR_LME1MIC 0x00004000 // LIN Mode Edge 1 Interrupt Clear +#define UART_ICR_LMSBMIC 0x00002000 // LIN Mode Sync Break Interrupt + // Clear +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear +#define UART_ICR_DSRMIC 0x00000008 // UART Data Set Ready Modem + // Interrupt Clear +#define UART_ICR_DCDMIC 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Clear +#define UART_ICR_CTSMIC 0x00000002 // UART Clear to Send Modem + // Interrupt Clear +#define UART_ICR_RIMIC 0x00000001 // UART Ring Indicator Modem + // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DMACTL register. +// +//***************************************************************************** +#define UART_DMACTL_DMAERR 0x00000004 // DMA on Error +#define UART_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define UART_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCTL register. +// +//***************************************************************************** +#define UART_LCTL_BLEN_M 0x00000030 // Sync Break Length +#define UART_LCTL_BLEN_13T 0x00000000 // Sync break length is 13T bits + // (default) +#define UART_LCTL_BLEN_14T 0x00000010 // Sync break length is 14T bits +#define UART_LCTL_BLEN_15T 0x00000020 // Sync break length is 15T bits +#define UART_LCTL_BLEN_16T 0x00000030 // Sync break length is 16T bits +#define UART_LCTL_MASTER 0x00000001 // LIN Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LSS register. +// +//***************************************************************************** +#define UART_LSS_TSS_M 0x0000FFFF // Timer Snap Shot +#define UART_LSS_TSS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LTIM register. +// +//***************************************************************************** +#define UART_LTIM_TIMER_M 0x0000FFFF // Timer Value +#define UART_LTIM_TIMER_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_LCR_H 0x0000002C // Line Control Register, HIGH byte +#define UART_O_PeriphID4 0x00000FD0 +#define UART_O_PeriphID5 0x00000FD4 +#define UART_O_PeriphID6 0x00000FD8 +#define UART_O_PeriphID7 0x00000FDC +#define UART_O_PeriphID0 0x00000FE0 +#define UART_O_PeriphID1 0x00000FE4 +#define UART_O_PeriphID2 0x00000FE8 +#define UART_O_PeriphID3 0x00000FEC +#define UART_O_PCellID0 0x00000FF0 +#define UART_O_PCellID1 0x00000FF4 +#define UART_O_PCellID2 0x00000FF8 +#define UART_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_DR +// register. +// +//***************************************************************************** +#define UART_DR_DATA_MASK 0x000000FF // UART data + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IBRD +// register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_MASK 0x0000FFFF // Integer baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_FBRD +// register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_MASK 0x0000003F // Fractional baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_LCR_H +// register. +// +//***************************************************************************** +#define UART_LCR_H_SPS 0x00000080 // Stick Parity Select +#define UART_LCR_H_WLEN 0x00000060 // Word length +#define UART_LCR_H_WLEN_5 0x00000000 // 5 bit data +#define UART_LCR_H_WLEN_6 0x00000020 // 6 bit data +#define UART_LCR_H_WLEN_7 0x00000040 // 7 bit data +#define UART_LCR_H_WLEN_8 0x00000060 // 8 bit data +#define UART_LCR_H_FEN 0x00000010 // Enable FIFO +#define UART_LCR_H_STP2 0x00000008 // Two Stop Bits Select +#define UART_LCR_H_EPS 0x00000004 // Even Parity Select +#define UART_LCR_H_PEN 0x00000002 // Parity Enable +#define UART_LCR_H_BRK 0x00000001 // Send Break + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IFLS +// register. +// +//***************************************************************************** +#define UART_IFLS_RX_MASK 0x00000038 // RX FIFO level mask +#define UART_IFLS_TX_MASK 0x00000007 // TX FIFO level mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_ICR +// register. +// +//***************************************************************************** +#define UART_RSR_ANY (UART_RSR_OE | UART_RSR_BE | UART_RSR_PE | \ + UART_RSR_FE) + +//***************************************************************************** +// +// The following are deprecated defines for the Reset Values for UART +// Registers. +// +//***************************************************************************** +#define UART_RV_CTL 0x00000300 +#define UART_RV_PCellID1 0x000000F0 +#define UART_RV_PCellID3 0x000000B1 +#define UART_RV_FR 0x00000090 +#define UART_RV_PeriphID2 0x00000018 +#define UART_RV_IFLS 0x00000012 +#define UART_RV_PeriphID0 0x00000011 +#define UART_RV_PCellID0 0x0000000D +#define UART_RV_PCellID2 0x00000005 +#define UART_RV_PeriphID3 0x00000001 +#define UART_RV_PeriphID4 0x00000000 +#define UART_RV_LCR_H 0x00000000 +#define UART_RV_PeriphID6 0x00000000 +#define UART_RV_DR 0x00000000 +#define UART_RV_RSR 0x00000000 +#define UART_RV_ECR 0x00000000 +#define UART_RV_PeriphID5 0x00000000 +#define UART_RV_RIS 0x00000000 +#define UART_RV_FBRD 0x00000000 +#define UART_RV_IM 0x00000000 +#define UART_RV_MIS 0x00000000 +#define UART_RV_ICR 0x00000000 +#define UART_RV_PeriphID1 0x00000000 +#define UART_RV_PeriphID7 0x00000000 +#define UART_RV_IBRD 0x00000000 + +#endif + +#endif // __HW_UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_udma.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_udma.h new file mode 100644 index 00000000..6f6270b1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_udma.h @@ -0,0 +1,331 @@ +//***************************************************************************** +// +// hw_udma.h - Macros for use in accessing the UDMA registers. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UDMA_H__ +#define __HW_UDMA_H__ + +//***************************************************************************** +// +// The following are defines for the Micro Direct Memory Access register +// addresses. +// +//***************************************************************************** +#define UDMA_STAT 0x400FF000 // DMA Status +#define UDMA_CFG 0x400FF004 // DMA Configuration +#define UDMA_CTLBASE 0x400FF008 // DMA Channel Control Base Pointer +#define UDMA_ALTBASE 0x400FF00C // DMA Alternate Channel Control + // Base Pointer +#define UDMA_WAITSTAT 0x400FF010 // DMA Channel Wait-on-Request + // Status +#define UDMA_SWREQ 0x400FF014 // DMA Channel Software Request +#define UDMA_USEBURSTSET 0x400FF018 // DMA Channel Useburst Set +#define UDMA_USEBURSTCLR 0x400FF01C // DMA Channel Useburst Clear +#define UDMA_REQMASKSET 0x400FF020 // DMA Channel Request Mask Set +#define UDMA_REQMASKCLR 0x400FF024 // DMA Channel Request Mask Clear +#define UDMA_ENASET 0x400FF028 // DMA Channel Enable Set +#define UDMA_ENACLR 0x400FF02C // DMA Channel Enable Clear +#define UDMA_ALTSET 0x400FF030 // DMA Channel Primary Alternate + // Set +#define UDMA_ALTCLR 0x400FF034 // DMA Channel Primary Alternate + // Clear +#define UDMA_PRIOSET 0x400FF038 // DMA Channel Priority Set +#define UDMA_PRIOCLR 0x400FF03C // DMA Channel Priority Clear +#define UDMA_ERRCLR 0x400FF04C // DMA Bus Error Clear +#define UDMA_CHASGN 0x400FF500 // DMA Channel Assignment + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_STAT register. +// +//***************************************************************************** +#define UDMA_STAT_DMACHANS_M 0x001F0000 // Available uDMA Channels Minus 1 +#define UDMA_STAT_STATE_M 0x000000F0 // Control State Machine Status +#define UDMA_STAT_STATE_IDLE 0x00000000 // Idle +#define UDMA_STAT_STATE_RD_CTRL 0x00000010 // Reading channel controller data +#define UDMA_STAT_STATE_RD_SRCENDP \ + 0x00000020 // Reading source end pointer +#define UDMA_STAT_STATE_RD_DSTENDP \ + 0x00000030 // Reading destination end pointer +#define UDMA_STAT_STATE_RD_SRCDAT \ + 0x00000040 // Reading source data +#define UDMA_STAT_STATE_WR_DSTDAT \ + 0x00000050 // Writing destination data +#define UDMA_STAT_STATE_WAIT 0x00000060 // Waiting for uDMA request to + // clear +#define UDMA_STAT_STATE_WR_CTRL 0x00000070 // Writing channel controller data +#define UDMA_STAT_STATE_STALL 0x00000080 // Stalled +#define UDMA_STAT_STATE_DONE 0x00000090 // Done +#define UDMA_STAT_STATE_UNDEF 0x000000A0 // Undefined +#define UDMA_STAT_MASTEN 0x00000001 // Master Enable Status +#define UDMA_STAT_DMACHANS_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CFG register. +// +//***************************************************************************** +#define UDMA_CFG_MASTEN 0x00000001 // Controller Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CTLBASE register. +// +//***************************************************************************** +#define UDMA_CTLBASE_ADDR_M 0xFFFFFC00 // Channel Control Base Address +#define UDMA_CTLBASE_ADDR_S 10 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTBASE register. +// +//***************************************************************************** +#define UDMA_ALTBASE_ADDR_M 0xFFFFFFFF // Alternate Channel Address + // Pointer +#define UDMA_ALTBASE_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_WAITSTAT register. +// +//***************************************************************************** +#define UDMA_WAITSTAT_WAITREQ_M 0xFFFFFFFF // Channel [n] Wait Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_SWREQ register. +// +//***************************************************************************** +#define UDMA_SWREQ_M 0xFFFFFFFF // Channel [n] Software Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_USEBURSTSET +// register. +// +//***************************************************************************** +#define UDMA_USEBURSTSET_SET_M 0xFFFFFFFF // Channel [n] Useburst Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_USEBURSTCLR +// register. +// +//***************************************************************************** +#define UDMA_USEBURSTCLR_CLR_M 0xFFFFFFFF // Channel [n] Useburst Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_REQMASKSET +// register. +// +//***************************************************************************** +#define UDMA_REQMASKSET_SET_M 0xFFFFFFFF // Channel [n] Request Mask Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_REQMASKCLR +// register. +// +//***************************************************************************** +#define UDMA_REQMASKCLR_CLR_M 0xFFFFFFFF // Channel [n] Request Mask Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ENASET register. +// +//***************************************************************************** +#define UDMA_ENASET_SET_M 0xFFFFFFFF // Channel [n] Enable Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ENACLR register. +// +//***************************************************************************** +#define UDMA_ENACLR_CLR_M 0xFFFFFFFF // Clear Channel [n] Enable Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTSET register. +// +//***************************************************************************** +#define UDMA_ALTSET_SET_M 0xFFFFFFFF // Channel [n] Alternate Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTCLR register. +// +//***************************************************************************** +#define UDMA_ALTCLR_CLR_M 0xFFFFFFFF // Channel [n] Alternate Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_PRIOSET register. +// +//***************************************************************************** +#define UDMA_PRIOSET_SET_M 0xFFFFFFFF // Channel [n] Priority Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_PRIOCLR register. +// +//***************************************************************************** +#define UDMA_PRIOCLR_CLR_M 0xFFFFFFFF // Channel [n] Priority Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ERRCLR register. +// +//***************************************************************************** +#define UDMA_ERRCLR_ERRCLR 0x00000001 // uDMA Bus Error Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CHASGN register. +// +//***************************************************************************** +#define UDMA_CHASGN_M 0xFFFFFFFF // Channel [n] Assignment Select +#define UDMA_CHASGN_PRIMARY 0x00000000 // Use the primary channel + // assignment +#define UDMA_CHASGN_SECONDARY 0x00000001 // Use the secondary channel + // assignment + +//***************************************************************************** +// +// The following are defines for the Micro Direct Memory Access (uDMA) offsets. +// +//***************************************************************************** +#define UDMA_O_SRCENDP 0x00000000 // DMA Channel Source Address End + // Pointer +#define UDMA_O_DSTENDP 0x00000004 // DMA Channel Destination Address + // End Pointer +#define UDMA_O_CHCTL 0x00000008 // DMA Channel Control Word + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_SRCENDP register. +// +//***************************************************************************** +#define UDMA_SRCENDP_ADDR_M 0xFFFFFFFF // Source Address End Pointer +#define UDMA_SRCENDP_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_DSTENDP register. +// +//***************************************************************************** +#define UDMA_DSTENDP_ADDR_M 0xFFFFFFFF // Destination Address End Pointer +#define UDMA_DSTENDP_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_CHCTL register. +// +//***************************************************************************** +#define UDMA_CHCTL_DSTINC_M 0xC0000000 // Destination Address Increment +#define UDMA_CHCTL_DSTINC_8 0x00000000 // Byte +#define UDMA_CHCTL_DSTINC_16 0x40000000 // Half-word +#define UDMA_CHCTL_DSTINC_32 0x80000000 // Word +#define UDMA_CHCTL_DSTINC_NONE 0xC0000000 // No increment +#define UDMA_CHCTL_DSTSIZE_M 0x30000000 // Destination Data Size +#define UDMA_CHCTL_DSTSIZE_8 0x00000000 // Byte +#define UDMA_CHCTL_DSTSIZE_16 0x10000000 // Half-word +#define UDMA_CHCTL_DSTSIZE_32 0x20000000 // Word +#define UDMA_CHCTL_SRCINC_M 0x0C000000 // Source Address Increment +#define UDMA_CHCTL_SRCINC_8 0x00000000 // Byte +#define UDMA_CHCTL_SRCINC_16 0x04000000 // Half-word +#define UDMA_CHCTL_SRCINC_32 0x08000000 // Word +#define UDMA_CHCTL_SRCINC_NONE 0x0C000000 // No increment +#define UDMA_CHCTL_SRCSIZE_M 0x03000000 // Source Data Size +#define UDMA_CHCTL_SRCSIZE_8 0x00000000 // Byte +#define UDMA_CHCTL_SRCSIZE_16 0x01000000 // Half-word +#define UDMA_CHCTL_SRCSIZE_32 0x02000000 // Word +#define UDMA_CHCTL_ARBSIZE_M 0x0003C000 // Arbitration Size +#define UDMA_CHCTL_ARBSIZE_1 0x00000000 // 1 Transfer +#define UDMA_CHCTL_ARBSIZE_2 0x00004000 // 2 Transfers +#define UDMA_CHCTL_ARBSIZE_4 0x00008000 // 4 Transfers +#define UDMA_CHCTL_ARBSIZE_8 0x0000C000 // 8 Transfers +#define UDMA_CHCTL_ARBSIZE_16 0x00010000 // 16 Transfers +#define UDMA_CHCTL_ARBSIZE_32 0x00014000 // 32 Transfers +#define UDMA_CHCTL_ARBSIZE_64 0x00018000 // 64 Transfers +#define UDMA_CHCTL_ARBSIZE_128 0x0001C000 // 128 Transfers +#define UDMA_CHCTL_ARBSIZE_256 0x00020000 // 256 Transfers +#define UDMA_CHCTL_ARBSIZE_512 0x00024000 // 512 Transfers +#define UDMA_CHCTL_ARBSIZE_1024 0x00028000 // 1024 Transfers +#define UDMA_CHCTL_XFERSIZE_M 0x00003FF0 // Transfer Size (minus 1) +#define UDMA_CHCTL_NXTUSEBURST 0x00000008 // Next Useburst +#define UDMA_CHCTL_XFERMODE_M 0x00000007 // uDMA Transfer Mode +#define UDMA_CHCTL_XFERMODE_STOP \ + 0x00000000 // Stop +#define UDMA_CHCTL_XFERMODE_BASIC \ + 0x00000001 // Basic +#define UDMA_CHCTL_XFERMODE_AUTO \ + 0x00000002 // Auto-Request +#define UDMA_CHCTL_XFERMODE_PINGPONG \ + 0x00000003 // Ping-Pong +#define UDMA_CHCTL_XFERMODE_MEM_SG \ + 0x00000004 // Memory Scatter-Gather +#define UDMA_CHCTL_XFERMODE_MEM_SGA \ + 0x00000005 // Alternate Memory Scatter-Gather +#define UDMA_CHCTL_XFERMODE_PER_SG \ + 0x00000006 // Peripheral Scatter-Gather +#define UDMA_CHCTL_XFERMODE_PER_SGA \ + 0x00000007 // Alternate Peripheral + // Scatter-Gather +#define UDMA_CHCTL_XFERSIZE_S 4 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Micro Direct Memory Access +// register addresses. +// +//***************************************************************************** +#define UDMA_CHALT 0x400FF500 // DMA Channel Alternate Select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UDMA_ENASET +// register. +// +//***************************************************************************** +#define UDMA_ENASET_CHENSET_M 0xFFFFFFFF // Channel [n] Enable Set + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UDMA_CHALT +// register. +// +//***************************************************************************** +#define UDMA_CHALT_M 0xFFFFFFFF // Channel [n] Alternate Assignment + // Select + +#endif + +#endif // __HW_UDMA_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_usb.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_usb.h new file mode 100644 index 00000000..0dda4a4c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_usb.h @@ -0,0 +1,4620 @@ +//***************************************************************************** +// +// hw_usb.h - Macros for use in accessing the USB registers. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_USB_H__ +#define __HW_USB_H__ + +//***************************************************************************** +// +// The following are defines for the Univeral Serial Bus register offsets. +// +//***************************************************************************** +#define USB_O_FADDR 0x00000000 // USB Device Functional Address +#define USB_O_POWER 0x00000001 // USB Power +#define USB_O_TXIS 0x00000002 // USB Transmit Interrupt Status +#define USB_O_RXIS 0x00000004 // USB Receive Interrupt Status +#define USB_O_TXIE 0x00000006 // USB Transmit Interrupt Enable +#define USB_O_RXIE 0x00000008 // USB Receive Interrupt Enable +#define USB_O_IS 0x0000000A // USB General Interrupt Status +#define USB_O_IE 0x0000000B // USB Interrupt Enable +#define USB_O_FRAME 0x0000000C // USB Frame Value +#define USB_O_EPIDX 0x0000000E // USB Endpoint Index +#define USB_O_TEST 0x0000000F // USB Test Mode +#define USB_O_FIFO0 0x00000020 // USB FIFO Endpoint 0 +#define USB_O_FIFO1 0x00000024 // USB FIFO Endpoint 1 +#define USB_O_FIFO2 0x00000028 // USB FIFO Endpoint 2 +#define USB_O_FIFO3 0x0000002C // USB FIFO Endpoint 3 +#define USB_O_FIFO4 0x00000030 // USB FIFO Endpoint 4 +#define USB_O_FIFO5 0x00000034 // USB FIFO Endpoint 5 +#define USB_O_FIFO6 0x00000038 // USB FIFO Endpoint 6 +#define USB_O_FIFO7 0x0000003C // USB FIFO Endpoint 7 +#define USB_O_FIFO8 0x00000040 // USB FIFO Endpoint 8 +#define USB_O_FIFO9 0x00000044 // USB FIFO Endpoint 9 +#define USB_O_FIFO10 0x00000048 // USB FIFO Endpoint 10 +#define USB_O_FIFO11 0x0000004C // USB FIFO Endpoint 11 +#define USB_O_FIFO12 0x00000050 // USB FIFO Endpoint 12 +#define USB_O_FIFO13 0x00000054 // USB FIFO Endpoint 13 +#define USB_O_FIFO14 0x00000058 // USB FIFO Endpoint 14 +#define USB_O_FIFO15 0x0000005C // USB FIFO Endpoint 15 +#define USB_O_DEVCTL 0x00000060 // USB Device Control +#define USB_O_TXFIFOSZ 0x00000062 // USB Transmit Dynamic FIFO Sizing +#define USB_O_RXFIFOSZ 0x00000063 // USB Receive Dynamic FIFO Sizing +#define USB_O_TXFIFOADD 0x00000064 // USB Transmit FIFO Start Address +#define USB_O_RXFIFOADD 0x00000066 // USB Receive FIFO Start Address +#define USB_O_CONTIM 0x0000007A // USB Connect Timing +#define USB_O_VPLEN 0x0000007B // USB OTG VBUS Pulse Timing +#define USB_O_FSEOF 0x0000007D // USB Full-Speed Last Transaction + // to End of Frame Timing +#define USB_O_LSEOF 0x0000007E // USB Low-Speed Last Transaction + // to End of Frame Timing +#define USB_O_TXFUNCADDR0 0x00000080 // USB Transmit Functional Address + // Endpoint 0 +#define USB_O_TXHUBADDR0 0x00000082 // USB Transmit Hub Address + // Endpoint 0 +#define USB_O_TXHUBPORT0 0x00000083 // USB Transmit Hub Port Endpoint 0 +#define USB_O_TXFUNCADDR1 0x00000088 // USB Transmit Functional Address + // Endpoint 1 +#define USB_O_TXHUBADDR1 0x0000008A // USB Transmit Hub Address + // Endpoint 1 +#define USB_O_TXHUBPORT1 0x0000008B // USB Transmit Hub Port Endpoint 1 +#define USB_O_RXFUNCADDR1 0x0000008C // USB Receive Functional Address + // Endpoint 1 +#define USB_O_RXHUBADDR1 0x0000008E // USB Receive Hub Address Endpoint + // 1 +#define USB_O_RXHUBPORT1 0x0000008F // USB Receive Hub Port Endpoint 1 +#define USB_O_TXFUNCADDR2 0x00000090 // USB Transmit Functional Address + // Endpoint 2 +#define USB_O_TXHUBADDR2 0x00000092 // USB Transmit Hub Address + // Endpoint 2 +#define USB_O_TXHUBPORT2 0x00000093 // USB Transmit Hub Port Endpoint 2 +#define USB_O_RXFUNCADDR2 0x00000094 // USB Receive Functional Address + // Endpoint 2 +#define USB_O_RXHUBADDR2 0x00000096 // USB Receive Hub Address Endpoint + // 2 +#define USB_O_RXHUBPORT2 0x00000097 // USB Receive Hub Port Endpoint 2 +#define USB_O_TXFUNCADDR3 0x00000098 // USB Transmit Functional Address + // Endpoint 3 +#define USB_O_TXHUBADDR3 0x0000009A // USB Transmit Hub Address + // Endpoint 3 +#define USB_O_TXHUBPORT3 0x0000009B // USB Transmit Hub Port Endpoint 3 +#define USB_O_RXFUNCADDR3 0x0000009C // USB Receive Functional Address + // Endpoint 3 +#define USB_O_RXHUBADDR3 0x0000009E // USB Receive Hub Address Endpoint + // 3 +#define USB_O_RXHUBPORT3 0x0000009F // USB Receive Hub Port Endpoint 3 +#define USB_O_TXFUNCADDR4 0x000000A0 // USB Transmit Functional Address + // Endpoint 4 +#define USB_O_TXHUBADDR4 0x000000A2 // USB Transmit Hub Address + // Endpoint 4 +#define USB_O_TXHUBPORT4 0x000000A3 // USB Transmit Hub Port Endpoint 4 +#define USB_O_RXFUNCADDR4 0x000000A4 // USB Receive Functional Address + // Endpoint 4 +#define USB_O_RXHUBADDR4 0x000000A6 // USB Receive Hub Address Endpoint + // 4 +#define USB_O_RXHUBPORT4 0x000000A7 // USB Receive Hub Port Endpoint 4 +#define USB_O_TXFUNCADDR5 0x000000A8 // USB Transmit Functional Address + // Endpoint 5 +#define USB_O_TXHUBADDR5 0x000000AA // USB Transmit Hub Address + // Endpoint 5 +#define USB_O_TXHUBPORT5 0x000000AB // USB Transmit Hub Port Endpoint 5 +#define USB_O_RXFUNCADDR5 0x000000AC // USB Receive Functional Address + // Endpoint 5 +#define USB_O_RXHUBADDR5 0x000000AE // USB Receive Hub Address Endpoint + // 5 +#define USB_O_RXHUBPORT5 0x000000AF // USB Receive Hub Port Endpoint 5 +#define USB_O_TXFUNCADDR6 0x000000B0 // USB Transmit Functional Address + // Endpoint 6 +#define USB_O_TXHUBADDR6 0x000000B2 // USB Transmit Hub Address + // Endpoint 6 +#define USB_O_TXHUBPORT6 0x000000B3 // USB Transmit Hub Port Endpoint 6 +#define USB_O_RXFUNCADDR6 0x000000B4 // USB Receive Functional Address + // Endpoint 6 +#define USB_O_RXHUBADDR6 0x000000B6 // USB Receive Hub Address Endpoint + // 6 +#define USB_O_RXHUBPORT6 0x000000B7 // USB Receive Hub Port Endpoint 6 +#define USB_O_TXFUNCADDR7 0x000000B8 // USB Transmit Functional Address + // Endpoint 7 +#define USB_O_TXHUBADDR7 0x000000BA // USB Transmit Hub Address + // Endpoint 7 +#define USB_O_TXHUBPORT7 0x000000BB // USB Transmit Hub Port Endpoint 7 +#define USB_O_RXFUNCADDR7 0x000000BC // USB Receive Functional Address + // Endpoint 7 +#define USB_O_RXHUBADDR7 0x000000BE // USB Receive Hub Address Endpoint + // 7 +#define USB_O_RXHUBPORT7 0x000000BF // USB Receive Hub Port Endpoint 7 +#define USB_O_TXFUNCADDR8 0x000000C0 // USB Transmit Functional Address + // Endpoint 8 +#define USB_O_TXHUBADDR8 0x000000C2 // USB Transmit Hub Address + // Endpoint 8 +#define USB_O_TXHUBPORT8 0x000000C3 // USB Transmit Hub Port Endpoint 8 +#define USB_O_RXFUNCADDR8 0x000000C4 // USB Receive Functional Address + // Endpoint 8 +#define USB_O_RXHUBADDR8 0x000000C6 // USB Receive Hub Address Endpoint + // 8 +#define USB_O_RXHUBPORT8 0x000000C7 // USB Receive Hub Port Endpoint 8 +#define USB_O_TXFUNCADDR9 0x000000C8 // USB Transmit Functional Address + // Endpoint 9 +#define USB_O_TXHUBADDR9 0x000000CA // USB Transmit Hub Address + // Endpoint 9 +#define USB_O_TXHUBPORT9 0x000000CB // USB Transmit Hub Port Endpoint 9 +#define USB_O_RXFUNCADDR9 0x000000CC // USB Receive Functional Address + // Endpoint 9 +#define USB_O_RXHUBADDR9 0x000000CE // USB Receive Hub Address Endpoint + // 9 +#define USB_O_RXHUBPORT9 0x000000CF // USB Receive Hub Port Endpoint 9 +#define USB_O_TXFUNCADDR10 0x000000D0 // USB Transmit Functional Address + // Endpoint 10 +#define USB_O_TXHUBADDR10 0x000000D2 // USB Transmit Hub Address + // Endpoint 10 +#define USB_O_TXHUBPORT10 0x000000D3 // USB Transmit Hub Port Endpoint + // 10 +#define USB_O_RXFUNCADDR10 0x000000D4 // USB Receive Functional Address + // Endpoint 10 +#define USB_O_RXHUBADDR10 0x000000D6 // USB Receive Hub Address Endpoint + // 10 +#define USB_O_RXHUBPORT10 0x000000D7 // USB Receive Hub Port Endpoint 10 +#define USB_O_TXFUNCADDR11 0x000000D8 // USB Transmit Functional Address + // Endpoint 11 +#define USB_O_TXHUBADDR11 0x000000DA // USB Transmit Hub Address + // Endpoint 11 +#define USB_O_TXHUBPORT11 0x000000DB // USB Transmit Hub Port Endpoint + // 11 +#define USB_O_RXFUNCADDR11 0x000000DC // USB Receive Functional Address + // Endpoint 11 +#define USB_O_RXHUBADDR11 0x000000DE // USB Receive Hub Address Endpoint + // 11 +#define USB_O_RXHUBPORT11 0x000000DF // USB Receive Hub Port Endpoint 11 +#define USB_O_TXFUNCADDR12 0x000000E0 // USB Transmit Functional Address + // Endpoint 12 +#define USB_O_TXHUBADDR12 0x000000E2 // USB Transmit Hub Address + // Endpoint 12 +#define USB_O_TXHUBPORT12 0x000000E3 // USB Transmit Hub Port Endpoint + // 12 +#define USB_O_RXFUNCADDR12 0x000000E4 // USB Receive Functional Address + // Endpoint 12 +#define USB_O_RXHUBADDR12 0x000000E6 // USB Receive Hub Address Endpoint + // 12 +#define USB_O_RXHUBPORT12 0x000000E7 // USB Receive Hub Port Endpoint 12 +#define USB_O_TXFUNCADDR13 0x000000E8 // USB Transmit Functional Address + // Endpoint 13 +#define USB_O_TXHUBADDR13 0x000000EA // USB Transmit Hub Address + // Endpoint 13 +#define USB_O_TXHUBPORT13 0x000000EB // USB Transmit Hub Port Endpoint + // 13 +#define USB_O_RXFUNCADDR13 0x000000EC // USB Receive Functional Address + // Endpoint 13 +#define USB_O_RXHUBADDR13 0x000000EE // USB Receive Hub Address Endpoint + // 13 +#define USB_O_RXHUBPORT13 0x000000EF // USB Receive Hub Port Endpoint 13 +#define USB_O_TXFUNCADDR14 0x000000F0 // USB Transmit Functional Address + // Endpoint 14 +#define USB_O_TXHUBADDR14 0x000000F2 // USB Transmit Hub Address + // Endpoint 14 +#define USB_O_TXHUBPORT14 0x000000F3 // USB Transmit Hub Port Endpoint + // 14 +#define USB_O_RXFUNCADDR14 0x000000F4 // USB Receive Functional Address + // Endpoint 14 +#define USB_O_RXHUBADDR14 0x000000F6 // USB Receive Hub Address Endpoint + // 14 +#define USB_O_RXHUBPORT14 0x000000F7 // USB Receive Hub Port Endpoint 14 +#define USB_O_TXFUNCADDR15 0x000000F8 // USB Transmit Functional Address + // Endpoint 15 +#define USB_O_TXHUBADDR15 0x000000FA // USB Transmit Hub Address + // Endpoint 15 +#define USB_O_TXHUBPORT15 0x000000FB // USB Transmit Hub Port Endpoint + // 15 +#define USB_O_RXFUNCADDR15 0x000000FC // USB Receive Functional Address + // Endpoint 15 +#define USB_O_RXHUBADDR15 0x000000FE // USB Receive Hub Address Endpoint + // 15 +#define USB_O_RXHUBPORT15 0x000000FF // USB Receive Hub Port Endpoint 15 +#define USB_O_CSRL0 0x00000102 // USB Control and Status Endpoint + // 0 Low +#define USB_O_CSRH0 0x00000103 // USB Control and Status Endpoint + // 0 High +#define USB_O_COUNT0 0x00000108 // USB Receive Byte Count Endpoint + // 0 +#define USB_O_TYPE0 0x0000010A // USB Type Endpoint 0 +#define USB_O_NAKLMT 0x0000010B // USB NAK Limit +#define USB_O_TXMAXP1 0x00000110 // USB Maximum Transmit Data + // Endpoint 1 +#define USB_O_TXCSRL1 0x00000112 // USB Transmit Control and Status + // Endpoint 1 Low +#define USB_O_TXCSRH1 0x00000113 // USB Transmit Control and Status + // Endpoint 1 High +#define USB_O_RXMAXP1 0x00000114 // USB Maximum Receive Data + // Endpoint 1 +#define USB_O_RXCSRL1 0x00000116 // USB Receive Control and Status + // Endpoint 1 Low +#define USB_O_RXCSRH1 0x00000117 // USB Receive Control and Status + // Endpoint 1 High +#define USB_O_RXCOUNT1 0x00000118 // USB Receive Byte Count Endpoint + // 1 +#define USB_O_TXTYPE1 0x0000011A // USB Host Transmit Configure Type + // Endpoint 1 +#define USB_O_TXINTERVAL1 0x0000011B // USB Host Transmit Interval + // Endpoint 1 +#define USB_O_RXTYPE1 0x0000011C // USB Host Configure Receive Type + // Endpoint 1 +#define USB_O_RXINTERVAL1 0x0000011D // USB Host Receive Polling + // Interval Endpoint 1 +#define USB_O_TXMAXP2 0x00000120 // USB Maximum Transmit Data + // Endpoint 2 +#define USB_O_TXCSRL2 0x00000122 // USB Transmit Control and Status + // Endpoint 2 Low +#define USB_O_TXCSRH2 0x00000123 // USB Transmit Control and Status + // Endpoint 2 High +#define USB_O_RXMAXP2 0x00000124 // USB Maximum Receive Data + // Endpoint 2 +#define USB_O_RXCSRL2 0x00000126 // USB Receive Control and Status + // Endpoint 2 Low +#define USB_O_RXCSRH2 0x00000127 // USB Receive Control and Status + // Endpoint 2 High +#define USB_O_RXCOUNT2 0x00000128 // USB Receive Byte Count Endpoint + // 2 +#define USB_O_TXTYPE2 0x0000012A // USB Host Transmit Configure Type + // Endpoint 2 +#define USB_O_TXINTERVAL2 0x0000012B // USB Host Transmit Interval + // Endpoint 2 +#define USB_O_RXTYPE2 0x0000012C // USB Host Configure Receive Type + // Endpoint 2 +#define USB_O_RXINTERVAL2 0x0000012D // USB Host Receive Polling + // Interval Endpoint 2 +#define USB_O_TXMAXP3 0x00000130 // USB Maximum Transmit Data + // Endpoint 3 +#define USB_O_TXCSRL3 0x00000132 // USB Transmit Control and Status + // Endpoint 3 Low +#define USB_O_TXCSRH3 0x00000133 // USB Transmit Control and Status + // Endpoint 3 High +#define USB_O_RXMAXP3 0x00000134 // USB Maximum Receive Data + // Endpoint 3 +#define USB_O_RXCSRL3 0x00000136 // USB Receive Control and Status + // Endpoint 3 Low +#define USB_O_RXCSRH3 0x00000137 // USB Receive Control and Status + // Endpoint 3 High +#define USB_O_RXCOUNT3 0x00000138 // USB Receive Byte Count Endpoint + // 3 +#define USB_O_TXTYPE3 0x0000013A // USB Host Transmit Configure Type + // Endpoint 3 +#define USB_O_TXINTERVAL3 0x0000013B // USB Host Transmit Interval + // Endpoint 3 +#define USB_O_RXTYPE3 0x0000013C // USB Host Configure Receive Type + // Endpoint 3 +#define USB_O_RXINTERVAL3 0x0000013D // USB Host Receive Polling + // Interval Endpoint 3 +#define USB_O_TXMAXP4 0x00000140 // USB Maximum Transmit Data + // Endpoint 4 +#define USB_O_TXCSRL4 0x00000142 // USB Transmit Control and Status + // Endpoint 4 Low +#define USB_O_TXCSRH4 0x00000143 // USB Transmit Control and Status + // Endpoint 4 High +#define USB_O_RXMAXP4 0x00000144 // USB Maximum Receive Data + // Endpoint 4 +#define USB_O_RXCSRL4 0x00000146 // USB Receive Control and Status + // Endpoint 4 Low +#define USB_O_RXCSRH4 0x00000147 // USB Receive Control and Status + // Endpoint 4 High +#define USB_O_RXCOUNT4 0x00000148 // USB Receive Byte Count Endpoint + // 4 +#define USB_O_TXTYPE4 0x0000014A // USB Host Transmit Configure Type + // Endpoint 4 +#define USB_O_TXINTERVAL4 0x0000014B // USB Host Transmit Interval + // Endpoint 4 +#define USB_O_RXTYPE4 0x0000014C // USB Host Configure Receive Type + // Endpoint 4 +#define USB_O_RXINTERVAL4 0x0000014D // USB Host Receive Polling + // Interval Endpoint 4 +#define USB_O_TXMAXP5 0x00000150 // USB Maximum Transmit Data + // Endpoint 5 +#define USB_O_TXCSRL5 0x00000152 // USB Transmit Control and Status + // Endpoint 5 Low +#define USB_O_TXCSRH5 0x00000153 // USB Transmit Control and Status + // Endpoint 5 High +#define USB_O_RXMAXP5 0x00000154 // USB Maximum Receive Data + // Endpoint 5 +#define USB_O_RXCSRL5 0x00000156 // USB Receive Control and Status + // Endpoint 5 Low +#define USB_O_RXCSRH5 0x00000157 // USB Receive Control and Status + // Endpoint 5 High +#define USB_O_RXCOUNT5 0x00000158 // USB Receive Byte Count Endpoint + // 5 +#define USB_O_TXTYPE5 0x0000015A // USB Host Transmit Configure Type + // Endpoint 5 +#define USB_O_TXINTERVAL5 0x0000015B // USB Host Transmit Interval + // Endpoint 5 +#define USB_O_RXTYPE5 0x0000015C // USB Host Configure Receive Type + // Endpoint 5 +#define USB_O_RXINTERVAL5 0x0000015D // USB Host Receive Polling + // Interval Endpoint 5 +#define USB_O_TXMAXP6 0x00000160 // USB Maximum Transmit Data + // Endpoint 6 +#define USB_O_TXCSRL6 0x00000162 // USB Transmit Control and Status + // Endpoint 6 Low +#define USB_O_TXCSRH6 0x00000163 // USB Transmit Control and Status + // Endpoint 6 High +#define USB_O_RXMAXP6 0x00000164 // USB Maximum Receive Data + // Endpoint 6 +#define USB_O_RXCSRL6 0x00000166 // USB Receive Control and Status + // Endpoint 6 Low +#define USB_O_RXCSRH6 0x00000167 // USB Receive Control and Status + // Endpoint 6 High +#define USB_O_RXCOUNT6 0x00000168 // USB Receive Byte Count Endpoint + // 6 +#define USB_O_TXTYPE6 0x0000016A // USB Host Transmit Configure Type + // Endpoint 6 +#define USB_O_TXINTERVAL6 0x0000016B // USB Host Transmit Interval + // Endpoint 6 +#define USB_O_RXTYPE6 0x0000016C // USB Host Configure Receive Type + // Endpoint 6 +#define USB_O_RXINTERVAL6 0x0000016D // USB Host Receive Polling + // Interval Endpoint 6 +#define USB_O_TXMAXP7 0x00000170 // USB Maximum Transmit Data + // Endpoint 7 +#define USB_O_TXCSRL7 0x00000172 // USB Transmit Control and Status + // Endpoint 7 Low +#define USB_O_TXCSRH7 0x00000173 // USB Transmit Control and Status + // Endpoint 7 High +#define USB_O_RXMAXP7 0x00000174 // USB Maximum Receive Data + // Endpoint 7 +#define USB_O_RXCSRL7 0x00000176 // USB Receive Control and Status + // Endpoint 7 Low +#define USB_O_RXCSRH7 0x00000177 // USB Receive Control and Status + // Endpoint 7 High +#define USB_O_RXCOUNT7 0x00000178 // USB Receive Byte Count Endpoint + // 7 +#define USB_O_TXTYPE7 0x0000017A // USB Host Transmit Configure Type + // Endpoint 7 +#define USB_O_TXINTERVAL7 0x0000017B // USB Host Transmit Interval + // Endpoint 7 +#define USB_O_RXTYPE7 0x0000017C // USB Host Configure Receive Type + // Endpoint 7 +#define USB_O_RXINTERVAL7 0x0000017D // USB Host Receive Polling + // Interval Endpoint 7 +#define USB_O_TXMAXP8 0x00000180 // USB Maximum Transmit Data + // Endpoint 8 +#define USB_O_TXCSRL8 0x00000182 // USB Transmit Control and Status + // Endpoint 8 Low +#define USB_O_TXCSRH8 0x00000183 // USB Transmit Control and Status + // Endpoint 8 High +#define USB_O_RXMAXP8 0x00000184 // USB Maximum Receive Data + // Endpoint 8 +#define USB_O_RXCSRL8 0x00000186 // USB Receive Control and Status + // Endpoint 8 Low +#define USB_O_RXCSRH8 0x00000187 // USB Receive Control and Status + // Endpoint 8 High +#define USB_O_RXCOUNT8 0x00000188 // USB Receive Byte Count Endpoint + // 8 +#define USB_O_TXTYPE8 0x0000018A // USB Host Transmit Configure Type + // Endpoint 8 +#define USB_O_TXINTERVAL8 0x0000018B // USB Host Transmit Interval + // Endpoint 8 +#define USB_O_RXTYPE8 0x0000018C // USB Host Configure Receive Type + // Endpoint 8 +#define USB_O_RXINTERVAL8 0x0000018D // USB Host Receive Polling + // Interval Endpoint 8 +#define USB_O_TXMAXP9 0x00000190 // USB Maximum Transmit Data + // Endpoint 9 +#define USB_O_TXCSRL9 0x00000192 // USB Transmit Control and Status + // Endpoint 9 Low +#define USB_O_TXCSRH9 0x00000193 // USB Transmit Control and Status + // Endpoint 9 High +#define USB_O_RXMAXP9 0x00000194 // USB Maximum Receive Data + // Endpoint 9 +#define USB_O_RXCSRL9 0x00000196 // USB Receive Control and Status + // Endpoint 9 Low +#define USB_O_RXCSRH9 0x00000197 // USB Receive Control and Status + // Endpoint 9 High +#define USB_O_RXCOUNT9 0x00000198 // USB Receive Byte Count Endpoint + // 9 +#define USB_O_TXTYPE9 0x0000019A // USB Host Transmit Configure Type + // Endpoint 9 +#define USB_O_TXINTERVAL9 0x0000019B // USB Host Transmit Interval + // Endpoint 9 +#define USB_O_RXTYPE9 0x0000019C // USB Host Configure Receive Type + // Endpoint 9 +#define USB_O_RXINTERVAL9 0x0000019D // USB Host Receive Polling + // Interval Endpoint 9 +#define USB_O_TXMAXP10 0x000001A0 // USB Maximum Transmit Data + // Endpoint 10 +#define USB_O_TXCSRL10 0x000001A2 // USB Transmit Control and Status + // Endpoint 10 Low +#define USB_O_TXCSRH10 0x000001A3 // USB Transmit Control and Status + // Endpoint 10 High +#define USB_O_RXMAXP10 0x000001A4 // USB Maximum Receive Data + // Endpoint 10 +#define USB_O_RXCSRL10 0x000001A6 // USB Receive Control and Status + // Endpoint 10 Low +#define USB_O_RXCSRH10 0x000001A7 // USB Receive Control and Status + // Endpoint 10 High +#define USB_O_RXCOUNT10 0x000001A8 // USB Receive Byte Count Endpoint + // 10 +#define USB_O_TXTYPE10 0x000001AA // USB Host Transmit Configure Type + // Endpoint 10 +#define USB_O_TXINTERVAL10 0x000001AB // USB Host Transmit Interval + // Endpoint 10 +#define USB_O_RXTYPE10 0x000001AC // USB Host Configure Receive Type + // Endpoint 10 +#define USB_O_RXINTERVAL10 0x000001AD // USB Host Receive Polling + // Interval Endpoint 10 +#define USB_O_TXMAXP11 0x000001B0 // USB Maximum Transmit Data + // Endpoint 11 +#define USB_O_TXCSRL11 0x000001B2 // USB Transmit Control and Status + // Endpoint 11 Low +#define USB_O_TXCSRH11 0x000001B3 // USB Transmit Control and Status + // Endpoint 11 High +#define USB_O_RXMAXP11 0x000001B4 // USB Maximum Receive Data + // Endpoint 11 +#define USB_O_RXCSRL11 0x000001B6 // USB Receive Control and Status + // Endpoint 11 Low +#define USB_O_RXCSRH11 0x000001B7 // USB Receive Control and Status + // Endpoint 11 High +#define USB_O_RXCOUNT11 0x000001B8 // USB Receive Byte Count Endpoint + // 11 +#define USB_O_TXTYPE11 0x000001BA // USB Host Transmit Configure Type + // Endpoint 11 +#define USB_O_TXINTERVAL11 0x000001BB // USB Host Transmit Interval + // Endpoint 11 +#define USB_O_RXTYPE11 0x000001BC // USB Host Configure Receive Type + // Endpoint 11 +#define USB_O_RXINTERVAL11 0x000001BD // USB Host Receive Polling + // Interval Endpoint 11 +#define USB_O_TXMAXP12 0x000001C0 // USB Maximum Transmit Data + // Endpoint 12 +#define USB_O_TXCSRL12 0x000001C2 // USB Transmit Control and Status + // Endpoint 12 Low +#define USB_O_TXCSRH12 0x000001C3 // USB Transmit Control and Status + // Endpoint 12 High +#define USB_O_RXMAXP12 0x000001C4 // USB Maximum Receive Data + // Endpoint 12 +#define USB_O_RXCSRL12 0x000001C6 // USB Receive Control and Status + // Endpoint 12 Low +#define USB_O_RXCSRH12 0x000001C7 // USB Receive Control and Status + // Endpoint 12 High +#define USB_O_RXCOUNT12 0x000001C8 // USB Receive Byte Count Endpoint + // 12 +#define USB_O_TXTYPE12 0x000001CA // USB Host Transmit Configure Type + // Endpoint 12 +#define USB_O_TXINTERVAL12 0x000001CB // USB Host Transmit Interval + // Endpoint 12 +#define USB_O_RXTYPE12 0x000001CC // USB Host Configure Receive Type + // Endpoint 12 +#define USB_O_RXINTERVAL12 0x000001CD // USB Host Receive Polling + // Interval Endpoint 12 +#define USB_O_TXMAXP13 0x000001D0 // USB Maximum Transmit Data + // Endpoint 13 +#define USB_O_TXCSRL13 0x000001D2 // USB Transmit Control and Status + // Endpoint 13 Low +#define USB_O_TXCSRH13 0x000001D3 // USB Transmit Control and Status + // Endpoint 13 High +#define USB_O_RXMAXP13 0x000001D4 // USB Maximum Receive Data + // Endpoint 13 +#define USB_O_RXCSRL13 0x000001D6 // USB Receive Control and Status + // Endpoint 13 Low +#define USB_O_RXCSRH13 0x000001D7 // USB Receive Control and Status + // Endpoint 13 High +#define USB_O_RXCOUNT13 0x000001D8 // USB Receive Byte Count Endpoint + // 13 +#define USB_O_TXTYPE13 0x000001DA // USB Host Transmit Configure Type + // Endpoint 13 +#define USB_O_TXINTERVAL13 0x000001DB // USB Host Transmit Interval + // Endpoint 13 +#define USB_O_RXTYPE13 0x000001DC // USB Host Configure Receive Type + // Endpoint 13 +#define USB_O_RXINTERVAL13 0x000001DD // USB Host Receive Polling + // Interval Endpoint 13 +#define USB_O_TXMAXP14 0x000001E0 // USB Maximum Transmit Data + // Endpoint 14 +#define USB_O_TXCSRL14 0x000001E2 // USB Transmit Control and Status + // Endpoint 14 Low +#define USB_O_TXCSRH14 0x000001E3 // USB Transmit Control and Status + // Endpoint 14 High +#define USB_O_RXMAXP14 0x000001E4 // USB Maximum Receive Data + // Endpoint 14 +#define USB_O_RXCSRL14 0x000001E6 // USB Receive Control and Status + // Endpoint 14 Low +#define USB_O_RXCSRH14 0x000001E7 // USB Receive Control and Status + // Endpoint 14 High +#define USB_O_RXCOUNT14 0x000001E8 // USB Receive Byte Count Endpoint + // 14 +#define USB_O_TXTYPE14 0x000001EA // USB Host Transmit Configure Type + // Endpoint 14 +#define USB_O_TXINTERVAL14 0x000001EB // USB Host Transmit Interval + // Endpoint 14 +#define USB_O_RXTYPE14 0x000001EC // USB Host Configure Receive Type + // Endpoint 14 +#define USB_O_RXINTERVAL14 0x000001ED // USB Host Receive Polling + // Interval Endpoint 14 +#define USB_O_TXMAXP15 0x000001F0 // USB Maximum Transmit Data + // Endpoint 15 +#define USB_O_TXCSRL15 0x000001F2 // USB Transmit Control and Status + // Endpoint 15 Low +#define USB_O_TXCSRH15 0x000001F3 // USB Transmit Control and Status + // Endpoint 15 High +#define USB_O_RXMAXP15 0x000001F4 // USB Maximum Receive Data + // Endpoint 15 +#define USB_O_RXCSRL15 0x000001F6 // USB Receive Control and Status + // Endpoint 15 Low +#define USB_O_RXCSRH15 0x000001F7 // USB Receive Control and Status + // Endpoint 15 High +#define USB_O_RXCOUNT15 0x000001F8 // USB Receive Byte Count Endpoint + // 15 +#define USB_O_TXTYPE15 0x000001FA // USB Host Transmit Configure Type + // Endpoint 15 +#define USB_O_TXINTERVAL15 0x000001FB // USB Host Transmit Interval + // Endpoint 15 +#define USB_O_RXTYPE15 0x000001FC // USB Host Configure Receive Type + // Endpoint 15 +#define USB_O_RXINTERVAL15 0x000001FD // USB Host Receive Polling + // Interval Endpoint 15 +#define USB_O_RQPKTCOUNT1 0x00000304 // USB Request Packet Count in + // Block Transfer Endpoint 1 +#define USB_O_RQPKTCOUNT2 0x00000308 // USB Request Packet Count in + // Block Transfer Endpoint 2 +#define USB_O_RQPKTCOUNT3 0x0000030C // USB Request Packet Count in + // Block Transfer Endpoint 3 +#define USB_O_RQPKTCOUNT4 0x00000310 // USB Request Packet Count in + // Block Transfer Endpoint 4 +#define USB_O_RQPKTCOUNT5 0x00000314 // USB Request Packet Count in + // Block Transfer Endpoint 5 +#define USB_O_RQPKTCOUNT6 0x00000318 // USB Request Packet Count in + // Block Transfer Endpoint 6 +#define USB_O_RQPKTCOUNT7 0x0000031C // USB Request Packet Count in + // Block Transfer Endpoint 7 +#define USB_O_RQPKTCOUNT8 0x00000320 // USB Request Packet Count in + // Block Transfer Endpoint 8 +#define USB_O_RQPKTCOUNT9 0x00000324 // USB Request Packet Count in + // Block Transfer Endpoint 9 +#define USB_O_RQPKTCOUNT10 0x00000328 // USB Request Packet Count in + // Block Transfer Endpoint 10 +#define USB_O_RQPKTCOUNT11 0x0000032C // USB Request Packet Count in + // Block Transfer Endpoint 11 +#define USB_O_RQPKTCOUNT12 0x00000330 // USB Request Packet Count in + // Block Transfer Endpoint 12 +#define USB_O_RQPKTCOUNT13 0x00000334 // USB Request Packet Count in + // Block Transfer Endpoint 13 +#define USB_O_RQPKTCOUNT14 0x00000338 // USB Request Packet Count in + // Block Transfer Endpoint 14 +#define USB_O_RQPKTCOUNT15 0x0000033C // USB Request Packet Count in + // Block Transfer Endpoint 15 +#define USB_O_RXDPKTBUFDIS 0x00000340 // USB Receive Double Packet Buffer + // Disable +#define USB_O_TXDPKTBUFDIS 0x00000342 // USB Transmit Double Packet + // Buffer Disable +#define USB_O_EPC 0x00000400 // USB External Power Control +#define USB_O_EPCRIS 0x00000404 // USB External Power Control Raw + // Interrupt Status +#define USB_O_EPCIM 0x00000408 // USB External Power Control + // Interrupt Mask +#define USB_O_EPCISC 0x0000040C // USB External Power Control + // Interrupt Status and Clear +#define USB_O_DRRIS 0x00000410 // USB Device RESUME Raw Interrupt + // Status +#define USB_O_DRIM 0x00000414 // USB Device RESUME Interrupt Mask +#define USB_O_DRISC 0x00000418 // USB Device RESUME Interrupt + // Status and Clear +#define USB_O_GPCS 0x0000041C // USB General-Purpose Control and + // Status +#define USB_O_VDC 0x00000430 // USB VBUS Droop Control +#define USB_O_VDCRIS 0x00000434 // USB VBUS Droop Control Raw + // Interrupt Status +#define USB_O_VDCIM 0x00000438 // USB VBUS Droop Control Interrupt + // Mask +#define USB_O_VDCISC 0x0000043C // USB VBUS Droop Control Interrupt + // Status and Clear +#define USB_O_IDVRIS 0x00000444 // USB ID Valid Detect Raw + // Interrupt Status +#define USB_O_IDVIM 0x00000448 // USB ID Valid Detect Interrupt + // Mask +#define USB_O_IDVISC 0x0000044C // USB ID Valid Detect Interrupt + // Status and Clear +#define USB_O_DMASEL 0x00000450 // USB DMA Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FADDR register. +// +//***************************************************************************** +#define USB_FADDR_M 0x0000007F // Function Address +#define USB_FADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_POWER register. +// +//***************************************************************************** +#define USB_POWER_ISOUP 0x00000080 // Isochronous Update +#define USB_POWER_SOFTCONN 0x00000040 // Soft Connect/Disconnect +#define USB_POWER_RESET 0x00000008 // RESET Signaling +#define USB_POWER_RESUME 0x00000004 // RESUME Signaling +#define USB_POWER_SUSPEND 0x00000002 // SUSPEND Mode +#define USB_POWER_PWRDNPHY 0x00000001 // Power Down PHY + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXIS register. +// +//***************************************************************************** +#define USB_TXIS_EP15 0x00008000 // TX Endpoint 15 Interrupt +#define USB_TXIS_EP14 0x00004000 // TX Endpoint 14 Interrupt +#define USB_TXIS_EP13 0x00002000 // TX Endpoint 13 Interrupt +#define USB_TXIS_EP12 0x00001000 // TX Endpoint 12 Interrupt +#define USB_TXIS_EP11 0x00000800 // TX Endpoint 11 Interrupt +#define USB_TXIS_EP10 0x00000400 // TX Endpoint 10 Interrupt +#define USB_TXIS_EP9 0x00000200 // TX Endpoint 9 Interrupt +#define USB_TXIS_EP8 0x00000100 // TX Endpoint 8 Interrupt +#define USB_TXIS_EP7 0x00000080 // TX Endpoint 7 Interrupt +#define USB_TXIS_EP6 0x00000040 // TX Endpoint 6 Interrupt +#define USB_TXIS_EP5 0x00000020 // TX Endpoint 5 Interrupt +#define USB_TXIS_EP4 0x00000010 // TX Endpoint 4 Interrupt +#define USB_TXIS_EP3 0x00000008 // TX Endpoint 3 Interrupt +#define USB_TXIS_EP2 0x00000004 // TX Endpoint 2 Interrupt +#define USB_TXIS_EP1 0x00000002 // TX Endpoint 1 Interrupt +#define USB_TXIS_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXIS register. +// +//***************************************************************************** +#define USB_RXIS_EP15 0x00008000 // RX Endpoint 15 Interrupt +#define USB_RXIS_EP14 0x00004000 // RX Endpoint 14 Interrupt +#define USB_RXIS_EP13 0x00002000 // RX Endpoint 13 Interrupt +#define USB_RXIS_EP12 0x00001000 // RX Endpoint 12 Interrupt +#define USB_RXIS_EP11 0x00000800 // RX Endpoint 11 Interrupt +#define USB_RXIS_EP10 0x00000400 // RX Endpoint 10 Interrupt +#define USB_RXIS_EP9 0x00000200 // RX Endpoint 9 Interrupt +#define USB_RXIS_EP8 0x00000100 // RX Endpoint 8 Interrupt +#define USB_RXIS_EP7 0x00000080 // RX Endpoint 7 Interrupt +#define USB_RXIS_EP6 0x00000040 // RX Endpoint 6 Interrupt +#define USB_RXIS_EP5 0x00000020 // RX Endpoint 5 Interrupt +#define USB_RXIS_EP4 0x00000010 // RX Endpoint 4 Interrupt +#define USB_RXIS_EP3 0x00000008 // RX Endpoint 3 Interrupt +#define USB_RXIS_EP2 0x00000004 // RX Endpoint 2 Interrupt +#define USB_RXIS_EP1 0x00000002 // RX Endpoint 1 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXIE register. +// +//***************************************************************************** +#define USB_TXIE_EP15 0x00008000 // TX Endpoint 15 Interrupt Enable +#define USB_TXIE_EP14 0x00004000 // TX Endpoint 14 Interrupt Enable +#define USB_TXIE_EP13 0x00002000 // TX Endpoint 13 Interrupt Enable +#define USB_TXIE_EP12 0x00001000 // TX Endpoint 12 Interrupt Enable +#define USB_TXIE_EP11 0x00000800 // TX Endpoint 11 Interrupt Enable +#define USB_TXIE_EP10 0x00000400 // TX Endpoint 10 Interrupt Enable +#define USB_TXIE_EP9 0x00000200 // TX Endpoint 9 Interrupt Enable +#define USB_TXIE_EP8 0x00000100 // TX Endpoint 8 Interrupt Enable +#define USB_TXIE_EP7 0x00000080 // TX Endpoint 7 Interrupt Enable +#define USB_TXIE_EP6 0x00000040 // TX Endpoint 6 Interrupt Enable +#define USB_TXIE_EP5 0x00000020 // TX Endpoint 5 Interrupt Enable +#define USB_TXIE_EP4 0x00000010 // TX Endpoint 4 Interrupt Enable +#define USB_TXIE_EP3 0x00000008 // TX Endpoint 3 Interrupt Enable +#define USB_TXIE_EP2 0x00000004 // TX Endpoint 2 Interrupt Enable +#define USB_TXIE_EP1 0x00000002 // TX Endpoint 1 Interrupt Enable +#define USB_TXIE_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXIE register. +// +//***************************************************************************** +#define USB_RXIE_EP15 0x00008000 // RX Endpoint 15 Interrupt Enable +#define USB_RXIE_EP14 0x00004000 // RX Endpoint 14 Interrupt Enable +#define USB_RXIE_EP13 0x00002000 // RX Endpoint 13 Interrupt Enable +#define USB_RXIE_EP12 0x00001000 // RX Endpoint 12 Interrupt Enable +#define USB_RXIE_EP11 0x00000800 // RX Endpoint 11 Interrupt Enable +#define USB_RXIE_EP10 0x00000400 // RX Endpoint 10 Interrupt Enable +#define USB_RXIE_EP9 0x00000200 // RX Endpoint 9 Interrupt Enable +#define USB_RXIE_EP8 0x00000100 // RX Endpoint 8 Interrupt Enable +#define USB_RXIE_EP7 0x00000080 // RX Endpoint 7 Interrupt Enable +#define USB_RXIE_EP6 0x00000040 // RX Endpoint 6 Interrupt Enable +#define USB_RXIE_EP5 0x00000020 // RX Endpoint 5 Interrupt Enable +#define USB_RXIE_EP4 0x00000010 // RX Endpoint 4 Interrupt Enable +#define USB_RXIE_EP3 0x00000008 // RX Endpoint 3 Interrupt Enable +#define USB_RXIE_EP2 0x00000004 // RX Endpoint 2 Interrupt Enable +#define USB_RXIE_EP1 0x00000002 // RX Endpoint 1 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IS register. +// +//***************************************************************************** +#define USB_IS_VBUSERR 0x00000080 // VBUS Error +#define USB_IS_SESREQ 0x00000040 // SESSION REQUEST +#define USB_IS_DISCON 0x00000020 // Session Disconnect +#define USB_IS_CONN 0x00000010 // Session Connect +#define USB_IS_SOF 0x00000008 // Start of Frame +#define USB_IS_BABBLE 0x00000004 // Babble Detected +#define USB_IS_RESET 0x00000004 // RESET Signaling Detected +#define USB_IS_RESUME 0x00000002 // RESUME Signaling Detected +#define USB_IS_SUSPEND 0x00000001 // SUSPEND Signaling Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IE register. +// +//***************************************************************************** +#define USB_IE_VBUSERR 0x00000080 // Enable VBUS Error Interrupt +#define USB_IE_SESREQ 0x00000040 // Enable Session Request +#define USB_IE_DISCON 0x00000020 // Enable Disconnect Interrupt +#define USB_IE_CONN 0x00000010 // Enable Connect Interrupt +#define USB_IE_SOF 0x00000008 // Enable Start-of-Frame Interrupt +#define USB_IE_BABBLE 0x00000004 // Enable Babble Interrupt +#define USB_IE_RESET 0x00000004 // Enable RESET Interrupt +#define USB_IE_RESUME 0x00000002 // Enable RESUME Interrupt +#define USB_IE_SUSPND 0x00000001 // Enable SUSPEND Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FRAME register. +// +//***************************************************************************** +#define USB_FRAME_M 0x000007FF // Frame Number +#define USB_FRAME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPIDX register. +// +//***************************************************************************** +#define USB_EPIDX_EPIDX_M 0x0000000F // Endpoint Index +#define USB_EPIDX_EPIDX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TEST register. +// +//***************************************************************************** +#define USB_TEST_FORCEH 0x00000080 // Force Host Mode +#define USB_TEST_FIFOACC 0x00000040 // FIFO Access +#define USB_TEST_FORCEFS 0x00000020 // Force Full-Speed Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO0 register. +// +//***************************************************************************** +#define USB_FIFO0_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO0_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO1 register. +// +//***************************************************************************** +#define USB_FIFO1_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO1_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO2 register. +// +//***************************************************************************** +#define USB_FIFO2_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO2_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO3 register. +// +//***************************************************************************** +#define USB_FIFO3_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO3_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO4 register. +// +//***************************************************************************** +#define USB_FIFO4_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO4_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO5 register. +// +//***************************************************************************** +#define USB_FIFO5_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO5_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO6 register. +// +//***************************************************************************** +#define USB_FIFO6_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO6_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO7 register. +// +//***************************************************************************** +#define USB_FIFO7_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO7_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO8 register. +// +//***************************************************************************** +#define USB_FIFO8_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO8_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO9 register. +// +//***************************************************************************** +#define USB_FIFO9_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO9_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO10 register. +// +//***************************************************************************** +#define USB_FIFO10_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO10_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO11 register. +// +//***************************************************************************** +#define USB_FIFO11_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO11_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO12 register. +// +//***************************************************************************** +#define USB_FIFO12_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO12_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO13 register. +// +//***************************************************************************** +#define USB_FIFO13_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO13_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO14 register. +// +//***************************************************************************** +#define USB_FIFO14_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO14_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO15 register. +// +//***************************************************************************** +#define USB_FIFO15_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO15_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DEVCTL register. +// +//***************************************************************************** +#define USB_DEVCTL_DEV 0x00000080 // Device Mode +#define USB_DEVCTL_FSDEV 0x00000040 // Full-Speed Device Detected +#define USB_DEVCTL_LSDEV 0x00000020 // Low-Speed Device Detected +#define USB_DEVCTL_VBUS_M 0x00000018 // VBUS Level +#define USB_DEVCTL_VBUS_NONE 0x00000000 // Below SessionEnd +#define USB_DEVCTL_VBUS_SEND 0x00000008 // Above SessionEnd, below AValid +#define USB_DEVCTL_VBUS_AVALID 0x00000010 // Above AValid, below VBUSValid +#define USB_DEVCTL_VBUS_VALID 0x00000018 // Above VBUSValid +#define USB_DEVCTL_HOST 0x00000004 // Host Mode +#define USB_DEVCTL_HOSTREQ 0x00000002 // Host Request +#define USB_DEVCTL_SESSION 0x00000001 // Session Start/End + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFIFOSZ register. +// +//***************************************************************************** +#define USB_TXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support +#define USB_TXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size +#define USB_TXFIFOSZ_SIZE_8 0x00000000 // 8 +#define USB_TXFIFOSZ_SIZE_16 0x00000001 // 16 +#define USB_TXFIFOSZ_SIZE_32 0x00000002 // 32 +#define USB_TXFIFOSZ_SIZE_64 0x00000003 // 64 +#define USB_TXFIFOSZ_SIZE_128 0x00000004 // 128 +#define USB_TXFIFOSZ_SIZE_256 0x00000005 // 256 +#define USB_TXFIFOSZ_SIZE_512 0x00000006 // 512 +#define USB_TXFIFOSZ_SIZE_1024 0x00000007 // 1024 +#define USB_TXFIFOSZ_SIZE_2048 0x00000008 // 2048 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFIFOSZ register. +// +//***************************************************************************** +#define USB_RXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support +#define USB_RXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size +#define USB_RXFIFOSZ_SIZE_8 0x00000000 // 8 +#define USB_RXFIFOSZ_SIZE_16 0x00000001 // 16 +#define USB_RXFIFOSZ_SIZE_32 0x00000002 // 32 +#define USB_RXFIFOSZ_SIZE_64 0x00000003 // 64 +#define USB_RXFIFOSZ_SIZE_128 0x00000004 // 128 +#define USB_RXFIFOSZ_SIZE_256 0x00000005 // 256 +#define USB_RXFIFOSZ_SIZE_512 0x00000006 // 512 +#define USB_RXFIFOSZ_SIZE_1024 0x00000007 // 1024 +#define USB_RXFIFOSZ_SIZE_2048 0x00000008 // 2048 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFIFOADD +// register. +// +//***************************************************************************** +#define USB_TXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address +#define USB_TXFIFOADD_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFIFOADD +// register. +// +//***************************************************************************** +#define USB_RXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address +#define USB_RXFIFOADD_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CONTIM register. +// +//***************************************************************************** +#define USB_CONTIM_WTCON_M 0x000000F0 // Connect Wait +#define USB_CONTIM_WTID_M 0x0000000F // Wait ID +#define USB_CONTIM_WTCON_S 4 +#define USB_CONTIM_WTID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VPLEN register. +// +//***************************************************************************** +#define USB_VPLEN_VPLEN_M 0x000000FF // VBUS Pulse Length +#define USB_VPLEN_VPLEN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FSEOF register. +// +//***************************************************************************** +#define USB_FSEOF_FSEOFG_M 0x000000FF // Full-Speed End-of-Frame Gap +#define USB_FSEOF_FSEOFG_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_LSEOF register. +// +//***************************************************************************** +#define USB_LSEOF_LSEOFG_M 0x000000FF // Low-Speed End-of-Frame Gap +#define USB_LSEOF_LSEOFG_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR0 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR0_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR0 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR0_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR0_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT0 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT0_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT0_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR1 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR1_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR1 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR1_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT1 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT1_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT1_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR1 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR1_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR1 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR1_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT1 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT1_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT1_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR2 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR2_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR2 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR2_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT2 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT2_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT2_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR2 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR2_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR2 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR2_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT2 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT2_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT2_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR3 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR3_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR3 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR3_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT3 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT3_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT3_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR3 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR3_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR3 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR3_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT3 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT3_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT3_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR4 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR4_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR4 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR4_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR4_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT4 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT4_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT4_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR4 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR4_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR4 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR4_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR4_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT4 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT4_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT4_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR5 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR5_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR5 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR5_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR5_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT5 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT5_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT5_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR5 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR5_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR5 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR5_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR5_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT5 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT5_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT5_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR6 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR6_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR6 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR6_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR6_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT6 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT6_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT6_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR6 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR6_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR6 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR6_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR6_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT6 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT6_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT6_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR7 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR7_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR7 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR7_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR7_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT7 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT7_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT7_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR7 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR7_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR7 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR7_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR7_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT7 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT7_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT7_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR8 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR8_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR8 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR8_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR8_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT8 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT8_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT8_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR8 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR8_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR8 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR8_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR8_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT8 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT8_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT8_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR9 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR9_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR9 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR9_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR9_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT9 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT9_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT9_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR9 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR9_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR9 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR9_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR9_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT9 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT9_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT9_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR10 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR10_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR10 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR10_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR10_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT10 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT10_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT10_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR10 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR10_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR10 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR10_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR10_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT10 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT10_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT10_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR11 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR11_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR11 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR11_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR11_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT11 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT11_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT11_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR11 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR11_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR11 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR11_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR11_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT11 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT11_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT11_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR12 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR12_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR12 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR12_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR12_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT12 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT12_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT12_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR12 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR12_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR12 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR12_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR12_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT12 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT12_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT12_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR13 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR13_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR13 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR13_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR13_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT13 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT13_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT13_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR13 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR13_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR13 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR13_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR13_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT13 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT13_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT13_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR14 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR14_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR14 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR14_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR14_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT14 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT14_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT14_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR14 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR14_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR14 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR14_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR14_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT14 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT14_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT14_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR15 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR15_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR15 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR15_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR15_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT15 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT15_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT15_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR15 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR15_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR15 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR15_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR15_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT15 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT15_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT15_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CSRL0 register. +// +//***************************************************************************** +#define USB_CSRL0_NAKTO 0x00000080 // NAK Timeout +#define USB_CSRL0_SETENDC 0x00000080 // Setup End Clear +#define USB_CSRL0_STATUS 0x00000040 // STATUS Packet +#define USB_CSRL0_RXRDYC 0x00000040 // RXRDY Clear +#define USB_CSRL0_REQPKT 0x00000020 // Request Packet +#define USB_CSRL0_STALL 0x00000020 // Send Stall +#define USB_CSRL0_SETEND 0x00000010 // Setup End +#define USB_CSRL0_ERROR 0x00000010 // Error +#define USB_CSRL0_DATAEND 0x00000008 // Data End +#define USB_CSRL0_SETUP 0x00000008 // Setup Packet +#define USB_CSRL0_STALLED 0x00000004 // Endpoint Stalled +#define USB_CSRL0_TXRDY 0x00000002 // Transmit Packet Ready +#define USB_CSRL0_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CSRH0 register. +// +//***************************************************************************** +#define USB_CSRH0_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_CSRH0_DT 0x00000002 // Data Toggle +#define USB_CSRH0_FLUSH 0x00000001 // Flush FIFO + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_COUNT0 register. +// +//***************************************************************************** +#define USB_COUNT0_COUNT_M 0x0000007F // FIFO Count +#define USB_COUNT0_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TYPE0 register. +// +//***************************************************************************** +#define USB_TYPE0_SPEED_M 0x000000C0 // Operating Speed +#define USB_TYPE0_SPEED_FULL 0x00000080 // Full +#define USB_TYPE0_SPEED_LOW 0x000000C0 // Low + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_NAKLMT register. +// +//***************************************************************************** +#define USB_NAKLMT_NAKLMT_M 0x0000001F // EP0 NAK Limit +#define USB_NAKLMT_NAKLMT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP1 register. +// +//***************************************************************************** +#define USB_TXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP1_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL1 register. +// +//***************************************************************************** +#define USB_TXCSRL1_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL1_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL1_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL1_STALL 0x00000010 // Send STALL +#define USB_TXCSRL1_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL1_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL1_ERROR 0x00000004 // Error +#define USB_TXCSRL1_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL1_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL1_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH1 register. +// +//***************************************************************************** +#define USB_TXCSRH1_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH1_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH1_MODE 0x00000020 // Mode +#define USB_TXCSRH1_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH1_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH1_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH1_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH1_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP1 register. +// +//***************************************************************************** +#define USB_RXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP1_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL1 register. +// +//***************************************************************************** +#define USB_RXCSRL1_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL1_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL1_STALL 0x00000020 // Send STALL +#define USB_RXCSRL1_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL1_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL1_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL1_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL1_OVER 0x00000004 // Overrun +#define USB_RXCSRL1_ERROR 0x00000004 // Error +#define USB_RXCSRL1_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL1_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH1 register. +// +//***************************************************************************** +#define USB_RXCSRH1_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH1_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH1_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH1_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH1_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH1_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH1_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH1_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH1_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT1 register. +// +//***************************************************************************** +#define USB_RXCOUNT1_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT1_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE1 register. +// +//***************************************************************************** +#define USB_TXTYPE1_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE1_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE1_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE1_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE1_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE1_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE1_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE1_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE1_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE1_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE1_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL1 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL1_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL1_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL1_TXPOLL_S \ + 0 +#define USB_TXINTERVAL1_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE1 register. +// +//***************************************************************************** +#define USB_RXTYPE1_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE1_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE1_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE1_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE1_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE1_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE1_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE1_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE1_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE1_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE1_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL1 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL1_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL1_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL1_TXPOLL_S \ + 0 +#define USB_RXINTERVAL1_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP2 register. +// +//***************************************************************************** +#define USB_TXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP2_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL2 register. +// +//***************************************************************************** +#define USB_TXCSRL2_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL2_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL2_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL2_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL2_STALL 0x00000010 // Send STALL +#define USB_TXCSRL2_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL2_ERROR 0x00000004 // Error +#define USB_TXCSRL2_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL2_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL2_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH2 register. +// +//***************************************************************************** +#define USB_TXCSRH2_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH2_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH2_MODE 0x00000020 // Mode +#define USB_TXCSRH2_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH2_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH2_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH2_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH2_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP2 register. +// +//***************************************************************************** +#define USB_RXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP2_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL2 register. +// +//***************************************************************************** +#define USB_RXCSRL2_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL2_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL2_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL2_STALL 0x00000020 // Send STALL +#define USB_RXCSRL2_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL2_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL2_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL2_ERROR 0x00000004 // Error +#define USB_RXCSRL2_OVER 0x00000004 // Overrun +#define USB_RXCSRL2_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL2_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH2 register. +// +//***************************************************************************** +#define USB_RXCSRH2_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH2_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH2_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH2_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH2_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH2_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH2_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH2_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH2_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT2 register. +// +//***************************************************************************** +#define USB_RXCOUNT2_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT2_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE2 register. +// +//***************************************************************************** +#define USB_TXTYPE2_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE2_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE2_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE2_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE2_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE2_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE2_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE2_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE2_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE2_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE2_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL2 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL2_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL2_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL2_NAKLMT_S \ + 0 +#define USB_TXINTERVAL2_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE2 register. +// +//***************************************************************************** +#define USB_RXTYPE2_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE2_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE2_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE2_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE2_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE2_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE2_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE2_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE2_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE2_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE2_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL2 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL2_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL2_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL2_TXPOLL_S \ + 0 +#define USB_RXINTERVAL2_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP3 register. +// +//***************************************************************************** +#define USB_TXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP3_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL3 register. +// +//***************************************************************************** +#define USB_TXCSRL3_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL3_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL3_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL3_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL3_STALL 0x00000010 // Send STALL +#define USB_TXCSRL3_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL3_ERROR 0x00000004 // Error +#define USB_TXCSRL3_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL3_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL3_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH3 register. +// +//***************************************************************************** +#define USB_TXCSRH3_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH3_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH3_MODE 0x00000020 // Mode +#define USB_TXCSRH3_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH3_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH3_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH3_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH3_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP3 register. +// +//***************************************************************************** +#define USB_RXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP3_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL3 register. +// +//***************************************************************************** +#define USB_RXCSRL3_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL3_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL3_STALL 0x00000020 // Send STALL +#define USB_RXCSRL3_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL3_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL3_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL3_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL3_ERROR 0x00000004 // Error +#define USB_RXCSRL3_OVER 0x00000004 // Overrun +#define USB_RXCSRL3_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL3_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH3 register. +// +//***************************************************************************** +#define USB_RXCSRH3_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH3_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH3_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH3_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH3_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH3_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH3_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH3_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH3_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT3 register. +// +//***************************************************************************** +#define USB_RXCOUNT3_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT3_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE3 register. +// +//***************************************************************************** +#define USB_TXTYPE3_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE3_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE3_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE3_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE3_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE3_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE3_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE3_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE3_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE3_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE3_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL3 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL3_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL3_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL3_TXPOLL_S \ + 0 +#define USB_TXINTERVAL3_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE3 register. +// +//***************************************************************************** +#define USB_RXTYPE3_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE3_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE3_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE3_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE3_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE3_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE3_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE3_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE3_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE3_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE3_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL3 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL3_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL3_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL3_TXPOLL_S \ + 0 +#define USB_RXINTERVAL3_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP4 register. +// +//***************************************************************************** +#define USB_TXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP4_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL4 register. +// +//***************************************************************************** +#define USB_TXCSRL4_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL4_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL4_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL4_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL4_STALL 0x00000010 // Send STALL +#define USB_TXCSRL4_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL4_ERROR 0x00000004 // Error +#define USB_TXCSRL4_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL4_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL4_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH4 register. +// +//***************************************************************************** +#define USB_TXCSRH4_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH4_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH4_MODE 0x00000020 // Mode +#define USB_TXCSRH4_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH4_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH4_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH4_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH4_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP4 register. +// +//***************************************************************************** +#define USB_RXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP4_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL4 register. +// +//***************************************************************************** +#define USB_RXCSRL4_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL4_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL4_STALL 0x00000020 // Send STALL +#define USB_RXCSRL4_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL4_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL4_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL4_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL4_OVER 0x00000004 // Overrun +#define USB_RXCSRL4_ERROR 0x00000004 // Error +#define USB_RXCSRL4_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL4_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH4 register. +// +//***************************************************************************** +#define USB_RXCSRH4_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH4_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH4_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH4_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH4_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH4_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH4_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH4_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH4_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT4 register. +// +//***************************************************************************** +#define USB_RXCOUNT4_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT4_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE4 register. +// +//***************************************************************************** +#define USB_TXTYPE4_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE4_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE4_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE4_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE4_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE4_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE4_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE4_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE4_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE4_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE4_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL4 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL4_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL4_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL4_NAKLMT_S \ + 0 +#define USB_TXINTERVAL4_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE4 register. +// +//***************************************************************************** +#define USB_RXTYPE4_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE4_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE4_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE4_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE4_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE4_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE4_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE4_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE4_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE4_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE4_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL4 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL4_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL4_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL4_NAKLMT_S \ + 0 +#define USB_RXINTERVAL4_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP5 register. +// +//***************************************************************************** +#define USB_TXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP5_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL5 register. +// +//***************************************************************************** +#define USB_TXCSRL5_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL5_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL5_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL5_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL5_STALL 0x00000010 // Send STALL +#define USB_TXCSRL5_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL5_ERROR 0x00000004 // Error +#define USB_TXCSRL5_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL5_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL5_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH5 register. +// +//***************************************************************************** +#define USB_TXCSRH5_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH5_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH5_MODE 0x00000020 // Mode +#define USB_TXCSRH5_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH5_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH5_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH5_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH5_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP5 register. +// +//***************************************************************************** +#define USB_RXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP5_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL5 register. +// +//***************************************************************************** +#define USB_RXCSRL5_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL5_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL5_STALL 0x00000020 // Send STALL +#define USB_RXCSRL5_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL5_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL5_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL5_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL5_ERROR 0x00000004 // Error +#define USB_RXCSRL5_OVER 0x00000004 // Overrun +#define USB_RXCSRL5_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL5_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH5 register. +// +//***************************************************************************** +#define USB_RXCSRH5_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH5_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH5_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH5_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH5_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH5_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH5_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH5_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH5_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT5 register. +// +//***************************************************************************** +#define USB_RXCOUNT5_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT5_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE5 register. +// +//***************************************************************************** +#define USB_TXTYPE5_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE5_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE5_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE5_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE5_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE5_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE5_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE5_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE5_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE5_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE5_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL5 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL5_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL5_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL5_NAKLMT_S \ + 0 +#define USB_TXINTERVAL5_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE5 register. +// +//***************************************************************************** +#define USB_RXTYPE5_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE5_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE5_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE5_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE5_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE5_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE5_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE5_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE5_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE5_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE5_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL5 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL5_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL5_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL5_TXPOLL_S \ + 0 +#define USB_RXINTERVAL5_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP6 register. +// +//***************************************************************************** +#define USB_TXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP6_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL6 register. +// +//***************************************************************************** +#define USB_TXCSRL6_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL6_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL6_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL6_STALL 0x00000010 // Send STALL +#define USB_TXCSRL6_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL6_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL6_ERROR 0x00000004 // Error +#define USB_TXCSRL6_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL6_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL6_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH6 register. +// +//***************************************************************************** +#define USB_TXCSRH6_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH6_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH6_MODE 0x00000020 // Mode +#define USB_TXCSRH6_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH6_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH6_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH6_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH6_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP6 register. +// +//***************************************************************************** +#define USB_RXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP6_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL6 register. +// +//***************************************************************************** +#define USB_RXCSRL6_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL6_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL6_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL6_STALL 0x00000020 // Send STALL +#define USB_RXCSRL6_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL6_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL6_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL6_ERROR 0x00000004 // Error +#define USB_RXCSRL6_OVER 0x00000004 // Overrun +#define USB_RXCSRL6_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL6_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH6 register. +// +//***************************************************************************** +#define USB_RXCSRH6_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH6_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH6_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH6_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH6_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH6_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH6_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH6_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH6_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT6 register. +// +//***************************************************************************** +#define USB_RXCOUNT6_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT6_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE6 register. +// +//***************************************************************************** +#define USB_TXTYPE6_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE6_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE6_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE6_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE6_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE6_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE6_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE6_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE6_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE6_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE6_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL6 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL6_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL6_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL6_TXPOLL_S \ + 0 +#define USB_TXINTERVAL6_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE6 register. +// +//***************************************************************************** +#define USB_RXTYPE6_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE6_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE6_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE6_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE6_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE6_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE6_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE6_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE6_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE6_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE6_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL6 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL6_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL6_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL6_NAKLMT_S \ + 0 +#define USB_RXINTERVAL6_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP7 register. +// +//***************************************************************************** +#define USB_TXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP7_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL7 register. +// +//***************************************************************************** +#define USB_TXCSRL7_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL7_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL7_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL7_STALL 0x00000010 // Send STALL +#define USB_TXCSRL7_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL7_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL7_ERROR 0x00000004 // Error +#define USB_TXCSRL7_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL7_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL7_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH7 register. +// +//***************************************************************************** +#define USB_TXCSRH7_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH7_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH7_MODE 0x00000020 // Mode +#define USB_TXCSRH7_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH7_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH7_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH7_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH7_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP7 register. +// +//***************************************************************************** +#define USB_RXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP7_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL7 register. +// +//***************************************************************************** +#define USB_RXCSRL7_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL7_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL7_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL7_STALL 0x00000020 // Send STALL +#define USB_RXCSRL7_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL7_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL7_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL7_ERROR 0x00000004 // Error +#define USB_RXCSRL7_OVER 0x00000004 // Overrun +#define USB_RXCSRL7_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL7_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH7 register. +// +//***************************************************************************** +#define USB_RXCSRH7_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH7_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH7_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH7_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH7_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH7_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH7_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH7_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH7_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT7 register. +// +//***************************************************************************** +#define USB_RXCOUNT7_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT7_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE7 register. +// +//***************************************************************************** +#define USB_TXTYPE7_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE7_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE7_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE7_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE7_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE7_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE7_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE7_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE7_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE7_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE7_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL7 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL7_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL7_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL7_NAKLMT_S \ + 0 +#define USB_TXINTERVAL7_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE7 register. +// +//***************************************************************************** +#define USB_RXTYPE7_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE7_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE7_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE7_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE7_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE7_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE7_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE7_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE7_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE7_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE7_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL7 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL7_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL7_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL7_NAKLMT_S \ + 0 +#define USB_RXINTERVAL7_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP8 register. +// +//***************************************************************************** +#define USB_TXMAXP8_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP8_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL8 register. +// +//***************************************************************************** +#define USB_TXCSRL8_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL8_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL8_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL8_STALL 0x00000010 // Send STALL +#define USB_TXCSRL8_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL8_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL8_ERROR 0x00000004 // Error +#define USB_TXCSRL8_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL8_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL8_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH8 register. +// +//***************************************************************************** +#define USB_TXCSRH8_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH8_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH8_MODE 0x00000020 // Mode +#define USB_TXCSRH8_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH8_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH8_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH8_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH8_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP8 register. +// +//***************************************************************************** +#define USB_RXMAXP8_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP8_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL8 register. +// +//***************************************************************************** +#define USB_RXCSRL8_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL8_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL8_STALL 0x00000020 // Send STALL +#define USB_RXCSRL8_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL8_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL8_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL8_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL8_OVER 0x00000004 // Overrun +#define USB_RXCSRL8_ERROR 0x00000004 // Error +#define USB_RXCSRL8_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL8_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH8 register. +// +//***************************************************************************** +#define USB_RXCSRH8_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH8_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH8_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH8_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH8_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH8_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH8_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH8_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH8_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT8 register. +// +//***************************************************************************** +#define USB_RXCOUNT8_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT8_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE8 register. +// +//***************************************************************************** +#define USB_TXTYPE8_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE8_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE8_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE8_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE8_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE8_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE8_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE8_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE8_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE8_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE8_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL8 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL8_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL8_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL8_NAKLMT_S \ + 0 +#define USB_TXINTERVAL8_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE8 register. +// +//***************************************************************************** +#define USB_RXTYPE8_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE8_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE8_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE8_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE8_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE8_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE8_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE8_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE8_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE8_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE8_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL8 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL8_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL8_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL8_NAKLMT_S \ + 0 +#define USB_RXINTERVAL8_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP9 register. +// +//***************************************************************************** +#define USB_TXMAXP9_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP9_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL9 register. +// +//***************************************************************************** +#define USB_TXCSRL9_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL9_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL9_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL9_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL9_STALL 0x00000010 // Send STALL +#define USB_TXCSRL9_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL9_ERROR 0x00000004 // Error +#define USB_TXCSRL9_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL9_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL9_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH9 register. +// +//***************************************************************************** +#define USB_TXCSRH9_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH9_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH9_MODE 0x00000020 // Mode +#define USB_TXCSRH9_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH9_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH9_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH9_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH9_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP9 register. +// +//***************************************************************************** +#define USB_RXMAXP9_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP9_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL9 register. +// +//***************************************************************************** +#define USB_RXCSRL9_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL9_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL9_STALL 0x00000020 // Send STALL +#define USB_RXCSRL9_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL9_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL9_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL9_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL9_ERROR 0x00000004 // Error +#define USB_RXCSRL9_OVER 0x00000004 // Overrun +#define USB_RXCSRL9_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL9_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH9 register. +// +//***************************************************************************** +#define USB_RXCSRH9_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH9_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH9_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH9_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH9_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH9_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH9_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH9_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH9_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT9 register. +// +//***************************************************************************** +#define USB_RXCOUNT9_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT9_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE9 register. +// +//***************************************************************************** +#define USB_TXTYPE9_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE9_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE9_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE9_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE9_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE9_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE9_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE9_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE9_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE9_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE9_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL9 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL9_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL9_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL9_TXPOLL_S \ + 0 +#define USB_TXINTERVAL9_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE9 register. +// +//***************************************************************************** +#define USB_RXTYPE9_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE9_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE9_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE9_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE9_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE9_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE9_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE9_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE9_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE9_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE9_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL9 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL9_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL9_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL9_NAKLMT_S \ + 0 +#define USB_RXINTERVAL9_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP10 register. +// +//***************************************************************************** +#define USB_TXMAXP10_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP10_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL10 register. +// +//***************************************************************************** +#define USB_TXCSRL10_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL10_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL10_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL10_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL10_STALL 0x00000010 // Send STALL +#define USB_TXCSRL10_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL10_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL10_ERROR 0x00000004 // Error +#define USB_TXCSRL10_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL10_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH10 register. +// +//***************************************************************************** +#define USB_TXCSRH10_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH10_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH10_MODE 0x00000020 // Mode +#define USB_TXCSRH10_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH10_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH10_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH10_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH10_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP10 register. +// +//***************************************************************************** +#define USB_RXMAXP10_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP10_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL10 register. +// +//***************************************************************************** +#define USB_RXCSRL10_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL10_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL10_STALL 0x00000020 // Send STALL +#define USB_RXCSRL10_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL10_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL10_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL10_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL10_OVER 0x00000004 // Overrun +#define USB_RXCSRL10_ERROR 0x00000004 // Error +#define USB_RXCSRL10_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL10_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH10 register. +// +//***************************************************************************** +#define USB_RXCSRH10_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH10_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH10_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH10_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH10_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH10_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH10_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH10_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH10_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT10 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT10_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT10_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE10 register. +// +//***************************************************************************** +#define USB_TXTYPE10_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE10_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE10_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE10_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE10_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE10_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE10_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE10_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE10_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE10_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE10_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL10 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL10_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL10_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL10_TXPOLL_S \ + 0 +#define USB_TXINTERVAL10_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE10 register. +// +//***************************************************************************** +#define USB_RXTYPE10_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE10_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE10_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE10_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE10_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE10_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE10_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE10_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE10_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE10_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE10_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL10 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL10_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL10_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL10_TXPOLL_S \ + 0 +#define USB_RXINTERVAL10_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP11 register. +// +//***************************************************************************** +#define USB_TXMAXP11_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP11_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL11 register. +// +//***************************************************************************** +#define USB_TXCSRL11_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL11_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL11_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL11_STALL 0x00000010 // Send STALL +#define USB_TXCSRL11_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL11_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL11_ERROR 0x00000004 // Error +#define USB_TXCSRL11_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL11_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL11_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH11 register. +// +//***************************************************************************** +#define USB_TXCSRH11_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH11_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH11_MODE 0x00000020 // Mode +#define USB_TXCSRH11_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH11_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH11_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH11_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH11_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP11 register. +// +//***************************************************************************** +#define USB_RXMAXP11_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP11_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL11 register. +// +//***************************************************************************** +#define USB_RXCSRL11_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL11_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL11_STALL 0x00000020 // Send STALL +#define USB_RXCSRL11_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL11_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL11_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL11_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL11_OVER 0x00000004 // Overrun +#define USB_RXCSRL11_ERROR 0x00000004 // Error +#define USB_RXCSRL11_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL11_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH11 register. +// +//***************************************************************************** +#define USB_RXCSRH11_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH11_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH11_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH11_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH11_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH11_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH11_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH11_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH11_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT11 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT11_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT11_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE11 register. +// +//***************************************************************************** +#define USB_TXTYPE11_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE11_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE11_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE11_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE11_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE11_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE11_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE11_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE11_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE11_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE11_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL11 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL11_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL11_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL11_NAKLMT_S \ + 0 +#define USB_TXINTERVAL11_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE11 register. +// +//***************************************************************************** +#define USB_RXTYPE11_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE11_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE11_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE11_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE11_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE11_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE11_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE11_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE11_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE11_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE11_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL11 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL11_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL11_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL11_TXPOLL_S \ + 0 +#define USB_RXINTERVAL11_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP12 register. +// +//***************************************************************************** +#define USB_TXMAXP12_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP12_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL12 register. +// +//***************************************************************************** +#define USB_TXCSRL12_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL12_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL12_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL12_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL12_STALL 0x00000010 // Send STALL +#define USB_TXCSRL12_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL12_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL12_ERROR 0x00000004 // Error +#define USB_TXCSRL12_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL12_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH12 register. +// +//***************************************************************************** +#define USB_TXCSRH12_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH12_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH12_MODE 0x00000020 // Mode +#define USB_TXCSRH12_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH12_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH12_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH12_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH12_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP12 register. +// +//***************************************************************************** +#define USB_RXMAXP12_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP12_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL12 register. +// +//***************************************************************************** +#define USB_RXCSRL12_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL12_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL12_STALL 0x00000020 // Send STALL +#define USB_RXCSRL12_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL12_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL12_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL12_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL12_ERROR 0x00000004 // Error +#define USB_RXCSRL12_OVER 0x00000004 // Overrun +#define USB_RXCSRL12_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL12_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH12 register. +// +//***************************************************************************** +#define USB_RXCSRH12_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH12_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH12_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH12_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH12_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH12_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH12_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH12_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH12_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT12 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT12_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT12_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE12 register. +// +//***************************************************************************** +#define USB_TXTYPE12_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE12_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE12_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE12_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE12_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE12_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE12_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE12_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE12_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE12_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE12_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL12 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL12_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL12_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL12_TXPOLL_S \ + 0 +#define USB_TXINTERVAL12_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE12 register. +// +//***************************************************************************** +#define USB_RXTYPE12_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE12_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE12_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE12_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE12_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE12_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE12_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE12_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE12_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE12_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE12_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL12 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL12_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL12_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL12_NAKLMT_S \ + 0 +#define USB_RXINTERVAL12_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP13 register. +// +//***************************************************************************** +#define USB_TXMAXP13_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP13_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL13 register. +// +//***************************************************************************** +#define USB_TXCSRL13_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL13_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL13_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL13_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL13_STALL 0x00000010 // Send STALL +#define USB_TXCSRL13_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL13_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL13_ERROR 0x00000004 // Error +#define USB_TXCSRL13_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL13_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH13 register. +// +//***************************************************************************** +#define USB_TXCSRH13_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH13_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH13_MODE 0x00000020 // Mode +#define USB_TXCSRH13_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH13_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH13_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH13_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH13_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP13 register. +// +//***************************************************************************** +#define USB_RXMAXP13_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP13_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL13 register. +// +//***************************************************************************** +#define USB_RXCSRL13_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL13_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL13_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL13_STALL 0x00000020 // Send STALL +#define USB_RXCSRL13_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL13_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL13_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL13_OVER 0x00000004 // Overrun +#define USB_RXCSRL13_ERROR 0x00000004 // Error +#define USB_RXCSRL13_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL13_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH13 register. +// +//***************************************************************************** +#define USB_RXCSRH13_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH13_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH13_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH13_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH13_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH13_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH13_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH13_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH13_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT13 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT13_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT13_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE13 register. +// +//***************************************************************************** +#define USB_TXTYPE13_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE13_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE13_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE13_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE13_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE13_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE13_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE13_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE13_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE13_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE13_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL13 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL13_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL13_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL13_TXPOLL_S \ + 0 +#define USB_TXINTERVAL13_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE13 register. +// +//***************************************************************************** +#define USB_RXTYPE13_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE13_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE13_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE13_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE13_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE13_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE13_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE13_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE13_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE13_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE13_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL13 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL13_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL13_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL13_TXPOLL_S \ + 0 +#define USB_RXINTERVAL13_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP14 register. +// +//***************************************************************************** +#define USB_TXMAXP14_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP14_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL14 register. +// +//***************************************************************************** +#define USB_TXCSRL14_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL14_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL14_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL14_STALL 0x00000010 // Send STALL +#define USB_TXCSRL14_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL14_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL14_ERROR 0x00000004 // Error +#define USB_TXCSRL14_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL14_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL14_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH14 register. +// +//***************************************************************************** +#define USB_TXCSRH14_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH14_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH14_MODE 0x00000020 // Mode +#define USB_TXCSRH14_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH14_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH14_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH14_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH14_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP14 register. +// +//***************************************************************************** +#define USB_RXMAXP14_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP14_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL14 register. +// +//***************************************************************************** +#define USB_RXCSRL14_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL14_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL14_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL14_STALL 0x00000020 // Send STALL +#define USB_RXCSRL14_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL14_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL14_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL14_OVER 0x00000004 // Overrun +#define USB_RXCSRL14_ERROR 0x00000004 // Error +#define USB_RXCSRL14_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL14_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH14 register. +// +//***************************************************************************** +#define USB_RXCSRH14_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH14_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH14_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH14_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH14_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH14_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH14_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH14_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH14_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT14 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT14_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT14_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE14 register. +// +//***************************************************************************** +#define USB_TXTYPE14_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE14_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE14_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE14_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE14_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE14_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE14_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE14_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE14_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE14_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE14_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL14 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL14_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL14_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL14_TXPOLL_S \ + 0 +#define USB_TXINTERVAL14_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE14 register. +// +//***************************************************************************** +#define USB_RXTYPE14_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE14_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE14_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE14_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE14_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE14_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE14_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE14_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE14_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE14_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE14_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL14 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL14_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL14_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL14_TXPOLL_S \ + 0 +#define USB_RXINTERVAL14_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP15 register. +// +//***************************************************************************** +#define USB_TXMAXP15_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP15_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL15 register. +// +//***************************************************************************** +#define USB_TXCSRL15_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL15_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL15_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL15_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL15_STALL 0x00000010 // Send STALL +#define USB_TXCSRL15_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL15_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL15_ERROR 0x00000004 // Error +#define USB_TXCSRL15_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL15_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH15 register. +// +//***************************************************************************** +#define USB_TXCSRH15_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH15_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH15_MODE 0x00000020 // Mode +#define USB_TXCSRH15_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH15_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH15_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH15_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH15_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP15 register. +// +//***************************************************************************** +#define USB_RXMAXP15_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP15_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL15 register. +// +//***************************************************************************** +#define USB_RXCSRL15_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL15_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL15_STALL 0x00000020 // Send STALL +#define USB_RXCSRL15_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL15_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL15_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL15_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL15_ERROR 0x00000004 // Error +#define USB_RXCSRL15_OVER 0x00000004 // Overrun +#define USB_RXCSRL15_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL15_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH15 register. +// +//***************************************************************************** +#define USB_RXCSRH15_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH15_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH15_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH15_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH15_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH15_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH15_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH15_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH15_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT15 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT15_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT15_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE15 register. +// +//***************************************************************************** +#define USB_TXTYPE15_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE15_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE15_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE15_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE15_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE15_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE15_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE15_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE15_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE15_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE15_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL15 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL15_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL15_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL15_NAKLMT_S \ + 0 +#define USB_TXINTERVAL15_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE15 register. +// +//***************************************************************************** +#define USB_RXTYPE15_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE15_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE15_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE15_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE15_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE15_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE15_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE15_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE15_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE15_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE15_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL15 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL15_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL15_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL15_TXPOLL_S \ + 0 +#define USB_RXINTERVAL15_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT1 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT1_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT2 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT2_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT2_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT3 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT3_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT3_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT4 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT4_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT4_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT5 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT5_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT5_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT6 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT6_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT6_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT7 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT7_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT7_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT8 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT8_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT8_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT9 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT9_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT9_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT10 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT10_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT10_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT11 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT11_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT11_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT12 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT12_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT12_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT13 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT13_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT13_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT14 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT14_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT14_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT15 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT15_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT15_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXDPKTBUFDIS +// register. +// +//***************************************************************************** +#define USB_RXDPKTBUFDIS_EP15 0x00008000 // EP15 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP14 0x00004000 // EP14 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP13 0x00002000 // EP13 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP12 0x00001000 // EP12 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP11 0x00000800 // EP11 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP10 0x00000400 // EP10 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP9 0x00000200 // EP9 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP8 0x00000100 // EP8 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP7 0x00000080 // EP7 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP6 0x00000040 // EP6 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP5 0x00000020 // EP5 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP4 0x00000010 // EP4 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP3 0x00000008 // EP3 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP2 0x00000004 // EP2 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP1 0x00000002 // EP1 RX Double-Packet Buffer + // Disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXDPKTBUFDIS +// register. +// +//***************************************************************************** +#define USB_TXDPKTBUFDIS_EP15 0x00008000 // EP15 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP14 0x00004000 // EP14 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP13 0x00002000 // EP13 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP12 0x00001000 // EP12 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP11 0x00000800 // EP11 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP10 0x00000400 // EP10 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP9 0x00000200 // EP9 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP8 0x00000100 // EP8 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP7 0x00000080 // EP7 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP6 0x00000040 // EP6 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP5 0x00000020 // EP5 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP4 0x00000010 // EP4 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP3 0x00000008 // EP3 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP2 0x00000004 // EP2 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP1 0x00000002 // EP1 TX Double-Packet Buffer + // Disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPC register. +// +//***************************************************************************** +#define USB_EPC_PFLTACT_M 0x00000300 // Power Fault Action +#define USB_EPC_PFLTACT_UNCHG 0x00000000 // Unchanged +#define USB_EPC_PFLTACT_TRIS 0x00000100 // Tristate +#define USB_EPC_PFLTACT_LOW 0x00000200 // Low +#define USB_EPC_PFLTACT_HIGH 0x00000300 // High +#define USB_EPC_PFLTAEN 0x00000040 // Power Fault Action Enable +#define USB_EPC_PFLTSEN_HIGH 0x00000020 // Power Fault Sense +#define USB_EPC_PFLTEN 0x00000010 // Power Fault Input Enable +#define USB_EPC_EPENDE 0x00000004 // EPEN Drive Enable +#define USB_EPC_EPEN_M 0x00000003 // External Power Supply Enable + // Configuration +#define USB_EPC_EPEN_LOW 0x00000000 // Power Enable Active Low +#define USB_EPC_EPEN_HIGH 0x00000001 // Power Enable Active High +#define USB_EPC_EPEN_VBLOW 0x00000002 // Power Enable High if VBUS Low +#define USB_EPC_EPEN_VBHIGH 0x00000003 // Power Enable High if VBUS High + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCRIS register. +// +//***************************************************************************** +#define USB_EPCRIS_PF 0x00000001 // USB Power Fault Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCIM register. +// +//***************************************************************************** +#define USB_EPCIM_PF 0x00000001 // USB Power Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCISC register. +// +//***************************************************************************** +#define USB_EPCISC_PF 0x00000001 // USB Power Fault Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRRIS register. +// +//***************************************************************************** +#define USB_DRRIS_RESUME 0x00000001 // RESUME Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRIM register. +// +//***************************************************************************** +#define USB_DRIM_RESUME 0x00000001 // RESUME Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRISC register. +// +//***************************************************************************** +#define USB_DRISC_RESUME 0x00000001 // RESUME Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_GPCS register. +// +//***************************************************************************** +#define USB_GPCS_DEVMODOTG 0x00000002 // Enable Device Mode +#define USB_GPCS_DEVMOD 0x00000001 // Device Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDC register. +// +//***************************************************************************** +#define USB_VDC_VBDEN 0x00000001 // VBUS Droop Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCRIS register. +// +//***************************************************************************** +#define USB_VDCRIS_VD 0x00000001 // VBUS Droop Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCIM register. +// +//***************************************************************************** +#define USB_VDCIM_VD 0x00000001 // VBUS Droop Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCISC register. +// +//***************************************************************************** +#define USB_VDCISC_VD 0x00000001 // VBUS Droop Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVRIS register. +// +//***************************************************************************** +#define USB_IDVRIS_ID 0x00000001 // ID Valid Detect Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVIM register. +// +//***************************************************************************** +#define USB_IDVIM_ID 0x00000001 // ID Valid Detect Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVISC register. +// +//***************************************************************************** +#define USB_IDVISC_ID 0x00000001 // ID Valid Detect Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DMASEL register. +// +//***************************************************************************** +#define USB_DMASEL_DMACTX_M 0x00F00000 // DMA C TX Select +#define USB_DMASEL_DMACRX_M 0x000F0000 // DMA C RX Select +#define USB_DMASEL_DMABTX_M 0x0000F000 // DMA B TX Select +#define USB_DMASEL_DMABRX_M 0x00000F00 // DMA B RX Select +#define USB_DMASEL_DMAATX_M 0x000000F0 // DMA A TX Select +#define USB_DMASEL_DMAARX_M 0x0000000F // DMA A RX Select +#define USB_DMASEL_DMABTX_S 12 +#define USB_DMASEL_DMABRX_S 8 +#define USB_DMASEL_DMAATX_S 4 +#define USB_DMASEL_DMAARX_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// USB_O_TXFIFOADD register. +// +//***************************************************************************** +#define USB_TXFIFOADD_ADDR_2048 0x00000009 // 2048 +#define USB_TXFIFOADD_ADDR_1024 0x00000008 // 1024 +#define USB_TXFIFOADD_ADDR_512 0x00000007 // 512 +#define USB_TXFIFOADD_ADDR_256 0x00000006 // 256 +#define USB_TXFIFOADD_ADDR_128 0x00000005 // 128 +#define USB_TXFIFOADD_ADDR_64 0x00000004 // 64 +#define USB_TXFIFOADD_ADDR_32 0x00000003 // 32 +#define USB_TXFIFOADD_ADDR_16 0x00000002 // 16 +#define USB_TXFIFOADD_ADDR_8 0x00000001 // 8 +#define USB_TXFIFOADD_ADDR_0 0x00000000 // 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// USB_O_RXFIFOADD register. +// +//***************************************************************************** +#define USB_RXFIFOADD_ADDR_2048 0x00000009 // 2048 +#define USB_RXFIFOADD_ADDR_1024 0x00000008 // 1024 +#define USB_RXFIFOADD_ADDR_512 0x00000007 // 512 +#define USB_RXFIFOADD_ADDR_256 0x00000006 // 256 +#define USB_RXFIFOADD_ADDR_128 0x00000005 // 128 +#define USB_RXFIFOADD_ADDR_64 0x00000004 // 64 +#define USB_RXFIFOADD_ADDR_32 0x00000003 // 32 +#define USB_RXFIFOADD_ADDR_16 0x00000002 // 16 +#define USB_RXFIFOADD_ADDR_8 0x00000001 // 8 +#define USB_RXFIFOADD_ADDR_0 0x00000000 // 0 + +#endif + +#endif // __HW_USB_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_watchdog.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_watchdog.h new file mode 100644 index 00000000..b8aeb7a8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/hw_watchdog.h @@ -0,0 +1,175 @@ +//***************************************************************************** +// +// hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_WATCHDOG_H__ +#define __HW_WATCHDOG_H__ + +//***************************************************************************** +// +// The following are defines for the Watchdog Timer register offsets. +// +//***************************************************************************** +#define WDT_O_LOAD 0x00000000 // Watchdog Load +#define WDT_O_VALUE 0x00000004 // Watchdog Value +#define WDT_O_CTL 0x00000008 // Watchdog Control +#define WDT_O_ICR 0x0000000C // Watchdog Interrupt Clear +#define WDT_O_RIS 0x00000010 // Watchdog Raw Interrupt Status +#define WDT_O_MIS 0x00000014 // Watchdog Masked Interrupt Status +#define WDT_O_TEST 0x00000418 // Watchdog Test +#define WDT_O_LOCK 0x00000C00 // Watchdog Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOAD register. +// +//***************************************************************************** +#define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value +#define WDT_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_VALUE register. +// +//***************************************************************************** +#define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value +#define WDT_VALUE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_CTL register. +// +//***************************************************************************** +#define WDT_CTL_WRC 0x80000000 // Write Complete +#define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable +#define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_ICR register. +// +//***************************************************************************** +#define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear +#define WDT_ICR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_RIS register. +// +//***************************************************************************** +#define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_MIS register. +// +//***************************************************************************** +#define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_TEST register. +// +//***************************************************************************** +#define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOCK register. +// +//***************************************************************************** +#define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock +#define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked +#define WDT_LOCK_LOCKED 0x00000001 // Locked +#define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and +// WDT_MIS registers. +// +//***************************************************************************** +#define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Watchdog Timer register +// offsets. +// +//***************************************************************************** +#define WDT_O_PeriphID4 0x00000FD0 +#define WDT_O_PeriphID5 0x00000FD4 +#define WDT_O_PeriphID6 0x00000FD8 +#define WDT_O_PeriphID7 0x00000FDC +#define WDT_O_PeriphID0 0x00000FE0 +#define WDT_O_PeriphID1 0x00000FE4 +#define WDT_O_PeriphID2 0x00000FE8 +#define WDT_O_PeriphID3 0x00000FEC +#define WDT_O_PCellID0 0x00000FF0 +#define WDT_O_PCellID1 0x00000FF4 +#define WDT_O_PCellID2 0x00000FF8 +#define WDT_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the WDT_O_TEST +// register. +// +//***************************************************************************** +#define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the WDT +// registers. +// +//***************************************************************************** +#define WDT_RV_VALUE 0xFFFFFFFF // Current value register +#define WDT_RV_LOAD 0xFFFFFFFF // Load register +#define WDT_RV_PCellID1 0x000000F0 +#define WDT_RV_PCellID3 0x000000B1 +#define WDT_RV_PeriphID1 0x00000018 +#define WDT_RV_PeriphID2 0x00000018 +#define WDT_RV_PCellID0 0x0000000D +#define WDT_RV_PCellID2 0x00000005 +#define WDT_RV_PeriphID0 0x00000005 +#define WDT_RV_PeriphID3 0x00000001 +#define WDT_RV_PeriphID5 0x00000000 +#define WDT_RV_RIS 0x00000000 // Raw interrupt status register +#define WDT_RV_CTL 0x00000000 // Control register +#define WDT_RV_PeriphID4 0x00000000 +#define WDT_RV_PeriphID6 0x00000000 +#define WDT_RV_PeriphID7 0x00000000 +#define WDT_RV_LOCK 0x00000000 // Lock register +#define WDT_RV_MIS 0x00000000 // Masked interrupt status register + +#endif + +#endif // __HW_WATCHDOG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/lm3s6965.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/lm3s6965.h new file mode 100644 index 00000000..b52248cd --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/lib/inc/lm3s6965.h @@ -0,0 +1,4795 @@ +//***************************************************************************** +// +// lm3s6965.h - LM3S6965 Register Definitions +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __LM3S6965_H__ +#define __LM3S6965_H__ + +//***************************************************************************** +// +// Watchdog Timer registers (WATCHDOG0) +// +//***************************************************************************** +#define WATCHDOG0_LOAD_R (*((volatile unsigned long *)0x40000000)) +#define WATCHDOG0_VALUE_R (*((volatile unsigned long *)0x40000004)) +#define WATCHDOG0_CTL_R (*((volatile unsigned long *)0x40000008)) +#define WATCHDOG0_ICR_R (*((volatile unsigned long *)0x4000000C)) +#define WATCHDOG0_RIS_R (*((volatile unsigned long *)0x40000010)) +#define WATCHDOG0_MIS_R (*((volatile unsigned long *)0x40000014)) +#define WATCHDOG0_TEST_R (*((volatile unsigned long *)0x40000418)) +#define WATCHDOG0_LOCK_R (*((volatile unsigned long *)0x40000C00)) + +//***************************************************************************** +// +// GPIO registers (PORTA) +// +//***************************************************************************** +#define GPIO_PORTA_DATA_BITS_R ((volatile unsigned long *)0x40004000) +#define GPIO_PORTA_DATA_R (*((volatile unsigned long *)0x400043FC)) +#define GPIO_PORTA_DIR_R (*((volatile unsigned long *)0x40004400)) +#define GPIO_PORTA_IS_R (*((volatile unsigned long *)0x40004404)) +#define GPIO_PORTA_IBE_R (*((volatile unsigned long *)0x40004408)) +#define GPIO_PORTA_IEV_R (*((volatile unsigned long *)0x4000440C)) +#define GPIO_PORTA_IM_R (*((volatile unsigned long *)0x40004410)) +#define GPIO_PORTA_RIS_R (*((volatile unsigned long *)0x40004414)) +#define GPIO_PORTA_MIS_R (*((volatile unsigned long *)0x40004418)) +#define GPIO_PORTA_ICR_R (*((volatile unsigned long *)0x4000441C)) +#define GPIO_PORTA_AFSEL_R (*((volatile unsigned long *)0x40004420)) +#define GPIO_PORTA_DR2R_R (*((volatile unsigned long *)0x40004500)) +#define GPIO_PORTA_DR4R_R (*((volatile unsigned long *)0x40004504)) +#define GPIO_PORTA_DR8R_R (*((volatile unsigned long *)0x40004508)) +#define GPIO_PORTA_ODR_R (*((volatile unsigned long *)0x4000450C)) +#define GPIO_PORTA_PUR_R (*((volatile unsigned long *)0x40004510)) +#define GPIO_PORTA_PDR_R (*((volatile unsigned long *)0x40004514)) +#define GPIO_PORTA_SLR_R (*((volatile unsigned long *)0x40004518)) +#define GPIO_PORTA_DEN_R (*((volatile unsigned long *)0x4000451C)) +#define GPIO_PORTA_LOCK_R (*((volatile unsigned long *)0x40004520)) +#define GPIO_PORTA_CR_R (*((volatile unsigned long *)0x40004524)) + +//***************************************************************************** +// +// GPIO registers (PORTB) +// +//***************************************************************************** +#define GPIO_PORTB_DATA_BITS_R ((volatile unsigned long *)0x40005000) +#define GPIO_PORTB_DATA_R (*((volatile unsigned long *)0x400053FC)) +#define GPIO_PORTB_DIR_R (*((volatile unsigned long *)0x40005400)) +#define GPIO_PORTB_IS_R (*((volatile unsigned long *)0x40005404)) +#define GPIO_PORTB_IBE_R (*((volatile unsigned long *)0x40005408)) +#define GPIO_PORTB_IEV_R (*((volatile unsigned long *)0x4000540C)) +#define GPIO_PORTB_IM_R (*((volatile unsigned long *)0x40005410)) +#define GPIO_PORTB_RIS_R (*((volatile unsigned long *)0x40005414)) +#define GPIO_PORTB_MIS_R (*((volatile unsigned long *)0x40005418)) +#define GPIO_PORTB_ICR_R (*((volatile unsigned long *)0x4000541C)) +#define GPIO_PORTB_AFSEL_R (*((volatile unsigned long *)0x40005420)) +#define GPIO_PORTB_DR2R_R (*((volatile unsigned long *)0x40005500)) +#define GPIO_PORTB_DR4R_R (*((volatile unsigned long *)0x40005504)) +#define GPIO_PORTB_DR8R_R (*((volatile unsigned long *)0x40005508)) +#define GPIO_PORTB_ODR_R (*((volatile unsigned long *)0x4000550C)) +#define GPIO_PORTB_PUR_R (*((volatile unsigned long *)0x40005510)) +#define GPIO_PORTB_PDR_R (*((volatile unsigned long *)0x40005514)) +#define GPIO_PORTB_SLR_R (*((volatile unsigned long *)0x40005518)) +#define GPIO_PORTB_DEN_R (*((volatile unsigned long *)0x4000551C)) +#define GPIO_PORTB_LOCK_R (*((volatile unsigned long *)0x40005520)) +#define GPIO_PORTB_CR_R (*((volatile unsigned long *)0x40005524)) + +//***************************************************************************** +// +// GPIO registers (PORTC) +// +//***************************************************************************** +#define GPIO_PORTC_DATA_BITS_R ((volatile unsigned long *)0x40006000) +#define GPIO_PORTC_DATA_R (*((volatile unsigned long *)0x400063FC)) +#define GPIO_PORTC_DIR_R (*((volatile unsigned long *)0x40006400)) +#define GPIO_PORTC_IS_R (*((volatile unsigned long *)0x40006404)) +#define GPIO_PORTC_IBE_R (*((volatile unsigned long *)0x40006408)) +#define GPIO_PORTC_IEV_R (*((volatile unsigned long *)0x4000640C)) +#define GPIO_PORTC_IM_R (*((volatile unsigned long *)0x40006410)) +#define GPIO_PORTC_RIS_R (*((volatile unsigned long *)0x40006414)) +#define GPIO_PORTC_MIS_R (*((volatile unsigned long *)0x40006418)) +#define GPIO_PORTC_ICR_R (*((volatile unsigned long *)0x4000641C)) +#define GPIO_PORTC_AFSEL_R (*((volatile unsigned long *)0x40006420)) +#define GPIO_PORTC_DR2R_R (*((volatile unsigned long *)0x40006500)) +#define GPIO_PORTC_DR4R_R (*((volatile unsigned long *)0x40006504)) +#define GPIO_PORTC_DR8R_R (*((volatile unsigned long *)0x40006508)) +#define GPIO_PORTC_ODR_R (*((volatile unsigned long *)0x4000650C)) +#define GPIO_PORTC_PUR_R (*((volatile unsigned long *)0x40006510)) +#define GPIO_PORTC_PDR_R (*((volatile unsigned long *)0x40006514)) +#define GPIO_PORTC_SLR_R (*((volatile unsigned long *)0x40006518)) +#define GPIO_PORTC_DEN_R (*((volatile unsigned long *)0x4000651C)) +#define GPIO_PORTC_LOCK_R (*((volatile unsigned long *)0x40006520)) +#define GPIO_PORTC_CR_R (*((volatile unsigned long *)0x40006524)) + +//***************************************************************************** +// +// GPIO registers (PORTD) +// +//***************************************************************************** +#define GPIO_PORTD_DATA_BITS_R ((volatile unsigned long *)0x40007000) +#define GPIO_PORTD_DATA_R (*((volatile unsigned long *)0x400073FC)) +#define GPIO_PORTD_DIR_R (*((volatile unsigned long *)0x40007400)) +#define GPIO_PORTD_IS_R (*((volatile unsigned long *)0x40007404)) +#define GPIO_PORTD_IBE_R (*((volatile unsigned long *)0x40007408)) +#define GPIO_PORTD_IEV_R (*((volatile unsigned long *)0x4000740C)) +#define GPIO_PORTD_IM_R (*((volatile unsigned long *)0x40007410)) +#define GPIO_PORTD_RIS_R (*((volatile unsigned long *)0x40007414)) +#define GPIO_PORTD_MIS_R (*((volatile unsigned long *)0x40007418)) +#define GPIO_PORTD_ICR_R (*((volatile unsigned long *)0x4000741C)) +#define GPIO_PORTD_AFSEL_R (*((volatile unsigned long *)0x40007420)) +#define GPIO_PORTD_DR2R_R (*((volatile unsigned long *)0x40007500)) +#define GPIO_PORTD_DR4R_R (*((volatile unsigned long *)0x40007504)) +#define GPIO_PORTD_DR8R_R (*((volatile unsigned long *)0x40007508)) +#define GPIO_PORTD_ODR_R (*((volatile unsigned long *)0x4000750C)) +#define GPIO_PORTD_PUR_R (*((volatile unsigned long *)0x40007510)) +#define GPIO_PORTD_PDR_R (*((volatile unsigned long *)0x40007514)) +#define GPIO_PORTD_SLR_R (*((volatile unsigned long *)0x40007518)) +#define GPIO_PORTD_DEN_R (*((volatile unsigned long *)0x4000751C)) +#define GPIO_PORTD_LOCK_R (*((volatile unsigned long *)0x40007520)) +#define GPIO_PORTD_CR_R (*((volatile unsigned long *)0x40007524)) + +//***************************************************************************** +// +// SSI registers (SSI0) +// +//***************************************************************************** +#define SSI0_CR0_R (*((volatile unsigned long *)0x40008000)) +#define SSI0_CR1_R (*((volatile unsigned long *)0x40008004)) +#define SSI0_DR_R (*((volatile unsigned long *)0x40008008)) +#define SSI0_SR_R (*((volatile unsigned long *)0x4000800C)) +#define SSI0_CPSR_R (*((volatile unsigned long *)0x40008010)) +#define SSI0_IM_R (*((volatile unsigned long *)0x40008014)) +#define SSI0_RIS_R (*((volatile unsigned long *)0x40008018)) +#define SSI0_MIS_R (*((volatile unsigned long *)0x4000801C)) +#define SSI0_ICR_R (*((volatile unsigned long *)0x40008020)) + +//***************************************************************************** +// +// UART registers (UART0) +// +//***************************************************************************** +#define UART0_DR_R (*((volatile unsigned long *)0x4000C000)) +#define UART0_RSR_R (*((volatile unsigned long *)0x4000C004)) +#define UART0_ECR_R (*((volatile unsigned long *)0x4000C004)) +#define UART0_FR_R (*((volatile unsigned long *)0x4000C018)) +#define UART0_ILPR_R (*((volatile unsigned long *)0x4000C020)) +#define UART0_IBRD_R (*((volatile unsigned long *)0x4000C024)) +#define UART0_FBRD_R (*((volatile unsigned long *)0x4000C028)) +#define UART0_LCRH_R (*((volatile unsigned long *)0x4000C02C)) +#define UART0_CTL_R (*((volatile unsigned long *)0x4000C030)) +#define UART0_IFLS_R (*((volatile unsigned long *)0x4000C034)) +#define UART0_IM_R (*((volatile unsigned long *)0x4000C038)) +#define UART0_RIS_R (*((volatile unsigned long *)0x4000C03C)) +#define UART0_MIS_R (*((volatile unsigned long *)0x4000C040)) +#define UART0_ICR_R (*((volatile unsigned long *)0x4000C044)) + +//***************************************************************************** +// +// UART registers (UART1) +// +//***************************************************************************** +#define UART1_DR_R (*((volatile unsigned long *)0x4000D000)) +#define UART1_RSR_R (*((volatile unsigned long *)0x4000D004)) +#define UART1_ECR_R (*((volatile unsigned long *)0x4000D004)) +#define UART1_FR_R (*((volatile unsigned long *)0x4000D018)) +#define UART1_ILPR_R (*((volatile unsigned long *)0x4000D020)) +#define UART1_IBRD_R (*((volatile unsigned long *)0x4000D024)) +#define UART1_FBRD_R (*((volatile unsigned long *)0x4000D028)) +#define UART1_LCRH_R (*((volatile unsigned long *)0x4000D02C)) +#define UART1_CTL_R (*((volatile unsigned long *)0x4000D030)) +#define UART1_IFLS_R (*((volatile unsigned long *)0x4000D034)) +#define UART1_IM_R (*((volatile unsigned long *)0x4000D038)) +#define UART1_RIS_R (*((volatile unsigned long *)0x4000D03C)) +#define UART1_MIS_R (*((volatile unsigned long *)0x4000D040)) +#define UART1_ICR_R (*((volatile unsigned long *)0x4000D044)) + +//***************************************************************************** +// +// UART registers (UART2) +// +//***************************************************************************** +#define UART2_DR_R (*((volatile unsigned long *)0x4000E000)) +#define UART2_RSR_R (*((volatile unsigned long *)0x4000E004)) +#define UART2_ECR_R (*((volatile unsigned long *)0x4000E004)) +#define UART2_FR_R (*((volatile unsigned long *)0x4000E018)) +#define UART2_ILPR_R (*((volatile unsigned long *)0x4000E020)) +#define UART2_IBRD_R (*((volatile unsigned long *)0x4000E024)) +#define UART2_FBRD_R (*((volatile unsigned long *)0x4000E028)) +#define UART2_LCRH_R (*((volatile unsigned long *)0x4000E02C)) +#define UART2_CTL_R (*((volatile unsigned long *)0x4000E030)) +#define UART2_IFLS_R (*((volatile unsigned long *)0x4000E034)) +#define UART2_IM_R (*((volatile unsigned long *)0x4000E038)) +#define UART2_RIS_R (*((volatile unsigned long *)0x4000E03C)) +#define UART2_MIS_R (*((volatile unsigned long *)0x4000E040)) +#define UART2_ICR_R (*((volatile unsigned long *)0x4000E044)) + +//***************************************************************************** +// +// I2C registers (I2C0 MASTER) +// +//***************************************************************************** +#define I2C0_MASTER_MSA_R (*((volatile unsigned long *)0x40020000)) +#define I2C0_MASTER_MCS_R (*((volatile unsigned long *)0x40020004)) +#define I2C0_MASTER_MDR_R (*((volatile unsigned long *)0x40020008)) +#define I2C0_MASTER_MTPR_R (*((volatile unsigned long *)0x4002000C)) +#define I2C0_MASTER_MIMR_R (*((volatile unsigned long *)0x40020010)) +#define I2C0_MASTER_MRIS_R (*((volatile unsigned long *)0x40020014)) +#define I2C0_MASTER_MMIS_R (*((volatile unsigned long *)0x40020018)) +#define I2C0_MASTER_MICR_R (*((volatile unsigned long *)0x4002001C)) +#define I2C0_MASTER_MCR_R (*((volatile unsigned long *)0x40020020)) + +//***************************************************************************** +// +// I2C registers (I2C0 SLAVE) +// +//***************************************************************************** +#define I2C0_SLAVE_SOAR_R (*((volatile unsigned long *)0x40020800)) +#define I2C0_SLAVE_SCSR_R (*((volatile unsigned long *)0x40020804)) +#define I2C0_SLAVE_SDR_R (*((volatile unsigned long *)0x40020808)) +#define I2C0_SLAVE_SIMR_R (*((volatile unsigned long *)0x4002080C)) +#define I2C0_SLAVE_SRIS_R (*((volatile unsigned long *)0x40020810)) +#define I2C0_SLAVE_SMIS_R (*((volatile unsigned long *)0x40020814)) +#define I2C0_SLAVE_SICR_R (*((volatile unsigned long *)0x40020818)) + +//***************************************************************************** +// +// I2C registers (I2C1 MASTER) +// +//***************************************************************************** +#define I2C1_MASTER_MSA_R (*((volatile unsigned long *)0x40021000)) +#define I2C1_MASTER_MCS_R (*((volatile unsigned long *)0x40021004)) +#define I2C1_MASTER_MDR_R (*((volatile unsigned long *)0x40021008)) +#define I2C1_MASTER_MTPR_R (*((volatile unsigned long *)0x4002100C)) +#define I2C1_MASTER_MIMR_R (*((volatile unsigned long *)0x40021010)) +#define I2C1_MASTER_MRIS_R (*((volatile unsigned long *)0x40021014)) +#define I2C1_MASTER_MMIS_R (*((volatile unsigned long *)0x40021018)) +#define I2C1_MASTER_MICR_R (*((volatile unsigned long *)0x4002101C)) +#define I2C1_MASTER_MCR_R (*((volatile unsigned long *)0x40021020)) + +//***************************************************************************** +// +// I2C registers (I2C1 SLAVE) +// +//***************************************************************************** +#define I2C1_SLAVE_SOAR_R (*((volatile unsigned long *)0x40021800)) +#define I2C1_SLAVE_SCSR_R (*((volatile unsigned long *)0x40021804)) +#define I2C1_SLAVE_SDR_R (*((volatile unsigned long *)0x40021808)) +#define I2C1_SLAVE_SIMR_R (*((volatile unsigned long *)0x4002180C)) +#define I2C1_SLAVE_SRIS_R (*((volatile unsigned long *)0x40021810)) +#define I2C1_SLAVE_SMIS_R (*((volatile unsigned long *)0x40021814)) +#define I2C1_SLAVE_SICR_R (*((volatile unsigned long *)0x40021818)) + +//***************************************************************************** +// +// GPIO registers (PORTE) +// +//***************************************************************************** +#define GPIO_PORTE_DATA_BITS_R ((volatile unsigned long *)0x40024000) +#define GPIO_PORTE_DATA_R (*((volatile unsigned long *)0x400243FC)) +#define GPIO_PORTE_DIR_R (*((volatile unsigned long *)0x40024400)) +#define GPIO_PORTE_IS_R (*((volatile unsigned long *)0x40024404)) +#define GPIO_PORTE_IBE_R (*((volatile unsigned long *)0x40024408)) +#define GPIO_PORTE_IEV_R (*((volatile unsigned long *)0x4002440C)) +#define GPIO_PORTE_IM_R (*((volatile unsigned long *)0x40024410)) +#define GPIO_PORTE_RIS_R (*((volatile unsigned long *)0x40024414)) +#define GPIO_PORTE_MIS_R (*((volatile unsigned long *)0x40024418)) +#define GPIO_PORTE_ICR_R (*((volatile unsigned long *)0x4002441C)) +#define GPIO_PORTE_AFSEL_R (*((volatile unsigned long *)0x40024420)) +#define GPIO_PORTE_DR2R_R (*((volatile unsigned long *)0x40024500)) +#define GPIO_PORTE_DR4R_R (*((volatile unsigned long *)0x40024504)) +#define GPIO_PORTE_DR8R_R (*((volatile unsigned long *)0x40024508)) +#define GPIO_PORTE_ODR_R (*((volatile unsigned long *)0x4002450C)) +#define GPIO_PORTE_PUR_R (*((volatile unsigned long *)0x40024510)) +#define GPIO_PORTE_PDR_R (*((volatile unsigned long *)0x40024514)) +#define GPIO_PORTE_SLR_R (*((volatile unsigned long *)0x40024518)) +#define GPIO_PORTE_DEN_R (*((volatile unsigned long *)0x4002451C)) +#define GPIO_PORTE_LOCK_R (*((volatile unsigned long *)0x40024520)) +#define GPIO_PORTE_CR_R (*((volatile unsigned long *)0x40024524)) + +//***************************************************************************** +// +// GPIO registers (PORTF) +// +//***************************************************************************** +#define GPIO_PORTF_DATA_BITS_R ((volatile unsigned long *)0x40025000) +#define GPIO_PORTF_DATA_R (*((volatile unsigned long *)0x400253FC)) +#define GPIO_PORTF_DIR_R (*((volatile unsigned long *)0x40025400)) +#define GPIO_PORTF_IS_R (*((volatile unsigned long *)0x40025404)) +#define GPIO_PORTF_IBE_R (*((volatile unsigned long *)0x40025408)) +#define GPIO_PORTF_IEV_R (*((volatile unsigned long *)0x4002540C)) +#define GPIO_PORTF_IM_R (*((volatile unsigned long *)0x40025410)) +#define GPIO_PORTF_RIS_R (*((volatile unsigned long *)0x40025414)) +#define GPIO_PORTF_MIS_R (*((volatile unsigned long *)0x40025418)) +#define GPIO_PORTF_ICR_R (*((volatile unsigned long *)0x4002541C)) +#define GPIO_PORTF_AFSEL_R (*((volatile unsigned long *)0x40025420)) +#define GPIO_PORTF_DR2R_R (*((volatile unsigned long *)0x40025500)) +#define GPIO_PORTF_DR4R_R (*((volatile unsigned long *)0x40025504)) +#define GPIO_PORTF_DR8R_R (*((volatile unsigned long *)0x40025508)) +#define GPIO_PORTF_ODR_R (*((volatile unsigned long *)0x4002550C)) +#define GPIO_PORTF_PUR_R (*((volatile unsigned long *)0x40025510)) +#define GPIO_PORTF_PDR_R (*((volatile unsigned long *)0x40025514)) +#define GPIO_PORTF_SLR_R (*((volatile unsigned long *)0x40025518)) +#define GPIO_PORTF_DEN_R (*((volatile unsigned long *)0x4002551C)) +#define GPIO_PORTF_LOCK_R (*((volatile unsigned long *)0x40025520)) +#define GPIO_PORTF_CR_R (*((volatile unsigned long *)0x40025524)) + +//***************************************************************************** +// +// GPIO registers (PORTG) +// +//***************************************************************************** +#define GPIO_PORTG_DATA_BITS_R ((volatile unsigned long *)0x40026000) +#define GPIO_PORTG_DATA_R (*((volatile unsigned long *)0x400263FC)) +#define GPIO_PORTG_DIR_R (*((volatile unsigned long *)0x40026400)) +#define GPIO_PORTG_IS_R (*((volatile unsigned long *)0x40026404)) +#define GPIO_PORTG_IBE_R (*((volatile unsigned long *)0x40026408)) +#define GPIO_PORTG_IEV_R (*((volatile unsigned long *)0x4002640C)) +#define GPIO_PORTG_IM_R (*((volatile unsigned long *)0x40026410)) +#define GPIO_PORTG_RIS_R (*((volatile unsigned long *)0x40026414)) +#define GPIO_PORTG_MIS_R (*((volatile unsigned long *)0x40026418)) +#define GPIO_PORTG_ICR_R (*((volatile unsigned long *)0x4002641C)) +#define GPIO_PORTG_AFSEL_R (*((volatile unsigned long *)0x40026420)) +#define GPIO_PORTG_DR2R_R (*((volatile unsigned long *)0x40026500)) +#define GPIO_PORTG_DR4R_R (*((volatile unsigned long *)0x40026504)) +#define GPIO_PORTG_DR8R_R (*((volatile unsigned long *)0x40026508)) +#define GPIO_PORTG_ODR_R (*((volatile unsigned long *)0x4002650C)) +#define GPIO_PORTG_PUR_R (*((volatile unsigned long *)0x40026510)) +#define GPIO_PORTG_PDR_R (*((volatile unsigned long *)0x40026514)) +#define GPIO_PORTG_SLR_R (*((volatile unsigned long *)0x40026518)) +#define GPIO_PORTG_DEN_R (*((volatile unsigned long *)0x4002651C)) +#define GPIO_PORTG_LOCK_R (*((volatile unsigned long *)0x40026520)) +#define GPIO_PORTG_CR_R (*((volatile unsigned long *)0x40026524)) + +//***************************************************************************** +// +// PWM registers (PWM) +// +//***************************************************************************** +#define PWM_CTL_R (*((volatile unsigned long *)0x40028000)) +#define PWM_SYNC_R (*((volatile unsigned long *)0x40028004)) +#define PWM_ENABLE_R (*((volatile unsigned long *)0x40028008)) +#define PWM_INVERT_R (*((volatile unsigned long *)0x4002800C)) +#define PWM_FAULT_R (*((volatile unsigned long *)0x40028010)) +#define PWM_INTEN_R (*((volatile unsigned long *)0x40028014)) +#define PWM_RIS_R (*((volatile unsigned long *)0x40028018)) +#define PWM_ISC_R (*((volatile unsigned long *)0x4002801C)) +#define PWM_STATUS_R (*((volatile unsigned long *)0x40028020)) +#define PWM_0_CTL_R (*((volatile unsigned long *)0x40028040)) +#define PWM_0_INTEN_R (*((volatile unsigned long *)0x40028044)) +#define PWM_0_RIS_R (*((volatile unsigned long *)0x40028048)) +#define PWM_0_ISC_R (*((volatile unsigned long *)0x4002804C)) +#define PWM_0_LOAD_R (*((volatile unsigned long *)0x40028050)) +#define PWM_0_COUNT_R (*((volatile unsigned long *)0x40028054)) +#define PWM_0_CMPA_R (*((volatile unsigned long *)0x40028058)) +#define PWM_0_CMPB_R (*((volatile unsigned long *)0x4002805C)) +#define PWM_0_GENA_R (*((volatile unsigned long *)0x40028060)) +#define PWM_0_GENB_R (*((volatile unsigned long *)0x40028064)) +#define PWM_0_DBCTL_R (*((volatile unsigned long *)0x40028068)) +#define PWM_0_DBRISE_R (*((volatile unsigned long *)0x4002806C)) +#define PWM_0_DBFALL_R (*((volatile unsigned long *)0x40028070)) +#define PWM_1_CTL_R (*((volatile unsigned long *)0x40028080)) +#define PWM_1_INTEN_R (*((volatile unsigned long *)0x40028084)) +#define PWM_1_RIS_R (*((volatile unsigned long *)0x40028088)) +#define PWM_1_ISC_R (*((volatile unsigned long *)0x4002808C)) +#define PWM_1_LOAD_R (*((volatile unsigned long *)0x40028090)) +#define PWM_1_COUNT_R (*((volatile unsigned long *)0x40028094)) +#define PWM_1_CMPA_R (*((volatile unsigned long *)0x40028098)) +#define PWM_1_CMPB_R (*((volatile unsigned long *)0x4002809C)) +#define PWM_1_GENA_R (*((volatile unsigned long *)0x400280A0)) +#define PWM_1_GENB_R (*((volatile unsigned long *)0x400280A4)) +#define PWM_1_DBCTL_R (*((volatile unsigned long *)0x400280A8)) +#define PWM_1_DBRISE_R (*((volatile unsigned long *)0x400280AC)) +#define PWM_1_DBFALL_R (*((volatile unsigned long *)0x400280B0)) +#define PWM_2_CTL_R (*((volatile unsigned long *)0x400280C0)) +#define PWM_2_INTEN_R (*((volatile unsigned long *)0x400280C4)) +#define PWM_2_RIS_R (*((volatile unsigned long *)0x400280C8)) +#define PWM_2_ISC_R (*((volatile unsigned long *)0x400280CC)) +#define PWM_2_LOAD_R (*((volatile unsigned long *)0x400280D0)) +#define PWM_2_COUNT_R (*((volatile unsigned long *)0x400280D4)) +#define PWM_2_CMPA_R (*((volatile unsigned long *)0x400280D8)) +#define PWM_2_CMPB_R (*((volatile unsigned long *)0x400280DC)) +#define PWM_2_GENA_R (*((volatile unsigned long *)0x400280E0)) +#define PWM_2_GENB_R (*((volatile unsigned long *)0x400280E4)) +#define PWM_2_DBCTL_R (*((volatile unsigned long *)0x400280E8)) +#define PWM_2_DBRISE_R (*((volatile unsigned long *)0x400280EC)) +#define PWM_2_DBFALL_R (*((volatile unsigned long *)0x400280F0)) + +//***************************************************************************** +// +// QEI registers (QEI0) +// +//***************************************************************************** +#define QEI0_CTL_R (*((volatile unsigned long *)0x4002C000)) +#define QEI0_STAT_R (*((volatile unsigned long *)0x4002C004)) +#define QEI0_POS_R (*((volatile unsigned long *)0x4002C008)) +#define QEI0_MAXPOS_R (*((volatile unsigned long *)0x4002C00C)) +#define QEI0_LOAD_R (*((volatile unsigned long *)0x4002C010)) +#define QEI0_TIME_R (*((volatile unsigned long *)0x4002C014)) +#define QEI0_COUNT_R (*((volatile unsigned long *)0x4002C018)) +#define QEI0_SPEED_R (*((volatile unsigned long *)0x4002C01C)) +#define QEI0_INTEN_R (*((volatile unsigned long *)0x4002C020)) +#define QEI0_RIS_R (*((volatile unsigned long *)0x4002C024)) +#define QEI0_ISC_R (*((volatile unsigned long *)0x4002C028)) + +//***************************************************************************** +// +// QEI registers (QEI1) +// +//***************************************************************************** +#define QEI1_CTL_R (*((volatile unsigned long *)0x4002D000)) +#define QEI1_STAT_R (*((volatile unsigned long *)0x4002D004)) +#define QEI1_POS_R (*((volatile unsigned long *)0x4002D008)) +#define QEI1_MAXPOS_R (*((volatile unsigned long *)0x4002D00C)) +#define QEI1_LOAD_R (*((volatile unsigned long *)0x4002D010)) +#define QEI1_TIME_R (*((volatile unsigned long *)0x4002D014)) +#define QEI1_COUNT_R (*((volatile unsigned long *)0x4002D018)) +#define QEI1_SPEED_R (*((volatile unsigned long *)0x4002D01C)) +#define QEI1_INTEN_R (*((volatile unsigned long *)0x4002D020)) +#define QEI1_RIS_R (*((volatile unsigned long *)0x4002D024)) +#define QEI1_ISC_R (*((volatile unsigned long *)0x4002D028)) + +//***************************************************************************** +// +// Timer registers (TIMER0) +// +//***************************************************************************** +#define TIMER0_CFG_R (*((volatile unsigned long *)0x40030000)) +#define TIMER0_TAMR_R (*((volatile unsigned long *)0x40030004)) +#define TIMER0_TBMR_R (*((volatile unsigned long *)0x40030008)) +#define TIMER0_CTL_R (*((volatile unsigned long *)0x4003000C)) +#define TIMER0_IMR_R (*((volatile unsigned long *)0x40030018)) +#define TIMER0_RIS_R (*((volatile unsigned long *)0x4003001C)) +#define TIMER0_MIS_R (*((volatile unsigned long *)0x40030020)) +#define TIMER0_ICR_R (*((volatile unsigned long *)0x40030024)) +#define TIMER0_TAILR_R (*((volatile unsigned long *)0x40030028)) +#define TIMER0_TBILR_R (*((volatile unsigned long *)0x4003002C)) +#define TIMER0_TAMATCHR_R (*((volatile unsigned long *)0x40030030)) +#define TIMER0_TBMATCHR_R (*((volatile unsigned long *)0x40030034)) +#define TIMER0_TAPR_R (*((volatile unsigned long *)0x40030038)) +#define TIMER0_TBPR_R (*((volatile unsigned long *)0x4003003C)) +#define TIMER0_TAPMR_R (*((volatile unsigned long *)0x40030040)) +#define TIMER0_TBPMR_R (*((volatile unsigned long *)0x40030044)) +#define TIMER0_TAR_R (*((volatile unsigned long *)0x40030048)) +#define TIMER0_TBR_R (*((volatile unsigned long *)0x4003004C)) + +//***************************************************************************** +// +// Timer registers (TIMER1) +// +//***************************************************************************** +#define TIMER1_CFG_R (*((volatile unsigned long *)0x40031000)) +#define TIMER1_TAMR_R (*((volatile unsigned long *)0x40031004)) +#define TIMER1_TBMR_R (*((volatile unsigned long *)0x40031008)) +#define TIMER1_CTL_R (*((volatile unsigned long *)0x4003100C)) +#define TIMER1_IMR_R (*((volatile unsigned long *)0x40031018)) +#define TIMER1_RIS_R (*((volatile unsigned long *)0x4003101C)) +#define TIMER1_MIS_R (*((volatile unsigned long *)0x40031020)) +#define TIMER1_ICR_R (*((volatile unsigned long *)0x40031024)) +#define TIMER1_TAILR_R (*((volatile unsigned long *)0x40031028)) +#define TIMER1_TBILR_R (*((volatile unsigned long *)0x4003102C)) +#define TIMER1_TAMATCHR_R (*((volatile unsigned long *)0x40031030)) +#define TIMER1_TBMATCHR_R (*((volatile unsigned long *)0x40031034)) +#define TIMER1_TAPR_R (*((volatile unsigned long *)0x40031038)) +#define TIMER1_TBPR_R (*((volatile unsigned long *)0x4003103C)) +#define TIMER1_TAPMR_R (*((volatile unsigned long *)0x40031040)) +#define TIMER1_TBPMR_R (*((volatile unsigned long *)0x40031044)) +#define TIMER1_TAR_R (*((volatile unsigned long *)0x40031048)) +#define TIMER1_TBR_R (*((volatile unsigned long *)0x4003104C)) + +//***************************************************************************** +// +// Timer registers (TIMER2) +// +//***************************************************************************** +#define TIMER2_CFG_R (*((volatile unsigned long *)0x40032000)) +#define TIMER2_TAMR_R (*((volatile unsigned long *)0x40032004)) +#define TIMER2_TBMR_R (*((volatile unsigned long *)0x40032008)) +#define TIMER2_CTL_R (*((volatile unsigned long *)0x4003200C)) +#define TIMER2_IMR_R (*((volatile unsigned long *)0x40032018)) +#define TIMER2_RIS_R (*((volatile unsigned long *)0x4003201C)) +#define TIMER2_MIS_R (*((volatile unsigned long *)0x40032020)) +#define TIMER2_ICR_R (*((volatile unsigned long *)0x40032024)) +#define TIMER2_TAILR_R (*((volatile unsigned long *)0x40032028)) +#define TIMER2_TBILR_R (*((volatile unsigned long *)0x4003202C)) +#define TIMER2_TAMATCHR_R (*((volatile unsigned long *)0x40032030)) +#define TIMER2_TBMATCHR_R (*((volatile unsigned long *)0x40032034)) +#define TIMER2_TAPR_R (*((volatile unsigned long *)0x40032038)) +#define TIMER2_TBPR_R (*((volatile unsigned long *)0x4003203C)) +#define TIMER2_TAPMR_R (*((volatile unsigned long *)0x40032040)) +#define TIMER2_TBPMR_R (*((volatile unsigned long *)0x40032044)) +#define TIMER2_TAR_R (*((volatile unsigned long *)0x40032048)) +#define TIMER2_TBR_R (*((volatile unsigned long *)0x4003204C)) + +//***************************************************************************** +// +// Timer registers (TIMER3) +// +//***************************************************************************** +#define TIMER3_CFG_R (*((volatile unsigned long *)0x40033000)) +#define TIMER3_TAMR_R (*((volatile unsigned long *)0x40033004)) +#define TIMER3_TBMR_R (*((volatile unsigned long *)0x40033008)) +#define TIMER3_CTL_R (*((volatile unsigned long *)0x4003300C)) +#define TIMER3_IMR_R (*((volatile unsigned long *)0x40033018)) +#define TIMER3_RIS_R (*((volatile unsigned long *)0x4003301C)) +#define TIMER3_MIS_R (*((volatile unsigned long *)0x40033020)) +#define TIMER3_ICR_R (*((volatile unsigned long *)0x40033024)) +#define TIMER3_TAILR_R (*((volatile unsigned long *)0x40033028)) +#define TIMER3_TBILR_R (*((volatile unsigned long *)0x4003302C)) +#define TIMER3_TAMATCHR_R (*((volatile unsigned long *)0x40033030)) +#define TIMER3_TBMATCHR_R (*((volatile unsigned long *)0x40033034)) +#define TIMER3_TAPR_R (*((volatile unsigned long *)0x40033038)) +#define TIMER3_TBPR_R (*((volatile unsigned long *)0x4003303C)) +#define TIMER3_TAPMR_R (*((volatile unsigned long *)0x40033040)) +#define TIMER3_TBPMR_R (*((volatile unsigned long *)0x40033044)) +#define TIMER3_TAR_R (*((volatile unsigned long *)0x40033048)) +#define TIMER3_TBR_R (*((volatile unsigned long *)0x4003304C)) + +//***************************************************************************** +// +// ADC registers (ADC0) +// +//***************************************************************************** +#define ADC0_ACTSS_R (*((volatile unsigned long *)0x40038000)) +#define ADC0_RIS_R (*((volatile unsigned long *)0x40038004)) +#define ADC0_IM_R (*((volatile unsigned long *)0x40038008)) +#define ADC0_ISC_R (*((volatile unsigned long *)0x4003800C)) +#define ADC0_OSTAT_R (*((volatile unsigned long *)0x40038010)) +#define ADC0_EMUX_R (*((volatile unsigned long *)0x40038014)) +#define ADC0_USTAT_R (*((volatile unsigned long *)0x40038018)) +#define ADC0_SSPRI_R (*((volatile unsigned long *)0x40038020)) +#define ADC0_PSSI_R (*((volatile unsigned long *)0x40038028)) +#define ADC0_SAC_R (*((volatile unsigned long *)0x40038030)) +#define ADC0_SSMUX0_R (*((volatile unsigned long *)0x40038040)) +#define ADC0_SSCTL0_R (*((volatile unsigned long *)0x40038044)) +#define ADC0_SSFIFO0_R (*((volatile unsigned long *)0x40038048)) +#define ADC0_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C)) +#define ADC0_SSMUX1_R (*((volatile unsigned long *)0x40038060)) +#define ADC0_SSCTL1_R (*((volatile unsigned long *)0x40038064)) +#define ADC0_SSFIFO1_R (*((volatile unsigned long *)0x40038068)) +#define ADC0_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C)) +#define ADC0_SSMUX2_R (*((volatile unsigned long *)0x40038080)) +#define ADC0_SSCTL2_R (*((volatile unsigned long *)0x40038084)) +#define ADC0_SSFIFO2_R (*((volatile unsigned long *)0x40038088)) +#define ADC0_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C)) +#define ADC0_SSMUX3_R (*((volatile unsigned long *)0x400380A0)) +#define ADC0_SSCTL3_R (*((volatile unsigned long *)0x400380A4)) +#define ADC0_SSFIFO3_R (*((volatile unsigned long *)0x400380A8)) +#define ADC0_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC)) +#define ADC0_TMLB_R (*((volatile unsigned long *)0x40038100)) + +//***************************************************************************** +// +// Comparator registers (COMP) +// +//***************************************************************************** +#define COMP_ACMIS_R (*((volatile unsigned long *)0x4003C000)) +#define COMP_ACRIS_R (*((volatile unsigned long *)0x4003C004)) +#define COMP_ACINTEN_R (*((volatile unsigned long *)0x4003C008)) +#define COMP_ACREFCTL_R (*((volatile unsigned long *)0x4003C010)) +#define COMP_ACSTAT0_R (*((volatile unsigned long *)0x4003C020)) +#define COMP_ACCTL0_R (*((volatile unsigned long *)0x4003C024)) +#define COMP_ACSTAT1_R (*((volatile unsigned long *)0x4003C040)) +#define COMP_ACCTL1_R (*((volatile unsigned long *)0x4003C044)) + +//***************************************************************************** +// +// Ethernet MAC registers (MAC) +// +//***************************************************************************** +#define MAC_RIS_R (*((volatile unsigned long *)0x40048000)) +#define MAC_IACK_R (*((volatile unsigned long *)0x40048000)) +#define MAC_IM_R (*((volatile unsigned long *)0x40048004)) +#define MAC_RCTL_R (*((volatile unsigned long *)0x40048008)) +#define MAC_TCTL_R (*((volatile unsigned long *)0x4004800C)) +#define MAC_DATA_R (*((volatile unsigned long *)0x40048010)) +#define MAC_IA0_R (*((volatile unsigned long *)0x40048014)) +#define MAC_IA1_R (*((volatile unsigned long *)0x40048018)) +#define MAC_THR_R (*((volatile unsigned long *)0x4004801C)) +#define MAC_MCTL_R (*((volatile unsigned long *)0x40048020)) +#define MAC_MDV_R (*((volatile unsigned long *)0x40048024)) +#define MAC_MTXD_R (*((volatile unsigned long *)0x4004802C)) +#define MAC_MRXD_R (*((volatile unsigned long *)0x40048030)) +#define MAC_NP_R (*((volatile unsigned long *)0x40048034)) +#define MAC_TR_R (*((volatile unsigned long *)0x40048038)) + +//***************************************************************************** +// +// Ethernet Controller PHY registers (MAC) +// +//***************************************************************************** +#define PHY_MR0 0x00000000 // Ethernet PHY Management Register + // 0 - Control +#define PHY_MR1 0x00000001 // Ethernet PHY Management Register + // 1 - Status +#define PHY_MR2 0x00000002 // Ethernet PHY Management Register + // 2 - PHY Identifier 1 +#define PHY_MR3 0x00000003 // Ethernet PHY Management Register + // 3 - PHY Identifier 2 +#define PHY_MR4 0x00000004 // Ethernet PHY Management Register + // 4 - Auto-Negotiation + // Advertisement +#define PHY_MR5 0x00000005 // Ethernet PHY Management Register + // 5 - Auto-Negotiation Link + // Partner Base Page Ability +#define PHY_MR6 0x00000006 // Ethernet PHY Management Register + // 6 - Auto-Negotiation Expansion +#define PHY_MR16 0x00000010 // Ethernet PHY Management Register + // 16 - Vendor-Specific +#define PHY_MR17 0x00000011 // Ethernet PHY Management Register + // 17 - Mode Control/Status +#define PHY_MR18 0x00000012 // Ethernet PHY Management Register + // 18 - Diagnostic +#define PHY_MR19 0x00000013 // Ethernet PHY Management Register + // 19 - Transceiver Control +#define PHY_MR23 0x00000017 // Ethernet PHY Management Register + // 23 - LED Configuration +#define PHY_MR24 0x00000018 // Ethernet PHY Management Register + // 24 -MDI/MDIX Control + +//***************************************************************************** +// +// Hibernation module registers (HIB) +// +//***************************************************************************** +#define HIB_RTCC_R (*((volatile unsigned long *)0x400FC000)) +#define HIB_RTCM0_R (*((volatile unsigned long *)0x400FC004)) +#define HIB_RTCM1_R (*((volatile unsigned long *)0x400FC008)) +#define HIB_RTCLD_R (*((volatile unsigned long *)0x400FC00C)) +#define HIB_CTL_R (*((volatile unsigned long *)0x400FC010)) +#define HIB_IM_R (*((volatile unsigned long *)0x400FC014)) +#define HIB_RIS_R (*((volatile unsigned long *)0x400FC018)) +#define HIB_MIS_R (*((volatile unsigned long *)0x400FC01C)) +#define HIB_IC_R (*((volatile unsigned long *)0x400FC020)) +#define HIB_RTCT_R (*((volatile unsigned long *)0x400FC024)) +#define HIB_DATA_R (*((volatile unsigned long *)0x400FC030)) + +//***************************************************************************** +// +// FLASH registers (FLASH CTRL) +// +//***************************************************************************** +#define FLASH_FMA_R (*((volatile unsigned long *)0x400FD000)) +#define FLASH_FMD_R (*((volatile unsigned long *)0x400FD004)) +#define FLASH_FMC_R (*((volatile unsigned long *)0x400FD008)) +#define FLASH_FCRIS_R (*((volatile unsigned long *)0x400FD00C)) +#define FLASH_FCIM_R (*((volatile unsigned long *)0x400FD010)) +#define FLASH_FCMISC_R (*((volatile unsigned long *)0x400FD014)) +#define FLASH_USECRL_R (*((volatile unsigned long *)0x400FE140)) +#define FLASH_USERDBG_R (*((volatile unsigned long *)0x400FE1D0)) +#define FLASH_USERREG0_R (*((volatile unsigned long *)0x400FE1E0)) +#define FLASH_USERREG1_R (*((volatile unsigned long *)0x400FE1E4)) +#define FLASH_FMPRE0_R (*((volatile unsigned long *)0x400FE200)) +#define FLASH_FMPRE1_R (*((volatile unsigned long *)0x400FE204)) +#define FLASH_FMPRE2_R (*((volatile unsigned long *)0x400FE208)) +#define FLASH_FMPRE3_R (*((volatile unsigned long *)0x400FE20C)) +#define FLASH_FMPPE0_R (*((volatile unsigned long *)0x400FE400)) +#define FLASH_FMPPE1_R (*((volatile unsigned long *)0x400FE404)) +#define FLASH_FMPPE2_R (*((volatile unsigned long *)0x400FE408)) +#define FLASH_FMPPE3_R (*((volatile unsigned long *)0x400FE40C)) + +//***************************************************************************** +// +// System Control registers (SYSCTL) +// +//***************************************************************************** +#define SYSCTL_DID0_R (*((volatile unsigned long *)0x400FE000)) +#define SYSCTL_DID1_R (*((volatile unsigned long *)0x400FE004)) +#define SYSCTL_DC0_R (*((volatile unsigned long *)0x400FE008)) +#define SYSCTL_DC1_R (*((volatile unsigned long *)0x400FE010)) +#define SYSCTL_DC2_R (*((volatile unsigned long *)0x400FE014)) +#define SYSCTL_DC3_R (*((volatile unsigned long *)0x400FE018)) +#define SYSCTL_DC4_R (*((volatile unsigned long *)0x400FE01C)) +#define SYSCTL_PBORCTL_R (*((volatile unsigned long *)0x400FE030)) +#define SYSCTL_LDOPCTL_R (*((volatile unsigned long *)0x400FE034)) +#define SYSCTL_SRCR0_R (*((volatile unsigned long *)0x400FE040)) +#define SYSCTL_SRCR1_R (*((volatile unsigned long *)0x400FE044)) +#define SYSCTL_SRCR2_R (*((volatile unsigned long *)0x400FE048)) +#define SYSCTL_RIS_R (*((volatile unsigned long *)0x400FE050)) +#define SYSCTL_IMC_R (*((volatile unsigned long *)0x400FE054)) +#define SYSCTL_MISC_R (*((volatile unsigned long *)0x400FE058)) +#define SYSCTL_RESC_R (*((volatile unsigned long *)0x400FE05C)) +#define SYSCTL_RCC_R (*((volatile unsigned long *)0x400FE060)) +#define SYSCTL_PLLCFG_R (*((volatile unsigned long *)0x400FE064)) +#define SYSCTL_RCC2_R (*((volatile unsigned long *)0x400FE070)) +#define SYSCTL_RCGC0_R (*((volatile unsigned long *)0x400FE100)) +#define SYSCTL_RCGC1_R (*((volatile unsigned long *)0x400FE104)) +#define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x400FE108)) +#define SYSCTL_SCGC0_R (*((volatile unsigned long *)0x400FE110)) +#define SYSCTL_SCGC1_R (*((volatile unsigned long *)0x400FE114)) +#define SYSCTL_SCGC2_R (*((volatile unsigned long *)0x400FE118)) +#define SYSCTL_DCGC0_R (*((volatile unsigned long *)0x400FE120)) +#define SYSCTL_DCGC1_R (*((volatile unsigned long *)0x400FE124)) +#define SYSCTL_DCGC2_R (*((volatile unsigned long *)0x400FE128)) +#define SYSCTL_DSLPCLKCFG_R (*((volatile unsigned long *)0x400FE144)) + +//***************************************************************************** +// +// NVIC registers (NVIC) +// +//***************************************************************************** +#define NVIC_INT_TYPE_R (*((volatile unsigned long *)0xE000E004)) +#define NVIC_ST_CTRL_R (*((volatile unsigned long *)0xE000E010)) +#define NVIC_ST_RELOAD_R (*((volatile unsigned long *)0xE000E014)) +#define NVIC_ST_CURRENT_R (*((volatile unsigned long *)0xE000E018)) +#define NVIC_ST_CAL_R (*((volatile unsigned long *)0xE000E01C)) +#define NVIC_EN0_R (*((volatile unsigned long *)0xE000E100)) +#define NVIC_EN1_R (*((volatile unsigned long *)0xE000E104)) +#define NVIC_DIS0_R (*((volatile unsigned long *)0xE000E180)) +#define NVIC_DIS1_R (*((volatile unsigned long *)0xE000E184)) +#define NVIC_PEND0_R (*((volatile unsigned long *)0xE000E200)) +#define NVIC_PEND1_R (*((volatile unsigned long *)0xE000E204)) +#define NVIC_UNPEND0_R (*((volatile unsigned long *)0xE000E280)) +#define NVIC_UNPEND1_R (*((volatile unsigned long *)0xE000E284)) +#define NVIC_ACTIVE0_R (*((volatile unsigned long *)0xE000E300)) +#define NVIC_ACTIVE1_R (*((volatile unsigned long *)0xE000E304)) +#define NVIC_PRI0_R (*((volatile unsigned long *)0xE000E400)) +#define NVIC_PRI1_R (*((volatile unsigned long *)0xE000E404)) +#define NVIC_PRI2_R (*((volatile unsigned long *)0xE000E408)) +#define NVIC_PRI3_R (*((volatile unsigned long *)0xE000E40C)) +#define NVIC_PRI4_R (*((volatile unsigned long *)0xE000E410)) +#define NVIC_PRI5_R (*((volatile unsigned long *)0xE000E414)) +#define NVIC_PRI6_R (*((volatile unsigned long *)0xE000E418)) +#define NVIC_PRI7_R (*((volatile unsigned long *)0xE000E41C)) +#define NVIC_PRI8_R (*((volatile unsigned long *)0xE000E420)) +#define NVIC_PRI9_R (*((volatile unsigned long *)0xE000E424)) +#define NVIC_PRI10_R (*((volatile unsigned long *)0xE000E428)) +#define NVIC_CPUID_R (*((volatile unsigned long *)0xE000ED00)) +#define NVIC_INT_CTRL_R (*((volatile unsigned long *)0xE000ED04)) +#define NVIC_VTABLE_R (*((volatile unsigned long *)0xE000ED08)) +#define NVIC_APINT_R (*((volatile unsigned long *)0xE000ED0C)) +#define NVIC_SYS_CTRL_R (*((volatile unsigned long *)0xE000ED10)) +#define NVIC_CFG_CTRL_R (*((volatile unsigned long *)0xE000ED14)) +#define NVIC_SYS_PRI1_R (*((volatile unsigned long *)0xE000ED18)) +#define NVIC_SYS_PRI2_R (*((volatile unsigned long *)0xE000ED1C)) +#define NVIC_SYS_PRI3_R (*((volatile unsigned long *)0xE000ED20)) +#define NVIC_SYS_HND_CTRL_R (*((volatile unsigned long *)0xE000ED24)) +#define NVIC_FAULT_STAT_R (*((volatile unsigned long *)0xE000ED28)) +#define NVIC_HFAULT_STAT_R (*((volatile unsigned long *)0xE000ED2C)) +#define NVIC_DEBUG_STAT_R (*((volatile unsigned long *)0xE000ED30)) +#define NVIC_MM_ADDR_R (*((volatile unsigned long *)0xE000ED34)) +#define NVIC_FAULT_ADDR_R (*((volatile unsigned long *)0xE000ED38)) +#define NVIC_MPU_TYPE_R (*((volatile unsigned long *)0xE000ED90)) +#define NVIC_MPU_CTRL_R (*((volatile unsigned long *)0xE000ED94)) +#define NVIC_MPU_NUMBER_R (*((volatile unsigned long *)0xE000ED98)) +#define NVIC_MPU_BASE_R (*((volatile unsigned long *)0xE000ED9C)) +#define NVIC_MPU_ATTR_R (*((volatile unsigned long *)0xE000EDA0)) +#define NVIC_MPU_BASE1_R (*((volatile unsigned long *)0xE000EDA4)) +#define NVIC_MPU_ATTR1_R (*((volatile unsigned long *)0xE000EDA8)) +#define NVIC_MPU_BASE2_R (*((volatile unsigned long *)0xE000EDAC)) +#define NVIC_MPU_ATTR2_R (*((volatile unsigned long *)0xE000EDB0)) +#define NVIC_MPU_BASE3_R (*((volatile unsigned long *)0xE000EDB4)) +#define NVIC_MPU_ATTR3_R (*((volatile unsigned long *)0xE000EDB8)) +#define NVIC_DBG_CTRL_R (*((volatile unsigned long *)0xE000EDF0)) +#define NVIC_DBG_XFER_R (*((volatile unsigned long *)0xE000EDF4)) +#define NVIC_DBG_DATA_R (*((volatile unsigned long *)0xE000EDF8)) +#define NVIC_DBG_INT_R (*((volatile unsigned long *)0xE000EDFC)) +#define NVIC_SW_TRIG_R (*((volatile unsigned long *)0xE000EF00)) + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOAD register. +// +//***************************************************************************** +#define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value +#define WDT_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_VALUE register. +// +//***************************************************************************** +#define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value +#define WDT_VALUE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_CTL register. +// +//***************************************************************************** +#define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable +#define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_ICR register. +// +//***************************************************************************** +#define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear +#define WDT_ICR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_RIS register. +// +//***************************************************************************** +#define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_MIS register. +// +//***************************************************************************** +#define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_TEST register. +// +//***************************************************************************** +#define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOCK register. +// +//***************************************************************************** +#define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock +#define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked +#define WDT_LOCK_LOCKED 0x00000001 // Locked +#define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR0 register. +// +//***************************************************************************** +#define SSI_CR0_SCR_M 0x0000FF00 // SSI Serial Clock Rate +#define SSI_CR0_SPH 0x00000080 // SSI Serial Clock Phase +#define SSI_CR0_SPO 0x00000040 // SSI Serial Clock Polarity +#define SSI_CR0_FRF_M 0x00000030 // SSI Frame Format Select +#define SSI_CR0_FRF_MOTO 0x00000000 // Freescale SPI Frame Format +#define SSI_CR0_FRF_TI 0x00000010 // Texas Instruments Synchronous + // Serial Frame Format +#define SSI_CR0_FRF_NMW 0x00000020 // MICROWIRE Frame Format +#define SSI_CR0_DSS_M 0x0000000F // SSI Data Size Select +#define SSI_CR0_DSS_4 0x00000003 // 4-bit data +#define SSI_CR0_DSS_5 0x00000004 // 5-bit data +#define SSI_CR0_DSS_6 0x00000005 // 6-bit data +#define SSI_CR0_DSS_7 0x00000006 // 7-bit data +#define SSI_CR0_DSS_8 0x00000007 // 8-bit data +#define SSI_CR0_DSS_9 0x00000008 // 9-bit data +#define SSI_CR0_DSS_10 0x00000009 // 10-bit data +#define SSI_CR0_DSS_11 0x0000000A // 11-bit data +#define SSI_CR0_DSS_12 0x0000000B // 12-bit data +#define SSI_CR0_DSS_13 0x0000000C // 13-bit data +#define SSI_CR0_DSS_14 0x0000000D // 14-bit data +#define SSI_CR0_DSS_15 0x0000000E // 15-bit data +#define SSI_CR0_DSS_16 0x0000000F // 16-bit data +#define SSI_CR0_SCR_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR1 register. +// +//***************************************************************************** +#define SSI_CR1_SOD 0x00000008 // SSI Slave Mode Output Disable +#define SSI_CR1_MS 0x00000004 // SSI Master/Slave Select +#define SSI_CR1_SSE 0x00000002 // SSI Synchronous Serial Port + // Enable +#define SSI_CR1_LBM 0x00000001 // SSI Loopback Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DR register. +// +//***************************************************************************** +#define SSI_DR_DATA_M 0x0000FFFF // SSI Receive/Transmit Data +#define SSI_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_SR register. +// +//***************************************************************************** +#define SSI_SR_BSY 0x00000010 // SSI Busy Bit +#define SSI_SR_RFF 0x00000008 // SSI Receive FIFO Full +#define SSI_SR_RNE 0x00000004 // SSI Receive FIFO Not Empty +#define SSI_SR_TNF 0x00000002 // SSI Transmit FIFO Not Full +#define SSI_SR_TFE 0x00000001 // SSI Transmit FIFO Empty + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CPSR register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_M 0x000000FF // SSI Clock Prescale Divisor +#define SSI_CPSR_CPSDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_IM register. +// +//***************************************************************************** +#define SSI_IM_TXIM 0x00000008 // SSI Transmit FIFO Interrupt Mask +#define SSI_IM_RXIM 0x00000004 // SSI Receive FIFO Interrupt Mask +#define SSI_IM_RTIM 0x00000002 // SSI Receive Time-Out Interrupt + // Mask +#define SSI_IM_RORIM 0x00000001 // SSI Receive Overrun Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_RIS register. +// +//***************************************************************************** +#define SSI_RIS_TXRIS 0x00000008 // SSI Transmit FIFO Raw Interrupt + // Status +#define SSI_RIS_RXRIS 0x00000004 // SSI Receive FIFO Raw Interrupt + // Status +#define SSI_RIS_RTRIS 0x00000002 // SSI Receive Time-Out Raw + // Interrupt Status +#define SSI_RIS_RORRIS 0x00000001 // SSI Receive Overrun Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_MIS register. +// +//***************************************************************************** +#define SSI_MIS_TXMIS 0x00000008 // SSI Transmit FIFO Masked + // Interrupt Status +#define SSI_MIS_RXMIS 0x00000004 // SSI Receive FIFO Masked + // Interrupt Status +#define SSI_MIS_RTMIS 0x00000002 // SSI Receive Time-Out Masked + // Interrupt Status +#define SSI_MIS_RORMIS 0x00000001 // SSI Receive Overrun Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_ICR register. +// +//***************************************************************************** +#define SSI_ICR_RTIC 0x00000002 // SSI Receive Time-Out Interrupt + // Clear +#define SSI_ICR_RORIC 0x00000001 // SSI Receive Overrun Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MSA register. +// +//***************************************************************************** +#define I2C_MSA_SA_M 0x000000FE // I2C Slave Address +#define I2C_MSA_RS 0x00000001 // Receive not send +#define I2C_MSA_SA_S 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SOAR register. +// +//***************************************************************************** +#define I2C_SOAR_OAR_M 0x0000007F // I2C Slave Own Address +#define I2C_SOAR_OAR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SCSR register. +// +//***************************************************************************** +#define I2C_SCSR_FBR 0x00000004 // First Byte Received +#define I2C_SCSR_TREQ 0x00000002 // Transmit Request +#define I2C_SCSR_DA 0x00000001 // Device Active +#define I2C_SCSR_RREQ 0x00000001 // Receive Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCS register. +// +//***************************************************************************** +#define I2C_MCS_BUSBSY 0x00000040 // Bus Busy +#define I2C_MCS_IDLE 0x00000020 // I2C Idle +#define I2C_MCS_ARBLST 0x00000010 // Arbitration Lost +#define I2C_MCS_ACK 0x00000008 // Data Acknowledge Enable +#define I2C_MCS_DATACK 0x00000008 // Acknowledge Data +#define I2C_MCS_ADRACK 0x00000004 // Acknowledge Address +#define I2C_MCS_STOP 0x00000004 // Generate STOP +#define I2C_MCS_START 0x00000002 // Generate START +#define I2C_MCS_ERROR 0x00000002 // Error +#define I2C_MCS_RUN 0x00000001 // I2C Master Enable +#define I2C_MCS_BUSY 0x00000001 // I2C Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SDR register. +// +//***************************************************************************** +#define I2C_SDR_DATA_M 0x000000FF // Data for Transfer +#define I2C_SDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MDR register. +// +//***************************************************************************** +#define I2C_MDR_DATA_M 0x000000FF // Data Transferred +#define I2C_MDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MTPR register. +// +//***************************************************************************** +#define I2C_MTPR_TPR_M 0x0000007F // SCL Clock Period +#define I2C_MTPR_TPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_DATAIM 0x00000001 // Data Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_DATARIS 0x00000001 // Data Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MIMR register. +// +//***************************************************************************** +#define I2C_MIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MRIS register. +// +//***************************************************************************** +#define I2C_MRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_DATAMIS 0x00000001 // Data Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_DATAIC 0x00000001 // Data Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MMIS register. +// +//***************************************************************************** +#define I2C_MMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MICR register. +// +//***************************************************************************** +#define I2C_MICR_IC 0x00000001 // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCR register. +// +//***************************************************************************** +#define I2C_MCR_SFE 0x00000020 // I2C Slave Function Enable +#define I2C_MCR_MFE 0x00000010 // I2C Master Function Enable +#define I2C_MCR_LPBK 0x00000001 // I2C Loopback + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_CTL register. +// +//***************************************************************************** +#define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2 +#define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1 +#define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_SYNC register. +// +//***************************************************************************** +#define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter +#define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter +#define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENABLE register. +// +//***************************************************************************** +#define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable +#define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable +#define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable +#define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable +#define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable +#define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INVERT register. +// +//***************************************************************************** +#define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal +#define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal +#define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal +#define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal +#define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal +#define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULT register. +// +//***************************************************************************** +#define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault +#define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault +#define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault +#define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault +#define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault +#define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INTEN register. +// +//***************************************************************************** +#define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable +#define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable +#define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable +#define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_RIS register. +// +//***************************************************************************** +#define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted +#define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted +#define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ISC register. +// +//***************************************************************************** +#define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status +#define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status +#define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_STATUS register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CTL register. +// +//***************************************************************************** +#define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode +#define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode +#define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode +#define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode +#define PWM_X_CTL_MODE 0x00000002 // Counter Mode +#define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_INTEN register. +// +//***************************************************************************** +#define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up +#define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up +#define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD +#define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0 +#define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB + // Up +#define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA + // Up +#define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD +#define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_RIS register. +// +//***************************************************************************** +#define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt + // Status +#define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status +#define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt + // Status +#define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status +#define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status +#define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_ISC register. +// +//***************************************************************************** +#define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt +#define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt +#define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt +#define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt +#define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt +#define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_LOAD register. +// +//***************************************************************************** +#define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value +#define PWM_X_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_COUNT register. +// +//***************************************************************************** +#define PWM_X_COUNT_M 0x0000FFFF // Counter Value +#define PWM_X_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPA register. +// +//***************************************************************************** +#define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value +#define PWM_X_CMPA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPB register. +// +//***************************************************************************** +#define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value +#define PWM_X_CMPB_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENA register. +// +//***************************************************************************** +#define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENA_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA +#define PWM_X_GENA_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High +#define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENA_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA +#define PWM_X_GENA_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENA_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA +#define PWM_X_GENA_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENA_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA +#define PWM_X_GENA_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High +#define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA +#define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low +#define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High +#define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA +#define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low +#define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENB register. +// +//***************************************************************************** +#define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENB_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB +#define PWM_X_GENB_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High +#define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENB_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB +#define PWM_X_GENB_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENB_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB +#define PWM_X_GENB_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENB_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB +#define PWM_X_GENB_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High +#define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB +#define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low +#define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High +#define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB +#define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low +#define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBCTL register. +// +//***************************************************************************** +#define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBRISE register. +// +//***************************************************************************** +#define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay +#define PWM_X_DBRISE_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBFALL register. +// +//***************************************************************************** +#define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay +#define PWM_X_DBFALL_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_CTL register. +// +//***************************************************************************** +#define QEI_CTL_STALLEN 0x00001000 // Stall QEI +#define QEI_CTL_INVI 0x00000800 // Invert Index Pulse +#define QEI_CTL_INVB 0x00000400 // Invert PhB +#define QEI_CTL_INVA 0x00000200 // Invert PhA +#define QEI_CTL_VELDIV_M 0x000001C0 // Predivide Velocity +#define QEI_CTL_VELDIV_1 0x00000000 // QEI clock /1 +#define QEI_CTL_VELDIV_2 0x00000040 // QEI clock /2 +#define QEI_CTL_VELDIV_4 0x00000080 // QEI clock /4 +#define QEI_CTL_VELDIV_8 0x000000C0 // QEI clock /8 +#define QEI_CTL_VELDIV_16 0x00000100 // QEI clock /16 +#define QEI_CTL_VELDIV_32 0x00000140 // QEI clock /32 +#define QEI_CTL_VELDIV_64 0x00000180 // QEI clock /64 +#define QEI_CTL_VELDIV_128 0x000001C0 // QEI clock /128 +#define QEI_CTL_VELEN 0x00000020 // Capture Velocity +#define QEI_CTL_RESMODE 0x00000010 // Reset Mode +#define QEI_CTL_CAPMODE 0x00000008 // Capture Mode +#define QEI_CTL_SIGMODE 0x00000004 // Signal Mode +#define QEI_CTL_SWAP 0x00000002 // Swap Signals +#define QEI_CTL_ENABLE 0x00000001 // Enable QEI + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_STAT register. +// +//***************************************************************************** +#define QEI_STAT_DIRECTION 0x00000002 // Direction of Rotation +#define QEI_STAT_ERROR 0x00000001 // Error Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_POS register. +// +//***************************************************************************** +#define QEI_POS_M 0xFFFFFFFF // Current Position Integrator + // Value +#define QEI_POS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_MAXPOS register. +// +//***************************************************************************** +#define QEI_MAXPOS_M 0xFFFFFFFF // Maximum Position Integrator + // Value +#define QEI_MAXPOS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_LOAD register. +// +//***************************************************************************** +#define QEI_LOAD_M 0xFFFFFFFF // Velocity Timer Load Value +#define QEI_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_TIME register. +// +//***************************************************************************** +#define QEI_TIME_M 0xFFFFFFFF // Velocity Timer Current Value +#define QEI_TIME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_COUNT register. +// +//***************************************************************************** +#define QEI_COUNT_M 0xFFFFFFFF // Velocity Pulse Count +#define QEI_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_SPEED register. +// +//***************************************************************************** +#define QEI_SPEED_M 0xFFFFFFFF // Velocity +#define QEI_SPEED_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_INTEN register. +// +//***************************************************************************** +#define QEI_INTEN_ERROR 0x00000008 // Phase Error Interrupt Enable +#define QEI_INTEN_DIR 0x00000004 // Direction Change Interrupt + // Enable +#define QEI_INTEN_TIMER 0x00000002 // Timer Expires Interrupt Enable +#define QEI_INTEN_INDEX 0x00000001 // Index Pulse Detected Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_RIS register. +// +//***************************************************************************** +#define QEI_RIS_ERROR 0x00000008 // Phase Error Detected +#define QEI_RIS_DIR 0x00000004 // Direction Change Detected +#define QEI_RIS_TIMER 0x00000002 // Velocity Timer Expired +#define QEI_RIS_INDEX 0x00000001 // Index Pulse Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_ISC register. +// +//***************************************************************************** +#define QEI_ISC_ERROR 0x00000008 // Phase Error Interrupt +#define QEI_ISC_DIR 0x00000004 // Direction Change Interrupt +#define QEI_ISC_TIMER 0x00000002 // Velocity Timer Expired Interrupt +#define QEI_ISC_INDEX 0x00000001 // Index Pulse Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CFG register. +// +//***************************************************************************** +#define TIMER_CFG_M 0x00000007 // GPTM Configuration +#define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration +#define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC) + // counter configuration +#define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The + // function is controlled by bits + // 1:0 of GPTMTAMR and GPTMTBMR + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMR register. +// +//***************************************************************************** +#define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode + // Select +#define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode +#define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode +#define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMR register. +// +//***************************************************************************** +#define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode + // Select +#define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode +#define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode +#define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CTL register. +// +//***************************************************************************** +#define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level +#define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger + // Enable +#define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode +#define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge +#define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges +#define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable +#define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable +#define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level +#define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger + // Enable +#define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable +#define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode +#define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge +#define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges +#define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable +#define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_IMR register. +// +//***************************************************************************** +#define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt + // Mask +#define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt + // Mask +#define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt + // Mask +#define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask +#define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt + // Mask +#define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt + // Mask +#define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_RIS register. +// +//***************************************************************************** +#define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw + // Interrupt +#define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw + // Interrupt +#define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw + // Interrupt +#define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt +#define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw + // Interrupt +#define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw + // Interrupt +#define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_MIS register. +// +//***************************************************************************** +#define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked + // Interrupt +#define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked + // Interrupt +#define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked + // Interrupt +#define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt +#define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked + // Interrupt +#define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked + // Interrupt +#define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_ICR register. +// +//***************************************************************************** +#define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt + // Clear +#define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt + // Clear +#define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt + // Clear +#define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear +#define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt + // Clear +#define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt + // Clear +#define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAILR register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load + // Register High +#define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load + // Register Low +#define TIMER_TAILR_TAILRH_S 16 +#define TIMER_TAILR_TAILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBILR register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load + // Register +#define TIMER_TBILR_TBILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High +#define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low +#define TIMER_TAMATCHR_TAMRH_S 16 +#define TIMER_TAMATCHR_TAMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low +#define TIMER_TBMATCHR_TBMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPR register. +// +//***************************************************************************** +#define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale +#define TIMER_TAPR_TAPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPR register. +// +//***************************************************************************** +#define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale +#define TIMER_TBPR_TBPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPMR register. +// +//***************************************************************************** +#define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match +#define TIMER_TAPMR_TAPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPMR register. +// +//***************************************************************************** +#define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match +#define TIMER_TBPMR_TBPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAR register. +// +//***************************************************************************** +#define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High +#define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAR_TARH_S 16 +#define TIMER_TAR_TARL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBR register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL_M 0x0000FFFF // GPTM Timer B +#define TIMER_TBR_TBRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ACTSS register. +// +//***************************************************************************** +#define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable +#define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable +#define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable +#define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_RIS register. +// +//***************************************************************************** +#define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status +#define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status +#define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status +#define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_IM register. +// +//***************************************************************************** +#define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask +#define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask +#define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask +#define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ISC register. +// +//***************************************************************************** +#define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear +#define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear +#define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear +#define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_OSTAT register. +// +//***************************************************************************** +#define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow +#define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow +#define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow +#define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_EMUX register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select +#define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0 +#define ADC_EMUX_EM3_COMP1 0x00002000 // Analog Comparator 1 +#define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO PB4) +#define ADC_EMUX_EM3_TIMER 0x00005000 // Timer +#define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0 +#define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1 +#define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2 +#define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample) +#define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select +#define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0 +#define ADC_EMUX_EM2_COMP1 0x00000200 // Analog Comparator 1 +#define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO PB4) +#define ADC_EMUX_EM2_TIMER 0x00000500 // Timer +#define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0 +#define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1 +#define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2 +#define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample) +#define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select +#define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0 +#define ADC_EMUX_EM1_COMP1 0x00000020 // Analog Comparator 1 +#define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO PB4) +#define ADC_EMUX_EM1_TIMER 0x00000050 // Timer +#define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0 +#define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1 +#define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2 +#define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample) +#define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select +#define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0 +#define ADC_EMUX_EM0_COMP1 0x00000002 // Analog Comparator 1 +#define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO PB4) +#define ADC_EMUX_EM0_TIMER 0x00000005 // Timer +#define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0 +#define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1 +#define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2 +#define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample) + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_USTAT register. +// +//***************************************************************************** +#define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow +#define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow +#define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow +#define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSPRI register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority +#define ADC_SSPRI_SS3_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority +#define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority +#define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority +#define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority +#define ADC_SSPRI_SS2_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority +#define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority +#define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority +#define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority +#define ADC_SSPRI_SS1_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority +#define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority +#define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority +#define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority +#define ADC_SSPRI_SS0_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority +#define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority +#define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_PSSI register. +// +//***************************************************************************** +#define ADC_PSSI_SS3 0x00000008 // SS3 Initiate +#define ADC_PSSI_SS2 0x00000004 // SS2 Initiate +#define ADC_PSSI_SS1 0x00000002 // SS1 Initiate +#define ADC_PSSI_SS0 0x00000001 // SS0 Initiate + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SAC register. +// +//***************************************************************************** +#define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control +#define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling +#define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling +#define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling +#define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling +#define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling +#define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling +#define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX0 register. +// +//***************************************************************************** +#define ADC_SSMUX0_MUX7_M 0x30000000 // 8th Sample Input Select +#define ADC_SSMUX0_MUX6_M 0x03000000 // 7th Sample Input Select +#define ADC_SSMUX0_MUX5_M 0x00300000 // 6th Sample Input Select +#define ADC_SSMUX0_MUX4_M 0x00030000 // 5th Sample Input Select +#define ADC_SSMUX0_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX0_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX0_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX0_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX0_MUX7_S 28 +#define ADC_SSMUX0_MUX6_S 24 +#define ADC_SSMUX0_MUX5_S 20 +#define ADC_SSMUX0_MUX4_S 16 +#define ADC_SSMUX0_MUX3_S 12 +#define ADC_SSMUX0_MUX2_S 8 +#define ADC_SSMUX0_MUX1_S 4 +#define ADC_SSMUX0_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL0 register. +// +//***************************************************************************** +#define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select +#define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable +#define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence +#define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select +#define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select +#define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable +#define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence +#define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select +#define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select +#define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable +#define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence +#define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select +#define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select +#define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable +#define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence +#define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select +#define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO0 register. +// +//***************************************************************************** +#define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT0 register. +// +//***************************************************************************** +#define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT0_HPTR_S 4 +#define ADC_SSFSTAT0_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX1 register. +// +//***************************************************************************** +#define ADC_SSMUX1_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX1_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX1_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX1_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX1_MUX3_S 12 +#define ADC_SSMUX1_MUX2_S 8 +#define ADC_SSMUX1_MUX1_S 4 +#define ADC_SSMUX1_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL1 register. +// +//***************************************************************************** +#define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO1 register. +// +//***************************************************************************** +#define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT1 register. +// +//***************************************************************************** +#define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT1_HPTR_S 4 +#define ADC_SSFSTAT1_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX2 register. +// +//***************************************************************************** +#define ADC_SSMUX2_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX2_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX2_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX2_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX2_MUX3_S 12 +#define ADC_SSMUX2_MUX2_S 8 +#define ADC_SSMUX2_MUX1_S 4 +#define ADC_SSMUX2_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL2 register. +// +//***************************************************************************** +#define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO2 register. +// +//***************************************************************************** +#define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT2 register. +// +//***************************************************************************** +#define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT2_HPTR_S 4 +#define ADC_SSFSTAT2_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX3 register. +// +//***************************************************************************** +#define ADC_SSMUX3_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX3_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL3 register. +// +//***************************************************************************** +#define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO3 register. +// +//***************************************************************************** +#define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT3 register. +// +//***************************************************************************** +#define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT3_HPTR_S 4 +#define ADC_SSFSTAT3_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_TMLB register. +// +//***************************************************************************** +#define ADC_TMLB_LB 0x00000001 // Loopback Mode Enable + +//***************************************************************************** +// +// The following are defines for the the interpretation of the data in the +// SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift +#define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACMIS register. +// +//***************************************************************************** +#define COMP_ACMIS_IN1 0x00000002 // Comparator 1 Masked Interrupt + // Status +#define COMP_ACMIS_IN0 0x00000001 // Comparator 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACRIS register. +// +//***************************************************************************** +#define COMP_ACRIS_IN1 0x00000002 // Comparator 1 Interrupt Status +#define COMP_ACRIS_IN0 0x00000001 // Comparator 0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACINTEN register. +// +//***************************************************************************** +#define COMP_ACINTEN_IN1 0x00000002 // Comparator 1 Interrupt Enable +#define COMP_ACINTEN_IN0 0x00000001 // Comparator 0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACREFCTL +// register. +// +//***************************************************************************** +#define COMP_ACREFCTL_EN 0x00000200 // Resistor Ladder Enable +#define COMP_ACREFCTL_RNG 0x00000100 // Resistor Ladder Range +#define COMP_ACREFCTL_VREF_M 0x0000000F // Resistor Ladder Voltage Ref +#define COMP_ACREFCTL_VREF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT0 register. +// +//***************************************************************************** +#define COMP_ACSTAT0_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL0 register. +// +//***************************************************************************** +#define COMP_ACCTL0_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL0_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL0_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL0_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL0_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL0_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL0_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL0_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL0_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL0_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL0_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL0_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL0_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL0_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL0_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL0_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL0_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL0_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT1 register. +// +//***************************************************************************** +#define COMP_ACSTAT1_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL1 register. +// +//***************************************************************************** +#define COMP_ACCTL1_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL1_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL1_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL1_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL1_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL1_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL1_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL1_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL1_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL1_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL1_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL1_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL1_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL1_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL1_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL1_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL1_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL1_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RIS register. +// +//***************************************************************************** +#define MAC_RIS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_RIS_MDINT 0x00000020 // MII Transaction Complete +#define MAC_RIS_RXER 0x00000010 // Receive Error +#define MAC_RIS_FOV 0x00000008 // FIFO Overrun +#define MAC_RIS_TXEMP 0x00000004 // Transmit FIFO Empty +#define MAC_RIS_TXER 0x00000002 // Transmit Error +#define MAC_RIS_RXINT 0x00000001 // Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IACK register. +// +//***************************************************************************** +#define MAC_IACK_PHYINT 0x00000040 // Clear PHY Interrupt +#define MAC_IACK_MDINT 0x00000020 // Clear MII Transaction Complete +#define MAC_IACK_RXER 0x00000010 // Clear Receive Error +#define MAC_IACK_FOV 0x00000008 // Clear FIFO Overrun +#define MAC_IACK_TXEMP 0x00000004 // Clear Transmit FIFO Empty +#define MAC_IACK_TXER 0x00000002 // Clear Transmit Error +#define MAC_IACK_RXINT 0x00000001 // Clear Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IM register. +// +//***************************************************************************** +#define MAC_IM_PHYINTM 0x00000040 // Mask PHY Interrupt +#define MAC_IM_MDINTM 0x00000020 // Mask MII Transaction Complete +#define MAC_IM_RXERM 0x00000010 // Mask Receive Error +#define MAC_IM_FOVM 0x00000008 // Mask FIFO Overrun +#define MAC_IM_TXEMPM 0x00000004 // Mask Transmit FIFO Empty +#define MAC_IM_TXERM 0x00000002 // Mask Transmit Error +#define MAC_IM_RXINTM 0x00000001 // Mask Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RCTL register. +// +//***************************************************************************** +#define MAC_RCTL_RSTFIFO 0x00000010 // Clear Receive FIFO +#define MAC_RCTL_BADCRC 0x00000008 // Enable Reject Bad CRC +#define MAC_RCTL_PRMS 0x00000004 // Enable Promiscuous Mode +#define MAC_RCTL_AMUL 0x00000002 // Enable Multicast Frames +#define MAC_RCTL_RXEN 0x00000001 // Enable Receiver + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TCTL register. +// +//***************************************************************************** +#define MAC_TCTL_DUPLEX 0x00000010 // Enable Duplex Mode +#define MAC_TCTL_CRC 0x00000004 // Enable CRC Generation +#define MAC_TCTL_PADEN 0x00000002 // Enable Packet Padding +#define MAC_TCTL_TXEN 0x00000001 // Enable Transmitter + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_DATA register. +// +//***************************************************************************** +#define MAC_DATA_TXDATA_M 0xFFFFFFFF // Transmit FIFO Data +#define MAC_DATA_RXDATA_M 0xFFFFFFFF // Receive FIFO Data +#define MAC_DATA_RXDATA_S 0 +#define MAC_DATA_TXDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA0 register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4_M 0xFF000000 // MAC Address Octet 4 +#define MAC_IA0_MACOCT3_M 0x00FF0000 // MAC Address Octet 3 +#define MAC_IA0_MACOCT2_M 0x0000FF00 // MAC Address Octet 2 +#define MAC_IA0_MACOCT1_M 0x000000FF // MAC Address Octet 1 +#define MAC_IA0_MACOCT4_S 24 +#define MAC_IA0_MACOCT3_S 16 +#define MAC_IA0_MACOCT2_S 8 +#define MAC_IA0_MACOCT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA1 register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6_M 0x0000FF00 // MAC Address Octet 6 +#define MAC_IA1_MACOCT5_M 0x000000FF // MAC Address Octet 5 +#define MAC_IA1_MACOCT6_S 8 +#define MAC_IA1_MACOCT5_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_THR register. +// +//***************************************************************************** +#define MAC_THR_THRESH_M 0x0000003F // Threshold Value +#define MAC_THR_THRESH_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MCTL register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR_M 0x000000F8 // MII Register Address +#define MAC_MCTL_WRITE 0x00000002 // MII Register Transaction Type +#define MAC_MCTL_START 0x00000001 // MII Register Transaction Enable +#define MAC_MCTL_REGADR_S 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDV register. +// +//***************************************************************************** +#define MAC_MDV_DIV_M 0x000000FF // Clock Divider +#define MAC_MDV_DIV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MTXD register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX_M 0x0000FFFF // MII Register Transmit Data +#define MAC_MTXD_MDTX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MRXD register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX_M 0x0000FFFF // MII Register Receive Data +#define MAC_MRXD_MDRX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_NP register. +// +//***************************************************************************** +#define MAC_NP_NPR_M 0x0000003F // Number of Packets in Receive + // FIFO +#define MAC_NP_NPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TR register. +// +//***************************************************************************** +#define MAC_TR_NEWTX 0x00000001 // New Transmission + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR0 register. +// +//***************************************************************************** +#define PHY_MR0_RESET 0x00008000 // Reset Registers +#define PHY_MR0_LOOPBK 0x00004000 // Loopback Mode +#define PHY_MR0_SPEEDSL 0x00002000 // Speed Select +#define PHY_MR0_ANEGEN 0x00001000 // Auto-Negotiation Enable +#define PHY_MR0_PWRDN 0x00000800 // Power Down +#define PHY_MR0_ISO 0x00000400 // Isolate +#define PHY_MR0_RANEG 0x00000200 // Restart Auto-Negotiation +#define PHY_MR0_DUPLEX 0x00000100 // Set Duplex Mode +#define PHY_MR0_COLT 0x00000080 // Collision Test + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR1 register. +// +//***************************************************************************** +#define PHY_MR1_100X_F 0x00004000 // 100BASE-TX Full-Duplex Mode +#define PHY_MR1_100X_H 0x00002000 // 100BASE-TX Half-Duplex Mode +#define PHY_MR1_10T_F 0x00001000 // 10BASE-T Full-Duplex Mode +#define PHY_MR1_10T_H 0x00000800 // 10BASE-T Half-Duplex Mode +#define PHY_MR1_MFPS 0x00000040 // Management Frames with Preamble + // Suppressed +#define PHY_MR1_ANEGC 0x00000020 // Auto-Negotiation Complete +#define PHY_MR1_RFAULT 0x00000010 // Remote Fault +#define PHY_MR1_ANEGA 0x00000008 // Auto-Negotiation +#define PHY_MR1_LINK 0x00000004 // Link Made +#define PHY_MR1_JAB 0x00000002 // Jabber Condition +#define PHY_MR1_EXTD 0x00000001 // Extended Capabilities + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR2 register. +// +//***************************************************************************** +#define PHY_MR2_OUI_M 0x0000FFFF // Organizationally Unique + // Identifier[21:6] +#define PHY_MR2_OUI_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR3 register. +// +//***************************************************************************** +#define PHY_MR3_OUI_M 0x0000FC00 // Organizationally Unique + // Identifier[5:0] +#define PHY_MR3_MN_M 0x000003F0 // Model Number +#define PHY_MR3_RN_M 0x0000000F // Revision Number +#define PHY_MR3_OUI_S 10 +#define PHY_MR3_MN_S 4 +#define PHY_MR3_RN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR4 register. +// +//***************************************************************************** +#define PHY_MR4_NP 0x00008000 // Next Page +#define PHY_MR4_RF 0x00002000 // Remote Fault +#define PHY_MR4_A3 0x00000100 // Technology Ability Field [3] +#define PHY_MR4_A2 0x00000080 // Technology Ability Field [2] +#define PHY_MR4_A1 0x00000040 // Technology Ability Field [1] +#define PHY_MR4_A0 0x00000020 // Technology Ability Field [0] +#define PHY_MR4_S_M 0x0000001F // Selector Field +#define PHY_MR4_S_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR5 register. +// +//***************************************************************************** +#define PHY_MR5_NP 0x00008000 // Next Page +#define PHY_MR5_ACK 0x00004000 // Acknowledge +#define PHY_MR5_RF 0x00002000 // Remote Fault +#define PHY_MR5_A_M 0x00001FE0 // Technology Ability Field +#define PHY_MR5_S_M 0x0000001F // Selector Field +#define PHY_MR5_S_8023 0x00000001 // IEEE Std 802.3 +#define PHY_MR5_S_8029 0x00000002 // IEEE Std 802.9 ISLAN-16T +#define PHY_MR5_S_8025 0x00000003 // IEEE Std 802.5 +#define PHY_MR5_S_1394 0x00000004 // IEEE Std 1394 +#define PHY_MR5_A_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR6 register. +// +//***************************************************************************** +#define PHY_MR6_PDF 0x00000010 // Parallel Detection Fault +#define PHY_MR6_LPNPA 0x00000008 // Link Partner is Next Page Able +#define PHY_MR6_PRX 0x00000002 // New Page Received +#define PHY_MR6_LPANEGA 0x00000001 // Link Partner is Auto-Negotiation + // Able + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR16 register. +// +//***************************************************************************** +#define PHY_MR16_RPTR 0x00008000 // Repeater Mode +#define PHY_MR16_INPOL 0x00004000 // Interrupt Polarity +#define PHY_MR16_TXHIM 0x00001000 // Transmit High Impedance Mode +#define PHY_MR16_SQEI 0x00000800 // SQE Inhibit Testing +#define PHY_MR16_NL10 0x00000400 // Natural Loopback Mode +#define PHY_MR16_APOL 0x00000020 // Auto-Polarity Disable +#define PHY_MR16_RVSPOL 0x00000010 // Receive Data Polarity +#define PHY_MR16_PCSBP 0x00000002 // PCS Bypass +#define PHY_MR16_RXCC 0x00000001 // Receive Clock Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR17 register. +// +//***************************************************************************** +#define PHY_MR17_JABBER_IE 0x00008000 // Jabber Interrupt Enable +#define PHY_MR17_RXER_IE 0x00004000 // Receive Error Interrupt Enable +#define PHY_MR17_PRX_IE 0x00002000 // Page Received Interrupt Enable +#define PHY_MR17_PDF_IE 0x00001000 // Parallel Detection Fault + // Interrupt Enable +#define PHY_MR17_LPACK_IE 0x00000800 // LP Acknowledge Interrupt Enable +#define PHY_MR17_LSCHG_IE 0x00000400 // Link Status Change Interrupt + // Enable +#define PHY_MR17_RFAULT_IE 0x00000200 // Remote Fault Interrupt Enable +#define PHY_MR17_ANEGCOMP_IE 0x00000100 // Auto-Negotiation Complete + // Interrupt Enable +#define PHY_MR17_JABBER_INT 0x00000080 // Jabber Event Interrupt +#define PHY_MR17_RXER_INT 0x00000040 // Receive Error Interrupt +#define PHY_MR17_PRX_INT 0x00000020 // Page Receive Interrupt +#define PHY_MR17_PDF_INT 0x00000010 // Parallel Detection Fault + // Interrupt +#define PHY_MR17_LPACK_INT 0x00000008 // LP Acknowledge Interrupt +#define PHY_MR17_LSCHG_INT 0x00000004 // Link Status Change Interrupt +#define PHY_MR17_RFAULT_INT 0x00000002 // Remote Fault Interrupt +#define PHY_MR17_ANEGCOMP_INT 0x00000001 // Auto-Negotiation Complete + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR18 register. +// +//***************************************************************************** +#define PHY_MR18_ANEGF 0x00001000 // Auto-Negotiation Failure +#define PHY_MR18_DPLX 0x00000800 // Duplex Mode +#define PHY_MR18_RATE 0x00000400 // Rate +#define PHY_MR18_RXSD 0x00000200 // Receive Detection +#define PHY_MR18_RX_LOCK 0x00000100 // Receive PLL Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR19 register. +// +//***************************************************************************** +#define PHY_MR19_TXO_M 0x0000C000 // Transmit Amplitude Selection +#define PHY_MR19_TXO_00DB 0x00000000 // Gain set for 0.0dB of insertion + // loss +#define PHY_MR19_TXO_04DB 0x00004000 // Gain set for 0.4dB of insertion + // loss +#define PHY_MR19_TXO_08DB 0x00008000 // Gain set for 0.8dB of insertion + // loss +#define PHY_MR19_TXO_12DB 0x0000C000 // Gain set for 1.2dB of insertion + // loss + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR23 register. +// +//***************************************************************************** +#define PHY_MR23_LED1_M 0x000000F0 // LED1 Source +#define PHY_MR23_LED1_LINK 0x00000000 // Link OK +#define PHY_MR23_LED1_RXTX 0x00000010 // RX or TX Activity (Default LED1) +#define PHY_MR23_LED1_100 0x00000050 // 100BASE-TX mode +#define PHY_MR23_LED1_10 0x00000060 // 10BASE-T mode +#define PHY_MR23_LED1_DUPLEX 0x00000070 // Full-Duplex +#define PHY_MR23_LED1_LINKACT 0x00000080 // Link OK & Blink=RX or TX + // Activity +#define PHY_MR23_LED0_M 0x0000000F // LED0 Source +#define PHY_MR23_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define PHY_MR23_LED0_RXTX 0x00000001 // RX or TX Activity +#define PHY_MR23_LED0_100 0x00000005 // 100BASE-TX mode +#define PHY_MR23_LED0_10 0x00000006 // 10BASE-T mode +#define PHY_MR23_LED0_DUPLEX 0x00000007 // Full-Duplex +#define PHY_MR23_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR24 register. +// +//***************************************************************************** +#define PHY_MR24_PD_MODE 0x00000080 // Parallel Detection Mode +#define PHY_MR24_AUTO_SW 0x00000040 // Auto-Switching Enable +#define PHY_MR24_MDIX 0x00000020 // Auto-Switching Configuration +#define PHY_MR24_MDIX_CM 0x00000010 // Auto-Switching Complete +#define PHY_MR24_MDIX_SD_M 0x0000000F // Auto-Switching Seed +#define PHY_MR24_MDIX_SD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCC register. +// +//***************************************************************************** +#define HIB_RTCC_M 0xFFFFFFFF // RTC Counter +#define HIB_RTCC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM0 register. +// +//***************************************************************************** +#define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0 +#define HIB_RTCM0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM1 register. +// +//***************************************************************************** +#define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1 +#define HIB_RTCM1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCLD register. +// +//***************************************************************************** +#define HIB_RTCLD_M 0xFFFFFFFF // RTC Load +#define HIB_RTCLD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_CTL register. +// +//***************************************************************************** +#define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable +#define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable +#define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable +#define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable +#define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable +#define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select +#define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request +#define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IM register. +// +//***************************************************************************** +#define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask +#define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt + // Mask +#define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask +#define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RIS register. +// +//***************************************************************************** +#define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt + // Status +#define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw + // Interrupt Status +#define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status +#define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_MIS register. +// +//***************************************************************************** +#define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Status +#define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Status +#define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt + // Status +#define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IC register. +// +//***************************************************************************** +#define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Clear +#define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Clear +#define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt + // Clear +#define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCT register. +// +//***************************************************************************** +#define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value +#define HIB_RTCT_TRIM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_DATA register. +// +//***************************************************************************** +#define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data +#define HIB_DATA_RTD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_ADCSPD_M 0x00000300 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000003C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x00000FFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00000FFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00000FFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00000FFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00000FFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0003F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000003F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFF00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// Deprecated defines for the Watchdog +// +//***************************************************************************** +#define WATCHDOG_LOAD_R (*((volatile unsigned long *)0x40000000)) +#define WATCHDOG_VALUE_R (*((volatile unsigned long *)0x40000004)) +#define WATCHDOG_CTL_R (*((volatile unsigned long *)0x40000008)) +#define WATCHDOG_ICR_R (*((volatile unsigned long *)0x4000000C)) +#define WATCHDOG_RIS_R (*((volatile unsigned long *)0x40000010)) +#define WATCHDOG_MIS_R (*((volatile unsigned long *)0x40000014)) +#define WATCHDOG_TEST_R (*((volatile unsigned long *)0x40000418)) +#define WATCHDOG_LOCK_R (*((volatile unsigned long *)0x40000C00)) + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_IC 0x00000001 // Clear Interrupt + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the the interpretation of the data +// in the SSFIFOx when the ADC TMLB is enabled. register. +// +//***************************************************************************** +#define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_TMLB_CNT_S 6 // Sample counter shift +#define ADC_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// Deprecated defines for the ADC register offsets. +// +//***************************************************************************** +#define ADC_ACTSS_R (*((volatile unsigned long *)0x40038000)) +#define ADC_RIS_R (*((volatile unsigned long *)0x40038004)) +#define ADC_IM_R (*((volatile unsigned long *)0x40038008)) +#define ADC_ISC_R (*((volatile unsigned long *)0x4003800C)) +#define ADC_OSTAT_R (*((volatile unsigned long *)0x40038010)) +#define ADC_EMUX_R (*((volatile unsigned long *)0x40038014)) +#define ADC_USTAT_R (*((volatile unsigned long *)0x40038018)) +#define ADC_SSPRI_R (*((volatile unsigned long *)0x40038020)) +#define ADC_PSSI_R (*((volatile unsigned long *)0x40038028)) +#define ADC_SAC_R (*((volatile unsigned long *)0x40038030)) +#define ADC_SSMUX0_R (*((volatile unsigned long *)0x40038040)) +#define ADC_SSCTL0_R (*((volatile unsigned long *)0x40038044)) +#define ADC_SSFIFO0_R (*((volatile unsigned long *)0x40038048)) +#define ADC_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C)) +#define ADC_SSMUX1_R (*((volatile unsigned long *)0x40038060)) +#define ADC_SSCTL1_R (*((volatile unsigned long *)0x40038064)) +#define ADC_SSFIFO1_R (*((volatile unsigned long *)0x40038068)) +#define ADC_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C)) +#define ADC_SSMUX2_R (*((volatile unsigned long *)0x40038080)) +#define ADC_SSCTL2_R (*((volatile unsigned long *)0x40038084)) +#define ADC_SSFIFO2_R (*((volatile unsigned long *)0x40038088)) +#define ADC_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C)) +#define ADC_SSMUX3_R (*((volatile unsigned long *)0x400380A0)) +#define ADC_SSCTL3_R (*((volatile unsigned long *)0x400380A4)) +#define ADC_SSFIFO3_R (*((volatile unsigned long *)0x400380A8)) +#define ADC_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC)) +#define ADC_TMLB_R (*((volatile unsigned long *)0x40038100)) + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package + +//***************************************************************************** +// +// Deprecated defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_MPU_R (*((volatile unsigned long *)0xE000ED9C)) + +#endif + +#endif // __LM3S6965_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/main.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/main.c new file mode 100644 index 00000000..871181a4 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/main.c @@ -0,0 +1,120 @@ +/**************************************************************************************** +| Description: demo program application source file +| File Name: main.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static void Init(void); + + +/**************************************************************************************** +** NAME: main +** PARAMETER: none +** RETURN VALUE: program return code +** DESCRIPTION: This is the entry point for the bootloader application and is called +** by the reset interrupt vector after the C-startup routines executed. +** +****************************************************************************************/ +int main(void) +{ + /* initialize the microcontroller */ + Init(); + /* initialize the bootloader interface */ + BootComInit(); + + /* start the infinite program loop */ + while (1) + { + /* toggle LED with a fixed frequency */ + LedToggle(); + /* check for bootloader activation request */ + BootComCheckActivationRequest(); + } + + /* program should never get here */ + return 0; +} /*** end of main ***/ + + +/**************************************************************************************** +** NAME: Init +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the microcontroller. +** +****************************************************************************************/ +static void Init(void) +{ + /* set the clocking to run at 50MHz from the PLL */ + SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); + /* init the led driver */ + LedInit(); + /* init the timer driver */ + TimeInit(); + /* enable IRQ's, because they were initially disabled by the bootloader */ + IrqInterruptEnable(); +} /*** end of Init ***/ + + +/**************************************************************************************** +** NAME: __error__ +** PARAMETER: pcFilename name of the source file where the assertion occurred. +** ulLine linenumber in the source file where the assertion occurred. +** RETURN VALUE: none +** DESCRIPTION: Called when a runtime assertion failed. It stores information about +** where the assertion occurred and halts the software program. +** +****************************************************************************************/ +#ifdef DEBUG +void __error__(char *pcFilename, unsigned long ulLine) +{ + static volatile char *assert_failure_file; + static volatile unsigned long assert_failure_line; + + /* store the file string and line number so that it can be read on a breakpoint*/ + assert_failure_file = pcFilename; + assert_failure_line = ulLine; + + /* hang the software so that it requires a hard reset */ + for(;;) + { + } +} /*** end of __error__ ***/ +#endif + + +/*********************************** end of main.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/makefile b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/makefile new file mode 100644 index 00000000..e6bafd03 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/makefile @@ -0,0 +1,229 @@ +#**************************************************************************************** +#| Description: Makefile for LM3S using CodeSourcery GNU GCC compiler toolset +#| File Name: makefile +#| +#|--------------------------------------------------------------------------------------- +#| C O P Y R I G H T +#|--------------------------------------------------------------------------------------- +#| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +#| +#|--------------------------------------------------------------------------------------- +#| L I C E N S E +#|--------------------------------------------------------------------------------------- +#| This file is part of OpenBTL. OpenBTL is free software: you can redistribute it and/or +#| modify it under the terms of the GNU General Public License as published by the Free +#| Software Foundation, either version 3 of the License, or (at your option) any later +#| version. +#| +#| OpenBTL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +#| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +#| PURPOSE. See the GNU General Public License for more details. +#| +#| You should have received a copy of the GNU General Public License along with OpenBTL. +#| If not, see . +#| +#**************************************************************************************** +SHELL = sh + +#|---------------------------------------------------------------------------------------| +#| Configure project name | +#|---------------------------------------------------------------------------------------| +PROJ_NAME=demoprog_ek_lm3s8962 + + +#|---------------------------------------------------------------------------------------| +#| Speficy project source files | +#|---------------------------------------------------------------------------------------| +PROJ_FILES= \ +boot.c \ +boot.h \ +cstart.c \ +header.h \ +irq.c \ +irq.h \ +led.c \ +led.h \ +main.c \ +time.c \ +time.h \ +vectors.c \ +lib/inc/asmdefs.h \ +lib/inc/hw_adc.h \ +lib/inc/hw_comp.h \ +lib/inc/hw_epi.h \ +lib/inc/hw_ethernet.h \ +lib/inc/hw_flash.h \ +lib/inc/hw_gpio.h \ +lib/inc/hw_hibernate.h \ +lib/inc/hw_i2c.h \ +lib/inc/hw_i2s.h \ +lib/inc/hw_ints.h \ +lib/inc/hw_memmap.h \ +lib/inc/hw_nvic.h \ +lib/inc/hw_pwm.h \ +lib/inc/hw_qei.h \ +lib/inc/hw_ssi.h \ +lib/inc/hw_sysctl.h \ +lib/inc/hw_timer.h \ +lib/inc/hw_types.h \ +lib/inc/hw_uart.h \ +lib/inc/hw_can.h \ +lib/inc/hw_udma.h \ +lib/inc/hw_usb.h \ +lib/inc/hw_watchdog.h \ +lib/inc/lm3s6965.h \ +lib/driverlib/adc.c \ +lib/driverlib/adc.h \ +lib/driverlib/can.c \ +lib/driverlib/can.h \ +lib/driverlib/comp.c \ +lib/driverlib/comp.h \ +lib/driverlib/cpu.c \ +lib/driverlib/cpu.h \ +lib/driverlib/debug.h \ +lib/driverlib/epi.c \ +lib/driverlib/epi.h \ +lib/driverlib/ethernet.c \ +lib/driverlib/ethernet.h \ +lib/driverlib/flash.c \ +lib/driverlib/flash.h \ +lib/driverlib/gpio.c \ +lib/driverlib/gpio.h \ +lib/driverlib/hibernate.c \ +lib/driverlib/hibernate.h \ +lib/driverlib/i2c.c \ +lib/driverlib/i2c.h \ +lib/driverlib/i2s.c \ +lib/driverlib/i2s.h \ +lib/driverlib/interrupt.c \ +lib/driverlib/interrupt.h \ +lib/driverlib/mpu.c \ +lib/driverlib/mpu.h \ +lib/driverlib/pin_map.h \ +lib/driverlib/pwm.c \ +lib/driverlib/pwm.h \ +lib/driverlib/qei.c \ +lib/driverlib/qei.h \ +lib/driverlib/rom.h \ +lib/driverlib/rom_map.h \ +lib/driverlib/ssi.c \ +lib/driverlib/ssi.h \ +lib/driverlib/sysctl.c \ +lib/driverlib/sysctl.h \ +lib/driverlib/systick.c \ +lib/driverlib/systick.h \ +lib/driverlib/timer.c \ +lib/driverlib/timer.h \ +lib/driverlib/uart.c \ +lib/driverlib/uart.h \ +lib/driverlib/udma.c \ +lib/driverlib/udma.h \ +lib/driverlib/usb.c \ +lib/driverlib/usb.h \ +lib/driverlib/watchdog.c \ +lib/driverlib/watchdog.h + + +#|---------------------------------------------------------------------------------------| +#| Compiler binaries | +#|---------------------------------------------------------------------------------------| +CC = arm-none-eabi-gcc +LN = arm-none-eabi-gcc +OC = arm-none-eabi-objcopy +OD = arm-none-eabi-objdump +AS = arm-none-eabi-as +SZ = arm-none-eabi-size + + +#|---------------------------------------------------------------------------------------| +#| Extract file names | +#|---------------------------------------------------------------------------------------| +PROJ_ASRCS = $(filter %.s,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CSRCS = $(filter %.c,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CHDRS = $(filter %.h,$(foreach file,$(PROJ_FILES),$(notdir $(file)))) +PROJ_CCMPL = $(patsubst %.c,%.cpl,$(PROJ_CSRCS)) +PROJ_ACMPL = $(patsubst %.s,%.cpl,$(PROJ_ASRCS)) + + +#|---------------------------------------------------------------------------------------| +#| Set important path variables | +#|---------------------------------------------------------------------------------------| +VPATH = $(foreach path,$(sort $(foreach file,$(PROJ_FILES),$(dir $(file)))) $(subst \,/,$(OBJ_PATH)),$(path) :) +OBJ_PATH = obj +BIN_PATH = bin +INC_PATH = $(patsubst %,-I%,$(sort $(foreach file,$(filter %.h,$(PROJ_FILES)),$(dir $(file))))) +INC_PATH += -I. -I./lib +LIB_PATH = + + +#|---------------------------------------------------------------------------------------| +#| Options for compiler binaries | +#|---------------------------------------------------------------------------------------| +CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -mlong-calls -O1 -T memory.x +CFLAGS += -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D sprintf=usprintf -Wno-main +CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -D snprintf=usnprintf +CFLAGS += -D printf=uipprintf -ffunction-sections -fdata-sections $(INC_PATH) +CFLAGS += -D DEBUG -D gcc +LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections +OFLAGS = -O srec +ODFLAGS = -x +SZFLAGS = -B -d + + +#|---------------------------------------------------------------------------------------| +#| Specify library files | +#|---------------------------------------------------------------------------------------| +LIBS = + + +#|---------------------------------------------------------------------------------------| +#| Define targets | +#|---------------------------------------------------------------------------------------| +AOBJS = $(patsubst %.s,%.o,$(PROJ_ASRCS)) +COBJS = $(patsubst %.c,%.o,$(PROJ_CSRCS)) + + +#|---------------------------------------------------------------------------------------| +#| Make ALL | +#|---------------------------------------------------------------------------------------| +all : $(BIN_PATH)/$(PROJ_NAME).srec + + +$(BIN_PATH)/$(PROJ_NAME).srec : $(BIN_PATH)/$(PROJ_NAME).elf + @$(OC) $< $(OFLAGS) $@ + @$(OD) $(ODFLAGS) $< > $(BIN_PATH)/$(PROJ_NAME).map + @echo +++ Summary of memory consumption: + @$(SZ) $(SZFLAGS) $< + @echo +++ Build complete [$(notdir $@)] + +$(BIN_PATH)/$(PROJ_NAME).elf : $(AOBJS) $(COBJS) + @echo +++ Linking [$(notdir $@)] + @$(LN) $(CFLAGS) -o $@ $(patsubst %.o,$(OBJ_PATH)/%.o,$(^F)) $(LIBS) $(LFLAGS) + + +#|---------------------------------------------------------------------------------------| +#| Compile and assemble | +#|---------------------------------------------------------------------------------------| +$(AOBJS): %.o: %.s $(PROJ_CHDRS) + @echo +++ Assembling [$(notdir $<)] + @$(AS) $(AFLAGS) $< -o $(OBJ_PATH)/$(@F) + +$(COBJS): %.o: %.c $(PROJ_CHDRS) + @echo +++ Compiling [$(notdir $<)] + @$(CC) $(CFLAGS) -c $< -o $(OBJ_PATH)/$(@F) + + +#|---------------------------------------------------------------------------------------| +#| Make CLEAN | +#|---------------------------------------------------------------------------------------| +clean : + @echo +++ Cleaning build environment + @rm -f $(foreach file,$(AOBJS),$(OBJ_PATH)/$(file)) + @rm -f $(foreach file,$(COBJS),$(OBJ_PATH)/$(file)) + @rm -f $(patsubst %.o,%.lst,$(foreach file,$(COBJS),$(OBJ_PATH)/$(file))) + @rm -f $(BIN_PATH)/$(PROJ_NAME).elf $(BIN_PATH)/$(PROJ_NAME).map + @rm -f $(BIN_PATH)/$(PROJ_NAME).srec + @echo +++ Clean complete + + \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/memory.x b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/memory.x new file mode 100644 index 00000000..61ad9d84 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/memory.x @@ -0,0 +1,37 @@ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00002000, LENGTH = 248K + SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +SECTIONS +{ + __STACKSIZE__ = 256; + + .text : + { + KEEP(*(.isr_vector)) + *(.text*) + *(.rodata*) + _etext = .; + } > FLASH + + .data : AT (ADDR(.text) + SIZEOF(.text)) + { + _data = .; + *(vtable) + *(.data*) + _edata = .; + } > SRAM + + .bss : + { + _bss = .; + *(.bss*) + *(COMMON) + _ebss = .; + _stack = .; + . = ALIGN(MAX(_stack + __STACKSIZE__ , .), 4); + _estack = .; + } > SRAM +} diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.c new file mode 100644 index 00000000..ef3e5bd2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.c @@ -0,0 +1,118 @@ +/**************************************************************************************** +| Description: Timer driver source file +| File Name: time.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Local data declarations +****************************************************************************************/ +static unsigned long millisecond_counter; + + +/**************************************************************************************** +** NAME: TimeInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the timer. +** +****************************************************************************************/ +void TimeInit(void) +{ + /* configure the SysTick timer for 1 ms period */ + SysTickPeriodSet((unsigned long)SysCtlClockGet() / 1000); + SysTickEnable(); + SysTickIntEnable(); + /* reset the millisecond counter */ + TimeSet(0); +} /*** end of TimeInit ***/ + + +/**************************************************************************************** +** NAME: TimeDeinit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Stops and disables the timer. +** +****************************************************************************************/ +void TimeDeinit(void) +{ + SysTickIntDisable(); + SysTickDisable(); +} /*** end of TimeDeinit ***/ + + +/**************************************************************************************** +** NAME: TimeSet +** PARAMETER: timer_value initialize value of the millisecond timer. +** RETURN VALUE: none +** DESCRIPTION: Sets the initial counter value of the millisecond timer. +** +****************************************************************************************/ +void TimeSet(unsigned long timer_value) +{ + /* set the millisecond counter */ + millisecond_counter = timer_value; +} /*** end of TimeSet ***/ + + +/**************************************************************************************** +** NAME: TimeGet +** PARAMETER: none +** RETURN VALUE: current value of the millisecond timer +** DESCRIPTION: Obtains the counter value of the millisecond timer. +** +****************************************************************************************/ +unsigned long TimeGet(void) +{ + /* read and return the millisecond counter value */ + return millisecond_counter; +} /*** end of TimeGet ***/ + + +/**************************************************************************************** +** NAME: TimeISRHandler +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Interrupt service routine of the timer. +** +****************************************************************************************/ +void TimeISRHandler(void) +{ + /* increment the millisecond counter */ + millisecond_counter++; +} /*** end of TimeISRHandler ***/ + + +/*********************************** end of time.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.h new file mode 100644 index 00000000..a01f7e58 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/time.h @@ -0,0 +1,44 @@ +/**************************************************************************************** +| Description: Timer driver header file +| File Name: time.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef TIME_H +#define TIME_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void TimeInit(void); +void TimeDeinit(void); +void TimeSet(unsigned long timer_value); +unsigned long TimeGet(void); +void TimeISRHandler(void); + +#endif /* TIME_H */ +/*********************************** end of time.h *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/vectors.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/vectors.c new file mode 100644 index 00000000..6462dc81 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_GCC/Prog/vectors.c @@ -0,0 +1,142 @@ +/**************************************************************************************** +| Description: bootloader interrupt vector table source file +| File Name: vectors.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* External functions +****************************************************************************************/ +extern void reset_handler(void); /* implemented in cstart.s */ + + +/**************************************************************************************** +* External data declarations +****************************************************************************************/ +extern unsigned long _estack; /* stack end address (memory.x) */ + + +/**************************************************************************************** +** NAME: UnusedISR +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Catch-all for unused interrrupt service routines. +** +****************************************************************************************/ +void UnusedISR(void) +{ + /* unexpected interrupt occured, so halt the system */ + while (1) { ; } +} /*** end of UnusedISR ***/ + + +/**************************************************************************************** +* I N T E R R U P T V E C T O R T A B L E +****************************************************************************************/ +typedef union +{ + void (*func)(void); /* for ISR function pointers */ + unsigned long ptr; /* for stack pointer entry */ +}tIsrFunc; /* type for vector table entries */ + +__attribute__ ((section(".isr_vector"))) +const tIsrFunc _vectab[] = +{ + { .ptr = (unsigned long)&_estack }, /* the initial stack pointer */ + { reset_handler }, /* the reset handler */ + { UnusedISR }, /* NMI Handler */ + { UnusedISR }, /* Hard Fault Handler */ + { UnusedISR }, /* MPU Fault Handler */ + { UnusedISR }, /* Bus Fault Handler */ + { UnusedISR }, /* Usage Fault Handler */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* SVCall Handler */ + { UnusedISR }, /* Debug Monitor Handler */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* PendSV Handler */ + { TimeISRHandler }, /* SysTick Handler */ + { UnusedISR }, /* GPIO Port A */ + { UnusedISR }, /* GPIO Port B */ + { UnusedISR }, /* GPIO Port C */ + { UnusedISR }, /* GPIO Port D */ + { UnusedISR }, /* GPIO Port E */ + { UnusedISR }, /* UART0 Rx and Tx */ + { UnusedISR }, /* UART1 Rx and Tx */ + { UnusedISR }, /* SSI Rx and Tx */ + { UnusedISR }, /* I2C Master and Slave */ + { UnusedISR }, /* PWM Fault */ + { UnusedISR }, /* PWM Generator 0 */ + { UnusedISR }, /* PWM Generator 1 */ + { UnusedISR }, /* PWM Generator 2 */ + { UnusedISR }, /* Quadrature Encoder */ + { UnusedISR }, /* ADC Sequence 0 */ + { UnusedISR }, /* ADC Sequence 1 */ + { UnusedISR }, /* ADC Sequence 2 */ + { UnusedISR }, /* ADC Sequence 3 */ + { UnusedISR }, /* Watchdog timer */ + { UnusedISR }, /* Timer 0 subtimer A */ + { UnusedISR }, /* Timer 0 subtimer B */ + { UnusedISR }, /* Timer 1 subtimer A */ + { UnusedISR }, /* Timer 1 subtimer B */ + { UnusedISR }, /* Timer 2 subtimer A */ + { UnusedISR }, /* Timer 2 subtimer B */ + { UnusedISR }, /* Analog Comparator 0 */ + { UnusedISR }, /* Analog Comparator 1 */ + { UnusedISR }, /* Analog Comparator 2 */ + { UnusedISR }, /* System Control (PLL, OSC, BO) */ + { UnusedISR }, /* FLASH Control */ + { UnusedISR }, /* GPIO Port F */ + { UnusedISR }, /* GPIO Port G */ + { UnusedISR }, /* GPIO Port H */ + { UnusedISR }, /* UART2 Rx and Tx */ + { UnusedISR }, /* SSI1 Rx and Tx */ + { UnusedISR }, /* Timer 3 subtimer A */ + { UnusedISR }, /* Timer 3 subtimer B */ + { UnusedISR }, /* I2C1 Master and Slave */ + { UnusedISR }, /* Quadrature Encoder 1 */ + { UnusedISR }, /* CAN0 */ + { UnusedISR }, /* CAN1 */ + { UnusedISR }, /* CAN2 */ + { UnusedISR }, /* Ethernet */ + { UnusedISR }, /* Hibernate */ + { (void*)0x55AA11EE } /* Reserved for OpenBLT checksum */ +}; + + +/************************************ end of hw.c **************************************/ + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.out b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.out new file mode 100644 index 00000000..d7116694 Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.out differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.sim b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.sim new file mode 100644 index 00000000..3b2d51e2 Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.sim differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.srec new file mode 100644 index 00000000..2c4cc649 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/bin/openbtl_ek_lm3s8962.srec @@ -0,0 +1,419 @@ +S01B00006F70656E62746C5F656B5F6C6D3373383936322E737265632F +S1130000E8050020B90B0000ED190000ED1900000F +S1130010ED190000ED190000ED190000ED190000C4 +S1130020ED190000ED190000ED190000ED190000B4 +S1130030ED190000ED190000ED190000ED190000A4 +S1130040ED190000ED190000ED190000ED19000094 +S1130050ED190000ED190000ED190000ED19000084 +S1130060ED190000ED190000ED190000ED19000074 +S1130070ED190000ED190000ED190000ED19000064 +S1130080ED190000ED190000ED190000ED19000054 +S1130090ED190000ED190000ED190000ED19000044 +S11300A0ED190000ED190000ED190000ED19000034 +S11300B0ED190000ED190000ED190000ED19000024 +S11300C0ED190000ED190000ED190000ED19000014 +S11300D0ED190000ED190000ED190000ED19000004 +S11300E0ED190000ED190000ED190000ED190000F4 +S11300F0044B9D46C046C046C046C04600F08DFC39 +S113010000F0F8FFE8050020DFF86C14884200F0E6 +S1130110A980DFF86814884200F0A480DFF8601436 +S1130120884200F09F80DFF85C14884200F09A80D7 +S1130130DFF85414884200F09580DFF850148842A8 +S113014000F09080DFF84814884200F08B80DFF8DC +S11301504414884200F08680DFF83C14884200F0A2 +S11301608180DFF8381488427CD0DFF83414884268 +S113017078D0DFF83014884274D0DFF82C14884229 +S113018070D0DFF8281488426CD0DFF82414884239 +S113019068D0DFF82014884264D0DFF81C14884249 +S11301A060D0DFF8181488425CD0DFF81414884259 +S11301B058D0402856D0B0F1102F53D0DFF8041493 +S11301C088424FD0DFF8001488424BD0DFF8FC138C +S11301D0884247D0DFF8F813884243D0DFF8F4139D +S11301E088423FD0B0F1101F3CD0DFF8EC138842B6 +S11301F038D0DFF8E813884234D0DFF8E4138842BB +S113020030D0DFF8E01388422CD0DFF8DC138842CA +S113021028D0DFF8D813884224D0DFF8D4138842DA +S113022020D0DFF8D01388421CD0DFF8CC138842EA +S113023018D0DFF8C813884214D0DFF8C4138842FA +S113024010D0DFF8C01388420CD0B0F1202F09D0B1 +S1130250DFF8B413884205D0082803D0DFF8AC13C4 +S1130260884201D1012070470020704738B5044608 +S1130270DFF89C53FFF748FF002805D14FF4FC71C9 +S113028005F19C0000F0E8F9200F05EB8000C0693F +S11302900168A2B2230C03F01F039A4011430160CA +S11302A031BD00000138FDD170477047F8B50446F0 +S11302B0DFF86053286810F0E04F06D02868DFF8B4 +S11302C058130840B0F1805F01D1002C7DD4286E12 +S11302D0296F20F4800040F4006641F400672E6624 +S11302E02F673046800702D52046800707D506F0E1 +S11302F0010004F0010181F0010108421AD064F008 +S1130300030006402E66002F05D507F07000302844 +S113031007D0702805D0002F08D406F0300030280C +S113032004D14FF48050FFF7BDFF03E04FF40020E9 +S1130330FFF7B8FFDFF8E402304043F2F0712140E8 +S113034041EA0006DFF8D8023840DFF8D81221402D +S1130350084304F0080140EAC1074020A865002FC3 +S113036002D52F672E6601E02E662F671020FFF757 +S113037099FFDFF8B4023040DFF8B012214008439F +S1130380E10D61F3DC57610008D540F4800027F4E7 +S11303908001DFF89C222240114301E027F08041D4 +S11303A022050CD44FF4004200E0521E002A02D071 +S11303B02B6D5B06F9D520F4006021F400612866FA +S11303C029671020BDE8F2406CE7F1BD70B4DFF896 +S11303D044120A6E0B6F002B02D503F0700001E08B +S11303E002F0300000280DD0102835D020285BD032 +S11303F0302800F08180602800F08180702800F0AF +S1130400818082E0C2F38410DFF8044204EB8000B0 +S1130410006CDFF8204204EA030515F1004F05D013 +S1130420002B00F18580150500F182804D6E0E6869 +S113043016F0E04F06D00968DFF8DC613140B1F115 +S1130440805F64D1C5F34811891C484305F01F013E +S1130450891CB0FBF1F063E0086810F0E04F06D0AF +S1130460DFF8B4010C680440B4F1805F02D1DFF816 +S1130470C801CEE70C680440DFF8C051AC4203D198 +S11304800C68A4B2022C09D00C682040DFF8B041FB +S1130490A04206D1086880B2002802D1DFF8A40186 +S11304A0B7E7DFF8A401B4E7086810F0E04F06D01E +S11304B0DFF864010C680440B4F1805F02D1DFF816 +S11304C08C01A6E70C680440DFF87051AC4203D1FC +S11304D00C68A4B2022C09D00C682040DFF86041FB +S11304E0A04206D1086880B2002802D1DFF860017A +S11304F08FE7DFF860018CE747F2305089E74FF46B +S1130500800086E74FF4004083E7002031E0C5F324 +S11305104811484305F01F01491C4900B0FBF1F0A4 +S1130520690400D54008290400D5800842F48002FB +S113053051021ED5002B17D559000FD504EA03012B +S113054011F1004F03D0002B08D4110506D440004C +S1130550C3F38651491CB0FBF1F00AE0C3F3C55163 +S1130560491CB0FBF1F004E0C2F3C351491CB0FBD9 +S1130570F1F070BC70470000010010000200100090 +S1130580000110000002100000041000000110100F +S11305900002101000041010004010100050102031 +S11305A001000020020000200400002008000020B8 +S11305B010000020200000204000002080000020C7 +S11305C00001002000400010001010100001102055 +S11305D08000003010000030000100100002001004 +S11305E01000001020000010200000300100101046 +S11305F00200101004001010080010100100001078 +S1130600020000100400001001001020001010006F +S1130610D815000000E00F400000FF700FC8FFFF76 +S11306208FDFFF7F30200080FCFF3FF80300C0070E +S11306300000404000080080C0E1E4000000011018 +S113064000000310001BB7000024F40070383900C8 +S1130650C0C62D0000093D0080B5034A10605160FA +S113066000F005F8FCE700BFDC0400207047704789 +S1130670D34800210180816480F84310A0F844101D +S113068081707047CE480178481E8041C043C00F36 +S11306907047CB48002180F84310704710B5C84C10 +S11306A00178FF2902D100F07EF84DE0217801297C +S11306B05AD10178C92932D0CC293FD0CF293AD098 +S11306C0D0292FD0D12933D0D2292ED0F32917D035 +S11306D0F4290FD0F5290AD0F6290ED0FA2912D020 +S11306E0FC2913D0FD2914D0FE2915D029E000F0EF +S11306F0AAF829E000F0C2F826E000F09BF823E015 +S113070000F0D9F820E000F084F81DE000F07FF854 +S11307101AE000F06CF817E000F05DF814E000F067 +S1130720EFF811E000F004F90EE000F0D7F80BE068 +S113073000F029F908E000F038F905E000F044F988 +S113074002E0202000F027F894F84300012802D1A9 +S1130750102000F020F8012084F84300B4F944107C +S1130760E01CBDE8104000E010BD89B200F04DB9B6 +S113077010B4002303E00478E318DBB2401C0C46F9 +S1130780611E002CF7D11360012010BC70478C4807 +S11307900021417070478A49FE22CA700871022004 +S11307A0A1F84400704780B5FFF7F1FF84480121A8 +S11307B00170FF21C170102101710021417140219C +S11307C08171C1710021017201214172817208217C +S11307D0A0F8441001BD10B5794C00202070FFF73B +S11307E0D6FFFF20E0700120A4F8440010BD744837 +S11307F0411CFF228A700022CA7042780A710022CA +S11308004A718A71CA710621A0F844107047002009 +S1130810C1E76B48FF21C1706A49816400F203019A +S113082000224A708A70CA7007224A600821A0F820 +S1130830441070476249FF22CA70406888640120EE +S1130840A1F84400704770B505466A78402A03D37E +S11308502220BDE870409EE7594C04F244067168BA +S1130860201D00F0FFF8FF20E07070686978081818 +S113087070606878401CA4F8440070BD70B50546EB +S11308806878402803D32220BDE8704083E7696874 +S11308904B4C04F2440671606A78201D00F0E2F8C3 +S11308A0FF20E07070686978081870606878401CF0 +S11308B0A4F8440070BD38B5414CFF21E17004F246 +S11308C00305E21D4168A06CFFF752FF6870002029 +S11308D0A870E8700820A4F8440031BD3848FF210E +S11308E0C17000F2030100224A708A704022CA706B +S11308F000220A714A718A710721A0F844107047D6 +S113090038B52F4C04F24405421C3F21686800F0BE +S1130910BEF8002803D13120BDE832403BE7FF2078 +S1130920E07068683F3068600120A4F8440031BD7D +S113093038B5044660783F2803D32220BDE832400E +S113094029E71F48FF21C1700121A0F844106178F4 +S1130950002907D100F0A1F8002813D13120BDE807 +S1130960324018E700F24405A21C686800F08FF8D2 +S1130970002803D13120BDE832400CE76868617873 +S11309800818686031BD10B50D4C4168A06C00F0CA +S113099080F8002803D13120BDE81040FBE6FF2099 +S11309A0E0700120A4F8440010BD80B500F06BF89D +S11309B00348FF21C1700121A0F8441001BD0000CB +S11309C008040020041A00003120E4E680B500A8E1 +S11309D016490A880280FFF74BFE00F069F81448B4 +S11309E00078012802D100A8FFF758FE01BD10B518 +S11309F0104C204600F090F8012804D12046BDE8B0 +S1130A001040FFF74BBE10BD704780B5C9B200F06F +S1130A105EF8BDE80140FFF73CBE054801210170C6 +S1130A207047034800210170704700002E15000034 +S1130A30E70400209C040020FFF724BE80B500F0EA +S1130A402AF800280BD0FFF7DFFF05484FF40051C8 +S1130A50016042F204000068BDE80240004701BDA5 +S1130A6008ED00E070B504460D46164605E015F89D +S1130A70010B04F8010BFFF7FAFD3046461E80B265 +S1130A800028F4D170BD00F097B800F0A1B800F0D0 +S1130A90A6B800F0C5B800F0F7B880B500F0D5F8F6 +S1130AA0002801D1002002BDBDE8014000F003B9D7 +S1130AB080B53D48FFF7DAFBFFF788FC60234FF46D +S1130AC0614201463948BDE8005000F029BA70B5CA +S1130AD004460D46412D03D357213548FFF7BCFD8D +S1130AE0284600F04EF8012803D05A213048FFF779 +S1130AF0B3FD00260BE0FFF7BAFD305D00F041F8CE +S1130B00012803D062212A48FFF7A6FD761C284657 +S1130B10B6B28642EFD370BD38B50546254C607831 +S1130B2000280AD1201D00F01FF8012803D101205C +S1130B30607000202070002032BD20780019401D14 +S1130B4000F012F80128F6D12078421C2270207996 +S1130B50D2B28242EFD1201D411C2846FFF782FF0A +S1130B6000206070012032BD10B504460F4800F02B +S1130B7087FA10F1010F02D02070012010BD00206F +S1130B8010BD10B5094C0146204600F08CFA00282F +S1130B9003D1002010BDFFF76AFD204600F05DFA86 +S1130BA00028F8D0012010BD0100001000C0004052 +S1130BB09C19000054040020044B9D46C046C046C6 +S1130BC0C046C046FFF72DFF00F094FAE805002068 +S1130BD04FF0FF30C7490860C7490860704770B5D7 +S1130BE004460D46164600F03EF9FF2805D02819A4 +S1130BF0401E00F038F9FF2801D1002070BD600AC2 +S1130C004002B0F5005F2B469BB23246214603D129 +S1130C10B948BDE8704094E0B648BDE8704090E043 +S1130C2070B504460D4600F01EF906462819401E0C +S1130C3000F019F9FF2E01D0FF2801D1002070BD6A +S1130C4001463046BDE87040E2E080B5AA4801683C +S1130C5011F1010F01D1012002BD416882685118D0 +S1130C60C2685118026951184269511882695118B1 +S1130C70C0694018C043401C009000AA042142F2FD +S1130C80F000FFF7ACFF02BD4FF40050016842686A +S1130C90511882685118C268511802695118426982 +S1130CA051188069401842F2F00109680818401E82 +S1130CB08041C00F704780B58F48016811F1010F62 +S1130CC003D000F07FF8002808D08A48016811F1A9 +S1130CD0010F05D000F076F8002801D1002002BDF4 +S1130CE0012002BD80B5CA0501D0002002BD026802 +S1130CF08A4201D1012002BD01604FF40072001D3F +S1130D00FFF7B0FE012002BD38B504460D467A480F +S1130D10844208D1774C29462046FFF7E3FF002898 +S1130D200DD1002032BDB5F5005F01D10446F2E7D4 +S1130D30204600F047F80028EDD1002032BD2046BF +S1130D4032BD2DE9F0410746884614461D464FEA58 +S1130D5058267602386810F1010F05D1314638461D +S1130D60FFF7C0FF00281ED03868B04205D03146D6 +S1130D703846FFF7C9FF070015D03868A8EB000014 +S1130D80C01900F10408FFF772FC381DA8EB00003D +S1130D904FF4007188420AD306F200213846FFF767 +S1130DA0B3FF070001D100200AE007F1040814F89A +S1130DB0010B08F8010B6D1EADB2002DE3D101202B +S1130DC0BDE8F081F8B504460125206800F04BF831 +S1130DD0FF2801D10020F2BD002600E0761C802E01 +S1130DE014D2216811EB860714EB8600406800904A +S1130DF0FFF73DFC0422394600A800F0B3F90028AF +S1130E0003D1386800998842E8D000252846F2BD0D +S1130E10F8B50D46854222D3002820D0142D1ED2C9 +S1130E2000F03BF80446284600F037F8064628460A +S1130E3000F04AF88019401E001B401C850AADB220 +S1130E40002600E0761CB6B23746AF4209DAFFF757 +S1130E500EFC04EB872000F069F90028F2D0002092 +S1130E60F2BD0120F2BD38B50446002501E06D1C39 +S1130E70EDB2132D0FD2FFF7FAFB05EB450080000E +S1130E801E4942589442F2D34018416889188C4252 +S1130E90EDD2007A32BDFF2032BD38B504460025BC +S1130EA000E06D1CEDB2132D0BD2FFF7E0FB05EB58 +S1130EB04500800011494218127AA242F1D14058EB +S1130EC032BD4FF0FF3032BD38B50446002500E096 +S1130ED06D1CEDB2132D0BD2FFF7C9FB05EB4500DA +S1130EE0064901EB8000017AA142F1D1406832BD8C +S1130EF0002032BD0000002004020020D8160000AB +S1130F00DFF8CC11884207D0DFF8C811884203D03B +S1130F10DFF8C411884201D10120704700207047D6 +S1130F20F8B504460E4617461D46FFF7E9FF0028AC +S1130F3005D140F20D11DFF8A401FFF78DFB002F5E +S1130F4005D14FF48771DFF89401FFF785FBDFF8D3 +S1130F509001016811F0E04F1AD0DFF8881102689F +S1130F600A40B2F1805F13D002680A40DFF878319A +S1130F709A4203D1026892B2022A09D0026811404F +S1130F80DFF86821914205D1006880B2002801D1C0 +S1130F90102000E008207843864205D240F20F1169 +S1130FA0DFF83801FFF758FB204600F039F804F168 +S1130FB03000B6EB071F016804D241F02001016044 +S1130FC07F0802E021F020010160F000B0FBF7F09F +S1130FD0401C40088109616200F03F00A062E562A4 +S1130FE00020A0612046BDE8F240FFE710B50446AA +S1130FF0FFF786FF002805D14FF4CF71DFF8DC003E +S1131000FFF72AFB04F12C00016841F01001016094 +S113101004F13000016840F201321143016010BD57 +S113102010B50446FFF76CFF002805D14FF4DF71BB +S1131030DFF8A800FFF710FBA0690007FCD404F157 +S11310402C00016821F01001016004F130000168F6 +S1131050DFF89C201140016010BD10B50446FFF775 +S11310604FFF002804D140F2E9311C48FFF7F4FA9D +S1131070A069C0B2400900F0010080F0010010BD79 +S113108010B50446FFF73CFF002804D140F20941A3 +S11310901248FFF7E1FAA069C00601D4206810BD28 +S11310A04FF0FF3010BD38B504460D46FFF728FF5A +S11310B0002804D140F25B410848FFF7CDFAA0694B +S11310C0800602D42560012032BD002032BD00001C +S11310D000C0004000D0004000E00040F0180000D4 +S11310E000E00F400000FF7000000110000003103A +S11310F0FEFCFFFF00F090F8002801D000F08EF80D +S1131100002000F0A1F800F0B9F850F8041B61B118 +S113111050F8042BD30744BFA9F101039A18002304 +S113112042F8043B091FFAD1EFE7704710B50446B3 +S1131130A00504D08421DFF8C800FFF78DFADFF89A +S1131140C400012141610460DFF8BC108160816842 +S11311508907FCD4C068C00702D54FF0FF3010BD2A +S1131160002010BD70B504460D46164615F0030068 +S113117004D0C821DFF88800FFF76EFA16F00300E8 +S113118004D0C921DFF87800FFF766FADFF87400AD +S113119001214161DFF874100968C90726D5002EC2 +S11311A026D0E909C9010160194A06E005F07C016D +S11311B054F8043B53502D1D361F15F07C0102D109 +S11311C0016B002901D1002EF0D112490162016A9C +S11311D0C907FCD4E3E70560216841600D498160DB +S11311E08168C907FCD4241D2D1D361F002EF2D1A1 +S11311F0C068C00702D54FF0FF3070BD002070BD3D +S11312008818000000D00F40020042A4A0E10F4063 +S113121000D10F40010042A40120704710B50849D5 +S113122079441C31074C7C441A34A14206D0081D71 +S11312300A68511888470146A142F8D110BD00BF81 +S11312409C070000A807000080B500F005F800F036 +S113125017F800F020F8FCE780B50648FFF726F8F9 +S11312600548FFF703F803214FF04020BDE8044090 +S113127000F01BB98003C0010100002000F052B946 +S113128080B5FFF7F3F900F053F9FFF7FEFBBDE873 +S11312900140FFF79BBB80B5FFF7E9F9FFF7A7FB18 +S11312A0BDE8014000F04CB9B0F1402F43D0DFF865 +S11312B02C1288423FD0DFF8281288423BD0DFF856 +S11312C02412884237D0DFF82012884233D0DFF866 +S11312D01C1288422FD0DFF8181288422BD0DFF876 +S11312E01412884227D0DFF81012884223D0DFF886 +S11312F00C1288421FD0DFF8081288421BD0DFF896 +S11313000412884217D0DFF80012884213D0DFF8A5 +S1131310FC1188420FD0DFF8F81188420BD0DFF8B7 +S1131320F411884207D0DFF8F011884203D0DFF8C7 +S1131330EC11884201D1012070470020704770B53C +S113134006460C461546FFF7AFFF002804D1E421FA +S1131350DFF8CC01FFF780F9002D08D0012D06D06D +S1131360022D04D0E621DFF8B801FFF775F906F580 +S113137080602946C907016801D5214300E0A143E3 +S1131380016006F58460A907016801D5214300E0E6 +S1131390A143016070BDF8B504460D4616461F46CC +S11313A0FFF782FF002805D14FF4DD71DFF87001EB +S11313B0FFF752F9012E0BD0022E09D0042E07D0CC +S11313C00C2E05D04FF4DF71DFF85401FFF744F918 +S11313D0082F11D00A2F0FD00C2F0DD0092F0BD0AE +S11313E00B2F09D00D2F07D0002F05D040F2C511C7 +S11313F0DFF82C01FFF730F904F5A0603146C90786 +S1131400016801D5294300E0A943016004F20450B6 +S113141031468907016801D5294300E0A9430160E9 +S113142004F5A16031464907016801D5294300E06C +S1131430A943016004F5A3603107016801D529437C +S113144000E0A943016004F20C503946C907016861 +S113145001D5294300E0A943016004F5A26039469F +S11314608907016801D5294300E0A943016004F21A +S1131470145039464907016801D5294300E0A943BE +S1131480016004F21C5039460907016801D529435B +S113149000E0A943016004F5A560002F016801D1B3 +S11314A0294300E0A9430160F1BD38B504460D4667 +S11314B0FFF7FAFE002804D140F21F511848FFF745 +S11314C0CBF8022229462046FFF739FF08230122E0 +S11314D02946204601B0BDE830405CE70080054065 +S11314E000500040009005400060004000A005400E +S11314F00070004000B005400040024000C00540BC +S11315000050024000D005400060024000E0054069 +S11315100070024000F0054000D003400000064087 +S1131520041800000746384600F022F8FBE7FF00E5 +S113153080B50E480121017000F024F8BDE8014097 +S113154010B5FFF779FA01280FD0084C207801284C +S11315500BD100F036F8322807D30020207000F0B9 +S113156020F8BDE81040FFF769BA10BDE60400207A +S113157080B5C046C046024A11001820ABBEFBE746 +S11315802600020080B500F00CF811484CF24F31EF +S1131590416000218160052101600020BDE8024016 +S11315A00CE00B4800210160704709480068C00343 +S11315B003D508480188491C018070470549088003 +S11315C0704780B5FFF7F1FF0248008802BD0000B4 +S11315D010E000E0E404002010E00F4014E00F40AD +S11315E01CE00F4010E00F4040E00F4044E00F408B +S11315F048E00F4000E10F4004E10F4008E10F40D4 +S113160010E10F4014E10F4018E10F4020E10F40BA +S113161024E10F4028E10F4040420F0000201C004D +S113162080841E0000802500999E3600004038000A +S113163000093D0000803E0000004B00404B4C0080 +S113164000204E00808D5B0000C05D0000807000B3 +S113165000127A0000007D0080969800001BB700FD +S11316600080BB00C0E8CE00647ADA000024F400F5 +S11316700000FA00443A5C7573725C6665617365D8 +S1131680725C736F6674776172655C4F70656E42ED +S11316904C545C5461726765745C44656D6F5C4165 +S11316A0524D434D335F4C4D33535F454B5F4C4D6F +S11316B03353383936325F4941525C426F6F745C40 +S11316C06C69625C6472697665726C69625C737978 +S11316D07363746C2E63000000200000002000007F +S11316E00100000000400000002000000200000093 +S11316F000600000002000000300000000800000E3 +S1131700002000000400000000A0000000200000F1 +S11317100500000000C000000020000006000000DA +S113172000E00000002000000700000000000100AD +S1131730002000000800000000200100002000003C +S11317400900000000400100002000000A00000021 +S113175000600100002000000B0000000080010078 +S1131760002000000C00000000A001000020000088 +S11317700D00000000C00100002000000E00000069 +S113178000E00100002000000F0000000000020043 +S113179000800000100000000080020000800000B3 +S11317A0110000000000030000800000120000008F +S11317B0008003000080000013000000004000408F +S11317C0008005400050004000900540006000404B +S11317D000A005400070004000B0054000400240F9 +S11317E000C005400050024000D0054000600240A7 +S11317F000E005400070024000F0054000D00340C6 +S113180000000640443A5C7573725C6665617365FA +S1131810725C736F6674776172655C4F70656E425B +S11318204C545C5461726765745C44656D6F5C41D3 +S1131830524D434D335F4C4D33535F454B5F4C4DDD +S11318403353383936325F4941525C426F6F745CAE +S11318506C69625C6472697665726C69625C6770FB +S1131860696F2E630000000034E10F4004E40F4070 +S113187008E40F400CE40F4030E10F4004E20F4055 +S113188008E20F400CE20F40443A5C7573725C66E8 +S113189065617365725C736F6674776172655C4FC2 +S11318A070656E424C545C5461726765745C446547 +S11318B06D6F5C41524D434D335F4C4D33535F4527 +S11318C04B5F4C4D3353383936325F4941525C4299 +S11318D06F6F745C6C69625C6472697665726C6962 +S11318E0625C666C6173686C69622E630000000060 +S11318F0443A5C7573725C6665617365725C736FA0 +S11319006674776172655C4F70656E424C545C54CA +S113191061726765745C44656D6F5C41524D434D03 +S1131920335F4C4D33535F454B5F4C4D3353383924 +S113193036325F4941525C426F6F745C6C69625C21 +S11319406472697665726C69625C756172746C69E3 +S1131950622E6300443A5C7573725C6665617365FC +S1131960725C736F6674776172655C4F70656E420A +S11319704C545C5461726765745C536F7572636533 +S11319805C41524D434D335F4C4D33535C4941529E +S11319905C766563746F72732E630000443A5C7501 +S11319A073725C6665617365725C736F667477618C +S11319B072655C4F70656E424C545C54617267652D +S11319C0745C536F757263655C41524D434D335F74 +S11319D04C4D33535C756172742E63002FF7FFFF17 +S11319E0E80400000000002000000000402101483D +S11319F0FEF732BE54190000C046C046C046C04679 +S10F1A00FFF778FB4F70656E424C5400F9 +S90319F9EA diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/config.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/config.h new file mode 100644 index 00000000..d9af1a1c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/config.h @@ -0,0 +1,128 @@ +/**************************************************************************************** +| Description: bootloader configuration header file +| File Name: config.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef CONFIG_H +#define CONFIG_H + +/**************************************************************************************** +* C P U D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* To properly initialize the baudrate clocks of the communication interface, typically + * the speed of the crystal oscillator and/or the speed at which the system runs is + * needed. Set these through configurables BOOT_CPU_XTAL_SPEED_KHZ and + * BOOT_CPU_SYSTEM_SPEED_KHZ, respectively. To enable data exchange with the host that is + * not dependent on the targets architecture, the byte ordering needs to be known. + * Setting BOOT_CPU_BYTE_ORDER_MOTOROLA to 1 selects little endian mode and 0 selects + * big endian mode. + */ +#define BOOT_CPU_XTAL_SPEED_KHZ (8000) +#define BOOT_CPU_SYSTEM_SPEED_KHZ (50000) +#define BOOT_CPU_BYTE_ORDER_MOTOROLA (0) + + +/**************************************************************************************** +* C O M M U N I C A T I O N I N T E R F A C E C O N F I G U R A T I O N +****************************************************************************************/ +/* The CAN communication interface is selected by setting the BOOT_COM_CAN_ENABLE + * configurable to 1. Configurable BOOT_COM_CAN_BAUDRATE selects the communication speed + * in bits/second. Two CAN messages are reserved for communication with the host. The + * message identifier for sending data from the target to the host is configured with + * BOOT_COM_CAN_TXMSG_ID. The one for receiving data from the host is configured with + * BOOT_COM_CAN_RXMSG_ID. The maximum amount of data bytes in a message for data + * transmission and reception is set through BOOT_COM_CAN_TX_MAX_DATA and + * BOOT_COM_CAN_RX_MAX_DATA, respectively. It is common for a microcontroller to have more + * than 1 CAN controller on board. The zero-based BOOT_COM_CAN_CHANNEL_INDEX selects the + * CAN controller channel. + * + */ +#define BOOT_COM_CAN_ENABLE (0) +#define BOOT_COM_CAN_BAUDRATE (500000) +#define BOOT_COM_CAN_TX_MSG_ID (0x7E1) +#define BOOT_COM_CAN_TX_MAX_DATA (8) +#define BOOT_COM_CAN_RX_MSG_ID (0x667) +#define BOOT_COM_CAN_RX_MAX_DATA (8) +#define BOOT_COM_CAN_CHANNEL_INDEX (0) + +/* The UART communication interface is selected by setting the BOOT_COM_UART_ENABLE + * configurable to 1. Configurable BOOT_COM_UART_BAUDRATE selects the communication speed + * in bits/second. The maximum amount of data bytes in a message for data transmission + * and reception is set through BOOT_COM_UART_TX_MAX_DATA and BOOT_COM_UART_RX_MAX_DATA, + * respectively. It is common for a microcontroller to have more than 1 UART interface + * on board. The zero-based BOOT_COM_UART_CHANNEL_INDEX selects the UART interface. + * + */ +#define BOOT_COM_UART_ENABLE (1) +#define BOOT_COM_UART_BAUDRATE (57600) +#define BOOT_COM_UART_TX_MAX_DATA (64) +#define BOOT_COM_UART_RX_MAX_DATA (64) +#define BOOT_COM_UART_CHANNEL_INDEX (0) + + +/**************************************************************************************** +* B A C K D O O R E N T R Y C O N F I G U R A T I O N +****************************************************************************************/ +/* It is possible to implement an application specific method to force the bootloader to + * stay active after a reset. Such a backdoor entry into the bootloader is desired in + * situations where the user program does not run properly and therefore cannot + * reactivate the bootloader. By enabling these hook functions, the application can + * implement the backdoor, which overrides the default backdoor entry that is programmed + * into the bootloader. When desired for security purposes, these hook functions can + * also be implemented in a way that disables the backdoor entry altogether. + */ +#define BOOT_BACKDOOR_HOOKS_ENABLE (0) + + +/**************************************************************************************** +* N O N - V O L A T I L E M E M O R Y D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* The NVM driver typically supports erase and program operations of the internal memory + * present on the microcontroller. Through these hook functions the NVM driver can be + * extended to support additional memory types such as external flash memory and serial + * eeproms. The size of the internal memory in kilobytes is specified with configurable + * BOOT_NVM_SIZE_KB. + */ +#define BOOT_NVM_HOOKS_ENABLE (0) +#define BOOT_NVM_SIZE_KB (256) + + +/**************************************************************************************** +* W A T C H D O G D R I V E R C O N F I G U R A T I O N +****************************************************************************************/ +/* The COP driver cannot be configured internally in the bootloader, because its use + * and configuration is application specific. The bootloader does need to service the + * watchdog in case it is used. When the application requires the use of a watchdog, + * set BOOT_COP_HOOKS_ENABLE to be able to initialize and service the watchdog through + * hook functions. + */ +#define BOOT_COP_HOOKS_ENABLE (0) + + +#endif /* CONFIG_H */ +/*********************************** end of config.h ***********************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/hooks.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/hooks.c new file mode 100644 index 00000000..9b0be4a5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/hooks.c @@ -0,0 +1,179 @@ +/**************************************************************************************** +| Description: bootloader callback source file +| File Name: hooks.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "boot.h" /* bootloader generic header */ + + +/**************************************************************************************** +* B A C K D O O R E N T R Y H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_BACKDOOR_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: BackDoorInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the backdoor entry option. +** +****************************************************************************************/ +void BackDoorInitHook(void) +{ +} /*** end of BackDoorInitHook ***/ + + +/**************************************************************************************** +** NAME: BackDoorEntryHook +** PARAMETER: none +** RETURN VALUE: BLT_TRUE if the backdoor entry is requested, BLT_FALSE otherwise. +** DESCRIPTION: Checks if a backdoor entry is requested. +** +****************************************************************************************/ +blt_bool BackDoorEntryHook(void) +{ + /* default implementation always activates the bootloader after a reset */ + return BLT_TRUE; +} /*** end of BackDoorEntryHook ***/ +#endif /* BOOT_BACKDOOR_HOOKS_ENABLE > 0 */ + + +/**************************************************************************************** +* N O N - V O L A T I L E M E M O R Y D R I V E R H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_NVM_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: NvmInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the start of the internal NVM driver +** initialization routine. +** +****************************************************************************************/ +void NvmInitHook(void) +{ +} /*** end of NvmInitHook ***/ + + +/**************************************************************************************** +** NAME: NvmWriteHook +** PARAMETER: addr start address +** len length in bytes +** data pointer to the data buffer. +** RETURN VALUE: BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is +** not within the supported memory range, or BLT_NVM_ERROR is the write +** operation failed. +** DESCRIPTION: Callback that gets called at the start of the NVM driver write +** routine. It allows additional memory to be operated on. If the address +** is not within the range of the additional memory, then +** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the data hasn't +** been written yet. +** +** +****************************************************************************************/ +blt_int8u NvmWriteHook(blt_addr addr, blt_int32u len, blt_int8u *data) +{ + return BLT_NVM_NOT_IN_RANGE; +} /*** end of NvmWriteHook ***/ + + +/**************************************************************************************** +** NAME: NvmEraseHook +** PARAMETER: addr start address +** len length in bytes +** RETURN VALUE: BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is +** not within the supported memory range, or BLT_NVM_ERROR is the erase +** operation failed. +** DESCRIPTION: Callback that gets called at the start of the NVM driver erase +** routine. It allows additional memory to be operated on. If the address +** is not within the range of the additional memory, then +** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the memory +** hasn't been erased yet. +** +****************************************************************************************/ +blt_int8u NvmEraseHook(blt_addr addr, blt_int32u len) +{ + return BLT_NVM_NOT_IN_RANGE; +} /*** end of NvmEraseHook ***/ + + +/**************************************************************************************** +** NAME: NvmDoneHook +** PARAMETER: none +** RETURN VALUE: BLT_TRUE is successful, BLT_FALSE otherwise. +** DESCRIPTION: Callback that gets called at the end of the NVM programming session. +** +****************************************************************************************/ +blt_bool NvmDoneHook(void) +{ + return BLT_TRUE; +} /*** end of NvmDoneHook ***/ +#endif /* BOOT_NVM_HOOKS_ENABLE > 0 */ + + +/**************************************************************************************** +* W A T C H D O G D R I V E R H O O K F U N C T I O N S +****************************************************************************************/ + +#if (BOOT_COP_HOOKS_ENABLE > 0) +/**************************************************************************************** +** NAME: CopInitHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the end of the internal COP driver +** initialization routine. It can be used to configure and enable the +** watchdog. +** +****************************************************************************************/ +void CopInitHook(void) +{ +} /*** end of CopInitHook ***/ + + +/**************************************************************************************** +** NAME: CopServiceHook +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Callback that gets called at the end of the internal COP driver +** service routine. This gets called upon initialization and during +** potential long lasting loops and routine. It can be used to service +** the watchdog to prevent a watchdog reset. +** +****************************************************************************************/ +void CopServiceHook(void) +{ +} /*** end of CopServiceHook ***/ +#endif /* BOOT_COP_HOOKS_ENABLE > 0 */ + + +/*********************************** end of hooks.c ************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.dep b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.dep new file mode 100644 index 00000000..1d828323 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.dep @@ -0,0 +1,731 @@ + + + + 2 + 859182976 + + Debug + + $PROJ_DIR$\..\lib\driverlib\cpulib.c + $PROJ_DIR$\..\lib\driverlib\canlib.c + $PROJ_DIR$\..\lib\driverlib\debug.h + $PROJ_DIR$\..\lib\driverlib\flashlib.h + $PROJ_DIR$\..\lib\driverlib\cpulib.h + $PROJ_DIR$\..\lib\driverlib\flashlib.c + $PROJ_DIR$\..\lib\driverlib\canlib.h + $PROJ_DIR$\..\lib\driverlib\gpio.c + $PROJ_DIR$\..\lib\driverlib\gpio.h + $PROJ_DIR$\..\lib\driverlib\interrupt.c + $PROJ_DIR$\..\lib\driverlib\interrupt.h + $PROJ_DIR$\..\lib\driverlib\sysctl.c + $PROJ_DIR$\..\lib\driverlib\sysctl.h + $PROJ_DIR$\..\lib\driverlib\uartlib.c + $PROJ_DIR$\..\lib\driverlib\uartlib.h + $PROJ_DIR$\..\lib\inc\hw_can.h + $PROJ_DIR$\..\lib\inc\hw_flash.h + $PROJ_DIR$\..\lib\inc\hw_gpio.h + $PROJ_DIR$\..\lib\inc\hw_ints.h + $PROJ_DIR$\..\lib\inc\hw_memmap.h + $PROJ_DIR$\..\lib\inc\hw_nvic.h + $PROJ_DIR$\..\lib\inc\hw_sysctl.h + $PROJ_DIR$\..\lib\inc\hw_types.h + $PROJ_DIR$\..\lib\inc\hw_uart.h + $PROJ_DIR$\..\config.h + $PROJ_DIR$\..\hooks.c + $PROJ_DIR$\..\main.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.h + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.h + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.h + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.h + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.h + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\types.h + $PROJ_DIR$\..\..\..\..\Source\assert.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.c + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.h + $PROJ_DIR$\..\..\..\..\Source\assert.h + $PROJ_DIR$\..\..\..\..\Source\backdoor.c + $PROJ_DIR$\..\..\..\..\Source\backdoor.h + $PROJ_DIR$\..\..\..\..\Source\boot.c + $PROJ_DIR$\..\..\..\..\Source\boot.h + $PROJ_DIR$\..\..\..\..\Source\com.c + $PROJ_DIR$\..\..\..\..\Source\com.h + $PROJ_DIR$\..\..\..\..\Source\cop.c + $PROJ_DIR$\..\..\..\..\Source\cop.h + $PROJ_DIR$\..\..\..\..\Source\xcp.c + $PROJ_DIR$\..\..\..\..\Source\plausibility.h + $PROJ_DIR$\..\..\..\..\Source\xcp.h + $TOOLKIT_DIR$\lib\shb_l.a + $PROJ_DIR$\..\obj\main.o + $PROJ_DIR$\..\obj\boot.o + $PROJ_DIR$\..\obj\backdoor.pbi + $PROJ_DIR$\..\obj\com.o + $PROJ_DIR$\..\obj\com.pbi + $PROJ_DIR$\..\obj\cop.o + $PROJ_DIR$\..\obj\backdoor.o + $PROJ_DIR$\..\obj\xcp.o + $PROJ_DIR$\..\obj\assert.pbi + $PROJ_DIR$\..\obj\cop.pbi + $PROJ_DIR$\..\obj\xcp.pbi + $PROJ_DIR$\..\obj\xcp.lst + $PROJ_DIR$\..\obj\nvm.lst + $PROJ_DIR$\..\obj\nvm.o + $PROJ_DIR$\..\obj\cpu.o + $PROJ_DIR$\..\obj\flash.o + $PROJ_DIR$\..\obj\gpio.lst + $PROJ_DIR$\..\obj\cpulib.lst + $PROJ_DIR$\..\obj\flashlib.lst + $PROJ_DIR$\..\obj\interrupt.lst + $PROJ_DIR$\..\obj\sysctl.lst + $PROJ_DIR$\..\obj\uartlib.lst + $PROJ_DIR$\..\obj\cpulib.o + $PROJ_DIR$\..\obj\flashlib.o + $PROJ_DIR$\..\obj\gpio.o + $PROJ_DIR$\..\obj\interrupt.o + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\memory.x + $PROJ_DIR$\..\obj\sysctl.o + $PROJ_DIR$\..\obj\uartlib.o + $PROJ_DIR$\..\obj\flashlib.pbi + $PROJ_DIR$\..\obj\cpulib.pbi + $PROJ_DIR$\..\obj\gpio.pbi + $PROJ_DIR$\..\obj\interrupt.pbi + $PROJ_DIR$\..\obj\sysctl.pbi + $PROJ_DIR$\..\obj\uartlib.pbi + $PROJ_DIR$\..\obj\uart.o + $PROJ_DIR$\..\obj\flash.pbi + $PROJ_DIR$\..\obj\cpu.pbi + $PROJ_DIR$\..\obj\nvm.pbi + $PROJ_DIR$\..\obj\uart.pbi + $PROJ_DIR$\..\obj\lm3s6965.pbd + $PROJ_DIR$\..\obj\cstart.o + $PROJ_DIR$\..\obj\vectors.o + $PROJ_DIR$\..\obj\timer.o + $PROJ_DIR$\..\obj\boot.pbi + $PROJ_DIR$\..\obj\main.pbi + $PROJ_DIR$\..\obj\timer.pbi + $PROJ_DIR$\..\obj\vectors.pbi + $PROJ_DIR$\..\obj\boot.lst + $PROJ_DIR$\..\obj\vectors.lst + $PROJ_DIR$\..\obj\main.lst + $PROJ_DIR$\..\obj\timer.lst + $TOOLKIT_DIR$\lib\m7M_tl.a + $PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.srec + $PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.out + $PROJ_DIR$\..\obj\hooks.lst + $PROJ_DIR$\..\obj\assert.o + $PROJ_DIR$\..\obj\assert.lst + $PROJ_DIR$\..\obj\flash.lst + $PROJ_DIR$\..\obj\backdoor.lst + $PROJ_DIR$\..\obj\hooks.pbi + $PROJ_DIR$\..\obj\hooks.o + $PROJ_DIR$\..\obj\cpu.lst + $PROJ_DIR$\..\obj\uart.lst + $PROJ_DIR$\..\obj\cop.lst + $PROJ_DIR$\..\obj\com.lst + $TOOLKIT_DIR$\lib\dl7M_tln.a + $TOOLKIT_DIR$\lib\rt7M_tl.a + $PROJ_DIR$\..\obj\canlib.pbi + $PROJ_DIR$\..\obj\can.o + $PROJ_DIR$\..\obj\canlib.o + $PROJ_DIR$\..\obj\lm3s8962.pbd + $PROJ_DIR$\..\obj\can.pbi + $PROJ_DIR$\..\obj\canlib.lst + $PROJ_DIR$\..\obj\can.lst + $PROJ_DIR$\..\obj\openbtl_ek_lm3s8962.map + $PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.srec + $PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.out + + + [ROOT_NODE] + + + ILINK + 133 131 + + + + + $PROJ_DIR$\..\lib\driverlib\cpulib.c + + + ICCARM + 73 78 + + + BICOMP + 86 + + + + + ICCARM + 4 + + + BICOMP + 4 + + + + + $PROJ_DIR$\..\lib\driverlib\canlib.c + + + ICCARM + 129 126 + + + BICOMP + 124 + + + + + ICCARM + 15 18 20 19 22 6 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 + + + BICOMP + 15 18 20 19 22 6 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 + + + + + $PROJ_DIR$\..\lib\driverlib\flashlib.c + + + ICCARM + 74 79 + + + BICOMP + 85 + + + + + ICCARM + 16 18 21 22 2 47 39 43 24 53 33 51 37 34 38 45 49 54 3 10 + + + BICOMP + 16 18 21 22 2 47 39 43 24 53 33 51 37 34 38 45 49 54 3 10 + + + + + $PROJ_DIR$\..\lib\driverlib\gpio.c + + + ICCARM + 72 80 + + + BICOMP + 87 + + + + + ICCARM + 17 18 19 21 22 2 47 39 43 24 53 33 51 37 34 38 45 49 54 8 10 + + + BICOMP + 17 18 19 21 22 2 47 39 43 24 53 33 51 37 34 38 45 49 54 8 10 + + + + + $PROJ_DIR$\..\lib\driverlib\interrupt.c + + + ICCARM + 75 81 + + + BICOMP + 88 + + + + + ICCARM + 18 20 22 4 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 + + + BICOMP + 18 20 22 4 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 + + + + + $PROJ_DIR$\..\lib\driverlib\sysctl.c + + + ICCARM + 76 83 + + + BICOMP + 89 + + + + + ICCARM + 18 20 21 22 4 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 12 + + + BICOMP + 18 20 21 22 4 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 12 + + + + + $PROJ_DIR$\..\lib\driverlib\uartlib.c + + + ICCARM + 77 84 + + + BICOMP + 90 + + + + + ICCARM + 18 19 21 22 23 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 14 12 + + + BICOMP + 18 19 21 22 23 2 47 39 43 24 53 33 51 37 34 38 45 49 54 10 14 12 + + + + + $PROJ_DIR$\..\hooks.c + + + ICCARM + 111 117 + + + BICOMP + 116 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\main.c + + + ICCARM + 106 56 + + + BICOMP + 101 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 18 19 20 21 22 12 8 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 18 19 20 21 22 12 8 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s + + + AARM + 97 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c + + + ICCARM + 114 71 + + + BICOMP + 92 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 3 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 3 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c + + + ICCARM + 105 98 + + + BICOMP + 103 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c + + + ICCARM + 130 125 + + + BICOMP + 128 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c + + + ICCARM + 118 70 + + + BICOMP + 93 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c + + + ICCARM + 107 99 + + + BICOMP + 102 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.c + + + ICCARM + 68 69 + + + BICOMP + 94 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\assert.c + + + ICCARM + 113 112 + + + BICOMP + 64 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.c + + + ICCARM + 119 91 + + + BICOMP + 95 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 12 14 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 19 22 12 14 + + + + + $PROJ_DIR$\..\..\..\..\Source\backdoor.c + + + ICCARM + 115 62 + + + BICOMP + 58 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\boot.c + + + ICCARM + 104 57 + + + BICOMP + 100 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\com.c + + + ICCARM + 121 59 + + + BICOMP + 60 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 42 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 42 + + + + + $PROJ_DIR$\..\..\..\..\Source\cop.c + + + ICCARM + 120 61 + + + BICOMP + 65 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\..\..\..\Source\xcp.c + + + ICCARM + 67 63 + + + BICOMP + 66 + + + + + ICCARM + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + BICOMP + 47 39 43 24 53 33 51 37 34 38 45 49 54 + + + + + $PROJ_DIR$\..\obj\lm3s6965.pbd + + + BILINK + 64 58 100 60 65 93 86 92 85 87 116 88 101 94 89 102 95 90 103 66 + + + + + $PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.out + + + OBJCOPY + 109 + + + + + ILINK + 82 112 62 57 59 61 70 78 97 71 79 80 117 81 56 69 83 99 91 84 98 63 55 123 108 122 + + + + + $PROJ_DIR$\..\obj\lm3s8962.pbd + + + BILINK + 64 58 100 128 124 60 65 93 86 92 85 87 116 88 101 94 89 102 95 90 103 66 + + + + + $PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.out + + + ILINK + 131 + + + OBJCOPY + 132 + + + + + ILINK + 82 112 62 57 125 126 59 61 70 78 97 71 79 80 117 81 56 69 83 99 91 84 98 63 55 123 108 122 + + + + + + Release + + + [MULTI_TOOL] + ILINK + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewd b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewd new file mode 100644 index 00000000..b3ebc2d2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewd @@ -0,0 +1,1907 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + JLINK_ID + 2 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + RDIJTAGJET_ID + 0 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 0 + 1 + 1 + + + + + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + JLINK_ID + 2 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + RDIJTAGJET_ID + 0 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 0 + 1 + 0 + + + + + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewp b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewp new file mode 100644 index 00000000..a6f51ec8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.ewp @@ -0,0 +1,2012 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 21 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 21 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Boot + + lib + + driverlib + + $PROJ_DIR$\..\lib\driverlib\canlib.c + + + $PROJ_DIR$\..\lib\driverlib\canlib.h + + + $PROJ_DIR$\..\lib\driverlib\cpulib.c + + + $PROJ_DIR$\..\lib\driverlib\cpulib.h + + + $PROJ_DIR$\..\lib\driverlib\debug.h + + + $PROJ_DIR$\..\lib\driverlib\flashlib.c + + + $PROJ_DIR$\..\lib\driverlib\flashlib.h + + + $PROJ_DIR$\..\lib\driverlib\gpio.c + + + $PROJ_DIR$\..\lib\driverlib\gpio.h + + + $PROJ_DIR$\..\lib\driverlib\interrupt.c + + + $PROJ_DIR$\..\lib\driverlib\interrupt.h + + + $PROJ_DIR$\..\lib\driverlib\sysctl.c + + + $PROJ_DIR$\..\lib\driverlib\sysctl.h + + + $PROJ_DIR$\..\lib\driverlib\uartlib.c + + + $PROJ_DIR$\..\lib\driverlib\uartlib.h + + + + inc + + $PROJ_DIR$\..\lib\inc\hw_can.h + + + $PROJ_DIR$\..\lib\inc\hw_flash.h + + + $PROJ_DIR$\..\lib\inc\hw_gpio.h + + + $PROJ_DIR$\..\lib\inc\hw_ints.h + + + $PROJ_DIR$\..\lib\inc\hw_memmap.h + + + $PROJ_DIR$\..\lib\inc\hw_nvic.h + + + $PROJ_DIR$\..\lib\inc\hw_sysctl.h + + + $PROJ_DIR$\..\lib\inc\hw_types.h + + + $PROJ_DIR$\..\lib\inc\hw_uart.h + + + + + $PROJ_DIR$\..\config.h + + + $PROJ_DIR$\..\hooks.c + + + $PROJ_DIR$\..\main.c + + + + Source + + ARMCM3_LM3S + + IAR + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c + + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\types.h + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.c + + + $PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.h + + + + $PROJ_DIR$\..\..\..\..\Source\assert.c + + + $PROJ_DIR$\..\..\..\..\Source\assert.h + + + $PROJ_DIR$\..\..\..\..\Source\backdoor.c + + + $PROJ_DIR$\..\..\..\..\Source\backdoor.h + + + $PROJ_DIR$\..\..\..\..\Source\boot.c + + + $PROJ_DIR$\..\..\..\..\Source\boot.h + + + $PROJ_DIR$\..\..\..\..\Source\com.c + + + $PROJ_DIR$\..\..\..\..\Source\com.h + + + $PROJ_DIR$\..\..\..\..\Source\cop.c + + + $PROJ_DIR$\..\..\..\..\Source\cop.h + + + $PROJ_DIR$\..\..\..\..\Source\plausibility.h + + + $PROJ_DIR$\..\..\..\..\Source\xcp.c + + + $PROJ_DIR$\..\..\..\..\Source\xcp.h + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.eww b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.eww new file mode 100644 index 00000000..c61cab19 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/lm3s8962.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\lm3s8962.ewp + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/readme.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/readme.txt new file mode 100644 index 00000000..59a79281 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/readme.txt @@ -0,0 +1,4 @@ +Integrated Development Environment +---------------------------------- +IAR Embedded Workbench for ARM v6.30 was used as the editor during the development of this software program. This directory contains +the Embedded Workbench project and worksapce files. More info is available at: http://www.iar.com/ \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.cspy.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.cspy.bat new file mode 100644 index 00000000..35cfb983 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.cspy.bat @@ -0,0 +1,15 @@ +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. +@REM +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM + + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armlmiftdi.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armbat.dll" --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\config\flashloader\TexasInstruments\FlashLM3Sx8xx.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\CONFIG\debugger\TexasInstruments\iolm3sxxxx.ddf" "--drv_verify_download" "--semihosting" "--device=LM3Sx9xx" "--lmiftdi_speed=500" + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dbgdt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dbgdt new file mode 100644 index 00000000..be7c13df --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dbgdt @@ -0,0 +1,97 @@ + + + + + + + + + 201541 + + + + + + 20115530877 + + + + + + + 124272727 + + + + + + Disassembly_I0 + + + + 50020 + + + + 00 + + + + + + + + + TabID-23054-22949 + Debug Log + Debug-Log + + + + TabID-22531-22959 + Build + Build + + + + + 0 + + + TabID-1035-22952 + Workspace + Workspace + + + lm3s8962 + + + + 0 + + + TabID-11783-22956 + Disassembly + Disassembly + + + + + 0 + + + + + + TextEditor$WS_DIR$\..\main.c042285528550TextEditor$WS_DIR$\..\config.h051376337630100000010000001 + + + + + + + iaridepm.enu1debuggergui.enu1-2-2563198-2-2200200125000240964125000680723-2-2563198-2-2200200125000240964125000680723-2-21981602-2-216042001002500240964125000240964 + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dni b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dni new file mode 100644 index 00000000..97277fa8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.dni @@ -0,0 +1,41 @@ +[Stack] +FillEnabled=0 +OverflowWarningsEnabled=1 +WarningThreshold=90 +SpWarningsEnabled=1 +WarnLogOnly=1 +UseTrigger=1 +TriggerName=main +LimitSize=0 +ByteLimit=50 +[DebugChecksum] +Checksum=-605894321 +[Exceptions] +StopOnUncaught=_ 0 +StopOnThrow=_ 0 +[CallStack] +ShowArgs=0 +[Disassembly] +MixedMode=1 +[Log file] +LoggingEnabled=_ 0 +LogFile=_ "" +Category=_ 0 +[TermIOLog] +LoggingEnabled=_ 0 +LogFile=_ "" +[CallStackLog] +Enabled=0 +[DriverProfiling] +Enabled=0 +Mode=0 +Graph=0 +Symbiont=0 +Exclusions= +[Disassemble mode] +mode=0 +[Breakpoints] +Count=0 +[Aliases] +Count=0 +SuppressDialog=0 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.wsdt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.wsdt new file mode 100644 index 00000000..40cc19df --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/ide/settings/lm3s8962.wsdt @@ -0,0 +1,67 @@ + + + + + + lm3s8962/Debug + + + + + + + + + 267272727 + + + + + + + 20115530877 + + + + + + + + + TabID-17931-22022 + Workspace + Workspace + + + lm3s8962lm3s8962/Bootlm3s8962/Outputlm3s8962/Sourcelm3s8962/Source/ARMCM3_LM3S + + + + 0 + + + TabID-24560-22511 + Build + Build + + + + + 0 + + + + + + TextEditor$WS_DIR$\..\main.c04224212421TextEditor$WS_DIR$\..\config.h0513923392310100000010000001 + + + + + + + iaridepm.enu1-2-2587358-2-2200200125000240964225000709639-2-21981602-2-216042001002500240964125000240964 + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/EULA.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/EULA.txt new file mode 100644 index 00000000..7c1cfc7a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/EULA.txt @@ -0,0 +1,400 @@ +License Agreement + +Important - This is a legally binding agreement. Read it carefully. After you +read the following terms, you will be asked whether you are authorized to +commit your company to abide by the following terms. THIS AGREEMENT IS +DISPLAYED FOR YOU TO READ PRIOR TO DOWNLOADING OR USING THE "LICENSED +MATERIALS". + +DO NOT DOWNLOAD OR INSTALL the software programs unless you agree on behalf of +yourself and your company to be bound by the terms of this License Agreement. + +DO NOT CLICK "I AGREE" UNLESS: + +1. YOU ARE AUTHORIZED TO AGREE TO THE TERMS OF THIS LICENSE ON BEHALF OF +YOURSELF AND YOUR COMPANY; AND + +2. YOU INTEND TO ENTER THIS LEGALLY BINDING AGREEMENT ON BEHALF OF YOURSELF AND +YOUR COMPANY. + +Important - Read carefully: This software license agreement ("Agreement") is a +legal agreement between you (either an individual or entity) and Texas +Instruments Incorporated ("TI"). The "Licensed Materials" subject to this +Agreement include the software programs TI has granted you access to download +and any "on-line" or electronic documentation associated with these programs, +or any portion thereof, and may also include hardware, reference designs and +associated documentation. The Licensed Materials are specifically designed and +licensed for use solely and exclusively with microprocessor/microcontroller +devices manufactured by or for TI ("TI Devices"). By installing, copying or +otherwise using the Licensed Materials you agree to abide by the provisions set +forth herein. This Agreement is displayed for you to read prior to using the +Licensed Materials. If you choose not to accept or agree with these provisions, +do not download or install the Licensed Materials. + +1. Delivery. TI may deliver the Licensed Materials, or portions thereof, to you +electronically. + +2. License Grant and Use Restrictions. + +a. Limited Source Code License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a limited, free, non-transferable, +non-exclusive, non-assignable, non-sub-licensable license to make copies, +prepare derivative works, display internally and use internally the Licensed +Materials provided to you in source code for the sole purposes of designing and +developing object and executable versions of such Licensed Materials or any +derivative thereof, that execute solely and exclusively on TI Devices used in +Customer Product(s), and maintaining and supporting such Licensed Materials, or +any derivative thereof, and Customer Product(s). "Customer Product" means a +final product distributed by or for you that consists of both hardware, +including one or more TI Devices, and software components, including only +executable versions of the Licensed Materials that execute solely and +exclusively on or with such TI Devices and not on devices manufactured by or +for an entity other than TI. + +b. Production and Distribution License. Subject to the terms of this Agreement, +and commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-exclusive, non-transferable, +non-assignable, worldwide license to: + +(i). Use object code versions of the Licensed Materials, or any derivative +thereof, to make copies, display internally, evaluate, test, distribute +internally and use internally for the sole purposes of designing and developing +Customer Product(s), and maintaining and supporting the Licensed Materials and +Customer Product(s); + +(ii). Make copies, use, sell, offer to sell, and otherwise distribute object +code and executable versions of the Licensed Materials, or any derivative +thereof, for use in or with Customer Product(s), provided that such Licensed +Materials are embedded in or only used with Customer Product(s), and provided +further that such Licensed Materials execute solely and exclusively on a TI +Device and not on any device manufactured by or for an entity other than TI. + +c. Demonstration License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to demonstrate to third +parties the Licensed Materials as they are used in Customer Products executing +solely and exclusively on TI Devices, provided that such Licensed Materials are +demonstrated in object or executable versions only. + +d. Reference Design Use License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to: + +(i). use the Licensed Materials to design, develop, manufacture or have +manufactured, sell, offer to sell, or otherwise distribute Customer Product(s) +or product designs, including portions or derivatives of the Licensed Materials +as they are incorporated in or used with Customer Product(s), provided such +Customer Products or product designs utilize a TI Device. + +e. Contractors and Suppliers. The licenses granted to you hereunder shall +include your on-site and off-site suppliers and independent contractors, while +such suppliers and independent contractors are performing work for or providing +services to you, provided that such suppliers and independent contractors have +executed work-for-hire agreements with you containing terms and conditions not +inconsistent with the terms and conditions set forth is this Agreement and +provided further that such contractors may provide work product to only you +under such work-for-hire agreements. + +f. No Other License. Notwithstanding anything to the contrary, nothing in this +Agreement shall be construed as a license to any intellectual property rights +of TI other than those rights embodied in the Licensed Materials provided to +you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY +ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED +HEREIN. + +g. Restrictions. You shall maintain the source code versions of the Licensed +Materials under password control protection and shall not disclose such source +code versions of the Licensed Materials, or any derivative thereof, to any +person other than your employees and contractors whose job performance requires +access. You shall not use the Licensed Materials with a processing device +manufactured by or for an entity other than TI, and you agree that any such +unauthorized use of the Licensed Materials is a material breach of this +Agreement. Except as expressly provided in this Agreement, you shall not copy, +publish, disclose, display, provide, transfer or make available the Licensed +Materials to any third party and you shall not sublicense, transfer, or assign +the Licensed Materials or your rights under this Agreement to any third party. +You shall not mortgage, pledge or encumber the Licensed Materials in any way. +You shall not (i) incorporate, combine, or distribute the Licensed Materials, +or any derivative thereof, with any Public Software, or (ii) use Public +Software in the development of any derivatives of the Licensed Materials, each +in such a way that would cause the Licensed Materials, or any derivative +thereof, to be subject to all or part of the license obligations or other +intellectual property related terms with respect to such Public Software, +including but not limited to, the obligations that the Licensed Materials, or +any derivative thereof, incorporated into, combined, or distributed with such +Public Software (x) be disclosed or distributed in source code form, be +licensed for the purpose of making derivatives of such software, or be +redistributed free of charge, contrary to the terms and conditions of this +Agreement, (y) be used with devices other than TI Devices, or (z) be otherwise +used or distributed in a manner contrary to the terms and conditions of this +Agreement. As used in this Section 2(g), "Public Software" means any software +that contains, or is derived in whole or in part from, any software distributed +as open source software, including but not limited to software licensed under +the following or similar models: (A) GNU's General Public License (GPL) or +Lesser/Library GPL (LGPL), (B) the Artistic License (e.g., PERL), (C) the +Mozilla Public License, (D) the Netscape Public License, (E) the Sun Community +Source License (SCSL), (F) the Sun Industry Standards Source License (SISL), +(G) the Apache Server license, (H) QT Free Edition License, (I) IBM Public +License, and (J) BitKeeper. + +h. Termination. This Agreement is effective until terminated. You may terminate +this Agreement at any time by written notice to TI. Without prejudice to any +other rights, if you fail to comply with the terms of this Agreement, TI may +terminate your right to use the Licensed Materials upon written notice to you. +Upon termination of this Agreement, you will destroy any and all copies of the +Licensed Materials in your possession, custody or control and provide to TI a +written statement signed by your authorized representative certifying such +destruction. The following sections will survive any expiration or termination +of this Agreement: 2(h) (Termination), 3 (Licensed Materials Ownership), 6 +(Warranties and Limitations), 7 (Indemnification Disclaimer), 10 (Export +Control), 11 (Governing Law and Severability), 12 (PRC Provisions), and 13 +(Entire Agreement). The obligations set forth in Section 5 (Confidential +Information) will survive any expiration or termination of this Agreement for +three (3) years after such expiration or termination. + +3. Licensed Materials Ownership. The Licensed Materials are licensed, not sold +to you, and can only be used in accordance with the terms of this Agreement. +Subject to the licenses granted to you pursuant to this Agreement, TI and TI's +licensors own and shall continue to own all right, title, and interest in and +to the Licensed Materials, including all copies thereof. The parties agree that +all fixes, modifications and improvements to the Licensed Materials conceived +of or made by TI that are based, either in whole or in part, on your feedback, +suggestions or recommendations are the exclusive property of TI and all right, +title and interest in and to such fixes, modifications or improvements to the +Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree +that when your independently developed software or hardware components are +combined, in whole or in part, with the Licensed Materials, your right to use +the Licensed Materials embodied in such resulting combined work shall remain +subject to the terms and conditions of this Agreement. + +4. Intellectual Property Rights. + +a. The Licensed Materials contain copyrighted material, trade secrets and other +proprietary information of TI and TI's licensors and are protected by copyright +laws, international copyright treaties, and trade secret laws, as well as other +intellectual property laws. To protect TI's and TI's licensors' rights in the +Licensed Materials, you agree, except as specifically permitted by statute by a +provision that cannot be waived by contract, not to "unlock", decompile, +reverse engineer, disassemble or otherwise translate any portions of the +Licensed Materials to a human-perceivable form nor to permit any person or +entity to do so. You shall not remove, alter, cover, or obscure any +confidentiality, trade secret, proprietary, or copyright notices, trade-marks, +proprietary, patent, or other identifying marks or designs from any component +of the Licensed Materials and you shall reproduce and include in all copies of +the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI +and TI's licensors as they appear in the Licensed Materials. TI reserves all +rights not specifically granted under this Agreement. + +b. Third parties may claim to own patents, copyrights, or other intellectual +property rights that cover the implementation of certain Licensed Materials. +Certain Licensed Materials may also be based on industry recognized standards, +including but not limited to specifically the ISO MPEG and ITU standards, and +software programs published by industry recognized standards bodies and certain +third parties claim to own patents, copyrights, and other intellectual property +rights that cover implementation of those standards. You acknowledge and agree +that this Agreement does not convey a license to any such third party patents, +copyrights, and other intellectual property rights and that you are solely +responsible for any patent, copyright, or other intellectual property right +claims that relate to your use and distribution of the Licensed Materials, and +your use and distribution of your products that include or incorporate the +Licensed Materials. + +5. Confidential Information. You acknowledge and agree that the Licensed +Materials contain trade secrets and other confidential information of TI and +TI's licensors. You agree to use the Licensed Materials solely within the scope +of the licenses set forth herein, to maintain the Licensed Materials in strict +confidence, to use at least the same procedures and degree of care that you use +to prevent disclosure of your own confidential information of like importance +but in no instance less than reasonable care, and to prevent disclosure of the +Licensed Materials to any third party, except as may be necessary and required +in connection with your rights and obligations hereunder. You agree to obtain +executed confidentiality agreements with your employees and contractors having +access to the Licensed Materials and to diligently take steps to enforce such +agreements in this respect. TI agrees that the employment agreements used in +the normal course of your business shall satisfy the requirements of this +section. TI may disclose your contact information to TI's applicable licensors. + +6. Warranties and Limitations. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED +MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN +IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU +ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR +CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY +OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR +DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU +WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED +MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR +FAILURES. + +THE LICENSED MATERIALS AND ANY REALTED DOCUMENTATION ARE PROVIDED "AS IS" AND +WITH ALL FAULTS. TI MAKES NO WARRANTY OR REPRESENTATION, WHETHER EXPRESS, +IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT +LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, +RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET +ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, +COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO +USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN +THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO +MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR +SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED. + +IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL, +INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY +THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE +USE OF THE LICENSED MATERIALS, REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, +COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF +DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR +INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS +AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE +HUNDRED U.S. DOLLARS (US$500). THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT +ENLARGE OR EXTEND THESE LIMITS. + +Because some jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages or limitation on how long an implied +warranty lasts, the above limitations or exclusions may not apply to you. + +7. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE +LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY +INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR +DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR +SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR +INCORPORATE THE LICENSED MATERIALS. + +You will defend and indemnify TI in the event of claim, liability or costs +(including reasonable attorney's fees related to Your use or any sub-licensee's +use of the Licensed Materials) relating in any way to Your violation of the +terms of the License Grants set forth in Section 2, or any other violation of +other terms and conditions of this Agreement. + +8. No Technical Support. TI and TI's licensors are under no obligation to +install, maintain or support the Licensed Materials. + +9. Notices. All notices to TI hereunder shall be delivered to Texas Instruments +Incorporated, AEC Software Operations, 12203 Southwest Freeway, Mail Station +701, Stafford, Texas 77477, Attention: Administrator, AEC Software Operations, +with a copy to Texas Instruments Incorporated, 12203 Southwest Freeway, Mail +Station 725, Stafford, Texas 77477, Attention: Legal Department. All notices +shall be deemed served when received by TI. + +10. Export Control. You hereby acknowledge that the Licensed Materials are +subject to export control under the U.S. Commerce Department's Export +Administration Regulations ("EAR"). You further hereby acknowledge and agree +that unless prior authorization is obtained from the U.S. Commerce Department, +neither you nor your customers will export, re-export, or release, directly or +indirectly, any technology, software, or software source code (as defined in +Part 772 of the EAR), received from TI, or export, directly or indirectly, any +direct product of such technology, software, or software source code (as +defined in Part 734 of the EAR), to any destination or country to which the +export, re-export, or release of the technology, software, or software source +code, or direct product is prohibited by the EAR. You agree that none of the +Licensed Materials may be downloaded or otherwise exported or reexported (i) +into (or to a national or resident of) Cuba, Iran, North Korea, Sudan and Syria +or any other country the U.S. has embargoed goods; or (ii) to anyone on the +U.S. Treasury Department's List of Specially Designated Nationals or the U.S. +Commerce Department's Denied Persons List or Entity List. You represent and +warrant that you are not located in, under the control of, or a national or +resident of any such country or on any such list and you will not use or +transfer the Licensed Materials for use in any sensitive nuclear, chemical or +biological weapons, or missile technology end-uses unless authorized by the +U.S. Government by regulation or specific license or for a military end-use in, +or by any military entity of Albania, Armenia, Azerbaijan, Belarus, Cambodia, +China, Georgia, Iran, Iraq, Kazakhstan, Kyrgyzstan, Laos, Libya, Macau, +Moldova, Mongolia, Russia, Tajikistan, Turkmenistan, Ukraine, Uzbekistan, and +Vietnam. Any software export classification made by TI shall be for TI's +internal use only and shall not be construed as a representation or warranty +regarding the proper export classification for such software or whether an +export license or other documentation is required for the exportation of such +software. + +11. Governing Law and Severability. This Agreement will be governed by and +interpreted in accordance with the laws of the State of Texas, without +reference to conflict of laws principles. If for any reason a court of +competent jurisdiction finds any provision of the Agreement to be +unenforceable, that provision will be enforced to the maximum extent possible +to effectuate the intent of the parties, and the remainder of the Agreement +shall continue in full force and effect. This Agreement shall not be governed +by the United Nations Convention on Contracts for the International Sale of +Goods, or by the Uniform Computer Information Transactions Act (UCITA), as it +may be enacted in the State of Texas. The parties agree that non-exclusive +jurisdiction for any dispute arising out of or relating to this Agreement lies +within the courts located in the State of Texas. Notwithstanding the foregoing, +any judgment may be enforced in any United States or foreign court, and either +party may seek injunctive relief in any United States or foreign court. + +12. PRC Provisions. If you are located in the People's Republic of China +("PRC") or if the Licensed Materials will be sent to the PRC, the following +provisions shall apply and shall supersede any other provisions in this +Agreement concerning the same subject matter as the following provisions: + +a. Registration Requirements. You shall be solely responsible for performing +all acts and obtaining all approvals that may be required in connection with +this Agreement by the government of the PRC, including but not limited to +registering pursuant to, and otherwise complying with, the PRC Measures on the +Administration of Software Products, Management Regulations on Technology +Import-Export, and Technology Import and Export Contract Registration +Management Rules. Upon receipt of such approvals from the government +authorities, you shall forward evidence of all such approvals to TI for its +records. In the event that you fail to obtain any such approval or +registration, you shall be solely responsible for any and all losses, damages +or costs resulting therefrom, and shall indemnify TI for all such losses, +damages or costs. + +b. Governing Language. This Agreement is written and executed in the English +language. If a translation of this Agreement is required for any purpose, +including but not limited to registration of the Agreement pursuant to any +governmental laws, regulations or rules, you shall be solely responsible for +creating such translation. Any translation of this Agreement into a language +other than English is intended solely in order to comply with such laws or for +reference purposes, and the English language version shall be authoritative and +controlling. + +c. Export Control. + +(i). Diversions of Technology. You hereby agree that unless prior authorization +is obtained from the U.S. Department of Commerce, neither you nor your +subsidiaries or affiliates shall knowingly export, re-export, or release, +directly or indirectly, any technology, software, or software source code (as +defined in Part 772 of the Export Administration Regulations of the U.S. +Department of Commerce ("EAR")), received from TI or any of its affiliated +companies, or export, directly or indirectly, any direct product of such +technology, software, or software source code (as defined in Part 734 of the +EAR), to any destination or country to which the export, re-export, or release +of the technology, software, software source code, or direct product is +prohibited by the EAR. + +(ii). Assurance of Compliance. You understand and acknowledge that products, +technology (regardless of the form in which it is provided), software or +software source code, received from TI or any of its affiliates under this +Agreement may be under export control of the United States or other countries. +You shall comply with the United States and other applicable non-U.S. laws and +regulations governing the export, re-export and release of any products, +technology, software, or software source code received under this Agreement +from TI or its affiliates. You shall not undertake any action that is +prohibited by the EAR. Without limiting the generality of the foregoing, you +specifically agree that you shall not transfer or release products, technology, +software, or software source code of TI or its affiliates to, or for use by, +military end users or for use in military, missile, nuclear, biological, or +chemical weapons end uses. + +(iii). Licenses. Each party shall secure at its own expense, such licenses and +export and import documents as are necessary for each respective party to +fulfill its obligations under this Agreement. If such licenses or government +approvals cannot be obtained, TI may terminate this Agreement, or shall +otherwise be excused from the performance of any obligations it may have under +this Agreement for which the licenses or government approvals are required. + +13. Entire Agreement. This is the entire Agreement between you and TI, and +absent a signed and effective software license agreement related to the subject +matter of this Agreement, this Agreement supersedes any prior agreement between +the parties related to the subject matter of this Agreement. Notwithstanding +the foregoing, any signed and effective software license agreement relating to +the subject matter hereof will supersede the terms of this Agreement. No +amendment or modification of this Agreement will be effective unless in writing +and signed by a duly authorized representative of TI. You hereby warrant and +represent that you have obtained all authorizations and other applicable +consents required empowering you to enter into this Agreement. + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.c new file mode 100644 index 00000000..c54e628f --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.c @@ -0,0 +1,2249 @@ +//***************************************************************************** +// +// can.c - Driver for the CAN module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_can.h" +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/canlib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is the maximum number that can be stored as an 11bit Message +// identifier. +// +//***************************************************************************** +#define CAN_MAX_11BIT_MSG_ID 0x7ff + +//***************************************************************************** +// +// This is used as the loop delay for accessing the CAN controller registers. +// +//***************************************************************************** +#define CAN_RW_DELAY 5 + +//***************************************************************************** +// +// The maximum CAN bit timing divisor is 19. +// +//***************************************************************************** +#define CAN_MAX_BIT_DIVISOR 19 + +//***************************************************************************** +// +// The minimum CAN bit timing divisor is 4. +// +//***************************************************************************** +#define CAN_MIN_BIT_DIVISOR 4 + +//***************************************************************************** +// +// The maximum CAN pre-divisor is 1024. +// +//***************************************************************************** +#define CAN_MAX_PRE_DIVISOR 1024 + +//***************************************************************************** +// +// The minimum CAN pre-divisor is 1. +// +//***************************************************************************** +#define CAN_MIN_PRE_DIVISOR 1 + +//***************************************************************************** +// +// Converts a set of CAN bit timing values into the value that needs to be +// programmed into the CAN_BIT register to achieve those timings. +// +//***************************************************************************** +#define CAN_BIT_VALUE(seg1, seg2, sjw) \ + ((((seg1 - 1) << CAN_BIT_TSEG1_S) & \ + CAN_BIT_TSEG1_M) | \ + (((seg2 - 1) << CAN_BIT_TSEG2_S) & \ + CAN_BIT_TSEG2_M) | \ + (((sjw - 1) << CAN_BIT_SJW_S) & \ + CAN_BIT_SJW_M)) + +//***************************************************************************** +// +// This table is used by the CANBitRateSet() API as the register defaults for +// the bit timing values. +// +//***************************************************************************** +static const unsigned short g_usCANBitValues[] = +{ + CAN_BIT_VALUE(2, 1, 1), // 4 clocks/bit + CAN_BIT_VALUE(3, 1, 1), // 5 clocks/bit + CAN_BIT_VALUE(3, 2, 2), // 6 clocks/bit + CAN_BIT_VALUE(4, 2, 2), // 7 clocks/bit + CAN_BIT_VALUE(4, 3, 3), // 8 clocks/bit + CAN_BIT_VALUE(5, 3, 3), // 9 clocks/bit + CAN_BIT_VALUE(5, 4, 4), // 10 clocks/bit + CAN_BIT_VALUE(6, 4, 4), // 11 clocks/bit + CAN_BIT_VALUE(6, 5, 4), // 12 clocks/bit + CAN_BIT_VALUE(7, 5, 4), // 13 clocks/bit + CAN_BIT_VALUE(7, 6, 4), // 14 clocks/bit + CAN_BIT_VALUE(8, 6, 4), // 15 clocks/bit + CAN_BIT_VALUE(8, 7, 4), // 16 clocks/bit + CAN_BIT_VALUE(9, 7, 4), // 17 clocks/bit + CAN_BIT_VALUE(9, 8, 4), // 18 clocks/bit + CAN_BIT_VALUE(10, 8, 4) // 19 clocks/bit +}; + +//***************************************************************************** +// +//! \internal +//! Checks a CAN base address. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! This function determines if a CAN controller base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +CANBaseValid(unsigned long ulBase) +{ + return((ulBase == CAN0_BASE) || (ulBase == CAN1_BASE) || + (ulBase == CAN2_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! +//! Returns the CAN controller interrupt number. +//! +//! \param ulBase is the base address of the selected CAN controller +//! +//! Given a CAN controller base address, returns the corresponding interrupt +//! number. +//! +//! This function replaces the original CANGetIntNumber() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return Returns a CAN interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +CANIntNumberGet(unsigned long ulBase) +{ + long lIntNumber; + + // + // Return the interrupt number for the given CAN controller. + // + switch(ulBase) + { + // + // Return the interrupt number for CAN 0 + // + case CAN0_BASE: + { + lIntNumber = INT_CAN0; + break; + } + + // + // Return the interrupt number for CAN 1 + // + case CAN1_BASE: + { + lIntNumber = INT_CAN1; + break; + } + + // + // Return the interrupt number for CAN 2 + // + case CAN2_BASE: + { + lIntNumber = INT_CAN2; + break; + } + + // + // Return -1 to indicate a bad address was passed in. + // + default: + { + lIntNumber = -1; + } + } + return(lIntNumber); +} + +//***************************************************************************** +// +//! \internal +//! +//! Reads a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be read. +//! +//! This function performs the necessary synchronization to read from a CAN +//! controller register. +//! +//! This function replaces the original CANReadReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note This function provides the delay required to access CAN registers. +//! This delay is required when accessing CAN registers directly. +//! +//! \return Returns the value read from the register. +// +//***************************************************************************** +static unsigned long +CANRegRead(unsigned long ulRegAddress) +{ + volatile int iDelay; + unsigned long ulRetVal; + unsigned long ulIntNumber; + unsigned long ulReenableInts; + + // + // Get the CAN interrupt number from the register base address. + // + ulIntNumber = CANIntNumberGet(ulRegAddress & 0xfffff000); + + // + // Make sure that the CAN base address was valid. + // + ASSERT(ulIntNumber != (unsigned long)-1); + + // + // Remember current state so that CAN interrupts are only re-enabled if + // they were already enabled. + // + ulReenableInts = HWREG(NVIC_EN1) & (1 << (ulIntNumber - 48)); + + // + // If the CAN interrupt was enabled then disable it. + // + if(ulReenableInts) + { + IntDisable(ulIntNumber); + } + + // + // Trigger the initial read to the CAN controller. The value returned at + // this point is not valid. + // + HWREG(ulRegAddress); + + // + // This delay is necessary for the CAN have the correct data on the bus. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } + + // + // Do the final read that has the valid value of the register. + // + ulRetVal = HWREG(ulRegAddress); + + // + // Enable CAN interrupts if they were enabled before this call. + // + if(ulReenableInts) + { + IntEnable(ulIntNumber); + } + + return(ulRetVal); +} + +//***************************************************************************** +// +//! \internal +//! +//! Writes a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be written. +//! \param ulRegValue is the value to write into the register specified by +//! \e ulRegAddress. +//! +//! This function takes care of the synchronization necessary to write to a +//! CAN controller register. +//! +//! This function replaces the original CANWriteReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note The delays in this function are required when accessing CAN registers +//! directly. +//! +//! \return None. +// +//***************************************************************************** +static void +CANRegWrite(unsigned long ulRegAddress, unsigned long ulRegValue) +{ + volatile int iDelay; + + // + // Trigger the initial write to the CAN controller. The value will not make + // it out to the CAN controller for CAN_RW_DELAY cycles. + // + HWREG(ulRegAddress) = ulRegValue; + + // + // Delay to allow the CAN controller to receive the new data. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the data to be written out to the CAN +//! controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 0, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy into the CAN controller. +//! +//! This function takes the steps necessary to copy data from a contiguous +//! buffer in memory into the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageSet() +//! function. +//! +//! This function replaces the original CANWriteDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegWrite(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + + // + // Write out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = pucData[iIdx++]; + + // + // Only write the second byte if needed otherwise it will be zero. + // + if(iIdx < iSize) + { + ulValue |= (pucData[iIdx++] << 8); + } + CANRegWrite((unsigned long)(pulRegister++), ulValue); + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the location to store the data read from the +//! CAN controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 1, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy from the CAN controller. +//! +//! This function takes the steps necessary to copy data to a contiguous buffer +//! in memory from the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageGet() +//! function. +//! +//! This function replaces the original CANReadDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegRead(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + // + // Read out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = CANRegRead((unsigned long)(pulRegister++)); + + // + // Store the first byte. + // + pucData[iIdx++] = (unsigned char)ulValue; + + // + // Only read the second byte if needed. + // + if(iIdx < iSize) + { + pucData[iIdx++] = (unsigned char)(ulValue >> 8); + } + } +} + +//***************************************************************************** +// +//! Initializes the CAN controller after reset. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! After reset, the CAN controller is left in the disabled state. However, +//! the memory used for message objects contains undefined values and must be +//! cleared prior to enabling the CAN controller the first time. This prevents +//! unwanted transmission or reception of data before the message objects are +//! configured. This function must be called before enabling the controller +//! the first time. +//! +//! \return None. +// +//***************************************************************************** +void +CANInit(unsigned long ulBase) +{ + int iMsg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Place CAN controller in init state, regardless of previous state. This + // will put controller in idle, and allow the message object RAM to be + // programmed. + // + CANRegWrite(ulBase + CAN_O_CTL, CAN_CTL_INIT); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid and is a "safe" condition to leave the message + // object. The same arb reg is used to program all the message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB | + CAN_IF1CMSK_CONTROL); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + CANRegWrite(ulBase + CAN_O_IF1MCTL, 0); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Make sure that the interrupt and new data flags are updated for the + // message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_NEWDAT | + CAN_IF1CMSK_CLRINTPND); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Acknowledge any pending status interrupts. + // + CANRegRead(ulBase + CAN_O_STS); +} + +//***************************************************************************** +// +//! Enables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to enable. +//! +//! Enables the CAN controller for message processing. Once enabled, the +//! controller will automatically transmit any pending frames, and process any +//! received frames. The controller can be stopped by calling CANDisable(). +//! Prior to calling CANEnable(), CANInit() should have been called to +//! initialize the controller and the CAN bus clock should be configured by +//! calling CANBitTimingSet(). +//! +//! \return None. +// +//***************************************************************************** +void +CANEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Clear the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Disables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to disable. +//! +//! Disables the CAN controller for message processing. When disabled, the +//! controller will no longer automatically process data on the CAN bus. The +//! controller can be restarted by calling CANEnable(). The state of the CAN +//! controller and the message objects in the controller are left as they were +//! before this call was made. +//! +//! \return None. +// +//***************************************************************************** +void +CANDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Set the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Reads the current settings for the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms is a pointer to a structure to hold the timing parameters. +//! +//! This function reads the current configuration of the CAN controller bit +//! clock timing, and stores the resulting information in the structure +//! supplied by the caller. Refer to CANBitTimingSet() for the meaning of the +//! values that are returned in the structure pointed to by \e pClkParms. +//! +//! This function replaces the original CANGetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // Read out all the bit timing values from the CAN controller registers. + // + uBitReg = CANRegRead(ulBase + CAN_O_BIT); + + // + // Set the phase 2 segment. + // + pClkParms->uPhase2Seg = + ((uBitReg & CAN_BIT_TSEG2_M) >> CAN_BIT_TSEG2_S) + 1; + + // + // Set the phase 1 segment. + // + pClkParms->uSyncPropPhase1Seg = + ((uBitReg & CAN_BIT_TSEG1_M) >> CAN_BIT_TSEG1_S) + 1; + + // + // Set the synchronous jump width. + // + pClkParms->uSJW = ((uBitReg & CAN_BIT_SJW_M) >> CAN_BIT_SJW_S) + 1; + + // + // Set the pre-divider for the CAN bus bit clock. + // + pClkParms->uQuantumPrescaler = + ((uBitReg & CAN_BIT_BRP_M) | + ((CANRegRead(ulBase + CAN_O_BRPE) & CAN_BRPE_BRPE_M) << 6)) + 1; +} + +//***************************************************************************** +// +//! This function is used to set the CAN bit timing values to a nominal setting +//! based on a desired bit rate. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulSourceClock is the system clock for the device in Hz. +//! \param ulBitRate is the desired bit rate. +//! +//! This function will set the CAN bit timing for the bit rate passed in the +//! \e ulBitRate parameter based on the \e ulSourceClock parameter. Since the +//! CAN clock is based off of the system clock the calling function should pass +//! in the source clock rate either by retrieving it from SysCtlClockGet() or +//! using a specific value in Hz. The CAN bit timing is calculated assuming a +//! minimal amount of propagation delay, which will work for most cases where +//! the network length is short. If tighter timing requirements or longer +//! network lengths are needed, then the CANBitTimingSet() function is +//! available for full customization of all of the CAN bit timing values. +//! Since not all bit rates can be matched exactly, the bit rate is set to the +//! value closest to the desired bit rate without being higher than the +//! \e ulBitRate value. +//! +//! \note On some devices the source clock is fixed at 8MHz so the +//! \e ulSourceClock should be set to 8000000. +//! +//! \return This function returns the bit rate that the CAN controller was +//! configured to use or it returns 0 to indicate that the bit rate was not +//! changed because the requested bit rate was not valid. +//! +//***************************************************************************** +unsigned long +CANBitRateSet(unsigned long ulBase, unsigned long ulSourceClock, + unsigned long ulBitRate) +{ + unsigned long ulDesiredRatio; + unsigned long ulCANBits; + unsigned long ulPreDivide; + unsigned long ulRegValue; + unsigned short usCANCTL; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(ulSourceClock != 0); + ASSERT(ulBitRate != 0); + + // + // Calculate the desired clock rate. + // + ulDesiredRatio = ulSourceClock / ulBitRate; + + // + // Make sure that the ratio of CAN bit rate to processor clock is not too + // small or too large. + // + ASSERT(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)); + ASSERT(ulDesiredRatio >= (CAN_MIN_PRE_DIVISOR * CAN_MIN_BIT_DIVISOR)); + + // + // Make sure that the Desired Ratio is not too large. This enforces the + // requirement that the bit rate is larger than requested. + // + if((ulSourceClock / ulDesiredRatio) > ulBitRate) + { + ulDesiredRatio += 1; + } + + // + // Check all possible values to find a matching value. + // + while(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)) + { + // + // Loop through all possible CAN bit divisors. + // + for(ulCANBits = CAN_MAX_BIT_DIVISOR; ulCANBits >= CAN_MIN_BIT_DIVISOR; + ulCANBits--) + { + // + // For a given CAN bit divisor save the pre divisor. + // + ulPreDivide = ulDesiredRatio / ulCANBits; + + // + // If the calculated divisors match the desired clock ratio then + // return these bit rate and set the CAN bit timing. + // + if((ulPreDivide * ulCANBits) == ulDesiredRatio) + { + // + // Start building the bit timing value by adding the bit timing + // in time quanta. + // + ulRegValue = g_usCANBitValues[ulCANBits - CAN_MIN_BIT_DIVISOR]; + + // + // To set the bit timing register, the controller must be placed + // in init mode (if not already), and also configuration change + // bit enabled. The state of the register should be saved + // so it can be restored. + // + usCANCTL = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, + usCANCTL | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Now add in the pre-scalar on the bit rate. + // + ulRegValue |= ((ulPreDivide - 1) & CAN_BIT_BRP_M); + + // + // Set the clock bits in the and the lower bits of the + // pre-scalar. + // + CANRegWrite(ulBase + CAN_O_BIT, ulRegValue); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((ulPreDivide - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Restore the saved CAN Control register. + // + CANRegWrite(ulBase + CAN_O_CTL, usCANCTL); + + // + // Return the computed bit rate. + // + return(ulSourceClock / ( ulPreDivide * ulCANBits)); + } + } + + // + // Move the divisor up one and look again. Only in rare cases are + // more than 2 loops required to find the value. + // + ulDesiredRatio++; + } + + // + // A valid combination could not be found, so return 0 to indicate that the + // bit rate was not changed. + // + return(0); +} + +//***************************************************************************** +// +//! Configures the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms points to the structure with the clock parameters. +//! +//! Configures the various timing parameters for the CAN bus bit timing: +//! Propagation segment, Phase Buffer 1 segment, Phase Buffer 2 segment, and +//! the Synchronization Jump Width. The values for Propagation and Phase +//! Buffer 1 segments are derived from the combination +//! \e pClkParms->uSyncPropPhase1Seg parameter. Phase Buffer 2 is determined +//! from the \e pClkParms->uPhase2Seg parameter. These two parameters, along +//! with \e pClkParms->uSJW are based in units of bit time quanta. The actual +//! quantum time is determined by the \e pClkParms->uQuantumPrescaler value, +//! which specifies the divisor for the CAN module clock. +//! +//! The total bit time, in quanta, will be the sum of the two Seg parameters, +//! as follows: +//! +//! bit_time_q = uSyncPropPhase1Seg + uPhase2Seg + 1 +//! +//! Note that the Sync_Seg is always one quantum in duration, and will be added +//! to derive the correct duration of Prop_Seg and Phase1_Seg. +//! +//! The equation to determine the actual bit rate is as follows: +//! +//! CAN Clock / +//! ((\e uSyncPropPhase1Seg + \e uPhase2Seg + 1) * (\e uQuantumPrescaler)) +//! +//! This means that with \e uSyncPropPhase1Seg = 4, \e uPhase2Seg = 1, +//! \e uQuantumPrescaler = 2 and an 8 MHz CAN clock, that the bit rate will be +//! (8 MHz) / ((5 + 2 + 1) * 2) or 500 Kbit/sec. +//! +//! This function replaces the original CANSetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + unsigned int uSavedInit; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // The phase 1 segment must be in the range from 2 to 16. + // + ASSERT((pClkParms->uSyncPropPhase1Seg >= 2) && + (pClkParms->uSyncPropPhase1Seg <= 16)); + + // + // The phase 2 segment must be in the range from 1 to 8. + // + ASSERT((pClkParms->uPhase2Seg >= 1) && (pClkParms->uPhase2Seg <= 8)); + + // + // The synchronous jump windows must be in the range from 1 to 4. + // + ASSERT((pClkParms->uSJW >= 1) && (pClkParms->uSJW <= 4)); + + // + // The CAN clock pre-divider must be in the range from 1 to 1024. + // + ASSERT((pClkParms->uQuantumPrescaler <= 1024) && + (pClkParms->uQuantumPrescaler >= 1)); + + // + // To set the bit timing register, the controller must be placed in init + // mode (if not already), and also configuration change bit enabled. State + // of the init bit should be saved so it can be restored at the end. + // + uSavedInit = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Set the bit fields of the bit timing register according to the parms. + // + uBitReg = (((pClkParms->uPhase2Seg - 1) << CAN_BIT_TSEG2_S) & + CAN_BIT_TSEG2_M); + uBitReg |= (((pClkParms->uSyncPropPhase1Seg - 1) << CAN_BIT_TSEG1_S) & + CAN_BIT_TSEG1_M); + uBitReg |= ((pClkParms->uSJW - 1) << CAN_BIT_SJW_S) & CAN_BIT_SJW_M; + uBitReg |= (pClkParms->uQuantumPrescaler - 1) & CAN_BIT_BRP_M; + CANRegWrite(ulBase + CAN_O_BIT, uBitReg); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((pClkParms->uQuantumPrescaler - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Clear the config change bit, and restore the init bit. + // + uSavedInit &= ~CAN_CTL_CCE; + + // + // If Init was not set before, then clear it. + // + if(uSavedInit & CAN_CTL_INIT) + { + uSavedInit &= ~CAN_CTL_INIT; + } + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled CAN interrupts occur. +//! +//! This function registers the interrupt handler in the interrupt vector +//! table, and enables CAN interrupts on the interrupt controller; specific CAN +//! interrupt sources must be enabled using CANIntEnable(). The interrupt +//! handler being registered must clear the source of the interrupt using +//! CANIntClear(). +//! +//! If the application is using a static interrupt vector table stored in +//! flash, then it is not necessary to register the interrupt handler this way. +//! Instead, IntEnable() should be used to enable CAN interrupts on the +//! interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntRegister(ulIntNumber, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(ulIntNumber); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the previously registered interrupt handler and +//! disables the interrupt on the interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntUnregister(unsigned long ulBase) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntUnregister(ulIntNumber); + + // + // Disable the CAN interrupt. + // + IntDisable(ulIntNumber); +} + +//***************************************************************************** +// +//! Enables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables specific interrupt sources of the CAN controller. Only enabled +//! sources will cause a processor interrupt. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b CAN_INT_ERROR - a controller error condition has occurred +//! - \b CAN_INT_STATUS - a message transfer has completed, or a bus error has +//! been detected +//! - \b CAN_INT_MASTER - allow CAN controller to generate interrupts +//! +//! In order to generate any interrupts, \b CAN_INT_MASTER must be enabled. +//! Further, for any particular transaction from a message object to generate +//! an interrupt, that message object must have interrupts enabled (see +//! CANMessageSet()). \b CAN_INT_ERROR will generate an interrupt if the +//! controller enters the ``bus off'' condition, or if the error counters reach +//! a limit. \b CAN_INT_STATUS will generate an interrupt under quite a few +//! status conditions and may provide more interrupts than the application +//! needs to handle. When an interrupt occurs, use CANIntStatus() to determine +//! the cause. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Enable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags); +} + +//***************************************************************************** +// +//! Disables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the specified CAN controller interrupt sources. Only enabled +//! interrupt sources can cause a processor interrupt. +//! +//! The \e ulIntFlags parameter has the same definition as in the +//! CANIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Disable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~(ulIntFlags)); +} + +//***************************************************************************** +// +//! Returns the current CAN controller interrupt status. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eIntStsReg indicates which interrupt status register to read +//! +//! Returns the value of one of two interrupt status registers. The interrupt +//! status register read is determined by the \e eIntStsReg parameter, which +//! can have one of the following values: +//! +//! - \b CAN_INT_STS_CAUSE - indicates the cause of the interrupt +//! - \b CAN_INT_STS_OBJECT - indicates pending interrupts of all message +//! objects +//! +//! \b CAN_INT_STS_CAUSE returns the value of the controller interrupt register +//! and indicates the cause of the interrupt. It will be a value of +//! \b CAN_INT_INTID_STATUS if the cause is a status interrupt. In this case, +//! the status register should be read with the CANStatusGet() function. +//! Calling this function to read the status will also clear the status +//! interrupt. If the value of the interrupt register is in the range 1-32, +//! then this indicates the number of the highest priority message object that +//! has an interrupt pending. The message object interrupt can be cleared by +//! using the CANIntClear() function, or by reading the message using +//! CANMessageGet() in the case of a received message. The interrupt handler +//! can read the interrupt status again to make sure all pending interrupts are +//! cleared before returning from the interrupt. +//! +//! \b CAN_INT_STS_OBJECT returns a bit mask indicating which message objects +//! have pending interrupts. This can be used to discover all of the pending +//! interrupts at once, as opposed to repeatedly reading the interrupt register +//! by using \b CAN_INT_STS_CAUSE. +//! +//! \return Returns the value of one of the interrupt status registers. +// +//***************************************************************************** +unsigned long +CANIntStatus(unsigned long ulBase, tCANIntStsReg eIntStsReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // See which status the caller is looking for. + // + switch(eIntStsReg) + { + // + // The caller wants the global interrupt status for the CAN controller + // specified by ulBase. + // + case CAN_INT_STS_CAUSE: + { + ulStatus = CANRegRead(ulBase + CAN_O_INT); + break; + } + + // + // The caller wants the current message status interrupt for all + // messages. + // + case CAN_INT_STS_OBJECT: + { + // + // Read and combine both 16 bit values into one 32bit status. + // + ulStatus = (CANRegRead(ulBase + CAN_O_MSG1INT) & + CAN_MSG1INT_INTPND_M); + ulStatus |= (CANRegRead(ulBase + CAN_O_MSG2INT) << 16); + break; + } + + // + // Request was for unknown status so just return 0. + // + default: + { + ulStatus = 0; + break; + } + } + + // + // Return the interrupt status value + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears a CAN interrupt source. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntClr is a value indicating which interrupt source to clear. +//! +//! This function can be used to clear a specific interrupt source. The +//! \e ulIntClr parameter should be one of the following values: +//! +//! - \b CAN_INT_INTID_STATUS - Clears a status interrupt. +//! - 1-32 - Clears the specified message object interrupt +//! +//! It is not necessary to use this function to clear an interrupt. This +//! should only be used if the application wants to clear an interrupt source +//! without taking the normal interrupt action. +//! +//! Normally, the status interrupt is cleared by reading the controller status +//! using CANStatusGet(). A specific message object interrupt is normally +//! cleared by reading the message object using CANMessageGet(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +CANIntClear(unsigned long ulBase, unsigned long ulIntClr) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntClr == CAN_INT_INTID_STATUS) || + ((ulIntClr>=1) && (ulIntClr <=32))); + + if(ulIntClr == CAN_INT_INTID_STATUS) + { + // + // Simply read and discard the status to clear the interrupt. + // + CANRegRead(ulBase + CAN_O_STS); + } + else + { + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Only change the interrupt pending state by setting only the + // CAN_IF1CMSK_CLRINTPND bit. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_CLRINTPND); + + // + // Send the clear pending interrupt command to the CAN controller. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulIntClr & CAN_IF1CRQ_MNUM_M); + + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + } +} + +//***************************************************************************** +// +//! Sets the CAN controller automatic retransmission behavior. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param bAutoRetry enables automatic retransmission. +//! +//! Enables or disables automatic retransmission of messages with detected +//! errors. If \e bAutoRetry is \b true, then automatic retransmission is +//! enabled, otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry) +{ + unsigned long ulCtlReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + ulCtlReg = CANRegRead(ulBase + CAN_O_CTL); + + // + // Conditionally set the DAR bit to enable/disable auto-retry. + // + if(bAutoRetry) + { + // + // Clearing the DAR bit tells the controller to not disable the + // auto-retry of messages which were not transmitted or received + // correctly. + // + ulCtlReg &= ~CAN_CTL_DAR; + } + else + { + // + // Setting the DAR bit tells the controller to disable the auto-retry + // of messages which were not transmitted or received correctly. + // + ulCtlReg |= CAN_CTL_DAR; + } + + CANRegWrite(ulBase + CAN_O_CTL, ulCtlReg); +} + +//***************************************************************************** +// +//! Returns the current setting for automatic retransmission. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! Reads the current setting for the automatic retransmission in the CAN +//! controller and returns it to the caller. +//! +//! \return Returns \b true if automatic retransmission is enabled, \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +CANRetryGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the disable automatic retry setting from the CAN controller. + // + if(CANRegRead(ulBase + CAN_O_CTL) & CAN_CTL_DAR) + { + // + // Automatic data retransmission is not enabled. + // + return(false); + } + + // + // Automatic data retransmission is enabled. + // + return(true); +} + +//***************************************************************************** +// +//! Reads one of the controller status registers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eStatusReg is the status register to read. +//! +//! Reads a status register of the CAN controller and returns it to the caller. +//! The different status registers are: +//! +//! - \b CAN_STS_CONTROL - the main controller status +//! - \b CAN_STS_TXREQUEST - bit mask of objects pending transmission +//! - \b CAN_STS_NEWDAT - bit mask of objects with new data +//! - \b CAN_STS_MSGVAL - bit mask of objects with valid configuration +//! +//! When reading the main controller status register, a pending status +//! interrupt will be cleared. This should be used in the interrupt handler +//! for the CAN controller if the cause is a status interrupt. The controller +//! status register fields are as follows: +//! +//! - \b CAN_STATUS_BUS_OFF - controller is in bus-off condition +//! - \b CAN_STATUS_EWARN - an error counter has reached a limit of at least 96 +//! - \b CAN_STATUS_EPASS - CAN controller is in the error passive state +//! - \b CAN_STATUS_RXOK - a message was received successfully (independent of +//! any message filtering). +//! - \b CAN_STATUS_TXOK - a message was successfully transmitted +//! - \b CAN_STATUS_LEC_MSK - mask of last error code bits (3 bits) +//! - \b CAN_STATUS_LEC_NONE - no error +//! - \b CAN_STATUS_LEC_STUFF - stuffing error detected +//! - \b CAN_STATUS_LEC_FORM - a format error occurred in the fixed format part +//! of a message +//! - \b CAN_STATUS_LEC_ACK - a transmitted message was not acknowledged +//! - \b CAN_STATUS_LEC_BIT1 - dominant level detected when trying to send in +//! recessive mode +//! - \b CAN_STATUS_LEC_BIT0 - recessive level detected when trying to send in +//! dominant mode +//! - \b CAN_STATUS_LEC_CRC - CRC error in received message +//! +//! The remaining status registers are 32-bit bit maps to the message objects. +//! They can be used to quickly obtain information about the status of all the +//! message objects without needing to query each one. They contain the +//! following information: +//! +//! - \b CAN_STS_TXREQUEST - if a message object's TxRequest bit is set, that +//! means that a transmission is pending on that object. The application can +//! use this to determine which objects are still waiting to send a message. +//! - \b CAN_STS_NEWDAT - if a message object's NewDat bit is set, that means +//! that a new message has been received in that object, and has not yet been +//! picked up by the host application +//! - \b CAN_STS_MSGVAL - if a message object's MsgVal bit is set, that means +//! it has a valid configuration programmed. The host application can use this +//! to determine which message objects are empty/unused. +//! +//! \return Returns the value of the status register. +// +//***************************************************************************** +unsigned long +CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + switch(eStatusReg) + { + // + // Just return the global CAN status register since that is what was + // requested. + // + case CAN_STS_CONTROL: + { + ulStatus = CANRegRead(ulBase + CAN_O_STS); + CANRegWrite(ulBase + CAN_O_STS, + ~(CAN_STS_RXOK | CAN_STS_TXOK | CAN_STS_LEC_M)); + break; + } + + // + // Combine the Transmit status bits into one 32bit value. + // + case CAN_STS_TXREQUEST: + { + ulStatus = CANRegRead(ulBase + CAN_O_TXRQ1); + ulStatus |= CANRegRead(ulBase + CAN_O_TXRQ2) << 16; + break; + } + + // + // Combine the New Data status bits into one 32bit value. + // + case CAN_STS_NEWDAT: + { + ulStatus = CANRegRead(ulBase + CAN_O_NWDA1); + ulStatus |= CANRegRead(ulBase + CAN_O_NWDA2) << 16; + break; + } + + // + // Combine the Message valid status bits into one 32bit value. + // + case CAN_STS_MSGVAL: + { + ulStatus = CANRegRead(ulBase + CAN_O_MSG1VAL); + ulStatus |= CANRegRead(ulBase + CAN_O_MSG2VAL) << 16; + break; + } + + // + // Unknown CAN status requested so return 0. + // + default: + { + ulStatus = 0; + break; + } + } + return(ulStatus); +} + +//***************************************************************************** +// +//! Reads the CAN controller error counter register. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pulRxCount is a pointer to storage for the receive error counter. +//! \param pulTxCount is a pointer to storage for the transmit error counter. +//! +//! Reads the error counter register and returns the transmit and receive error +//! counts to the caller along with a flag indicating if the controller receive +//! counter has reached the error passive limit. The values of the receive and +//! transmit error counters are returned through the pointers provided as +//! parameters. +//! +//! After this call, \e *pulRxCount will hold the current receive error count +//! and \e *pulTxCount will hold the current transmit error count. +//! +//! \return Returns \b true if the receive error count has reached the error +//! passive limit, and \b false if the error count is below the error passive +//! limit. +// +//***************************************************************************** +tBoolean +CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount) +{ + unsigned long ulCANError; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the current count of transmit/receive errors. + // + ulCANError = CANRegRead(ulBase + CAN_O_ERR); + + // + // Extract the error numbers from the register value. + // + *pulRxCount = (ulCANError & CAN_ERR_REC_M) >> CAN_ERR_REC_S; + *pulTxCount = (ulCANError & CAN_ERR_TEC_M) >> CAN_ERR_TEC_S; + + if(ulCANError & CAN_ERR_RP) + { + return(true); + } + return(false); +} + +//***************************************************************************** +// +//! Configures a message object in the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to configure (1-32). +//! \param pMsgObject is a pointer to a structure containing message object +//! settings. +//! \param eMsgType indicates the type of message for this object. +//! +//! This function is used to configure any one of the 32 message objects in the +//! CAN controller. A message object can be configured as any type of CAN +//! message object as well as several options for automatic transmission and +//! reception. This call also allows the message object to be configured to +//! generate interrupts on completion of message receipt or transmission. The +//! message object can also be configured with a filter/mask so that actions +//! are only taken when a message that meets certain parameters is seen on the +//! CAN bus. +//! +//! The \e eMsgType parameter must be one of the following values: +//! +//! - \b MSG_OBJ_TYPE_TX - CAN transmit message object. +//! - \b MSG_OBJ_TYPE_TX_REMOTE - CAN transmit remote request message object. +//! - \b MSG_OBJ_TYPE_RX - CAN receive message object. +//! - \b MSG_OBJ_TYPE_RX_REMOTE - CAN receive remote request message object. +//! - \b MSG_OBJ_TYPE_RXTX_REMOTE - CAN remote frame receive remote, then +//! transmit message object. +//! +//! The message object pointed to by \e pMsgObject must be populated by the +//! caller, as follows: +//! +//! - \e ulMsgID - contains the message ID, either 11 or 29 bits. +//! - \e ulMsgIDMask - mask of bits from \e ulMsgID that must match if +//! identifier filtering is enabled. +//! - \e ulFlags +//! - Set \b MSG_OBJ_TX_INT_ENABLE flag to enable interrupt on transmission. +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to enable interrupt on receipt. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable filtering based on the +//! identifier mask specified by \e ulMsgIDMask. +//! - \e ulMsgLen - the number of bytes in the message data. This should be +//! non-zero even for a remote frame; it should match the expected bytes of the +//! data responding data frame. +//! - \e pucMsgData - points to a buffer containing up to 8 bytes of data for a +//! data frame. +//! +//! \b Example: To send a data frame or remote frame(in response to a remote +//! request), take the following steps: +//! +//! -# Set \e eMsgType to \b MSG_OBJ_TYPE_TX. +//! -# Set \e pMsgObject->ulMsgID to the message ID. +//! -# Set \e pMsgObject->ulFlags. Make sure to set \b MSG_OBJ_TX_INT_ENABLE to +//! allow an interrupt to be generated when the message is sent. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the data frame. +//! -# Set \e pMsgObject->pucMsgData to point to an array containing the bytes +//! to send in the message. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! \b Example: To receive a specific data frame, take the following steps: +//! +//! -# Set \e eMsgObjType to \b MSG_OBJ_TYPE_RX. +//! -# Set \e pMsgObject->ulMsgID to the full message ID, or a partial mask to +//! use partial ID matching. +//! -# Set \e pMsgObject->ulMsgIDMask bits that should be used for masking +//! during comparison. +//! -# Set \e pMsgObject->ulFlags as follows: +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to be interrupted when the data frame +//! is received. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable identifier based filtering. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the expected data +//! frame. +//! -# The buffer pointed to by \e pMsgObject->pucMsgData is not used by this +//! call as no data is present at the time of the call. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! If you specify a message object buffer that already contains a message +//! definition, it will be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + tBoolean bTransferData; + tBoolean bUseExtendedID; + + bTransferData = 0; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + ASSERT((eMsgType == MSG_OBJ_TYPE_TX) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RX) || + (eMsgType == MSG_OBJ_TYPE_RX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RXTX_REMOTE)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // See if we need to use an extended identifier or not. + // + if((pMsgObject->ulMsgID > CAN_MAX_11BIT_MSG_ID) || + (pMsgObject->ulFlags & MSG_OBJ_EXTENDED_ID)) + { + bUseExtendedID = 1; + } + else + { + bUseExtendedID = 0; + } + + // + // This is always a write to the Message object as this call is setting a + // message object. This call will also always set all size bits so it sets + // both data bits. The call will use the CONTROL register to set control + // bits so this bit needs to be set as well. + // + usCmdMaskReg = (CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL); + + // + // Initialize the values to a known state before filling them in based on + // the type of message object that is being configured. + // + usArbReg0 = 0; + usArbReg1 = 0; + usMsgCtrl = 0; + usMaskReg0 = 0; + usMaskReg1 = 0; + + switch(eMsgType) + { + // + // Transmit message object. + // + case MSG_OBJ_TYPE_TX: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = CAN_IF1ARB2_DIR; + bTransferData = 1; + break; + } + + // + // Transmit remote request message object + // + case MSG_OBJ_TYPE_TX_REMOTE: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = 0; + break; + } + + // + // Receive message object. + // + case MSG_OBJ_TYPE_RX: + { + // + // This clears the DIR bit along with everything else. The TXRQST + // bit was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = 0; + break; + } + + // + // Receive remote request message object. + // + case MSG_OBJ_TYPE_RX_REMOTE: + { + // + // The DIR bit is set to one for remote receivers. The TXRQST bit + // was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object so that it only indicates that a remote frame + // was received and allow for software to handle it by sending back + // a data frame. + // + usMsgCtrl = CAN_IF1MCTL_UMASK; + + // + // Use the full Identifier by default. + // + usMaskReg0 = 0xffff; + usMaskReg1 = 0x1fff; + + // + // Make sure to send the mask to the message object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + break; + } + + // + // Remote frame receive remote, with auto-transmit message object. + // + case MSG_OBJ_TYPE_RXTX_REMOTE: + { + // + // Oddly the DIR bit is set to one for remote receivers. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object to auto answer if a matching identifier is seen. + // + usMsgCtrl = CAN_IF1MCTL_RMTEN | CAN_IF1MCTL_UMASK; + + // + // The data to be returned needs to be filled in. + // + bTransferData = 1; + break; + } + + // + // This case should never happen due to the ASSERT statement at the + // beginning of this function. + // + default: + { + return; + } + } + + // + // Configure the Mask Registers. + // + if(pMsgObject->ulFlags & MSG_OBJ_USE_ID_FILTER) + { + if(bUseExtendedID) + { + // + // Set the 29 bits of Identifier mask that were requested. + // + usMaskReg0 = pMsgObject->ulMsgIDMask & CAN_IF1MSK1_IDMSK_M; + usMaskReg1 = ((pMsgObject->ulMsgIDMask >> 16) & + CAN_IF1MSK2_IDMSK_M); + } + else + { + // + // Lower 16 bit are unused so set them to zero. + // + usMaskReg0 = 0; + + // + // Put the 11 bit Mask Identifier into the upper bits of the field + // in the register. + // + usMaskReg1 = ((pMsgObject->ulMsgIDMask << 2) & + CAN_IF1MSK2_IDMSK_M); + } + } + + // + // If the caller wants to filter on the extended ID bit then set it. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_EXT_FILTER) == + MSG_OBJ_USE_EXT_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MXTD; + } + + // + // The caller wants to filter on the message direction field. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_DIR_FILTER) == + MSG_OBJ_USE_DIR_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MDIR; + } + + if(pMsgObject->ulFlags & (MSG_OBJ_USE_ID_FILTER | MSG_OBJ_USE_DIR_FILTER | + MSG_OBJ_USE_EXT_FILTER)) + { + // + // Set the UMASK bit to enable using the mask register. + // + usMsgCtrl |= CAN_IF1MCTL_UMASK; + + // + // Set the MASK bit so that this gets transferred to the Message Object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + } + + // + // Set the Arb bit so that this gets transferred to the Message object. + // + usCmdMaskReg |= CAN_IF1CMSK_ARB; + + // + // Configure the Arbitration registers. + // + if(bUseExtendedID) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + usArbReg0 |= pMsgObject->ulMsgID & CAN_IF1ARB1_ID_M; + usArbReg1 |= (pMsgObject->ulMsgID >> 16) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid and set the extended ID bit. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL | CAN_IF1ARB2_XTD; + } + else + { + // + // Set the 11 bit version of the Identifier for this message object. + // The lower 18 bits are set to zero. + // + usArbReg1 |= (pMsgObject->ulMsgID << 2) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL; + } + + // + // Set the data length since this is set for all transfers. This is also a + // single transfer and not a FIFO transfer so set EOB bit. + // + usMsgCtrl |= (pMsgObject->ulMsgLen & CAN_IF1MCTL_DLC_M); + + // + // Mark this as the last entry if this is not the last entry in a FIFO. + // + if((pMsgObject->ulFlags & MSG_OBJ_FIFO) == 0) + { + usMsgCtrl |= CAN_IF1MCTL_EOB; + } + + // + // Enable transmit interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_TX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_TXIE; + } + + // + // Enable receive interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_RX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_RXIE; + } + + // + // Write the data out to the CAN Data registers if needed. + // + if(bTransferData) + { + CANDataRegWrite(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF1DA1), + pMsgObject->ulMsgLen); + } + + // + // Write out the registers to program the message object. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, usCmdMaskReg); + CANRegWrite(ulBase + CAN_O_IF1MSK1, usMaskReg0); + CANRegWrite(ulBase + CAN_O_IF1MSK2, usMaskReg1); + CANRegWrite(ulBase + CAN_O_IF1ARB1, usArbReg0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, usArbReg1); + CANRegWrite(ulBase + CAN_O_IF1MCTL, usMsgCtrl); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +//! Reads a CAN message from one of the message object buffers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to read (1-32). +//! \param pMsgObject points to a structure containing message object fields. +//! \param bClrPendingInt indicates whether an associated interrupt should be +//! cleared. +//! +//! This function is used to read the contents of one of the 32 message objects +//! in the CAN controller, and return it to the caller. The data returned is +//! stored in the fields of the caller-supplied structure pointed to by +//! \e pMsgObject. The data consists of all of the parts of a CAN message, +//! plus some control and status information. +//! +//! Normally this is used to read a message object that has received and stored +//! a CAN message with a certain identifier. However, this could also be used +//! to read the contents of a message object in order to load the fields of the +//! structure in case only part of the structure needs to be changed from a +//! previous setting. +//! +//! When using CANMessageGet, all of the same fields of the structure are +//! populated in the same way as when the CANMessageSet() function is used, +//! with the following exceptions: +//! +//! \e pMsgObject->ulFlags: +//! +//! - \b MSG_OBJ_NEW_DATA indicates if this is new data since the last time it +//! was read +//! - \b MSG_OBJ_DATA_LOST indicates that at least one message was received on +//! this message object, and not read by the host before being overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + + // + // This is always a read to the Message object as this call is setting a + // message object. + // + usCmdMaskReg = (CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL | CAN_IF1CMSK_MASK | CAN_IF1CMSK_ARB); + + // + // Clear a pending interrupt and new data in a message object. + // + if(bClrPendingInt) + { + usCmdMaskReg |= CAN_IF1CMSK_CLRINTPND; + } + + // + // Set up the request for data from the message object. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, usCmdMaskReg); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Read out the IF Registers. + // + usMaskReg0 = CANRegRead(ulBase + CAN_O_IF2MSK1); + usMaskReg1 = CANRegRead(ulBase + CAN_O_IF2MSK2); + usArbReg0 = CANRegRead(ulBase + CAN_O_IF2ARB1); + usArbReg1 = CANRegRead(ulBase + CAN_O_IF2ARB2); + usMsgCtrl = CANRegRead(ulBase + CAN_O_IF2MCTL); + + pMsgObject->ulFlags = MSG_OBJ_NO_FLAGS; + + // + // Determine if this is a remote frame by checking the TXRQST and DIR bits. + // + if((!(usMsgCtrl & CAN_IF1MCTL_TXRQST) && (usArbReg1 & CAN_IF1ARB2_DIR)) || + ((usMsgCtrl & CAN_IF1MCTL_TXRQST) && (!(usArbReg1 & CAN_IF1ARB2_DIR)))) + { + pMsgObject->ulFlags |= MSG_OBJ_REMOTE_FRAME; + } + + // + // Get the identifier out of the register, the format depends on size of + // the mask. + // + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + pMsgObject->ulMsgID = ((usArbReg1 & CAN_IF1ARB2_ID_M) << 16) | + usArbReg0; + + pMsgObject->ulFlags |= MSG_OBJ_EXTENDED_ID; + } + else + { + // + // The Identifier is an 11 bit value. + // + pMsgObject->ulMsgID = (usArbReg1 & CAN_IF1ARB2_ID_M) >> 2; + } + + // + // Indicate that we lost some data. + // + if(usMsgCtrl & CAN_IF1MCTL_MSGLST) + { + pMsgObject->ulFlags |= MSG_OBJ_DATA_LOST; + } + + // + // Set the flag to indicate if ID masking was used. + // + if(usMsgCtrl & CAN_IF1MCTL_UMASK) + { + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // The Identifier Mask is assumed to also be a 29 bit value. + // + pMsgObject->ulMsgIDMask = + ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) << 16) | usMaskReg0; + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x1fffffff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + else + { + // + // The Identifier Mask is assumed to also be an 11 bit value. + // + pMsgObject->ulMsgIDMask = ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) >> + 2); + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x7ff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + + // + // Indicate if the extended bit was used in filtering. + // + if(usMaskReg1 & CAN_IF1MSK2_MXTD) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_EXT_FILTER; + } + + // + // Indicate if direction filtering was enabled. + // + if(usMaskReg1 & CAN_IF1MSK2_MDIR) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_DIR_FILTER; + } + } + + // + // Set the interrupt flags. + // + if(usMsgCtrl & CAN_IF1MCTL_TXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_TX_INT_ENABLE; + } + if(usMsgCtrl & CAN_IF1MCTL_RXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_RX_INT_ENABLE; + } + + // + // See if there is new data available. + // + if(usMsgCtrl & CAN_IF1MCTL_NEWDAT) + { + // + // Get the amount of data needed to be read. + // + pMsgObject->ulMsgLen = (usMsgCtrl & CAN_IF1MCTL_DLC_M); + + // + // Don't read any data for a remote frame, there is nothing valid in + // that buffer anyway. + // + if((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0) + { + // + // Read out the data from the CAN registers. + // + CANDataRegRead(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF2DA1), + pMsgObject->ulMsgLen); + } + + // + // Now clear out the new data flag. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, CAN_IF1CMSK_NEWDAT); + + // + // Transfer the message object to the message object specified by + // ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Indicate that there is new data in this message. + // + pMsgObject->ulFlags |= MSG_OBJ_NEW_DATA; + } + else + { + // + // Along with the MSG_OBJ_NEW_DATA not being set the amount of data + // needs to be set to zero if none was available. + // + pMsgObject->ulMsgLen = 0; + } +} + +//***************************************************************************** +// +//! Clears a message object so that it is no longer used. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the message object number to disable (1-32). +//! +//! This function frees the specified message object from use. Once a message +//! object has been ``cleared,'' it will no longer automatically send or +//! receive messages, or generate interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageClear(unsigned long ulBase, unsigned long ulObjID) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID >= 1) && (ulObjID <= 32)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB); + CANRegWrite(ulBase + CAN_O_IF1ARB1, 0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.h new file mode 100644 index 00000000..39aa7055 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/canlib.h @@ -0,0 +1,450 @@ +//***************************************************************************** +// +// can.h - Defines and Macros for the CAN controller. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CAN_H__ +#define __CAN_H__ + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Miscellaneous defines for Message ID Types +// +//***************************************************************************** + +//***************************************************************************** +// +// These are the flags used by the tCANMsgObject.ulFlags value when calling the +// CANMessageSet() and CANMessageGet() functions. +// +//***************************************************************************** + +// +//! This definition is used with the tCANMsgObject ulFlags value and indicates +//! that transmit interrupts should be enabled, or are enabled. +// +#define MSG_OBJ_TX_INT_ENABLE 0x00000001 + +// +//! This indicates that receive interrupts should be enabled, or are +//! enabled. +// +#define MSG_OBJ_RX_INT_ENABLE 0x00000002 + +// +//! This indicates that a message object will use or is using an extended +//! identifier. +// +#define MSG_OBJ_EXTENDED_ID 0x00000004 + +// +//! This indicates that a message object will use or is using filtering +//! based on the object's message identifier. +// +#define MSG_OBJ_USE_ID_FILTER 0x00000008 + +// +//! This indicates that new data was available in the message object. +// +#define MSG_OBJ_NEW_DATA 0x00000080 + +// +//! This indicates that data was lost since this message object was last +//! read. +// +#define MSG_OBJ_DATA_LOST 0x00000100 + +// +//! This indicates that a message object will use or is using filtering +//! based on the direction of the transfer. If the direction filtering is +//! used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_DIR_FILTER (0x00000010 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object will use or is using message +//! identifier filtering based on the extended identifier. If the extended +//! identifier filtering is used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_EXT_FILTER (0x00000020 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object is a remote frame. +// +#define MSG_OBJ_REMOTE_FRAME 0x00000040 + +// +//! This indicates that this message object is part of a FIFO structure and +//! not the final message object in a FIFO. +// +#define MSG_OBJ_FIFO 0x00000200 + +// +//! This indicates that a message object has no flags set. +// +#define MSG_OBJ_NO_FLAGS 0x00000000 + +//***************************************************************************** +// +//! This define is used with the flag values to allow checking only status +//! flags and not configuration flags. +// +//***************************************************************************** +#define MSG_OBJ_STATUS_MASK (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST) + +//***************************************************************************** +// +//! The structure used for encapsulating all the items associated with a CAN +//! message object in the CAN controller. +// +//***************************************************************************** +typedef struct +{ + // + //! The CAN message identifier used for 11 or 29 bit identifiers. + // + unsigned long ulMsgID; + + // + //! The message identifier mask used when identifier filtering is enabled. + // + unsigned long ulMsgIDMask; + + // + //! This value holds various status flags and settings specified by + //! tCANObjFlags. + // + unsigned long ulFlags; + + // + //! This value is the number of bytes of data in the message object. + // + unsigned long ulMsgLen; + + // + //! This is a pointer to the message object's data. + // + unsigned char *pucMsgData; +} +tCANMsgObject; + +//***************************************************************************** +// +//! This structure is used for encapsulating the values associated with setting +//! up the bit timing for a CAN controller. The structure is used when calling +//! the CANGetBitTiming and CANSetBitTiming functions. +// +//***************************************************************************** +typedef struct +{ + // + //! This value holds the sum of the Synchronization, Propagation, and Phase + //! Buffer 1 segments, measured in time quanta. The valid values for this + //! setting range from 2 to 16. + // + unsigned int uSyncPropPhase1Seg; + + // + //! This value holds the Phase Buffer 2 segment in time quanta. The valid + //! values for this setting range from 1 to 8. + // + unsigned int uPhase2Seg; + + // + //! This value holds the Resynchronization Jump Width in time quanta. The + //! valid values for this setting range from 1 to 4. + // + unsigned int uSJW; + + // + //! This value holds the CAN_CLK divider used to determine time quanta. + //! The valid values for this setting range from 1 to 1023. + // + unsigned int uQuantumPrescaler; +} +tCANBitClkParms; + +//***************************************************************************** +// +//! This data type is used to identify the interrupt status register. This is +//! used when calling the CANIntStatus() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the CAN interrupt status information. + // + CAN_INT_STS_CAUSE, + + // + //! Read a message object's interrupt status. + // + CAN_INT_STS_OBJECT +} +tCANIntStsReg; + +//***************************************************************************** +// +//! This data type is used to identify which of several status registers to +//! read when calling the CANStatusGet() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the full CAN controller status. + // + CAN_STS_CONTROL, + + // + //! Read the full 32-bit mask of message objects with a transmit request + //! set. + // + CAN_STS_TXREQUEST, + + // + //! Read the full 32-bit mask of message objects with new data available. + // + CAN_STS_NEWDAT, + + // + //! Read the full 32-bit mask of message objects that are enabled. + // + CAN_STS_MSGVAL +} +tCANStsReg; + +//***************************************************************************** +// +// These definitions are used to specify interrupt sources to CANIntEnable() +// and CANIntDisable(). +// +//***************************************************************************** +// +//! This flag is used to allow a CAN controller to generate error +//! interrupts. +// +#define CAN_INT_ERROR 0x00000008 + +// +//! This flag is used to allow a CAN controller to generate status +//! interrupts. +// +#define CAN_INT_STATUS 0x00000004 + +// +//! This flag is used to allow a CAN controller to generate any CAN +//! interrupts. If this is not set, then no interrupts will be generated +//! by the CAN controller. +// +#define CAN_INT_MASTER 0x00000002 + +//***************************************************************************** +// +//! This definition is used to determine the type of message object that will +//! be set up via a call to the CANMessageSet() API. +// +//***************************************************************************** +typedef enum +{ + // + //! Transmit message object. + // + MSG_OBJ_TYPE_TX, + + // + //! Transmit remote request message object + // + MSG_OBJ_TYPE_TX_REMOTE, + + // + //! Receive message object. + // + MSG_OBJ_TYPE_RX, + + // + //! Receive remote request message object. + // + MSG_OBJ_TYPE_RX_REMOTE, + + // + //! Remote frame receive remote, with auto-transmit message object. + // + MSG_OBJ_TYPE_RXTX_REMOTE +} +tMsgObjType; + +//***************************************************************************** +// +// The following enumeration contains all error or status indicators that can +// be returned when calling the CANStatusGet() function. +// +//***************************************************************************** +// +//! CAN controller has entered a Bus Off state. +// +#define CAN_STATUS_BUS_OFF 0x00000080 + +// +//! CAN controller error level has reached warning level. +// +#define CAN_STATUS_EWARN 0x00000040 + +// +//! CAN controller error level has reached error passive level. +// +#define CAN_STATUS_EPASS 0x00000020 + +// +//! A message was received successfully since the last read of this status. +// +#define CAN_STATUS_RXOK 0x00000010 + +// +//! A message was transmitted successfully since the last read of this +//! status. +// +#define CAN_STATUS_TXOK 0x00000008 + +// +//! This is the mask for the last error code field. +// +#define CAN_STATUS_LEC_MSK 0x00000007 + +// +//! There was no error. +// +#define CAN_STATUS_LEC_NONE 0x00000000 + +// +//! A bit stuffing error has occurred. +// +#define CAN_STATUS_LEC_STUFF 0x00000001 + +// +//! A formatting error has occurred. +// +#define CAN_STATUS_LEC_FORM 0x00000002 + +// +//! An acknowledge error has occurred. +// +#define CAN_STATUS_LEC_ACK 0x00000003 + +// +//! The bus remained a bit level of 1 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT1 0x00000004 + +// +//! The bus remained a bit level of 0 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT0 0x00000005 + +// +//! A CRC error has occurred. +// +#define CAN_STATUS_LEC_CRC 0x00000006 + +// +//! This is the mask for the CAN Last Error Code (LEC). +// +#define CAN_STATUS_LEC_MASK 0x00000007 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern void CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern unsigned long CANBitRateSet(unsigned long ulBase, + unsigned long ulSourceClock, + unsigned long ulBitRate); +extern void CANDisable(unsigned long ulBase); +extern void CANEnable(unsigned long ulBase); +extern tBoolean CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount); +extern void CANInit(unsigned long ulBase); +extern void CANIntClear(unsigned long ulBase, unsigned long ulIntClr); +extern void CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern unsigned long CANIntStatus(unsigned long ulBase, + tCANIntStsReg eIntStsReg); +extern void CANIntUnregister(unsigned long ulBase); +extern void CANMessageClear(unsigned long ulBase, unsigned long ulObjID); +extern void CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt); +extern void CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType); +extern tBoolean CANRetryGet(unsigned long ulBase); +extern void CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry); +extern unsigned long CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg); + +//***************************************************************************** +// +// Several CAN APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define CANSetBitTiming(a, b) CANBitTimingSet(a, b) +#define CANGetBitTiming(a, b) CANBitTimingGet(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +#endif // __CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.c new file mode 100644 index 00000000..e3b6920c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.c @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// cpu.c - Instruction wrappers for special CPU instructions needed by the +// drivers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "driverlib/cpulib.h" + +//***************************************************************************** +// +// Wrapper function for the CPSID instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsid(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + cpsid i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function returning the state of PRIMASK (indicating whether +// interrupts are enabled or disabled). +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUprimask(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the CPSIE instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsie(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + mrs r0, PRIMASK; + cpsie i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the WFI instruction. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + wfi; + bx lr +} +#endif +#if defined(ccs) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for writing the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUbasepriSet(unsigned long ulNewBasepri) +{ + + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + msr BASEPRI, r0; + bx lr +} +#endif +#if defined(ccs) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for reading the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUbasepriGet(void) +{ + unsigned long ulRet; + + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + mrs r0, BASEPRI; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.h new file mode 100644 index 00000000..c0e073e1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/cpulib.h @@ -0,0 +1,60 @@ +//***************************************************************************** +// +// cpu.h - Prototypes for the CPU instruction wrapper functions. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CPU_H__ +#define __CPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes. +// +//***************************************************************************** +extern unsigned long CPUcpsid(void); +extern unsigned long CPUcpsie(void); +extern unsigned long CPUprimask(void); +extern void CPUwfi(void); +extern unsigned long CPUbasepriGet(void); +extern void CPUbasepriSet(unsigned long ulNewBasepri); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __CPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/debug.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/debug.h new file mode 100644 index 00000000..b94a8096 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/debug.h @@ -0,0 +1,58 @@ +//***************************************************************************** +// +// debug.h - Macros for assisting debug of the driver library. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + + +#include "boot.h" + +//***************************************************************************** +// +// Prototype for the function that is called when an invalid argument is passed +// to an API. This is only used when doing a DEBUG build. +// +//***************************************************************************** +#ifndef NDEBUG +extern void AssertFailure(blt_char *file, blt_int32u line); +#endif + +//***************************************************************************** +// +// The ASSERT macro, which does the actual assertion checking. Typically, this +// will be for procedure arguments. +// +//***************************************************************************** +#ifdef NDEBUG +#define ASSERT(expr) +#else +#define ASSERT(expr) { \ + if(!(expr)) \ + { \ + AssertFailure(__FILE__, __LINE__); \ + } \ + } +#endif + +#endif // __DEBUG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.c new file mode 100644 index 00000000..ff8024f8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.c @@ -0,0 +1,912 @@ +//***************************************************************************** +// +// flash.c - Driver for programming the on-chip flash. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup flash_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_flash.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/flashlib.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Program Enable (FMPPE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPPERegs[] = +{ + FLASH_FMPPE, + FLASH_FMPPE1, + FLASH_FMPPE2, + FLASH_FMPPE3 +}; + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Read Enable (FMPRE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPRERegs[] = +{ + FLASH_FMPRE, + FLASH_FMPRE1, + FLASH_FMPRE2, + FLASH_FMPRE3 +}; + +//***************************************************************************** +// +//! Gets the number of processor clocks per micro-second. +//! +//! This function returns the number of clocks per micro-second, as presently +//! known by the flash controller. +//! +//! \return Returns the number of processor clocks per micro-second. +// +//***************************************************************************** +unsigned long +FlashUsecGet(void) +{ + // + // Return the number of clocks per micro-second. + // + return(HWREG(FLASH_USECRL) + 1); +} + +//***************************************************************************** +// +//! Sets the number of processor clocks per micro-second. +//! +//! \param ulClocks is the number of processor clocks per micro-second. +//! +//! This function is used to tell the flash controller the number of processor +//! clocks per micro-second. This value must be programmed correctly or the +//! flash most likely will not program correctly; it has no affect on reading +//! flash. +//! +//! \return None. +// +//***************************************************************************** +void +FlashUsecSet(unsigned long ulClocks) +{ + // + // Set the number of clocks per micro-second. + // + HWREG(FLASH_USECRL) = ulClocks - 1; +} + +//***************************************************************************** +// +//! Erases a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be erased. +//! +//! This function will erase a 1 kB block of the on-chip flash. After erasing, +//! the block will be filled with 0xFF bytes. Read-only and execute-only +//! blocks cannot be erased. +//! +//! This function will not return until the block has been erased. +//! +//! \return Returns 0 on success, or -1 if an invalid block address was +//! specified or the block is write-protected. +// +//***************************************************************************** +long +FlashClear(unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & (FLASH_ERASE_SIZE - 1))); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // Erase the block. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_ERASE; + + // + // Wait until the block has been erased. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_ERASE) + { + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Programs flash. +//! +//! \param pulData is a pointer to the data to be programmed. +//! \param ulAddress is the starting address in flash to be programmed. Must +//! be a multiple of four. +//! \param ulCount is the number of bytes to be programmed. Must be a multiple +//! of four. +//! +//! This function will program a sequence of words into the on-chip flash. +//! Programming each location consists of the result of an AND operation +//! of the new data and the existing data; in other words bits that contain +//! 1 can remain 1 or be changed to 0, but bits that are 0 cannot be changed +//! to 1. Therefore, a word can be programmed multiple times as long as these +//! rules are followed; if a program operation attempts to change a 0 bit to +//! a 1 bit, that bit will not have its value changed. +//! +//! Since the flash is programmed one word at a time, the starting address and +//! byte count must both be multiples of four. It is up to the caller to +//! verify the programmed contents, if such verification is required. +//! +//! This function will not return until the data has been programmed. +//! +//! \return Returns 0 on success, or -1 if a programming error is encountered. +// +//***************************************************************************** +long +FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & 3)); + ASSERT(!(ulCount & 3)); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // See if this device has a write buffer. + // + if(HWREG(SYSCTL_NVMSTAT) & SYSCTL_NVMSTAT_FWB) + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Set the address of this block of words. + // + HWREG(FLASH_FMA) = ulAddress & ~(0x7f); + + // + // Loop over the words in this 32-word block. + // + while(((ulAddress & 0x7c) || (HWREG(FLASH_FWBVAL) == 0)) && + (ulCount != 0)) + { + // + // Write this word into the write buffer. + // + HWREG(FLASH_FWBN + (ulAddress & 0x7c)) = *pulData++; + ulAddress += 4; + ulCount -= 4; + } + + // + // Program the contents of the write buffer into flash. + // + HWREG(FLASH_FMC2) = FLASH_FMC2_WRKEY | FLASH_FMC2_WRBUF; + + // + // Wait until the write buffer has been programmed. + // + while(HWREG(FLASH_FMC2) & FLASH_FMC2_WRBUF) + { + } + } + } + else + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Program the next word. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMD) = *pulData; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_WRITE; + + // + // Wait until the word has been programmed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_WRITE) + { + } + + // + // Increment to the next word. + // + pulData++; + ulAddress += 4; + ulCount -= 4; + } + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be queried. +//! +//! This function will get the current protection for the specified 2 kB block +//! of flash. Each block can be read/write, read-only, or execute-only. +//! Read/write blocks can be read, executed, erased, and programmed. Read-only +//! blocks can be read and executed. Execute-only blocks can only be executed; +//! processor and debugger data reads are not allowed. +//! +//! \return Returns the protection setting for this block. See +//! FlashProtectSet() for possible values. +// +//***************************************************************************** +tFlashProtection +FlashProtectGet(unsigned long ulAddress) +{ + unsigned long ulFMPRE, ulFMPPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + + // + // Calculate the Flash Bank from Base Address, and mask off the Bank + // from ulAddress for subsequent reference. + // + ulBank = (((ulAddress / FLASH_PROTECT_SIZE) / 32) % 4); + ulAddress &= ((FLASH_PROTECT_SIZE * 32) - 1); + + // + // Read the appropriate flash protection registers for the specified + // flash bank. + // + ulFMPRE = HWREG(g_pulFMPRERegs[ulBank]); + ulFMPPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When Querying Block + // Protection, assume these bits are 1. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulFMPRE |= (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + } + + // + // Check the appropriate protection bits for the block of memory that + // is specified by the address. + // + switch((((ulFMPRE >> (ulAddress / FLASH_PROTECT_SIZE)) & + FLASH_FMP_BLOCK_0) << 1) | + ((ulFMPPE >> (ulAddress / FLASH_PROTECT_SIZE)) & FLASH_FMP_BLOCK_0)) + { + // + // This block is marked as execute only (that is, it can not be erased + // or programmed, and the only reads allowed are via the instruction + // fetch interface). + // + case 0: + case 1: + { + return(FlashExecuteOnly); + } + + // + // This block is marked as read only (that is, it can not be erased or + // programmed). + // + case 2: + { + return(FlashReadOnly); + } + + // + // This block is read/write; it can be read, erased, and programmed. + // + case 3: + default: + { + return(FlashReadWrite); + } + } +} + +//***************************************************************************** +// +//! Sets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be protected. +//! \param eProtect is the protection to be applied to the block. Can be one +//! of \b FlashReadWrite, \b FlashReadOnly, or \b FlashExecuteOnly. +//! +//! This function will set the protection for the specified 2 kB block of +//! flash. Blocks which are read/write can be made read-only or execute-only. +//! Blocks which are read-only can be made execute-only. Blocks which are +//! execute-only cannot have their protection modified. Attempts to make the +//! block protection less stringent (that is, read-only to read/write) will +//! result in a failure (and be prevented by the hardware). +//! +//! Changes to the flash protection are maintained only until the next reset. +//! This allows the application to be executed in the desired flash protection +//! environment to check for inappropriate flash access (via the flash +//! interrupt). To make the flash protection permanent, use the +//! FlashProtectSave() function. +//! +//! \return Returns 0 on success, or -1 if an invalid address or an invalid +//! protection was specified. +// +//***************************************************************************** +long +FlashProtectSet(unsigned long ulAddress, tFlashProtection eProtect) +{ + unsigned long ulProtectRE, ulProtectPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + ASSERT((eProtect == FlashReadWrite) || (eProtect == FlashReadOnly) || + (eProtect == FlashExecuteOnly)); + + // + // Convert the address into a block number. + // + ulAddress /= FLASH_PROTECT_SIZE; + + // + // ulAddress contains a "raw" block number. Derive the Flash Bank from + // the "raw" block number, and convert ulAddress to a "relative" + // block number. + // + ulBank = ((ulAddress / 32) % 4); + ulAddress %= 32; + + // + // Get the current protection for the specified flash bank. + // + ulProtectRE = HWREG(g_pulFMPRERegs[ulBank]); + ulProtectPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When setting protection, + // check to see if block 30 or 31 and protection is FlashExecuteOnly. If + // so, return an error condition. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + if((ulAddress >= 30) && (eProtect == FlashExecuteOnly)) + { + return(-1); + } + } + + // + // Set the protection based on the requested proection. + // + switch(eProtect) + { + // + // Make this block execute only. + // + case FlashExecuteOnly: + { + // + // Turn off the read and program bits for this block. + // + ulProtectRE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read only. + // + case FlashReadOnly: + { + // + // The block can not be made read only if it is execute only. + // + if(((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) + { + return(-1); + } + + // + // Make this block read only. + // + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read/write. + // + case FlashReadWrite: + default: + { + // + // The block can not be made read/write if it is not already + // read/write. + // + if((((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) || + (((ulProtectPE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0)) + { + return(-1); + } + + // + // The block is already read/write, so there is nothing to do. + // + return(0); + } + } + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG options, and are not + // available for the FLASH protection scheme. When setting block + // protection, ensure that these bits are not altered. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulProtectRE &= ~(FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + ulProtectRE |= (HWREG(g_pulFMPRERegs[ulBank]) & + (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30)); + } + + // + // Set the new protection for the specified flash bank. + // + HWREG(g_pulFMPRERegs[ulBank]) = ulProtectRE; + HWREG(g_pulFMPPERegs[ulBank]) = ulProtectPE; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the flash protection settings. +//! +//! This function will make the currently programmed flash protection settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change the flash protection. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashProtectSave(void) +{ + int ulTemp, ulLimit; + + // + // If running on a Sandstorm-class device, only trigger a save of the first + // two protection registers (FMPRE and FMPPE). Otherwise, save the + // entire bank of flash protection registers. + // + ulLimit = CLASS_IS_SANDSTORM ? 2 : 8; + for(ulTemp = 0; ulTemp < ulLimit; ulTemp++) + { + // + // Tell the flash controller to write the flash protection register. + // + HWREG(FLASH_FMA) = ulTemp; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the user registers. +//! +//! \param pulUser0 is a pointer to the location to store USER Register 0. +//! \param pulUser1 is a pointer to the location to store USER Register 1. +//! +//! This function will read the contents of user registers (0 and 1), and +//! store them in the specified locations. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1) +{ + // + // Verify that the pointers are valid. + // + ASSERT(pulUser0 != 0); + ASSERT(pulUser1 != 0); + + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Get and store the current value of the user registers. + // + *pulUser0 = HWREG(FLASH_USERREG0); + *pulUser1 = HWREG(FLASH_USERREG1); + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Sets the user registers. +//! +//! \param ulUser0 is the value to store in USER Register 0. +//! \param ulUser1 is the value to store in USER Register 1. +//! +//! This function will set the contents of the user registers (0 and 1) to +//! the specified values. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSet(unsigned long ulUser0, unsigned long ulUser1) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Save the new values into the user registers. + // + HWREG(FLASH_USERREG0) = ulUser0; + HWREG(FLASH_USERREG1) = ulUser1; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the user registers. +//! +//! This function will make the currently programmed user register settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change this setting. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSave(void) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Setting the MSB of FMA will trigger a permanent save of a USER + // register. Bit 0 will indicate User 0 (0) or User 1 (1). + // + HWREG(FLASH_FMA) = 0x80000000; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Tell the flash controller to write the USER1 Register. + // + HWREG(FLASH_FMA) = 0x80000001; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the flash interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the flash +//! interrupt occurs. +//! +//! This sets the handler to be called when the flash interrupt occurs. The +//! flash controller can generate an interrupt when an invalid flash access +//! occurs, such as trying to program or erase a read-only block, or trying to +//! read from an execute-only block. It can also generate an interrupt when a +//! program or erase operation has completed. The interrupt will be +//! automatically enabled when the handler is registered. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_FLASH, pfnHandler); + + // + // Enable the flash interrupt. + // + IntEnable(INT_FLASH); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the flash interrupt. +//! +//! This function will clear the handler to be called when the flash interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler is no longer called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_FLASH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_FLASH); +} + +//***************************************************************************** +// +//! Enables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Enables the indicated flash controller interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntEnable(unsigned long ulIntFlags) +{ + // + // Enable the specified interrupts. + // + HWREG(FLASH_FCIM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Disables the indicated flash controller interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntDisable(unsigned long ulIntFlags) +{ + // + // Disable the specified interrupts. + // + HWREG(FLASH_FCIM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the flash controller. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b FLASH_INT_PROGRAM and \b FLASH_INT_ACCESS. +// +//***************************************************************************** +unsigned long +FlashIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(FLASH_FCMISC)); + } + else + { + return(HWREG(FLASH_FCRIS)); + } +} + +//***************************************************************************** +// +//! Clears flash controller interrupt sources. +//! +//! \param ulIntFlags is the bit mask of the interrupt sources to be cleared. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_AMISC values. +//! +//! The specified flash controller interrupt sources are cleared, so that they +//! no longer assert. This must be done in the interrupt handler to keep it +//! from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntClear(unsigned long ulIntFlags) +{ + // + // Clear the flash interrupt. + // + HWREG(FLASH_FCMISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.h new file mode 100644 index 00000000..31e56412 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/flashlib.h @@ -0,0 +1,106 @@ +//***************************************************************************** +// +// flash.h - Prototypes for the flash driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __FLASH_H__ +#define __FLASH_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to FlashProtectSet(), and returned by +// FlashProtectGet(). +// +//***************************************************************************** +typedef enum +{ + FlashReadWrite, // Flash can be read and written + FlashReadOnly, // Flash can only be read + FlashExecuteOnly // Flash can only be executed +} +tFlashProtection; + +//***************************************************************************** +// +// Values passed to FlashIntEnable(), FlashIntDisable() and FlashIntClear() and +// returned from FlashIntStatus(). +// +//***************************************************************************** +#define FLASH_INT_PROGRAM 0x00000002 // Programming Interrupt Mask +#define FLASH_INT_ACCESS 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long FlashUsecGet(void); +extern void FlashUsecSet(unsigned long ulClocks); +extern long FlashClear(unsigned long ulAddress); +extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount); +extern tFlashProtection FlashProtectGet(unsigned long ulAddress); +extern long FlashProtectSet(unsigned long ulAddress, + tFlashProtection eProtect); +extern long FlashProtectSave(void); +extern long FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1); +extern long FlashUserSet(unsigned long ulUser0, unsigned long ulUser1); +extern long FlashUserSave(void); +extern void FlashIntRegister(void (*pfnHandler)(void)); +extern void FlashIntUnregister(void); +extern void FlashIntEnable(unsigned long ulIntFlags); +extern void FlashIntDisable(unsigned long ulIntFlags); +extern unsigned long FlashIntStatus(tBoolean bMasked); +extern void FlashIntClear(unsigned long ulIntFlags); + +//***************************************************************************** +// +// Deprecated function names. These definitions ensure backwards compatibility +// but new code should avoid using deprecated function names since these will +// be removed at some point in the future. +// +//***************************************************************************** +#ifndef DEPRECATED +#define FlashIntGetStatus FlashIntStatus +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.c new file mode 100644 index 00000000..4e5afa7c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.c @@ -0,0 +1,1600 @@ +//***************************************************************************** +// +// gpio.c - API for GPIO ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup gpio_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_gpio.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/gpio.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// The base addresses of all the GPIO modules. Both the APB and AHB apertures +// are provided. +// +//***************************************************************************** +static const unsigned long g_pulGPIOBaseAddrs[] = +{ + GPIO_PORTA_BASE, GPIO_PORTA_AHB_BASE, + GPIO_PORTB_BASE, GPIO_PORTB_AHB_BASE, + GPIO_PORTC_BASE, GPIO_PORTC_AHB_BASE, + GPIO_PORTD_BASE, GPIO_PORTD_AHB_BASE, + GPIO_PORTE_BASE, GPIO_PORTE_AHB_BASE, + GPIO_PORTF_BASE, GPIO_PORTF_AHB_BASE, + GPIO_PORTG_BASE, GPIO_PORTG_AHB_BASE, + GPIO_PORTH_BASE, GPIO_PORTH_AHB_BASE, + GPIO_PORTJ_BASE, GPIO_PORTJ_AHB_BASE, +}; + +//***************************************************************************** +// +//! \internal +//! Checks a GPIO base address. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function determines if a GPIO port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +GPIOBaseValid(unsigned long ulPort) +{ + return((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTA_AHB_BASE) || + (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTB_AHB_BASE) || + (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTC_AHB_BASE) || + (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTD_AHB_BASE) || + (ulPort == GPIO_PORTE_BASE) || (ulPort == GPIO_PORTE_AHB_BASE) || + (ulPort == GPIO_PORTF_BASE) || (ulPort == GPIO_PORTF_AHB_BASE) || + (ulPort == GPIO_PORTG_BASE) || (ulPort == GPIO_PORTG_AHB_BASE) || + (ulPort == GPIO_PORTH_BASE) || (ulPort == GPIO_PORTH_AHB_BASE) || + (ulPort == GPIO_PORTJ_BASE) || (ulPort == GPIO_PORTJ_AHB_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Gets the GPIO interrupt number. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! Given a GPIO base address, returns the corresponding interrupt number. +//! +//! \return Returns a GPIO interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +GPIOGetIntNumber(unsigned long ulPort) +{ + unsigned int ulInt; + + // + // Determine the GPIO interrupt number for the given module. + // + switch(ulPort) + { + case GPIO_PORTA_BASE: + case GPIO_PORTA_AHB_BASE: + { + ulInt = INT_GPIOA; + break; + } + + case GPIO_PORTB_BASE: + case GPIO_PORTB_AHB_BASE: + { + ulInt = INT_GPIOB; + break; + } + + case GPIO_PORTC_BASE: + case GPIO_PORTC_AHB_BASE: + { + ulInt = INT_GPIOC; + break; + } + + case GPIO_PORTD_BASE: + case GPIO_PORTD_AHB_BASE: + { + ulInt = INT_GPIOD; + break; + } + + case GPIO_PORTE_BASE: + case GPIO_PORTE_AHB_BASE: + { + ulInt = INT_GPIOE; + break; + } + + case GPIO_PORTF_BASE: + case GPIO_PORTF_AHB_BASE: + { + ulInt = INT_GPIOF; + break; + } + + case GPIO_PORTG_BASE: + case GPIO_PORTG_AHB_BASE: + { + ulInt = INT_GPIOG; + break; + } + + case GPIO_PORTH_BASE: + case GPIO_PORTH_AHB_BASE: + { + ulInt = INT_GPIOH; + break; + } + + case GPIO_PORTJ_BASE: + case GPIO_PORTJ_AHB_BASE: + { + ulInt = INT_GPIOJ; + break; + } + + default: + { + return(-1); + } + } + + // + // Return GPIO interrupt number. + // + return(ulInt); +} + +//***************************************************************************** +// +//! Sets the direction and mode of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulPinIO is the pin direction and/or mode. +//! +//! This function will set the specified pin(s) on the selected GPIO port +//! as either an input or output under software control, or it will set the +//! pin to be under hardware control. +//! +//! The parameter \e ulPinIO is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_DIR_MODE_IN +//! - \b GPIO_DIR_MODE_OUT +//! - \b GPIO_DIR_MODE_HW +//! +//! where \b GPIO_DIR_MODE_IN specifies that the pin will be programmed as +//! a software controlled input, \b GPIO_DIR_MODE_OUT specifies that the pin +//! will be programmed as a software controlled output, and +//! \b GPIO_DIR_MODE_HW specifies that the pin will be placed under +//! hardware control. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note GPIOPadConfigSet() must also be used to configure the corresponding +//! pad(s) in order for them to propagate the signal to/from the GPIO. +//! +//! \return None. +// +//***************************************************************************** +void +GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulPinIO == GPIO_DIR_MODE_IN) || (ulPinIO == GPIO_DIR_MODE_OUT) || + (ulPinIO == GPIO_DIR_MODE_HW)); + + // + // Set the pin direction and mode. + // + HWREG(ulPort + GPIO_O_DIR) = ((ulPinIO & 1) ? + (HWREG(ulPort + GPIO_O_DIR) | ucPins) : + (HWREG(ulPort + GPIO_O_DIR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_AFSEL) = ((ulPinIO & 2) ? + (HWREG(ulPort + GPIO_O_AFSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AFSEL) & + ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the direction and mode of a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the direction and control mode for a specified pin on +//! the selected GPIO port. The pin can be configured as either an input or +//! output under software control, or it can be under hardware control. The +//! type of control and direction are returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIODirModeSet(). +// +//***************************************************************************** +unsigned long +GPIODirModeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulDir, ulAFSEL; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin direction and mode. + // + ulDir = HWREG(ulPort + GPIO_O_DIR); + ulAFSEL = HWREG(ulPort + GPIO_O_AFSEL); + return(((ulDir & ucPin) ? 1 : 0) | ((ulAFSEL & ucPin) ? 2 : 0)); +} + +//***************************************************************************** +// +//! Sets the interrupt type for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulIntType specifies the type of interrupt trigger mechanism. +//! +//! This function sets up the various interrupt trigger mechanisms for the +//! specified pin(s) on the selected GPIO port. +//! +//! The parameter \e ulIntType is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_FALLING_EDGE +//! - \b GPIO_RISING_EDGE +//! - \b GPIO_BOTH_EDGES +//! - \b GPIO_LOW_LEVEL +//! - \b GPIO_HIGH_LEVEL +//! +//! where the different values describe the interrupt detection mechanism +//! (edge or level) and the particular triggering event (falling, rising, +//! or both edges for edge detect, low or high for level detect). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note In order to avoid any spurious interrupts, the user must +//! ensure that the GPIO inputs remain stable for the duration of +//! this function. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulIntType == GPIO_FALLING_EDGE) || + (ulIntType == GPIO_RISING_EDGE) || (ulIntType == GPIO_BOTH_EDGES) || + (ulIntType == GPIO_LOW_LEVEL) || (ulIntType == GPIO_HIGH_LEVEL)); + + // + // Set the pin interrupt type. + // + HWREG(ulPort + GPIO_O_IBE) = ((ulIntType & 1) ? + (HWREG(ulPort + GPIO_O_IBE) | ucPins) : + (HWREG(ulPort + GPIO_O_IBE) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IS) = ((ulIntType & 2) ? + (HWREG(ulPort + GPIO_O_IS) | ucPins) : + (HWREG(ulPort + GPIO_O_IS) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IEV) = ((ulIntType & 4) ? + (HWREG(ulPort + GPIO_O_IEV) | ucPins) : + (HWREG(ulPort + GPIO_O_IEV) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the interrupt type for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the interrupt type for a specified pin on the selected +//! GPIO port. The pin can be configured as a falling edge, rising edge, or +//! both edge detected interrupt, or it can be configured as a low level or +//! high level detected interrupt. The type of interrupt detection mechanism +//! is returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIOIntTypeSet(). +// +//***************************************************************************** +unsigned long +GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulIBE, ulIS, ulIEV; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin interrupt type. + // + ulIBE = HWREG(ulPort + GPIO_O_IBE); + ulIS = HWREG(ulPort + GPIO_O_IS); + ulIEV = HWREG(ulPort + GPIO_O_IEV); + return(((ulIBE & ucPin) ? 1 : 0) | ((ulIS & ucPin) ? 2 : 0) | + ((ulIEV & ucPin) ? 4 : 0)); +} + +//***************************************************************************** +// +//! Sets the pad configuration for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulStrength specifies the output drive strength. +//! \param ulPinType specifies the pin type. +//! +//! This function sets the drive strength and type for the specified pin(s) +//! on the selected GPIO port. For pin(s) configured as input ports, the +//! pad is configured as requested, but the only real effect on the input +//! is the configuration of the pull-up or pull-down termination. +//! +//! The parameter \e ulStrength can be one of the following values: +//! +//! - \b GPIO_STRENGTH_2MA +//! - \b GPIO_STRENGTH_4MA +//! - \b GPIO_STRENGTH_8MA +//! - \b GPIO_STRENGTH_8MA_SC +//! +//! where \b GPIO_STRENGTH_xMA specifies either 2, 4, or 8 mA output drive +//! strength, and \b GPIO_OUT_STRENGTH_8MA_SC specifies 8 mA output drive with +//! slew control. +//! +//! The parameter \e ulPinType can be one of the following values: +//! +//! - \b GPIO_PIN_TYPE_STD +//! - \b GPIO_PIN_TYPE_STD_WPU +//! - \b GPIO_PIN_TYPE_STD_WPD +//! - \b GPIO_PIN_TYPE_OD +//! - \b GPIO_PIN_TYPE_OD_WPU +//! - \b GPIO_PIN_TYPE_OD_WPD +//! - \b GPIO_PIN_TYPE_ANALOG +//! +//! where \b GPIO_PIN_TYPE_STD* specifies a push-pull pin, \b GPIO_PIN_TYPE_OD* +//! specifies an open-drain pin, \b *_WPU specifies a weak pull-up, \b *_WPD +//! specifies a weak pull-down, and \b GPIO_PIN_TYPE_ANALOG specifies an +//! analog input (for the comparators). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, unsigned long ulPinType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulStrength == GPIO_STRENGTH_2MA) || + (ulStrength == GPIO_STRENGTH_4MA) || + (ulStrength == GPIO_STRENGTH_8MA) || + (ulStrength == GPIO_STRENGTH_8MA_SC)); + ASSERT((ulPinType == GPIO_PIN_TYPE_STD) || + (ulPinType == GPIO_PIN_TYPE_STD_WPU) || + (ulPinType == GPIO_PIN_TYPE_STD_WPD) || + (ulPinType == GPIO_PIN_TYPE_OD) || + (ulPinType == GPIO_PIN_TYPE_OD_WPU) || + (ulPinType == GPIO_PIN_TYPE_OD_WPD) || + (ulPinType == GPIO_PIN_TYPE_ANALOG)) + + // + // Set the output drive strength. + // + HWREG(ulPort + GPIO_O_DR2R) = ((ulStrength & 1) ? + (HWREG(ulPort + GPIO_O_DR2R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR2R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR4R) = ((ulStrength & 2) ? + (HWREG(ulPort + GPIO_O_DR4R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR4R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR8R) = ((ulStrength & 4) ? + (HWREG(ulPort + GPIO_O_DR8R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR8R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_SLR) = ((ulStrength & 8) ? + (HWREG(ulPort + GPIO_O_SLR) | ucPins) : + (HWREG(ulPort + GPIO_O_SLR) & ~(ucPins))); + + // + // Set the pin type. + // + HWREG(ulPort + GPIO_O_ODR) = ((ulPinType & 1) ? + (HWREG(ulPort + GPIO_O_ODR) | ucPins) : + (HWREG(ulPort + GPIO_O_ODR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PUR) = ((ulPinType & 2) ? + (HWREG(ulPort + GPIO_O_PUR) | ucPins) : + (HWREG(ulPort + GPIO_O_PUR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PDR) = ((ulPinType & 4) ? + (HWREG(ulPort + GPIO_O_PDR) | ucPins) : + (HWREG(ulPort + GPIO_O_PDR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DEN) = ((ulPinType & 8) ? + (HWREG(ulPort + GPIO_O_DEN) | ucPins) : + (HWREG(ulPort + GPIO_O_DEN) & ~(ucPins))); + + // + // Set the analog mode select register. This register only appears in + // DustDevil-class (and later) devices, but is a harmless write on + // Sandstorm- and Fury-class devices. + // + HWREG(ulPort + GPIO_O_AMSEL) = + ((ulPinType == GPIO_PIN_TYPE_ANALOG) ? + (HWREG(ulPort + GPIO_O_AMSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AMSEL) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the pad configuration for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! \param pulStrength is a pointer to storage for the output drive strength. +//! \param pulPinType is a pointer to storage for the output drive type. +//! +//! This function gets the pad configuration for a specified pin on the +//! selected GPIO port. The values returned in \e pulStrength and +//! \e pulPinType correspond to the values used in GPIOPadConfigSet(). This +//! function also works for pin(s) configured as input pin(s); however, the +//! only meaningful data returned is whether the pin is terminated with a +//! pull-up or down resistor. +//! +//! \return None +// +//***************************************************************************** +void +GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, unsigned long *pulPinType) +{ + unsigned long ulTemp1, ulTemp2, ulTemp3, ulTemp4; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = (1 << ucPin); + + // + // Get the drive strength for this pin. + // + ulTemp1 = HWREG(ulPort + GPIO_O_DR2R); + ulTemp2 = HWREG(ulPort + GPIO_O_DR4R); + ulTemp3 = HWREG(ulPort + GPIO_O_DR8R); + ulTemp4 = HWREG(ulPort + GPIO_O_SLR); + *pulStrength = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); + + // + // Get the pin type. + // + ulTemp1 = HWREG(ulPort + GPIO_O_ODR); + ulTemp2 = HWREG(ulPort + GPIO_O_PUR); + ulTemp3 = HWREG(ulPort + GPIO_O_PDR); + ulTemp4 = HWREG(ulPort + GPIO_O_DEN); + *pulPinType = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); +} + +//***************************************************************************** +// +//! Enables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Unmasks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Enable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) |= ucPins; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Masks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Disable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) &= ~(ucPins); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns a bit-packed byte, where each bit that is set identifies +//! an active masked or raw interrupt, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the interrupt status. + // + if(bMasked) + { + return(HWREG(ulPort + GPIO_O_MIS)); + } + else + { + return(HWREG(ulPort + GPIO_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the interrupt for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Clears the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Clear the interrupts. + // + HWREG(ulPort + GPIO_O_ICR) = ucPins; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param pfnIntHandler is a pointer to the GPIO port interrupt handling +//! function. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected from the selected +//! GPIO port. This function will also enable the corresponding GPIO interrupt +//! in the interrupt controller; individual pin interrupts and interrupt +//! sources must be enabled with GPIOPinIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntRegister(unsigned long ulPort, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Register the interrupt handler. + // + IntRegister(ulPort, pfnIntHandler); + + // + // Enable the GPIO interrupt. + // + IntEnable(ulPort); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function will unregister the interrupt handler for the specified +//! GPIO port. This function will also disable the corresponding +//! GPIO port interrupt in the interrupt controller; individual GPIO interrupts +//! and interrupt sources must be disabled with GPIOPinIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntUnregister(unsigned long ulPort) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Disable the GPIO interrupt. + // + IntDisable(ulPort); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulPort); +} + +//***************************************************************************** +// +//! Reads the values present of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The values at the specified pin(s) are read, as specified by \e ucPins. +//! Values are returned for both input and output pin(s), and the value +//! for pin(s) that are not specified by \e ucPins are set to 0. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return Returns a bit-packed byte providing the state of the specified +//! pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents +//! GPIO port pin 1, and so on. Any bit that is not specified by \e ucPins +//! is returned as a 0. Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinRead(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the pin value(s). + // + return(HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2)))); +} + +//***************************************************************************** +// +//! Writes a value to the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ucVal is the value to write to the pin(s). +//! +//! Writes the corresponding bit values to the output pin(s) specified by +//! \e ucPins. Writing to a pin configured as an input pin has no effect. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Write the pins. + // + HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))) = ucVal; +} + +//***************************************************************************** +// +//! Configures pin(s) for use as analog-to-digital converter inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog-to-digital converter input pins must be properly configured +//! to function correctly on DustDevil-class devices. This function provides +//! the proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an ADC input; it only +//! configures an ADC input pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as a CAN device. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CAN pins must be properly configured for the CAN peripherals to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a CAN pin; it only +//! configures a CAN pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as an analog comparator input. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog comparator input pins must be properly configured for the analog +//! comparator to function correctly. This function provides the proper +//! configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an analog comparator input; +//! it only configures an analog comparator pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO inputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO open drain outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutputOD(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2C peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The I2C pins must be properly configured for the I2C peripheral to function +//! correctly. This function provides the proper configuration for those +//! pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an I2C pin; it only +//! configures an I2C pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for open-drain operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the PWM peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The PWM pins must be properly configured for the PWM peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a PWM pin; it only +//! configures a PWM pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the QEI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The QEI pins must be properly configured for the QEI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, not using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a QEI pin; it only +//! configures a QEI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the SSI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The SSI pins must be properly configured for the SSI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a SSI pin; it only +//! configures a SSI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Timer peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CCP pins must be properly configured for the timer peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a timer pin; it only +//! configures a timer pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the UART peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The UART pins must be properly configured for the UART peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a UART pin; it only +//! configures a UART pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB digital pins must be properly configured for the USB peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital USB pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! This function should only be used with EPEN and PFAULT pins as all other +//! USB pins are analog in nature or are not used in devices without OTG +//! functionality. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB analog pins must be properly configured for the USB peripheral to +//! function correctly. This function provides the proper configuration for +//! any USB pin(s). This can also be used to configure the EPEN and PFAULT pins +//! so that they are no longer used by the USB controller. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2S peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some I2S pins must be properly configured for the I2S peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital I2S pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a I2S pin; it only +//! configures a I2S pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Ethernet peripheral as LED signals. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The Ethernet peripheral provides two signals that can be used to drive +//! an LED (e.g. for link status/activity). This function provides a typical +//! configuration for the pins. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an Ethernet LED pin; it only +//! configures an Ethernet LED pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the external peripheral interface. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The external peripheral interface pins must be properly configured for the +//! external peripheral interface to function correctly. This function +//! provides a typica configuration for those pin(s); other configurations may +//! work as well depending upon the board setup (for exampe, using the on-chip +//! pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an external peripheral +//! interface pin; it only configures an external peripheral interface pin for +//! proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures the alternate function of a GPIO pin. +//! +//! \param ulPinConfig is the pin configuration value, specified as only one of +//! the \b GPIO_P??_??? values. +//! +//! This function configures the pin mux that selects the peripheral function +//! associated with a particular GPIO pin. Only one peripheral function at a +//! time can be associated with a GPIO pin, and each peripheral function should +//! only be associated with a single GPIO pin at a time (despite the fact that +//! many of them can be associated with more than one GPIO pin). +//! +//! \note This function is only valid on Tempest-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinConfigure(unsigned long ulPinConfig) +{ + unsigned long ulBase, ulShift; + + // + // Check the argument. + // + ASSERT(((ulPinConfig >> 16) & 0xff) < 9); + ASSERT(((ulPinConfig >> 8) & 0xe3) == 0); + + // + // Extract the base address index from the input value. + // + ulBase = (ulPinConfig >> 16) & 0xff; + + // + // Get the base address of the GPIO module, selecting either the APB or the + // AHB aperture as appropriate. + // + if(HWREG(SYSCTL_GPIOHBCTL) & (1 << ulBase)) + { + ulBase = g_pulGPIOBaseAddrs[(ulBase << 1) + 1]; + } + else + { + ulBase = g_pulGPIOBaseAddrs[ulBase << 1]; + } + + // + // Extract the shift from the input value. + // + ulShift = (ulPinConfig >> 8) & 0xff; + + // + // Write the requested pin muxing value for this GPIO pin. + // + HWREG(ulBase + GPIO_O_PCTL) = ((HWREG(ulBase + GPIO_O_PCTL) & + ~(0xf << ulShift)) | + ((ulPinConfig & 0xf) << ulShift)); + +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.h new file mode 100644 index 00000000..3b60fc77 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/gpio.h @@ -0,0 +1,767 @@ +//***************************************************************************** +// +// gpio.h - Defines and Macros for GPIO API. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __GPIO_H__ +#define __GPIO_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following values define the bit field for the ucPins argument to several +// of the APIs. +// +//***************************************************************************** +#define GPIO_PIN_0 0x00000001 // GPIO pin 0 +#define GPIO_PIN_1 0x00000002 // GPIO pin 1 +#define GPIO_PIN_2 0x00000004 // GPIO pin 2 +#define GPIO_PIN_3 0x00000008 // GPIO pin 3 +#define GPIO_PIN_4 0x00000010 // GPIO pin 4 +#define GPIO_PIN_5 0x00000020 // GPIO pin 5 +#define GPIO_PIN_6 0x00000040 // GPIO pin 6 +#define GPIO_PIN_7 0x00000080 // GPIO pin 7 + +//***************************************************************************** +// +// Values that can be passed to GPIODirModeSet as the ulPinIO parameter, and +// returned from GPIODirModeGet. +// +//***************************************************************************** +#define GPIO_DIR_MODE_IN 0x00000000 // Pin is a GPIO input +#define GPIO_DIR_MODE_OUT 0x00000001 // Pin is a GPIO output +#define GPIO_DIR_MODE_HW 0x00000002 // Pin is a peripheral function + +//***************************************************************************** +// +// Values that can be passed to GPIOIntTypeSet as the ulIntType parameter, and +// returned from GPIOIntTypeGet. +// +//***************************************************************************** +#define GPIO_FALLING_EDGE 0x00000000 // Interrupt on falling edge +#define GPIO_RISING_EDGE 0x00000004 // Interrupt on rising edge +#define GPIO_BOTH_EDGES 0x00000001 // Interrupt on both edges +#define GPIO_LOW_LEVEL 0x00000002 // Interrupt on low level +#define GPIO_HIGH_LEVEL 0x00000007 // Interrupt on high level + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulStrength parameter, +// and returned by GPIOPadConfigGet in the *pulStrength parameter. +// +//***************************************************************************** +#define GPIO_STRENGTH_2MA 0x00000001 // 2mA drive strength +#define GPIO_STRENGTH_4MA 0x00000002 // 4mA drive strength +#define GPIO_STRENGTH_8MA 0x00000004 // 8mA drive strength +#define GPIO_STRENGTH_8MA_SC 0x0000000C // 8mA drive with slew rate control + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulPadType parameter, +// and returned by GPIOPadConfigGet in the *pulPadType parameter. +// +//***************************************************************************** +#define GPIO_PIN_TYPE_STD 0x00000008 // Push-pull +#define GPIO_PIN_TYPE_STD_WPU 0x0000000A // Push-pull with weak pull-up +#define GPIO_PIN_TYPE_STD_WPD 0x0000000C // Push-pull with weak pull-down +#define GPIO_PIN_TYPE_OD 0x00000009 // Open-drain +#define GPIO_PIN_TYPE_OD_WPU 0x0000000B // Open-drain with weak pull-up +#define GPIO_PIN_TYPE_OD_WPD 0x0000000D // Open-drain with weak pull-down +#define GPIO_PIN_TYPE_ANALOG 0x00000000 // Analog comparator + +//***************************************************************************** +// +// Values that can be passed to GPIOPinConfigure as the ulPinConfig parameter. +// +//***************************************************************************** +// +// GPIO pin A0 +// +#define GPIO_PA0_U0RX 0x00000001 +#define GPIO_PA0_I2C1SCL 0x00000008 +#define GPIO_PA0_U1RX 0x00000009 + +// +// GPIO pin A1 +// +#define GPIO_PA1_U0TX 0x00000401 +#define GPIO_PA1_I2C1SDA 0x00000408 +#define GPIO_PA1_U1TX 0x00000409 + +// +// GPIO pin A2 +// +#define GPIO_PA2_SSI0CLK 0x00000801 +#define GPIO_PA2_PWM4 0x00000804 +#define GPIO_PA2_I2S0RXSD 0x00000809 + +// +// GPIO pin A3 +// +#define GPIO_PA3_SSI0FSS 0x00000c01 +#define GPIO_PA3_PWM5 0x00000c04 +#define GPIO_PA3_I2S0RXMCLK 0x00000c09 + +// +// GPIO pin A4 +// +#define GPIO_PA4_SSI0RX 0x00001001 +#define GPIO_PA4_PWM6 0x00001004 +#define GPIO_PA4_CAN0RX 0x00001005 +#define GPIO_PA4_I2S0TXSCK 0x00001009 + +// +// GPIO pin A5 +// +#define GPIO_PA5_SSI0TX 0x00001401 +#define GPIO_PA5_PWM7 0x00001404 +#define GPIO_PA5_CAN0TX 0x00001405 +#define GPIO_PA5_I2S0TXWS 0x00001409 + +// +// GPIO pin A6 +// +#define GPIO_PA6_I2C1SCL 0x00001801 +#define GPIO_PA6_CCP1 0x00001802 +#define GPIO_PA6_PWM0 0x00001804 +#define GPIO_PA6_PWM4 0x00001805 +#define GPIO_PA6_CAN0RX 0x00001806 +#define GPIO_PA6_USB0EPEN 0x00001808 +#define GPIO_PA6_U1CTS 0x00001809 + +// +// GPIO pin A7 +// +#define GPIO_PA7_I2C1SDA 0x00001c01 +#define GPIO_PA7_CCP4 0x00001c02 +#define GPIO_PA7_PWM1 0x00001c04 +#define GPIO_PA7_PWM5 0x00001c05 +#define GPIO_PA7_CAN0TX 0x00001c06 +#define GPIO_PA7_CCP3 0x00001c07 +#define GPIO_PA7_USB0PFLT 0x00001c08 +#define GPIO_PA7_U1DCD 0x00001c09 + +// +// GPIO pin B0 +// +#define GPIO_PB0_CCP0 0x00010001 +#define GPIO_PB0_PWM2 0x00010002 +#define GPIO_PB0_U1RX 0x00010005 + +// +// GPIO pin B1 +// +#define GPIO_PB1_CCP2 0x00010401 +#define GPIO_PB1_PWM3 0x00010402 +#define GPIO_PB1_CCP1 0x00010404 +#define GPIO_PB1_U1TX 0x00010405 + +// +// GPIO pin B2 +// +#define GPIO_PB2_I2C0SCL 0x00010801 +#define GPIO_PB2_IDX0 0x00010802 +#define GPIO_PB2_CCP3 0x00010804 +#define GPIO_PB2_CCP0 0x00010805 +#define GPIO_PB2_USB0EPEN 0x00010808 + +// +// GPIO pin B3 +// +#define GPIO_PB3_I2C0SDA 0x00010c01 +#define GPIO_PB3_FAULT0 0x00010c02 +#define GPIO_PB3_FAULT3 0x00010c04 +#define GPIO_PB3_USB0PFLT 0x00010c08 + +// +// GPIO pin B4 +// +#define GPIO_PB4_U2RX 0x00011004 +#define GPIO_PB4_CAN0RX 0x00011005 +#define GPIO_PB4_IDX0 0x00011006 +#define GPIO_PB4_U1RX 0x00011007 +#define GPIO_PB4_EPI0S23 0x00011008 + +// +// GPIO pin B5 +// +#define GPIO_PB5_C0O 0x00011401 +#define GPIO_PB5_CCP5 0x00011402 +#define GPIO_PB5_CCP6 0x00011403 +#define GPIO_PB5_CCP0 0x00011404 +#define GPIO_PB5_CAN0TX 0x00011405 +#define GPIO_PB5_CCP2 0x00011406 +#define GPIO_PB5_U1TX 0x00011407 +#define GPIO_PB5_EPI0S22 0x00011408 + +// +// GPIO pin B6 +// +#define GPIO_PB6_CCP1 0x00011801 +#define GPIO_PB6_CCP7 0x00011802 +#define GPIO_PB6_C0O 0x00011803 +#define GPIO_PB6_FAULT1 0x00011804 +#define GPIO_PB6_IDX0 0x00011805 +#define GPIO_PB6_CCP5 0x00011806 +#define GPIO_PB6_I2S0TXSCK 0x00011809 + +// +// GPIO pin B7 +// +#define GPIO_PB7_NMI 0x00011c04 + +// +// GPIO pin C0 +// +#define GPIO_PC0_TCK 0x00020003 + +// +// GPIO pin C1 +// +#define GPIO_PC1_TMS 0x00020403 + +// +// GPIO pin C2 +// +#define GPIO_PC2_TDI 0x00020803 + +// +// GPIO pin C3 +// +#define GPIO_PC3_TDO 0x00020c03 + +// +// GPIO pin C4 +// +#define GPIO_PC4_CCP5 0x00021001 +#define GPIO_PC4_PHA0 0x00021002 +#define GPIO_PC4_PWM6 0x00021004 +#define GPIO_PC4_CCP2 0x00021005 +#define GPIO_PC4_CCP4 0x00021006 +#define GPIO_PC4_EPI0S2 0x00021008 +#define GPIO_PC4_CCP1 0x00021009 + +// +// GPIO pin C5 +// +#define GPIO_PC5_CCP1 0x00021401 +#define GPIO_PC5_C1O 0x00021402 +#define GPIO_PC5_C0O 0x00021403 +#define GPIO_PC5_FAULT2 0x00021404 +#define GPIO_PC5_CCP3 0x00021405 +#define GPIO_PC5_USB0EPEN 0x00021406 +#define GPIO_PC5_EPI0S3 0x00021408 + +// +// GPIO pin C6 +// +#define GPIO_PC6_CCP3 0x00021801 +#define GPIO_PC6_PHB0 0x00021802 +#define GPIO_PC6_C2O 0x00021803 +#define GPIO_PC6_PWM7 0x00021804 +#define GPIO_PC6_U1RX 0x00021805 +#define GPIO_PC6_CCP0 0x00021806 +#define GPIO_PC6_USB0PFLT 0x00021807 +#define GPIO_PC6_EPI0S4 0x00021808 + +// +// GPIO pin C7 +// +#define GPIO_PC7_CCP4 0x00021c01 +#define GPIO_PC7_PHB0 0x00021c02 +#define GPIO_PC7_CCP0 0x00021c04 +#define GPIO_PC7_U1TX 0x00021c05 +#define GPIO_PC7_USB0PFLT 0x00021c06 +#define GPIO_PC7_C1O 0x00021c07 +#define GPIO_PC7_EPI0S5 0x00021c08 + +// +// GPIO pin D0 +// +#define GPIO_PD0_PWM0 0x00030001 +#define GPIO_PD0_CAN0RX 0x00030002 +#define GPIO_PD0_IDX0 0x00030003 +#define GPIO_PD0_U2RX 0x00030004 +#define GPIO_PD0_U1RX 0x00030005 +#define GPIO_PD0_CCP6 0x00030006 +#define GPIO_PD0_I2S0RXSCK 0x00030008 +#define GPIO_PD0_U1CTS 0x00030009 + +// +// GPIO pin D1 +// +#define GPIO_PD1_PWM1 0x00030401 +#define GPIO_PD1_CAN0TX 0x00030402 +#define GPIO_PD1_PHA0 0x00030403 +#define GPIO_PD1_U2TX 0x00030404 +#define GPIO_PD1_U1TX 0x00030405 +#define GPIO_PD1_CCP7 0x00030406 +#define GPIO_PD1_I2S0RXWS 0x00030408 +#define GPIO_PD1_U1DCD 0x00030409 +#define GPIO_PD1_CCP2 0x0003040a +#define GPIO_PD1_PHB1 0x0003040b + +// +// GPIO pin D2 +// +#define GPIO_PD2_U1RX 0x00030801 +#define GPIO_PD2_CCP6 0x00030802 +#define GPIO_PD2_PWM2 0x00030803 +#define GPIO_PD2_CCP5 0x00030804 +#define GPIO_PD2_EPI0S20 0x00030808 + +// +// GPIO pin D3 +// +#define GPIO_PD3_U1TX 0x00030c01 +#define GPIO_PD3_CCP7 0x00030c02 +#define GPIO_PD3_PWM3 0x00030c03 +#define GPIO_PD3_CCP0 0x00030c04 +#define GPIO_PD3_EPI0S21 0x00030c08 + +// +// GPIO pin D4 +// +#define GPIO_PD4_CCP0 0x00031001 +#define GPIO_PD4_CCP3 0x00031002 +#define GPIO_PD4_I2S0RXSD 0x00031008 +#define GPIO_PD4_U1RI 0x00031009 +#define GPIO_PD4_EPI0S19 0x0003100a + +// +// GPIO pin D5 +// +#define GPIO_PD5_CCP2 0x00031401 +#define GPIO_PD5_CCP4 0x00031402 +#define GPIO_PD5_I2S0RXMCLK 0x00031408 +#define GPIO_PD5_U2RX 0x00031409 +#define GPIO_PD5_EPI0S28 0x0003140a + +// +// GPIO pin D6 +// +#define GPIO_PD6_FAULT0 0x00031801 +#define GPIO_PD6_I2S0TXSCK 0x00031808 +#define GPIO_PD6_U2TX 0x00031809 +#define GPIO_PD6_EPI0S29 0x0003180a + +// +// GPIO pin D7 +// +#define GPIO_PD7_IDX0 0x00031c01 +#define GPIO_PD7_C0O 0x00031c02 +#define GPIO_PD7_CCP1 0x00031c03 +#define GPIO_PD7_I2S0TXWS 0x00031c08 +#define GPIO_PD7_U1DTR 0x00031c09 +#define GPIO_PD7_EPI0S30 0x00031c0a + +// +// GPIO pin E0 +// +#define GPIO_PE0_PWM4 0x00040001 +#define GPIO_PE0_SSI1CLK 0x00040002 +#define GPIO_PE0_CCP3 0x00040003 +#define GPIO_PE0_EPI0S8 0x00040008 +#define GPIO_PE0_USB0PFLT 0x00040009 + +// +// GPIO pin E1 +// +#define GPIO_PE1_PWM5 0x00040401 +#define GPIO_PE1_SSI1FSS 0x00040402 +#define GPIO_PE1_FAULT0 0x00040403 +#define GPIO_PE1_CCP2 0x00040404 +#define GPIO_PE1_CCP6 0x00040405 +#define GPIO_PE1_EPI0S9 0x00040408 + +// +// GPIO pin E2 +// +#define GPIO_PE2_CCP4 0x00040801 +#define GPIO_PE2_SSI1RX 0x00040802 +#define GPIO_PE2_PHB1 0x00040803 +#define GPIO_PE2_PHA0 0x00040804 +#define GPIO_PE2_CCP2 0x00040805 +#define GPIO_PE2_EPI0S24 0x00040808 + +// +// GPIO pin E3 +// +#define GPIO_PE3_CCP1 0x00040c01 +#define GPIO_PE3_SSI1TX 0x00040c02 +#define GPIO_PE3_PHA1 0x00040c03 +#define GPIO_PE3_PHB0 0x00040c04 +#define GPIO_PE3_CCP7 0x00040c05 +#define GPIO_PE3_EPI0S25 0x00040c08 + +// +// GPIO pin E4 +// +#define GPIO_PE4_CCP3 0x00041001 +#define GPIO_PE4_FAULT0 0x00041004 +#define GPIO_PE4_U2TX 0x00041005 +#define GPIO_PE4_CCP2 0x00041006 +#define GPIO_PE4_I2S0TXWS 0x00041009 + +// +// GPIO pin E5 +// +#define GPIO_PE5_CCP5 0x00041401 +#define GPIO_PE5_I2S0TXSD 0x00041409 + +// +// GPIO pin E6 +// +#define GPIO_PE6_PWM4 0x00041801 +#define GPIO_PE6_C1O 0x00041802 +#define GPIO_PE6_U1CTS 0x00041809 + +// +// GPIO pin E7 +// +#define GPIO_PE7_PWM5 0x00041c01 +#define GPIO_PE7_C2O 0x00041c02 +#define GPIO_PE7_U1DCD 0x00041c09 + +// +// GPIO pin F0 +// +#define GPIO_PF0_CAN1RX 0x00050001 +#define GPIO_PF0_PHB0 0x00050002 +#define GPIO_PF0_PWM0 0x00050003 +#define GPIO_PF0_I2S0TXSD 0x00050008 +#define GPIO_PF0_U1DSR 0x00050009 + +// +// GPIO pin F1 +// +#define GPIO_PF1_CAN1TX 0x00050401 +#define GPIO_PF1_IDX1 0x00050402 +#define GPIO_PF1_PWM1 0x00050403 +#define GPIO_PF1_I2S0TXMCLK 0x00050408 +#define GPIO_PF1_U1RTS 0x00050409 +#define GPIO_PF1_CCP3 0x0005040a + +// +// GPIO pin F2 +// +#define GPIO_PF2_LED1 0x00050801 +#define GPIO_PF2_PWM4 0x00050802 +#define GPIO_PF2_PWM2 0x00050804 +#define GPIO_PF2_SSI1CLK 0x00050809 + +// +// GPIO pin F3 +// +#define GPIO_PF3_LED0 0x00050c01 +#define GPIO_PF3_PWM5 0x00050c02 +#define GPIO_PF3_PWM3 0x00050c04 +#define GPIO_PF3_SSI1FSS 0x00050c09 + +// +// GPIO pin F4 +// +#define GPIO_PF4_CCP0 0x00051001 +#define GPIO_PF4_C0O 0x00051002 +#define GPIO_PF4_FAULT0 0x00051004 +#define GPIO_PF4_EPI0S12 0x00051008 +#define GPIO_PF4_SSI1RX 0x00051009 + +// +// GPIO pin F5 +// +#define GPIO_PF5_CCP2 0x00051401 +#define GPIO_PF5_C1O 0x00051402 +#define GPIO_PF5_EPI0S15 0x00051408 +#define GPIO_PF5_SSI1TX 0x00051409 + +// +// GPIO pin F6 +// +#define GPIO_PF6_CCP1 0x00051801 +#define GPIO_PF6_C2O 0x00051802 +#define GPIO_PF6_PHA0 0x00051804 +#define GPIO_PF6_I2S0TXMCLK 0x00051809 +#define GPIO_PF6_U1RTS 0x0005180a + +// +// GPIO pin F7 +// +#define GPIO_PF7_CCP4 0x00051c01 +#define GPIO_PF7_PHB0 0x00051c04 +#define GPIO_PF7_EPI0S12 0x00051c08 +#define GPIO_PF7_FAULT1 0x00051c09 + +// +// GPIO pin G0 +// +#define GPIO_PG0_U2RX 0x00060001 +#define GPIO_PG0_PWM0 0x00060002 +#define GPIO_PG0_I2C1SCL 0x00060003 +#define GPIO_PG0_PWM4 0x00060004 +#define GPIO_PG0_USB0EPEN 0x00060007 +#define GPIO_PG0_EPI0S13 0x00060008 + +// +// GPIO pin G1 +// +#define GPIO_PG1_U2TX 0x00060401 +#define GPIO_PG1_PWM1 0x00060402 +#define GPIO_PG1_I2C1SDA 0x00060403 +#define GPIO_PG1_PWM5 0x00060404 +#define GPIO_PG1_EPI0S14 0x00060408 + +// +// GPIO pin G2 +// +#define GPIO_PG2_PWM0 0x00060801 +#define GPIO_PG2_FAULT0 0x00060804 +#define GPIO_PG2_IDX1 0x00060808 +#define GPIO_PG2_I2S0RXSD 0x00060809 + +// +// GPIO pin G3 +// +#define GPIO_PG3_PWM1 0x00060c01 +#define GPIO_PG3_FAULT2 0x00060c04 +#define GPIO_PG3_FAULT0 0x00060c08 +#define GPIO_PG3_I2S0RXMCLK 0x00060c09 + +// +// GPIO pin G4 +// +#define GPIO_PG4_CCP3 0x00061001 +#define GPIO_PG4_FAULT1 0x00061004 +#define GPIO_PG4_EPI0S15 0x00061008 +#define GPIO_PG4_PWM6 0x00061009 +#define GPIO_PG4_U1RI 0x0006100a + +// +// GPIO pin G5 +// +#define GPIO_PG5_CCP5 0x00061401 +#define GPIO_PG5_IDX0 0x00061404 +#define GPIO_PG5_FAULT1 0x00061405 +#define GPIO_PG5_PWM7 0x00061408 +#define GPIO_PG5_I2S0RXSCK 0x00061409 +#define GPIO_PG5_U1DTR 0x0006140a + +// +// GPIO pin G6 +// +#define GPIO_PG6_PHA1 0x00061801 +#define GPIO_PG6_PWM6 0x00061804 +#define GPIO_PG6_FAULT1 0x00061808 +#define GPIO_PG6_I2S0RXWS 0x00061809 +#define GPIO_PG6_U1RI 0x0006180a + +// +// GPIO pin G7 +// +#define GPIO_PG7_PHB1 0x00061c01 +#define GPIO_PG7_PWM7 0x00061c04 +#define GPIO_PG7_CCP5 0x00061c08 +#define GPIO_PG7_EPI0S31 0x00061c09 + +// +// GPIO pin H0 +// +#define GPIO_PH0_CCP6 0x00070001 +#define GPIO_PH0_PWM2 0x00070002 +#define GPIO_PH0_EPI0S6 0x00070008 +#define GPIO_PH0_PWM4 0x00070009 + +// +// GPIO pin H1 +// +#define GPIO_PH1_CCP7 0x00070401 +#define GPIO_PH1_PWM3 0x00070402 +#define GPIO_PH1_EPI0S7 0x00070408 +#define GPIO_PH1_PWM5 0x00070409 + +// +// GPIO pin H2 +// +#define GPIO_PH2_IDX1 0x00070801 +#define GPIO_PH2_C1O 0x00070802 +#define GPIO_PH2_FAULT3 0x00070804 +#define GPIO_PH2_EPI0S1 0x00070808 + +// +// GPIO pin H3 +// +#define GPIO_PH3_PHB0 0x00070c01 +#define GPIO_PH3_FAULT0 0x00070c02 +#define GPIO_PH3_USB0EPEN 0x00070c04 +#define GPIO_PH3_EPI0S0 0x00070c08 + +// +// GPIO pin H4 +// +#define GPIO_PH4_USB0PFLT 0x00071004 +#define GPIO_PH4_EPI0S10 0x00071008 +#define GPIO_PH4_SSI1CLK 0x0007100b + +// +// GPIO pin H5 +// +#define GPIO_PH5_EPI0S11 0x00071408 +#define GPIO_PH5_FAULT2 0x0007140a +#define GPIO_PH5_SSI1FSS 0x0007140b + +// +// GPIO pin H6 +// +#define GPIO_PH6_EPI0S26 0x00071808 +#define GPIO_PH6_PWM4 0x0007180a +#define GPIO_PH6_SSI1RX 0x0007180b + +// +// GPIO pin H7 +// +#define GPIO_PH7_EPI0S27 0x00071c08 +#define GPIO_PH7_PWM5 0x00071c0a +#define GPIO_PH7_SSI1TX 0x00071c0b + +// +// GPIO pin J0 +// +#define GPIO_PJ0_EPI0S16 0x00080008 +#define GPIO_PJ0_PWM0 0x0008000a +#define GPIO_PJ0_I2C1SCL 0x0008000b + +// +// GPIO pin J1 +// +#define GPIO_PJ1_EPI0S17 0x00080408 +#define GPIO_PJ1_USB0PFLT 0x00080409 +#define GPIO_PJ1_PWM1 0x0008040a +#define GPIO_PJ1_I2C1SDA 0x0008040b + +// +// GPIO pin J2 +// +#define GPIO_PJ2_EPI0S18 0x00080808 +#define GPIO_PJ2_CCP0 0x00080809 +#define GPIO_PJ2_FAULT0 0x0008080a + +// +// GPIO pin J3 +// +#define GPIO_PJ3_EPI0S19 0x00080c08 +#define GPIO_PJ3_U1CTS 0x00080c09 +#define GPIO_PJ3_CCP6 0x00080c0a + +// +// GPIO pin J4 +// +#define GPIO_PJ4_EPI0S28 0x00081008 +#define GPIO_PJ4_U1DCD 0x00081009 +#define GPIO_PJ4_CCP4 0x0008100a + +// +// GPIO pin J5 +// +#define GPIO_PJ5_EPI0S29 0x00081408 +#define GPIO_PJ5_U1DSR 0x00081409 +#define GPIO_PJ5_CCP2 0x0008140a + +// +// GPIO pin J6 +// +#define GPIO_PJ6_EPI0S30 0x00081808 +#define GPIO_PJ6_U1RTS 0x00081809 +#define GPIO_PJ6_CCP1 0x0008180a + +// +// GPIO pin J7 +// +#define GPIO_PJ7_U1DTR 0x00081c09 +#define GPIO_PJ7_CCP0 0x00081c0a + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO); +extern unsigned long GPIODirModeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType); +extern unsigned long GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, + unsigned long ulPadType); +extern void GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, + unsigned long *pulPadType); +extern void GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins); +extern long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked); +extern void GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPortIntRegister(unsigned long ulPort, + void (*pfnIntHandler)(void)); +extern void GPIOPortIntUnregister(unsigned long ulPort); +extern long GPIOPinRead(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, + unsigned char ucVal); +extern void GPIOPinConfigure(unsigned long ulPinConfig); +extern void GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutputOD(unsigned long ulPort, + unsigned char ucPins); +extern void GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.c new file mode 100644 index 00000000..6f588ad7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.c @@ -0,0 +1,723 @@ +//***************************************************************************** +// +// interrupt.c - Driver for the NVIC Interrupt Controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup interrupt_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/cpulib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is a mapping between priority grouping encodings and the number of +// preemption priority bits. +// +//***************************************************************************** +static const unsigned long g_pulPriority[] = +{ + NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6, + NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3, + NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1 +}; + +//***************************************************************************** +// +// This is a mapping between interrupt number and the register that contains +// the priority encoding for that interrupt. +// +//***************************************************************************** +static const unsigned long g_pulRegs[] = +{ + 0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1, + NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7, + NVIC_PRI8, NVIC_PRI9, NVIC_PRI10, NVIC_PRI11, NVIC_PRI12, NVIC_PRI13 +}; + +//***************************************************************************** +// +//! \internal +//! The default interrupt handler. +//! +//! This is the default interrupt handler for all interrupts. It simply loops +//! forever so that the system state is preserved for observation by a +//! debugger. Since interrupts should be disabled before unregistering the +//! corresponding handler, this should never be called. +//! +//! \return None. +// +//***************************************************************************** +static void +IntDefaultHandler(void) +{ + // + // Go into an infinite loop. + // + while(1) + { + } +} + +//***************************************************************************** +// +// The processor vector table. +// +// This contains a list of the handlers for the various interrupt sources in +// the system. The layout of this list is defined by the hardware; assertion +// of an interrupt causes the processor to start executing directly at the +// address given in the corresponding location in this list. +// +//***************************************************************************** +#if defined(ewarm) +static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE"; +#elif defined(sourcerygxx) +static __attribute__((section(".cs3.region-head.ram"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#elif defined(ccs) +#pragma DATA_SECTION(g_pfnRAMVectors, ".vtable") +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#else +static __attribute__((section("vtable"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#endif + +//***************************************************************************** +// +//! Enables the processor interrupt. +//! +//! Allows the processor to respond to interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were disabled when the function was +//! called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterEnable(void) +{ + // + // Enable processor interrupts. + // + return(CPUcpsie()); +} + +//***************************************************************************** +// +//! Disables the processor interrupt. +//! +//! Prevents the processor from receiving interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were already disabled when the +//! function was called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterDisable(void) +{ + // + // Disable processor interrupts. + // + return(CPUcpsid()); +} + +//***************************************************************************** +// +//! Registers a function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param pfnHandler is a pointer to the function to be called. +//! +//! This function is used to specify the handler function to be called when the +//! given interrupt is asserted to the processor. When the interrupt occurs, +//! if it is enabled (via IntEnable()), the handler function will be called in +//! interrupt context. Since the handler function can preempt other code, care +//! must be taken to protect memory or peripherals that are accessed by the +//! handler and other non-handler code. +//! +//! \note The use of this function (directly or indirectly via a peripheral +//! driver interrupt register function) moves the interrupt vector table from +//! flash to SRAM. Therefore, care must be taken when linking the application +//! to ensure that the SRAM vector table is located at the beginning of SRAM; +//! otherwise NVIC will not look in the correct portion of memory for the +//! vector table (it requires the vector table be on a 1 kB memory alignment). +//! Normally, the SRAM vector table is so placed via the use of linker scripts. +//! See the discussion of compile-time versus run-time interrupt handler +//! registration in the introduction to this chapter. +//! +//! \return None. +// +//***************************************************************************** +void +IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)) +{ + unsigned long ulIdx, ulValue; + + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Make sure that the RAM vector table is correctly aligned. + // + ASSERT(((unsigned long)g_pfnRAMVectors & 0x000003ff) == 0); + + // + // See if the RAM vector table has been initialized. + // + if(HWREG(NVIC_VTABLE) != (unsigned long)g_pfnRAMVectors) + { + // + // Copy the vector table from the beginning of FLASH to the RAM vector + // table. + // + ulValue = HWREG(NVIC_VTABLE); + for(ulIdx = 0; ulIdx < NUM_INTERRUPTS; ulIdx++) + { + g_pfnRAMVectors[ulIdx] = (void (*)(void))HWREG((ulIdx * 4) + + ulValue); + } + + // + // Point NVIC at the RAM vector table. + // + HWREG(NVIC_VTABLE) = (unsigned long)g_pfnRAMVectors; + } + + // + // Save the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = pfnHandler; +} + +//***************************************************************************** +// +//! Unregisters the function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function is used to indicate that no handler should be called when the +//! given interrupt is asserted to the processor. The interrupt source will be +//! automatically disabled (via IntDisable()) if necessary. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +IntUnregister(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Reset the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = IntDefaultHandler; +} + +//***************************************************************************** +// +//! Sets the priority grouping of the interrupt controller. +//! +//! \param ulBits specifies the number of bits of preemptable priority. +//! +//! This function specifies the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. The range of +//! the grouping values are dependent upon the hardware implementation; on +//! the Stellaris family, three bits are available for hardware interrupt +//! prioritization and therefore priority grouping values of three through +//! seven have the same effect. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityGroupingSet(unsigned long ulBits) +{ + // + // Check the arguments. + // + ASSERT(ulBits < NUM_PRIORITY); + + // + // Set the priority grouping. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | g_pulPriority[ulBits]; +} + +//***************************************************************************** +// +//! Gets the priority grouping of the interrupt controller. +//! +//! This function returns the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. +//! +//! \return The number of bits of preemptable priority. +// +//***************************************************************************** +unsigned long +IntPriorityGroupingGet(void) +{ + unsigned long ulLoop, ulValue; + + // + // Read the priority grouping. + // + ulValue = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M; + + // + // Loop through the priority grouping values. + // + for(ulLoop = 0; ulLoop < NUM_PRIORITY; ulLoop++) + { + // + // Stop looping if this value matches. + // + if(ulValue == g_pulPriority[ulLoop]) + { + break; + } + } + + // + // Return the number of priority bits. + // + return(ulLoop); +} + +//***************************************************************************** +// +//! Sets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param ucPriority specifies the priority of the interrupt. +//! +//! This function is used to set the priority of an interrupt. When multiple +//! interrupts are asserted simultaneously, the ones with the highest priority +//! are processed before the lower priority interrupts. Smaller numbers +//! correspond to higher interrupt priorities; priority 0 is the highest +//! interrupt priority. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. The remaining bits can be +//! used to sub-prioritize the interrupt sources, and may be used by the +//! hardware priority mechanism on a future part. This arrangement allows +//! priorities to migrate to different NVIC implementations without changing +//! the gross prioritization of the interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +IntPrioritySet(unsigned long ulInterrupt, unsigned char ucPriority) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Set the interrupt priority. + // + ulTemp = HWREG(g_pulRegs[ulInterrupt >> 2]); + ulTemp &= ~(0xFF << (8 * (ulInterrupt & 3))); + ulTemp |= ucPriority << (8 * (ulInterrupt & 3)); + HWREG(g_pulRegs[ulInterrupt >> 2]) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function gets the priority of an interrupt. See IntPrioritySet() for +//! a definition of the priority value. +//! +//! \return Returns the interrupt priority, or -1 if an invalid interrupt was +//! specified. +// +//***************************************************************************** +long +IntPriorityGet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Return the interrupt priority. + // + return((HWREG(g_pulRegs[ulInterrupt >> 2]) >> (8 * (ulInterrupt & 3))) & + 0xFF); +} + +//***************************************************************************** +// +//! Enables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be enabled. +//! +//! The specified interrupt is enabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntEnable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to enable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Enable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM; + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Enable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS; + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Enable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Enable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Disables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be disabled. +//! +//! The specified interrupt is disabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntDisable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to disable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Disable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM); + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Disable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS); + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Disable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE); + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Disable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Pends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be pended. +//! +//! The specified interrupt is pended in the interrupt controller. This will +//! cause the interrupt controller to execute the corresponding interrupt +//! handler at the next available time, based on the current interrupt state +//! priorities. For example, if called by a higher priority interrupt handler, +//! the specified interrupt handler will not be called until after the current +//! interrupt handler has completed execution. The interrupt must have been +//! enabled for it to be called. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendSet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to pend. + // + if(ulInterrupt == FAULT_NMI) + { + // + // Pend the NMI interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_NMI_SET; + } + else if(ulInterrupt == FAULT_PENDSV) + { + // + // Pend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Pend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTSET; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Unpends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be unpended. +//! +//! The specified interrupt is unpended in the interrupt controller. This will +//! cause any previously generated interrupts that have not been handled yet +//! (due to higher priority interrupts or the interrupt no having been enabled +//! yet) to be discarded. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendClear(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to unpend. + // + if(ulInterrupt == FAULT_PENDSV) + { + // + // Unpend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_UNPEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Unpend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTCLR; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Sets the priority masking level +//! +//! \param ulPriorityMask is the priority level that will be masked. +//! +//! This function sets the interrupt priority masking level so that all +//! interrupts at the specified or lesser priority level is masked. This +//! can be used to globally disable a set of interrupts with priority below +//! a predetermined threshold. A value of 0 disables priority +//! masking. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityMaskSet(unsigned long ulPriorityMask) +{ + CPUbasepriSet(ulPriorityMask); +} + +//***************************************************************************** +// +//! Gets the priority masking level +//! +//! This function gets the current setting of the interrupt priority masking +//! level. The value returned is the priority level such that all interrupts +//! of that and lesser priority are masked. A value of 0 means that priority +//! masking is disabled. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return Returns the value of the interrupt priority level mask. +// +//***************************************************************************** +unsigned long +IntPriorityMaskGet(void) +{ + return(CPUbasepriGet()); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.h new file mode 100644 index 00000000..954f5775 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/interrupt.h @@ -0,0 +1,77 @@ +//***************************************************************************** +// +// interrupt.h - Prototypes for the NVIC Interrupt Controller Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __INTERRUPT_H__ +#define __INTERRUPT_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macro to generate an interrupt priority mask based on the number of bits +// of priority supported by the hardware. +// +//***************************************************************************** +#define INT_PRIORITY_MASK ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF) + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean IntMasterEnable(void); +extern tBoolean IntMasterDisable(void); +extern void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)); +extern void IntUnregister(unsigned long ulInterrupt); +extern void IntPriorityGroupingSet(unsigned long ulBits); +extern unsigned long IntPriorityGroupingGet(void); +extern void IntPrioritySet(unsigned long ulInterrupt, + unsigned char ucPriority); +extern long IntPriorityGet(unsigned long ulInterrupt); +extern void IntEnable(unsigned long ulInterrupt); +extern void IntDisable(unsigned long ulInterrupt); +extern void IntPendSet(unsigned long ulInterrupt); +extern void IntPendClear(unsigned long ulInterrupt); +extern void IntPriorityMaskSet(unsigned long ulPriorityMask); +extern unsigned long IntPriorityMaskGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __INTERRUPT_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.c new file mode 100644 index 00000000..0ac2747d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.c @@ -0,0 +1,2366 @@ +//***************************************************************************** +// +// sysctl.c - Driver for the system controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup sysctl_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/cpulib.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// This macro extracts the array index out of the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_INDEX(a) (((a) >> 28) & 0xf) + +//***************************************************************************** +// +// This macro constructs the peripheral bit mask from the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_MASK(a) (((a) & 0xffff) << (((a) & 0x001f0000) >> 16)) + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL DC? register that +// contains the peripheral present bit for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCRegs[] = +{ + SYSCTL_DC1, + SYSCTL_DC2, + SYSCTL_DC4, + SYSCTL_DC1 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SRCR? register that +// controls the software reset for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSRCRRegs[] = +{ + SYSCTL_SRCR0, + SYSCTL_SRCR1, + SYSCTL_SRCR2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_RCGC? register that +// controls the run-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulRCGCRegs[] = +{ + SYSCTL_RCGC0, + SYSCTL_RCGC1, + SYSCTL_RCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SCGC? register that +// controls the sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSCGCRegs[] = +{ + SYSCTL_SCGC0, + SYSCTL_SCGC1, + SYSCTL_SCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_DCGC? register that +// controls the deep-sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCGCRegs[] = +{ + SYSCTL_DCGC0, + SYSCTL_DCGC1, + SYSCTL_DCGC2 +}; + +//***************************************************************************** +// +// An array that maps the crystal number in RCC to a frequency. +// +//***************************************************************************** +static const unsigned long g_pulXtals[] = +{ + 1000000, + 1843200, + 2000000, + 2457600, + 3579545, + 3686400, + 4000000, + 4096000, + 4915200, + 5000000, + 5120000, + 6000000, + 6144000, + 7372800, + 8000000, + 8192000, + 10000000, + 12000000, + 12288000, + 13560000, + 14318180, + 16000000, + 16384000 +}; + +//***************************************************************************** +// +//! \internal +//! Checks a peripheral identifier. +//! +//! \param ulPeripheral is the peripheral identifier. +//! +//! This function determines if a peripheral identifier is valid. +//! +//! \return Returns \b true if the peripheral identifier is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +SysCtlPeripheralValid(unsigned long ulPeripheral) +{ + return((ulPeripheral == SYSCTL_PERIPH_ADC0) || + (ulPeripheral == SYSCTL_PERIPH_ADC1) || + (ulPeripheral == SYSCTL_PERIPH_CAN0) || + (ulPeripheral == SYSCTL_PERIPH_CAN1) || + (ulPeripheral == SYSCTL_PERIPH_CAN2) || + (ulPeripheral == SYSCTL_PERIPH_COMP0) || + (ulPeripheral == SYSCTL_PERIPH_COMP1) || + (ulPeripheral == SYSCTL_PERIPH_COMP2) || + (ulPeripheral == SYSCTL_PERIPH_EPI0) || + (ulPeripheral == SYSCTL_PERIPH_ETH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOJ) || + (ulPeripheral == SYSCTL_PERIPH_HIBERNATE) || + (ulPeripheral == SYSCTL_PERIPH_I2C0) || + (ulPeripheral == SYSCTL_PERIPH_I2C1) || + (ulPeripheral == SYSCTL_PERIPH_I2S0) || + (ulPeripheral == SYSCTL_PERIPH_IEEE1588) || + (ulPeripheral == SYSCTL_PERIPH_MPU) || + (ulPeripheral == SYSCTL_PERIPH_PLL) || + (ulPeripheral == SYSCTL_PERIPH_PWM) || + (ulPeripheral == SYSCTL_PERIPH_QEI0) || + (ulPeripheral == SYSCTL_PERIPH_QEI1) || + (ulPeripheral == SYSCTL_PERIPH_SSI0) || + (ulPeripheral == SYSCTL_PERIPH_SSI1) || + (ulPeripheral == SYSCTL_PERIPH_TEMP) || + (ulPeripheral == SYSCTL_PERIPH_TIMER0) || + (ulPeripheral == SYSCTL_PERIPH_TIMER1) || + (ulPeripheral == SYSCTL_PERIPH_TIMER2) || + (ulPeripheral == SYSCTL_PERIPH_TIMER3) || + (ulPeripheral == SYSCTL_PERIPH_UART0) || + (ulPeripheral == SYSCTL_PERIPH_UART1) || + (ulPeripheral == SYSCTL_PERIPH_UART2) || + (ulPeripheral == SYSCTL_PERIPH_UDMA) || + (ulPeripheral == SYSCTL_PERIPH_USB0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG1)); +} +#endif + +//***************************************************************************** +// +//! Gets the size of the SRAM. +//! +//! This function determines the size of the SRAM on the Stellaris device. +//! +//! \return The total number of bytes of SRAM. +// +//***************************************************************************** +unsigned long +SysCtlSRAMSizeGet(void) +{ + // + // Compute the size of the SRAM. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_SRAMSZ_M) >> 8) + 0x100); +} + +//***************************************************************************** +// +//! Gets the size of the flash. +//! +//! This function determines the size of the flash on the Stellaris device. +//! +//! \return The total number of bytes of flash. +// +//***************************************************************************** +unsigned long +SysCtlFlashSizeGet(void) +{ + // + // Compute the size of the flash. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_M) << 11) + 0x800); +} + +//***************************************************************************** +// +//! Determines if a pin is present. +//! +//! \param ulPin is the pin in question. +//! +//! Determines if a particular pin is present in the device. The PWM, analog +//! comparators, ADC, and timers have a varying number of pins across members +//! of the Stellaris family; this will determine which are present on this +//! device. +//! +//! The \e ulPin argument must be only one of the following values: +//! \b SYSCTL_PIN_PWM0, \b SYSCTL_PIN_PWM1, \b SYSCTL_PIN_PWM2, +//! \b SYSCTL_PIN_PWM3, \b SYSCTL_PIN_PWM4, \b SYSCTL_PIN_PWM5, +//! \b SYSCTL_PIN_C0MINUS, \b SYSCTL_PIN_C0PLUS, \b SYSCTL_PIN_C0O, +//! \b SYSCTL_PIN_C1MINUS, \b SYSCTL_PIN_C1PLUS, \b SYSCTL_PIN_C1O, +//! \b SYSCTL_PIN_C2MINUS, \b SYSCTL_PIN_C2PLUS, \b SYSCTL_PIN_C2O, +//! \b SYSCTL_PIN_ADC0, \b SYSCTL_PIN_ADC1, \b SYSCTL_PIN_ADC2, +//! \b SYSCTL_PIN_ADC3, \b SYSCTL_PIN_ADC4, \b SYSCTL_PIN_ADC5, +//! \b SYSCTL_PIN_ADC6, \b SYSCTL_PIN_ADC7, \b SYSCTL_PIN_CCP0, +//! \b SYSCTL_PIN_CCP1, \b SYSCTL_PIN_CCP2, \b SYSCTL_PIN_CCP3, +//! \b SYSCTL_PIN_CCP4, \b SYSCTL_PIN_CCP5, \b SYSCTL_PIN_CCP6, +//! \b SYSCTL_PIN_CCP7, \b SYSCTL_PIN_32KHZ, or \b SYSCTL_PIN_MC_FAULT0. +//! +//! \return Returns \b true if the specified pin is present and \b false if it +//! is not. +// +//***************************************************************************** +tBoolean +SysCtlPinPresent(unsigned long ulPin) +{ + // + // Check the arguments. + // + ASSERT((ulPin == SYSCTL_PIN_PWM0) || + (ulPin == SYSCTL_PIN_PWM1) || + (ulPin == SYSCTL_PIN_PWM2) || + (ulPin == SYSCTL_PIN_PWM3) || + (ulPin == SYSCTL_PIN_PWM4) || + (ulPin == SYSCTL_PIN_PWM5) || + (ulPin == SYSCTL_PIN_C0MINUS) || + (ulPin == SYSCTL_PIN_C0PLUS) || + (ulPin == SYSCTL_PIN_C0O) || + (ulPin == SYSCTL_PIN_C1MINUS) || + (ulPin == SYSCTL_PIN_C1PLUS) || + (ulPin == SYSCTL_PIN_C1O) || + (ulPin == SYSCTL_PIN_C2MINUS) || + (ulPin == SYSCTL_PIN_C2PLUS) || + (ulPin == SYSCTL_PIN_C2O) || + (ulPin == SYSCTL_PIN_MC_FAULT0) || + (ulPin == SYSCTL_PIN_ADC0) || + (ulPin == SYSCTL_PIN_ADC1) || + (ulPin == SYSCTL_PIN_ADC2) || + (ulPin == SYSCTL_PIN_ADC3) || + (ulPin == SYSCTL_PIN_ADC4) || + (ulPin == SYSCTL_PIN_ADC5) || + (ulPin == SYSCTL_PIN_ADC6) || + (ulPin == SYSCTL_PIN_ADC7) || + (ulPin == SYSCTL_PIN_CCP0) || + (ulPin == SYSCTL_PIN_CCP1) || + (ulPin == SYSCTL_PIN_CCP2) || + (ulPin == SYSCTL_PIN_CCP3) || + (ulPin == SYSCTL_PIN_CCP4) || + (ulPin == SYSCTL_PIN_CCP5) || + (ulPin == SYSCTL_PIN_32KHZ)); + + // + // Determine if this pin is present. + // + if(HWREG(SYSCTL_DC3) & ulPin) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Determines if a peripheral is present. +//! +//! \param ulPeripheral is the peripheral in question. +//! +//! Determines if a particular peripheral is present in the device. Each +//! member of the Stellaris family has a different peripheral set; this will +//! determine which are present on this device. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_IEEE1588, +//! \b SYSCTL_PERIPH_MPU, \b SYSCTL_PERIPH_PLL, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return Returns \b true if the specified peripheral is present and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +SysCtlPeripheralPresent(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Read the correct DC register and determine if this peripheral exists. + // + if(ulPeripheral == SYSCTL_PERIPH_USB0) + { + // + // USB is a special case since the DC bit is missing for USB0. + // + if(HWREG(SYSCTL_DC6) & SYSCTL_DC6_USB0_M) + { + return(true); + } + else + { + return(false); + } + } + else if(HWREG(g_pulDCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) & + SYSCTL_PERIPH_MASK(ulPeripheral)) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Performs a software reset of a peripheral. +//! +//! \param ulPeripheral is the peripheral to reset. +//! +//! This function performs a software reset of the specified peripheral. An +//! individual peripheral reset signal is asserted for a brief period and then +//! deasserted, returning the internal state of the peripheral to its reset +//! condition. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralReset(unsigned long ulPeripheral) +{ + volatile unsigned long ulDelay; + + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Put the peripheral into the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); + + // + // Delay for a little bit. + // + for(ulDelay = 0; ulDelay < 16; ulDelay++) + { + } + + // + // Take the peripheral out of the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral. +//! +//! \param ulPeripheral is the peripheral to enable. +//! +//! Peripherals are enabled with this function. At power-up, all peripherals +//! are disabled; they must be enabled in order to operate or respond to +//! register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \note It takes five clock cycles after the write to enable a peripheral +//! before the the peripheral is actually enabled. During this time, attempts +//! to access the peripheral will result in a bus fault. Care should be taken +//! to ensure that the peripheral is not accessed during this brief time +//! period. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral. +//! +//! \param ulPeripheral is the peripheral to disable. +//! +//! Peripherals are disabled with this function. Once disabled, they will not +//! operate or respond to register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into sleep mode. Since the clocking configuration of the device does +//! not change, any peripheral can safely continue operating while the +//! processor is in sleep mode, and can therefore wake the processor from sleep +//! mode. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into sleep mode. Disabling peripherals while in sleep mode helps to lower +//! the current draw of the device. If enabled (via SysCtlPeripheralEnable()), +//! the peripheral will automatically resume operation when the processor +//! leaves sleep mode, maintaining its entire state from before sleep mode was +//! entered. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in deep-sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into deep-sleep mode. Since the clocking configuration of the device +//! may change, not all peripherals can safely continue operating while the +//! processor is in sleep mode. Those that must run at a particular frequency +//! (such as a UART) will not work as expected if the clock changes. It is the +//! responsibility of the caller to make sensible choices. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in deep-sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps +//! to lower the current draw of the device, and can keep peripherals that +//! require a particular clock frequency from operating when the clock changes +//! as a result of entering deep-sleep mode. If enabled (via +//! SysCtlPeripheralEnable()), the peripheral will automatically resume +//! operation when the processor leaves deep-sleep mode, maintaining its entire +//! state from before deep-sleep mode was entered. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Controls peripheral clock gating in sleep and deep-sleep mode. +//! +//! \param bEnable is a boolean that is \b true if the sleep and deep-sleep +//! peripheral configuration should be used and \b false if not. +//! +//! This function controls how peripherals are clocked when the processor goes +//! into sleep or deep-sleep mode. By default, the peripherals are clocked the +//! same as in run mode; if peripheral clock gating is enabled they are clocked +//! according to the configuration set by SysCtlPeripheralSleepEnable(), +//! SysCtlPeripheralSleepDisable(), SysCtlPeripheralDeepSleepEnable(), and +//! SysCtlPeripheralDeepSleepDisable(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralClockGating(tBoolean bEnable) +{ + // + // Enable peripheral clock gating as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_ACG; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_ACG); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the system control interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the system +//! control interrupt occurs. +//! +//! This sets the handler to be called when a system control interrupt occurs. +//! This will enable the global interrupt in the interrupt controller; specific +//! system control interrupts must be enabled via SysCtlIntEnable(). It is the +//! interrupt handler's responsibility to clear the interrupt source via +//! SysCtlIntClear(). +//! +//! System control can generate interrupts when the PLL achieves lock, if the +//! internal LDO current limit is exceeded, if the internal oscillator fails, +//! if the main oscillator fails, if the internal LDO output voltage droops too +//! much, if the external voltage droops too much, or if the PLL fails. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_SYSCTL, pfnHandler); + + // + // Enable the system control interrupt. + // + IntEnable(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the system control interrupt. +//! +//! This function will clear the handler to be called when a system control +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_SYSCTL); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Enables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be enabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Enables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntEnable(unsigned long ulInts) +{ + // + // Enable the specified interrupts. + // + HWREG(SYSCTL_IMC) |= ulInts; +} + +//***************************************************************************** +// +//! Disables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be disabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Disables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntDisable(unsigned long ulInts) +{ + // + // Disable the specified interrupts. + // + HWREG(SYSCTL_IMC) &= ~(ulInts); +} + +//***************************************************************************** +// +//! Clears system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be cleared. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! The specified system control interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntClear(unsigned long ulInts) +{ + // + // Clear the requested interrupt sources. + // + HWREG(SYSCTL_MISC) = ulInts; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the system controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, \b SYSCTL_INT_IOSC_FAIL, +//! \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, \b SYSCTL_INT_BOR, and +//! \b SYSCTL_INT_PLL_FAIL. +// +//***************************************************************************** +unsigned long +SysCtlIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(SYSCTL_MISC)); + } + else + { + return(HWREG(SYSCTL_RIS)); + } +} + +//***************************************************************************** +// +//! Sets the output voltage of the LDO. +//! +//! \param ulVoltage is the required output voltage from the LDO. Must be one +//! of \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +//! +//! This function sets the output voltage of the LDO. The default voltage is +//! 2.5 V; it can be adjusted +/- 10%. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOSet(unsigned long ulVoltage) +{ + // + // Check the arguments. + // + ASSERT((ulVoltage == SYSCTL_LDO_2_25V) || + (ulVoltage == SYSCTL_LDO_2_30V) || + (ulVoltage == SYSCTL_LDO_2_35V) || + (ulVoltage == SYSCTL_LDO_2_40V) || + (ulVoltage == SYSCTL_LDO_2_45V) || + (ulVoltage == SYSCTL_LDO_2_50V) || + (ulVoltage == SYSCTL_LDO_2_55V) || + (ulVoltage == SYSCTL_LDO_2_60V) || + (ulVoltage == SYSCTL_LDO_2_65V) || + (ulVoltage == SYSCTL_LDO_2_70V) || + (ulVoltage == SYSCTL_LDO_2_75V)); + + // + // Set the LDO voltage to the requested value. + // + HWREG(SYSCTL_LDOPCTL) = ulVoltage; +} + +//***************************************************************************** +// +//! Gets the output voltage of the LDO. +//! +//! This function determines the output voltage of the LDO, as specified by the +//! control register. +//! +//! \return Returns the current voltage of the LDO; will be one of +//! \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +// +//***************************************************************************** +unsigned long +SysCtlLDOGet(void) +{ + // + // Return the LDO voltage setting. + // + return(HWREG(SYSCTL_LDOPCTL)); +} + +//***************************************************************************** +// +//! Configures the LDO failure control. +//! +//! \param ulConfig is the required LDO failure control setting; can be either +//! \b SYSCTL_LDOCFG_ARST or \b SYSCTL_LDOCFG_NORST. +//! +//! This function allows the LDO to be configured to cause a processor reset +//! when the output voltage becomes unregulated. +//! +//! The LDO failure control is only available on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOConfigSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_LDOCFG_ARST) || + (ulConfig == SYSCTL_LDOCFG_NORST)); + + // + // Set the reset control as requested. + // + HWREG(SYSCTL_LDOARST) = ulConfig; +} + +//***************************************************************************** +// +//! Resets the device. +//! +//! This function will perform a software reset of the entire device. The +//! processor and all peripherals will be reset and all device registers will +//! return to their default values (with the exception of the reset cause +//! register, which will maintain its current value but have the software reset +//! bit set as well). +//! +//! \return This function does not return. +// +//***************************************************************************** +void +SysCtlReset(void) +{ + // + // Perform a software reset request. This will cause the device to reset, + // no further code will be executed. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ; + + // + // The device should have reset, so this should never be reached. Just in + // case, loop forever. + // + while(1) + { + } +} + +//***************************************************************************** +// +//! Puts the processor into sleep mode. +//! +//! This function places the processor into sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralSleepEnable() continue to operate and can wake up the +//! processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlSleep(void) +{ + // + // Wait for an interrupt. + // + CPUwfi(); +} + +//***************************************************************************** +// +//! Puts the processor into deep-sleep mode. +//! +//! This function places the processor into deep-sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralDeepSleepEnable() continue to operate and can wake up +//! the processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlDeepSleep(void) +{ + // + // Enable deep-sleep. + // + HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP; + + // + // Wait for an interrupt. + // + CPUwfi(); + + // + // Disable deep-sleep so that a future sleep will work correctly. + // + HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP); +} + +//***************************************************************************** +// +//! Gets the reason for a reset. +//! +//! This function will return the reason(s) for a reset. Since the reset +//! reasons are sticky until either cleared by software or an external reset, +//! multiple reset reasons may be returned if multiple resets have occurred. +//! The reset reason will be a logical OR of \b SYSCTL_CAUSE_LDO, +//! \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, \b SYSCTL_CAUSE_BOR, +//! \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! \return Returns the reason(s) for a reset. +// +//***************************************************************************** +unsigned long +SysCtlResetCauseGet(void) +{ + // + // Return the reset reasons. + // + return(HWREG(SYSCTL_RESC)); +} + +//***************************************************************************** +// +//! Clears reset reasons. +//! +//! \param ulCauses are the reset causes to be cleared; must be a logical OR of +//! \b SYSCTL_CAUSE_LDO, \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, +//! \b SYSCTL_CAUSE_BOR, \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! This function clears the specified sticky reset reasons. Once cleared, +//! another reset for the same reason can be detected, and a reset for a +//! different reason can be distinguished (instead of having two reset causes +//! set). If the reset reason is used by an application, all reset causes +//! should be cleared after they are retrieved with SysCtlResetCauseGet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlResetCauseClear(unsigned long ulCauses) +{ + // + // Clear the given reset reasons. + // + HWREG(SYSCTL_RESC) &= ~(ulCauses); +} + +//***************************************************************************** +// +//! Configures the brown-out control. +//! +//! \param ulConfig is the desired configuration of the brown-out control. +//! Must be the logical OR of \b SYSCTL_BOR_RESET and/or +//! \b SYSCTL_BOR_RESAMPLE. +//! \param ulDelay is the number of internal oscillator cycles to wait before +//! resampling an asserted brown-out signal. This value only has meaning when +//! \b SYSCTL_BOR_RESAMPLE is set and must be less than 8192. +//! +//! This function configures how the brown-out control operates. It can detect +//! a brown-out by looking at only the brown-out output, or it can wait for it +//! to be active for two consecutive samples separated by a configurable time. +//! When it detects a brown-out condition, it can either reset the device or +//! generate a processor interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) +{ + // + // Check the arguments. + // + ASSERT(!(ulConfig & ~(SYSCTL_BOR_RESET | SYSCTL_BOR_RESAMPLE))); + ASSERT(ulDelay < 8192); + + // + // Configure the brown-out reset control. + // + HWREG(SYSCTL_PBORCTL) = (ulDelay << SYSCTL_PBORCTL_BORTIM_S) | ulConfig; +} + +//***************************************************************************** +// +//! Provides a small delay. +//! +//! \param ulCount is the number of delay loop iterations to perform. +//! +//! This function provides a means of generating a constant length delay. It +//! is written in assembly to keep the delay consistent across tool chains, +//! avoiding the need to tune the delay based on the tool chain in use. +//! +//! The loop takes 3 cycles/loop. +//! +//! \return None. +// +//***************************************************************************** +#if defined(ewarm) || defined(DOXYGEN) +void +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +SysCtlDelay(unsigned long ulCount) +{ + subs r0, #1; + bne SysCtlDelay; + bx lr; +} +#endif +// +// For CCS implement this function in pure assembly. This prevents the TI +// compiler from doing funny things with the optimizer. +// +#if defined(ccs) + __asm(" .sect \".text:SysCtlDelay\"\n" + " .clink\n" + " .thumbfunc SysCtlDelay\n" + " .thumb\n" + " .global SysCtlDelay\n" + "SysCtlDelay:\n" + " subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr\n"); +#endif + + +//***************************************************************************** +// +//! Sets the clocking of the device. +//! +//! \param ulConfig is the required configuration of the device clocking. +//! +//! This function configures the clocking of the device. The input crystal +//! frequency, oscillator to be used, use of the PLL, and the system clock +//! divider are all configured with this function. +//! +//! The \e ulConfig parameter is the logical OR of several different values, +//! many of which are grouped into sets where only one can be chosen. +//! +//! The system clock divider is chosen with one of the following values: +//! \b SYSCTL_SYSDIV_1, \b SYSCTL_SYSDIV_2, \b SYSCTL_SYSDIV_3, ... +//! \b SYSCTL_SYSDIV_64. Only \b SYSCTL_SYSDIV_1 through \b SYSCTL_SYSDIV_16 +//! are valid on Sandstorm-class devices. +//! +//! The use of the PLL is chosen with either \b SYSCTL_USE_PLL or +//! \b SYSCTL_USE_OSC. +//! +//! The external crystal frequency is chosen with one of the following values: +//! \b SYSCTL_XTAL_1MHZ, \b SYSCTL_XTAL_1_84MHZ, \b SYSCTL_XTAL_2MHZ, +//! \b SYSCTL_XTAL_2_45MHZ, \b SYSCTL_XTAL_3_57MHZ, \b SYSCTL_XTAL_3_68MHZ, +//! \b SYSCTL_XTAL_4MHZ, \b SYSCTL_XTAL_4_09MHZ, \b SYSCTL_XTAL_4_91MHZ, +//! \b SYSCTL_XTAL_5MHZ, \b SYSCTL_XTAL_5_12MHZ, \b SYSCTL_XTAL_6MHZ, +//! \b SYSCTL_XTAL_6_14MHZ, \b SYSCTL_XTAL_7_37MHZ, \b SYSCTL_XTAL_8MHZ, +//! \b SYSCTL_XTAL_8_19MHZ, \b SYSCTL_XTAL_10MHZ, \b SYSCTL_XTAL_12MHZ, +//! \b SYSCTL_XTAL_12_2MHZ, \b SYSCTL_XTAL_13_5MHZ, \b SYSCTL_XTAL_14_3MHZ, +//! \b SYSCTL_XTAL_16MHZ, or \b SYSCTL_XTAL_16_3MHZ. Values below +//! \b SYSCTL_XTAL_3_57MHZ are not valid when the PLL is in operation. On +//! Sandstorm- and Fury-class devices, values above \b SYSCTL_XTAL_8_19MHZ are +//! not valid. +//! +//! The oscillator source is chosen with one of the following values: +//! \b SYSCTL_OSC_MAIN, \b SYSCTL_OSC_INT, \b SYSCTL_OSC_INT4, +//! \b SYSCTL_OSC_INT30, or \b SYSCTL_OSC_EXT32. On Sandstorm-class devices, +//! \b SYSCTL_OSC_INT30 and \b SYSCTL_OSC_EXT32 are not valid. +//! \b SYSCTL_OSC_EXT32 is only available on devices with the hibernate module, +//! and then only when the hibernate module has been enabled. +//! +//! The internal and main oscillators are disabled with the +//! \b SYSCTL_INT_OSC_DIS and \b SYSCTL_MAIN_OSC_DIS flags, respectively. +//! The external oscillator must be enabled in order to use an external clock +//! source. Note that attempts to disable the oscillator used to clock the +//! device will be prevented by the hardware. +//! +//! To clock the system from an external source (such as an external crystal +//! oscillator), use \b SYSCTL_USE_OSC \b | \b SYSCTL_OSC_MAIN. To clock the +//! system from the main oscillator, use \b SYSCTL_USE_OSC \b | +//! \b SYSCTL_OSC_MAIN. To clock the system from the PLL, use +//! \b SYSCTL_USE_PLL \b | \b SYSCTL_OSC_MAIN, and select the appropriate +//! crystal with one of the \b SYSCTL_XTAL_xxx values. +//! +//! \note If selecting the PLL as the system clock source (that is, via +//! \b SYSCTL_USE_PLL), this function will poll the PLL lock interrupt to +//! determine when the PLL has locked. If an interrupt handler for the +//! system control interrupt is in place, and it responds to and clears the +//! PLL lock interrupt, this function will delay until its timeout has occurred +//! instead of completing as soon as PLL lock is achieved. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClockSet(unsigned long ulConfig) +{ + unsigned long ulDelay, ulRCC, ulRCC2; + + // + // See if this is a Sandstorm-class device and clocking features from newer + // devices were requested. + // + if(CLASS_IS_SANDSTORM && (ulConfig & SYSCTL_RCC2_USERCC2)) + { + // + // Return without changing the clocking since the requested + // configuration can not be achieved. + // + return; + } + + // + // Get the current value of the RCC and RCC2 registers. If using a + // Sandstorm-class device, the RCC2 register will read back as zero and the + // writes to it from within this function will be ignored. + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Bypass the PLL and system clock dividers for now. + // + ulRCC |= SYSCTL_RCC_BYPASS; + ulRCC &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= SYSCTL_RCC2_BYPASS2; + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // See if either oscillator needs to be enabled. + // + if(((ulRCC & SYSCTL_RCC_IOSCDIS) && !(ulConfig & SYSCTL_RCC_IOSCDIS)) || + ((ulRCC & SYSCTL_RCC_MOSCDIS) && !(ulConfig & SYSCTL_RCC_MOSCDIS))) + { + // + // Make sure that the required oscillators are enabled. For now, the + // previously enabled oscillators must be enabled along with the newly + // requested oscillators. + // + ulRCC &= (~(SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS) | + (ulConfig & (SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS))); + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + + // + // Wait for a bit, giving the oscillator time to stabilize. The number + // of iterations is adjusted based on the current clock source; a + // smaller number of iterations is required for slower clock rates. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && + (((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_30) || + ((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_32))) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + ((ulRCC & SYSCTL_RCC_OSCSRC_M) == SYSCTL_RCC_OSCSRC_30))) + { + // + // Delay for 4096 iterations. + // + SysCtlDelay(4096); + } + else + { + // + // Delay for 524,288 iterations. + // + SysCtlDelay(524288); + } + } + + // + // Set the new crystal value, oscillator source, and PLL configuration. + // Since the OSCSRC2 field in RCC2 overlaps the XTAL field in RCC, the + // OSCSRC field has a special encoding within ulConfig to avoid the + // overlap. + // + ulRCC &= ~(SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC |= ulConfig & (SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC2 &= ~(SYSCTL_RCC2_USERCC2 | SYSCTL_RCC2_OSCSRC2_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_USERCC2 | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= (ulConfig & 0x00000008) << 3; + + // + // Clear the PLL lock interrupt. + // + HWREG(SYSCTL_MISC) = SYSCTL_INT_PLL_LOCK; + + // + // Write the new RCC value. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + HWREG(SYSCTL_RCC2) = ulRCC2; + HWREG(SYSCTL_RCC) = ulRCC; + } + else + { + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + } + + // + // Wait for a bit so that new crystal value and oscillator source can take + // effect. + // + SysCtlDelay(16); + + // + // Set the requested system divider and disable the appropriate + // oscillators. This will not get written immediately. + // + ulRCC &= ~(SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC |= ulConfig & (SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC2 &= ~(SYSCTL_RCC2_SYSDIV2_M); + ulRCC2 |= ulConfig & SYSCTL_RCC2_SYSDIV2_M; + if(ulConfig & SYSCTL_RCC2_DIV400) + { + ulRCC |= SYSCTL_RCC_USESYSDIV; + ulRCC2 &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_DIV400 | SYSCTL_RCC2_SYSDIV2LSB); + } + else + { + ulRCC2 &= ~(SYSCTL_RCC2_DIV400); + } + + // + // See if the PLL output is being used to clock the system. + // + if(!(ulConfig & SYSCTL_RCC_BYPASS)) + { + // + // Wait until the PLL has locked. + // + for(ulDelay = 32768; ulDelay > 0; ulDelay--) + { + if(HWREG(SYSCTL_RIS) & SYSCTL_INT_PLL_LOCK) + { + break; + } + } + + // + // Enable use of the PLL. + // + ulRCC &= ~(SYSCTL_RCC_BYPASS); + ulRCC2 &= ~(SYSCTL_RCC2_BYPASS2); + } + + // + // Write the final RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // Delay for a little bit so that the system divider takes effect. + // + SysCtlDelay(16); +} + +//***************************************************************************** +// +//! Gets the processor clock rate. +//! +//! This function determines the clock rate of the processor clock. This is +//! also the clock rate of all the peripheral modules (with the exception of +//! PWM, which has its own clock divider). +//! +//! \note This will not return accurate results if SysCtlClockSet() has not +//! been called to configure the clocking of the device, or if the device is +//! directly clocked from a crystal (or a clock source) that is not one of the +//! supported crystal frequencies. In the later case, this function should be +//! modified to directly return the correct system clock rate. +//! +//! \return The processor clock rate. +// +//***************************************************************************** +unsigned long +SysCtlClockGet(void) +{ + unsigned long ulRCC, ulRCC2, ulPLL, ulClk; + + // + // Read RCC and RCC2. For Sandstorm-class devices (which do not have + // RCC2), the RCC2 read will return 0, which indicates that RCC2 is + // disabled (since the SYSCTL_RCC2_USERCC2 bit is clear). + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Get the base clock rate. + // + switch((ulRCC2 & SYSCTL_RCC2_USERCC2) ? + (ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) : + (ulRCC & SYSCTL_RCC_OSCSRC_M)) + { + // + // The main oscillator is the clock source. Determine its rate from + // the crystal setting field. + // + case SYSCTL_RCC_OSCSRC_MAIN: + { + ulClk = g_pulXtals[(ulRCC & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + break; + } + + // + // The internal oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000; + } + else + { + // + // The internal oscillator on all other devices is 16 MHz. + // + ulClk = 16000000; + } + break; + } + + // + // The internal oscillator divided by four is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT4: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000 / 4; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000 / 4; + } + else + { + // + // The internal oscillator on a Tempest-class device is 16 MHz. + // + ulClk = 16000000 / 4; + } + break; + } + + // + // The internal 30 KHz oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_30: + { + // + // The internal 30 KHz oscillator has an accuracy of +/- 30%. + // + ulClk = 30000; + break; + } + + // + // The 4.19 MHz clock from the hibernate module is the clock source. + // + case SYSCTL_RCC2_OSCSRC2_419: + { + ulClk = 4194304; + break; + } + + // + // The 32 KHz clock from the hibernate module is the source clock. + // + case SYSCTL_RCC2_OSCSRC2_32: + { + ulClk = 32768; + break; + } + + // + // An unknown setting, so return a zero clock (that is, an unknown + // clock rate). + // + default: + { + return(0); + } + } + + // + // See if the PLL is being used. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC & SYSCTL_RCC_BYPASS))) + { + // + // Get the PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Sandstorm-class devices is + // "(xtal * (f + 2)) / (r + 2)". + // + ulClk = ((ulClk * (((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S) + 2)) / + (((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 2)); + } + else + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Fury-class device is + // "(xtal * f) / ((r + 1) * 2)". + // + ulClk = ((ulClk * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1) * 2)); + } + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulClk /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulClk /= 4; + } + + // + // Force the system divider to be enabled. It is always used when + // using the PLL, but in some cases it will not read as being enabled. + // + ulRCC |= SYSCTL_RCC_USESYSDIV; + } + + // + // See if the system divider is being used. + // + if(ulRCC & SYSCTL_RCC_USESYSDIV) + { + // + // Adjust the clock rate by the system clock divider. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + if((ulRCC2 & SYSCTL_RCC2_DIV400) && + (((ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC & SYSCTL_RCC_BYPASS)))) + + { + ulClk = ((ulClk * 2) / (((ulRCC2 & (SYSCTL_RCC2_SYSDIV2_M | + SYSCTL_RCC2_SYSDIV2LSB)) >> + (SYSCTL_RCC2_SYSDIV2_S - 1)) + 1)); + } + else + { + ulClk /= (((ulRCC2 & SYSCTL_RCC2_SYSDIV2_M) >> + SYSCTL_RCC2_SYSDIV2_S) + 1); + } + } + else + { + ulClk /= (((ulRCC & SYSCTL_RCC_SYSDIV_M) >> SYSCTL_RCC_SYSDIV_S) + + 1); + } + } + + // + // Return the computed clock rate. + // + return(ulClk); +} + +//***************************************************************************** +// +//! Sets the PWM clock configuration. +//! +//! \param ulConfig is the configuration for the PWM clock; it must be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +//! +//! This function sets the rate of the clock provided to the PWM module as a +//! ratio of the processor clock. This clock is used by the PWM module to +//! generate PWM signals; its rate forms the basis for all PWM signals. +//! +//! \note The clocking of the PWM is dependent upon the system clock rate as +//! configured by SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPWMClockSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_PWMDIV_1) || + (ulConfig == SYSCTL_PWMDIV_2) || + (ulConfig == SYSCTL_PWMDIV_4) || + (ulConfig == SYSCTL_PWMDIV_8) || + (ulConfig == SYSCTL_PWMDIV_16) || + (ulConfig == SYSCTL_PWMDIV_32) || + (ulConfig == SYSCTL_PWMDIV_64)); + + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Set the PWM clock configuration into the run-mode clock configuration + // register. + // + HWREG(SYSCTL_RCC) = ((HWREG(SYSCTL_RCC) & + ~(SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)) | + ulConfig); +} + +//***************************************************************************** +// +//! Gets the current PWM clock configuration. +//! +//! This function returns the current PWM clock configuration. +//! +//! \return Returns the current PWM clock configuration; will be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +// +//***************************************************************************** +unsigned long +SysCtlPWMClockGet(void) +{ + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Return the current PWM clock configuration. Make sure that + // SYSCTL_PWMDIV_1 is returned in all cases where the divider is disabled. + // + if(!(HWREG(SYSCTL_RCC) & SYSCTL_RCC_USEPWMDIV)) + { + // + // The divider is not active so reflect this in the value we return. + // + return(SYSCTL_PWMDIV_1); + } + else + { + // + // The divider is active so directly return the masked register value. + // + return(HWREG(SYSCTL_RCC) & + (SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)); + } +} + +//***************************************************************************** +// +//! Sets the sample rate of the ADC. +//! +//! \param ulSpeed is the desired sample rate of the ADC; must be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +//! +//! This function sets the rate at which the ADC samples are captured by the +//! ADC block. The sampling speed may be limited by the hardware, so the +//! sample rate may end up being slower than requested. SysCtlADCSpeedGet() +//! will return the actual speed in use. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlADCSpeedSet(unsigned long ulSpeed) +{ + // + // Check the arguments. + // + ASSERT((ulSpeed == SYSCTL_ADCSPEED_1MSPS) || + (ulSpeed == SYSCTL_ADCSPEED_500KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_250KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_125KSPS)); + + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Set the ADC speed in run, sleep, and deep-sleep mode. + // + HWREG(SYSCTL_RCGC0) = ((HWREG(SYSCTL_RCGC0) & ~(SYSCTL_RCGC0_ADCSPD_M)) | + ulSpeed); + HWREG(SYSCTL_SCGC0) = ((HWREG(SYSCTL_SCGC0) & ~(SYSCTL_SCGC0_ADCSPD_M)) | + ulSpeed); +} + +//***************************************************************************** +// +//! Gets the sample rate of the ADC. +//! +//! This function gets the current sample rate of the ADC. +//! +//! \return Returns the current ADC sample rate; will be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +// +//***************************************************************************** +unsigned long +SysCtlADCSpeedGet(void) +{ + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Return the current ADC speed. + // + return(HWREG(SYSCTL_RCGC0) & SYSCTL_RCGC0_ADCSPD_M); +} + +//***************************************************************************** +// +//! Configures the internal oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the internal oscillator +//! verification timer should be enabled. +//! +//! This function allows the internal oscillator verification timer to be +//! enabled or disabled. When enabled, an interrupt will be generated if the +//! internal oscillator ceases to operate. +//! +//! The internal oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the main oscillator will verify the +//! internal oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the internal oscillator verification timer as + // requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_IOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_IOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the main oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the main oscillator +//! verification timer should be enabled. +//! +//! This function allows the main oscillator verification timer to be enabled +//! or disabled. When enabled, an interrupt will be generated if the main +//! oscillator ceases to operate. +//! +//! The main oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the internal oscillator will verify the +//! main oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlMOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the main oscillator verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_MOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_MOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the PLL verification timer. +//! +//! \param bEnable is a boolean that is \b true if the PLL verification timer +//! should be enabled. +//! +//! This function allows the PLL verification timer to be enabled or disabled. +//! When enabled, an interrupt will be generated if the PLL ceases to operate. +//! +//! The PLL verification timer is only available on Sandstorm-class devices. +//! +//! \note The main oscillator must be enabled for this verification timer to +//! operate as it is used to check the PLL. Also, the verification timer +//! should be disabled while the PLL is being reconfigured via +//! SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPLLVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the PLL verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_PLLVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_PLLVER); + } +} + +//***************************************************************************** +// +//! Clears the clock verification status. +//! +//! This function clears the status of the clock verification timers, allowing +//! them to assert another failure if detected. +//! +//! The clock verification timers are only available on Sandstorm-class +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClkVerificationClear(void) +{ + // + // Clear the clock verification. + // + HWREG(SYSCTL_CLKVCLR) = SYSCTL_CLKVCLR_VERCLR; + + // + // The bit does not self-reset, so clear it. + // + HWREG(SYSCTL_CLKVCLR) = 0; +} + +//***************************************************************************** +// +//! Enables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to enable. +//! +//! This function is used to enable the specified GPIO peripheral to be +//! accessed from the Advanced Host Bus (AHB) instead of the legacy Advanced +//! Peripheral Bus (APB). When a GPIO peripheral is enabled for AHB access, +//! the \b _AHB_BASE form of the base address should be used for GPIO +//! functions. For example, instead of using \b GPIO_PORTA_BASE as the base +//! address for GPIO functions, use \b GPIO_PORTA_AHB_BASE instead. +//! +//! The \e ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Enable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) |= ulGPIOPeripheral & 0xFFFF; +} + +//***************************************************************************** +// +//! Disables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to disable. +//! +//! This function disables the specified GPIO peripheral for access from the +//! Advanced Host Bus (AHB). Once disabled, the GPIO peripheral is accessed +//! from the legacy Advanced Peripheral Bus (AHB). +//! +//! The \b ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Disable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) &= ~(ulGPIOPeripheral & 0xFFFF); +} + +//***************************************************************************** +// +//! Powers up the USB PLL. +//! +//! This function will enable the USB controller's PLL which is used by it's +//! physical layer. This call is necessary before connecting to any external +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLEnable(void) +{ + // + // Turn on the USB PLL. + // + HWREG(SYSCTL_RCC2) &= ~SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Powers down the USB PLL. +//! +//! This function will disable the USB controller's PLL which is used by it's +//! physical layer. The USB registers are still accessible, but the physical +//! layer will no longer function. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLDisable(void) +{ + // + // Turn of USB PLL. + // + HWREG(SYSCTL_RCC2) |= SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Sets the MCLK frequency provided to the I2S module. +//! +//! \param ulInputClock is the input clock to the MCLK divider. If this is +//! zero, the value is computed from the current PLL configuration. +//! \param ulMClk is the desired MCLK frequency. If this is zero, MCLK output +//! is disabled. +//! +//! This function sets the dividers to provide MCLK to the I2S module. A MCLK +//! divider will be chosen that produces the MCLK frequency that is the closest +//! possible to the requested frequency, which may be above or below the +//! requested frequency. +//! +//! The actual MCLK frequency will be returned. It is the responsibility of +//! the application to determine if the selected MCLK is acceptable; in general +//! the human ear can not discern the frequency difference if it is within 0.3% +//! of the desired frequency (though there is a very small percentage of the +//! population that can discern lower frequency deviations). +//! +//! \return Returns the actual MCLK frequency. +// +//***************************************************************************** +unsigned long +SysCtlI2SMClkSet(unsigned long ulInputClock, unsigned long ulMClk) +{ + unsigned long ulDivInt, ulDivFrac, ulPLL; + + // + // See if the I2S MCLK should be disabled. + // + if(ulMClk == 0) + { + // + // Disable the I2S MCLK and return. + // + HWREG(SYSCTL_I2SMCLKCFG) = 0; + return(0); + } + + // + // See if the input clock was specified. + // + if(ulInputClock == 0) + { + // + // The input clock was not specified, so compute the output frequency + // of the PLL. Get the current PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // Get the frequency of the crystal in use. + // + ulInputClock = g_pulXtals[(HWREG(SYSCTL_RCC) & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + + // + // Calculate the PLL output frequency. + // + ulInputClock = ((ulInputClock * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1))); + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulInputClock /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulInputClock /= 4; + } + } + + // + // Verify that the requested MCLK frequency is attainable. + // + ASSERT(ulMClk < ulInputClock); + + // + // Add a rounding factor to the input clock, so that the MCLK frequency + // that is closest to the desire value is selected. + // + ulInputClock += (ulMClk / 32) - 1; + + // + // Compute the integer portion of the MCLK divider. + // + ulDivInt = ulInputClock / ulMClk; + + // + // If the divisor is too large, then simply use the maximum divisor. + // + if(CLASS_IS_TEMPEST && REVISION_IS_B1 && (ulDivInt > 255)) + { + ulDivInt = 255; + ulDivFrac = 15; + } + else if(ulDivInt > 1023) + { + ulDivInt = 1023; + ulDivFrac = 15; + } + else + { + // + // Compute the fractional portion of the MCLK divider. + // + ulDivFrac = ((ulInputClock - (ulDivInt * ulMClk)) * 16) / ulMClk; + } + + // + // Set the divisor for the Tx and Rx MCLK generators and enable the clocks. + // + HWREG(SYSCTL_I2SMCLKCFG) = (SYSCTL_I2SMCLKCFG_RXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_RXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_RXF_S) | + SYSCTL_I2SMCLKCFG_TXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_TXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_TXF_S)); + + // + // Return the actual MCLK frequency. + // + ulInputClock -= (ulMClk / 32) - 1; + ulDivInt = (ulDivInt * 16) + ulDivFrac; + ulMClk = (ulInputClock / ulDivInt) * 16; + ulMClk += ((ulInputClock - ((ulMClk / 16) * ulDivInt)) * 16) / ulDivInt; + return(ulMClk); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.h new file mode 100644 index 00000000..d5b00681 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/sysctl.h @@ -0,0 +1,466 @@ +//***************************************************************************** +// +// sysctl.h - Prototypes for the system control driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSCTL_H__ +#define __SYSCTL_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to the +// SysCtlPeripheralPresent(), SysCtlPeripheralEnable(), +// SysCtlPeripheralDisable(), and SysCtlPeripheralReset() APIs as the +// ulPeripheral parameter. The peripherals in the fourth group (upper nibble +// is 3) can only be used with the SysCtlPeripheralPresent() API. +// +//***************************************************************************** +#ifndef DEPRECATED +#define SYSCTL_PERIPH_WDOG 0x00000008 // Watchdog +#endif +#define SYSCTL_PERIPH_WDOG0 0x00000008 // Watchdog 0 +#define SYSCTL_PERIPH_HIBERNATE 0x00000040 // Hibernation module +#ifndef DEPRECATED +#define SYSCTL_PERIPH_ADC 0x00100001 // ADC +#endif +#define SYSCTL_PERIPH_ADC0 0x00100001 // ADC0 +#define SYSCTL_PERIPH_ADC1 0x00100002 // ADC1 +#define SYSCTL_PERIPH_PWM 0x00100010 // PWM +#define SYSCTL_PERIPH_CAN0 0x00100100 // CAN 0 +#define SYSCTL_PERIPH_CAN1 0x00100200 // CAN 1 +#define SYSCTL_PERIPH_CAN2 0x00100400 // CAN 2 +#define SYSCTL_PERIPH_WDOG1 0x00101000 // Watchdog 1 +#define SYSCTL_PERIPH_UART0 0x10000001 // UART 0 +#define SYSCTL_PERIPH_UART1 0x10000002 // UART 1 +#define SYSCTL_PERIPH_UART2 0x10000004 // UART 2 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_SSI 0x10000010 // SSI +#endif +#define SYSCTL_PERIPH_SSI0 0x10000010 // SSI 0 +#define SYSCTL_PERIPH_SSI1 0x10000020 // SSI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_QEI 0x10000100 // QEI +#endif +#define SYSCTL_PERIPH_QEI0 0x10000100 // QEI 0 +#define SYSCTL_PERIPH_QEI1 0x10000200 // QEI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_I2C 0x10001000 // I2C +#endif +#define SYSCTL_PERIPH_I2C0 0x10001000 // I2C 0 +#define SYSCTL_PERIPH_I2C1 0x10004000 // I2C 1 +#define SYSCTL_PERIPH_TIMER0 0x10100001 // Timer 0 +#define SYSCTL_PERIPH_TIMER1 0x10100002 // Timer 1 +#define SYSCTL_PERIPH_TIMER2 0x10100004 // Timer 2 +#define SYSCTL_PERIPH_TIMER3 0x10100008 // Timer 3 +#define SYSCTL_PERIPH_COMP0 0x10100100 // Analog comparator 0 +#define SYSCTL_PERIPH_COMP1 0x10100200 // Analog comparator 1 +#define SYSCTL_PERIPH_COMP2 0x10100400 // Analog comparator 2 +#define SYSCTL_PERIPH_I2S0 0x10101000 // I2S0 +#define SYSCTL_PERIPH_EPI0 0x10104000 // EPI0 +#define SYSCTL_PERIPH_GPIOA 0x20000001 // GPIO A +#define SYSCTL_PERIPH_GPIOB 0x20000002 // GPIO B +#define SYSCTL_PERIPH_GPIOC 0x20000004 // GPIO C +#define SYSCTL_PERIPH_GPIOD 0x20000008 // GPIO D +#define SYSCTL_PERIPH_GPIOE 0x20000010 // GPIO E +#define SYSCTL_PERIPH_GPIOF 0x20000020 // GPIO F +#define SYSCTL_PERIPH_GPIOG 0x20000040 // GPIO G +#define SYSCTL_PERIPH_GPIOH 0x20000080 // GPIO H +#define SYSCTL_PERIPH_GPIOJ 0x20000100 // GPIO J +#define SYSCTL_PERIPH_UDMA 0x20002000 // uDMA +#define SYSCTL_PERIPH_USB0 0x20100001 // USB0 +#define SYSCTL_PERIPH_ETH 0x20105000 // ETH +#define SYSCTL_PERIPH_IEEE1588 0x20100100 // IEEE1588 +#define SYSCTL_PERIPH_PLL 0x30000010 // PLL +#define SYSCTL_PERIPH_TEMP 0x30000020 // Temperature sensor +#define SYSCTL_PERIPH_MPU 0x30000080 // Cortex M3 MPU + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPinPresent() API +// as the ulPin parameter. +// +//***************************************************************************** +#define SYSCTL_PIN_PWM0 0x00000001 // PWM0 pin +#define SYSCTL_PIN_PWM1 0x00000002 // PWM1 pin +#define SYSCTL_PIN_PWM2 0x00000004 // PWM2 pin +#define SYSCTL_PIN_PWM3 0x00000008 // PWM3 pin +#define SYSCTL_PIN_PWM4 0x00000010 // PWM4 pin +#define SYSCTL_PIN_PWM5 0x00000020 // PWM5 pin +#define SYSCTL_PIN_PWM6 0x00000040 // PWM6 pin +#define SYSCTL_PIN_PWM7 0x00000080 // PWM7 pin +#define SYSCTL_PIN_C0MINUS 0x00000040 // C0- pin +#define SYSCTL_PIN_C0PLUS 0x00000080 // C0+ pin +#define SYSCTL_PIN_C0O 0x00000100 // C0o pin +#define SYSCTL_PIN_C1MINUS 0x00000200 // C1- pin +#define SYSCTL_PIN_C1PLUS 0x00000400 // C1+ pin +#define SYSCTL_PIN_C1O 0x00000800 // C1o pin +#define SYSCTL_PIN_C2MINUS 0x00001000 // C2- pin +#define SYSCTL_PIN_C2PLUS 0x00002000 // C2+ pin +#define SYSCTL_PIN_C2O 0x00004000 // C2o pin +#define SYSCTL_PIN_MC_FAULT0 0x00008000 // MC0 Fault pin +#define SYSCTL_PIN_ADC0 0x00010000 // ADC0 pin +#define SYSCTL_PIN_ADC1 0x00020000 // ADC1 pin +#define SYSCTL_PIN_ADC2 0x00040000 // ADC2 pin +#define SYSCTL_PIN_ADC3 0x00080000 // ADC3 pin +#define SYSCTL_PIN_ADC4 0x00100000 // ADC4 pin +#define SYSCTL_PIN_ADC5 0x00200000 // ADC5 pin +#define SYSCTL_PIN_ADC6 0x00400000 // ADC6 pin +#define SYSCTL_PIN_ADC7 0x00800000 // ADC7 pin +#define SYSCTL_PIN_CCP0 0x01000000 // CCP0 pin +#define SYSCTL_PIN_CCP1 0x02000000 // CCP1 pin +#define SYSCTL_PIN_CCP2 0x04000000 // CCP2 pin +#define SYSCTL_PIN_CCP3 0x08000000 // CCP3 pin +#define SYSCTL_PIN_CCP4 0x10000000 // CCP4 pin +#define SYSCTL_PIN_CCP5 0x20000000 // CCP5 pin +#define SYSCTL_PIN_32KHZ 0x80000000 // 32kHz pin + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOSet() API as +// the ulVoltage value, or returned by the SysCtlLDOGet() API. +// +//***************************************************************************** +#define SYSCTL_LDO_2_25V 0x00000005 // LDO output of 2.25V +#define SYSCTL_LDO_2_30V 0x00000004 // LDO output of 2.30V +#define SYSCTL_LDO_2_35V 0x00000003 // LDO output of 2.35V +#define SYSCTL_LDO_2_40V 0x00000002 // LDO output of 2.40V +#define SYSCTL_LDO_2_45V 0x00000001 // LDO output of 2.45V +#define SYSCTL_LDO_2_50V 0x00000000 // LDO output of 2.50V +#define SYSCTL_LDO_2_55V 0x0000001f // LDO output of 2.55V +#define SYSCTL_LDO_2_60V 0x0000001e // LDO output of 2.60V +#define SYSCTL_LDO_2_65V 0x0000001d // LDO output of 2.65V +#define SYSCTL_LDO_2_70V 0x0000001c // LDO output of 2.70V +#define SYSCTL_LDO_2_75V 0x0000001b // LDO output of 2.75V + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOConfigSet() API. +// +//***************************************************************************** +#define SYSCTL_LDOCFG_ARST 0x00000001 // Allow LDO failure to reset +#define SYSCTL_LDOCFG_NORST 0x00000000 // Do not reset on LDO failure + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlIntEnable(), +// SysCtlIntDisable(), and SysCtlIntClear() APIs, or returned in the bit mask +// by the SysCtlIntStatus() API. +// +//***************************************************************************** +#define SYSCTL_INT_MOSC_PUP 0x00000100 // MOSC power-up interrupt +#define SYSCTL_INT_USBPLL_LOCK 0x00000080 // USB PLL lock interrupt +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlResetCauseClear() +// API or returned by the SysCtlResetCauseGet() API. +// +//***************************************************************************** +#define SYSCTL_CAUSE_LDO 0x00000020 // LDO power not OK reset +#define SYSCTL_CAUSE_SW 0x00000010 // Software reset +#define SYSCTL_CAUSE_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset +#define SYSCTL_CAUSE_POR 0x00000002 // Power on reset +#define SYSCTL_CAUSE_EXT 0x00000001 // External reset + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlBrownOutConfigSet() +// API as the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_BOR_RESET 0x00000002 // Reset instead of interrupting +#define SYSCTL_BOR_RESAMPLE 0x00000001 // Resample BOR before asserting + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPWMClockSet() API +// as the ulConfig parameter, and can be returned by the SysCtlPWMClockGet() +// API. +// +//***************************************************************************** +#define SYSCTL_PWMDIV_1 0x00000000 // PWM clock is processor clock /1 +#define SYSCTL_PWMDIV_2 0x00100000 // PWM clock is processor clock /2 +#define SYSCTL_PWMDIV_4 0x00120000 // PWM clock is processor clock /4 +#define SYSCTL_PWMDIV_8 0x00140000 // PWM clock is processor clock /8 +#define SYSCTL_PWMDIV_16 0x00160000 // PWM clock is processor clock /16 +#define SYSCTL_PWMDIV_32 0x00180000 // PWM clock is processor clock /32 +#define SYSCTL_PWMDIV_64 0x001A0000 // PWM clock is processor clock /64 + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlADCSpeedSet() API +// as the ulSpeed parameter, and can be returned by the SyCtlADCSpeedGet() +// API. +// +//***************************************************************************** +#define SYSCTL_ADCSPEED_1MSPS 0x00000F00 // 1,000,000 samples per second +#define SYSCTL_ADCSPEED_500KSPS 0x00000A00 // 500,000 samples per second +#define SYSCTL_ADCSPEED_250KSPS 0x00000500 // 250,000 samples per second +#define SYSCTL_ADCSPEED_125KSPS 0x00000000 // 125,000 samples per second + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlClockSet() API as +// the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_SYSDIV_1 0x07800000 // Processor clock is osc/pll /1 +#define SYSCTL_SYSDIV_2 0x00C00000 // Processor clock is osc/pll /2 +#define SYSCTL_SYSDIV_3 0x01400000 // Processor clock is osc/pll /3 +#define SYSCTL_SYSDIV_4 0x01C00000 // Processor clock is osc/pll /4 +#define SYSCTL_SYSDIV_5 0x02400000 // Processor clock is osc/pll /5 +#define SYSCTL_SYSDIV_6 0x02C00000 // Processor clock is osc/pll /6 +#define SYSCTL_SYSDIV_7 0x03400000 // Processor clock is osc/pll /7 +#define SYSCTL_SYSDIV_8 0x03C00000 // Processor clock is osc/pll /8 +#define SYSCTL_SYSDIV_9 0x04400000 // Processor clock is osc/pll /9 +#define SYSCTL_SYSDIV_10 0x04C00000 // Processor clock is osc/pll /10 +#define SYSCTL_SYSDIV_11 0x05400000 // Processor clock is osc/pll /11 +#define SYSCTL_SYSDIV_12 0x05C00000 // Processor clock is osc/pll /12 +#define SYSCTL_SYSDIV_13 0x06400000 // Processor clock is osc/pll /13 +#define SYSCTL_SYSDIV_14 0x06C00000 // Processor clock is osc/pll /14 +#define SYSCTL_SYSDIV_15 0x07400000 // Processor clock is osc/pll /15 +#define SYSCTL_SYSDIV_16 0x07C00000 // Processor clock is osc/pll /16 +#define SYSCTL_SYSDIV_17 0x88400000 // Processor clock is osc/pll /17 +#define SYSCTL_SYSDIV_18 0x88C00000 // Processor clock is osc/pll /18 +#define SYSCTL_SYSDIV_19 0x89400000 // Processor clock is osc/pll /19 +#define SYSCTL_SYSDIV_20 0x89C00000 // Processor clock is osc/pll /20 +#define SYSCTL_SYSDIV_21 0x8A400000 // Processor clock is osc/pll /21 +#define SYSCTL_SYSDIV_22 0x8AC00000 // Processor clock is osc/pll /22 +#define SYSCTL_SYSDIV_23 0x8B400000 // Processor clock is osc/pll /23 +#define SYSCTL_SYSDIV_24 0x8BC00000 // Processor clock is osc/pll /24 +#define SYSCTL_SYSDIV_25 0x8C400000 // Processor clock is osc/pll /25 +#define SYSCTL_SYSDIV_26 0x8CC00000 // Processor clock is osc/pll /26 +#define SYSCTL_SYSDIV_27 0x8D400000 // Processor clock is osc/pll /27 +#define SYSCTL_SYSDIV_28 0x8DC00000 // Processor clock is osc/pll /28 +#define SYSCTL_SYSDIV_29 0x8E400000 // Processor clock is osc/pll /29 +#define SYSCTL_SYSDIV_30 0x8EC00000 // Processor clock is osc/pll /30 +#define SYSCTL_SYSDIV_31 0x8F400000 // Processor clock is osc/pll /31 +#define SYSCTL_SYSDIV_32 0x8FC00000 // Processor clock is osc/pll /32 +#define SYSCTL_SYSDIV_33 0x90400000 // Processor clock is osc/pll /33 +#define SYSCTL_SYSDIV_34 0x90C00000 // Processor clock is osc/pll /34 +#define SYSCTL_SYSDIV_35 0x91400000 // Processor clock is osc/pll /35 +#define SYSCTL_SYSDIV_36 0x91C00000 // Processor clock is osc/pll /36 +#define SYSCTL_SYSDIV_37 0x92400000 // Processor clock is osc/pll /37 +#define SYSCTL_SYSDIV_38 0x92C00000 // Processor clock is osc/pll /38 +#define SYSCTL_SYSDIV_39 0x93400000 // Processor clock is osc/pll /39 +#define SYSCTL_SYSDIV_40 0x93C00000 // Processor clock is osc/pll /40 +#define SYSCTL_SYSDIV_41 0x94400000 // Processor clock is osc/pll /41 +#define SYSCTL_SYSDIV_42 0x94C00000 // Processor clock is osc/pll /42 +#define SYSCTL_SYSDIV_43 0x95400000 // Processor clock is osc/pll /43 +#define SYSCTL_SYSDIV_44 0x95C00000 // Processor clock is osc/pll /44 +#define SYSCTL_SYSDIV_45 0x96400000 // Processor clock is osc/pll /45 +#define SYSCTL_SYSDIV_46 0x96C00000 // Processor clock is osc/pll /46 +#define SYSCTL_SYSDIV_47 0x97400000 // Processor clock is osc/pll /47 +#define SYSCTL_SYSDIV_48 0x97C00000 // Processor clock is osc/pll /48 +#define SYSCTL_SYSDIV_49 0x98400000 // Processor clock is osc/pll /49 +#define SYSCTL_SYSDIV_50 0x98C00000 // Processor clock is osc/pll /50 +#define SYSCTL_SYSDIV_51 0x99400000 // Processor clock is osc/pll /51 +#define SYSCTL_SYSDIV_52 0x99C00000 // Processor clock is osc/pll /52 +#define SYSCTL_SYSDIV_53 0x9A400000 // Processor clock is osc/pll /53 +#define SYSCTL_SYSDIV_54 0x9AC00000 // Processor clock is osc/pll /54 +#define SYSCTL_SYSDIV_55 0x9B400000 // Processor clock is osc/pll /55 +#define SYSCTL_SYSDIV_56 0x9BC00000 // Processor clock is osc/pll /56 +#define SYSCTL_SYSDIV_57 0x9C400000 // Processor clock is osc/pll /57 +#define SYSCTL_SYSDIV_58 0x9CC00000 // Processor clock is osc/pll /58 +#define SYSCTL_SYSDIV_59 0x9D400000 // Processor clock is osc/pll /59 +#define SYSCTL_SYSDIV_60 0x9DC00000 // Processor clock is osc/pll /60 +#define SYSCTL_SYSDIV_61 0x9E400000 // Processor clock is osc/pll /61 +#define SYSCTL_SYSDIV_62 0x9EC00000 // Processor clock is osc/pll /62 +#define SYSCTL_SYSDIV_63 0x9F400000 // Processor clock is osc/pll /63 +#define SYSCTL_SYSDIV_64 0x9FC00000 // Processor clock is osc/pll /64 +#define SYSCTL_SYSDIV_2_5 0xC1000000 // Processor clock is pll / 2.5 +#define SYSCTL_SYSDIV_3_5 0xC1800000 // Processor clock is pll / 3.5 +#define SYSCTL_SYSDIV_4_5 0xC2000000 // Processor clock is pll / 4.5 +#define SYSCTL_SYSDIV_5_5 0xC2800000 // Processor clock is pll / 5.5 +#define SYSCTL_SYSDIV_6_5 0xC3000000 // Processor clock is pll / 6.5 +#define SYSCTL_SYSDIV_7_5 0xC3800000 // Processor clock is pll / 7.5 +#define SYSCTL_SYSDIV_8_5 0xC4000000 // Processor clock is pll / 8.5 +#define SYSCTL_SYSDIV_9_5 0xC4800000 // Processor clock is pll / 9.5 +#define SYSCTL_SYSDIV_10_5 0xC5000000 // Processor clock is pll / 10.5 +#define SYSCTL_SYSDIV_11_5 0xC5800000 // Processor clock is pll / 11.5 +#define SYSCTL_SYSDIV_12_5 0xC6000000 // Processor clock is pll / 12.5 +#define SYSCTL_SYSDIV_13_5 0xC6800000 // Processor clock is pll / 13.5 +#define SYSCTL_SYSDIV_14_5 0xC7000000 // Processor clock is pll / 14.5 +#define SYSCTL_SYSDIV_15_5 0xC7800000 // Processor clock is pll / 15.5 +#define SYSCTL_SYSDIV_16_5 0xC8000000 // Processor clock is pll / 16.5 +#define SYSCTL_SYSDIV_17_5 0xC8800000 // Processor clock is pll / 17.5 +#define SYSCTL_SYSDIV_18_5 0xC9000000 // Processor clock is pll / 18.5 +#define SYSCTL_SYSDIV_19_5 0xC9800000 // Processor clock is pll / 19.5 +#define SYSCTL_SYSDIV_20_5 0xCA000000 // Processor clock is pll / 20.5 +#define SYSCTL_SYSDIV_21_5 0xCA800000 // Processor clock is pll / 21.5 +#define SYSCTL_SYSDIV_22_5 0xCB000000 // Processor clock is pll / 22.5 +#define SYSCTL_SYSDIV_23_5 0xCB800000 // Processor clock is pll / 23.5 +#define SYSCTL_SYSDIV_24_5 0xCC000000 // Processor clock is pll / 24.5 +#define SYSCTL_SYSDIV_25_5 0xCC800000 // Processor clock is pll / 25.5 +#define SYSCTL_SYSDIV_26_5 0xCD000000 // Processor clock is pll / 26.5 +#define SYSCTL_SYSDIV_27_5 0xCD800000 // Processor clock is pll / 27.5 +#define SYSCTL_SYSDIV_28_5 0xCE000000 // Processor clock is pll / 28.5 +#define SYSCTL_SYSDIV_29_5 0xCE800000 // Processor clock is pll / 29.5 +#define SYSCTL_SYSDIV_30_5 0xCF000000 // Processor clock is pll / 30.5 +#define SYSCTL_SYSDIV_31_5 0xCF800000 // Processor clock is pll / 31.5 +#define SYSCTL_SYSDIV_32_5 0xD0000000 // Processor clock is pll / 32.5 +#define SYSCTL_SYSDIV_33_5 0xD0800000 // Processor clock is pll / 33.5 +#define SYSCTL_SYSDIV_34_5 0xD1000000 // Processor clock is pll / 34.5 +#define SYSCTL_SYSDIV_35_5 0xD1800000 // Processor clock is pll / 35.5 +#define SYSCTL_SYSDIV_36_5 0xD2000000 // Processor clock is pll / 36.5 +#define SYSCTL_SYSDIV_37_5 0xD2800000 // Processor clock is pll / 37.5 +#define SYSCTL_SYSDIV_38_5 0xD3000000 // Processor clock is pll / 38.5 +#define SYSCTL_SYSDIV_39_5 0xD3800000 // Processor clock is pll / 39.5 +#define SYSCTL_SYSDIV_40_5 0xD4000000 // Processor clock is pll / 40.5 +#define SYSCTL_SYSDIV_41_5 0xD4800000 // Processor clock is pll / 41.5 +#define SYSCTL_SYSDIV_42_5 0xD5000000 // Processor clock is pll / 42.5 +#define SYSCTL_SYSDIV_43_5 0xD5800000 // Processor clock is pll / 43.5 +#define SYSCTL_SYSDIV_44_5 0xD6000000 // Processor clock is pll / 44.5 +#define SYSCTL_SYSDIV_45_5 0xD6800000 // Processor clock is pll / 45.5 +#define SYSCTL_SYSDIV_46_5 0xD7000000 // Processor clock is pll / 46.5 +#define SYSCTL_SYSDIV_47_5 0xD7800000 // Processor clock is pll / 47.5 +#define SYSCTL_SYSDIV_48_5 0xD8000000 // Processor clock is pll / 48.5 +#define SYSCTL_SYSDIV_49_5 0xD8800000 // Processor clock is pll / 49.5 +#define SYSCTL_SYSDIV_50_5 0xD9000000 // Processor clock is pll / 50.5 +#define SYSCTL_SYSDIV_51_5 0xD9800000 // Processor clock is pll / 51.5 +#define SYSCTL_SYSDIV_52_5 0xDA000000 // Processor clock is pll / 52.5 +#define SYSCTL_SYSDIV_53_5 0xDA800000 // Processor clock is pll / 53.5 +#define SYSCTL_SYSDIV_54_5 0xDB000000 // Processor clock is pll / 54.5 +#define SYSCTL_SYSDIV_55_5 0xDB800000 // Processor clock is pll / 55.5 +#define SYSCTL_SYSDIV_56_5 0xDC000000 // Processor clock is pll / 56.5 +#define SYSCTL_SYSDIV_57_5 0xDC800000 // Processor clock is pll / 57.5 +#define SYSCTL_SYSDIV_58_5 0xDD000000 // Processor clock is pll / 58.5 +#define SYSCTL_SYSDIV_59_5 0xDD800000 // Processor clock is pll / 59.5 +#define SYSCTL_SYSDIV_60_5 0xDE000000 // Processor clock is pll / 60.5 +#define SYSCTL_SYSDIV_61_5 0xDE800000 // Processor clock is pll / 61.5 +#define SYSCTL_SYSDIV_62_5 0xDF000000 // Processor clock is pll / 62.5 +#define SYSCTL_SYSDIV_63_5 0xDF800000 // Processor clock is pll / 63.5 +#define SYSCTL_USE_PLL 0x00000000 // System clock is the PLL clock +#define SYSCTL_USE_OSC 0x00003800 // System clock is the osc clock +#define SYSCTL_XTAL_1MHZ 0x00000000 // External crystal is 1MHz +#define SYSCTL_XTAL_1_84MHZ 0x00000040 // External crystal is 1.8432MHz +#define SYSCTL_XTAL_2MHZ 0x00000080 // External crystal is 2MHz +#define SYSCTL_XTAL_2_45MHZ 0x000000C0 // External crystal is 2.4576MHz +#define SYSCTL_XTAL_3_57MHZ 0x00000100 // External crystal is 3.579545MHz +#define SYSCTL_XTAL_3_68MHZ 0x00000140 // External crystal is 3.6864MHz +#define SYSCTL_XTAL_4MHZ 0x00000180 // External crystal is 4MHz +#define SYSCTL_XTAL_4_09MHZ 0x000001C0 // External crystal is 4.096MHz +#define SYSCTL_XTAL_4_91MHZ 0x00000200 // External crystal is 4.9152MHz +#define SYSCTL_XTAL_5MHZ 0x00000240 // External crystal is 5MHz +#define SYSCTL_XTAL_5_12MHZ 0x00000280 // External crystal is 5.12MHz +#define SYSCTL_XTAL_6MHZ 0x000002C0 // External crystal is 6MHz +#define SYSCTL_XTAL_6_14MHZ 0x00000300 // External crystal is 6.144MHz +#define SYSCTL_XTAL_7_37MHZ 0x00000340 // External crystal is 7.3728MHz +#define SYSCTL_XTAL_8MHZ 0x00000380 // External crystal is 8MHz +#define SYSCTL_XTAL_8_19MHZ 0x000003C0 // External crystal is 8.192MHz +#define SYSCTL_XTAL_10MHZ 0x00000400 // External crystal is 10 MHz +#define SYSCTL_XTAL_12MHZ 0x00000440 // External crystal is 12 MHz +#define SYSCTL_XTAL_12_2MHZ 0x00000480 // External crystal is 12.288 MHz +#define SYSCTL_XTAL_13_5MHZ 0x000004C0 // External crystal is 13.56 MHz +#define SYSCTL_XTAL_14_3MHZ 0x00000500 // External crystal is 14.31818 MHz +#define SYSCTL_XTAL_16MHZ 0x00000540 // External crystal is 16 MHz +#define SYSCTL_XTAL_16_3MHZ 0x00000580 // External crystal is 16.384 MHz +#define SYSCTL_OSC_MAIN 0x00000000 // Osc source is main osc +#define SYSCTL_OSC_INT 0x00000010 // Osc source is int. osc +#define SYSCTL_OSC_INT4 0x00000020 // Osc source is int. osc /4 +#define SYSCTL_OSC_INT30 0x00000030 // Osc source is int. 30 KHz +#define SYSCTL_OSC_EXT4_19 0x80000028 // Osc source is ext. 4.19 MHz +#define SYSCTL_OSC_EXT32 0x80000038 // Osc source is ext. 32 KHz +#define SYSCTL_INT_PIOSC_DIS 0x00000004 // Disable interal precision osc. +#define SYSCTL_INT_OSC_DIS 0x00000002 // Disable internal oscillator +#define SYSCTL_MAIN_OSC_DIS 0x00000001 // Disable main oscillator + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long SysCtlSRAMSizeGet(void); +extern unsigned long SysCtlFlashSizeGet(void); +extern tBoolean SysCtlPinPresent(unsigned long ulPin); +extern tBoolean SysCtlPeripheralPresent(unsigned long ulPeripheral); +extern void SysCtlPeripheralReset(unsigned long ulPeripheral); +extern void SysCtlPeripheralEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralClockGating(tBoolean bEnable); +extern void SysCtlIntRegister(void (*pfnHandler)(void)); +extern void SysCtlIntUnregister(void); +extern void SysCtlIntEnable(unsigned long ulInts); +extern void SysCtlIntDisable(unsigned long ulInts); +extern void SysCtlIntClear(unsigned long ulInts); +extern unsigned long SysCtlIntStatus(tBoolean bMasked); +extern void SysCtlLDOSet(unsigned long ulVoltage); +extern unsigned long SysCtlLDOGet(void); +extern void SysCtlLDOConfigSet(unsigned long ulConfig); +extern void SysCtlReset(void); +extern void SysCtlSleep(void); +extern void SysCtlDeepSleep(void); +extern unsigned long SysCtlResetCauseGet(void); +extern void SysCtlResetCauseClear(unsigned long ulCauses); +extern void SysCtlBrownOutConfigSet(unsigned long ulConfig, + unsigned long ulDelay); +extern void SysCtlDelay(unsigned long ulCount); +extern void SysCtlClockSet(unsigned long ulConfig); +extern unsigned long SysCtlClockGet(void); +extern void SysCtlPWMClockSet(unsigned long ulConfig); +extern unsigned long SysCtlPWMClockGet(void); +extern void SysCtlADCSpeedSet(unsigned long ulSpeed); +extern unsigned long SysCtlADCSpeedGet(void); +extern void SysCtlIOSCVerificationSet(tBoolean bEnable); +extern void SysCtlMOSCVerificationSet(tBoolean bEnable); +extern void SysCtlPLLVerificationSet(tBoolean bEnable); +extern void SysCtlClkVerificationClear(void); +extern void SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral); +extern void SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral); +extern void SysCtlUSBPLLEnable(void); +extern void SysCtlUSBPLLDisable(void); +extern unsigned long SysCtlI2SMClkSet(unsigned long ulInputClock, + unsigned long ulMClk); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.c new file mode 100644 index 00000000..86ddc668 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.c @@ -0,0 +1,1611 @@ +//***************************************************************************** +// +// uart.c - Driver for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup uart_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "inc/hw_uart.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/uartlib.h" + +//***************************************************************************** +// +// The system clock divider defining the maximum baud rate supported by the +// UART. +// +//***************************************************************************** +#define UART_CLK_DIVIDER ((CLASS_IS_SANDSTORM || \ + (CLASS_IS_FURY && REVISION_IS_A2) || \ + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) ? \ + 16 : 8) + +//***************************************************************************** +// +//! \internal +//! Checks a UART base address. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function determines if a UART port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +UARTBaseValid(unsigned long ulBase) +{ + return((ulBase == UART0_BASE) || (ulBase == UART1_BASE) || + (ulBase == UART2_BASE)); +} +#endif + +//***************************************************************************** +// +//! Sets the type of parity. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulParity specifies the type of parity to use. +//! +//! Sets the type of parity to use for transmitting and expect when receiving. +//! The \e ulParity parameter must be one of \b UART_CONFIG_PAR_NONE, +//! \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, +//! or \b UART_CONFIG_PAR_ZERO. The last two allow direct control of the +//! parity bit; it is always either one or zero based on the mode. +//! +//! \return None. +// +//***************************************************************************** +void +UARTParityModeSet(unsigned long ulBase, unsigned long ulParity) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulParity == UART_CONFIG_PAR_NONE) || + (ulParity == UART_CONFIG_PAR_EVEN) || + (ulParity == UART_CONFIG_PAR_ODD) || + (ulParity == UART_CONFIG_PAR_ONE) || + (ulParity == UART_CONFIG_PAR_ZERO)); + + // + // Set the parity mode. + // + HWREG(ulBase + UART_O_LCRH) = ((HWREG(ulBase + UART_O_LCRH) & + ~(UART_LCRH_SPS | UART_LCRH_EPS | + UART_LCRH_PEN)) | ulParity); +} + +//***************************************************************************** +// +//! Gets the type of parity currently being used. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function gets the type of parity used for transmitting data and +//! expected when receiving data. +//! +//! \return Returns the current parity settings, specified as one of +//! \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, +//! \b UART_CONFIG_PAR_ONE, or \b UART_CONFIG_PAR_ZERO. +// +//***************************************************************************** +unsigned long +UARTParityModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current parity setting. + // + return(HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Sets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulTxLevel is the transmit FIFO interrupt level, specified as one of +//! \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, \b UART_FIFO_TX4_8, +//! \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param ulRxLevel is the receive FIFO interrupt level, specified as one of +//! \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, \b UART_FIFO_RX4_8, +//! \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function sets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulTxLevel == UART_FIFO_TX1_8) || + (ulTxLevel == UART_FIFO_TX2_8) || + (ulTxLevel == UART_FIFO_TX4_8) || + (ulTxLevel == UART_FIFO_TX6_8) || + (ulTxLevel == UART_FIFO_TX7_8)); + ASSERT((ulRxLevel == UART_FIFO_RX1_8) || + (ulRxLevel == UART_FIFO_RX2_8) || + (ulRxLevel == UART_FIFO_RX4_8) || + (ulRxLevel == UART_FIFO_RX6_8) || + (ulRxLevel == UART_FIFO_RX7_8)); + + // + // Set the FIFO interrupt levels. + // + HWREG(ulBase + UART_O_IFLS) = ulTxLevel | ulRxLevel; +} + +//***************************************************************************** +// +//! Gets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param pulTxLevel is a pointer to storage for the transmit FIFO level, +//! returned as one of \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, +//! \b UART_FIFO_TX4_8, \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param pulRxLevel is a pointer to storage for the receive FIFO level, +//! returned as one of \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, +//! \b UART_FIFO_RX4_8, \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function gets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Read the FIFO level register. + // + ulTemp = HWREG(ulBase + UART_O_IFLS); + + // + // Extract the transmit and receive FIFO levels. + // + *pulTxLevel = ulTemp & UART_IFLS_TX_M; + *pulRxLevel = ulTemp & UART_IFLS_RX_M; +} + +//***************************************************************************** +// +//! Sets the configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param ulBaud is the desired baud rate. +//! \param ulConfig is the data format for the port (number of data bits, +//! number of stop bits, and parity). +//! +//! This function configures the UART for operation in the specified data +//! format. The baud rate is provided in the \e ulBaud parameter and the data +//! format in the \e ulConfig parameter. +//! +//! The \e ulConfig parameter is the logical OR of three values: the number of +//! data bits, the number of stop bits, and the parity. \b UART_CONFIG_WLEN_8, +//! \b UART_CONFIG_WLEN_7, \b UART_CONFIG_WLEN_6, and \b UART_CONFIG_WLEN_5 +//! select from eight to five data bits per byte (respectively). +//! \b UART_CONFIG_STOP_ONE and \b UART_CONFIG_STOP_TWO select one or two stop +//! bits (respectively). \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, +//! \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, and \b UART_CONFIG_PAR_ZERO +//! select the parity mode (no parity bit, even parity bit, odd parity bit, +//! parity bit always one, and parity bit always zero, respectively). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigSet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT(ulBaud != 0); + ASSERT(ulUARTClk >= (ulBaud * UART_CLK_DIVIDER)); + + // + // Stop the UART. + // + UARTDisable(ulBase); + + // + // Is the required baud rate greater than the maximum rate supported + // without the use of high speed mode? + // + if((ulBaud * 16) > ulUARTClk) + { + // + // Enable high speed mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_HSE; + + // + // Half the supplied baud rate to compensate for enabling high speed + // mode. This allows the following code to be common to both cases. + // + ulBaud /= 2; + } + else + { + // + // Disable high speed mode. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_HSE); + } + + // + // Compute the fractional baud rate divider. + // + ulDiv = (((ulUARTClk * 8) / ulBaud) + 1) / 2; + + // + // Set the baud rate. + // + HWREG(ulBase + UART_O_IBRD) = ulDiv / 64; + HWREG(ulBase + UART_O_FBRD) = ulDiv % 64; + + // + // Set parity, data length, and number of stop bits. + // + HWREG(ulBase + UART_O_LCRH) = ulConfig; + + // + // Clear the flags register. + // + HWREG(ulBase + UART_O_FR) = 0; + + // + // Start the UART. + // + UARTEnable(ulBase); +} + +//***************************************************************************** +// +//! Gets the current configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param pulBaud is a pointer to storage for the baud rate. +//! \param pulConfig is a pointer to storage for the data format. +//! +//! The baud rate and data format for the UART is determined, given an +//! explicitly provided peripheral clock (hence the ExpClk suffix). The +//! returned baud rate is the actual baud rate; it may not be the exact baud +//! rate requested or an ``official'' baud rate. The data format returned in +//! \e pulConfig is enumerated the same as the \e ulConfig parameter of +//! UARTConfigSetExpClk(). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigGet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, unsigned long *pulConfig) +{ + unsigned long ulInt, ulFrac; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Compute the baud rate. + // + ulInt = HWREG(ulBase + UART_O_IBRD); + ulFrac = HWREG(ulBase + UART_O_FBRD); + *pulBaud = (ulUARTClk * 4) / ((64 * ulInt) + ulFrac); + + // + // See if high speed mode enabled. + // + if(HWREG(ulBase + UART_O_CTL) & UART_CTL_HSE) + { + // + // High speed mode is enabled so the actual baud rate is actually + // double what was just calculated. + // + *pulBaud *= 2; + } + + // + // Get the parity, data length, and number of stop bits. + // + *pulConfig = (HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_WLEN_M | UART_LCRH_STP2 | + UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Enables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Sets the UARTEN, TXE, and RXE bits, and enables the transmit and receive +//! FIFOs. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; + + // + // Enable RX, TX, and the UART. + // + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Disables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the UARTEN, TXE, and RXE bits, then waits for the end of +//! transmission of the current character, and flushes the transmit FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait for end of TX. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) + { + } + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); + + // + // Disable the UART. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Enables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions enables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; +} + +//***************************************************************************** +// +//! Disables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions disables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFODisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); +} + +//***************************************************************************** +// +//! Enables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param bLowPower indicates if SIR Low Power Mode is to be used. +//! +//! Enables the SIREN control bit for IrDA mode on the UART. If the +//! \e bLowPower flag is set, then SIRLP bit will also be set. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable SIR and SIRLP (if appropriate). + // + if(bLowPower) + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN | UART_CTL_SIRLP); + } + else + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN); + } +} + +//***************************************************************************** +// +//! Disables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SIREN (IrDA) and SIRLP (Low Power) bits. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisableSIR(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable SIR and SIRLP (if appropriate). + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_SIREN | UART_CTL_SIRLP); +} + +//***************************************************************************** +// +//! Enables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Enables the SMART control bit for ISO 7816 smart card mode on the UART. +//! This call also sets 8 bit word length and even parity as required by ISO +//! 7816. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardEnable(unsigned long ulBase) +{ + unsigned long ulVal; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Set 8 bit word length, even parity, 2 stop bits (even though the STP2 + // bit is ignored when in smartcard mode, this lets the caller read back + // the actual setting in use). + // + ulVal = HWREG(ulBase + UART_O_LCRH); + ulVal &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN | + UART_LCRH_WLEN_M); + ulVal |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | UART_LCRH_STP2; + HWREG(ulBase + UART_O_LCRH) = ulVal; + + // + // Enable SMART mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Disables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SMART (ISO 7816 smart card) bits in the UART control register. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the SMART bit. + // + HWREG(ulBase + UART_O_CTL) &= ~UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Sets the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Sets the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlSet(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp |= (ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Clears the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Clears the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlClear(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp &= ~(ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the states of the DTR and RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the two UART modem control signals, +//! DTR and RTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_OUTPUT_RTS and +//! \b UART_OUTPUT_DTR where the presence of each flag indicates that the +//! associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_CTL) & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); +} + +//***************************************************************************** +// +//! Gets the states of the RI, DCD, DSR and CTS modem status signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the four UART modem status signals, +//! RI, DCD, DSR and CTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_INPUT_RI, \b +//! UART_INPUT_DCD, \b UART_INPUT_CTS and \b UART_INPUT_DSR where the +//! presence of each flag indicates that the associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemStatusGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD | + UART_INPUT_CTS | UART_INPUT_DSR)); +} + +//***************************************************************************** +// +//! Sets the UART hardware flow control mode to be used. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode indicates the flow control modes to be used. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX and \b +//! UART_FLOWCONTROL_RX to enable hardware transmit (CTS) and receive (RTS) +//! flow control or \b UART_FLOWCONTROL_NONE to disable hardware flow control. +//! +//! Sets the required hardware flow control modes. If \e ulMode contains +//! flag \b UART_FLOWCONTROL_TX, data is only transmitted if the incoming CTS +//! signal is asserted. If \e ulMode contains flag \b UART_FLOWCONTROL_RX, +//! the RTS output is controlled by the hardware and is asserted only when +//! there is space available in the receive FIFO. If no hardware flow control +//! is required, UART_FLOWCONTROL_NONE should be passed. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode & ~(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX)) == 0); + + // + // Set the flow control mode as requested. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the UART hardware flow control mode currently in use. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current hardware flow control mode. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns the current flow control mode in use. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX if transmit +//! (CTS) flow control is enabled and \b UART_FLOWCONTROL_RX if receive (RTS) +//! flow control is in use. If hardware flow control is disabled, \b +//! UART_FLOWCONTROL_NONE will be returned. +// +//***************************************************************************** +unsigned long +UARTFlowControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + return(HWREG(ulBase + UART_O_CTL) & (UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)); +} + +//***************************************************************************** +// +//! Sets the operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode is the operating mode for the transmit interrupt. It may be +//! \b UART_TXINT_MODE_EOT to trigger interrupts when the transmitter is idle +//! or \b UART_TXINT_MODE_FIFO to trigger based on the current transmit FIFO +//! level. +//! +//! This function allows the mode of the UART transmit interrupt to be set. By +//! default, the transmit interrupt is asserted when the FIFO level falls past +//! a threshold set via a call to UARTFIFOLevelSet(). Alternatively, if this +//! function is called with \e ulMode set to \b UART_TXINT_MODE_EOT, the +//! transmit interrupt will only be asserted once the transmitter is completely +//! idle - the transmit FIFO is empty and all bits, including any stop bits, +//! have cleared the transmitter. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode == UART_TXINT_MODE_EOT) || + (ulMode == UART_TXINT_MODE_FIFO)); + + // + // Set or clear the EOT bit of the UART control register as appropriate. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the current operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current operating mode for the UART transmit +//! interrupt. The return value will be \b UART_TXINT_MODE_EOT if the +//! transmit interrupt is currently set to be asserted once the transmitter is +//! completely idle - the transmit FIFO is empty and all bits, including any +//! stop bits, have cleared the transmitter. The return value will be \b +//! UART_TXINT_MODE_FIFO if the interrupt is set to be asserted based upon the +//! level of the transmit FIFO. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns \b UART_TXINT_MODE_FIFO or \b UART_TXINT_MODE_EOT. +// +//***************************************************************************** +unsigned long +UARTTxIntModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current transmit interrupt mode. + // + return(HWREG(ulBase + UART_O_CTL) & (UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)); +} + +//***************************************************************************** +// +//! Determines if there are any characters in the receive FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is data +//! available in the receive FIFO. +//! +//! \return Returns \b true if there is data in the receive FIFO or \b false +//! if there is no data in the receive FIFO. +// +//***************************************************************************** +tBoolean +UARTCharsAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of characters. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) ? false : true); +} + +//***************************************************************************** +// +//! Determines if there is any space in the transmit FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is space +//! available in the transmit FIFO. +//! +//! \return Returns \b true if there is space available in the transmit FIFO +//! or \b false if there is no space available in the transmit FIFO. +// +//***************************************************************************** +tBoolean +UARTSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of space. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) ? false : true); +} + +//***************************************************************************** +// +//! Receives a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. +//! +//! This function replaces the original UARTCharNonBlockingGet() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. A \b -1 is returned if there are no characters present in the +//! receive FIFO. The UARTCharsAvail() function should be called before +//! attempting to call this function. +// +//***************************************************************************** +long +UARTCharGetNonBlocking(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there are any characters in the receive FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)) + { + // + // Read and return the next character. + // + return(HWREG(ulBase + UART_O_DR)); + } + else + { + // + // There are no characters, so return a failure. + // + return(-1); + } +} + +//***************************************************************************** +// +//! Waits for a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. If there +//! are no characters available, this function waits until a character is +//! received before returning. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. +// +//***************************************************************************** +long +UARTCharGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until a char is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) + { + } + + // + // Now get the char. + // + return(HWREG(ulBase + UART_O_DR)); +} + +//***************************************************************************** +// +//! Sends a character to the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Writes the character \e ucData to the transmit FIFO for the specified port. +//! This function does not block, so if there is no space available, then a +//! \b false is returned, and the application must retry the function later. +//! +//! This function replaces the original UARTCharNonBlockingPut() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns \b true if the character was successfully placed in the +//! transmit FIFO or \b false if there was no space available in the transmit +//! FIFO. +// +//***************************************************************************** +tBoolean +UARTCharPutNonBlocking(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there is space in the transmit FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF)) + { + // + // Write this character to the transmit FIFO. + // + HWREG(ulBase + UART_O_DR) = ucData; + + // + // Success. + // + return(true); + } + else + { + // + // There is no space in the transmit FIFO, so return a failure. + // + return(false); + } +} + +//***************************************************************************** +// +//! Waits to send a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Sends the character \e ucData to the transmit FIFO for the specified port. +//! If there is no space available in the transmit FIFO, this function waits +//! until there is space available before returning. +//! +//! \return None. +// +//***************************************************************************** +void +UARTCharPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until space is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) + { + } + + // + // Send the char. + // + HWREG(ulBase + UART_O_DR) = ucData; +} + +//***************************************************************************** +// +//! Causes a BREAK to be sent. +//! +//! \param ulBase is the base address of the UART port. +//! \param bBreakState controls the output level. +//! +//! Calling this function with \e bBreakState set to \b true asserts a break +//! condition on the UART. Calling this function with \e bBreakState set to +//! \b false removes the break condition. For proper transmission of a break +//! command, the break must be asserted for at least two complete frames. +//! +//! \return None. +// +//***************************************************************************** +void +UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the break condition as requested. + // + HWREG(ulBase + UART_O_LCRH) = + (bBreakState ? + (HWREG(ulBase + UART_O_LCRH) | UART_LCRH_BRK) : + (HWREG(ulBase + UART_O_LCRH) & ~(UART_LCRH_BRK))); +} + +//***************************************************************************** +// +//! Determines whether the UART transmitter is busy or not. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, the transmit FIFO is +//! empty and all bits of the last transmitted character, including all stop +//! bits, have left the hardware shift register. +//! +//! \return Returns \b true if the UART is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +UARTBusy(unsigned long ulBase) +{ + // + // Check the argument. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine if the UART is busy. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) ? true : false); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param pfnHandler is a pointer to the function to be called when the +//! UART interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; specific UART +//! interrupts must be enabled via UARTIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the UART interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function does the actual unregistering of the interrupt handler. It +//! will clear the handler to be called when a UART interrupt occurs. This +//! will also mask off the interrupt in the interrupt controller so that the +//! interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b UART_INT_OE - Overrun Error interrupt +//! - \b UART_INT_BE - Break Error interrupt +//! - \b UART_INT_PE - Parity Error interrupt +//! - \b UART_INT_FE - Framing Error interrupt +//! - \b UART_INT_RT - Receive Timeout interrupt +//! - \b UART_INT_TX - Transmit interrupt +//! - \b UART_INT_RX - Receive interrupt +//! - \b UART_INT_DSR - DSR interrupt +//! - \b UART_INT_DCD - DCD interrupt +//! - \b UART_INT_CTS - CTS interrupt +//! - \b UART_INT_RI - RI interrupt +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the UART port. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified UART. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in UARTIntEnable(). +// +//***************************************************************************** +unsigned long +UARTIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + UART_O_MIS)); + } + else + { + return(HWREG(ulBase + UART_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified UART interrupt sources are cleared, so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupt from being recognized again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + UART_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Enable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified UART DMA features are enabled. The UART can be +//! configured to use DMA for transmit or receive, and to disable +//! receive if an error occurs. The \e ulDMAFlags parameter is the +//! logical OR of any of the following values: +//! +//! - UART_DMA_RX - enable DMA for receive +//! - UART_DMA_TX - enable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - disable DMA receive on UART error +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable UART DMA features that were enabled +//! by UARTDMAEnable(). The specified UART DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - UART_DMA_RX - disable DMA for receive +//! - UART_DMA_TX - disable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - do not disable DMA receive on UART error +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Gets current receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current state of each of the 4 receiver error +//! sources. The returned errors are equivalent to the four error bits +//! returned via the previous call to UARTCharGet() or UARTCharGetNonBlocking() +//! with the exception that the overrun error is set immediately the overrun +//! occurs rather than when a character is next read. +//! +//! \return Returns a logical OR combination of the receiver error flags, +//! \b UART_RXERROR_FRAMING, \b UART_RXERROR_PARITY, \b UART_RXERROR_BREAK +//! and \b UART_RXERROR_OVERRUN. +// +//***************************************************************************** +unsigned long +UARTRxErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current value of the receive status register. + // + return(HWREG(ulBase + UART_O_RSR) & 0x0000000F); +} + +//***************************************************************************** +// +//! Clears all reported receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function is used to clear all receiver error conditions reported via +//! UARTRxErrorGet(). If using the overrun, framing error, parity error or +//! break interrupts, this function must be called after clearing the interrupt +//! to ensure that later errors of the same type trigger another interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +UARTRxErrorClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Any write to the Error Clear Register will clear all bits which are + // currently set. + // + HWREG(ulBase + UART_O_ECR) = 0; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.h new file mode 100644 index 00000000..2a23fa63 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/driverlib/uartlib.h @@ -0,0 +1,243 @@ +//***************************************************************************** +// +// uart.h - Defines and Macros for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UART_H__ +#define __UART_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to UARTIntEnable, UARTIntDisable, and UARTIntClear +// as the ulIntFlags parameter, and returned from UARTIntStatus. +// +//***************************************************************************** +#define UART_INT_OE 0x400 // Overrun Error Interrupt Mask +#define UART_INT_BE 0x200 // Break Error Interrupt Mask +#define UART_INT_PE 0x100 // Parity Error Interrupt Mask +#define UART_INT_FE 0x080 // Framing Error Interrupt Mask +#define UART_INT_RT 0x040 // Receive Timeout Interrupt Mask +#define UART_INT_TX 0x020 // Transmit Interrupt Mask +#define UART_INT_RX 0x010 // Receive Interrupt Mask +#define UART_INT_DSR 0x008 // DSR Modem Interrupt Mask +#define UART_INT_DCD 0x004 // DCD Modem Interrupt Mask +#define UART_INT_CTS 0x002 // CTS Modem Interrupt Mask +#define UART_INT_RI 0x001 // RI Modem Interrupt Mask + +//***************************************************************************** +// +// Values that can be passed to UARTConfigSetExpClk as the ulConfig parameter +// and returned by UARTConfigGetExpClk in the pulConfig parameter. +// Additionally, the UART_CONFIG_PAR_* subset can be passed to +// UARTParityModeSet as the ulParity parameter, and are returned by +// UARTParityModeGet. +// +//***************************************************************************** +#define UART_CONFIG_WLEN_MASK 0x00000060 // Mask for extracting word length +#define UART_CONFIG_WLEN_8 0x00000060 // 8 bit data +#define UART_CONFIG_WLEN_7 0x00000040 // 7 bit data +#define UART_CONFIG_WLEN_6 0x00000020 // 6 bit data +#define UART_CONFIG_WLEN_5 0x00000000 // 5 bit data +#define UART_CONFIG_STOP_MASK 0x00000008 // Mask for extracting stop bits +#define UART_CONFIG_STOP_ONE 0x00000000 // One stop bit +#define UART_CONFIG_STOP_TWO 0x00000008 // Two stop bits +#define UART_CONFIG_PAR_MASK 0x00000086 // Mask for extracting parity +#define UART_CONFIG_PAR_NONE 0x00000000 // No parity +#define UART_CONFIG_PAR_EVEN 0x00000006 // Even parity +#define UART_CONFIG_PAR_ODD 0x00000002 // Odd parity +#define UART_CONFIG_PAR_ONE 0x00000082 // Parity bit is one +#define UART_CONFIG_PAR_ZERO 0x00000086 // Parity bit is zero + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulTxLevel parameter and +// returned by UARTFIFOLevelGet in the pulTxLevel. +// +//***************************************************************************** +#define UART_FIFO_TX1_8 0x00000000 // Transmit interrupt at 1/8 Full +#define UART_FIFO_TX2_8 0x00000001 // Transmit interrupt at 1/4 Full +#define UART_FIFO_TX4_8 0x00000002 // Transmit interrupt at 1/2 Full +#define UART_FIFO_TX6_8 0x00000003 // Transmit interrupt at 3/4 Full +#define UART_FIFO_TX7_8 0x00000004 // Transmit interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulRxLevel parameter and +// returned by UARTFIFOLevelGet in the pulRxLevel. +// +//***************************************************************************** +#define UART_FIFO_RX1_8 0x00000000 // Receive interrupt at 1/8 Full +#define UART_FIFO_RX2_8 0x00000008 // Receive interrupt at 1/4 Full +#define UART_FIFO_RX4_8 0x00000010 // Receive interrupt at 1/2 Full +#define UART_FIFO_RX6_8 0x00000018 // Receive interrupt at 3/4 Full +#define UART_FIFO_RX7_8 0x00000020 // Receive interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTDMAEnable() and UARTDMADisable(). +// +//***************************************************************************** +#define UART_DMA_ERR_RXSTOP 0x00000004 // Stop DMA receive if UART error +#define UART_DMA_TX 0x00000002 // Enable DMA for transmit +#define UART_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Values returned from UARTRxErrorGet(). +// +//***************************************************************************** +#define UART_RXERROR_OVERRUN 0x00000008 +#define UART_RXERROR_BREAK 0x00000004 +#define UART_RXERROR_PARITY 0x00000002 +#define UART_RXERROR_FRAMING 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTHandshakeOutputsSet() or returned from +// UARTHandshakeOutputGet(). +// +//***************************************************************************** +#define UART_OUTPUT_RTS 0x00000800 +#define UART_OUTPUT_DTR 0x00000400 + +//***************************************************************************** +// +// Values that can be returned from UARTHandshakeInputsGet(). +// +//***************************************************************************** +#define UART_INPUT_RI 0x00000100 +#define UART_INPUT_DCD 0x00000004 +#define UART_INPUT_DSR 0x00000002 +#define UART_INPUT_CTS 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTFlowControl() or returned from +// UARTFlowControlGet(). +// +//***************************************************************************** +#define UART_FLOWCONTROL_TX 0x00008000 +#define UART_FLOWCONTROL_RX 0x00004000 +#define UART_FLOWCONTROL_NONE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to UARTTxIntModeSet() or returned from +// UARTTxIntModeGet(). +// +//***************************************************************************** +#define UART_TXINT_MODE_FIFO 0x00000000 +#define UART_TXINT_MODE_EOT 0x00000010 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void UARTParityModeSet(unsigned long ulBase, unsigned long ulParity); +extern unsigned long UARTParityModeGet(unsigned long ulBase); +extern void UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel); +extern void UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel); +extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig); +extern void UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, + unsigned long *pulConfig); +extern void UARTEnable(unsigned long ulBase); +extern void UARTDisable(unsigned long ulBase); +extern void UARTFIFOEnable(unsigned long ulBase); +extern void UARTFIFODisable(unsigned long ulBase); +extern void UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower); +extern void UARTDisableSIR(unsigned long ulBase); +extern tBoolean UARTCharsAvail(unsigned long ulBase); +extern tBoolean UARTSpaceAvail(unsigned long ulBase); +extern long UARTCharGetNonBlocking(unsigned long ulBase); +extern long UARTCharGet(unsigned long ulBase); +extern tBoolean UARTCharPutNonBlocking(unsigned long ulBase, + unsigned char ucData); +extern void UARTCharPut(unsigned long ulBase, unsigned char ucData); +extern void UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState); +extern tBoolean UARTBusy(unsigned long ulBase); +extern void UARTIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void UARTIntUnregister(unsigned long ulBase); +extern void UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long UARTIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern unsigned long UARTRxErrorGet(unsigned long ulBase); +extern void UARTRxErrorClear(unsigned long ulBase); +extern void UARTSmartCardEnable(unsigned long ulBase); +extern void UARTSmartCardDisable(unsigned long ulBase); +extern void UARTModemControlSet(unsigned long ulBase, + unsigned long ulControl); +extern void UARTModemControlClear(unsigned long ulBase, + unsigned long ulControl); +extern unsigned long UARTModemControlGet(unsigned long ulBase); +extern unsigned long UARTModemStatusGet(unsigned long ulBase); +extern void UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTFlowControlGet(unsigned long ulBase); +extern void UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTTxIntModeGet(unsigned long ulBase); + +//***************************************************************************** +// +// Several UART APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define UARTConfigSet(a, b, c) \ + UARTConfigSetExpClk(a, SysCtlClockGet(), b, c) +#define UARTConfigGet(a, b, c) \ + UARTConfigGetExpClk(a, SysCtlClockGet(), b, c) +#define UARTCharNonBlockingGet(a) \ + UARTCharGetNonBlocking(a) +#define UARTCharNonBlockingPut(a, b) \ + UARTCharPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_can.h new file mode 100644 index 00000000..f8ee925c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_can.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_can.h - Defines and macros used when accessing the CAN controllers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_CAN_H__ +#define __HW_CAN_H__ + +//***************************************************************************** +// +// The following are defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_CTL 0x00000000 // CAN Control +#define CAN_O_STS 0x00000004 // CAN Status +#define CAN_O_ERR 0x00000008 // CAN Error Counter +#define CAN_O_BIT 0x0000000C // CAN Bit Timing +#define CAN_O_INT 0x00000010 // CAN Interrupt +#define CAN_O_TST 0x00000014 // CAN Test +#define CAN_O_BRPE 0x00000018 // CAN Baud Rate Prescaler + // Extension +#define CAN_O_IF1CRQ 0x00000020 // CAN IF1 Command Request +#define CAN_O_IF1CMSK 0x00000024 // CAN IF1 Command Mask +#define CAN_O_IF1MSK1 0x00000028 // CAN IF1 Mask 1 +#define CAN_O_IF1MSK2 0x0000002C // CAN IF1 Mask 2 +#define CAN_O_IF1ARB1 0x00000030 // CAN IF1 Arbitration 1 +#define CAN_O_IF1ARB2 0x00000034 // CAN IF1 Arbitration 2 +#define CAN_O_IF1MCTL 0x00000038 // CAN IF1 Message Control +#define CAN_O_IF1DA1 0x0000003C // CAN IF1 Data A1 +#define CAN_O_IF1DA2 0x00000040 // CAN IF1 Data A2 +#define CAN_O_IF1DB1 0x00000044 // CAN IF1 Data B1 +#define CAN_O_IF1DB2 0x00000048 // CAN IF1 Data B2 +#define CAN_O_IF2CRQ 0x00000080 // CAN IF2 Command Request +#define CAN_O_IF2CMSK 0x00000084 // CAN IF2 Command Mask +#define CAN_O_IF2MSK1 0x00000088 // CAN IF2 Mask 1 +#define CAN_O_IF2MSK2 0x0000008C // CAN IF2 Mask 2 +#define CAN_O_IF2ARB1 0x00000090 // CAN IF2 Arbitration 1 +#define CAN_O_IF2ARB2 0x00000094 // CAN IF2 Arbitration 2 +#define CAN_O_IF2MCTL 0x00000098 // CAN IF2 Message Control +#define CAN_O_IF2DA1 0x0000009C // CAN IF2 Data A1 +#define CAN_O_IF2DA2 0x000000A0 // CAN IF2 Data A2 +#define CAN_O_IF2DB1 0x000000A4 // CAN IF2 Data B1 +#define CAN_O_IF2DB2 0x000000A8 // CAN IF2 Data B2 +#define CAN_O_TXRQ1 0x00000100 // CAN Transmission Request 1 +#define CAN_O_TXRQ2 0x00000104 // CAN Transmission Request 2 +#define CAN_O_NWDA1 0x00000120 // CAN New Data 1 +#define CAN_O_NWDA2 0x00000124 // CAN New Data 2 +#define CAN_O_MSG1INT 0x00000140 // CAN Message 1 Interrupt Pending +#define CAN_O_MSG2INT 0x00000144 // CAN Message 2 Interrupt Pending +#define CAN_O_MSG1VAL 0x00000160 // CAN Message 1 Valid +#define CAN_O_MSG2VAL 0x00000164 // CAN Message 2 Valid + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_CTL register. +// +//***************************************************************************** +#define CAN_CTL_TEST 0x00000080 // Test Mode Enable +#define CAN_CTL_CCE 0x00000040 // Configuration Change Enable +#define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission +#define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable +#define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable +#define CAN_CTL_IE 0x00000002 // CAN Interrupt Enable +#define CAN_CTL_INIT 0x00000001 // Initialization + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_STS register. +// +//***************************************************************************** +#define CAN_STS_BOFF 0x00000080 // Bus-Off Status +#define CAN_STS_EWARN 0x00000040 // Warning Status +#define CAN_STS_EPASS 0x00000020 // Error Passive +#define CAN_STS_RXOK 0x00000010 // Received a Message Successfully +#define CAN_STS_TXOK 0x00000008 // Transmitted a Message + // Successfully +#define CAN_STS_LEC_M 0x00000007 // Last Error Code +#define CAN_STS_LEC_NONE 0x00000000 // No Error +#define CAN_STS_LEC_STUFF 0x00000001 // Stuff Error +#define CAN_STS_LEC_FORM 0x00000002 // Format Error +#define CAN_STS_LEC_ACK 0x00000003 // ACK Error +#define CAN_STS_LEC_BIT1 0x00000004 // Bit 1 Error +#define CAN_STS_LEC_BIT0 0x00000005 // Bit 0 Error +#define CAN_STS_LEC_CRC 0x00000006 // CRC Error +#define CAN_STS_LEC_NOEVENT 0x00000007 // No Event + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_ERR register. +// +//***************************************************************************** +#define CAN_ERR_RP 0x00008000 // Received Error Passive +#define CAN_ERR_REC_M 0x00007F00 // Receive Error Counter +#define CAN_ERR_TEC_M 0x000000FF // Transmit Error Counter +#define CAN_ERR_REC_S 8 +#define CAN_ERR_TEC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BIT register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2_M 0x00007000 // Time Segment after Sample Point +#define CAN_BIT_TSEG1_M 0x00000F00 // Time Segment Before Sample Point +#define CAN_BIT_SJW_M 0x000000C0 // (Re)Synchronization Jump Width +#define CAN_BIT_BRP_M 0x0000003F // Baud Rate Prescaler +#define CAN_BIT_TSEG2_S 12 +#define CAN_BIT_TSEG1_S 8 +#define CAN_BIT_SJW_S 6 +#define CAN_BIT_BRP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_INT register. +// +//***************************************************************************** +#define CAN_INT_INTID_M 0x0000FFFF // Interrupt Identifier +#define CAN_INT_INTID_NONE 0x00000000 // No interrupt pending +#define CAN_INT_INTID_STATUS 0x00008000 // Status Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TST register. +// +//***************************************************************************** +#define CAN_TST_RX 0x00000080 // Receive Observation +#define CAN_TST_TX_M 0x00000060 // Transmit Control +#define CAN_TST_TX_CANCTL 0x00000000 // CAN Module Control +#define CAN_TST_TX_SAMPLE 0x00000020 // Sample Point +#define CAN_TST_TX_DOMINANT 0x00000040 // Driven Low +#define CAN_TST_TX_RECESSIVE 0x00000060 // Driven High +#define CAN_TST_LBACK 0x00000010 // Loopback Mode +#define CAN_TST_SILENT 0x00000008 // Silent Mode +#define CAN_TST_BASIC 0x00000004 // Basic Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BRPE register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE_M 0x0000000F // Baud Rate Prescaler Extension +#define CAN_BRPE_BRPE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CRQ register. +// +//***************************************************************************** +#define CAN_IF1CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF1CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF1CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF1CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CMSK register. +// +//***************************************************************************** +#define CAN_IF1CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF1CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF1CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF1CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF1CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF1CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF1CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF1CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF1CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK1 register. +// +//***************************************************************************** +#define CAN_IF1MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF1MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK2 register. +// +//***************************************************************************** +#define CAN_IF1MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF1MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF1MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF1MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB1 register. +// +//***************************************************************************** +#define CAN_IF1ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF1ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB2 register. +// +//***************************************************************************** +#define CAN_IF1ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF1ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF1ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF1ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF1ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MCTL register. +// +//***************************************************************************** +#define CAN_IF1MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF1MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF1MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF1MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF1MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF1MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF1MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF1MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF1MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF1MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF1MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA1 register. +// +//***************************************************************************** +#define CAN_IF1DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA2 register. +// +//***************************************************************************** +#define CAN_IF1DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB1 register. +// +//***************************************************************************** +#define CAN_IF1DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB2 register. +// +//***************************************************************************** +#define CAN_IF1DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CRQ register. +// +//***************************************************************************** +#define CAN_IF2CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF2CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF2CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF2CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CMSK register. +// +//***************************************************************************** +#define CAN_IF2CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF2CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF2CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF2CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF2CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF2CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF2CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF2CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF2CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK1 register. +// +//***************************************************************************** +#define CAN_IF2MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF2MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK2 register. +// +//***************************************************************************** +#define CAN_IF2MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF2MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF2MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF2MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB1 register. +// +//***************************************************************************** +#define CAN_IF2ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF2ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB2 register. +// +//***************************************************************************** +#define CAN_IF2ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF2ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF2ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF2ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF2ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MCTL register. +// +//***************************************************************************** +#define CAN_IF2MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF2MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF2MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF2MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF2MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF2MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF2MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF2MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF2MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF2MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF2MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA1 register. +// +//***************************************************************************** +#define CAN_IF2DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA2 register. +// +//***************************************************************************** +#define CAN_IF2DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB1 register. +// +//***************************************************************************** +#define CAN_IF2DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB2 register. +// +//***************************************************************************** +#define CAN_IF2DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ1 register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ1_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ2 register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ2_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA1 register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA1_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA2 register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA2_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1INT register. +// +//***************************************************************************** +#define CAN_MSG1INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG1INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2INT register. +// +//***************************************************************************** +#define CAN_MSG2INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG2INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1VAL register. +// +//***************************************************************************** +#define CAN_MSG1VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG1VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2VAL register. +// +//***************************************************************************** +#define CAN_MSG2VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG2VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_MSGINT1 0x00000140 // Intr. Pending in Msg Obj 1 reg +#define CAN_O_MSGINT2 0x00000144 // Intr. Pending in Msg Obj 2 reg +#define CAN_O_MSGVAL1 0x00000160 // Message Valid in Msg Obj 1 reg +#define CAN_O_MSGVAL2 0x00000164 // Message Valid in Msg Obj 2 reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_STS +// register. +// +//***************************************************************************** +#define CAN_STS_LEC_MSK 0x00000007 // Last Error Code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_ERR +// register. +// +//***************************************************************************** +#define CAN_ERR_REC_MASK 0x00007F00 // Receive error counter status +#define CAN_ERR_TEC_MASK 0x000000FF // Transmit error counter status +#define CAN_ERR_REC_SHIFT 8 // Receive error counter bit pos +#define CAN_ERR_TEC_SHIFT 0 // Transmit error counter bit pos + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BIT +// register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2 0x00007000 // Time segment after sample point +#define CAN_BIT_TSEG1 0x00000F00 // Time segment before sample point +#define CAN_BIT_SJW 0x000000C0 // (Re)Synchronization jump width +#define CAN_BIT_BRP 0x0000003F // Baud rate prescaler + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_INT +// register. +// +//***************************************************************************** +#define CAN_INT_INTID_MSK 0x0000FFFF // Interrupt Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TST +// register. +// +//***************************************************************************** +#define CAN_TST_TX_MSK 0x00000060 // Overide control of CAN_TX pin + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BRPE +// register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE 0x0000000F // Baud rate prescaler extension + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ1 +// register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ2 +// register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA1 +// register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA2 +// register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT1 +// register. +// +//***************************************************************************** +#define CAN_MSGINT1_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT2 +// register. +// +//***************************************************************************** +#define CAN_MSGINT2_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL1 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL1_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL2 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL2_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the can +// registers. +// +//***************************************************************************** +#define CAN_RV_IF1MSK2 0x0000FFFF +#define CAN_RV_IF1MSK1 0x0000FFFF +#define CAN_RV_IF2MSK1 0x0000FFFF +#define CAN_RV_IF2MSK2 0x0000FFFF +#define CAN_RV_BIT 0x00002301 +#define CAN_RV_CTL 0x00000001 +#define CAN_RV_IF1CRQ 0x00000001 +#define CAN_RV_IF2CRQ 0x00000001 +#define CAN_RV_TXRQ2 0x00000000 +#define CAN_RV_IF2DB1 0x00000000 +#define CAN_RV_INT 0x00000000 +#define CAN_RV_IF1DB2 0x00000000 +#define CAN_RV_BRPE 0x00000000 +#define CAN_RV_IF2DA2 0x00000000 +#define CAN_RV_MSGVAL2 0x00000000 +#define CAN_RV_TXRQ1 0x00000000 +#define CAN_RV_IF1MCTL 0x00000000 +#define CAN_RV_IF1DB1 0x00000000 +#define CAN_RV_STS 0x00000000 +#define CAN_RV_MSGINT1 0x00000000 +#define CAN_RV_IF1DA2 0x00000000 +#define CAN_RV_TST 0x00000000 +#define CAN_RV_IF1ARB1 0x00000000 +#define CAN_RV_IF1ARB2 0x00000000 +#define CAN_RV_NWDA2 0x00000000 +#define CAN_RV_IF2CMSK 0x00000000 +#define CAN_RV_NWDA1 0x00000000 +#define CAN_RV_IF1DA1 0x00000000 +#define CAN_RV_IF2DA1 0x00000000 +#define CAN_RV_IF2MCTL 0x00000000 +#define CAN_RV_MSGVAL1 0x00000000 +#define CAN_RV_IF1CMSK 0x00000000 +#define CAN_RV_ERR 0x00000000 +#define CAN_RV_IF2ARB2 0x00000000 +#define CAN_RV_MSGINT2 0x00000000 +#define CAN_RV_IF2ARB1 0x00000000 +#define CAN_RV_IF2DB2 0x00000000 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CRQ +// and CAN_IF1CRQ registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCRQ_BUSY 0x00008000 // Busy flag status +#define CAN_IFCRQ_MNUM_MSK 0x0000003F // Message Number + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CMSK +// and CAN_IF2CMSK registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCMSK_WRNRD 0x00000080 // Write, not Read +#define CAN_IFCMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IFCMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IFCMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IFCMSK_CLRINTPND 0x00000008 // Clear interrupt pending Bit +#define CAN_IFCMSK_TXRQST 0x00000004 // Access Tx request bit (WRNRD=1) +#define CAN_IFCMSK_NEWDAT 0x00000004 // Access New Data bit (WRNRD=0) +#define CAN_IFCMSK_DATAA 0x00000002 // DataA access - bytes 0 to 3 +#define CAN_IFCMSK_DATAB 0x00000001 // DataB access - bytes 4 to 7 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK1 +// and CAN_IF2MSK1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK1_MSK 0x0000FFFF // Identifier Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK2 +// and CAN_IF2MSK2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK2_MXTD 0x00008000 // Mask extended identifier +#define CAN_IFMSK2_MDIR 0x00004000 // Mask message direction +#define CAN_IFMSK2_MSK 0x00001FFF // Mask identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB1 +// and CAN_IF2ARB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB1_ID 0x0000FFFF // Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB2 +// and CAN_IF2ARB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB2_MSGVAL 0x00008000 // Message valid +#define CAN_IFARB2_XTD 0x00004000 // Extended identifier +#define CAN_IFARB2_DIR 0x00002000 // Message direction +#define CAN_IFARB2_ID 0x00001FFF // Message identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MCTL +// and CAN_IF2MCTL registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMCTL_NEWDAT 0x00008000 // New Data +#define CAN_IFMCTL_MSGLST 0x00004000 // Message lost +#define CAN_IFMCTL_INTPND 0x00002000 // Interrupt pending +#define CAN_IFMCTL_UMASK 0x00001000 // Use acceptance mask +#define CAN_IFMCTL_TXIE 0x00000800 // Transmit interrupt enable +#define CAN_IFMCTL_RXIE 0x00000400 // Receive interrupt enable +#define CAN_IFMCTL_RMTEN 0x00000200 // Remote enable +#define CAN_IFMCTL_TXRQST 0x00000100 // Transmit request +#define CAN_IFMCTL_EOB 0x00000080 // End of buffer +#define CAN_IFMCTL_DLC 0x0000000F // Data length code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA1 +// and CAN_IF2DA1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA1_DATA 0x0000FFFF // Data - bytes 1 and 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA2 +// and CAN_IF2DA2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA2_DATA 0x0000FFFF // Data - bytes 3 and 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB1 +// and CAN_IF2DB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB1_DATA 0x0000FFFF // Data - bytes 5 and 4 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB2 +// and CAN_IF2DB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB2_DATA 0x0000FFFF // Data - bytes 7 and 6 + +#endif + +#endif // __HW_CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_flash.h new file mode 100644 index 00000000..13a013e5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_flash.h @@ -0,0 +1,381 @@ +//***************************************************************************** +// +// hw_flash.h - Macros used when accessing the flash controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_FLASH_H__ +#define __HW_FLASH_H__ + +//***************************************************************************** +// +// The following are defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_FMA 0x400FD000 // Flash Memory Address +#define FLASH_FMD 0x400FD004 // Flash Memory Data +#define FLASH_FMC 0x400FD008 // Flash Memory Control +#define FLASH_FCRIS 0x400FD00C // Flash Controller Raw Interrupt + // Status +#define FLASH_FCIM 0x400FD010 // Flash Controller Interrupt Mask +#define FLASH_FCMISC 0x400FD014 // Flash Controller Masked + // Interrupt Status and Clear +#define FLASH_FMC2 0x400FD020 // Flash Memory Control 2 +#define FLASH_FWBVAL 0x400FD030 // Flash Write Buffer Valid +#define FLASH_FCTL 0x400FD0F8 // Flash Control +#define FLASH_FWBN 0x400FD100 // Flash Write Buffer n +#define FLASH_RMCTL 0x400FE0F0 // ROM Control +#define FLASH_FMPRE 0x400FE130 // Flash Memory Protection Read + // Enable +#define FLASH_FMPPE 0x400FE134 // Flash Memory Protection Program + // Enable +#define FLASH_USECRL 0x400FE140 // USec Reload +#define FLASH_USERDBG 0x400FE1D0 // User Debug +#define FLASH_BOOTCFG 0x400FE1D0 // Boot Configuration +#define FLASH_USERREG0 0x400FE1E0 // User Register 0 +#define FLASH_USERREG1 0x400FE1E4 // User Register 1 +#define FLASH_USERREG2 0x400FE1E8 // User Register 2 +#define FLASH_USERREG3 0x400FE1EC // User Register 3 +#define FLASH_FMPRE0 0x400FE200 // Flash Memory Protection Read + // Enable 0 +#define FLASH_FMPRE1 0x400FE204 // Flash Memory Protection Read + // Enable 1 +#define FLASH_FMPRE2 0x400FE208 // Flash Memory Protection Read + // Enable 2 +#define FLASH_FMPRE3 0x400FE20C // Flash Memory Protection Read + // Enable 3 +#define FLASH_FMPPE0 0x400FE400 // Flash Memory Protection Program + // Enable 0 +#define FLASH_FMPPE1 0x400FE404 // Flash Memory Protection Program + // Enable 1 +#define FLASH_FMPPE2 0x400FE408 // Flash Memory Protection Program + // Enable 2 +#define FLASH_FMPPE3 0x400FE40C // Flash Memory Protection Program + // Enable 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC2 register. +// +//***************************************************************************** +#define FLASH_FMC2_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC2_WRBUF 0x00000001 // Buffered Flash Memory Write + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBVAL register. +// +//***************************************************************************** +#define FLASH_FWBVAL_FWB_M 0xFFFFFFFF // Flash Memory Write Buffer + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCTL register. +// +//***************************************************************************** +#define FLASH_FCTL_USDACK 0x00000002 // User Shut Down Acknowledge +#define FLASH_FCTL_USDREQ 0x00000001 // User Shut Down Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBN register. +// +//***************************************************************************** +#define FLASH_FWBN_DATA_M 0xFFFFFFFF // Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_RMCTL register. +// +//***************************************************************************** +#define FLASH_RMCTL_BA 0x00000001 // Boot Alias + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_BOOTCFG register. +// +//***************************************************************************** +#define FLASH_BOOTCFG_NW 0x80000000 // Not Written +#define FLASH_BOOTCFG_PORT_M 0x0000E000 // Boot GPIO Port +#define FLASH_BOOTCFG_PORT_A 0x00000000 // Port A +#define FLASH_BOOTCFG_PORT_B 0x00002000 // Port B +#define FLASH_BOOTCFG_PORT_C 0x00004000 // Port C +#define FLASH_BOOTCFG_PORT_D 0x00006000 // Port D +#define FLASH_BOOTCFG_PORT_E 0x00008000 // Port E +#define FLASH_BOOTCFG_PORT_F 0x0000A000 // Port F +#define FLASH_BOOTCFG_PORT_G 0x0000C000 // Port G +#define FLASH_BOOTCFG_PORT_H 0x0000E000 // Port H +#define FLASH_BOOTCFG_PIN_M 0x00001C00 // Boot GPIO Pin +#define FLASH_BOOTCFG_PIN_0 0x00000000 // Pin 0 +#define FLASH_BOOTCFG_PIN_1 0x00000400 // Pin 1 +#define FLASH_BOOTCFG_PIN_2 0x00000800 // Pin 2 +#define FLASH_BOOTCFG_PIN_3 0x00000C00 // Pin 3 +#define FLASH_BOOTCFG_PIN_4 0x00001000 // Pin 4 +#define FLASH_BOOTCFG_PIN_5 0x00001400 // Pin 5 +#define FLASH_BOOTCFG_PIN_6 0x00001800 // Pin 6 +#define FLASH_BOOTCFG_PIN_7 0x00001C00 // Pin 7 +#define FLASH_BOOTCFG_POL 0x00000200 // Boot GPIO Polarity +#define FLASH_BOOTCFG_EN 0x00000100 // Boot GPIO Enable +#define FLASH_BOOTCFG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_BOOTCFG_DBG0 0x00000001 // Debug Control 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG2 register. +// +//***************************************************************************** +#define FLASH_USERREG2_NW 0x80000000 // Not Written +#define FLASH_USERREG2_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG3 register. +// +//***************************************************************************** +#define FLASH_USERREG3_NW 0x80000000 // Not Written +#define FLASH_USERREG3_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMPRE and +// FLASH_FMPPE registers. +// +//***************************************************************************** +#define FLASH_FMP_BLOCK_31 0x80000000 // Enable for block 31 +#define FLASH_FMP_BLOCK_30 0x40000000 // Enable for block 30 +#define FLASH_FMP_BLOCK_29 0x20000000 // Enable for block 29 +#define FLASH_FMP_BLOCK_28 0x10000000 // Enable for block 28 +#define FLASH_FMP_BLOCK_27 0x08000000 // Enable for block 27 +#define FLASH_FMP_BLOCK_26 0x04000000 // Enable for block 26 +#define FLASH_FMP_BLOCK_25 0x02000000 // Enable for block 25 +#define FLASH_FMP_BLOCK_24 0x01000000 // Enable for block 24 +#define FLASH_FMP_BLOCK_23 0x00800000 // Enable for block 23 +#define FLASH_FMP_BLOCK_22 0x00400000 // Enable for block 22 +#define FLASH_FMP_BLOCK_21 0x00200000 // Enable for block 21 +#define FLASH_FMP_BLOCK_20 0x00100000 // Enable for block 20 +#define FLASH_FMP_BLOCK_19 0x00080000 // Enable for block 19 +#define FLASH_FMP_BLOCK_18 0x00040000 // Enable for block 18 +#define FLASH_FMP_BLOCK_17 0x00020000 // Enable for block 17 +#define FLASH_FMP_BLOCK_16 0x00010000 // Enable for block 16 +#define FLASH_FMP_BLOCK_15 0x00008000 // Enable for block 15 +#define FLASH_FMP_BLOCK_14 0x00004000 // Enable for block 14 +#define FLASH_FMP_BLOCK_13 0x00002000 // Enable for block 13 +#define FLASH_FMP_BLOCK_12 0x00001000 // Enable for block 12 +#define FLASH_FMP_BLOCK_11 0x00000800 // Enable for block 11 +#define FLASH_FMP_BLOCK_10 0x00000400 // Enable for block 10 +#define FLASH_FMP_BLOCK_9 0x00000200 // Enable for block 9 +#define FLASH_FMP_BLOCK_8 0x00000100 // Enable for block 8 +#define FLASH_FMP_BLOCK_7 0x00000080 // Enable for block 7 +#define FLASH_FMP_BLOCK_6 0x00000040 // Enable for block 6 +#define FLASH_FMP_BLOCK_5 0x00000020 // Enable for block 5 +#define FLASH_FMP_BLOCK_4 0x00000010 // Enable for block 4 +#define FLASH_FMP_BLOCK_3 0x00000008 // Enable for block 3 +#define FLASH_FMP_BLOCK_2 0x00000004 // Enable for block 2 +#define FLASH_FMP_BLOCK_1 0x00000002 // Enable for block 1 +#define FLASH_FMP_BLOCK_0 0x00000001 // Enable for block 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_RMVER 0x400FE0F4 // ROM Version Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FMC +// register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_MASK 0xFFFF0000 // FLASH write key mask +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCRIS +// register. +// +//***************************************************************************** +#define FLASH_FCRIS_PROGRAM 0x00000002 // Programming status +#define FLASH_FCRIS_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCIM +// register. +// +//***************************************************************************** +#define FLASH_FCIM_PROGRAM 0x00000002 // Programming mask +#define FLASH_FCIM_ACCESS 0x00000001 // Invalid access mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCMISC +// register. +// +//***************************************************************************** +#define FLASH_FCMISC_PROGRAM 0x00000002 // Programming status +#define FLASH_FCMISC_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_RMVER +// register. +// +//***************************************************************************** +#define FLASH_RMVER_CONT_M 0xFF000000 // ROM Contents +#define FLASH_RMVER_CONT_LM 0x00000000 // Stellaris Boot Loader & + // DriverLib +#define FLASH_RMVER_CONT_LM_AES 0x02000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_CONT_LM_AES_SAFERTOS \ + 0x03000000 // Stellaris Boot Loader & + // DriverLib with AES and SAFERTOS +#define FLASH_RMVER_CONT_LM_AES2 \ + 0x05000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_VER_M 0x0000FF00 // ROM Version +#define FLASH_RMVER_REV_M 0x000000FF // ROM Revision +#define FLASH_RMVER_VER_S 8 +#define FLASH_RMVER_REV_S 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_USECRL +// register. +// +//***************************************************************************** +#define FLASH_USECRL_MASK 0x000000FF // Clock per uSec +#define FLASH_USECRL_SHIFT 0 + +#endif + +#endif // __HW_FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_gpio.h new file mode 100644 index 00000000..acdb2984 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_gpio.h @@ -0,0 +1,592 @@ +//***************************************************************************** +// +// hw_gpio.h - Defines and Macros for GPIO hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_GPIO_H__ +#define __HW_GPIO_H__ + +//***************************************************************************** +// +// The following are defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_DATA 0x00000000 // GPIO Data +#define GPIO_O_DIR 0x00000400 // GPIO Direction +#define GPIO_O_IS 0x00000404 // GPIO Interrupt Sense +#define GPIO_O_IBE 0x00000408 // GPIO Interrupt Both Edges +#define GPIO_O_IEV 0x0000040C // GPIO Interrupt Event +#define GPIO_O_IM 0x00000410 // GPIO Interrupt Mask +#define GPIO_O_RIS 0x00000414 // GPIO Raw Interrupt Status +#define GPIO_O_MIS 0x00000418 // GPIO Masked Interrupt Status +#define GPIO_O_ICR 0x0000041C // GPIO Interrupt Clear +#define GPIO_O_AFSEL 0x00000420 // GPIO Alternate Function Select +#define GPIO_O_DR2R 0x00000500 // GPIO 2-mA Drive Select +#define GPIO_O_DR4R 0x00000504 // GPIO 4-mA Drive Select +#define GPIO_O_DR8R 0x00000508 // GPIO 8-mA Drive Select +#define GPIO_O_ODR 0x0000050C // GPIO Open Drain Select +#define GPIO_O_PUR 0x00000510 // GPIO Pull-Up Select +#define GPIO_O_PDR 0x00000514 // GPIO Pull-Down Select +#define GPIO_O_SLR 0x00000518 // GPIO Slew Rate Control Select +#define GPIO_O_DEN 0x0000051C // GPIO Digital Enable +#define GPIO_O_LOCK 0x00000520 // GPIO Lock +#define GPIO_O_CR 0x00000524 // GPIO Commit +#define GPIO_O_AMSEL 0x00000528 // GPIO Analog Mode Select +#define GPIO_O_PCTL 0x0000052C // GPIO Port Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register +#define GPIO_LOCK_KEY_DD 0x4C4F434B // Unlocks the GPIO_CR register on + // DustDevil-class devices and + // later + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port A. +// +//***************************************************************************** +#define GPIO_PCTL_PA0_M 0x0000000F // PA0 mask +#define GPIO_PCTL_PA0_U0RX 0x00000001 // U0RX on PA0 +#define GPIO_PCTL_PA0_I2C1SCL 0x00000008 // I2C1SCL on PA0 +#define GPIO_PCTL_PA0_U1RX 0x00000009 // U1RX on PA0 +#define GPIO_PCTL_PA1_M 0x000000F0 // PA1 mask +#define GPIO_PCTL_PA1_U0TX 0x00000010 // U0TX on PA1 +#define GPIO_PCTL_PA1_I2C1SDA 0x00000080 // I2C1SDA on PA1 +#define GPIO_PCTL_PA1_U1TX 0x00000090 // U1TX on PA1 +#define GPIO_PCTL_PA2_M 0x00000F00 // PA2 mask +#define GPIO_PCTL_PA2_SSI0CLK 0x00000100 // SSI0CLK on PA2 +#define GPIO_PCTL_PA2_PWM4 0x00000400 // PWM4 on PA2 +#define GPIO_PCTL_PA2_I2S0RXSD 0x00000900 // I2S0RXSD on PA2 +#define GPIO_PCTL_PA3_M 0x0000F000 // PA3 mask +#define GPIO_PCTL_PA3_SSI0FSS 0x00001000 // SSI0FSS on PA3 +#define GPIO_PCTL_PA3_PWM5 0x00004000 // PWM5 on PA3 +#define GPIO_PCTL_PA3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PA3 +#define GPIO_PCTL_PA4_M 0x000F0000 // PA4 mask +#define GPIO_PCTL_PA4_SSI0RX 0x00010000 // SSI0RX on PA4 +#define GPIO_PCTL_PA4_PWM6 0x00040000 // PWM6 on PA4 +#define GPIO_PCTL_PA4_CAN0RX 0x00050000 // CAN0RX on PA4 +#define GPIO_PCTL_PA4_I2S0TXSCK 0x00090000 // I2S0TXSCK on PA4 +#define GPIO_PCTL_PA5_M 0x00F00000 // PA5 mask +#define GPIO_PCTL_PA5_SSI0TX 0x00100000 // SSI0TX on PA5 +#define GPIO_PCTL_PA5_PWM7 0x00400000 // PWM7 on PA5 +#define GPIO_PCTL_PA5_CAN0TX 0x00500000 // CAN0TX on PA5 +#define GPIO_PCTL_PA5_I2S0TXWS 0x00900000 // I2S0TXWS on PA5 +#define GPIO_PCTL_PA6_M 0x0F000000 // PA6 mask +#define GPIO_PCTL_PA6_I2C1SCL 0x01000000 // I2C1SCL on PA6 +#define GPIO_PCTL_PA6_CCP1 0x02000000 // CCP1 on PA6 +#define GPIO_PCTL_PA6_PWM0 0x04000000 // PWM0 on PA6 +#define GPIO_PCTL_PA6_PWM4 0x05000000 // PWM4 on PA6 +#define GPIO_PCTL_PA6_CAN0RX 0x06000000 // CAN0RX on PA6 +#define GPIO_PCTL_PA6_USB0EPEN 0x08000000 // USB0EPEN on PA6 +#define GPIO_PCTL_PA6_U1CTS 0x09000000 // U1CTS on PA6 +#define GPIO_PCTL_PA7_M 0xF0000000 // PA7 mask +#define GPIO_PCTL_PA7_I2C1SDA 0x10000000 // I2C1SDA on PA7 +#define GPIO_PCTL_PA7_CCP4 0x20000000 // CCP4 on PA7 +#define GPIO_PCTL_PA7_PWM1 0x40000000 // PWM1 on PA7 +#define GPIO_PCTL_PA7_PWM5 0x50000000 // PWM5 on PA7 +#define GPIO_PCTL_PA7_CAN0TX 0x60000000 // CAN0TX on PA7 +#define GPIO_PCTL_PA7_CCP3 0x70000000 // CCP3 on PA7 +#define GPIO_PCTL_PA7_USB0PFLT 0x80000000 // USB0PFLT on PA7 +#define GPIO_PCTL_PA7_U1DCD 0x90000000 // U1DCD on PA7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port B. +// +//***************************************************************************** +#define GPIO_PCTL_PB0_M 0x0000000F // PB0 mask +#define GPIO_PCTL_PB0_CCP0 0x00000001 // CCP0 on PB0 +#define GPIO_PCTL_PB0_PWM2 0x00000002 // PWM2 on PB0 +#define GPIO_PCTL_PB0_U1RX 0x00000005 // U1RX on PB0 +#define GPIO_PCTL_PB1_M 0x000000F0 // PB1 mask +#define GPIO_PCTL_PB1_CCP2 0x00000010 // CCP2 on PB1 +#define GPIO_PCTL_PB1_PWM3 0x00000020 // PWM3 on PB1 +#define GPIO_PCTL_PB1_CCP1 0x00000040 // CCP1 on PB1 +#define GPIO_PCTL_PB1_U1TX 0x00000050 // U1TX on PB1 +#define GPIO_PCTL_PB2_M 0x00000F00 // PB2 mask +#define GPIO_PCTL_PB2_I2C0SCL 0x00000100 // I2C0SCL on PB2 +#define GPIO_PCTL_PB2_IDX0 0x00000200 // IDX0 on PB2 +#define GPIO_PCTL_PB2_CCP3 0x00000400 // CCP3 on PB2 +#define GPIO_PCTL_PB2_CCP0 0x00000500 // CCP0 on PB2 +#define GPIO_PCTL_PB2_USB0EPEN 0x00000800 // USB0EPEN on PB2 +#define GPIO_PCTL_PB3_M 0x0000F000 // PB3 mask +#define GPIO_PCTL_PB3_I2C0SDA 0x00001000 // I2C0SDA on PB3 +#define GPIO_PCTL_PB3_FAULT0 0x00002000 // FAULT0 on PB3 +#define GPIO_PCTL_PB3_FAULT3 0x00004000 // FAULT3 on PB3 +#define GPIO_PCTL_PB3_USB0PFLT 0x00008000 // USB0PFLT on PB3 +#define GPIO_PCTL_PB4_M 0x000F0000 // PB4 mask +#define GPIO_PCTL_PB4_U2RX 0x00040000 // U2RX on PB4 +#define GPIO_PCTL_PB4_CAN0RX 0x00050000 // CAN0RX on PB4 +#define GPIO_PCTL_PB4_IDX0 0x00060000 // IDX0 on PB4 +#define GPIO_PCTL_PB4_U1RX 0x00070000 // U1RX on PB4 +#define GPIO_PCTL_PB4_EPI0S23 0x00080000 // EPI0S23 on PB4 +#define GPIO_PCTL_PB5_M 0x00F00000 // PB5 mask +#define GPIO_PCTL_PB5_C0O 0x00100000 // C0O on PB5 +#define GPIO_PCTL_PB5_CCP5 0x00200000 // CCP5 on PB5 +#define GPIO_PCTL_PB5_CCP6 0x00300000 // CCP6 on PB5 +#define GPIO_PCTL_PB5_CCP0 0x00400000 // CCP0 on PB5 +#define GPIO_PCTL_PB5_CAN0TX 0x00500000 // CAN0TX on PB5 +#define GPIO_PCTL_PB5_CCP2 0x00600000 // CCP2 on PB5 +#define GPIO_PCTL_PB5_U1TX 0x00700000 // U1TX on PB5 +#define GPIO_PCTL_PB5_EPI0S22 0x00800000 // EPI0S22 on PB5 +#define GPIO_PCTL_PB6_M 0x0F000000 // PB6 mask +#define GPIO_PCTL_PB6_CCP1 0x01000000 // CCP1 on PB6 +#define GPIO_PCTL_PB6_CCP7 0x02000000 // CCP7 on PB6 +#define GPIO_PCTL_PB6_C0O 0x03000000 // C0O on PB6 +#define GPIO_PCTL_PB6_FAULT1 0x04000000 // FAULT1 on PB6 +#define GPIO_PCTL_PB6_IDX0 0x05000000 // IDX0 on PB6 +#define GPIO_PCTL_PB6_CCP5 0x06000000 // CCP5 on PB6 +#define GPIO_PCTL_PB6_I2S0TXSCK 0x09000000 // I2S0TXSCK on PB6 +#define GPIO_PCTL_PB7_M 0xF0000000 // PB7 mask +#define GPIO_PCTL_PB7_NMI 0x40000000 // NMI on PB7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port C. +// +//***************************************************************************** +#define GPIO_PCTL_PC0_M 0x0000000F // PC0 mask +#define GPIO_PCTL_PC0_TCK 0x00000003 // TCK on PC0 +#define GPIO_PCTL_PC1_M 0x000000F0 // PC1 mask +#define GPIO_PCTL_PC1_TMS 0x00000030 // TMS on PC1 +#define GPIO_PCTL_PC2_M 0x00000F00 // PC2 mask +#define GPIO_PCTL_PC2_TDI 0x00000300 // TDI on PC2 +#define GPIO_PCTL_PC3_M 0x0000F000 // PC3 mask +#define GPIO_PCTL_PC3_TDO 0x00003000 // TDO on PC3 +#define GPIO_PCTL_PC4_M 0x000F0000 // PC4 mask +#define GPIO_PCTL_PC4_CCP5 0x00010000 // CCP5 on PC4 +#define GPIO_PCTL_PC4_PHA0 0x00020000 // PHA0 on PC4 +#define GPIO_PCTL_PC4_PWM6 0x00040000 // PWM6 on PC4 +#define GPIO_PCTL_PC4_CCP2 0x00050000 // CCP2 on PC4 +#define GPIO_PCTL_PC4_CCP4 0x00060000 // CCP4 on PC4 +#define GPIO_PCTL_PC4_EPI0S2 0x00080000 // EPI0S2 on PC4 +#define GPIO_PCTL_PC4_CCP1 0x00090000 // CCP1 on PC4 +#define GPIO_PCTL_PC5_M 0x00F00000 // PC5 mask +#define GPIO_PCTL_PC5_CCP1 0x00100000 // CCP1 on PC5 +#define GPIO_PCTL_PC5_C1O 0x00200000 // C1O on PC5 +#define GPIO_PCTL_PC5_C0O 0x00300000 // C0O on PC5 +#define GPIO_PCTL_PC5_FAULT2 0x00400000 // FAULT2 on PC5 +#define GPIO_PCTL_PC5_CCP3 0x00500000 // CCP3 on PC5 +#define GPIO_PCTL_PC5_USB0EPEN 0x00600000 // USB0EPEN on PC5 +#define GPIO_PCTL_PC5_EPI0S3 0x00800000 // EPI0S3 on PC5 +#define GPIO_PCTL_PC6_M 0x0F000000 // PC6 mask +#define GPIO_PCTL_PC6_CCP3 0x01000000 // CCP3 on PC6 +#define GPIO_PCTL_PC6_PHB0 0x02000000 // PHB0 on PC6 +#define GPIO_PCTL_PC6_C2O 0x03000000 // C2O on PC6 +#define GPIO_PCTL_PC6_PWM7 0x04000000 // PWM7 on PC6 +#define GPIO_PCTL_PC6_U1RX 0x05000000 // U1RX on PC6 +#define GPIO_PCTL_PC6_CCP0 0x06000000 // CCP0 on PC6 +#define GPIO_PCTL_PC6_USB0PFLT 0x07000000 // USB0PFLT on PC6 +#define GPIO_PCTL_PC6_EPI0S4 0x08000000 // EPI0S4 on PC6 +#define GPIO_PCTL_PC7_M 0xF0000000 // PC7 mask +#define GPIO_PCTL_PC7_CCP4 0x10000000 // CCP4 on PC7 +#define GPIO_PCTL_PC7_PHB0 0x20000000 // PHB0 on PC7 +#define GPIO_PCTL_PC7_CCP0 0x40000000 // CCP0 on PC7 +#define GPIO_PCTL_PC7_U1TX 0x50000000 // U1TX on PC7 +#define GPIO_PCTL_PC7_USB0PFLT 0x60000000 // USB0PFLT on PC7 +#define GPIO_PCTL_PC7_C1O 0x70000000 // C1O on PC7 +#define GPIO_PCTL_PC7_EPI0S5 0x80000000 // EPI0S5 on PC7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port D. +// +//***************************************************************************** +#define GPIO_PCTL_PD0_M 0x0000000F // PD0 mask +#define GPIO_PCTL_PD0_PWM0 0x00000001 // PWM0 on PD0 +#define GPIO_PCTL_PD0_CAN0RX 0x00000002 // CAN0RX on PD0 +#define GPIO_PCTL_PD0_IDX0 0x00000003 // IDX0 on PD0 +#define GPIO_PCTL_PD0_U2RX 0x00000004 // U2RX on PD0 +#define GPIO_PCTL_PD0_U1RX 0x00000005 // U1RX on PD0 +#define GPIO_PCTL_PD0_CCP6 0x00000006 // CCP6 on PD0 +#define GPIO_PCTL_PD0_I2S0RXSCK 0x00000008 // I2S0RXSCK on PD0 +#define GPIO_PCTL_PD0_U1CTS 0x00000009 // U1CTS on PD0 +#define GPIO_PCTL_PD1_M 0x000000F0 // PD1 mask +#define GPIO_PCTL_PD1_PWM1 0x00000010 // PWM1 on PD1 +#define GPIO_PCTL_PD1_CAN0TX 0x00000020 // CAN0TX on PD1 +#define GPIO_PCTL_PD1_PHA0 0x00000030 // PHA0 on PD1 +#define GPIO_PCTL_PD1_U2TX 0x00000040 // U2TX on PD1 +#define GPIO_PCTL_PD1_U1TX 0x00000050 // U1TX on PD1 +#define GPIO_PCTL_PD1_CCP7 0x00000060 // CCP7 on PD1 +#define GPIO_PCTL_PD1_I2S0RXWS 0x00000080 // I2S0RXWS on PD1 +#define GPIO_PCTL_PD1_U1DCD 0x00000090 // U1DCD on PD1 +#define GPIO_PCTL_PD1_CCP2 0x000000A0 // CCP2 on PD1 +#define GPIO_PCTL_PD1_PHB1 0x000000B0 // PHB1 on PD1 +#define GPIO_PCTL_PD2_M 0x00000F00 // PD2 mask +#define GPIO_PCTL_PD2_U1RX 0x00000100 // U1RX on PD2 +#define GPIO_PCTL_PD2_CCP6 0x00000200 // CCP6 on PD2 +#define GPIO_PCTL_PD2_PWM2 0x00000300 // PWM2 on PD2 +#define GPIO_PCTL_PD2_CCP5 0x00000400 // CCP5 on PD2 +#define GPIO_PCTL_PD2_EPI0S20 0x00000800 // EPI0S20 on PD2 +#define GPIO_PCTL_PD3_M 0x0000F000 // PD3 mask +#define GPIO_PCTL_PD3_U1TX 0x00001000 // U1TX on PD3 +#define GPIO_PCTL_PD3_CCP7 0x00002000 // CCP7 on PD3 +#define GPIO_PCTL_PD3_PWM3 0x00003000 // PWM3 on PD3 +#define GPIO_PCTL_PD3_CCP0 0x00004000 // CCP0 on PD3 +#define GPIO_PCTL_PD3_EPI0S21 0x00008000 // EPI0S21 on PD3 +#define GPIO_PCTL_PD4_M 0x000F0000 // PD4 mask +#define GPIO_PCTL_PD4_CCP0 0x00010000 // CCP0 on PD4 +#define GPIO_PCTL_PD4_CCP3 0x00020000 // CCP3 on PD4 +#define GPIO_PCTL_PD4_I2S0RXSD 0x00080000 // I2S0RXSD on PD4 +#define GPIO_PCTL_PD4_U1RI 0x00090000 // U1RI on PD4 +#define GPIO_PCTL_PD4_EPI0S19 0x000A0000 // EPI0S19 on PD4 +#define GPIO_PCTL_PD5_M 0x00F00000 // PD5 mask +#define GPIO_PCTL_PD5_CCP2 0x00100000 // CCP2 on PD5 +#define GPIO_PCTL_PD5_CCP4 0x00200000 // CCP4 on PD5 +#define GPIO_PCTL_PD5_I2S0RXMCLK \ + 0x00800000 // I2S0RXMCLK on PD5 +#define GPIO_PCTL_PD5_U2RX 0x00900000 // U2RX on PD5 +#define GPIO_PCTL_PD5_EPI0S28 0x00A00000 // EPI0S28 on PD5 +#define GPIO_PCTL_PD6_M 0x0F000000 // PD6 mask +#define GPIO_PCTL_PD6_FAULT0 0x01000000 // FAULT0 on PD6 +#define GPIO_PCTL_PD6_I2S0TXSCK 0x08000000 // I2S0TXSCK on PD6 +#define GPIO_PCTL_PD6_U2TX 0x09000000 // U2TX on PD6 +#define GPIO_PCTL_PD6_EPI0S29 0x0A000000 // EPI0S29 on PD6 +#define GPIO_PCTL_PD7_M 0xF0000000 // PD7 mask +#define GPIO_PCTL_PD7_IDX0 0x10000000 // IDX0 on PD7 +#define GPIO_PCTL_PD7_C0O 0x20000000 // C0O on PD7 +#define GPIO_PCTL_PD7_CCP1 0x30000000 // CCP1 on PD7 +#define GPIO_PCTL_PD7_I2S0TXWS 0x80000000 // I2S0TXWS on PD7 +#define GPIO_PCTL_PD7_U1DTR 0x90000000 // U1DTR on PD7 +#define GPIO_PCTL_PD7_EPI0S30 0xA0000000 // EPI0S30 on PD7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port E. +// +//***************************************************************************** +#define GPIO_PCTL_PE0_M 0x0000000F // PE0 mask +#define GPIO_PCTL_PE0_PWM4 0x00000001 // PWM4 on PE0 +#define GPIO_PCTL_PE0_SSI1CLK 0x00000002 // SSI1CLK on PE0 +#define GPIO_PCTL_PE0_CCP3 0x00000003 // CCP3 on PE0 +#define GPIO_PCTL_PE0_EPI0S8 0x00000008 // EPI0S8 on PE0 +#define GPIO_PCTL_PE0_USB0PFLT 0x00000009 // USB0PFLT on PE0 +#define GPIO_PCTL_PE1_M 0x000000F0 // PE1 mask +#define GPIO_PCTL_PE1_PWM5 0x00000010 // PWM5 on PE1 +#define GPIO_PCTL_PE1_SSI1FSS 0x00000020 // SSI1FSS on PE1 +#define GPIO_PCTL_PE1_FAULT0 0x00000030 // FAULT0 on PE1 +#define GPIO_PCTL_PE1_CCP2 0x00000040 // CCP2 on PE1 +#define GPIO_PCTL_PE1_CCP6 0x00000050 // CCP6 on PE1 +#define GPIO_PCTL_PE1_EPI0S9 0x00000080 // EPI0S9 on PE1 +#define GPIO_PCTL_PE2_M 0x00000F00 // PE2 mask +#define GPIO_PCTL_PE2_CCP4 0x00000100 // CCP4 on PE2 +#define GPIO_PCTL_PE2_SSI1RX 0x00000200 // SSI1RX on PE2 +#define GPIO_PCTL_PE2_PHB1 0x00000300 // PHB1 on PE2 +#define GPIO_PCTL_PE2_PHA0 0x00000400 // PHA0 on PE2 +#define GPIO_PCTL_PE2_CCP2 0x00000500 // CCP2 on PE2 +#define GPIO_PCTL_PE2_EPI0S24 0x00000800 // EPI0S24 on PE2 +#define GPIO_PCTL_PE3_M 0x0000F000 // PE3 mask +#define GPIO_PCTL_PE3_CCP1 0x00001000 // CCP1 on PE3 +#define GPIO_PCTL_PE3_SSI1TX 0x00002000 // SSI1TX on PE3 +#define GPIO_PCTL_PE3_PHA1 0x00003000 // PHA1 on PE3 +#define GPIO_PCTL_PE3_PHB0 0x00004000 // PHB0 on PE3 +#define GPIO_PCTL_PE3_CCP7 0x00005000 // CCP7 on PE3 +#define GPIO_PCTL_PE3_EPI0S25 0x00008000 // EPI0S25 on PE3 +#define GPIO_PCTL_PE4_M 0x000F0000 // PE4 mask +#define GPIO_PCTL_PE4_CCP3 0x00010000 // CCP3 on PE4 +#define GPIO_PCTL_PE4_FAULT0 0x00040000 // FAULT0 on PE4 +#define GPIO_PCTL_PE4_U2TX 0x00050000 // U2TX on PE4 +#define GPIO_PCTL_PE4_CCP2 0x00060000 // CCP2 on PE4 +#define GPIO_PCTL_PE4_I2S0TXWS 0x00090000 // I2S0TXWS on PE4 +#define GPIO_PCTL_PE5_M 0x00F00000 // PE5 mask +#define GPIO_PCTL_PE5_CCP5 0x00100000 // CCP5 on PE5 +#define GPIO_PCTL_PE5_I2S0TXSD 0x00900000 // I2S0TXSD on PE5 +#define GPIO_PCTL_PE6_M 0x0F000000 // PE6 mask +#define GPIO_PCTL_PE6_PWM4 0x01000000 // PWM4 on PE6 +#define GPIO_PCTL_PE6_C1O 0x02000000 // C1O on PE6 +#define GPIO_PCTL_PE6_U1CTS 0x09000000 // U1CTS on PE6 +#define GPIO_PCTL_PE7_M 0xF0000000 // PE7 mask +#define GPIO_PCTL_PE7_PWM5 0x10000000 // PWM5 on PE7 +#define GPIO_PCTL_PE7_C2O 0x20000000 // C2O on PE7 +#define GPIO_PCTL_PE7_U1DCD 0x90000000 // U1DCD on PE7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port F. +// +//***************************************************************************** +#define GPIO_PCTL_PF0_M 0x0000000F // PF0 mask +#define GPIO_PCTL_PF0_CAN1RX 0x00000001 // CAN1RX on PF0 +#define GPIO_PCTL_PF0_PHB0 0x00000002 // PHB0 on PF0 +#define GPIO_PCTL_PF0_PWM0 0x00000003 // PWM0 on PF0 +#define GPIO_PCTL_PF0_I2S0TXSD 0x00000008 // I2S0TXSD on PF0 +#define GPIO_PCTL_PF0_U1DSR 0x00000009 // U1DSR on PF0 +#define GPIO_PCTL_PF1_M 0x000000F0 // PF1 mask +#define GPIO_PCTL_PF1_CAN1TX 0x00000010 // CAN1TX on PF1 +#define GPIO_PCTL_PF1_IDX1 0x00000020 // IDX1 on PF1 +#define GPIO_PCTL_PF1_PWM1 0x00000030 // PWM1 on PF1 +#define GPIO_PCTL_PF1_I2S0TXMCLK \ + 0x00000080 // I2S0TXMCLK on PF1 +#define GPIO_PCTL_PF1_U1RTS 0x00000090 // U1RTS on PF1 +#define GPIO_PCTL_PF1_CCP3 0x000000A0 // CCP3 on PF1 +#define GPIO_PCTL_PF2_M 0x00000F00 // PF2 mask +#define GPIO_PCTL_PF2_LED1 0x00000100 // LED1 on PF2 +#define GPIO_PCTL_PF2_PWM4 0x00000200 // PWM4 on PF2 +#define GPIO_PCTL_PF2_PWM2 0x00000400 // PWM2 on PF2 +#define GPIO_PCTL_PF2_SSI1CLK 0x00000900 // SSI1CLK on PF2 +#define GPIO_PCTL_PF3_M 0x0000F000 // PF3 mask +#define GPIO_PCTL_PF3_LED0 0x00001000 // LED0 on PF3 +#define GPIO_PCTL_PF3_PWM5 0x00002000 // PWM5 on PF3 +#define GPIO_PCTL_PF3_PWM3 0x00004000 // PWM3 on PF3 +#define GPIO_PCTL_PF3_SSI1FSS 0x00009000 // SSI1FSS on PF3 +#define GPIO_PCTL_PF4_M 0x000F0000 // PF4 mask +#define GPIO_PCTL_PF4_CCP0 0x00010000 // CCP0 on PF4 +#define GPIO_PCTL_PF4_C0O 0x00020000 // C0O on PF4 +#define GPIO_PCTL_PF4_FAULT0 0x00040000 // FAULT0 on PF4 +#define GPIO_PCTL_PF4_EPI0S12 0x00080000 // EPI0S12 on PF4 +#define GPIO_PCTL_PF4_SSI1RX 0x00090000 // SSI1RX on PF4 +#define GPIO_PCTL_PF5_M 0x00F00000 // PF5 mask +#define GPIO_PCTL_PF5_CCP2 0x00100000 // CCP2 on PF5 +#define GPIO_PCTL_PF5_C1O 0x00200000 // C1O on PF5 +#define GPIO_PCTL_PF5_EPI0S15 0x00800000 // EPI0S15 on PF5 +#define GPIO_PCTL_PF5_SSI1TX 0x00900000 // SSI1TX on PF5 +#define GPIO_PCTL_PF6_M 0x0F000000 // PF6 mask +#define GPIO_PCTL_PF6_CCP1 0x01000000 // CCP1 on PF6 +#define GPIO_PCTL_PF6_C2O 0x02000000 // C2O on PF6 +#define GPIO_PCTL_PF6_PHA0 0x04000000 // PHA0 on PF6 +#define GPIO_PCTL_PF6_I2S0TXMCLK \ + 0x09000000 // I2S0TXMCLK on PF6 +#define GPIO_PCTL_PF6_U1RTS 0x0A000000 // U1RTS on PF6 +#define GPIO_PCTL_PF7_M 0xF0000000 // PF7 mask +#define GPIO_PCTL_PF7_CCP4 0x10000000 // CCP4 on PF7 +#define GPIO_PCTL_PF7_PHB0 0x40000000 // PHB0 on PF7 +#define GPIO_PCTL_PF7_EPI0S12 0x80000000 // EPI0S12 on PF7 +#define GPIO_PCTL_PF7_FAULT1 0x90000000 // FAULT1 on PF7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port G. +// +//***************************************************************************** +#define GPIO_PCTL_PG0_M 0x0000000F // PG0 mask +#define GPIO_PCTL_PG0_U2RX 0x00000001 // U2RX on PG0 +#define GPIO_PCTL_PG0_PWM0 0x00000002 // PWM0 on PG0 +#define GPIO_PCTL_PG0_I2C1SCL 0x00000003 // I2C1SCL on PG0 +#define GPIO_PCTL_PG0_PWM4 0x00000004 // PWM4 on PG0 +#define GPIO_PCTL_PG0_USB0EPEN 0x00000007 // USB0EPEN on PG0 +#define GPIO_PCTL_PG0_EPI0S13 0x00000008 // EPI0S13 on PG0 +#define GPIO_PCTL_PG1_M 0x000000F0 // PG1 mask +#define GPIO_PCTL_PG1_U2TX 0x00000010 // U2TX on PG1 +#define GPIO_PCTL_PG1_PWM1 0x00000020 // PWM1 on PG1 +#define GPIO_PCTL_PG1_I2C1SDA 0x00000030 // I2C1SDA on PG1 +#define GPIO_PCTL_PG1_PWM5 0x00000040 // PWM5 on PG1 +#define GPIO_PCTL_PG1_EPI0S14 0x00000080 // EPI0S14 on PG1 +#define GPIO_PCTL_PG2_M 0x00000F00 // PG2 mask +#define GPIO_PCTL_PG2_PWM0 0x00000100 // PWM0 on PG2 +#define GPIO_PCTL_PG2_FAULT0 0x00000400 // FAULT0 on PG2 +#define GPIO_PCTL_PG2_IDX1 0x00000800 // IDX1 on PG2 +#define GPIO_PCTL_PG2_I2S0RXSD 0x00000900 // I2S0RXSD on PG2 +#define GPIO_PCTL_PG3_M 0x0000F000 // PG3 mask +#define GPIO_PCTL_PG3_PWM1 0x00001000 // PWM1 on PG3 +#define GPIO_PCTL_PG3_FAULT2 0x00004000 // FAULT2 on PG3 +#define GPIO_PCTL_PG3_FAULT0 0x00008000 // FAULT0 on PG3 +#define GPIO_PCTL_PG3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PG3 +#define GPIO_PCTL_PG4_M 0x000F0000 // PG4 mask +#define GPIO_PCTL_PG4_CCP3 0x00010000 // CCP3 on PG4 +#define GPIO_PCTL_PG4_FAULT1 0x00040000 // FAULT1 on PG4 +#define GPIO_PCTL_PG4_EPI0S15 0x00080000 // EPI0S15 on PG4 +#define GPIO_PCTL_PG4_PWM6 0x00090000 // PWM6 on PG4 +#define GPIO_PCTL_PG4_U1RI 0x000A0000 // U1RI on PG4 +#define GPIO_PCTL_PG5_M 0x00F00000 // PG5 mask +#define GPIO_PCTL_PG5_CCP5 0x00100000 // CCP5 on PG5 +#define GPIO_PCTL_PG5_IDX0 0x00400000 // IDX0 on PG5 +#define GPIO_PCTL_PG5_FAULT1 0x00500000 // FAULT1 on PG5 +#define GPIO_PCTL_PG5_PWM7 0x00800000 // PWM7 on PG5 +#define GPIO_PCTL_PG5_I2S0RXSCK 0x00900000 // I2S0RXSCK on PG5 +#define GPIO_PCTL_PG5_U1DTR 0x00A00000 // U1DTR on PG5 +#define GPIO_PCTL_PG6_M 0x0F000000 // PG6 mask +#define GPIO_PCTL_PG6_PHA1 0x01000000 // PHA1 on PG6 +#define GPIO_PCTL_PG6_PWM6 0x04000000 // PWM6 on PG6 +#define GPIO_PCTL_PG6_FAULT1 0x08000000 // FAULT1 on PG6 +#define GPIO_PCTL_PG6_I2S0RXWS 0x09000000 // I2S0RXWS on PG6 +#define GPIO_PCTL_PG6_U1RI 0x0A000000 // U1RI on PG6 +#define GPIO_PCTL_PG7_M 0xF0000000 // PG7 mask +#define GPIO_PCTL_PG7_PHB1 0x10000000 // PHB1 on PG7 +#define GPIO_PCTL_PG7_PWM7 0x40000000 // PWM7 on PG7 +#define GPIO_PCTL_PG7_CCP5 0x80000000 // CCP5 on PG7 +#define GPIO_PCTL_PG7_EPI0S31 0x90000000 // EPI0S31 on PG7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port H. +// +//***************************************************************************** +#define GPIO_PCTL_PH0_M 0x0000000F // PH0 mask +#define GPIO_PCTL_PH0_CCP6 0x00000001 // CCP6 on PH0 +#define GPIO_PCTL_PH0_PWM2 0x00000002 // PWM2 on PH0 +#define GPIO_PCTL_PH0_EPI0S6 0x00000008 // EPI0S6 on PH0 +#define GPIO_PCTL_PH0_PWM4 0x00000009 // PWM4 on PH0 +#define GPIO_PCTL_PH1_M 0x000000F0 // PH1 mask +#define GPIO_PCTL_PH1_CCP7 0x00000010 // CCP7 on PH1 +#define GPIO_PCTL_PH1_PWM3 0x00000020 // PWM3 on PH1 +#define GPIO_PCTL_PH1_EPI0S7 0x00000080 // EPI0S7 on PH1 +#define GPIO_PCTL_PH1_PWM5 0x00000090 // PWM5 on PH1 +#define GPIO_PCTL_PH2_M 0x00000F00 // PH2 mask +#define GPIO_PCTL_PH2_IDX1 0x00000100 // IDX1 on PH2 +#define GPIO_PCTL_PH2_C1O 0x00000200 // C1O on PH2 +#define GPIO_PCTL_PH2_FAULT3 0x00000400 // FAULT3 on PH2 +#define GPIO_PCTL_PH2_EPI0S1 0x00000800 // EPI0S1 on PH2 +#define GPIO_PCTL_PH3_M 0x0000F000 // PH3 mask +#define GPIO_PCTL_PH3_PHB0 0x00001000 // PHB0 on PH3 +#define GPIO_PCTL_PH3_FAULT0 0x00002000 // FAULT0 on PH3 +#define GPIO_PCTL_PH3_USB0EPEN 0x00004000 // USB0EPEN on PH3 +#define GPIO_PCTL_PH3_EPI0S0 0x00008000 // EPI0S0 on PH3 +#define GPIO_PCTL_PH4_M 0x000F0000 // PH4 mask +#define GPIO_PCTL_PH4_USB0PFLT 0x00040000 // USB0PFLT on PH4 +#define GPIO_PCTL_PH4_EPI0S10 0x00080000 // EPI0S10 on PH4 +#define GPIO_PCTL_PH4_SSI1CLK 0x000B0000 // SSI1CLK on PH4 +#define GPIO_PCTL_PH5_M 0x00F00000 // PH5 mask +#define GPIO_PCTL_PH5_EPI0S11 0x00800000 // EPI0S11 on PH5 +#define GPIO_PCTL_PH5_FAULT2 0x00A00000 // FAULT2 on PH5 +#define GPIO_PCTL_PH5_SSI1FSS 0x00B00000 // SSI1FSS on PH5 +#define GPIO_PCTL_PH6_M 0x0F000000 // PH6 mask +#define GPIO_PCTL_PH6_EPI0S26 0x08000000 // EPI0S26 on PH6 +#define GPIO_PCTL_PH6_PWM4 0x0A000000 // PWM4 on PH6 +#define GPIO_PCTL_PH6_SSI1RX 0x0B000000 // SSI1RX on PH6 +#define GPIO_PCTL_PH7_M 0xF0000000 // PH7 mask +#define GPIO_PCTL_PH7_EPI0S27 0x80000000 // EPI0S27 on PH7 +#define GPIO_PCTL_PH7_PWM5 0xA0000000 // PWM5 on PH7 +#define GPIO_PCTL_PH7_SSI1TX 0xB0000000 // SSI1TX on PH7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port J. +// +//***************************************************************************** +#define GPIO_PCTL_PJ0_M 0x0000000F // PJ0 mask +#define GPIO_PCTL_PJ0_EPI0S16 0x00000008 // EPI0S16 on PJ0 +#define GPIO_PCTL_PJ0_PWM0 0x0000000A // PWM0 on PJ0 +#define GPIO_PCTL_PJ0_I2C1SCL 0x0000000B // I2C1SCL on PJ0 +#define GPIO_PCTL_PJ1_M 0x000000F0 // PJ1 mask +#define GPIO_PCTL_PJ1_EPI0S17 0x00000080 // EPI0S17 on PJ1 +#define GPIO_PCTL_PJ1_USB0PFLT 0x00000090 // USB0PFLT on PJ1 +#define GPIO_PCTL_PJ1_PWM1 0x000000A0 // PWM1 on PJ1 +#define GPIO_PCTL_PJ1_I2C1SDA 0x000000B0 // I2C1SDA on PJ1 +#define GPIO_PCTL_PJ2_M 0x00000F00 // PJ2 mask +#define GPIO_PCTL_PJ2_EPI0S18 0x00000800 // EPI0S18 on PJ2 +#define GPIO_PCTL_PJ2_CCP0 0x00000900 // CCP0 on PJ2 +#define GPIO_PCTL_PJ2_FAULT0 0x00000A00 // FAULT0 on PJ2 +#define GPIO_PCTL_PJ3_M 0x0000F000 // PJ3 mask +#define GPIO_PCTL_PJ3_EPI0S19 0x00008000 // EPI0S19 on PJ3 +#define GPIO_PCTL_PJ3_U1CTS 0x00009000 // U1CTS on PJ3 +#define GPIO_PCTL_PJ3_CCP6 0x0000A000 // CCP6 on PJ3 +#define GPIO_PCTL_PJ4_M 0x000F0000 // PJ4 mask +#define GPIO_PCTL_PJ4_EPI0S28 0x00080000 // EPI0S28 on PJ4 +#define GPIO_PCTL_PJ4_U1DCD 0x00090000 // U1DCD on PJ4 +#define GPIO_PCTL_PJ4_CCP4 0x000A0000 // CCP4 on PJ4 +#define GPIO_PCTL_PJ5_M 0x00F00000 // PJ5 mask +#define GPIO_PCTL_PJ5_EPI0S29 0x00800000 // EPI0S29 on PJ5 +#define GPIO_PCTL_PJ5_U1DSR 0x00900000 // U1DSR on PJ5 +#define GPIO_PCTL_PJ5_CCP2 0x00A00000 // CCP2 on PJ5 +#define GPIO_PCTL_PJ6_M 0x0F000000 // PJ6 mask +#define GPIO_PCTL_PJ6_EPI0S30 0x08000000 // EPI0S30 on PJ6 +#define GPIO_PCTL_PJ6_U1RTS 0x09000000 // U1RTS on PJ6 +#define GPIO_PCTL_PJ6_CCP1 0x0A000000 // CCP1 on PJ6 +#define GPIO_PCTL_PJ7_M 0xF0000000 // PJ7 mask +#define GPIO_PCTL_PJ7_U1DTR 0x90000000 // U1DTR on PJ7 +#define GPIO_PCTL_PJ7_CCP0 0xA0000000 // CCP0 on PJ7 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_PeriphID4 0x00000FD0 +#define GPIO_O_PeriphID5 0x00000FD4 +#define GPIO_O_PeriphID6 0x00000FD8 +#define GPIO_O_PeriphID7 0x00000FDC +#define GPIO_O_PeriphID0 0x00000FE0 +#define GPIO_O_PeriphID1 0x00000FE4 +#define GPIO_O_PeriphID2 0x00000FE8 +#define GPIO_O_PeriphID3 0x00000FEC +#define GPIO_O_PCellID0 0x00000FF0 +#define GPIO_O_PCellID1 0x00000FF4 +#define GPIO_O_PCellID2 0x00000FF8 +#define GPIO_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO Register reset values. +// +//***************************************************************************** +#define GPIO_RV_DEN 0x000000FF // Digital input enable reg RV +#define GPIO_RV_PUR 0x000000FF // Pull up select reg RV +#define GPIO_RV_DR2R 0x000000FF // 2ma drive select reg RV +#define GPIO_RV_PCellID1 0x000000F0 +#define GPIO_RV_PCellID3 0x000000B1 +#define GPIO_RV_PeriphID0 0x00000061 +#define GPIO_RV_PeriphID1 0x00000010 +#define GPIO_RV_PCellID0 0x0000000D +#define GPIO_RV_PCellID2 0x00000005 +#define GPIO_RV_PeriphID2 0x00000004 +#define GPIO_RV_LOCK 0x00000001 // Lock register RV +#define GPIO_RV_PeriphID7 0x00000000 +#define GPIO_RV_PDR 0x00000000 // Pull down select reg RV +#define GPIO_RV_IC 0x00000000 // Interrupt clear reg RV +#define GPIO_RV_SLR 0x00000000 // Slew rate control enable reg RV +#define GPIO_RV_ODR 0x00000000 // Open drain select reg RV +#define GPIO_RV_IBE 0x00000000 // Interrupt both edges reg RV +#define GPIO_RV_AFSEL 0x00000000 // Mode control select reg RV +#define GPIO_RV_IS 0x00000000 // Interrupt sense reg RV +#define GPIO_RV_IM 0x00000000 // Interrupt mask reg RV +#define GPIO_RV_PeriphID4 0x00000000 +#define GPIO_RV_PeriphID5 0x00000000 +#define GPIO_RV_DR8R 0x00000000 // 8ma drive select reg RV +#define GPIO_RV_RIS 0x00000000 // Raw interrupt status reg RV +#define GPIO_RV_DR4R 0x00000000 // 4ma drive select reg RV +#define GPIO_RV_IEV 0x00000000 // Intterupt event reg RV +#define GPIO_RV_DIR 0x00000000 // Data direction reg RV +#define GPIO_RV_PeriphID6 0x00000000 +#define GPIO_RV_PeriphID3 0x00000000 +#define GPIO_RV_DATA 0x00000000 // Data register reset value +#define GPIO_RV_MIS 0x00000000 // Masked interrupt status reg RV + +#endif + +#endif // __HW_GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_ints.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_ints.h new file mode 100644 index 00000000..1eb1e34e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_ints.h @@ -0,0 +1,141 @@ +//***************************************************************************** +// +// hw_ints.h - Macros that define the interrupt assignment on Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_INTS_H__ +#define __HW_INTS_H__ + +//***************************************************************************** +// +// The following are defines for the fault assignments. +// +//***************************************************************************** +#define FAULT_NMI 2 // NMI fault +#define FAULT_HARD 3 // Hard fault +#define FAULT_MPU 4 // MPU fault +#define FAULT_BUS 5 // Bus fault +#define FAULT_USAGE 6 // Usage fault +#define FAULT_SVCALL 11 // SVCall +#define FAULT_DEBUG 12 // Debug monitor +#define FAULT_PENDSV 14 // PendSV +#define FAULT_SYSTICK 15 // System Tick + +//***************************************************************************** +// +// The following are defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_GPIOA 16 // GPIO Port A +#define INT_GPIOB 17 // GPIO Port B +#define INT_GPIOC 18 // GPIO Port C +#define INT_GPIOD 19 // GPIO Port D +#define INT_GPIOE 20 // GPIO Port E +#define INT_UART0 21 // UART0 Rx and Tx +#define INT_UART1 22 // UART1 Rx and Tx +#define INT_SSI0 23 // SSI0 Rx and Tx +#define INT_I2C0 24 // I2C0 Master and Slave +#define INT_PWM_FAULT 25 // PWM Fault +#define INT_PWM0 26 // PWM Generator 0 +#define INT_PWM1 27 // PWM Generator 1 +#define INT_PWM2 28 // PWM Generator 2 +#define INT_QEI0 29 // Quadrature Encoder 0 +#define INT_ADC0SS0 30 // ADC0 Sequence 0 +#define INT_ADC0SS1 31 // ADC0 Sequence 1 +#define INT_ADC0SS2 32 // ADC0 Sequence 2 +#define INT_ADC0SS3 33 // ADC0 Sequence 3 +#define INT_WATCHDOG 34 // Watchdog timer +#define INT_TIMER0A 35 // Timer 0 subtimer A +#define INT_TIMER0B 36 // Timer 0 subtimer B +#define INT_TIMER1A 37 // Timer 1 subtimer A +#define INT_TIMER1B 38 // Timer 1 subtimer B +#define INT_TIMER2A 39 // Timer 2 subtimer A +#define INT_TIMER2B 40 // Timer 2 subtimer B +#define INT_COMP0 41 // Analog Comparator 0 +#define INT_COMP1 42 // Analog Comparator 1 +#define INT_COMP2 43 // Analog Comparator 2 +#define INT_SYSCTL 44 // System Control (PLL, OSC, BO) +#define INT_FLASH 45 // FLASH Control +#define INT_GPIOF 46 // GPIO Port F +#define INT_GPIOG 47 // GPIO Port G +#define INT_GPIOH 48 // GPIO Port H +#define INT_UART2 49 // UART2 Rx and Tx +#define INT_SSI1 50 // SSI1 Rx and Tx +#define INT_TIMER3A 51 // Timer 3 subtimer A +#define INT_TIMER3B 52 // Timer 3 subtimer B +#define INT_I2C1 53 // I2C1 Master and Slave +#define INT_QEI1 54 // Quadrature Encoder 1 +#define INT_CAN0 55 // CAN0 +#define INT_CAN1 56 // CAN1 +#define INT_CAN2 57 // CAN2 +#define INT_ETH 58 // Ethernet +#define INT_HIBERNATE 59 // Hibernation module +#define INT_USB0 60 // USB 0 Controller +#define INT_PWM3 61 // PWM Generator 3 +#define INT_UDMA 62 // uDMA controller +#define INT_UDMAERR 63 // uDMA Error +#define INT_ADC1SS0 64 // ADC1 Sequence 0 +#define INT_ADC1SS1 65 // ADC1 Sequence 1 +#define INT_ADC1SS2 66 // ADC1 Sequence 2 +#define INT_ADC1SS3 67 // ADC1 Sequence 3 +#define INT_I2S0 68 // I2S0 +#define INT_EPI0 69 // EPI0 +#define INT_GPIOJ 70 // GPIO Port J + +//***************************************************************************** +// +// The following are defines for the total number of interrupts. +// +//***************************************************************************** +#define NUM_INTERRUPTS 71 + +//***************************************************************************** +// +// The following are defines for the total number of priority levels. +// +//***************************************************************************** +#define NUM_PRIORITY 8 +#define NUM_PRIORITY_BITS 3 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_SSI 23 // SSI Rx and Tx +#define INT_I2C 24 // I2C Master and Slave +#define INT_QEI 29 // Quadrature Encoder +#define INT_ADC0 30 // ADC Sequence 0 +#define INT_ADC1 31 // ADC Sequence 1 +#define INT_ADC2 32 // ADC Sequence 2 +#define INT_ADC3 33 // ADC Sequence 3 + +#endif + +#endif // __HW_INTS_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_memmap.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_memmap.h new file mode 100644 index 00000000..144f9d25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_memmap.h @@ -0,0 +1,115 @@ +//***************************************************************************** +// +// hw_memmap.h - Macros defining the memory map of Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_MEMMAP_H__ +#define __HW_MEMMAP_H__ + +//***************************************************************************** +// +// The following are defines for the base address of the memories and +// peripherals. +// +//***************************************************************************** +#define FLASH_BASE 0x00000000 // FLASH memory +#define SRAM_BASE 0x20000000 // SRAM memory +#define WATCHDOG0_BASE 0x40000000 // Watchdog0 +#define WATCHDOG1_BASE 0x40001000 // Watchdog1 +#define GPIO_PORTA_BASE 0x40004000 // GPIO Port A +#define GPIO_PORTB_BASE 0x40005000 // GPIO Port B +#define GPIO_PORTC_BASE 0x40006000 // GPIO Port C +#define GPIO_PORTD_BASE 0x40007000 // GPIO Port D +#define SSI0_BASE 0x40008000 // SSI0 +#define SSI1_BASE 0x40009000 // SSI1 +#define UART0_BASE 0x4000C000 // UART0 +#define UART1_BASE 0x4000D000 // UART1 +#define UART2_BASE 0x4000E000 // UART2 +#define I2C0_MASTER_BASE 0x40020000 // I2C0 Master +#define I2C0_SLAVE_BASE 0x40020800 // I2C0 Slave +#define I2C1_MASTER_BASE 0x40021000 // I2C1 Master +#define I2C1_SLAVE_BASE 0x40021800 // I2C1 Slave +#define GPIO_PORTE_BASE 0x40024000 // GPIO Port E +#define GPIO_PORTF_BASE 0x40025000 // GPIO Port F +#define GPIO_PORTG_BASE 0x40026000 // GPIO Port G +#define GPIO_PORTH_BASE 0x40027000 // GPIO Port H +#define PWM_BASE 0x40028000 // PWM +#define QEI0_BASE 0x4002C000 // QEI0 +#define QEI1_BASE 0x4002D000 // QEI1 +#define TIMER0_BASE 0x40030000 // Timer0 +#define TIMER1_BASE 0x40031000 // Timer1 +#define TIMER2_BASE 0x40032000 // Timer2 +#define TIMER3_BASE 0x40033000 // Timer3 +#define ADC0_BASE 0x40038000 // ADC0 +#define ADC1_BASE 0x40039000 // ADC1 +#define COMP_BASE 0x4003C000 // Analog comparators +#define GPIO_PORTJ_BASE 0x4003D000 // GPIO Port J +#define CAN0_BASE 0x40040000 // CAN0 +#define CAN1_BASE 0x40041000 // CAN1 +#define CAN2_BASE 0x40042000 // CAN2 +#define ETH_BASE 0x40048000 // Ethernet +#define MAC_BASE 0x40048000 // Ethernet +#define USB0_BASE 0x40050000 // USB 0 Controller +#define I2S0_BASE 0x40054000 // I2S0 +#define GPIO_PORTA_AHB_BASE 0x40058000 // GPIO Port A (high speed) +#define GPIO_PORTB_AHB_BASE 0x40059000 // GPIO Port B (high speed) +#define GPIO_PORTC_AHB_BASE 0x4005A000 // GPIO Port C (high speed) +#define GPIO_PORTD_AHB_BASE 0x4005B000 // GPIO Port D (high speed) +#define GPIO_PORTE_AHB_BASE 0x4005C000 // GPIO Port E (high speed) +#define GPIO_PORTF_AHB_BASE 0x4005D000 // GPIO Port F (high speed) +#define GPIO_PORTG_AHB_BASE 0x4005E000 // GPIO Port G (high speed) +#define GPIO_PORTH_AHB_BASE 0x4005F000 // GPIO Port H (high speed) +#define GPIO_PORTJ_AHB_BASE 0x40060000 // GPIO Port J (high speed) +#define EPI0_BASE 0x400D0000 // EPI0 +#define HIB_BASE 0x400FC000 // Hibernation Module +#define FLASH_CTRL_BASE 0x400FD000 // FLASH Controller +#define SYSCTL_BASE 0x400FE000 // System Control +#define UDMA_BASE 0x400FF000 // uDMA Controller +#define ITM_BASE 0xE0000000 // Instrumentation Trace Macrocell +#define DWT_BASE 0xE0001000 // Data Watchpoint and Trace +#define FPB_BASE 0xE0002000 // FLASH Patch and Breakpoint +#define NVIC_BASE 0xE000E000 // Nested Vectored Interrupt Ctrl +#define TPIU_BASE 0xE0040000 // Trace Port Interface Unit + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the base address of the memories +// and peripherals. +// +//***************************************************************************** +#define WATCHDOG_BASE 0x40000000 // Watchdog +#define SSI_BASE 0x40008000 // SSI +#define I2C_MASTER_BASE 0x40020000 // I2C Master +#define I2C_SLAVE_BASE 0x40020800 // I2C Slave +#define QEI_BASE 0x4002C000 // QEI +#define ADC_BASE 0x40038000 // ADC + +#endif + +#endif // __HW_MEMMAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_nvic.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_nvic.h new file mode 100644 index 00000000..5ac7bafb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_nvic.h @@ -0,0 +1,1189 @@ +//***************************************************************************** +// +// hw_nvic.h - Macros used when accessing the NVIC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_NVIC_H__ +#define __HW_NVIC_H__ + +//***************************************************************************** +// +// The following are defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg +#define NVIC_ACTLR 0xE000E008 // Auxiliary Control +#define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status + // Register +#define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register +#define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register +#define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg +#define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable +#define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable +#define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable +#define NVIC_DIS1 0xE000E184 // Interrupt 32-54 Clear Enable +#define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending +#define NVIC_PEND1 0xE000E204 // Interrupt 32-54 Set Pending +#define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending +#define NVIC_UNPEND1 0xE000E284 // Interrupt 32-54 Clear Pending +#define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit +#define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-54 Active Bit +#define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority +#define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority +#define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority +#define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority +#define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority +#define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority +#define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority +#define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority +#define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority +#define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority +#define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority +#define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority +#define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority +#define NVIC_PRI13 0xE000E434 // Interrupt 52-53 Priority +#define NVIC_CPUID 0xE000ED00 // CPU ID Base +#define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State +#define NVIC_VTABLE 0xE000ED08 // Vector Table Offset +#define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset + // Control +#define NVIC_SYS_CTRL 0xE000ED10 // System Control +#define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control +#define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 +#define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2 +#define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3 +#define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State +#define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status +#define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status +#define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register +#define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address +#define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address +#define NVIC_MPU_TYPE 0xE000ED90 // MPU Type +#define NVIC_MPU_CTRL 0xE000ED94 // MPU Control +#define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number +#define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address +#define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size +#define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 +#define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size + // Alias 1 +#define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 +#define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size + // Alias 2 +#define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 +#define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size + // Alias 3 +#define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg +#define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select +#define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data +#define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control +#define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTLR register. +// +//***************************************************************************** +#define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding +#define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer +#define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple + // Cycle Instructions + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x007FFFFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable +#define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable +#define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable +#define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable +#define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable +#define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable +#define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable +#define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00FFFFFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00FFFFFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00FFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00FFFFFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI11 register. +// +//***************************************************************************** +#define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask +#define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask +#define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask +#define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask +#define NVIC_PRI11_INT47_S 29 +#define NVIC_PRI11_INT46_S 21 +#define NVIC_PRI11_INT45_S 13 +#define NVIC_PRI11_INT44_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI12 register. +// +//***************************************************************************** +#define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask +#define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask +#define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask +#define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask +#define NVIC_PRI12_INT51_S 29 +#define NVIC_PRI12_INT50_S 21 +#define NVIC_PRI12_INT49_S 13 +#define NVIC_PRI12_INT48_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI13 register. +// +//***************************************************************************** +#define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask +#define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask +#define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask +#define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask +#define NVIC_PRI13_INT55_S 29 +#define NVIC_PRI13_INT54_S 21 +#define NVIC_PRI13_INT53_S 13 +#define NVIC_PRI13_INT52_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0007F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_S 12 +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFE00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 9 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +#endif // __HW_NVIC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_sysctl.h new file mode 100644 index 00000000..2bcd8c71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_sysctl.h @@ -0,0 +1,1687 @@ +//***************************************************************************** +// +// hw_sysctl.h - Macros used when accessing the system control hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SYSCTL_H__ +#define __HW_SYSCTL_H__ + +//***************************************************************************** +// +// The following are defines for the System Control register addresses. +// +//***************************************************************************** +#define SYSCTL_DID0 0x400FE000 // Device Identification 0 +#define SYSCTL_DID1 0x400FE004 // Device Identification 1 +#define SYSCTL_DC0 0x400FE008 // Device Capabilities 0 +#define SYSCTL_DC1 0x400FE010 // Device Capabilities 1 +#define SYSCTL_DC2 0x400FE014 // Device Capabilities 2 +#define SYSCTL_DC3 0x400FE018 // Device Capabilities 3 +#define SYSCTL_DC4 0x400FE01C // Device Capabilities 4 +#define SYSCTL_DC5 0x400FE020 // Device Capabilities 5 +#define SYSCTL_DC6 0x400FE024 // Device Capabilities 6 +#define SYSCTL_DC7 0x400FE028 // Device Capabilities 7 +#define SYSCTL_DC8 0x400FE02C // Device Capabilities 8 ADC + // Channels +#define SYSCTL_PBORCTL 0x400FE030 // Brown-Out Reset Control +#define SYSCTL_LDOPCTL 0x400FE034 // LDO Power Control +#define SYSCTL_SRCR0 0x400FE040 // Software Reset Control 0 +#define SYSCTL_SRCR1 0x400FE044 // Software Reset Control 1 +#define SYSCTL_SRCR2 0x400FE048 // Software Reset Control 2 +#define SYSCTL_RIS 0x400FE050 // Raw Interrupt Status +#define SYSCTL_IMC 0x400FE054 // Interrupt Mask Control +#define SYSCTL_MISC 0x400FE058 // Masked Interrupt Status and + // Clear +#define SYSCTL_RESC 0x400FE05C // Reset Cause +#define SYSCTL_RCC 0x400FE060 // Run-Mode Clock Configuration +#define SYSCTL_PLLCFG 0x400FE064 // XTAL to PLL Translation +#define SYSCTL_GPIOHBCTL 0x400FE06C // GPIO High-Performance Bus + // Control +#define SYSCTL_RCC2 0x400FE070 // Run-Mode Clock Configuration 2 +#define SYSCTL_MOSCCTL 0x400FE07C // Main Oscillator Control +#define SYSCTL_RCGC0 0x400FE100 // Run Mode Clock Gating Control + // Register 0 +#define SYSCTL_RCGC1 0x400FE104 // Run Mode Clock Gating Control + // Register 1 +#define SYSCTL_RCGC2 0x400FE108 // Run Mode Clock Gating Control + // Register 2 +#define SYSCTL_SCGC0 0x400FE110 // Sleep Mode Clock Gating Control + // Register 0 +#define SYSCTL_SCGC1 0x400FE114 // Sleep Mode Clock Gating Control + // Register 1 +#define SYSCTL_SCGC2 0x400FE118 // Sleep Mode Clock Gating Control + // Register 2 +#define SYSCTL_DCGC0 0x400FE120 // Deep Sleep Mode Clock Gating + // Control Register 0 +#define SYSCTL_DCGC1 0x400FE124 // Deep-Sleep Mode Clock Gating + // Control Register 1 +#define SYSCTL_DCGC2 0x400FE128 // Deep Sleep Mode Clock Gating + // Control Register 2 +#define SYSCTL_DSLPCLKCFG 0x400FE144 // Deep Sleep Clock Configuration +#define SYSCTL_PIOSCCAL 0x400FE150 // Precision Internal Oscillator + // Calibration +#define SYSCTL_CLKVCLR 0x400FE150 // Clock Verification Clear +#define SYSCTL_PIOSCSTAT 0x400FE154 // Precision Internal Oscillator + // Statistics +#define SYSCTL_LDOARST 0x400FE160 // Allow Unregulated LDO to Reset + // the Part +#define SYSCTL_I2SMCLKCFG 0x400FE170 // I2S MCLK Configuration +#define SYSCTL_DC9 0x400FE190 // Device Capabilities 9 ADC + // Digital Comparators +#define SYSCTL_NVMSTAT 0x400FE1A0 // Non-Volatile Memory Information + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_0 0x00000000 // Initial DID0 register format + // definition for Stellaris(R) + // Sandstorm-class devices +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_SANDSTORM \ + 0x00000000 // Sandstorm-class Device +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_CLASS_DUSTDEVIL \ + 0x00030000 // Stellaris(R) DustDevil-class + // devices +#define SYSCTL_DID0_CLASS_TEMPEST \ + 0x00040000 // Stellaris(R) Tempest-class + // microcontrollers +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change +#define SYSCTL_DID0_MIN_3 0x00000003 // Minor revision 3 +#define SYSCTL_DID0_MIN_4 0x00000004 // Minor revision 4 +#define SYSCTL_DID0_MIN_5 0x00000005 // Minor revision 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_0 0x00000000 // Initial DID1 register format + // definition, indicating a + // Stellaris LM3Snnn device +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_101 0x00010000 // LM3S101 +#define SYSCTL_DID1_PRTNO_102 0x00020000 // LM3S102 +#define SYSCTL_DID1_PRTNO_300 0x00190000 // LM3S300 +#define SYSCTL_DID1_PRTNO_301 0x00110000 // LM3S301 +#define SYSCTL_DID1_PRTNO_308 0x001A0000 // LM3S308 +#define SYSCTL_DID1_PRTNO_310 0x00120000 // LM3S310 +#define SYSCTL_DID1_PRTNO_315 0x00130000 // LM3S315 +#define SYSCTL_DID1_PRTNO_316 0x00140000 // LM3S316 +#define SYSCTL_DID1_PRTNO_317 0x00170000 // LM3S317 +#define SYSCTL_DID1_PRTNO_328 0x00150000 // LM3S328 +#define SYSCTL_DID1_PRTNO_600 0x002A0000 // LM3S600 +#define SYSCTL_DID1_PRTNO_601 0x00210000 // LM3S601 +#define SYSCTL_DID1_PRTNO_608 0x002B0000 // LM3S608 +#define SYSCTL_DID1_PRTNO_610 0x00220000 // LM3S610 +#define SYSCTL_DID1_PRTNO_611 0x00230000 // LM3S611 +#define SYSCTL_DID1_PRTNO_612 0x00240000 // LM3S612 +#define SYSCTL_DID1_PRTNO_613 0x00250000 // LM3S613 +#define SYSCTL_DID1_PRTNO_615 0x00260000 // LM3S615 +#define SYSCTL_DID1_PRTNO_617 0x00280000 // LM3S617 +#define SYSCTL_DID1_PRTNO_618 0x00290000 // LM3S618 +#define SYSCTL_DID1_PRTNO_628 0x00270000 // LM3S628 +#define SYSCTL_DID1_PRTNO_800 0x00380000 // LM3S800 +#define SYSCTL_DID1_PRTNO_801 0x00310000 // LM3S801 +#define SYSCTL_DID1_PRTNO_808 0x00390000 // LM3S808 +#define SYSCTL_DID1_PRTNO_811 0x00320000 // LM3S811 +#define SYSCTL_DID1_PRTNO_812 0x00330000 // LM3S812 +#define SYSCTL_DID1_PRTNO_815 0x00340000 // LM3S815 +#define SYSCTL_DID1_PRTNO_817 0x00360000 // LM3S817 +#define SYSCTL_DID1_PRTNO_818 0x00370000 // LM3S818 +#define SYSCTL_DID1_PRTNO_828 0x00350000 // LM3S828 +#define SYSCTL_DID1_PRTNO_1110 0x00BF0000 // LM3S1110 +#define SYSCTL_DID1_PRTNO_1133 0x00C30000 // LM3S1133 +#define SYSCTL_DID1_PRTNO_1138 0x00C50000 // LM3S1138 +#define SYSCTL_DID1_PRTNO_1150 0x00C10000 // LM3S1150 +#define SYSCTL_DID1_PRTNO_1162 0x00C40000 // LM3S1162 +#define SYSCTL_DID1_PRTNO_1165 0x00C20000 // LM3S1165 +#define SYSCTL_DID1_PRTNO_1332 0x00C60000 // LM3S1332 +#define SYSCTL_DID1_PRTNO_1435 0x00BC0000 // LM3S1435 +#define SYSCTL_DID1_PRTNO_1439 0x00BA0000 // LM3S1439 +#define SYSCTL_DID1_PRTNO_1512 0x00BB0000 // LM3S1512 +#define SYSCTL_DID1_PRTNO_1538 0x00C70000 // LM3S1538 +#define SYSCTL_DID1_PRTNO_1601 0x00DB0000 // LM3S1601 +#define SYSCTL_DID1_PRTNO_1607 0x00060000 // LM3S1607 +#define SYSCTL_DID1_PRTNO_1608 0x00DA0000 // LM3S1608 +#define SYSCTL_DID1_PRTNO_1620 0x00C00000 // LM3S1620 +#define SYSCTL_DID1_PRTNO_1625 0x00030000 // LM3S1625 +#define SYSCTL_DID1_PRTNO_1626 0x00040000 // LM3S1626 +#define SYSCTL_DID1_PRTNO_1627 0x00050000 // LM3S1627 +#define SYSCTL_DID1_PRTNO_1635 0x00B30000 // LM3S1635 +#define SYSCTL_DID1_PRTNO_1637 0x00BD0000 // LM3S1637 +#define SYSCTL_DID1_PRTNO_1651 0x00B10000 // LM3S1651 +#define SYSCTL_DID1_PRTNO_1751 0x00B90000 // LM3S1751 +#define SYSCTL_DID1_PRTNO_1776 0x00100000 // LM3S1776 +#define SYSCTL_DID1_PRTNO_1811 0x00160000 // LM3S1811 +#define SYSCTL_DID1_PRTNO_1816 0x003D0000 // LM3S1816 +#define SYSCTL_DID1_PRTNO_1850 0x00B40000 // LM3S1850 +#define SYSCTL_DID1_PRTNO_1911 0x00DD0000 // LM3S1911 +#define SYSCTL_DID1_PRTNO_1918 0x00DC0000 // LM3S1918 +#define SYSCTL_DID1_PRTNO_1937 0x00B70000 // LM3S1937 +#define SYSCTL_DID1_PRTNO_1958 0x00BE0000 // LM3S1958 +#define SYSCTL_DID1_PRTNO_1960 0x00B50000 // LM3S1960 +#define SYSCTL_DID1_PRTNO_1968 0x00B80000 // LM3S1968 +#define SYSCTL_DID1_PRTNO_1J11 0x000F0000 // LM3S1J11 +#define SYSCTL_DID1_PRTNO_1J16 0x003C0000 // LM3S1J16 +#define SYSCTL_DID1_PRTNO_1N11 0x000E0000 // LM3S1N11 +#define SYSCTL_DID1_PRTNO_1N16 0x003B0000 // LM3S1N16 +#define SYSCTL_DID1_PRTNO_1P51 0x00B20000 // LM3S1P51 +#define SYSCTL_DID1_PRTNO_1R21 0x009E0000 // LM3S1R21 +#define SYSCTL_DID1_PRTNO_1W16 0x00300000 // LM3S1W16 +#define SYSCTL_DID1_PRTNO_1Z16 0x002F0000 // LM3S1Z16 +#define SYSCTL_DID1_PRTNO_2110 0x00510000 // LM3S2110 +#define SYSCTL_DID1_PRTNO_2139 0x00840000 // LM3S2139 +#define SYSCTL_DID1_PRTNO_2276 0x00390000 // LM3S2276 +#define SYSCTL_DID1_PRTNO_2410 0x00A20000 // LM3S2410 +#define SYSCTL_DID1_PRTNO_2412 0x00590000 // LM3S2412 +#define SYSCTL_DID1_PRTNO_2432 0x00560000 // LM3S2432 +#define SYSCTL_DID1_PRTNO_2533 0x005A0000 // LM3S2533 +#define SYSCTL_DID1_PRTNO_2601 0x00E10000 // LM3S2601 +#define SYSCTL_DID1_PRTNO_2608 0x00E00000 // LM3S2608 +#define SYSCTL_DID1_PRTNO_2616 0x00330000 // LM3S2616 +#define SYSCTL_DID1_PRTNO_2620 0x00570000 // LM3S2620 +#define SYSCTL_DID1_PRTNO_2637 0x00850000 // LM3S2637 +#define SYSCTL_DID1_PRTNO_2651 0x00530000 // LM3S2651 +#define SYSCTL_DID1_PRTNO_2671 0x00800000 // LM3S2671 +#define SYSCTL_DID1_PRTNO_2678 0x00500000 // LM3S2678 +#define SYSCTL_DID1_PRTNO_2730 0x00A40000 // LM3S2730 +#define SYSCTL_DID1_PRTNO_2739 0x00520000 // LM3S2739 +#define SYSCTL_DID1_PRTNO_2776 0x003A0000 // LM3S2776 +#define SYSCTL_DID1_PRTNO_2793 0x006D0000 // LM3S2793 +#define SYSCTL_DID1_PRTNO_2911 0x00E30000 // LM3S2911 +#define SYSCTL_DID1_PRTNO_2918 0x00E20000 // LM3S2918 +#define SYSCTL_DID1_PRTNO_2939 0x00540000 // LM3S2939 +#define SYSCTL_DID1_PRTNO_2948 0x008F0000 // LM3S2948 +#define SYSCTL_DID1_PRTNO_2950 0x00580000 // LM3S2950 +#define SYSCTL_DID1_PRTNO_2965 0x00550000 // LM3S2965 +#define SYSCTL_DID1_PRTNO_2B93 0x006C0000 // LM3S2B93 +#define SYSCTL_DID1_PRTNO_3634 0x00080000 // LM3S3634 +#define SYSCTL_DID1_PRTNO_3651 0x00430000 // LM3S3651 +#define SYSCTL_DID1_PRTNO_3739 0x00440000 // LM3S3739 +#define SYSCTL_DID1_PRTNO_3748 0x00490000 // LM3S3748 +#define SYSCTL_DID1_PRTNO_3749 0x00450000 // LM3S3749 +#define SYSCTL_DID1_PRTNO_3826 0x00420000 // LM3S3826 +#define SYSCTL_DID1_PRTNO_3J26 0x00410000 // LM3S3J26 +#define SYSCTL_DID1_PRTNO_3N26 0x00400000 // LM3S3N26 +#define SYSCTL_DID1_PRTNO_3W26 0x003F0000 // LM3S3W26 +#define SYSCTL_DID1_PRTNO_3Z26 0x003E0000 // LM3S3Z26 +#define SYSCTL_DID1_PRTNO_5632 0x00810000 // LM3S5632 +#define SYSCTL_DID1_PRTNO_5651 0x000C0000 // LM3S5651 +#define SYSCTL_DID1_PRTNO_5652 0x008A0000 // LM3S5652 +#define SYSCTL_DID1_PRTNO_5656 0x004D0000 // LM3S5656 +#define SYSCTL_DID1_PRTNO_5662 0x00910000 // LM3S5662 +#define SYSCTL_DID1_PRTNO_5732 0x00960000 // LM3S5732 +#define SYSCTL_DID1_PRTNO_5737 0x00970000 // LM3S5737 +#define SYSCTL_DID1_PRTNO_5739 0x00A00000 // LM3S5739 +#define SYSCTL_DID1_PRTNO_5747 0x00990000 // LM3S5747 +#define SYSCTL_DID1_PRTNO_5749 0x00A70000 // LM3S5749 +#define SYSCTL_DID1_PRTNO_5752 0x009A0000 // LM3S5752 +#define SYSCTL_DID1_PRTNO_5762 0x009C0000 // LM3S5762 +#define SYSCTL_DID1_PRTNO_5791 0x00690000 // LM3S5791 +#define SYSCTL_DID1_PRTNO_5951 0x000B0000 // LM3S5951 +#define SYSCTL_DID1_PRTNO_5956 0x004E0000 // LM3S5956 +#define SYSCTL_DID1_PRTNO_5B91 0x00680000 // LM3S5B91 +#define SYSCTL_DID1_PRTNO_5K31 0x00090000 // LM3S5K31 +#define SYSCTL_DID1_PRTNO_5K36 0x004A0000 // LM3S5K36 +#define SYSCTL_DID1_PRTNO_5P31 0x000A0000 // LM3S5P31 +#define SYSCTL_DID1_PRTNO_5P36 0x00480000 // LM3S5P36 +#define SYSCTL_DID1_PRTNO_5P51 0x000D0000 // LM3S5P51 +#define SYSCTL_DID1_PRTNO_5P56 0x004C0000 // LM3S5P56 +#define SYSCTL_DID1_PRTNO_5R31 0x00070000 // LM3S5R31 +#define SYSCTL_DID1_PRTNO_5R36 0x004B0000 // LM3S5R36 +#define SYSCTL_DID1_PRTNO_5T36 0x00470000 // LM3S5T36 +#define SYSCTL_DID1_PRTNO_5Y36 0x00460000 // LM3S5Y36 +#define SYSCTL_DID1_PRTNO_6100 0x00A10000 // LM3S6100 +#define SYSCTL_DID1_PRTNO_6110 0x00740000 // LM3S6110 +#define SYSCTL_DID1_PRTNO_6420 0x00A50000 // LM3S6420 +#define SYSCTL_DID1_PRTNO_6422 0x00820000 // LM3S6422 +#define SYSCTL_DID1_PRTNO_6432 0x00750000 // LM3S6432 +#define SYSCTL_DID1_PRTNO_6537 0x00760000 // LM3S6537 +#define SYSCTL_DID1_PRTNO_6610 0x00710000 // LM3S6610 +#define SYSCTL_DID1_PRTNO_6611 0x00E70000 // LM3S6611 +#define SYSCTL_DID1_PRTNO_6618 0x00E60000 // LM3S6618 +#define SYSCTL_DID1_PRTNO_6633 0x00830000 // LM3S6633 +#define SYSCTL_DID1_PRTNO_6637 0x008B0000 // LM3S6637 +#define SYSCTL_DID1_PRTNO_6730 0x00A30000 // LM3S6730 +#define SYSCTL_DID1_PRTNO_6753 0x00770000 // LM3S6753 +#define SYSCTL_DID1_PRTNO_6911 0x00E90000 // LM3S6911 +#define SYSCTL_DID1_PRTNO_6918 0x00E80000 // LM3S6918 +#define SYSCTL_DID1_PRTNO_6938 0x00890000 // LM3S6938 +#define SYSCTL_DID1_PRTNO_6950 0x00720000 // LM3S6950 +#define SYSCTL_DID1_PRTNO_6952 0x00780000 // LM3S6952 +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PRTNO_8530 0x00640000 // LM3S8530 +#define SYSCTL_DID1_PRTNO_8538 0x008E0000 // LM3S8538 +#define SYSCTL_DID1_PRTNO_8630 0x00610000 // LM3S8630 +#define SYSCTL_DID1_PRTNO_8730 0x00630000 // LM3S8730 +#define SYSCTL_DID1_PRTNO_8733 0x008D0000 // LM3S8733 +#define SYSCTL_DID1_PRTNO_8738 0x00860000 // LM3S8738 +#define SYSCTL_DID1_PRTNO_8930 0x00650000 // LM3S8930 +#define SYSCTL_DID1_PRTNO_8933 0x008C0000 // LM3S8933 +#define SYSCTL_DID1_PRTNO_8938 0x00880000 // LM3S8938 +#define SYSCTL_DID1_PRTNO_8962 0x00A60000 // LM3S8962 +#define SYSCTL_DID1_PRTNO_8970 0x00620000 // LM3S8970 +#define SYSCTL_DID1_PRTNO_8971 0x00D70000 // LM3S8971 +#define SYSCTL_DID1_PRTNO_9790 0x00670000 // LM3S9790 +#define SYSCTL_DID1_PRTNO_9792 0x006B0000 // LM3S9792 +#define SYSCTL_DID1_PRTNO_9997 0x00200000 // LM3S9997 +#define SYSCTL_DID1_PRTNO_9B90 0x00660000 // LM3S9B90 +#define SYSCTL_DID1_PRTNO_9B92 0x006A0000 // LM3S9B92 +#define SYSCTL_DID1_PRTNO_9B95 0x006E0000 // LM3S9B95 +#define SYSCTL_DID1_PRTNO_9B96 0x006F0000 // LM3S9B96 +#define SYSCTL_DID1_PRTNO_9L97 0x00180000 // LM3S9L97 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_28 0x00000000 // 28 pin package +#define SYSCTL_DID1_PINCNT_48 0x00002000 // 48-pin package +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_PINCNT_64 0x00006000 // 64-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_PKG_QFN 0x00000018 // QFN package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified +#define SYSCTL_DID1_PRTNO_S 16 // Part number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_2KB 0x00070000 // 2 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_4KB 0x000F0000 // 4 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_6KB 0x00170000 // 6 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_8KB 0x001F0000 // 8 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_12KB 0x002F0000 // 12 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_16KB 0x003F0000 // 16 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_20KB 0x004F0000 // 20 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_24KB 0x005F0000 // 24 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_32KB 0x007F0000 // 32 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_96KB 0x017F0000 // 96 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_8KB 0x00000003 // 8 KB of Flash +#define SYSCTL_DC0_FLASHSZ_16KB 0x00000007 // 16 KB of Flash +#define SYSCTL_DC0_FLASHSZ_32KB 0x0000000F // 32 KB of Flash +#define SYSCTL_DC0_FLASHSZ_64KB 0x0000001F // 64 KB of Flash +#define SYSCTL_DC0_FLASHSZ_96KB 0x0000002F // 96 KB of Flash +#define SYSCTL_DC0_FLASHSZ_128K 0x0000003F // 128 KB of Flash +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT1 0x10000000 // Watchdog Timer1 Present +#define SYSCTL_DC1_CAN2 0x04000000 // CAN Module 2 Present +#define SYSCTL_DC1_CAN1 0x02000000 // CAN Module 1 Present +#define SYSCTL_DC1_CAN0 0x01000000 // CAN Module 0 Present +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC1 0x00020000 // ADC Module 1 Present +#define SYSCTL_DC1_ADC0 0x00010000 // ADC Module 0 Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_100 \ + 0x00001000 // Divide VCO (400MHZ) by 5 minimum +#define SYSCTL_DC1_MINSYSDIV_66 0x00002000 // Divide VCO (400MHZ) by 2*2 + 2 = + // 6 minimum +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_MINSYSDIV_25 0x00007000 // Specifies a 25-MHz clock with a + // PLL divider of 8 +#define SYSCTL_DC1_MINSYSDIV_20 0x00009000 // Specifies a 20-MHz clock with a + // PLL divider of 10 +#define SYSCTL_DC1_ADCSPD_M 0x00000F00 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_DC1_ADCSPD_250K 0x00000100 // 250K samples/second +#define SYSCTL_DC1_ADCSPD_500K 0x00000200 // 500K samples/second +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_ADC1SPD_M 0x00000C00 // Max ADC1 Speed +#define SYSCTL_DC1_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_DC1_ADC0SPD_M 0x00000300 // Max ADC0 Speed +#define SYSCTL_DC1_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_EPI0 0x40000000 // EPI Module 0 Present +#define SYSCTL_DC2_I2S0 0x10000000 // I2S Module 0 Present +#define SYSCTL_DC2_COMP2 0x04000000 // Analog Comparator 2 Present +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI1 0x00000020 // SSI Module 1 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP5 0x20000000 // CCP5 Pin Present +#define SYSCTL_DC3_CCP4 0x10000000 // CCP4 Pin Present +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC0AIN7 0x00800000 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC3_ADC0AIN6 0x00400000 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC3_ADC0AIN5 0x00200000 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC3_ADC0AIN4 0x00100000 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC3_ADC0AIN3 0x00080000 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC3_ADC0AIN2 0x00040000 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC3_ADC0AIN1 0x00020000 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC3_ADC0AIN0 0x00010000 // ADC Module 0 AIN0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C2O 0x00004000 // C2o Pin Present +#define SYSCTL_DC3_C2PLUS 0x00002000 // C2+ Pin Present +#define SYSCTL_DC3_C2MINUS 0x00001000 // C2- Pin Present +#define SYSCTL_DC3_C1O 0x00000800 // C1o Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_ETH 0x50000000 // Ethernet present +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_E1588 0x01000000 // 1588 Capable +#define SYSCTL_DC4_PICAL 0x00040000 // PIOSC Calibrate +#define SYSCTL_DC4_CCP7 0x00008000 // CCP7 Pin Present +#define SYSCTL_DC4_CCP6 0x00004000 // CCP6 Pin Present +#define SYSCTL_DC4_UDMA 0x00002000 // Micro-DMA Module Present +#define SYSCTL_DC4_ROM 0x00001000 // Internal Code ROM Present +#define SYSCTL_DC4_GPIOJ 0x00000100 // GPIO Port J Present +#define SYSCTL_DC4_GPIOH 0x00000080 // GPIO Port H Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC5 register. +// +//***************************************************************************** +#define SYSCTL_DC5_PWMFAULT3 0x08000000 // PWM Fault 3 Pin Present +#define SYSCTL_DC5_PWMFAULT2 0x04000000 // PWM Fault 2 Pin Present +#define SYSCTL_DC5_PWMFAULT1 0x02000000 // PWM Fault 1 Pin Present +#define SYSCTL_DC5_PWMFAULT0 0x01000000 // PWM Fault 0 Pin Present +#define SYSCTL_DC5_PWMEFLT 0x00200000 // PWM Extended Fault Active +#define SYSCTL_DC5_PWMESYNC 0x00100000 // PWM Extended SYNC Active +#define SYSCTL_DC5_PWM7 0x00000080 // PWM7 Pin Present +#define SYSCTL_DC5_PWM6 0x00000040 // PWM6 Pin Present +#define SYSCTL_DC5_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC5_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC5_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC5_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC5_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC5_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC6 register. +// +//***************************************************************************** +#define SYSCTL_DC6_USB0PHY 0x00000010 // USB Module 0 PHY Present +#define SYSCTL_DC6_USB0_M 0x00000003 // USB Module 0 Present +#define SYSCTL_DC6_USB0_DEV 0x00000001 // USB0 is Device Only +#define SYSCTL_DC6_USB0_HOSTDEV 0x00000002 // USB is Device or Host +#define SYSCTL_DC6_USB0_OTG 0x00000003 // USB0 is OTG + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC7 register. +// +//***************************************************************************** +#define SYSCTL_DC7_SW 0x40000000 // Software transfer on uDMA Ch30 +#define SYSCTL_DC7_DMACH30 0x40000000 // SW +#define SYSCTL_DC7_DMACH29 0x20000000 // I2S0_TX / CAN1_TX +#define SYSCTL_DC7_DMACH28 0x10000000 // I2S0_RX / CAN1_RX +#define SYSCTL_DC7_DMACH27 0x08000000 // CAN1_TX / ADC1_SS3 +#define SYSCTL_DC7_DMACH26 0x04000000 // CAN1_RX / ADC1_SS2 +#define SYSCTL_DC7_DMACH25 0x02000000 // SSI1_TX / ADC1_SS1 +#define SYSCTL_DC7_SSI1_TX 0x02000000 // SSI1 TX on uDMA Ch25 +#define SYSCTL_DC7_SSI1_RX 0x01000000 // SSI1 RX on uDMA Ch24 +#define SYSCTL_DC7_DMACH24 0x01000000 // SSI1_RX / ADC1_SS0 +#define SYSCTL_DC7_UART1_TX 0x00800000 // UART1 TX on uDMA Ch23 +#define SYSCTL_DC7_DMACH23 0x00800000 // UART1_TX / CAN2_TX +#define SYSCTL_DC7_DMACH22 0x00400000 // UART1_RX / CAN2_RX +#define SYSCTL_DC7_UART1_RX 0x00400000 // UART1 RX on uDMA Ch22 +#define SYSCTL_DC7_DMACH21 0x00200000 // Timer1B / EPI0_WFIFO +#define SYSCTL_DC7_DMACH20 0x00100000 // Timer1A / EPI0_NBRFIFO +#define SYSCTL_DC7_DMACH19 0x00080000 // Timer0B / Timer1B +#define SYSCTL_DC7_DMACH18 0x00040000 // Timer0A / Timer1A +#define SYSCTL_DC7_DMACH17 0x00020000 // ADC0_SS3 +#define SYSCTL_DC7_DMACH16 0x00010000 // ADC0_SS2 +#define SYSCTL_DC7_DMACH15 0x00008000 // ADC0_SS1 / Timer2B +#define SYSCTL_DC7_DMACH14 0x00004000 // ADC0_SS0 / Timer2A +#define SYSCTL_DC7_DMACH13 0x00002000 // CAN0_TX / UART2_TX +#define SYSCTL_DC7_DMACH12 0x00001000 // CAN0_RX / UART2_RX +#define SYSCTL_DC7_SSI0_TX 0x00000800 // SSI0 TX on uDMA Ch11 +#define SYSCTL_DC7_DMACH11 0x00000800 // SSI0_TX / SSI1_TX +#define SYSCTL_DC7_SSI0_RX 0x00000400 // SSI0 RX on uDMA Ch10 +#define SYSCTL_DC7_DMACH10 0x00000400 // SSI0_RX / SSI1_RX +#define SYSCTL_DC7_UART0_TX 0x00000200 // UART0 TX on uDMA Ch9 +#define SYSCTL_DC7_DMACH9 0x00000200 // UART0_TX / UART1_TX +#define SYSCTL_DC7_DMACH8 0x00000100 // UART0_RX / UART1_RX +#define SYSCTL_DC7_UART0_RX 0x00000100 // UART0 RX on uDMA Ch8 +#define SYSCTL_DC7_DMACH7 0x00000080 // ETH_TX / Timer2B +#define SYSCTL_DC7_DMACH6 0x00000040 // ETH_RX / Timer2A +#define SYSCTL_DC7_DMACH5 0x00000020 // USB_EP3_TX / Timer2B +#define SYSCTL_DC7_USB_EP3_TX 0x00000020 // USB EP3 TX on uDMA Ch5 +#define SYSCTL_DC7_USB_EP3_RX 0x00000010 // USB EP3 RX on uDMA Ch4 +#define SYSCTL_DC7_DMACH4 0x00000010 // USB_EP3_RX / Timer2A +#define SYSCTL_DC7_USB_EP2_TX 0x00000008 // USB EP2 TX on uDMA Ch3 +#define SYSCTL_DC7_DMACH3 0x00000008 // USB_EP2_TX / Timer3B +#define SYSCTL_DC7_USB_EP2_RX 0x00000004 // USB EP2 RX on uDMA Ch2 +#define SYSCTL_DC7_DMACH2 0x00000004 // USB_EP2_RX / Timer3A +#define SYSCTL_DC7_USB_EP1_TX 0x00000002 // USB EP1 TX on uDMA Ch1 +#define SYSCTL_DC7_DMACH1 0x00000002 // USB_EP1_TX / UART2_TX +#define SYSCTL_DC7_DMACH0 0x00000001 // USB_EP1_RX / UART2_RX +#define SYSCTL_DC7_USB_EP1_RX 0x00000001 // USB EP1 RX on uDMA Ch0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC8 register. +// +//***************************************************************************** +#define SYSCTL_DC8_ADC1AIN15 0x80000000 // ADC Module 1 AIN15 Pin Present +#define SYSCTL_DC8_ADC1AIN14 0x40000000 // ADC Module 1 AIN14 Pin Present +#define SYSCTL_DC8_ADC1AIN13 0x20000000 // ADC Module 1 AIN13 Pin Present +#define SYSCTL_DC8_ADC1AIN12 0x10000000 // ADC Module 1 AIN12 Pin Present +#define SYSCTL_DC8_ADC1AIN11 0x08000000 // ADC Module 1 AIN11 Pin Present +#define SYSCTL_DC8_ADC1AIN10 0x04000000 // ADC Module 1 AIN10 Pin Present +#define SYSCTL_DC8_ADC1AIN9 0x02000000 // ADC Module 1 AIN9 Pin Present +#define SYSCTL_DC8_ADC1AIN8 0x01000000 // ADC Module 1 AIN8 Pin Present +#define SYSCTL_DC8_ADC1AIN7 0x00800000 // ADC Module 1 AIN7 Pin Present +#define SYSCTL_DC8_ADC1AIN6 0x00400000 // ADC Module 1 AIN6 Pin Present +#define SYSCTL_DC8_ADC1AIN5 0x00200000 // ADC Module 1 AIN5 Pin Present +#define SYSCTL_DC8_ADC1AIN4 0x00100000 // ADC Module 1 AIN4 Pin Present +#define SYSCTL_DC8_ADC1AIN3 0x00080000 // ADC Module 1 AIN3 Pin Present +#define SYSCTL_DC8_ADC1AIN2 0x00040000 // ADC Module 1 AIN2 Pin Present +#define SYSCTL_DC8_ADC1AIN1 0x00020000 // ADC Module 1 AIN1 Pin Present +#define SYSCTL_DC8_ADC1AIN0 0x00010000 // ADC Module 1 AIN0 Pin Present +#define SYSCTL_DC8_ADC0AIN15 0x00008000 // ADC Module 0 AIN15 Pin Present +#define SYSCTL_DC8_ADC0AIN14 0x00004000 // ADC Module 0 AIN14 Pin Present +#define SYSCTL_DC8_ADC0AIN13 0x00002000 // ADC Module 0 AIN13 Pin Present +#define SYSCTL_DC8_ADC0AIN12 0x00001000 // ADC Module 0 AIN12 Pin Present +#define SYSCTL_DC8_ADC0AIN11 0x00000800 // ADC Module 0 AIN11 Pin Present +#define SYSCTL_DC8_ADC0AIN10 0x00000400 // ADC Module 0 AIN10 Pin Present +#define SYSCTL_DC8_ADC0AIN9 0x00000200 // ADC Module 0 AIN9 Pin Present +#define SYSCTL_DC8_ADC0AIN8 0x00000100 // ADC Module 0 AIN8 Pin Present +#define SYSCTL_DC8_ADC0AIN7 0x00000080 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC8_ADC0AIN6 0x00000040 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC8_ADC0AIN5 0x00000020 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC8_ADC0AIN4 0x00000010 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC8_ADC0AIN3 0x00000008 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC8_ADC0AIN2 0x00000004 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC8_ADC0AIN1 0x00000002 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC8_ADC0AIN0 0x00000001 // ADC Module 0 AIN0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORTIM_M 0x0000FFFC // BOR Time Delay +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset +#define SYSCTL_PBORCTL_BORWT 0x00000001 // BOR Wait and Check for Noise +#define SYSCTL_PBORCTL_BORTIM_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_WDT1 0x10000000 // WDT1 Reset Control +#define SYSCTL_SRCR0_CAN2 0x04000000 // CAN2 Reset Control +#define SYSCTL_SRCR0_CAN1 0x02000000 // CAN1 Reset Control +#define SYSCTL_SRCR0_CAN0 0x01000000 // CAN0 Reset Control +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC1 0x00020000 // ADC1 Reset Control +#define SYSCTL_SRCR0_ADC0 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT0 0x00000008 // WDT0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_EPI0 0x40000000 // EPI0 Reset Control +#define SYSCTL_SRCR1_I2S0 0x10000000 // I2S0 Reset Control +#define SYSCTL_SRCR1_COMP2 0x04000000 // Analog Comp 2 Reset Control +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI1 0x00000020 // SSI1 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_USB0 0x00010000 // USB0 Reset Control +#define SYSCTL_SRCR2_UDMA 0x00002000 // Micro-DMA Reset Control +#define SYSCTL_SRCR2_GPIOJ 0x00000100 // Port J Reset Control +#define SYSCTL_SRCR2_GPIOH 0x00000080 // Port H Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_MOSCPUPRIS 0x00000100 // MOSC Power Up Raw Interrupt + // Status +#define SYSCTL_RIS_USBPLLLRIS 0x00000080 // USB PLL Lock Raw Interrupt + // Status +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_CLRIS 0x00000020 // Current Limit Raw Interrupt + // Status +#define SYSCTL_RIS_IOFRIS 0x00000010 // Internal Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_MOFRIS 0x00000008 // Main Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_LDORIS 0x00000004 // LDO Power Unregulated Raw + // Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status +#define SYSCTL_RIS_PLLFRIS 0x00000001 // PLL Fault Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_MOSCPUPIM 0x00000100 // MOSC Power Up Interrupt Mask +#define SYSCTL_IMC_USBPLLLIM 0x00000080 // USB PLL Lock Interrupt Mask +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_CLIM 0x00000020 // Current Limit Interrupt Mask +#define SYSCTL_IMC_IOFIM 0x00000010 // Internal Oscillator Fault + // Interrupt Mask +#define SYSCTL_IMC_MOFIM 0x00000008 // Main Oscillator Fault Interrupt + // Mask +#define SYSCTL_IMC_LDOIM 0x00000004 // LDO Power Unregulated Interrupt + // Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask +#define SYSCTL_IMC_PLLFIM 0x00000001 // PLL Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_MOSCPUPMIS 0x00000100 // MOSC Power Up Masked Interrupt + // Status +#define SYSCTL_MISC_USBPLLLMIS 0x00000080 // USB PLL Lock Masked Interrupt + // Status +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_CLMIS 0x00000020 // Current Limit Masked Interrupt + // Status +#define SYSCTL_MISC_IOFMIS 0x00000010 // Internal Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_MOFMIS 0x00000008 // Main Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_LDOMIS 0x00000004 // LDO Power Unregulated Masked + // Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_MOSCFAIL 0x00010000 // MOSC Failure Reset +#define SYSCTL_RESC_LDO 0x00000020 // LDO Reset +#define SYSCTL_RESC_WDT1 0x00000020 // Watchdog Timer 1 Reset +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT0 0x00000008 // Watchdog Timer 0 Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_OEN 0x00001000 // PLL Output Enable +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000007C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_XTAL_10MHZ 0x00000400 // 10 MHz +#define SYSCTL_RCC_XTAL_12MHZ 0x00000440 // 12 MHz +#define SYSCTL_RCC_XTAL_12_2MHZ 0x00000480 // 12.288 MHz +#define SYSCTL_RCC_XTAL_13_5MHZ 0x000004C0 // 13.56 MHz +#define SYSCTL_RCC_XTAL_14_3MHZ 0x00000500 // 14.31818 MHz +#define SYSCTL_RCC_XTAL_16MHZ 0x00000540 // 16 MHz +#define SYSCTL_RCC_XTAL_16_3MHZ 0x00000580 // 16.384 MHz +#define SYSCTL_RCC_PLLVER 0x00000400 // PLL Verification +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCVER 0x00000008 // Internal Oscillator Verification + // Timer +#define SYSCTL_RCC_MOSCVER 0x00000004 // Main Oscillator Verification + // Timer +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 +#define SYSCTL_RCC_PWMDIV_S 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_S 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_S 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_M 0x0000C000 // PLL OD Value +#define SYSCTL_PLLCFG_OD_1 0x00000000 // Divide by 1 +#define SYSCTL_PLLCFG_OD_2 0x00004000 // Divide by 2 +#define SYSCTL_PLLCFG_OD_4 0x00008000 // Divide by 4 +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_GPIOHBCTL +// register. +// +//***************************************************************************** +#define SYSCTL_GPIOHBCTL_PORTJ 0x00000100 // Port J Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTH 0x00000080 // Port H Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTG 0x00000040 // Port G Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTF 0x00000020 // Port F Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTE 0x00000010 // Port E Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTD 0x00000008 // Port D Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTC 0x00000004 // Port C Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTB 0x00000002 // Port B Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTA 0x00000001 // Port A Advanced High-Performance + // Bus + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_DIV400 0x40000000 // Divide PLL as 400 MHz vs. 200 + // MHz +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_SYSDIV2LSB 0x00400000 // Additional LSB for SYSDIV2 +#define SYSCTL_RCC2_USBPWRDN 0x00004000 // Power-Down USB PLL +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_419 0x00000060 // 4.194304 MHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MOSCCTL register. +// +//***************************************************************************** +#define SYSCTL_MOSCCTL_CVAL 0x00000001 // Clock Validation for MOSC + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_RCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_RCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_RCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_RCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_RCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_RCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_RCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_RCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_RCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_RCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_RCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_RCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_RCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_RCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_SCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_SCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_SCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_SCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_SCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_SCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_SCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_SCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_SCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_SCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_SCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_SCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_SCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_SCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_DCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_DCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_DCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_DCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_DCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_DCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_DCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_DCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_DCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_IOSC 0x00000001 // IOSC Clock Source +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCCAL +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCCAL_UTEN 0x80000000 // Use User Trim Value +#define SYSCTL_PIOSCCAL_CAL 0x00000200 // Start Calibration +#define SYSCTL_PIOSCCAL_UPDATE 0x00000100 // Update Trim +#define SYSCTL_PIOSCCAL_UT_M 0x0000007F // User Trim Value +#define SYSCTL_PIOSCCAL_UT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_VERCLR 0x00000001 // Clock Verification Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCSTAT +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCSTAT_DT_M 0x007F0000 // Default Trim Value +#define SYSCTL_PIOSCSTAT_CR_M 0x00000300 // Calibration Result +#define SYSCTL_PIOSCSTAT_CRNONE 0x00000000 // Calibration has not been + // attempted +#define SYSCTL_PIOSCSTAT_CRPASS 0x00000100 // The last calibration operation + // completed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CRFAIL 0x00000200 // The last calibration operation + // failed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CT_M 0x0000007F // Calibration Trim Value +#define SYSCTL_PIOSCSTAT_DT_S 16 +#define SYSCTL_PIOSCSTAT_CT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_LDOARST 0x00000001 // LDO Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_I2SMCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_I2SMCLKCFG_RXEN 0x80000000 // RX Clock Enable +#define SYSCTL_I2SMCLKCFG_RXI_M 0x3FF00000 // RX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_RXF_M 0x000F0000 // RX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_TXEN 0x00008000 // TX Clock Enable +#define SYSCTL_I2SMCLKCFG_TXI_M 0x00003FF0 // TX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_TXF_M 0x0000000F // TX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_RXI_S 20 +#define SYSCTL_I2SMCLKCFG_RXF_S 16 +#define SYSCTL_I2SMCLKCFG_TXI_S 4 +#define SYSCTL_I2SMCLKCFG_TXF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC9 register. +// +//***************************************************************************** +#define SYSCTL_DC9_ADC1DC7 0x00800000 // ADC1 DC7 Present +#define SYSCTL_DC9_ADC1DC6 0x00400000 // ADC1 DC6 Present +#define SYSCTL_DC9_ADC1DC5 0x00200000 // ADC1 DC5 Present +#define SYSCTL_DC9_ADC1DC4 0x00100000 // ADC1 DC4 Present +#define SYSCTL_DC9_ADC1DC3 0x00080000 // ADC1 DC3 Present +#define SYSCTL_DC9_ADC1DC2 0x00040000 // ADC1 DC2 Present +#define SYSCTL_DC9_ADC1DC1 0x00020000 // ADC1 DC1 Present +#define SYSCTL_DC9_ADC1DC0 0x00010000 // ADC1 DC0 Present +#define SYSCTL_DC9_ADC0DC7 0x00000080 // ADC0 DC7 Present +#define SYSCTL_DC9_ADC0DC6 0x00000040 // ADC0 DC6 Present +#define SYSCTL_DC9_ADC0DC5 0x00000020 // ADC0 DC5 Present +#define SYSCTL_DC9_ADC0DC4 0x00000010 // ADC0 DC4 Present +#define SYSCTL_DC9_ADC0DC3 0x00000008 // ADC0 DC3 Present +#define SYSCTL_DC9_ADC0DC2 0x00000004 // ADC0 DC2 Present +#define SYSCTL_DC9_ADC0DC1 0x00000002 // ADC0 DC1 Present +#define SYSCTL_DC9_ADC0DC0 0x00000001 // ADC0 DC0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_NVMSTAT register. +// +//***************************************************************************** +#define SYSCTL_NVMSTAT_TPSW 0x00000010 // Third Party Software Present +#define SYSCTL_NVMSTAT_FWB 0x00000001 // 32 Word Flash Write Buffer + // Active + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the System Control register +// addresses. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL 0x400FE06C // GPIO High-Speed Control +#define SYSCTL_USER0 0x400FE1E0 // NV User Register 0 +#define SYSCTL_USER1 0x400FE1E4 // NV User Register 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID0 +// register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_MASK 0x70000000 // DID0 version mask +#define SYSCTL_DID0_CLASS_MASK 0x00FF0000 // Device Class +#define SYSCTL_DID0_MAJ_MASK 0x0000FF00 // Major revision mask +#define SYSCTL_DID0_MAJ_A 0x00000000 // Major revision A +#define SYSCTL_DID0_MAJ_B 0x00000100 // Major revision B +#define SYSCTL_DID0_MAJ_C 0x00000200 // Major revision C +#define SYSCTL_DID0_MIN_MASK 0x000000FF // Minor revision mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID1 +// register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_MASK 0xF0000000 // Register version mask +#define SYSCTL_DID1_FAM_MASK 0x0F000000 // Family mask +#define SYSCTL_DID1_FAM_S 0x00000000 // Stellaris family +#define SYSCTL_DID1_PRTNO_MASK 0x00FF0000 // Part number mask +#define SYSCTL_DID1_PINCNT_MASK 0x0000E000 // Pin count +#define SYSCTL_DID1_TEMP_MASK 0x000000E0 // Temperature range mask +#define SYSCTL_DID1_PKG_MASK 0x00000018 // Package mask +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package +#define SYSCTL_DID1_QUAL_MASK 0x00000003 // Qualification status mask +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PRTNO_SHIFT 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_MASK 0xFFFF0000 // SRAM size mask +#define SYSCTL_DC0_FLASHSZ_MASK 0x0000FFFF // Flash size mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC1 +// register. +// +//***************************************************************************** +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_SYSDIV_MASK 0x0000F000 // Minimum system divider mask +#define SYSCTL_DC1_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_DC1_WDOG 0x00000008 // Watchdog present +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC2 +// register. +// +//***************************************************************************** +#define SYSCTL_DC2_I2C 0x00001000 // I2C present +#define SYSCTL_DC2_QEI 0x00000100 // QEI present +#define SYSCTL_DC2_SSI 0x00000010 // SSI present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC3 +// register. +// +//***************************************************************************** +#define SYSCTL_DC3_ADC7 0x00800000 // ADC7 Pin Present +#define SYSCTL_DC3_ADC6 0x00400000 // ADC6 Pin Present +#define SYSCTL_DC3_ADC5 0x00200000 // ADC5 Pin Present +#define SYSCTL_DC3_ADC4 0x00100000 // ADC4 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_MC_FAULT0 0x00008000 // MC0 fault pin present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BOR_MASK 0x0000FFFC // BOR wait timer +#define SYSCTL_PBORCTL_BOR_SH 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_MASK 0x0000003F // Voltage adjust mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0 +// register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RESC +// register. +// +//***************************************************************************** +#define SYSCTL_RESC_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC +// register. +// +//***************************************************************************** +#define SYSCTL_RCC_SYSDIV_MASK 0x07800000 // System clock divider +#define SYSCTL_RCC_USE_SYSDIV 0x00400000 // Use sytem clock divider +#define SYSCTL_RCC_USE_PWMDIV 0x00100000 // Use PWM clock divider +#define SYSCTL_RCC_PWMDIV_MASK 0x000E0000 // PWM clock divider +#define SYSCTL_RCC_OE 0x00001000 // PLL output enable +#define SYSCTL_RCC_XTAL_3_68MHz 0x00000140 // Using a 3.6864 MHz crystal +#define SYSCTL_RCC_XTAL_4MHz 0x00000180 // Using a 4 MHz crystal +#define SYSCTL_RCC_XTAL_MASK 0x000003C0 // Crystal attached to main osc +#define SYSCTL_RCC_OSCSRC_MASK 0x00000030 // Oscillator input select +#define SYSCTL_RCC_SYSDIV_SHIFT 23 // Shift to the SYSDIV field +#define SYSCTL_RCC_PWMDIV_SHIFT 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_SHIFT 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_SHIFT 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_PLLCFG +// register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_MASK 0x0000C000 // Output divider +#define SYSCTL_PLLCFG_F_MASK 0x00003FE0 // PLL multiplier +#define SYSCTL_PLLCFG_R_MASK 0x0000001F // Input predivider +#define SYSCTL_PLLCFG_F_SHIFT 5 +#define SYSCTL_PLLCFG_R_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_GPIOHSCTL register. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL_PORTA 0x00000001 // Port A High-Speed +#define SYSCTL_GPIOHSCTL_PORTB 0x00000002 // Port B High-Speed +#define SYSCTL_GPIOHSCTL_PORTC 0x00000004 // Port C High-Speed +#define SYSCTL_GPIOHSCTL_PORTD 0x00000008 // Port D High-Speed +#define SYSCTL_GPIOHSCTL_PORTE 0x00000010 // Port E High-Speed +#define SYSCTL_GPIOHSCTL_PORTF 0x00000020 // Port F High-Speed +#define SYSCTL_GPIOHSCTL_PORTG 0x00000040 // Port G High-Speed +#define SYSCTL_GPIOHSCTL_PORTH 0x00000080 // Port H High-Speed + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC2 +// register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USEFRACT 0x40000000 // Use fractional divider +#define SYSCTL_RCC2_SYSDIV2_MSK 0x1F800000 // System clock divider +#define SYSCTL_RCC2_FRACT 0x00400000 // Fractional divide +#define SYSCTL_RCC2_OSCSRC2_MSK 0x00000070 // Oscillator input select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_DSLPCLKCFG register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_MSK 0x1F800000 // Deep sleep system clock override +#define SYSCTL_DSLPCLKCFG_O_MSK 0x00000070 // Deep sleep oscillator override + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_CLR 0x00000001 // Clear clock verification fault + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_ARST 0x00000001 // Allow LDO to reset device + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0, +// SYSCTL_RCGC0, SYSCTL_SCGC0, and SYSCTL_DCGC0 registers. +// +//***************************************************************************** +#define SYSCTL_SET0_CAN2 0x04000000 // CAN 2 module +#define SYSCTL_SET0_CAN1 0x02000000 // CAN 1 module +#define SYSCTL_SET0_CAN0 0x01000000 // CAN 0 module +#define SYSCTL_SET0_PWM 0x00100000 // PWM module +#define SYSCTL_SET0_ADC 0x00010000 // ADC module +#define SYSCTL_SET0_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_SET0_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_SET0_ADCSPD_250K 0x00000100 // 250Ksps ADC +#define SYSCTL_SET0_ADCSPD_500K 0x00000200 // 500Ksps ADC +#define SYSCTL_SET0_ADCSPD_1M 0x00000300 // 1Msps ADC +#define SYSCTL_SET0_HIB 0x00000040 // Hibernation module +#define SYSCTL_SET0_WDOG 0x00000008 // Watchdog module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR1, +// SYSCTL_RCGC1, SYSCTL_SCGC1, and SYSCTL_DCGC1 registers. +// +//***************************************************************************** +#define SYSCTL_SET1_COMP2 0x04000000 // Analog comparator module 2 +#define SYSCTL_SET1_COMP1 0x02000000 // Analog comparator module 1 +#define SYSCTL_SET1_COMP0 0x01000000 // Analog comparator module 0 +#define SYSCTL_SET1_TIMER3 0x00080000 // Timer module 3 +#define SYSCTL_SET1_TIMER2 0x00040000 // Timer module 2 +#define SYSCTL_SET1_TIMER1 0x00020000 // Timer module 1 +#define SYSCTL_SET1_TIMER0 0x00010000 // Timer module 0 +#define SYSCTL_SET1_I2C1 0x00002000 // I2C module 1 +#define SYSCTL_SET1_I2C0 0x00001000 // I2C module 0 +#define SYSCTL_SET1_I2C 0x00001000 // I2C module +#define SYSCTL_SET1_QEI1 0x00000200 // QEI module 1 +#define SYSCTL_SET1_QEI 0x00000100 // QEI module +#define SYSCTL_SET1_QEI0 0x00000100 // QEI module 0 +#define SYSCTL_SET1_SSI1 0x00000020 // SSI module 1 +#define SYSCTL_SET1_SSI0 0x00000010 // SSI module 0 +#define SYSCTL_SET1_SSI 0x00000010 // SSI module +#define SYSCTL_SET1_UART2 0x00000004 // UART module 2 +#define SYSCTL_SET1_UART1 0x00000002 // UART module 1 +#define SYSCTL_SET1_UART0 0x00000001 // UART module 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR2, +// SYSCTL_RCGC2, SYSCTL_SCGC2, and SYSCTL_DCGC2 registers. +// +//***************************************************************************** +#define SYSCTL_SET2_ETH 0x50000000 // ETH module +#define SYSCTL_SET2_GPIOH 0x00000080 // GPIO H module +#define SYSCTL_SET2_GPIOG 0x00000040 // GPIO G module +#define SYSCTL_SET2_GPIOF 0x00000020 // GPIO F module +#define SYSCTL_SET2_GPIOE 0x00000010 // GPIO E module +#define SYSCTL_SET2_GPIOD 0x00000008 // GPIO D module +#define SYSCTL_SET2_GPIOC 0x00000004 // GPIO C module +#define SYSCTL_SET2_GPIOB 0x00000002 // GPIO B module +#define SYSCTL_SET2_GPIOA 0x00000001 // GIPO A module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RIS, +// SYSCTL_IMC, and SYSCTL_IMS registers. +// +//***************************************************************************** +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +#endif + +#endif // __HW_SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_types.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_types.h new file mode 100644 index 00000000..c62428aa --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_types.h @@ -0,0 +1,185 @@ +//***************************************************************************** +// +// hw_types.h - Common types and macros. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TYPES_H__ +#define __HW_TYPES_H__ + +//***************************************************************************** +// +// Define a boolean type, and values for true and false. +// +//***************************************************************************** +typedef unsigned char tBoolean; + +#ifndef true +#define true 1 +#endif + +#ifndef false +#define false 0 +#endif + +//***************************************************************************** +// +// Macros for hardware access, both direct and via the bit-band region. +// +//***************************************************************************** +#define HWREG(x) \ + (*((volatile unsigned long *)(x))) +#define HWREGH(x) \ + (*((volatile unsigned short *)(x))) +#define HWREGB(x) \ + (*((volatile unsigned char *)(x))) +#define HWREGBITW(x, b) \ + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITH(x, b) \ + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITB(x, b) \ + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + +//***************************************************************************** +// +// Helper Macros for determining silicon revisions, etc. +// +// These macros will be used by Driverlib at "run-time" to create necessary +// conditional code blocks that will allow a single version of the Driverlib +// "binary" code to support multiple(all) Stellaris silicon revisions. +// +// It is expected that these macros will be used inside of a standard 'C' +// conditional block of code, e.g. +// +// if(CLASS_IS_SANDSTORM) +// { +// do some Sandstorm-class specific code here. +// } +// +// By default, these macros will be defined as run-time checks of the +// appropriate register(s) to allow creation of run-time conditional code +// blocks for a common DriverLib across the entire Stellaris family. +// +// However, if code-space optimization is required, these macros can be "hard- +// coded" for a specific version of Stellaris silicon. Many compilers will +// then detect the "hard-coded" conditionals, and appropriately optimize the +// code blocks, eliminating any "unreachable" code. This would result in +// a smaller Driverlib, thus producing a smaller final application size, but +// at the cost of limiting the Driverlib binary to a specific Stellaris +// silicon revision. +// +//***************************************************************************** +#ifndef CLASS_IS_SANDSTORM +#define CLASS_IS_SANDSTORM \ + (((HWREG(SYSCTL_DID0) & SYSCTL_DID0_VER_M) == SYSCTL_DID0_VER_0) || \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_SANDSTORM))) +#endif + +#ifndef CLASS_IS_FURY +#define CLASS_IS_FURY \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_FURY)) +#endif + +#ifndef CLASS_IS_DUSTDEVIL +#define CLASS_IS_DUSTDEVIL \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_DUSTDEVIL)) +#endif + +#ifndef CLASS_IS_TEMPEST +#define CLASS_IS_TEMPEST \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TEMPEST)) +#endif + +#ifndef REVISION_IS_A0 +#define REVISION_IS_A0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A1 +#define REVISION_IS_A1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A2 +#define REVISION_IS_A2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_B0 +#define REVISION_IS_B0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_B1 +#define REVISION_IS_B1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C0 +#define REVISION_IS_C0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_C1 +#define REVISION_IS_C1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C2 +#define REVISION_IS_C2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_C3 +#define REVISION_IS_C3 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_3)) +#endif + +//***************************************************************************** +// +// Deprecated silicon class and revision detection macros. +// +//***************************************************************************** +#ifndef DEPRECATED +#define DEVICE_IS_SANDSTORM CLASS_IS_SANDSTORM +#define DEVICE_IS_FURY CLASS_IS_FURY +#define DEVICE_IS_REVA2 REVISION_IS_A2 +#define DEVICE_IS_REVC1 REVISION_IS_C1 +#define DEVICE_IS_REVC2 REVISION_IS_C2 +#endif + +#endif // __HW_TYPES_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_uart.h new file mode 100644 index 00000000..b6613861 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/lib/inc/hw_uart.h @@ -0,0 +1,458 @@ +//***************************************************************************** +// +// hw_uart.h - Macros and defines used when accessing the UART hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UART_H__ +#define __HW_UART_H__ + +//***************************************************************************** +// +// The following are defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_DR 0x00000000 // UART Data +#define UART_O_RSR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_ECR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_FR 0x00000018 // UART Flag +#define UART_O_ILPR 0x00000020 // UART IrDA Low-Power Register +#define UART_O_IBRD 0x00000024 // UART Integer Baud-Rate Divisor +#define UART_O_FBRD 0x00000028 // UART Fractional Baud-Rate + // Divisor +#define UART_O_LCRH 0x0000002C // UART Line Control +#define UART_O_CTL 0x00000030 // UART Control +#define UART_O_IFLS 0x00000034 // UART Interrupt FIFO Level Select +#define UART_O_IM 0x00000038 // UART Interrupt Mask +#define UART_O_RIS 0x0000003C // UART Raw Interrupt Status +#define UART_O_MIS 0x00000040 // UART Masked Interrupt Status +#define UART_O_ICR 0x00000044 // UART Interrupt Clear +#define UART_O_DMACTL 0x00000048 // UART DMA Control +#define UART_O_LCTL 0x00000090 // UART LIN Control +#define UART_O_LSS 0x00000094 // UART LIN Snap Shot +#define UART_O_LTIM 0x00000098 // UART LIN Timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_RI 0x00000100 // Ring Indicator +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy +#define UART_FR_DCD 0x00000004 // Data Carrier Detect +#define UART_FR_DSR 0x00000002 // Data Set Ready +#define UART_FR_CTS 0x00000001 // Clear To Send + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_CTSEN 0x00008000 // Enable Clear To Send +#define UART_CTL_RTSEN 0x00004000 // Enable Request to Send +#define UART_CTL_RTS 0x00000800 // Request to Send +#define UART_CTL_DTR 0x00000400 // Data Terminal Ready +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_LIN 0x00000040 // LIN Mode Enable +#define UART_CTL_HSE 0x00000020 // High-Speed Enable +#define UART_CTL_EOT 0x00000010 // End of Transmission +#define UART_CTL_SMART 0x00000008 // ISO 7816 Smart Card Support +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_LME5IM 0x00008000 // LIN Mode Edge 5 Interrupt Mask +#define UART_IM_LME1IM 0x00004000 // LIN Mode Edge 1 Interrupt Mask +#define UART_IM_LMSBIM 0x00002000 // LIN Mode Sync Break Interrupt + // Mask +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask +#define UART_IM_DSRMIM 0x00000008 // UART Data Set Ready Modem + // Interrupt Mask +#define UART_IM_DCDMIM 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Mask +#define UART_IM_CTSMIM 0x00000002 // UART Clear to Send Modem + // Interrupt Mask +#define UART_IM_RIMIM 0x00000001 // UART Ring Indicator Modem + // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_LME5RIS 0x00008000 // LIN Mode Edge 5 Raw Interrupt + // Status +#define UART_RIS_LME1RIS 0x00004000 // LIN Mode Edge 1 Raw Interrupt + // Status +#define UART_RIS_LMSBRIS 0x00002000 // LIN Mode Sync Break Raw + // Interrupt Status +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status +#define UART_RIS_DSRRIS 0x00000008 // UART Data Set Ready Modem Raw + // Interrupt Status +#define UART_RIS_DCDRIS 0x00000004 // UART Data Carrier Detect Modem + // Raw Interrupt Status +#define UART_RIS_CTSRIS 0x00000002 // UART Clear to Send Modem Raw + // Interrupt Status +#define UART_RIS_RIRIS 0x00000001 // UART Ring Indicator Modem Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_LME5MIS 0x00008000 // LIN Mode Edge 5 Masked Interrupt + // Status +#define UART_MIS_LME1MIS 0x00004000 // LIN Mode Edge 1 Masked Interrupt + // Status +#define UART_MIS_LMSBMIS 0x00002000 // LIN Mode Sync Break Masked + // Interrupt Status +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status +#define UART_MIS_DSRMIS 0x00000008 // UART Data Set Ready Modem Masked + // Interrupt Status +#define UART_MIS_DCDMIS 0x00000004 // UART Data Carrier Detect Modem + // Masked Interrupt Status +#define UART_MIS_CTSMIS 0x00000002 // UART Clear to Send Modem Masked + // Interrupt Status +#define UART_MIS_RIMIS 0x00000001 // UART Ring Indicator Modem Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_LME5MIC 0x00008000 // LIN Mode Edge 5 Interrupt Clear +#define UART_ICR_LME1MIC 0x00004000 // LIN Mode Edge 1 Interrupt Clear +#define UART_ICR_LMSBMIC 0x00002000 // LIN Mode Sync Break Interrupt + // Clear +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear +#define UART_ICR_DSRMIC 0x00000008 // UART Data Set Ready Modem + // Interrupt Clear +#define UART_ICR_DCDMIC 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Clear +#define UART_ICR_CTSMIC 0x00000002 // UART Clear to Send Modem + // Interrupt Clear +#define UART_ICR_RIMIC 0x00000001 // UART Ring Indicator Modem + // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DMACTL register. +// +//***************************************************************************** +#define UART_DMACTL_DMAERR 0x00000004 // DMA on Error +#define UART_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define UART_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCTL register. +// +//***************************************************************************** +#define UART_LCTL_BLEN_M 0x00000030 // Sync Break Length +#define UART_LCTL_BLEN_13T 0x00000000 // Sync break length is 13T bits + // (default) +#define UART_LCTL_BLEN_14T 0x00000010 // Sync break length is 14T bits +#define UART_LCTL_BLEN_15T 0x00000020 // Sync break length is 15T bits +#define UART_LCTL_BLEN_16T 0x00000030 // Sync break length is 16T bits +#define UART_LCTL_MASTER 0x00000001 // LIN Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LSS register. +// +//***************************************************************************** +#define UART_LSS_TSS_M 0x0000FFFF // Timer Snap Shot +#define UART_LSS_TSS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LTIM register. +// +//***************************************************************************** +#define UART_LTIM_TIMER_M 0x0000FFFF // Timer Value +#define UART_LTIM_TIMER_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_LCR_H 0x0000002C // Line Control Register, HIGH byte +#define UART_O_PeriphID4 0x00000FD0 +#define UART_O_PeriphID5 0x00000FD4 +#define UART_O_PeriphID6 0x00000FD8 +#define UART_O_PeriphID7 0x00000FDC +#define UART_O_PeriphID0 0x00000FE0 +#define UART_O_PeriphID1 0x00000FE4 +#define UART_O_PeriphID2 0x00000FE8 +#define UART_O_PeriphID3 0x00000FEC +#define UART_O_PCellID0 0x00000FF0 +#define UART_O_PCellID1 0x00000FF4 +#define UART_O_PCellID2 0x00000FF8 +#define UART_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_DR +// register. +// +//***************************************************************************** +#define UART_DR_DATA_MASK 0x000000FF // UART data + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IBRD +// register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_MASK 0x0000FFFF // Integer baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_FBRD +// register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_MASK 0x0000003F // Fractional baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_LCR_H +// register. +// +//***************************************************************************** +#define UART_LCR_H_SPS 0x00000080 // Stick Parity Select +#define UART_LCR_H_WLEN 0x00000060 // Word length +#define UART_LCR_H_WLEN_5 0x00000000 // 5 bit data +#define UART_LCR_H_WLEN_6 0x00000020 // 6 bit data +#define UART_LCR_H_WLEN_7 0x00000040 // 7 bit data +#define UART_LCR_H_WLEN_8 0x00000060 // 8 bit data +#define UART_LCR_H_FEN 0x00000010 // Enable FIFO +#define UART_LCR_H_STP2 0x00000008 // Two Stop Bits Select +#define UART_LCR_H_EPS 0x00000004 // Even Parity Select +#define UART_LCR_H_PEN 0x00000002 // Parity Enable +#define UART_LCR_H_BRK 0x00000001 // Send Break + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IFLS +// register. +// +//***************************************************************************** +#define UART_IFLS_RX_MASK 0x00000038 // RX FIFO level mask +#define UART_IFLS_TX_MASK 0x00000007 // TX FIFO level mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_ICR +// register. +// +//***************************************************************************** +#define UART_RSR_ANY (UART_RSR_OE | UART_RSR_BE | UART_RSR_PE | \ + UART_RSR_FE) + +//***************************************************************************** +// +// The following are deprecated defines for the Reset Values for UART +// Registers. +// +//***************************************************************************** +#define UART_RV_CTL 0x00000300 +#define UART_RV_PCellID1 0x000000F0 +#define UART_RV_PCellID3 0x000000B1 +#define UART_RV_FR 0x00000090 +#define UART_RV_PeriphID2 0x00000018 +#define UART_RV_IFLS 0x00000012 +#define UART_RV_PeriphID0 0x00000011 +#define UART_RV_PCellID0 0x0000000D +#define UART_RV_PCellID2 0x00000005 +#define UART_RV_PeriphID3 0x00000001 +#define UART_RV_PeriphID4 0x00000000 +#define UART_RV_LCR_H 0x00000000 +#define UART_RV_PeriphID6 0x00000000 +#define UART_RV_DR 0x00000000 +#define UART_RV_RSR 0x00000000 +#define UART_RV_ECR 0x00000000 +#define UART_RV_PeriphID5 0x00000000 +#define UART_RV_RIS 0x00000000 +#define UART_RV_FBRD 0x00000000 +#define UART_RV_IM 0x00000000 +#define UART_RV_MIS 0x00000000 +#define UART_RV_ICR 0x00000000 +#define UART_RV_PeriphID1 0x00000000 +#define UART_RV_PeriphID7 0x00000000 +#define UART_RV_IBRD 0x00000000 + +#endif + +#endif // __HW_UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/main.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/main.c new file mode 100644 index 00000000..0224e2f0 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Boot/main.c @@ -0,0 +1,104 @@ +/**************************************************************************************** +| Description: bootloader application source file +| File Name: main.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "boot.h" /* bootloader generic header */ +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/sysctl.h" +#include "driverlib/gpio.h" + + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static void Init(void); + + +/**************************************************************************************** +** NAME: main +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: This is the entry point for the bootloader application and is called +** by the reset interrupt vector after the C-startup routines executed. +** +****************************************************************************************/ +void main(void) +{ + /* initialize the microcontroller */ + Init(); + /* initialize the bootloader */ + BootInit(); + + /* start the infinite program loop */ + while (1) + { + /* run the bootloader task */ + BootTask(); + } +} /*** end of main ***/ + + +/**************************************************************************************** +** NAME: Init +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the microcontroller. The interrupts are disabled, the +** clocks are configured and the flash wait states are configured. +** +****************************************************************************************/ +static void Init(void) +{ + /* set the clocking to run at 50MHz from the PLL */ + SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); +#if (BOOT_COM_UART_ENABLE > 0) + #if (BOOT_COM_UART_CHANNEL_INDEX == 0) + /* enable the and configure UART0 related peripherals and pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); + GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); + #endif +#endif +#if (BOOT_COM_CAN_ENABLE > 0) + #if (BOOT_COM_CAN_CHANNEL_INDEX == 0) + /* configure the CAN pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); + GPIOPinTypeCAN(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1); + #endif +#endif +} /*** end of Init ***/ + + +/*********************************** end of main.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.out b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.out new file mode 100644 index 00000000..a0d0c203 Binary files /dev/null and b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.out differ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.srec b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.srec new file mode 100644 index 00000000..07fc6e30 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/bin/demoprog_ek_lm3s8962.srec @@ -0,0 +1,276 @@ +S01C000064656D6F70726F675F656B5F6C6D3373383936322E73726563C5 +S113200058040020F5300000D3300000D330000025 +S1132010D3300000D3300000D3300000D3300000B0 +S1132020D3300000D3300000D3300000D3300000A0 +S1132030D3300000D3300000D3300000B3280000B8 +S1132040D3300000D3300000D3300000D330000080 +S1132050D3300000D3300000D3300000D330000070 +S1132060D3300000D3300000D3300000D330000060 +S1132070D3300000D3300000D3300000D330000050 +S1132080D3300000D3300000D3300000D330000040 +S1132090D3300000D3300000D3300000D330000030 +S11320A0D3300000D3300000D3300000D330000020 +S11320B0D3300000D3300000D3300000D330000010 +S11320C0D3300000D3300000D3300000D330000000 +S11320D0D3300000D3300000D3300000D3300000F0 +S11320E0D3300000D3300000D3300000D3300000E0 +S10720F0EE11AA55EA +S11320F4DFF80015884200F0A980DFF8FC14884258 +S113210400F0A480DFF8F414884200F09F80DFF824 +S1132114F014884200F09A80DFF8E814884200F052 +S11321249580DFF8E414884200F09080DFF8DC1432 +S1132134884200F08B80DFF8D814884200F086804F +S1132144DFF8D014884200F08180DFF8CC14884290 +S11321547CD0DFF8C814884278D0DFF8C4148842ED +S113216474D0DFF8C014884270D0DFF8BC148842FD +S11321746CD0DFF8B814884268D0DFF8B41488420D +S113218464D0DFF8B014884260D0DFF8AC1488421D +S11321945CD0DFF8A814884258D0402856D0B0F157 +S11321A4102F53D0DFF8981488424FD0DFF89414DA +S11321B488424BD0DFF89014884247D0DFF88C145F +S11321C4884243D0DFF8881488423FD0B0F1101F0E +S11321D43CD0DFF88014884238D0DFF87C1488427D +S11321E434D0DFF87814884230D0DFF8741488428D +S11321F42CD0DFF87014884228D0DFF86C1488429D +S113220424D0DFF86814884220D0DFF864148842AC +S11322141CD0DFF86014884218D0DFF85C148842BC +S113222414D0DFF85814884210D0DFF854148842CC +S11322340CD0B0F1202F09D0DFF84814884205D01F +S1132244082803D0DFF84414884201D1012000E0B7 +S11322540020C0B2704710B504002000FFF748FF07 +S1132264002805D14FF4FC71DFF81C0400F055FA82 +S1132274200FDFF81C1451F820000068A1B2220CCE +S113228412F01F0291400843210FDFF8042452F88E +S11322942110086010BD00000138FDD1704770475B +S11322A470B50400DFF8F803006810F0E04F08D0BC +S11322B4DFF8EC030068DFF8EC130840B0F1805F4A +S11322C402D1002C00F19A80DFF8C8030568DFF816 +S11322D4D803066855F4006535F4800556F40066A1 +S11322E4DFF8B0030560DFF8C00306602800800748 +S11322F402D52000800707D515F0010014F0010170 +S113230491F0010108421ED074F003000540DFF887 +S113231484030560002E07D516F07000302809D018 +S113232416F07000702805D0002E08D415F0300083 +S1132334302804D14FF48050FFF7AEFF03E05FF47C +S11323440020FFF7A9FFDFF86403054043F2F070AF +S113235420400543DFF858030640DFF858032040C3 +S1132364064314F0080056EAC006DFF82C034021A3 +S11323740160002E06D5DFF830030660DFF814038D +S1132384056005E0DFF80C030560DFF81C03066054 +S11323941020FFF781FFDFF820030540DFF81C035A +S11323A42040054336F0FC5614F0FC50064360000C +S11323B408D555F4800536F48006DFF8040320407C +S11323C4064301E036F0804620050ED44FF4004065 +S11323D400E0401E002804D0DFF8C0120968490652 +S11323E4F7D535F4006536F40066DFF8A802056015 +S11323F4DFF8B40206601020FFF74EFF70BD30B45E +S1132404DFF890020168DFF8A0020268002A02D50E +S113241412F0700001E011F0300000280DD01028F3 +S11324243AD020286FD0302800F0A480602800F02F +S1132434A480702800F0A480A5E0C1F38410DFF820 +S1132444843253F82000DFF88032134013F1004F34 +S113245405D0002A00F1AA800B0500F1A780DFF85B +S11324646C321B68DFF83842246814F0E04F09D05A +S1132474DFF82C422468DFF82C522C40B4F1805F3E +S113248440F08380C3F34814A41C604313F01F0476 +S1132494A41CB0FBF4F081E0DFF80402006810F03F +S11324A4E04F08D0DFF8F8010068DFF8F83118408D +S11324B4B0F1805F02D1DFF8180223E0DFF8E00115 +S11324C40068DFF8E0311840DFF80832984205D19B +S11324D4DFF8CC01006880B202280ED0DFF8C00116 +S11324E40068DFF8C0311840DFF8EC31984207D1B6 +S11324F4DFF8AC010068000402D1DFF8E00101E078 +S1132504DFF8DC019FE7DFF89801006810F0E04F82 +S113251408D0DFF88C010068DFF888311840B0F186 +S1132524805F02D1DFF8BC0123E0DFF874010068A6 +S1132534DFF870311840DFF89C31984205D1DFF898 +S11325446001006880B202280ED0DFF854010068EC +S1132554DFF850311840DFF88031984207D1DFF8B2 +S113256440010068000402D1DFF87C0101E0DFF8D7 +S11325747C0168E747F2305065E75FF4800062E766 +S11325844FF400405FE7002032E0C3F34814604393 +S113259413F01F04641C6400B0FBF4F05C0400D565 +S11325A440081B0400D5800851F480014B021FD558 +S11325B4002A18D5530010D5DFF80C31134013F159 +S11325C4004F03D0002A08D4090506D44000C2F3FE +S11325D48651491CB0FBF1F00AE0C2F3C551491C11 +S11325E4B0FBF1F004E0C1F3C351491CB0FBF1F0BA +S11325F430BC7047010010000200100000011000FC +S11326040002100000041000000110100002101059 +S1132614000410100040101000501020010000208D +S11326240200002004000020080000201000002004 +S11326342000002040000020800000200001002031 +S11326440040001000101010000110208000003021 +S113265410000030000100100002001010000010EF +S1132664200000102000003001001010020010109F +S113267404001010080010100100001002000010E3 +S11326840400001001001020F02E000000101000BF +S11326940831000060E00F4058E00F4050E00F4064 +S11326A400E00F400000FF7070E00F400FC8FFFF10 +S11326B48FDFFF7F30200080FCFF3FF80300C0075A +S11326C4000040401C3000000008008064E00F401B +S11326D4C0E1E4000000011000000310001BB70077 +S11326E40024F40070383900C0C62D0000093D00F0 +S11326F480B500F007F800F021F800F08FF800F03E +S113270433F8FAE780B50748FFF7CAFD00F078F814 +S113271400F0B0F800F0D4F801BD034A1060034897 +S11327240160FEE78003C001480000204C00002043 +S113273480B500F0B0F8F120804701BD80B52A4887 +S1132744FFF789FD2948FFF786FD03215FF0402048 +S113275400F02EFAFFF753FE60234FF461420100A8 +S1132764234800F076FA01BD80B522480078002899 +S11327740BD1214800F02BF8012827D11D48012151 +S113278401701E480021017020E01C4800781A4999 +S11327944018401C00F01BF8012817D11748007892 +S11327A4401C164908701548007813490978884272 +S11327B40CD11048002101700F484078FF2805D13E +S11327C40D488078002801D1FFF7B2FF01BD10B590 +S11327D40400074800F0E5FA10F1010F02D020705C +S11327E4012000E0002010BD0100001001000020C1 +S11327F400C00040550000200000002054000020C8 +S113280480B51848FFF727FD0121174800F0B5F9F2 +S113281400220121144800F09CF901BD10B500F018 +S113282443F8040011480068201A4FF4FA718842EE +S113283416D30F480078002808D10D4801210170EF +S113284401220121084800F084F907E00848002126 +S1132854017000220121044800F07BF9034804605C +S113286410BD00002000002000500240440000205D +S11328745600002080B5FFF7C2FD4FF47A71B0FB17 +S1132884F1F000F0D1FA00F0B3FA00F0BFFA00203E +S113289400F007F801BD80B500F0BFFA00F0AFFA0C +S11328A401BD06490860704704480068704703483E +S11328B40068401C01490860704700005000002073 +S11328C480B500F0C7FA01BDB0F1402F43D0DFF862 +S11328D4181388423FD0DFF8141388423BD0DFF842 +S11328E41013884237D0DFF80C13884233D0DFF852 +S11328F4081388422FD0DFF8041388422BD0DFF862 +S11329040013884227D0DFF8FC12884223D0DFF872 +S1132914F81288421FD0DFF8F41288421BD0DFF883 +S1132924F012884217D0DFF8EC12884213D0DFF893 +S1132934E81288420FD0DFF8E41288420BD0DFF8A3 +S1132944E012884207D0DFF8DC12884203D0DFF8B3 +S1132954D812884201D1012000E00020C0B270479F +S113296470B504000D0016002000FFF7ADFF002829 +S113297404D1E421DFF8B402FFF7CFFE002E08D01F +S1132984012E06D0022E04D0E621DFF8A002FFF7C0 +S1132994C4FE3000C00705D514F580600068EDB2AC +S11329A4284304E014F580600068EDB2A84314F5EC +S11329B480610860B00705D514F584600068EDB241 +S11329C4284304E014F584600068EDB2A84314F5C8 +S11329D48461086070BDF8B504000D0017001E0082 +S11329E42000FFF771FF002805D14FF4DD71DFF8F3 +S11329F43C02FFF792FE012F0BD0022F09D0042FC3 +S1132A0407D00C2F05D04FF4DF71DFF82002FFF755 +S1132A1484FE082E11D00A2E0FD00C2E0DD0092EB0 +S1132A240BD00B2E09D00D2E07D0002E05D040F26A +S1132A34C511DFF8F801FFF770FE3800C00705D5AB +S1132A4414F5A0600068EDB2284304E014F5A06016 +S1132A540068EDB2A84314F5A0610860380080074B +S1132A6404D5D4F80405EDB2284303E0D4F80405EE +S1132A74EDB2A843C4F804053800400705D514F59D +S1132A84A1600068EDB2284304E014F5A160006875 +S1132A94EDB2A84314F5A1610860380705D514F50F +S1132AA4A3600068EDB2284304E014F5A360006851 +S1132AB4EDB2A84314F5A36108603000C00704D53F +S1132AC4D4F80C05EDB2284303E0D4F80C05EDB2B8 +S1132AD4A843C4F80C053000800705D514F5A2609A +S1132AE40068EDB2284304E014F5A2600068EDB276 +S1132AF4A84314F5A26108603000400704D5D4F853 +S1132B041405EDB2284303E0D4F81405EDB2A84348 +S1132B14C4F814053000000704D5D4F81C05EDB23C +S1132B24284303E0D4F81C05EDB2A843C4F81C05FB +S1132B34002E05D114F5A5600068EDB2284304E025 +S1132B4414F5A5600068EDB2A84314F5A561086006 +S1132B54F1BD70B504000D0016002000FFF7B4FEAB +S1132B64002805D14FF45171DFF8C000FFF7D5FDFB +S1132B74EDB2F6B244F8256070BD38B504000D001A +S1132B842000FFF7A1FE002804D140F204412748A5 +S1132B94FFF7C3FD01222900C9B22000FFF7E0FEBC +S1132BA4082301222900C9B22000FFF714FF31BD14 +S1132BB438B504000D002000FFF786FE002804D178 +S1132BC440F21F511948FFF7A8FD02222900C9B297 +S1132BD42000FFF7C5FE082301222900C9B2200002 +S1132BE4FFF7F9FE31BD00000080054000500040AD +S1132BF4009005400060004000A0054000700040C3 +S1132C0400B005400040024000C0054000500240AE +S1132C1400D005400060024000E00540007002401E +S1132C2400F0054000D00340000006408C2E000054 +S1132C34DFF89811884207D0DFF89411884203D052 +S1132C44DFF89011884201D1012000E00020C0B2D5 +S1132C547047F8B504000E0017001D002000FFF7AC +S1132C64E7FF002805D140F20D11DFF86C01FFF7EE +S1132C7454FD002F05D14FF48771DFF85C01FFF791 +S1132C844CFDDFF85801006810F0E04F27D0DFF85E +S1132C944C010068DFF848110840B0F1805F1ED091 +S1132CA4DFF838010068DFF838110840DFF8341120 +S1132CB4884205D1DFF82401006880B202280ED0CE +S1132CC4DFF818010068DFF818110840DFF818115C +S1132CD4884206D1DFF804010068000401D1102001 +S1132CE400E0082000FB07F0864205D240F20F11F1 +S1132CF4DFF8E400FFF711FD200000F038F8B6EB2C +S1132D04071F05D2206B50F0200020637F0803E0E6 +S1132D14206B30F020002063F000B0FBF7F0401C7F +S1132D244008810961624021B0FBF1F202FB110207 +S1132D34A262E5620020A061200000F001F8F1BD68 +S1132D4410B504002000FFF773FF002805D14FF4E9 +S1132D54CF71DFF88400FFF7E0FCE06A50F0100064 +S1132D64E062206B40F201310843206310BD10B5CA +S1132D7404002000FFF75CFF002805D14FF4DF7145 +S1132D84DFF85400FFF7C9FCA0690007FCD4E06A2B +S1132D9430F01000E062206BDFF85010084020632C +S1132DA410BD10B504002000FFF742FF002804D131 +S1132DB440F209410848FFF7B0FCA069C00601D4F9 +S1132DC4206801E05FF0FF3010BD000000C0004047 +S1132DD400D0004000E00040B82F000000E00F40A5 +S1132DE40000FF700000011000000310FEFCFFFF50 +S1132DF41548006850F005001349086070471248EC +S1132E040068400840001049086070470E48006894 +S1132E1450F002000C49086070470B48006830F019 +S1132E24020009490860704710B50400002C02D060 +S1132E34B4F1807F03D9D0210448FFF76EFC601EEF +S1132E440349086010BD000010E000E0542F0000A6 +S1132E5414E000E080B500F013F8C0B202BD50F8ED +S1132E64041B61B150F8042BD30744BFA9F1010337 +S1132E749A18002342F8043B091FFAD1EFE770477C +S1132E84EFF3108062B67047443A5C7573725C6603 +S1132E9465617365725C736F6674776172655C4FA8 +S1132EA470656E424C545C5461726765745C44652D +S1132EB46D6F5C41524D434D335F4C4D33535F450D +S1132EC44B5F4C4D3353383936325F4941525C5071 +S1132ED4726F675C6C69625C6472697665726C6952 +S1132EE4625C6770696F2E6300000000443A5C758D +S1132EF473725C6665617365725C736F6674776123 +S1132F0472655C4F70656E424C545C5461726765C3 +S1132F14745C44656D6F5C41524D434D335F4C4D5D +S1132F2433535F454B5F4C4D3353383936325F4925 +S1132F3441525C50726F675C6C69625C647269765E +S1132F4465726C69625C73797363746C2E630000DC +S1132F54443A5C7573725C6665617365725C736F25 +S1132F646674776172655C4F70656E424C545C5450 +S1132F7461726765745C44656D6F5C41524D434D89 +S1132F84335F4C4D33535F454B5F4C4D33533839AA +S1132F9436325F4941525C50726F675C6C69625CA3 +S1132FA46472697665726C69625C7379737469635B +S1132FB46B2E6300443A5C7573725C666561736579 +S1132FC4725C736F6674776172655C4F70656E4290 +S1132FD44C545C5461726765745C44656D6F5C4108 +S1132FE4524D434D335F4C4D33535F454B5F4C4D12 +S1132FF43353383936325F4941525C50726F675CDF +S11330046C69625C6472697665726C69625C756130 +S113301472742E630000000040420F0000201C0064 +S113302480841E0000802500999E360000403800EC +S113303400093D0000803E0000004B00404B4C0062 +S113304400204E00808D5B0000C05D000080700095 +S113305400127A0000007D0080969800001BB700DF +S11330640080BB00C0E8CE00647ADA000024F400D7 +S11330740000FA0010B5084979441C31074C7C441B +S11330841A34A14206D0081D0A685118884701461B +S1133094A142F8D110BD00BF0800000014000000D4 +S11330A4BFFDFFFF580000000000002000000000E6 +S11330B400F009F8002801D0FFF7DCFF0020FFF737 +S11330C417FB00F002F80120704700F001B8FEE796 +S11330D40746384600F002F8FBE7000080B5C04616 +S11330E4C046024A11001820ABBEFBE726000200CA +S11330F4034B9D46C046C046C046C046FFF7D8FFB2 +S11331045804002000E10F4004E10F4008E10F409F +S90330F5D7 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.c new file mode 100644 index 00000000..7729898f --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.c @@ -0,0 +1,315 @@ +/**************************************************************************************** +| Description: demo program bootloader interface source file +| File Name: boot.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +** NAME: BootActivate +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Bootloader activation function. +** +****************************************************************************************/ +static void BootActivate(void) +{ + void (*pEntryFromProgFnc)(void); + + /* stop the timer from generating interrupts */ + TimeDeinit(); + /* set pointer to the address of function EntryFromProg in the bootloader. note that + * 1 is added to this address to enable a switch from Thumb2 to Thumb mode + */ + pEntryFromProgFnc = (void(*)(void))(0x000000F0 + 1); + /* call EntryFromProg to activate the bootloader. */ + pEntryFromProgFnc(); +} /*** end of BootActivate ***/ + + +#if (BOOT_COM_UART_ENABLE > 0) +/**************************************************************************************** +* U N I V E R S A L A S Y N C H R O N O U S R X T X I N T E R F A C E +****************************************************************************************/ + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static unsigned char UartReceiveByte(unsigned char *data); + + +/**************************************************************************************** +** NAME: BootComInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the UART communication interface +** +****************************************************************************************/ +void BootComInit(void) +{ + /* enable the UART0 peripheral */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); + /* enable the and configure UART0 related peripherals and pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); + GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); + /* configure the UART0 baudrate and communication parameters */ + UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), BOOT_COM_UART_BAUDRATE, + (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | + UART_CONFIG_PAR_NONE)); +} /*** end of BootComInit ***/ + + +/**************************************************************************************** +** NAME: BootComCheckActivationRequest +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Receives the CONNECT request from the host, which indicates that the +** bootloader should be activated and, if so, activates it. +** +****************************************************************************************/ +void BootComCheckActivationRequest(void) +{ + static unsigned char xcpCtoReqPacket[BOOT_COM_UART_RX_MAX_DATA+1]; + static unsigned char xcpCtoRxLength; + static unsigned char xcpCtoRxInProgress = 0; + + /* start of cto packet received? */ + if (xcpCtoRxInProgress == 0) + { + /* store the message length when received */ + if (UartReceiveByte(&xcpCtoReqPacket[0]) == 1) + { + /* indicate that a cto packet is being received */ + xcpCtoRxInProgress = 1; + + /* reset packet data count */ + xcpCtoRxLength = 0; + } + } + else + { + /* store the next packet byte */ + if (UartReceiveByte(&xcpCtoReqPacket[xcpCtoRxLength+1]) == 1) + { + /* increment the packet data count */ + xcpCtoRxLength++; + + /* check to see if the entire packet was received */ + if (xcpCtoRxLength == xcpCtoReqPacket[0]) + { + /* done with cto packet reception */ + xcpCtoRxInProgress = 0; + + /* check if this was an XCP CONNECT command */ + if ((xcpCtoReqPacket[1] == 0xff) && (xcpCtoReqPacket[2] == 0x00)) + { + /* connection request received so start the bootloader */ + BootActivate(); + } + } + } + } +} /*** end of BootComCheckActivationRequest ***/ + + +/**************************************************************************************** +** NAME: UartReceiveByte +** PARAMETER: data pointer to byte where the data is to be stored. +** RETURN VALUE: 1 if a byte was received, 0 otherwise. +** DESCRIPTION: Receives a communication interface byte if one is present. +** +****************************************************************************************/ +static unsigned char UartReceiveByte(unsigned char *data) +{ + signed long result; + + /* try to read a newly received byte */ + result = UARTCharGetNonBlocking(UART0_BASE); + /* check if a new byte was received */ + if(result != -1) + { + /* store the received byte */ + *data = (unsigned char)result; + /* inform caller of the newly received byte */ + return 1; + } + /* inform caller that no new data was received */ + return 0; +} /*** end of UartReceiveByte ***/ +#endif /* BOOT_COM_UART_ENABLE > 0 */ + + +#if (BOOT_COM_CAN_ENABLE > 0) +/**************************************************************************************** +* C O N T R O L L E R A R E A N E T W O R K I N T E R F A C E +****************************************************************************************/ + +/**************************************************************************************** +* Macro definitions +****************************************************************************************/ +/* index of the used reception message objects */ +#define CAN_RX_MSGOBJECT_IDX (0) + + +/**************************************************************************************** +* Local constant declarations +****************************************************************************************/ +/* lookup table to quickly and efficiently convert a bit number to a bit mask */ +static const unsigned short canBitNum2Mask[] = +{ + 0x0001, /* bit 0 */ +}; + + +/**************************************************************************************** +** NAME: CanSetBittiming +** PARAMETER: none +** RETURN VALUE: 1 if a valid bittiming configuration was found and set. 0 otherwise. +** DESCRIPTION: Attempts to match the bittiming parameters to the requested baudrate +** for a sample point between 65 and 75%, through a linear search +** algorithm. It is based on the equation: +** baudrate = CAN Clock Freq/((1+PropSeg+Phase1Seg+Phase2Seg)*Prescaler) +** +****************************************************************************************/ +static unsigned char CanSetBittiming(void) +{ + tCANBitClkParms bitClkParms; + unsigned char samplepoint; + + /* init SJW to maximum value */ + bitClkParms.uSJW = 4; + + /* use a double loop to iterate through all possible settings of uSyncPropPhase1Seg + * and uPhase2Seg. + */ + for (bitClkParms.uSyncPropPhase1Seg = 16; bitClkParms.uSyncPropPhase1Seg >= 1; bitClkParms.uSyncPropPhase1Seg--) + { + for (bitClkParms.uPhase2Seg = 8; bitClkParms.uPhase2Seg >= 1; bitClkParms.uPhase2Seg--) + { + samplepoint = ((1+bitClkParms.uSyncPropPhase1Seg) * 100) / (1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg); + /* check that sample points is within the preferred range */ + if ( (samplepoint >= 65) && (samplepoint <= 75) ) + { + /* does a prescaler exist to get the exact baudrate with these bittiming + * settings? + */ + if ((((BOOT_CPU_XTAL_SPEED_KHZ*1000)/BOOT_COM_CAN_BAUDRATE) % (1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg)) == 0) + { + /* bittiming configuration found. now update SJW to that it is never greater + * than one of the phase segments. Giving the fact that the sample point is + * rather high, only phase seg 2 need to be considered for this. + */ + if (bitClkParms.uPhase2Seg < 4) + { + bitClkParms.uSJW = bitClkParms.uPhase2Seg; + } + /* calculate the actual prescaler value */ + bitClkParms.uQuantumPrescaler = ((BOOT_CPU_XTAL_SPEED_KHZ*1000)/BOOT_COM_CAN_BAUDRATE)/(1+bitClkParms.uSyncPropPhase1Seg+bitClkParms.uPhase2Seg); + /* apply this bittiming configuration */ + CANSetBitTiming(CAN0_BASE, &bitClkParms); + /* break loop and return from function */ + return 1; + } + } + } + } + /* no valid bittiming configuration found */ + return 0; +} /*** end of CanSetBittiming ***/ + + +/**************************************************************************************** +** NAME: BootComInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the CAN communication interface +** +****************************************************************************************/ +void BootComInit(void) +{ + tCANMsgObject rxMsgObject; + + /* configure the CAN pins */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); + GPIOPinTypeCAN(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1); + /* enable the CAN controller */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0); + /* reset the state of the CAN controller, including the message objects */ + CANInit(CAN0_BASE); + /* set the bittiming */ + CanSetBittiming(); + /* take the CAN controller out of the initialization state */ + CANEnable(CAN0_BASE); + /* setup message object 1 to receive the BOOT_COM_CAN_RX_MSG_ID message*/ + rxMsgObject.ulMsgID = BOOT_COM_CAN_RX_MSG_ID; + rxMsgObject.ulMsgIDMask = 0x7ff; + rxMsgObject.ulFlags = MSG_OBJ_USE_ID_FILTER; + rxMsgObject.ulMsgLen = 8; + CANMessageSet(CAN0_BASE, CAN_RX_MSGOBJECT_IDX+1, &rxMsgObject, MSG_OBJ_TYPE_RX); +} /*** end of BootComInit ***/ + + +/**************************************************************************************** +** NAME: BootComCheckActivationRequest +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Receives the CONNECT request from the host, which indicates that the +** bootloader should be activated and, if so, activates it. +** +****************************************************************************************/ +void BootComCheckActivationRequest(void) +{ + unsigned long status; + tCANMsgObject msgObject; + unsigned char msgData[8]; + + /* get bitmask of message objects with new data */ + status = CANStatusGet(CAN0_BASE, CAN_STS_NEWDAT); + /* check if the BOOT_COM_CAN_RX_MSG_ID message was received */ + if ((status & canBitNum2Mask[CAN_RX_MSGOBJECT_IDX]) != 0) + { + /* read the message data */ + msgObject.pucMsgData = msgData; + CANMessageGet(CAN0_BASE, CAN_RX_MSGOBJECT_IDX+1, &msgObject, true); + /* check if this was an XCP CONNECT command */ + if ((msgData[0] == 0xff) && (msgData[1] == 0x00)) + { + /* connection request received so start the bootloader */ + BootActivate(); + } + } +} /*** end of BootComCheckActivationRequest ***/ +#endif /* BOOT_COM_CAN_ENABLE > 0 */ + + +/*********************************** end of boot.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.h new file mode 100644 index 00000000..6da3f21c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/boot.h @@ -0,0 +1,42 @@ +/**************************************************************************************** +| Description: demo program bootloader interface header file +| File Name: boot.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef BOOT_H +#define BOOT_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void BootComInit(void); +void BootComCheckActivationRequest(void); + + +#endif /* BOOT_H */ +/*********************************** end of boot.h *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/cstart.s b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/cstart.s new file mode 100644 index 00000000..162faf51 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/cstart.s @@ -0,0 +1,69 @@ +/**************************************************************************************** +| Description: Demo program C startup source file +| File Name: cstart.s +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + + + MODULE ?cstartup + + ; Forward declaration of section. + SECTION CSTACK:DATA:NOROOT(3) + + PUBLIC __iar_program_start + EXTERN __cmain + EXTERN __vector_table + EXTWEAK __iar_init_core + EXTWEAK __iar_init_vfp + + +/**************************************************************************************** +** NAME: __iar_program_start +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Reset interrupt service routine. Configures the stack, initializes RAM +** and jumps to function main. +** +****************************************************************************************/ + SECTION .text:CODE:REORDER(2) + THUMB +__iar_program_start: + ; Initialize the stack pointer + LDR R3, =sfe(CSTACK) + MOV SP, R3 + + BL __iar_init_core + BL __iar_init_vfp + + BL __cmain + + REQUIRE __vector_table + + + END +/*********************************** end of cstart.s ***********************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/header.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/header.h new file mode 100644 index 00000000..77ccf204 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/header.h @@ -0,0 +1,57 @@ +/**************************************************************************************** +| Description: generic header file +| File Name: header.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef HEADER_H +#define HEADER_H + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "../Boot/config.h" /* bootloader configuration */ +#include "boot.h" /* bootloader interface driver */ +#include "irq.h" /* IRQ driver */ +#include "led.h" /* LED driver */ +#include "time.h" /* Timer driver */ +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/sysctl.h" +#include "driverlib/gpio.h" +#include "driverlib/uart.h" +#include "driverlib/can.h" +#include "driverlib/interrupt.h" +#include "driverlib/systick.h" + + + +#endif /* HEADER_H */ +/*********************************** end of header.h ***********************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.dep b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.dep new file mode 100644 index 00000000..f713c9ad --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.dep @@ -0,0 +1,1354 @@ + + + + 2 + 3232554719 + + Debug + + $PROJ_DIR$\..\lib\driverlib\comp.c + $PROJ_DIR$\..\lib\driverlib\adc.c + $PROJ_DIR$\..\lib\driverlib\can.c + $PROJ_DIR$\..\lib\driverlib\cpu.c + $PROJ_DIR$\..\lib\driverlib\can.h + $PROJ_DIR$\..\lib\driverlib\comp.h + $PROJ_DIR$\..\lib\driverlib\adc.h + $PROJ_DIR$\..\lib\driverlib\cpu.h + $PROJ_DIR$\..\lib\driverlib\debug.h + $PROJ_DIR$\..\lib\driverlib\epi.c + $PROJ_DIR$\..\lib\driverlib\epi.h + $PROJ_DIR$\..\lib\driverlib\ethernet.c + $PROJ_DIR$\..\lib\driverlib\ethernet.h + $PROJ_DIR$\..\lib\driverlib\flash.c + $PROJ_DIR$\..\lib\driverlib\flash.h + $PROJ_DIR$\..\lib\driverlib\gpio.c + $PROJ_DIR$\..\lib\driverlib\gpio.h + $PROJ_DIR$\..\lib\driverlib\hibernate.c + $PROJ_DIR$\..\lib\driverlib\hibernate.h + $PROJ_DIR$\..\lib\driverlib\i2c.c + $PROJ_DIR$\..\lib\driverlib\i2c.h + $PROJ_DIR$\..\lib\driverlib\i2s.c + $PROJ_DIR$\..\lib\driverlib\i2s.h + $PROJ_DIR$\..\lib\driverlib\interrupt.c + $PROJ_DIR$\..\lib\driverlib\interrupt.h + $PROJ_DIR$\..\lib\driverlib\mpu.c + $PROJ_DIR$\..\lib\driverlib\mpu.h + $PROJ_DIR$\..\lib\driverlib\pwm.c + $PROJ_DIR$\..\lib\driverlib\pwm.h + $PROJ_DIR$\..\lib\driverlib\qei.c + $PROJ_DIR$\..\lib\driverlib\qei.h + $PROJ_DIR$\..\lib\driverlib\ssi.c + $PROJ_DIR$\..\lib\driverlib\ssi.h + $PROJ_DIR$\..\lib\driverlib\sysctl.c + $PROJ_DIR$\..\lib\driverlib\sysctl.h + $PROJ_DIR$\..\lib\driverlib\systick.c + $PROJ_DIR$\..\lib\driverlib\systick.h + $PROJ_DIR$\..\lib\driverlib\timer.c + $PROJ_DIR$\..\lib\driverlib\timer.h + $PROJ_DIR$\..\lib\driverlib\uart.c + $PROJ_DIR$\..\lib\driverlib\uart.h + $PROJ_DIR$\..\lib\driverlib\udma.c + $PROJ_DIR$\..\lib\driverlib\udma.h + $PROJ_DIR$\..\lib\driverlib\usb.c + $PROJ_DIR$\..\lib\driverlib\usb.h + $PROJ_DIR$\..\lib\driverlib\watchdog.c + $PROJ_DIR$\..\lib\driverlib\watchdog.h + $PROJ_DIR$\..\lib\inc\hw_adc.h + $PROJ_DIR$\..\lib\inc\hw_can.h + $PROJ_DIR$\..\lib\inc\hw_comp.h + $PROJ_DIR$\..\lib\inc\hw_epi.h + $PROJ_DIR$\..\lib\inc\hw_ethernet.h + $PROJ_DIR$\..\lib\inc\hw_flash.h + $PROJ_DIR$\..\lib\inc\hw_gpio.h + $PROJ_DIR$\..\lib\inc\hw_hibernate.h + $PROJ_DIR$\..\lib\inc\hw_i2c.h + $PROJ_DIR$\..\lib\inc\hw_i2s.h + $PROJ_DIR$\..\lib\inc\hw_ints.h + $PROJ_DIR$\..\lib\inc\hw_memmap.h + $PROJ_DIR$\..\lib\inc\hw_nvic.h + $PROJ_DIR$\..\lib\inc\hw_pwm.h + $PROJ_DIR$\..\lib\inc\hw_qei.h + $PROJ_DIR$\..\lib\inc\hw_ssi.h + $PROJ_DIR$\..\lib\inc\hw_sysctl.h + $PROJ_DIR$\..\lib\inc\hw_timer.h + $PROJ_DIR$\..\lib\inc\hw_types.h + $PROJ_DIR$\..\lib\inc\hw_uart.h + $PROJ_DIR$\..\lib\inc\hw_udma.h + $PROJ_DIR$\..\lib\inc\hw_usb.h + $PROJ_DIR$\..\lib\inc\hw_watchdog.h + $PROJ_DIR$\..\boot.c + $PROJ_DIR$\..\boot.h + $PROJ_DIR$\..\cstart.s + $PROJ_DIR$\..\header.h + $PROJ_DIR$\..\irq.c + $PROJ_DIR$\..\irq.h + $PROJ_DIR$\..\led.c + $PROJ_DIR$\..\led.h + $PROJ_DIR$\..\main.c + $PROJ_DIR$\..\time.c + $PROJ_DIR$\..\time.h + $PROJ_DIR$\..\vectors.c + $PROJ_DIR$\..\obj\lm3s8962.pbd + $PROJ_DIR$\..\bin\demoprog_ek_lm3s6965.out + $PROJ_DIR$\..\obj\hibernate.lst + $PROJ_DIR$\..\obj\vectors.lst + $PROJ_DIR$\..\obj\led.lst + $PROJ_DIR$\..\obj\vectors.pbi + $PROJ_DIR$\..\obj\boot.lst + $PROJ_DIR$\..\obj\main.pbi + $PROJ_DIR$\..\obj\main.lst + $PROJ_DIR$\..\..\Boot\config.h + $PROJ_DIR$\..\obj\timer.pbi + $PROJ_DIR$\..\obj\timer.lst + $PROJ_DIR$\..\obj\irq.lst + $PROJ_DIR$\..\obj\stm32f10x_exti.o + $PROJ_DIR$\..\obj\stm32f10x_flash.o + $PROJ_DIR$\..\obj\stm32f10x_flash.pbi + $TOOLKIT_DIR$\lib\m7M_tl.a + $PROJ_DIR$\..\obj\stm32f10x_rtc.pbi + $PROJ_DIR$\..\obj\stm32f10x_rcc.pbi + $PROJ_DIR$\..\obj\stm32f10x_wwdg.pbi + $PROJ_DIR$\..\obj\stm32f10x_fsmc.pbi + $PROJ_DIR$\..\obj\stm32f10x_usart.pbi + $PROJ_DIR$\..\obj\stm32f10x_tim.pbi + $PROJ_DIR$\..\obj\stm32f10x_spi.pbi + $PROJ_DIR$\..\obj\stm32f10x_iwdg.pbi + $PROJ_DIR$\..\obj\ethernet.o + $PROJ_DIR$\..\obj\systick.lst + $PROJ_DIR$\..\obj\mpu.lst + $PROJ_DIR$\..\obj\adc.o + $PROJ_DIR$\..\obj\comp.o + $PROJ_DIR$\..\obj\time.lst + $PROJ_DIR$\..\obj\watchdog.lst + $PROJ_DIR$\..\obj\flash.o + $PROJ_DIR$\..\obj\gpio.o + $PROJ_DIR$\..\obj\hibernate.o + $PROJ_DIR$\..\obj\i2c.o + $PROJ_DIR$\..\obj\i2s.o + $PROJ_DIR$\..\obj\interrupt.o + $PROJ_DIR$\..\obj\mpu.o + $PROJ_DIR$\..\obj\pwm.o + $PROJ_DIR$\..\obj\qei.o + $PROJ_DIR$\..\obj\ssi.o + $PROJ_DIR$\..\obj\sysctl.o + $PROJ_DIR$\..\obj\systick.o + $PROJ_DIR$\..\obj\uart.o + $PROJ_DIR$\..\obj\udma.o + $PROJ_DIR$\..\obj\usb.o + $PROJ_DIR$\..\obj\watchdog.o + $PROJ_DIR$\..\obj\adc.pbi + $PROJ_DIR$\..\obj\comp.pbi + $PROJ_DIR$\..\obj\cpu.pbi + $PROJ_DIR$\..\obj\epi.pbi + $PROJ_DIR$\..\obj\ethernet.pbi + $PROJ_DIR$\..\obj\flash.pbi + $PROJ_DIR$\..\obj\gpio.pbi + $PROJ_DIR$\..\obj\hibernate.pbi + $PROJ_DIR$\..\obj\i2c.pbi + $PROJ_DIR$\..\obj\i2s.pbi + $PROJ_DIR$\..\obj\interrupt.pbi + $PROJ_DIR$\..\obj\mpu.pbi + $PROJ_DIR$\..\obj\pwm.pbi + $PROJ_DIR$\..\obj\qei.pbi + $PROJ_DIR$\..\obj\ssi.pbi + $PROJ_DIR$\..\bin\demoprog_ek_lm3s6965.srec + $PROJ_DIR$\..\obj\flash.lst + $PROJ_DIR$\..\obj\i2c.lst + $PROJ_DIR$\..\obj\stm32f10x_i2c.pbi + $PROJ_DIR$\..\obj\stm32f10x_crc.o + $PROJ_DIR$\..\obj\stm32f10x_cec.o + $PROJ_DIR$\..\obj\stm32f10x_can.o + $PROJ_DIR$\..\obj\misc.o + $PROJ_DIR$\..\obj\stm32f10x_bkp.o + $PROJ_DIR$\..\obj\core_cm3.o + $PROJ_DIR$\..\obj\cstart.o + $PROJ_DIR$\..\obj\stm32f10x_fsmc.o + $PROJ_DIR$\..\obj\stm32f10x_adc.pbi + $TOOLKIT_DIR$\lib\dl7M_tln.a + $TOOLKIT_DIR$\lib\rt7M_tl.a + $PROJ_DIR$\..\obj\stm32f10x_dbgmcu.pbi + $PROJ_DIR$\..\obj\stm32f10x_bkp.pbi + $PROJ_DIR$\..\obj\stm32f10x_can.pbi + $PROJ_DIR$\..\obj\stm32f10x_cec.pbi + $PROJ_DIR$\..\obj\stm32f10x_crc.pbi + $PROJ_DIR$\..\obj\stm32f10x_dac.pbi + $PROJ_DIR$\..\obj\stm32f10x_dma.pbi + $PROJ_DIR$\..\obj\stm32f10x_exti.pbi + $PROJ_DIR$\..\obj\uart.lst + $PROJ_DIR$\..\obj\sysctl.lst + $PROJ_DIR$\..\obj\qei.lst + $PROJ_DIR$\..\obj\udma.lst + $PROJ_DIR$\..\obj\usb.lst + $PROJ_DIR$\..\obj\cpu.o + $PROJ_DIR$\..\obj\epi.o + $PROJ_DIR$\..\obj\ssi.lst + $PROJ_DIR$\..\obj\pwm.lst + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\misc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c + $PROJ_DIR$\..\lib\stdperiphlib\CMSIS\CM3\CoreSupport\core_cm3.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c + $PROJ_DIR$\..\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c + $PROJ_DIR$\..\timer.c + $PROJ_DIR$\..\obj\irq.pbi + $PROJ_DIR$\..\obj\led.pbi + $PROJ_DIR$\..\bin\demoprog_ek_lm3s8962.out + $PROJ_DIR$\..\bin\demoprog_ek_lm3s8962.srec + $PROJ_DIR$\..\obj\sysctl.pbi + $PROJ_DIR$\..\obj\systick.pbi + $PROJ_DIR$\..\obj\uart.pbi + $PROJ_DIR$\..\obj\udma.pbi + $PROJ_DIR$\..\obj\usb.pbi + $PROJ_DIR$\..\obj\watchdog.pbi + $PROJ_DIR$\..\memory.x + $PROJ_DIR$\..\obj\stm32f10x_dbgmcu.o + $PROJ_DIR$\..\obj\stm32f10x_dac.o + $PROJ_DIR$\..\obj\stm32f10x_dma.o + $PROJ_DIR$\..\obj\vectors.o + $PROJ_DIR$\..\obj\timer.o + $PROJ_DIR$\..\obj\boot.pbi + $PROJ_DIR$\..\obj\stm32f10x_pwr.pbi + $PROJ_DIR$\..\obj\stm32f10x_sdio.pbi + $PROJ_DIR$\..\obj\stm32f10x_gpio.pbi + $PROJ_DIR$\..\obj\system_stm32f10x.pbi + $PROJ_DIR$\..\obj\stm32f10x_gpio.o + $PROJ_DIR$\..\obj\stm32f10x_i2c.o + $PROJ_DIR$\..\obj\stm32f10x_iwdg.o + $PROJ_DIR$\..\obj\stm32f10x_pwr.o + $PROJ_DIR$\..\obj\stm32f10x_rcc.o + $PROJ_DIR$\..\obj\stm32f10x_rtc.o + $PROJ_DIR$\..\obj\stm32f10x_sdio.o + $PROJ_DIR$\..\obj\stm32f10x_spi.o + $PROJ_DIR$\..\obj\stm32f10x_tim.o + $PROJ_DIR$\..\obj\stm32f10x_usart.o + $PROJ_DIR$\..\obj\stm32f10x_wwdg.o + $PROJ_DIR$\..\obj\system_stm32f10x.o + $PROJ_DIR$\..\obj\core_cm3.pbi + $PROJ_DIR$\..\obj\misc.pbi + $PROJ_DIR$\..\obj\stm32f10x_adc.o + $TOOLKIT_DIR$\lib\shb_l.a + $PROJ_DIR$\..\obj\irq.o + $PROJ_DIR$\..\obj\main.o + $PROJ_DIR$\..\obj\led.o + $PROJ_DIR$\..\obj\boot.o + $PROJ_DIR$\..\bin\demoprog_olimex_stm32p103.out + $PROJ_DIR$\..\bin\demoprog_olimex_stm32p103.srec + $PROJ_DIR$\..\obj\lm3s6965.pbd + $PROJ_DIR$\..\obj\time.o + $PROJ_DIR$\..\obj\time.pbi + $PROJ_DIR$\..\obj\interrupt.lst + $PROJ_DIR$\..\obj\i2s.lst + $PROJ_DIR$\..\obj\cpu.lst + $PROJ_DIR$\..\obj\comp.lst + $PROJ_DIR$\..\obj\adc.lst + $PROJ_DIR$\..\obj\epi.lst + $PROJ_DIR$\..\obj\gpio.lst + $PROJ_DIR$\..\obj\ethernet.lst + $PROJ_DIR$\..\obj\demoprog_ek_lm3s8962.map + $PROJ_DIR$\..\obj\can.pbi + $PROJ_DIR$\..\obj\can.o + $PROJ_DIR$\..\obj\can.lst + + + [ROOT_NODE] + + + ILINK + 205 257 + + + + + $PROJ_DIR$\..\lib\driverlib\comp.c + + + ICCARM + 252 111 + + + BICOMP + 131 + + + + + ICCARM + 49 57 58 65 5 8 24 + + + BICOMP + 49 57 58 65 5 8 24 + + + + + $PROJ_DIR$\..\lib\driverlib\adc.c + + + ICCARM + 253 110 + + + BICOMP + 130 + + + + + ICCARM + 47 57 58 65 6 8 24 + + + BICOMP + 47 57 58 65 6 8 24 + + + + + $PROJ_DIR$\..\lib\driverlib\can.c + + + ICCARM + 260 259 + + + BICOMP + 258 + + + + + ICCARM + 48 57 59 58 65 4 8 24 + + + BICOMP + 48 57 59 58 65 4 8 24 + + + + + $PROJ_DIR$\..\lib\driverlib\cpu.c + + + ICCARM + 251 173 + + + BICOMP + 132 + + + + + ICCARM + 7 + + + BICOMP + 7 + + + + + $PROJ_DIR$\..\lib\driverlib\epi.c + + + ICCARM + 254 174 + + + BICOMP + 133 + + + + + ICCARM + 50 57 58 65 8 10 24 + + + BICOMP + 50 57 58 65 8 10 24 + + + + + $PROJ_DIR$\..\lib\driverlib\ethernet.c + + + ICCARM + 256 107 + + + BICOMP + 134 + + + + + ICCARM + 51 57 58 65 8 12 34 24 + + + BICOMP + 51 57 58 65 8 12 34 24 + + + + + $PROJ_DIR$\..\lib\driverlib\flash.c + + + ICCARM + 146 114 + + + BICOMP + 135 + + + + + ICCARM + 52 57 63 65 8 14 24 + + + BICOMP + 52 57 63 65 8 14 24 + + + + + $PROJ_DIR$\..\lib\driverlib\gpio.c + + + ICCARM + 255 115 + + + BICOMP + 136 + + + + + ICCARM + 53 57 58 63 65 8 16 24 + + + + + $PROJ_DIR$\..\lib\driverlib\hibernate.c + + + ICCARM + 84 116 + + + BICOMP + 137 + + + + + ICCARM + 54 57 63 65 8 18 34 24 + + + BICOMP + 54 57 63 65 8 18 34 24 + + + + + $PROJ_DIR$\..\lib\driverlib\i2c.c + + + ICCARM + 147 117 + + + BICOMP + 138 + + + + + ICCARM + 55 57 58 63 65 8 20 34 24 + + + BICOMP + 55 57 58 63 65 8 20 34 24 + + + + + $PROJ_DIR$\..\lib\driverlib\i2s.c + + + ICCARM + 250 118 + + + BICOMP + 139 + + + + + ICCARM + 56 57 58 65 8 22 24 + + + BICOMP + 56 57 58 65 8 22 24 + + + + + $PROJ_DIR$\..\lib\driverlib\interrupt.c + + + ICCARM + 249 119 + + + BICOMP + 140 + + + + + ICCARM + 57 59 65 7 8 24 + + + BICOMP + 57 59 65 7 8 24 + + + + + $PROJ_DIR$\..\lib\driverlib\mpu.c + + + ICCARM + 109 120 + + + BICOMP + 141 + + + + + ICCARM + 57 59 65 8 24 26 + + + + + $PROJ_DIR$\..\lib\driverlib\pwm.c + + + ICCARM + 176 121 + + + BICOMP + 142 + + + + + ICCARM + 57 58 60 63 65 8 24 28 + + + BICOMP + 57 58 60 63 65 8 24 28 + + + + + $PROJ_DIR$\..\lib\driverlib\qei.c + + + ICCARM + 170 122 + + + BICOMP + 143 + + + + + ICCARM + 57 58 61 65 8 24 30 + + + BICOMP + 57 58 61 65 8 24 30 + + + + + $PROJ_DIR$\..\lib\driverlib\ssi.c + + + ICCARM + 175 123 + + + BICOMP + 144 + + + + + ICCARM + 57 58 62 65 8 24 32 34 + + + BICOMP + 57 58 62 65 8 24 32 34 + + + + + $PROJ_DIR$\..\lib\driverlib\sysctl.c + + + ICCARM + 169 124 + + + BICOMP + 207 + + + + + ICCARM + 57 59 63 65 7 8 24 34 + + + BICOMP + 57 59 63 65 7 8 24 34 + + + + + $PROJ_DIR$\..\lib\driverlib\systick.c + + + ICCARM + 108 125 + + + BICOMP + 208 + + + + + ICCARM + 57 59 65 8 24 36 + + + + + $PROJ_DIR$\..\lib\driverlib\timer.c + + + ICCARM + 93 218 + + + BICOMP + 92 + + + + + ICCARM + 57 58 64 65 8 24 38 + + + BICOMP + 57 58 64 65 8 24 38 + + + + + $PROJ_DIR$\..\lib\driverlib\uart.c + + + ICCARM + 168 126 + + + BICOMP + 209 + + + + + ICCARM + 57 58 63 65 66 8 24 40 34 + + + BICOMP + 57 58 63 65 66 8 24 40 34 + + + + + $PROJ_DIR$\..\lib\driverlib\udma.c + + + ICCARM + 171 127 + + + BICOMP + 210 + + + + + ICCARM + 65 67 8 24 42 + + + BICOMP + 65 67 8 24 42 + + + + + $PROJ_DIR$\..\lib\driverlib\usb.c + + + ICCARM + 172 128 + + + BICOMP + 211 + + + + + ICCARM + 57 58 65 68 8 24 42 44 + + + BICOMP + 57 58 65 68 8 24 42 44 + + + + + $PROJ_DIR$\..\lib\driverlib\watchdog.c + + + ICCARM + 113 129 + + + BICOMP + 212 + + + + + ICCARM + 57 58 65 69 8 24 46 + + + BICOMP + 57 58 65 69 8 24 46 + + + + + $PROJ_DIR$\..\boot.c + + + ICCARM + 88 243 + + + BICOMP + 219 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\cstart.s + + + AARM + 155 + + + + + $PROJ_DIR$\..\irq.c + + + ICCARM + 94 240 + + + BICOMP + 203 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\led.c + + + ICCARM + 86 242 + + + BICOMP + 204 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\main.c + + + ICCARM + 90 241 + + + BICOMP + 89 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\time.c + + + ICCARM + 112 247 + + + BICOMP + 248 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\vectors.c + + + ICCARM + 85 217 + + + BICOMP + 87 + + + + + ICCARM + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + BICOMP + 73 91 71 75 77 80 57 58 59 63 65 34 16 40 4 24 36 + + + + + $PROJ_DIR$\..\obj\lm3s8962.pbd + + + BILINK + 130 219 258 131 132 133 134 135 136 137 138 139 140 203 204 89 141 142 143 144 207 208 248 92 209 210 211 87 212 + + + + + $PROJ_DIR$\..\bin\demoprog_ek_lm3s6965.out + + + OBJCOPY + 145 + + + + + ILINK + 213 110 243 111 173 155 174 107 114 115 116 117 118 119 240 242 241 120 121 122 123 124 125 247 218 126 127 128 217 129 239 159 98 158 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\misc.c + + + ICCARM + 152 + + + BICOMP + 237 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c + + + ICCARM + 153 + + + BICOMP + 161 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c + + + ICCARM + 238 + + + BICOMP + 157 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c + + + ICCARM + 151 + + + BICOMP + 162 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\CMSIS\CM3\CoreSupport\core_cm3.c + + + ICCARM + 154 + + + BICOMP + 236 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c + + + ICCARM + 150 + + + BICOMP + 163 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c + + + ICCARM + 149 + + + BICOMP + 164 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c + + + ICCARM + 215 + + + BICOMP + 165 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c + + + ICCARM + 214 + + + BICOMP + 160 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c + + + ICCARM + 216 + + + BICOMP + 166 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c + + + ICCARM + 95 + + + BICOMP + 167 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c + + + ICCARM + 96 + + + BICOMP + 97 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c + + + ICCARM + 156 + + + BICOMP + 102 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c + + + ICCARM + 224 + + + BICOMP + 222 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c + + + ICCARM + 225 + + + BICOMP + 148 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c + + + ICCARM + 226 + + + BICOMP + 106 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c + + + ICCARM + 227 + + + BICOMP + 220 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c + + + ICCARM + 228 + + + BICOMP + 100 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c + + + ICCARM + 229 + + + BICOMP + 99 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c + + + ICCARM + 230 + + + BICOMP + 221 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c + + + ICCARM + 231 + + + BICOMP + 105 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c + + + ICCARM + 232 + + + BICOMP + 104 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c + + + ICCARM + 233 + + + BICOMP + 103 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c + + + ICCARM + 234 + + + BICOMP + 101 + + + + + $PROJ_DIR$\..\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c + + + ICCARM + 235 + + + BICOMP + 223 + + + + + $PROJ_DIR$\..\timer.c + + + ICCARM + 218 + + + BICOMP + 92 + + + + + $PROJ_DIR$\..\bin\demoprog_ek_lm3s8962.out + + + ILINK + 257 + + + OBJCOPY + 206 + + + + + ILINK + 213 110 243 259 111 173 155 174 107 114 115 116 117 118 119 240 242 241 120 121 122 123 124 125 247 218 126 127 128 217 129 239 159 98 158 + + + + + $PROJ_DIR$\..\bin\demoprog_olimex_stm32p103.out + + + OBJCOPY + 245 + + + + + $PROJ_DIR$\..\obj\lm3s6965.pbd + + + BILINK + 130 219 131 132 133 134 135 136 137 138 139 140 203 204 89 141 142 143 144 207 208 248 92 209 210 211 87 212 + + + + + + Release + + + [MULTI_TOOL] + ILINK + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewd b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewd new file mode 100644 index 00000000..b1efffbb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewd @@ -0,0 +1,1907 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + JLINK_ID + 2 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + RDIJTAGJET_ID + 0 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 0 + 1 + 1 + + + + + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + JLINK_ID + 2 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + RDIJTAGJET_ID + 0 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 0 + 1 + 0 + + + + + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewp b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewp new file mode 100644 index 00000000..d4311d8d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.ewp @@ -0,0 +1,2096 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 21 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 21 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Prog + + lib + + driverlib + + $PROJ_DIR$\..\lib\driverlib\adc.c + + + $PROJ_DIR$\..\lib\driverlib\adc.h + + + $PROJ_DIR$\..\lib\driverlib\can.c + + + $PROJ_DIR$\..\lib\driverlib\can.h + + + $PROJ_DIR$\..\lib\driverlib\comp.c + + + $PROJ_DIR$\..\lib\driverlib\comp.h + + + $PROJ_DIR$\..\lib\driverlib\cpu.c + + + $PROJ_DIR$\..\lib\driverlib\cpu.h + + + $PROJ_DIR$\..\lib\driverlib\debug.h + + + $PROJ_DIR$\..\lib\driverlib\epi.c + + + $PROJ_DIR$\..\lib\driverlib\epi.h + + + $PROJ_DIR$\..\lib\driverlib\ethernet.c + + + $PROJ_DIR$\..\lib\driverlib\ethernet.h + + + $PROJ_DIR$\..\lib\driverlib\flash.c + + + $PROJ_DIR$\..\lib\driverlib\flash.h + + + $PROJ_DIR$\..\lib\driverlib\gpio.c + + + $PROJ_DIR$\..\lib\driverlib\gpio.h + + + $PROJ_DIR$\..\lib\driverlib\hibernate.c + + + $PROJ_DIR$\..\lib\driverlib\hibernate.h + + + $PROJ_DIR$\..\lib\driverlib\i2c.c + + + $PROJ_DIR$\..\lib\driverlib\i2c.h + + + $PROJ_DIR$\..\lib\driverlib\i2s.c + + + $PROJ_DIR$\..\lib\driverlib\i2s.h + + + $PROJ_DIR$\..\lib\driverlib\interrupt.c + + + $PROJ_DIR$\..\lib\driverlib\interrupt.h + + + $PROJ_DIR$\..\lib\driverlib\mpu.c + + + $PROJ_DIR$\..\lib\driverlib\mpu.h + + + $PROJ_DIR$\..\lib\driverlib\pin_map.h + + + $PROJ_DIR$\..\lib\driverlib\pwm.c + + + $PROJ_DIR$\..\lib\driverlib\pwm.h + + + $PROJ_DIR$\..\lib\driverlib\qei.c + + + $PROJ_DIR$\..\lib\driverlib\qei.h + + + $PROJ_DIR$\..\lib\driverlib\rom.h + + + $PROJ_DIR$\..\lib\driverlib\rom_map.h + + + $PROJ_DIR$\..\lib\driverlib\ssi.c + + + $PROJ_DIR$\..\lib\driverlib\ssi.h + + + $PROJ_DIR$\..\lib\driverlib\sysctl.c + + + $PROJ_DIR$\..\lib\driverlib\sysctl.h + + + $PROJ_DIR$\..\lib\driverlib\systick.c + + + $PROJ_DIR$\..\lib\driverlib\systick.h + + + $PROJ_DIR$\..\lib\driverlib\timer.c + + + $PROJ_DIR$\..\lib\driverlib\timer.h + + + $PROJ_DIR$\..\lib\driverlib\uart.c + + + $PROJ_DIR$\..\lib\driverlib\uart.h + + + $PROJ_DIR$\..\lib\driverlib\udma.c + + + $PROJ_DIR$\..\lib\driverlib\udma.h + + + $PROJ_DIR$\..\lib\driverlib\usb.c + + + $PROJ_DIR$\..\lib\driverlib\usb.h + + + $PROJ_DIR$\..\lib\driverlib\watchdog.c + + + $PROJ_DIR$\..\lib\driverlib\watchdog.h + + + + inc + + $PROJ_DIR$\..\lib\inc\asmdefs.h + + + $PROJ_DIR$\..\lib\inc\hw_adc.h + + + $PROJ_DIR$\..\lib\inc\hw_can.h + + + $PROJ_DIR$\..\lib\inc\hw_comp.h + + + $PROJ_DIR$\..\lib\inc\hw_epi.h + + + $PROJ_DIR$\..\lib\inc\hw_ethernet.h + + + $PROJ_DIR$\..\lib\inc\hw_flash.h + + + $PROJ_DIR$\..\lib\inc\hw_gpio.h + + + $PROJ_DIR$\..\lib\inc\hw_hibernate.h + + + $PROJ_DIR$\..\lib\inc\hw_i2c.h + + + $PROJ_DIR$\..\lib\inc\hw_i2s.h + + + $PROJ_DIR$\..\lib\inc\hw_ints.h + + + $PROJ_DIR$\..\lib\inc\hw_memmap.h + + + $PROJ_DIR$\..\lib\inc\hw_nvic.h + + + $PROJ_DIR$\..\lib\inc\hw_pwm.h + + + $PROJ_DIR$\..\lib\inc\hw_qei.h + + + $PROJ_DIR$\..\lib\inc\hw_ssi.h + + + $PROJ_DIR$\..\lib\inc\hw_sysctl.h + + + $PROJ_DIR$\..\lib\inc\hw_timer.h + + + $PROJ_DIR$\..\lib\inc\hw_types.h + + + $PROJ_DIR$\..\lib\inc\hw_uart.h + + + $PROJ_DIR$\..\lib\inc\hw_udma.h + + + $PROJ_DIR$\..\lib\inc\hw_usb.h + + + $PROJ_DIR$\..\lib\inc\hw_watchdog.h + + + $PROJ_DIR$\..\lib\inc\lm3s6965.h + + + + + $PROJ_DIR$\..\boot.c + + + $PROJ_DIR$\..\boot.h + + + $PROJ_DIR$\..\cstart.s + + + $PROJ_DIR$\..\header.h + + + $PROJ_DIR$\..\irq.c + + + $PROJ_DIR$\..\irq.h + + + $PROJ_DIR$\..\led.c + + + $PROJ_DIR$\..\led.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\time.c + + + $PROJ_DIR$\..\time.h + + + $PROJ_DIR$\..\vectors.c + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.eww b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.eww new file mode 100644 index 00000000..c61cab19 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/lm3s8962.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\lm3s8962.ewp + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/readme.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/readme.txt new file mode 100644 index 00000000..59a79281 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/readme.txt @@ -0,0 +1,4 @@ +Integrated Development Environment +---------------------------------- +IAR Embedded Workbench for ARM v6.30 was used as the editor during the development of this software program. This directory contains +the Embedded Workbench project and worksapce files. More info is available at: http://www.iar.com/ \ No newline at end of file diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.cspy.bat b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.cspy.bat new file mode 100644 index 00000000..24861256 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.cspy.bat @@ -0,0 +1,15 @@ +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. +@REM +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM + + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armsim2.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\bin\armbat.dll" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\CONFIG\debugger\TexasInstruments\iolm3sxxxx.ddf" "--semihosting" "--device=LM3Sx9xx" + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dbgdt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dbgdt new file mode 100644 index 00000000..33f4649c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dbgdt @@ -0,0 +1,5 @@ + + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dni b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dni new file mode 100644 index 00000000..9b4dd888 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.dni @@ -0,0 +1,36 @@ +[Stack] +FillEnabled=0 +OverflowWarningsEnabled=1 +WarningThreshold=90 +SpWarningsEnabled=1 +WarnLogOnly=1 +UseTrigger=1 +TriggerName=main +LimitSize=0 +ByteLimit=50 +[InterruptLog] +LogEnabled=0 +SumEnabled=0 +GraphEnabled=0 +ShowTimeLog=1 +ShowTimeSum=1 +SumSortOrder=0 +[Disassemble mode] +mode=0 +[Breakpoints2] +Count=0 +[Interrupts] +Enabled=1 +[MemoryMap] +Enabled=0 +Base=0 +UseAuto=0 +TypeViolation=1 +UnspecRange=1 +ActionState=1 +[Aliases] +Count=0 +SuppressDialog=0 +[Trace1] +Enabled=0 +ShowSource=1 diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.wsdt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.wsdt new file mode 100644 index 00000000..56ff7264 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/ide/settings/lm3s8962.wsdt @@ -0,0 +1,66 @@ + + + + + + lm3s8962/Debug + + + + + + + + + 254272727 + + + + + + + 20115530877 + + + + + + + + TabID-30499-23628 + Workspace + Workspace + + + lm3s8962lm3s8962/Prog + + + + 0 + + + TabID-20859-24014 + Build + Build + + + + + 0 + + + + + + TextEditor$WS_DIR$\..\boot.c0452363236300100000010000001 + + + + + + + iaridepm.enu1-2-2587328-2-2200200125000240964206250709639-2-21981602-2-216042001002500240964125000240964 + + + + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.c new file mode 100644 index 00000000..0f469a13 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.c @@ -0,0 +1,97 @@ +/**************************************************************************************** +| Description: IRQ driver source file +| File Name: irq.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Local data definitions +****************************************************************************************/ +static unsigned char interruptNesting = 0; /* used for global interrupt en/disable */ + + +/**************************************************************************************** +** NAME: IrqInterruptEnable +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Enables the generation IRQ interrupts. Typically called once during +** software startup after completion of the initialization. +** +****************************************************************************************/ +void IrqInterruptEnable(void) +{ + IntMasterEnable(); +} /*** end of IrqInterruptEnable ***/ + + +/**************************************************************************************** +** NAME: HwInterruptDisable +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Disables the generation IRQ interrupts and stores information on +** whether or not the interrupts were already disabled before explicitly +** disabling them with this function. Normally used as a pair together +** with IrqInterruptRestore during a critical section. +** +****************************************************************************************/ +void IrqInterruptDisable(void) +{ + if (interruptNesting == 0) + { + IntMasterDisable(); + } + interruptNesting++; +} /*** end of IrqInterruptDisable ***/ + + +/**************************************************************************************** +** NAME: IrqInterruptRestore +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Restore the generation IRQ interrupts to the setting it had prior to +** calling IrqInterruptDisable. Normally used as a pair together with +** IrqInterruptDisable during a critical section. +** +****************************************************************************************/ +void IrqInterruptRestore(void) +{ + interruptNesting--; + if (interruptNesting == 0) + { + IntMasterEnable(); + } +} /*** end of IrqInterruptRestore ***/ + + +/*********************************** end of irq.c **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.h new file mode 100644 index 00000000..73e97bc3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/irq.h @@ -0,0 +1,43 @@ +/**************************************************************************************** +| Description: IRQ driver header file +| File Name: irq.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef IRQ_H +#define IRQ_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void IrqInterruptEnable(void); +void IrqInterruptDisable(void); +void IrqInterruptRestore(void); + + +#endif /* IRQ_H */ +/*********************************** end of irq.h **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.c new file mode 100644 index 00000000..9c854f68 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.c @@ -0,0 +1,101 @@ +/**************************************************************************************** +| Description: LED driver source file +| File Name: led.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Macro definitions +****************************************************************************************/ +#define LED_TOGGLE_MS (500) /* toggle interval time in millisecodns */ + + +/**************************************************************************************** +** NAME: LedInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the LED. +** +****************************************************************************************/ +void LedInit(void) +{ + /* enable the peripherals used by the LED driver */ + SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); + /* configure the LED as digital output and turn off the LED */ + GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, 0x01); + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 0); +} /*** end of LedInit ***/ + + +/**************************************************************************************** +** NAME: LedToggle +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Toggles the LED at a fixed time interval. +** +****************************************************************************************/ +void LedToggle(void) +{ + static unsigned char led_toggle_state = 0; + static unsigned long timer_counter_last = 0; + unsigned long timer_counter_now; + + /* check if toggle interval time passed */ + timer_counter_now = TimeGet(); + if ( (timer_counter_now - timer_counter_last) < LED_TOGGLE_MS) + { + /* not yet time to toggle */ + return; + } + + /* determine toggle action */ + if (led_toggle_state == 0) + { + led_toggle_state = 1; + /* turn the LED on */ + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 1); + } + else + { + led_toggle_state = 0; + /* turn the LED off */ + GPIOPinWrite(GPIO_PORTF_BASE, 0x01, 0); + } + + /* store toggle time to determine next toggle interval */ + timer_counter_last = timer_counter_now; +} /*** end of LedToggle ***/ + + +/*********************************** end of led.c **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.h new file mode 100644 index 00000000..b5126edb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/led.h @@ -0,0 +1,42 @@ +/**************************************************************************************** +| Description: LED driver header file +| File Name: led.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef LED_H +#define LED_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void LedInit(void); +void LedToggle(void); + + +#endif /* LED_H */ +/*********************************** end of led.h **************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/EULA.txt b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/EULA.txt new file mode 100644 index 00000000..7c1cfc7a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/EULA.txt @@ -0,0 +1,400 @@ +License Agreement + +Important - This is a legally binding agreement. Read it carefully. After you +read the following terms, you will be asked whether you are authorized to +commit your company to abide by the following terms. THIS AGREEMENT IS +DISPLAYED FOR YOU TO READ PRIOR TO DOWNLOADING OR USING THE "LICENSED +MATERIALS". + +DO NOT DOWNLOAD OR INSTALL the software programs unless you agree on behalf of +yourself and your company to be bound by the terms of this License Agreement. + +DO NOT CLICK "I AGREE" UNLESS: + +1. YOU ARE AUTHORIZED TO AGREE TO THE TERMS OF THIS LICENSE ON BEHALF OF +YOURSELF AND YOUR COMPANY; AND + +2. YOU INTEND TO ENTER THIS LEGALLY BINDING AGREEMENT ON BEHALF OF YOURSELF AND +YOUR COMPANY. + +Important - Read carefully: This software license agreement ("Agreement") is a +legal agreement between you (either an individual or entity) and Texas +Instruments Incorporated ("TI"). The "Licensed Materials" subject to this +Agreement include the software programs TI has granted you access to download +and any "on-line" or electronic documentation associated with these programs, +or any portion thereof, and may also include hardware, reference designs and +associated documentation. The Licensed Materials are specifically designed and +licensed for use solely and exclusively with microprocessor/microcontroller +devices manufactured by or for TI ("TI Devices"). By installing, copying or +otherwise using the Licensed Materials you agree to abide by the provisions set +forth herein. This Agreement is displayed for you to read prior to using the +Licensed Materials. If you choose not to accept or agree with these provisions, +do not download or install the Licensed Materials. + +1. Delivery. TI may deliver the Licensed Materials, or portions thereof, to you +electronically. + +2. License Grant and Use Restrictions. + +a. Limited Source Code License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a limited, free, non-transferable, +non-exclusive, non-assignable, non-sub-licensable license to make copies, +prepare derivative works, display internally and use internally the Licensed +Materials provided to you in source code for the sole purposes of designing and +developing object and executable versions of such Licensed Materials or any +derivative thereof, that execute solely and exclusively on TI Devices used in +Customer Product(s), and maintaining and supporting such Licensed Materials, or +any derivative thereof, and Customer Product(s). "Customer Product" means a +final product distributed by or for you that consists of both hardware, +including one or more TI Devices, and software components, including only +executable versions of the Licensed Materials that execute solely and +exclusively on or with such TI Devices and not on devices manufactured by or +for an entity other than TI. + +b. Production and Distribution License. Subject to the terms of this Agreement, +and commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-exclusive, non-transferable, +non-assignable, worldwide license to: + +(i). Use object code versions of the Licensed Materials, or any derivative +thereof, to make copies, display internally, evaluate, test, distribute +internally and use internally for the sole purposes of designing and developing +Customer Product(s), and maintaining and supporting the Licensed Materials and +Customer Product(s); + +(ii). Make copies, use, sell, offer to sell, and otherwise distribute object +code and executable versions of the Licensed Materials, or any derivative +thereof, for use in or with Customer Product(s), provided that such Licensed +Materials are embedded in or only used with Customer Product(s), and provided +further that such Licensed Materials execute solely and exclusively on a TI +Device and not on any device manufactured by or for an entity other than TI. + +c. Demonstration License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to demonstrate to third +parties the Licensed Materials as they are used in Customer Products executing +solely and exclusively on TI Devices, provided that such Licensed Materials are +demonstrated in object or executable versions only. + +d. Reference Design Use License. Subject to the terms of this Agreement, and +commencing as of the Effective Date and continuing for the term of this +Agreement, TI hereby grants to you a free, non-transferable, non-exclusive, +non-assignable, non-sub-licensable worldwide license to: + +(i). use the Licensed Materials to design, develop, manufacture or have +manufactured, sell, offer to sell, or otherwise distribute Customer Product(s) +or product designs, including portions or derivatives of the Licensed Materials +as they are incorporated in or used with Customer Product(s), provided such +Customer Products or product designs utilize a TI Device. + +e. Contractors and Suppliers. The licenses granted to you hereunder shall +include your on-site and off-site suppliers and independent contractors, while +such suppliers and independent contractors are performing work for or providing +services to you, provided that such suppliers and independent contractors have +executed work-for-hire agreements with you containing terms and conditions not +inconsistent with the terms and conditions set forth is this Agreement and +provided further that such contractors may provide work product to only you +under such work-for-hire agreements. + +f. No Other License. Notwithstanding anything to the contrary, nothing in this +Agreement shall be construed as a license to any intellectual property rights +of TI other than those rights embodied in the Licensed Materials provided to +you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY +ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED +HEREIN. + +g. Restrictions. You shall maintain the source code versions of the Licensed +Materials under password control protection and shall not disclose such source +code versions of the Licensed Materials, or any derivative thereof, to any +person other than your employees and contractors whose job performance requires +access. You shall not use the Licensed Materials with a processing device +manufactured by or for an entity other than TI, and you agree that any such +unauthorized use of the Licensed Materials is a material breach of this +Agreement. Except as expressly provided in this Agreement, you shall not copy, +publish, disclose, display, provide, transfer or make available the Licensed +Materials to any third party and you shall not sublicense, transfer, or assign +the Licensed Materials or your rights under this Agreement to any third party. +You shall not mortgage, pledge or encumber the Licensed Materials in any way. +You shall not (i) incorporate, combine, or distribute the Licensed Materials, +or any derivative thereof, with any Public Software, or (ii) use Public +Software in the development of any derivatives of the Licensed Materials, each +in such a way that would cause the Licensed Materials, or any derivative +thereof, to be subject to all or part of the license obligations or other +intellectual property related terms with respect to such Public Software, +including but not limited to, the obligations that the Licensed Materials, or +any derivative thereof, incorporated into, combined, or distributed with such +Public Software (x) be disclosed or distributed in source code form, be +licensed for the purpose of making derivatives of such software, or be +redistributed free of charge, contrary to the terms and conditions of this +Agreement, (y) be used with devices other than TI Devices, or (z) be otherwise +used or distributed in a manner contrary to the terms and conditions of this +Agreement. As used in this Section 2(g), "Public Software" means any software +that contains, or is derived in whole or in part from, any software distributed +as open source software, including but not limited to software licensed under +the following or similar models: (A) GNU's General Public License (GPL) or +Lesser/Library GPL (LGPL), (B) the Artistic License (e.g., PERL), (C) the +Mozilla Public License, (D) the Netscape Public License, (E) the Sun Community +Source License (SCSL), (F) the Sun Industry Standards Source License (SISL), +(G) the Apache Server license, (H) QT Free Edition License, (I) IBM Public +License, and (J) BitKeeper. + +h. Termination. This Agreement is effective until terminated. You may terminate +this Agreement at any time by written notice to TI. Without prejudice to any +other rights, if you fail to comply with the terms of this Agreement, TI may +terminate your right to use the Licensed Materials upon written notice to you. +Upon termination of this Agreement, you will destroy any and all copies of the +Licensed Materials in your possession, custody or control and provide to TI a +written statement signed by your authorized representative certifying such +destruction. The following sections will survive any expiration or termination +of this Agreement: 2(h) (Termination), 3 (Licensed Materials Ownership), 6 +(Warranties and Limitations), 7 (Indemnification Disclaimer), 10 (Export +Control), 11 (Governing Law and Severability), 12 (PRC Provisions), and 13 +(Entire Agreement). The obligations set forth in Section 5 (Confidential +Information) will survive any expiration or termination of this Agreement for +three (3) years after such expiration or termination. + +3. Licensed Materials Ownership. The Licensed Materials are licensed, not sold +to you, and can only be used in accordance with the terms of this Agreement. +Subject to the licenses granted to you pursuant to this Agreement, TI and TI's +licensors own and shall continue to own all right, title, and interest in and +to the Licensed Materials, including all copies thereof. The parties agree that +all fixes, modifications and improvements to the Licensed Materials conceived +of or made by TI that are based, either in whole or in part, on your feedback, +suggestions or recommendations are the exclusive property of TI and all right, +title and interest in and to such fixes, modifications or improvements to the +Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree +that when your independently developed software or hardware components are +combined, in whole or in part, with the Licensed Materials, your right to use +the Licensed Materials embodied in such resulting combined work shall remain +subject to the terms and conditions of this Agreement. + +4. Intellectual Property Rights. + +a. The Licensed Materials contain copyrighted material, trade secrets and other +proprietary information of TI and TI's licensors and are protected by copyright +laws, international copyright treaties, and trade secret laws, as well as other +intellectual property laws. To protect TI's and TI's licensors' rights in the +Licensed Materials, you agree, except as specifically permitted by statute by a +provision that cannot be waived by contract, not to "unlock", decompile, +reverse engineer, disassemble or otherwise translate any portions of the +Licensed Materials to a human-perceivable form nor to permit any person or +entity to do so. You shall not remove, alter, cover, or obscure any +confidentiality, trade secret, proprietary, or copyright notices, trade-marks, +proprietary, patent, or other identifying marks or designs from any component +of the Licensed Materials and you shall reproduce and include in all copies of +the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI +and TI's licensors as they appear in the Licensed Materials. TI reserves all +rights not specifically granted under this Agreement. + +b. Third parties may claim to own patents, copyrights, or other intellectual +property rights that cover the implementation of certain Licensed Materials. +Certain Licensed Materials may also be based on industry recognized standards, +including but not limited to specifically the ISO MPEG and ITU standards, and +software programs published by industry recognized standards bodies and certain +third parties claim to own patents, copyrights, and other intellectual property +rights that cover implementation of those standards. You acknowledge and agree +that this Agreement does not convey a license to any such third party patents, +copyrights, and other intellectual property rights and that you are solely +responsible for any patent, copyright, or other intellectual property right +claims that relate to your use and distribution of the Licensed Materials, and +your use and distribution of your products that include or incorporate the +Licensed Materials. + +5. Confidential Information. You acknowledge and agree that the Licensed +Materials contain trade secrets and other confidential information of TI and +TI's licensors. You agree to use the Licensed Materials solely within the scope +of the licenses set forth herein, to maintain the Licensed Materials in strict +confidence, to use at least the same procedures and degree of care that you use +to prevent disclosure of your own confidential information of like importance +but in no instance less than reasonable care, and to prevent disclosure of the +Licensed Materials to any third party, except as may be necessary and required +in connection with your rights and obligations hereunder. You agree to obtain +executed confidentiality agreements with your employees and contractors having +access to the Licensed Materials and to diligently take steps to enforce such +agreements in this respect. TI agrees that the employment agreements used in +the normal course of your business shall satisfy the requirements of this +section. TI may disclose your contact information to TI's applicable licensors. + +6. Warranties and Limitations. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED +MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN +IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU +ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR +CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY +OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR +DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU +WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED +MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR +FAILURES. + +THE LICENSED MATERIALS AND ANY REALTED DOCUMENTATION ARE PROVIDED "AS IS" AND +WITH ALL FAULTS. TI MAKES NO WARRANTY OR REPRESENTATION, WHETHER EXPRESS, +IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT +LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, +RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET +ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, +COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO +USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN +THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO +MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR +SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED. + +IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL, +INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY +THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE +USE OF THE LICENSED MATERIALS, REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, +COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF +DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR +INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS +AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE +HUNDRED U.S. DOLLARS (US$500). THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT +ENLARGE OR EXTEND THESE LIMITS. + +Because some jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages or limitation on how long an implied +warranty lasts, the above limitations or exclusions may not apply to you. + +7. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE +LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY +INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR +DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR +SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR +INCORPORATE THE LICENSED MATERIALS. + +You will defend and indemnify TI in the event of claim, liability or costs +(including reasonable attorney's fees related to Your use or any sub-licensee's +use of the Licensed Materials) relating in any way to Your violation of the +terms of the License Grants set forth in Section 2, or any other violation of +other terms and conditions of this Agreement. + +8. No Technical Support. TI and TI's licensors are under no obligation to +install, maintain or support the Licensed Materials. + +9. Notices. All notices to TI hereunder shall be delivered to Texas Instruments +Incorporated, AEC Software Operations, 12203 Southwest Freeway, Mail Station +701, Stafford, Texas 77477, Attention: Administrator, AEC Software Operations, +with a copy to Texas Instruments Incorporated, 12203 Southwest Freeway, Mail +Station 725, Stafford, Texas 77477, Attention: Legal Department. All notices +shall be deemed served when received by TI. + +10. Export Control. You hereby acknowledge that the Licensed Materials are +subject to export control under the U.S. Commerce Department's Export +Administration Regulations ("EAR"). You further hereby acknowledge and agree +that unless prior authorization is obtained from the U.S. Commerce Department, +neither you nor your customers will export, re-export, or release, directly or +indirectly, any technology, software, or software source code (as defined in +Part 772 of the EAR), received from TI, or export, directly or indirectly, any +direct product of such technology, software, or software source code (as +defined in Part 734 of the EAR), to any destination or country to which the +export, re-export, or release of the technology, software, or software source +code, or direct product is prohibited by the EAR. You agree that none of the +Licensed Materials may be downloaded or otherwise exported or reexported (i) +into (or to a national or resident of) Cuba, Iran, North Korea, Sudan and Syria +or any other country the U.S. has embargoed goods; or (ii) to anyone on the +U.S. Treasury Department's List of Specially Designated Nationals or the U.S. +Commerce Department's Denied Persons List or Entity List. You represent and +warrant that you are not located in, under the control of, or a national or +resident of any such country or on any such list and you will not use or +transfer the Licensed Materials for use in any sensitive nuclear, chemical or +biological weapons, or missile technology end-uses unless authorized by the +U.S. Government by regulation or specific license or for a military end-use in, +or by any military entity of Albania, Armenia, Azerbaijan, Belarus, Cambodia, +China, Georgia, Iran, Iraq, Kazakhstan, Kyrgyzstan, Laos, Libya, Macau, +Moldova, Mongolia, Russia, Tajikistan, Turkmenistan, Ukraine, Uzbekistan, and +Vietnam. Any software export classification made by TI shall be for TI's +internal use only and shall not be construed as a representation or warranty +regarding the proper export classification for such software or whether an +export license or other documentation is required for the exportation of such +software. + +11. Governing Law and Severability. This Agreement will be governed by and +interpreted in accordance with the laws of the State of Texas, without +reference to conflict of laws principles. If for any reason a court of +competent jurisdiction finds any provision of the Agreement to be +unenforceable, that provision will be enforced to the maximum extent possible +to effectuate the intent of the parties, and the remainder of the Agreement +shall continue in full force and effect. This Agreement shall not be governed +by the United Nations Convention on Contracts for the International Sale of +Goods, or by the Uniform Computer Information Transactions Act (UCITA), as it +may be enacted in the State of Texas. The parties agree that non-exclusive +jurisdiction for any dispute arising out of or relating to this Agreement lies +within the courts located in the State of Texas. Notwithstanding the foregoing, +any judgment may be enforced in any United States or foreign court, and either +party may seek injunctive relief in any United States or foreign court. + +12. PRC Provisions. If you are located in the People's Republic of China +("PRC") or if the Licensed Materials will be sent to the PRC, the following +provisions shall apply and shall supersede any other provisions in this +Agreement concerning the same subject matter as the following provisions: + +a. Registration Requirements. You shall be solely responsible for performing +all acts and obtaining all approvals that may be required in connection with +this Agreement by the government of the PRC, including but not limited to +registering pursuant to, and otherwise complying with, the PRC Measures on the +Administration of Software Products, Management Regulations on Technology +Import-Export, and Technology Import and Export Contract Registration +Management Rules. Upon receipt of such approvals from the government +authorities, you shall forward evidence of all such approvals to TI for its +records. In the event that you fail to obtain any such approval or +registration, you shall be solely responsible for any and all losses, damages +or costs resulting therefrom, and shall indemnify TI for all such losses, +damages or costs. + +b. Governing Language. This Agreement is written and executed in the English +language. If a translation of this Agreement is required for any purpose, +including but not limited to registration of the Agreement pursuant to any +governmental laws, regulations or rules, you shall be solely responsible for +creating such translation. Any translation of this Agreement into a language +other than English is intended solely in order to comply with such laws or for +reference purposes, and the English language version shall be authoritative and +controlling. + +c. Export Control. + +(i). Diversions of Technology. You hereby agree that unless prior authorization +is obtained from the U.S. Department of Commerce, neither you nor your +subsidiaries or affiliates shall knowingly export, re-export, or release, +directly or indirectly, any technology, software, or software source code (as +defined in Part 772 of the Export Administration Regulations of the U.S. +Department of Commerce ("EAR")), received from TI or any of its affiliated +companies, or export, directly or indirectly, any direct product of such +technology, software, or software source code (as defined in Part 734 of the +EAR), to any destination or country to which the export, re-export, or release +of the technology, software, software source code, or direct product is +prohibited by the EAR. + +(ii). Assurance of Compliance. You understand and acknowledge that products, +technology (regardless of the form in which it is provided), software or +software source code, received from TI or any of its affiliates under this +Agreement may be under export control of the United States or other countries. +You shall comply with the United States and other applicable non-U.S. laws and +regulations governing the export, re-export and release of any products, +technology, software, or software source code received under this Agreement +from TI or its affiliates. You shall not undertake any action that is +prohibited by the EAR. Without limiting the generality of the foregoing, you +specifically agree that you shall not transfer or release products, technology, +software, or software source code of TI or its affiliates to, or for use by, +military end users or for use in military, missile, nuclear, biological, or +chemical weapons end uses. + +(iii). Licenses. Each party shall secure at its own expense, such licenses and +export and import documents as are necessary for each respective party to +fulfill its obligations under this Agreement. If such licenses or government +approvals cannot be obtained, TI may terminate this Agreement, or shall +otherwise be excused from the performance of any obligations it may have under +this Agreement for which the licenses or government approvals are required. + +13. Entire Agreement. This is the entire Agreement between you and TI, and +absent a signed and effective software license agreement related to the subject +matter of this Agreement, this Agreement supersedes any prior agreement between +the parties related to the subject matter of this Agreement. Notwithstanding +the foregoing, any signed and effective software license agreement relating to +the subject matter hereof will supersede the terms of this Agreement. No +amendment or modification of this Agreement will be effective unless in writing +and signed by a duly authorized representative of TI. You hereby warrant and +represent that you have obtained all authorizations and other applicable +consents required empowering you to enter into this Agreement. + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.c new file mode 100644 index 00000000..d6ef5ccc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.c @@ -0,0 +1,1470 @@ +//***************************************************************************** +// +// adc.c - Driver for the ADC. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup adc_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_adc.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/adc.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// These defines are used by the ADC driver to simplify access to the ADC +// sequencer's registers. +// +//***************************************************************************** +#define ADC_SEQ (ADC_O_SSMUX0) +#define ADC_SEQ_STEP (ADC_O_SSMUX1 - ADC_O_SSMUX0) +#define ADC_SSMUX (ADC_O_SSMUX0 - ADC_O_SSMUX0) +#define ADC_SSCTL (ADC_O_SSCTL0 - ADC_O_SSMUX0) +#define ADC_SSFIFO (ADC_O_SSFIFO0 - ADC_O_SSMUX0) +#define ADC_SSFSTAT (ADC_O_SSFSTAT0 - ADC_O_SSMUX0) +#define ADC_SSOP (ADC_O_SSOP0 - ADC_O_SSMUX0) +#define ADC_SSDC (ADC_O_SSDC0 - ADC_O_SSMUX0) + +//***************************************************************************** +// +// The currently configured software oversampling factor for each of the ADC +// sequencers. +// +//***************************************************************************** +static unsigned char g_pucOversampleFactor[3]; + +//***************************************************************************** +// +//! Registers an interrupt handler for an ADC interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pfnHandler is a pointer to the function to be called when the +//! ADC sample sequence interrupt occurs. +//! +//! This function sets the handler to be called when a sample sequence +//! interrupt occurs. This will enable the global interrupt in the interrupt +//! controller; the sequence interrupt must be enabled with ADCIntEnable(). It +//! is the interrupt handler's responsibility to clear the interrupt source via +//! ADCIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntRegister(unsigned long ulBase, unsigned long ulSequenceNum, + void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine the interrupt to register based on the sequence number. + // + ulInt = ((ulBase == ADC0_BASE) ? (INT_ADC0SS0 + ulSequenceNum) : + (INT_ADC1SS0 + ulSequenceNum)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the timer interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for an ADC interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function unregisters the interrupt handler. This will disable the +//! global interrupt in the interrupt controller; the sequence interrupt must +//! be disabled via ADCIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntUnregister(unsigned long ulBase, unsigned long ulSequenceNum) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine the interrupt to unregister based on the sequence number. + // + ulInt = ((ulBase == ADC0_BASE) ? (INT_ADC0SS0 + ulSequenceNum) : + (INT_ADC1SS0 + ulSequenceNum)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Disables a sample sequence interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function disables the requested sample sequence interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) &= ~(1 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Enables a sample sequence interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function enables the requested sample sequence interrupt. Any +//! outstanding interrupts are cleared before enabling the sample sequence +//! interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear any outstanding interrupts on this sample sequence. + // + HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum; + + // + // Enable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) |= 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified sample sequence. +//! Either the raw interrupt status or the status of interrupts that are +//! allowed to reflect to the processor can be returned. +//! +//! \return The current raw or masked interrupt status. +// +//***************************************************************************** +unsigned long +ADCIntStatus(unsigned long ulBase, unsigned long ulSequenceNum, + tBoolean bMasked) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + ulTemp = HWREG(ulBase + ADC_O_ISC) & (0x10001 << ulSequenceNum); + } + else + { + ulTemp = HWREG(ulBase + ADC_O_RIS) & (0x10000 | (1 << ulSequenceNum)); + + // + // If the digital comparator status bit is set, reflect it to the + // appropriate sequence bit. + // + if(ulTemp & 0x10000) + { + ulTemp |= 0xF0000; + ulTemp &= ~(0x10000 << ulSequenceNum); + } + } + + // + // Return the interrupt status + // + return(ulTemp); +} + +//***************************************************************************** +// +//! Clears sample sequence interrupt source. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! The specified sample sequence interrupt is cleared, so that it no longer +//! asserts. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the interrupt. + // + HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Enables a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! Allows the specified sample sequence to be captured when its trigger is +//! detected. A sample sequence must be configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Enable the specified sequence. + // + HWREG(ulBase + ADC_O_ACTSS) |= 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Disables a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! Prevents the specified sample sequence from being captured when its trigger +//! is detected. A sample sequence should be disabled before it is configured. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable the specified sequences. + // + HWREG(ulBase + ADC_O_ACTSS) &= ~(1 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Configures the trigger source and priority of a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulTrigger is the trigger source that initiates the sample sequence; +//! must be one of the \b ADC_TRIGGER_* values. +//! \param ulPriority is the relative priority of the sample sequence with +//! respect to the other sample sequences. +//! +//! This function configures the initiation criteria for a sample sequence. +//! Valid sample sequences range from zero to three; sequence zero will capture +//! up to eight samples, sequences one and two will capture up to four samples, +//! and sequence three will capture a single sample. The trigger condition and +//! priority (with respect to other sample sequence execution) is set. +//! +//! The \e ulTrigger parameter can take on the following values: +//! +//! - \b ADC_TRIGGER_PROCESSOR - A trigger generated by the processor, via the +//! ADCProcessorTrigger() function. +//! - \b ADC_TRIGGER_COMP0 - A trigger generated by the first analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_COMP1 - A trigger generated by the second analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_COMP2 - A trigger generated by the third analog +//! comparator; configured with ComparatorConfigure(). +//! - \b ADC_TRIGGER_EXTERNAL - A trigger generated by an input from the Port +//! B4 pin. +//! - \b ADC_TRIGGER_TIMER - A trigger generated by a timer; configured with +//! TimerControlTrigger(). +//! - \b ADC_TRIGGER_PWM0 - A trigger generated by the first PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM1 - A trigger generated by the second PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM2 - A trigger generated by the third PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_PWM3 - A trigger generated by the fourth PWM generator; +//! configured with PWMGenIntTrigEnable(). +//! - \b ADC_TRIGGER_ALWAYS - A trigger that is always asserted, causing the +//! sample sequence to capture repeatedly (so long as +//! there is not a higher priority source active). +//! +//! Note that not all trigger sources are available on all Stellaris family +//! members; consult the data sheet for the device in question to determine the +//! availability of triggers. +//! +//! The \e ulPriority parameter is a value between 0 and 3, where 0 represents +//! the highest priority and 3 the lowest. Note that when programming the +//! priority among a set of sample sequences, each must have unique priority; +//! it is up to the caller to guarantee the uniqueness of the priorities. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceConfigure(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long ulTrigger, unsigned long ulPriority) +{ + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + ASSERT((ulTrigger == ADC_TRIGGER_PROCESSOR) || + (ulTrigger == ADC_TRIGGER_COMP0) || + (ulTrigger == ADC_TRIGGER_COMP1) || + (ulTrigger == ADC_TRIGGER_COMP2) || + (ulTrigger == ADC_TRIGGER_EXTERNAL) || + (ulTrigger == ADC_TRIGGER_TIMER) || + (ulTrigger == ADC_TRIGGER_PWM0) || + (ulTrigger == ADC_TRIGGER_PWM1) || + (ulTrigger == ADC_TRIGGER_PWM2) || + (ulTrigger == ADC_TRIGGER_PWM3) || + (ulTrigger == ADC_TRIGGER_ALWAYS)); + ASSERT(ulPriority < 4); + + // + // Compute the shift for the bits that control this sample sequence. + // + ulSequenceNum *= 4; + + // + // Set the trigger event for this sample sequence. + // + HWREG(ulBase + ADC_O_EMUX) = ((HWREG(ulBase + ADC_O_EMUX) & + ~(0xf << ulSequenceNum)) | + ((ulTrigger & 0xf) << ulSequenceNum)); + + // + // Set the priority for this sample sequence. + // + HWREG(ulBase + ADC_O_SSPRI) = ((HWREG(ulBase + ADC_O_SSPRI) & + ~(0xf << ulSequenceNum)) | + ((ulPriority & 0x3) << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Configure a step of the sample sequencer. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulStep is the step to be configured. +//! \param ulConfig is the configuration of this step; must be a logical OR of +//! \b ADC_CTL_TS, \b ADC_CTL_IE, \b ADC_CTL_END, \b ADC_CTL_D, and one of the +//! input channel selects (\b ADC_CTL_CH0 through \b ADC_CTL_CH15). For parts +//! with the digital comparator feature, the follow values may also be OR'd +//! into the \e ulConfig value to enable the digital comparater feature: +//! \b ADC_CTL_CE and one of the comparater selects (\b ADC_CTL_CMP0 through +//! \b ADC_CTL_CMP7). +//! +//! This function will set the configuration of the ADC for one step of a +//! sample sequence. The ADC can be configured for single-ended or +//! differential operation (the \b ADC_CTL_D bit selects differential +//! operation when set), the channel to be sampled can be chosen (the +//! \b ADC_CTL_CH0 through \b ADC_CTL_CH15 values), and the internal +//! temperature sensor can be selected (the \b ADC_CTL_TS bit). Additionally, +//! this step can be defined as the last in the sequence (the \b ADC_CTL_END +//! bit) and it can be configured to cause an interrupt when the step is +//! complete (the \b ADC_CTL_IE bit). If the digital comparators are present +//! on the device, this step may also be configured send the ADC sample to +//! the selected comparator (the \b ADC_CTL_CMP0 through \b ADC_CTL_CMP7 +//! values) by using the \b ADC_CTL_CE bit. The configuration is used by the +//! ADC at the appropriate time when the trigger for this sequence occurs. +//! +//! \note If the Digitial Comparator is present and enabled using the +//! \b ADC_CTL_CE bit, the ADC sample will NOT be written into the ADC +//! sequence data FIFO. +//! +//! The \e ulStep parameter determines the order in which the samples are +//! captured by the ADC when the trigger occurs. It can range from zero to +//! seven for the first sample sequence, from zero to three for the second and +//! third sample sequence, and can only be zero for the fourth sample sequence. +//! +//! Differential mode only works with adjacent channel pairs (for example, 0 +//! and 1). The channel select must be the number of the channel pair to +//! sample (for example, \b ADC_CTL_CH0 for 0 and 1, or \b ADC_CTL_CH1 for 2 +//! and 3) or undefined results will be returned by the ADC. Additionally, if +//! differential mode is selected when the temperature sensor is being sampled, +//! undefined results will be returned by the ADC. +//! +//! It is the responsibility of the caller to ensure that a valid configuration +//! is specified; this function does not check the validity of the specified +//! configuration. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceStepConfigure(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long ulStep, unsigned long ulConfig) +{ + unsigned long ulTemp; + + // + // Check the arugments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + ASSERT(((ulSequenceNum == 0) && (ulStep < 8)) || + ((ulSequenceNum == 1) && (ulStep < 4)) || + ((ulSequenceNum == 2) && (ulStep < 4)) || + ((ulSequenceNum == 3) && (ulStep < 1))); + + // + // Get the offset of the sequence to be configured. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Compute the shift for the bits that control this step. + // + ulStep *= 4; + + // + // Set the analog mux value for this step. + // + HWREG(ulBase + ADC_SSMUX) = ((HWREG(ulBase + ADC_SSMUX) & + ~(0x0000000f << ulStep)) | + ((ulConfig & 0x0f) << ulStep)); + + // + // Set the control value for this step. + // + HWREG(ulBase + ADC_SSCTL) = ((HWREG(ulBase + ADC_SSCTL) & + ~(0x0000000f << ulStep)) | + (((ulConfig & 0xf0) >> 4) << ulStep)); + + // + // Enable digital comparator if specified in the ulConfig bit-fields. + // + if(ulConfig & 0x000F0000) + { + // + // Program the comparator for the specified step. + // + ulTemp = HWREG(ulBase + ADC_SSDC); + ulTemp &= ~(0xF << ulStep); + ulTemp |= (((ulConfig & 0x00070000) >> 16) << ulStep); + HWREG(ulBase + ADC_SSDC) = ulTemp; + + // + // Enable the comparator. + // + ulTemp = HWREG(ulBase + ADC_SSOP); + ulTemp |= (1 << ulStep); + HWREG(ulBase + ADC_SSOP) = ulTemp; + } + + // + // Disable digital comparator if not specified. + // + else + { + ulTemp = HWREG(ulBase + ADC_SSOP); + ulTemp &= ~(1 << ulStep); + HWREG(ulBase + ADC_SSOP) = ulTemp; + } +} + +//***************************************************************************** +// +//! Determines if a sample sequence overflow occurred. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This determines if a sample sequence overflow has occurred. This will +//! happen if the captured samples are not read from the FIFO before the next +//! trigger occurs. +//! +//! \return Returns zero if there was not an overflow, and non-zero if there +//! was. +// +//***************************************************************************** +long +ADCSequenceOverflow(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine if there was an overflow on this sequence. + // + return(HWREG(ulBase + ADC_O_OSTAT) & (1 << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Clears the overflow condition on a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This will clear an overflow condition on one of the sample sequences. The +//! overflow condition must be cleared in order to detect a subsequent overflow +//! condition (it otherwise causes no harm). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceOverflowClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the overflow condition for this sequence. + // + HWREG(ulBase + ADC_O_OSTAT) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Determines if a sample sequence underflow occurred. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This determines if a sample sequence underflow has occurred. This will +//! happen if too many samples are read from the FIFO. +//! +//! \return Returns zero if there was not an underflow, and non-zero if there +//! was. +// +//***************************************************************************** +long +ADCSequenceUnderflow(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Determine if there was an underflow on this sequence. + // + return(HWREG(ulBase + ADC_O_USTAT) & (1 << ulSequenceNum)); +} + +//***************************************************************************** +// +//! Clears the underflow condition on a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This will clear an underflow condition on one of the sample sequences. The +//! underflow condition must be cleared in order to detect a subsequent +//! underflow condition (it otherwise causes no harm). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSequenceUnderflowClear(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Clear the underflow condition for this sequence. + // + HWREG(ulBase + ADC_O_USTAT) = 1 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the captured data for a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pulBuffer is the address where the data is stored. +//! +//! This function copies data from the specified sample sequence output FIFO to +//! a memory resident buffer. The number of samples available in the hardware +//! FIFO are copied into the buffer, which is assumed to be large enough to +//! hold that many samples. This will only return the samples that are +//! presently available, which may not be the entire sample sequence if it is +//! in the process of being executed. +//! +//! \return Returns the number of samples copied to the buffer. +// +//***************************************************************************** +long +ADCSequenceDataGet(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long *pulBuffer) +{ + unsigned long ulCount; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Get the offset of the sequence to be read. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Read samples from the FIFO until it is empty. + // + ulCount = 0; + while(!(HWREG(ulBase + ADC_SSFSTAT) & ADC_SSFSTAT0_EMPTY) && (ulCount < 8)) + { + // + // Read the FIFO and copy it to the destination. + // + *pulBuffer++ = HWREG(ulBase + ADC_SSFIFO); + + // + // Increment the count of samples read. + // + ulCount++; + } + + // + // Return the number of samples read. + // + return(ulCount); +} + +//***************************************************************************** +// +//! Causes a processor trigger for a sample sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number, with +//! \b ADC_TRIGGER_WAIT or \b ADC_TRIGGER_SIGNAL optionally ORed into it. +//! +//! This function triggers a processor-initiated sample sequence if the sample +//! sequence trigger is configured to \b ADC_TRIGGER_PROCESSOR. If +//! \b ADC_TRIGGER_WAIT is ORed into the sequence number, the +//! processor-initiated trigger is delayed until a later processor-initiated +//! trigger to a different ADC module that specifies \b ADC_TRIGGER_SIGNAL, +//! allowing multiple ADCs to start from a processor-initiated trigger in a +//! synchronous manner. +//! +//! \return None. +// +//***************************************************************************** +void +ADCProcessorTrigger(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulSequenceNum & 0xf) < 4); + + // + // Generate a processor trigger for this sample sequence. + // + HWREG(ulBase + ADC_O_PSSI) = ((ulSequenceNum & 0xffff0000) | + (1 << (ulSequenceNum & 0xf))); +} + +//***************************************************************************** +// +//! Configures the software oversampling factor of the ADC. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulFactor is the number of samples to be averaged. +//! +//! This function configures the software oversampling for the ADC, which can +//! be used to provide better resolution on the sampled data. Oversampling is +//! accomplished by averaging multiple samples from the same analog input. +//! Three different oversampling rates are supported; 2x, 4x, and 8x. +//! +//! Oversampling is only supported on the sample sequencers that are more than +//! one sample in depth (that is, the fourth sample sequencer is not +//! supported). Oversampling by 2x (for example) divides the depth of the +//! sample sequencer by two; so 2x oversampling on the first sample sequencer +//! can only provide four samples per trigger. This also means that 8x +//! oversampling is only available on the first sample sequencer. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulFactor) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulFactor == 2) || (ulFactor == 4) || (ulFactor == 8)) && + ((ulSequenceNum == 0) || (ulFactor != 8))); + + // + // Convert the oversampling factor to a shift factor. + // + for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1) + { + } + + // + // Save the sfiht factor. + // + g_pucOversampleFactor[ulSequenceNum] = ulValue; +} + +//***************************************************************************** +// +//! Configures a step of the software oversampled sequencer. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param ulStep is the step to be configured. +//! \param ulConfig is the configuration of this step. +//! +//! This function configures a step of the sample sequencer when using the +//! software oversampling feature. The number of steps available depends on +//! the oversampling factor set by ADCSoftwareOversampleConfigure(). The value +//! of \e ulConfig is the same as defined for ADCSequenceStepConfigure(). +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulSequenceNum == 0) && + (ulStep < (8 >> g_pucOversampleFactor[ulSequenceNum]))) || + (ulStep < (4 >> g_pucOversampleFactor[ulSequenceNum]))); + + // + // Get the offset of the sequence to be configured. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Compute the shift for the bits that control this step. + // + ulStep *= 4 << g_pucOversampleFactor[ulSequenceNum]; + + // + // Loop through the hardware steps that make up this step of the software + // oversampled sequence. + // + for(ulSequenceNum = 1 << g_pucOversampleFactor[ulSequenceNum]; + ulSequenceNum; ulSequenceNum--) + { + // + // Set the analog mux value for this step. + // + HWREG(ulBase + ADC_SSMUX) = ((HWREG(ulBase + ADC_SSMUX) & + ~(0x0000000f << ulStep)) | + ((ulConfig & 0x0f) << ulStep)); + + // + // Set the control value for this step. + // + HWREG(ulBase + ADC_SSCTL) = ((HWREG(ulBase + ADC_SSCTL) & + ~(0x0000000f << ulStep)) | + (((ulConfig & 0xf0) >> 4) << ulStep)); + if(ulSequenceNum != 1) + { + HWREG(ulBase + ADC_SSCTL) &= ~((ADC_SSCTL0_IE0 | + ADC_SSCTL0_END0) << ulStep); + } + + // + // Go to the next hardware step. + // + ulStep += 4; + } +} + +//***************************************************************************** +// +//! Gets the captured data for a sample sequence using software oversampling. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! \param pulBuffer is the address where the data is stored. +//! \param ulCount is the number of samples to be read. +//! +//! This function copies data from the specified sample sequence output FIFO to +//! a memory resident buffer with software oversampling applied. The requested +//! number of samples are copied into the data buffer; if there are not enough +//! samples in the hardware FIFO to satisfy this many oversampled data items +//! then incorrect results will be returned. It is the caller's responsibility +//! to read only the samples that are available and wait until enough data is +//! available, for example as a result of receiving an interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCSoftwareOversampleDataGet(unsigned long ulBase, unsigned long ulSequenceNum, + unsigned long *pulBuffer, unsigned long ulCount) +{ + unsigned long ulIdx, ulAccum; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 3); + ASSERT(((ulSequenceNum == 0) && + (ulCount < (8 >> g_pucOversampleFactor[ulSequenceNum]))) || + (ulCount < (4 >> g_pucOversampleFactor[ulSequenceNum]))); + + // + // Get the offset of the sequence to be read. + // + ulBase += ADC_SEQ + (ADC_SEQ_STEP * ulSequenceNum); + + // + // Read the samples from the FIFO until it is empty. + // + while(ulCount--) + { + // + // Compute the sum of the samples. + // + ulAccum = 0; + for(ulIdx = 1 << g_pucOversampleFactor[ulSequenceNum]; ulIdx; ulIdx--) + { + // + // Read the FIFO and add it to the accumulator. + // + ulAccum += HWREG(ulBase + ADC_SSFIFO); + } + + // + // Write the averaged sample to the output buffer. + // + *pulBuffer++ = ulAccum >> g_pucOversampleFactor[ulSequenceNum]; + } +} + +//***************************************************************************** +// +//! Configures the hardware oversampling factor of the ADC. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulFactor is the number of samples to be averaged. +//! +//! This function configures the hardware oversampling for the ADC, which can +//! be used to provide better resolution on the sampled data. Oversampling is +//! accomplished by averaging multiple samples from the same analog input. Six +//! different oversampling rates are supported; 2x, 4x, 8x, 16x, 32x, and 64x. +//! Specifying an oversampling factor of zero will disable hardware +//! oversampling. +//! +//! Hardware oversampling applies uniformly to all sample sequencers. It does +//! not reduce the depth of the sample sequencers like the software +//! oversampling APIs; each sample written into the sample sequence FIFO is a +//! fully oversampled analog input reading. +//! +//! Enabling hardware averaging increases the precision of the ADC at the cost +//! of throughput. For example, enabling 4x oversampling reduces the +//! throughput of a 250 Ksps ADC to 62.5 Ksps. +//! +//! \note Hardware oversampling is available beginning with Rev C0 of the +//! Stellaris microcontroller. +//! +//! \return None. +// +//***************************************************************************** +void +ADCHardwareOversampleConfigure(unsigned long ulBase, unsigned long ulFactor) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(((ulFactor == 0) || (ulFactor == 2) || (ulFactor == 4) || + (ulFactor == 8) || (ulFactor == 16) || (ulFactor == 32) || + (ulFactor == 64))); + + // + // Convert the oversampling factor to a shift factor. + // + for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1) + { + } + + // + // Write the shift factor to the ADC to configure the hardware oversampler. + // + HWREG(ulBase + ADC_O_SAC) = ulValue; +} + +//***************************************************************************** +// +//! Configures an ADC digital comparator. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulConfig is the configuration of the comparator. +//! +//! This function will configure a comparator. The \e ulConfig parameter is +//! the result of a logical OR operation between the \b ADC_COMP_TRIG_xxx, and +//! \b ADC_COMP_INT_xxx values. +//! +//! The \b ADC_COMP_TRIG_xxx term can take on the following values: +//! +//! - \b ADC_COMP_TRIG_NONE to never trigger PWM fault condition. +//! - \b ADC_COMP_TRIG_LOW_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the low-band. +//! - \b ADC_COMP_TRIG_LOW_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the low-band. +//! - \b ADC_COMP_TRIG_LOW_HALWAYS to always trigger PWM fault condition when +//! ADC output is in the low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_TRIG_LOW_HONCE to trigger PWM fault condition once when ADC +//! output transitions into low-band only if ADC output has been in the +//! high-band since the last trigger output. +//! - \b ADC_COMP_TRIG_MID_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the mid-band. +//! - \b ADC_COMP_TRIG_MID_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the mid-band. +//! - \b ADC_COMP_TRIG_HIGH_ALWAYS to always trigger PWM fault condition when +//! ADC output is in the high-band. +//! - \b ADC_COMP_TRIG_HIGH_ONCE to trigger PWM fault condition once when ADC +//! output transitions into the high-band. +//! - \b ADC_COMP_TRIG_HIGH_HALWAYS to always trigger PWM fault condition when +//! ADC output is in the high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! - \b ADC_COMP_TRIG_HIGH_HONCE to trigger PWM fault condition once when ADC +//! output transitions into high-band only if ADC output has been in the +//! low-band since the last trigger output. +//! +//! The \b ADC_COMP_INT_xxx term can take on the following values: +//! +//! - \b ADC_COMP_INT_NONE to never generate ADC interrupt. +//! - \b ADC_COMP_INT_LOW_ALWAYS to always generate ADC interrupt when ADC +//! output is in the low-band. +//! - \b ADC_COMP_INT_LOW_ONCE to generate ADC interrupt once when ADC output +//! transitions into the low-band. +//! - \b ADC_COMP__INT_LOW_HALWAYS to always generate ADC interrupt when ADC +//! output is in the low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_LOW_HONCE to generate ADC interrupt once when ADC output +//! transitions into low-band only if ADC output has been in the high-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_MID_ALWAYS to always generate ADC interrupt when ADC +//! output is in the mid-band. +//! - \b ADC_COMP_INT_MID_ONCE to generate ADC interrupt once when ADC output +//! transitions into the mid-band. +//! - \b ADC_COMP_INT_HIGH_ALWAYS to always generate ADC interrupt when ADC +//! output is in the high-band. +//! - \b ADC_COMP_INT_HIGH_ONCE to generate ADC interrupt once when ADC output +//! transitions into the high-band. +//! - \b ADC_COMP_INT_HIGH_HALWAYS to always generate ADC interrupt when ADC +//! output is in the high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! - \b ADC_COMP_INT_HIGH_HONCE to generate ADC interrupt once when ADC output +//! transitions into high-band only if ADC output has been in the low-band +//! since the last trigger output. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + + // + // Save the new setting. + // + HWREG(ulBase + ADC_O_DCCTL0 + (ulComp * 4)) = ulConfig; +} + +//***************************************************************************** +// +//! Defines the ADC digital comparator regions. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulLowRef is the reference point for the low/mid band threshold. +//! \param ulHighRef is the reference point for the mid/high band threshold. +//! +//! The ADC digital comparator operation is based on three ADC value regions: +//! - \b low-band is defined as any ADC value less than or equal to the +//! \e ulLowRef value. +//! - \b mid-band is defined as any ADC value greater than the \e ulLowRef +//! value but less than or equal to the \e ulHighRef value. +//! - \b high-band is defined as any ADC value greater than the \e ulHighRef +//! value. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorRegionSet(unsigned long ulBase, unsigned long ulComp, + unsigned long ulLowRef, unsigned long ulHighRef) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + ASSERT((ulLowRef < 1024) && (ulLowRef <= ulHighRef)); + ASSERT(ulHighRef < 1024); + + // + // Save the new region settings. + // + HWREG(ulBase + ADC_O_DCCMP0 + (ulComp * 4)) = (ulHighRef << 16) | ulLowRef; +} + +//***************************************************************************** +// +//! Resets the current ADC digital comparator conditions. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulComp is the index of the comparator. +//! \param bTrigger is the flag to indicate reset of Trigger conditions. +//! \param bInterrupt is the flag to indicate reset of Interrupt conditions. +//! +//! Because the digital comparator uses current and previous ADC values, this +//! function is provide to allow the comparator to be reset to its initial +//! value to prevent stale data from being used when a sequence is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorReset(unsigned long ulBase, unsigned long ulComp, + tBoolean bTrigger, tBoolean bInterrupt) +{ + unsigned long ulTemp = 0; + + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulComp < 8); + + // + // Set the appropriate bits to reset the trigger and/or interrupt + // comparator conditions. + // + if(bTrigger) + { + ulTemp |= (1 << (16 + ulComp)); + } + if(bInterrupt) + { + ulTemp |= (1 << ulComp); + } + + HWREG(ulBase + ADC_O_DCRIC) = ulTemp; +} + +//***************************************************************************** +// +//! Disables a sample sequence comparator interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function disables the requested sample sequence comparator interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntDisable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Disable this sample sequence comparator interrupt. + // + HWREG(ulBase + ADC_O_IM) &= ~(0x10000 << ulSequenceNum); +} + +//***************************************************************************** +// +//! Enables a sample sequence comparator interrupt. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulSequenceNum is the sample sequence number. +//! +//! This function enables the requested sample sequence comparator interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntEnable(unsigned long ulBase, unsigned long ulSequenceNum) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT(ulSequenceNum < 4); + + // + // Enable this sample sequence interrupt. + // + HWREG(ulBase + ADC_O_IM) |= 0x10000 << ulSequenceNum; +} + +//***************************************************************************** +// +//! Gets the current comparator interrupt status. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! This returns the digitial comparator interrupt status bits. This status +//! is sequence agnostic. +//! +//! \return The current comparator interrupt status. +// +//***************************************************************************** +unsigned long +ADCComparatorIntStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the digitial comparator interrupt status. + // + return(HWREG(ulBase + ADC_O_DCISC)); +} + +//***************************************************************************** +// +//! Clears sample sequence comparator interrupt source. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulStatus is the bit-mapped interrupts status to clear. +//! +//! The specified interrupt status is cleared. +//! +//! \return None. +// +//***************************************************************************** +void +ADCComparatorIntClear(unsigned long ulBase, unsigned long ulStatus) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Clear the interrupt. + // + HWREG(ulBase + ADC_O_DCISC) = ulStatus; +} + +//***************************************************************************** +// +//! Selects the ADC reference. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulRef is the reference to use. +//! +//! The ADC reference is set as specified by \e ulRef. It must be one of +//! \b ADC_REF_INT or \b ADC_REF_EXT_3V, for internal or external reference. +//! If \b ADC_REF_INT is chosen, then an internal 3V reference is used and +//! no external reference is needed. If \b ADC_REF_EXT_3V is chosen, then a 3V +//! reference must be supplied to the AVREF pin. +//! +//! \note The ADC reference can only be selected on parts that have an external +//! reference. Consult the data sheet for your part to determine if there is +//! an external reference. +//! +//! \return None. +// +//***************************************************************************** +void +ADCReferenceSet(unsigned long ulBase, unsigned long ulRef) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulRef == ADC_REF_INT) || (ulRef == ADC_REF_EXT_3V)); + + // + // Set the reference. + // + HWREG(ulBase + ADC_O_CTL) = (HWREG(ulBase + ADC_O_CTL) & ~ADC_CTL_VREF) | + ulRef; +} + +//***************************************************************************** +// +//! Returns the current setting of the ADC reference. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! Returns the value of the ADC reference setting. The returned value will be +//! one of \b ADC_REF_INT or \b ADC_REF_EXT_3V. +//! +//! \note The value returned by this function is only meaningful if used on a +//! part that is capable of using an external reference. Consult the data +//! sheet for your part to determine if it has an external reference input. +//! +//! \return The current setting of the ADC reference. +// +//***************************************************************************** +unsigned long +ADCReferenceGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the value of the reference. + // + return(HWREG(ulBase + ADC_O_CTL) & ADC_CTL_VREF); +} + +//***************************************************************************** +// +//! Sets the phase delay between a trigger and the start of a sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! \param ulPhase is the phase delay, specified as one of \b ADC_PHASE_0, +//! \b ADC_PHASE_22_5, \b ADC_PHASE_45, \b ADC_PHASE_67_5, \b ADC_PHASE_90, +//! \b ADC_PHASE_112_5, \b ADC_PHASE_135, \b ADC_PHASE_157_5, \b ADC_PHASE_180, +//! \b ADC_PHASE_202_5, \b ADC_PHASE_225, \b ADC_PHASE_247_5, \b ADC_PHASE_270, +//! \b ADC_PHASE_292_5, \b ADC_PHASE_315, or \b ADC_PHASE_337_5. +//! +//! This function sets the phase delay between the detection of an ADC trigger +//! event and the start of the sample sequence. By selecting a different phase +//! delay for a pair of ADC modules (such as \b ADC_PHASE_0 and +//! \b ADC_PHASE_180) and having each ADC module sample the same analog input, +//! it is possible to increase the sampling rate of the analog input (with +//! samples N, N+2, N+4, and so on, coming from the first ADC and samples N+1, +//! N+3, N+5, and so on, coming from the second ADC). The ADC module has a +//! single phase delay that is applied to all sample sequences within that +//! module. +//! +//! \note This capability is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +ADCPhaseDelaySet(unsigned long ulBase, unsigned long ulPhase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + ASSERT((ulPhase == ADC_PHASE_0) || (ulPhase == ADC_PHASE_22_5) || + (ulPhase == ADC_PHASE_45) || (ulPhase == ADC_PHASE_67_5) || + (ulPhase == ADC_PHASE_90) || (ulPhase == ADC_PHASE_112_5) || + (ulPhase == ADC_PHASE_135) || (ulPhase == ADC_PHASE_157_5) || + (ulPhase == ADC_PHASE_180) || (ulPhase == ADC_PHASE_202_5) || + (ulPhase == ADC_PHASE_225) || (ulPhase == ADC_PHASE_247_5) || + (ulPhase == ADC_PHASE_270) || (ulPhase == ADC_PHASE_292_5) || + (ulPhase == ADC_PHASE_315) || (ulPhase == ADC_PHASE_337_5)); + + // + // Set the phase delay. + // + HWREG(ulBase + ADC_O_SPC) = ulPhase; +} + +//***************************************************************************** +// +//! Gets the phase delay between a trigger and the start of a sequence. +//! +//! \param ulBase is the base address of the ADC module. +//! +//! This function gets the current phase delay between the detection of an ADC +//! trigger event and the start of the sample sequence. +//! +//! \return Returns the phase delay, specified as one of \b ADC_PHASE_0, +//! \b ADC_PHASE_22_5, \b ADC_PHASE_45, \b ADC_PHASE_67_5, \b ADC_PHASE_90, +//! \b ADC_PHASE_112_5, \b ADC_PHASE_135, \b ADC_PHASE_157_5, \b ADC_PHASE_180, +//! \b ADC_PHASE_202_5, \b ADC_PHASE_225, \b ADC_PHASE_247_5, \b ADC_PHASE_270, +//! \b ADC_PHASE_292_5, \b ADC_PHASE_315, or \b ADC_PHASE_337_5. +// +//***************************************************************************** +unsigned long +ADCPhaseDelayGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE)); + + // + // Return the phase delay. + // + return(HWREG(ulBase + ADC_O_SPC)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.h new file mode 100644 index 00000000..f47a21f7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/adc.h @@ -0,0 +1,258 @@ +//***************************************************************************** +// +// adc.h - ADC headers for using the ADC driver functions. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ADC_H__ +#define __ADC_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to ADCSequenceConfigure as the ulTrigger +// parameter. +// +//***************************************************************************** +#define ADC_TRIGGER_PROCESSOR 0x00000000 // Processor event +#define ADC_TRIGGER_COMP0 0x00000001 // Analog comparator 0 event +#define ADC_TRIGGER_COMP1 0x00000002 // Analog comparator 1 event +#define ADC_TRIGGER_COMP2 0x00000003 // Analog comparator 2 event +#define ADC_TRIGGER_EXTERNAL 0x00000004 // External event +#define ADC_TRIGGER_TIMER 0x00000005 // Timer event +#define ADC_TRIGGER_PWM0 0x00000006 // PWM0 event +#define ADC_TRIGGER_PWM1 0x00000007 // PWM1 event +#define ADC_TRIGGER_PWM2 0x00000008 // PWM2 event +#define ADC_TRIGGER_PWM3 0x00000009 // PWM3 event +#define ADC_TRIGGER_ALWAYS 0x0000000F // Always event + +//***************************************************************************** +// +// Values that can be passed to ADCSequenceStepConfigure as the ulConfig +// parameter. +// +//***************************************************************************** +#define ADC_CTL_TS 0x00000080 // Temperature sensor select +#define ADC_CTL_IE 0x00000040 // Interrupt enable +#define ADC_CTL_END 0x00000020 // Sequence end select +#define ADC_CTL_D 0x00000010 // Differential select +#define ADC_CTL_CH0 0x00000000 // Input channel 0 +#define ADC_CTL_CH1 0x00000001 // Input channel 1 +#define ADC_CTL_CH2 0x00000002 // Input channel 2 +#define ADC_CTL_CH3 0x00000003 // Input channel 3 +#define ADC_CTL_CH4 0x00000004 // Input channel 4 +#define ADC_CTL_CH5 0x00000005 // Input channel 5 +#define ADC_CTL_CH6 0x00000006 // Input channel 6 +#define ADC_CTL_CH7 0x00000007 // Input channel 7 +#define ADC_CTL_CH8 0x00000008 // Input channel 8 +#define ADC_CTL_CH9 0x00000009 // Input channel 9 +#define ADC_CTL_CH10 0x0000000A // Input channel 10 +#define ADC_CTL_CH11 0x0000000B // Input channel 11 +#define ADC_CTL_CH12 0x0000000C // Input channel 12 +#define ADC_CTL_CH13 0x0000000D // Input channel 13 +#define ADC_CTL_CH14 0x0000000E // Input channel 14 +#define ADC_CTL_CH15 0x0000000F // Input channel 15 +#define ADC_CTL_CMP0 0x00080000 // Select Comparator 0 +#define ADC_CTL_CMP1 0x00090000 // Select Comparator 1 +#define ADC_CTL_CMP2 0x000A0000 // Select Comparator 2 +#define ADC_CTL_CMP3 0x000B0000 // Select Comparator 3 +#define ADC_CTL_CMP4 0x000C0000 // Select Comparator 4 +#define ADC_CTL_CMP5 0x000D0000 // Select Comparator 5 +#define ADC_CTL_CMP6 0x000E0000 // Select Comparator 6 +#define ADC_CTL_CMP7 0x000F0000 // Select Comparator 7 + +//***************************************************************************** +// +// Values that can be passed to ADCComparatorConfigure as part of the +// ulConfig parameter. +// +//***************************************************************************** +#define ADC_COMP_TRIG_NONE 0x00000000 // Trigger Disabled +#define ADC_COMP_TRIG_LOW_ALWAYS \ + 0x00001000 // Trigger Low Always +#define ADC_COMP_TRIG_LOW_ONCE 0x00001100 // Trigger Low Once +#define ADC_COMP_TRIG_LOW_HALWAYS \ + 0x00001200 // Trigger Low Always (Hysteresis) +#define ADC_COMP_TRIG_LOW_HONCE 0x00001300 // Trigger Low Once (Hysteresis) +#define ADC_COMP_TRIG_MID_ALWAYS \ + 0x00001400 // Trigger Mid Always +#define ADC_COMP_TRIG_MID_ONCE 0x00001500 // Trigger Mid Once +#define ADC_COMP_TRIG_HIGH_ALWAYS \ + 0x00001C00 // Trigger High Always +#define ADC_COMP_TRIG_HIGH_ONCE 0x00001D00 // Trigger High Once +#define ADC_COMP_TRIG_HIGH_HALWAYS \ + 0x00001E00 // Trigger High Always (Hysteresis) +#define ADC_COMP_TRIG_HIGH_HONCE \ + 0x00001F00 // Trigger High Once (Hysteresis) + +#define ADC_COMP_INT_NONE 0x00000000 // Interrupt Disabled +#define ADC_COMP_INT_LOW_ALWAYS \ + 0x00000010 // Interrupt Low Always +#define ADC_COMP_INT_LOW_ONCE 0x00000011 // Interrupt Low Once +#define ADC_COMP_INT_LOW_HALWAYS \ + 0x00000012 // Interrupt Low Always + // (Hysteresis) +#define ADC_COMP_INT_LOW_HONCE 0x00000013 // Interrupt Low Once (Hysteresis) +#define ADC_COMP_INT_MID_ALWAYS \ + 0x00000014 // Interrupt Mid Always +#define ADC_COMP_INT_MID_ONCE 0x00000015 // Interrupt Mid Once +#define ADC_COMP_INT_HIGH_ALWAYS \ + 0x0000001C // Interrupt High Always +#define ADC_COMP_INT_HIGH_ONCE 0x0000001D // Interrupt High Once +#define ADC_COMP_INT_HIGH_HALWAYS \ + 0x0000001E // Interrupt High Always + // (Hysteresis) +#define ADC_COMP_INT_HIGH_HONCE \ + 0x0000001F // Interrupt High Once (Hysteresis) + +//***************************************************************************** +// +// Values that can be used to modify the sequence number passed to +// ADCProcessorTrigger in order to get cross-module synchronous processor +// triggers. +// +//***************************************************************************** +#define ADC_TRIGGER_WAIT 0x08000000 // Wait for the synchronous trigger +#define ADC_TRIGGER_SIGNAL 0x80000000 // Signal the synchronous trigger + +//***************************************************************************** +// +// Values that can be passed to ADCPhaseDelaySet as the ulPhase parameter and +// returned from ADCPhaseDelayGet. +// +//***************************************************************************** +#define ADC_PHASE_0 0x00000000 // 0 degrees +#define ADC_PHASE_22_5 0x00000001 // 22.5 degrees +#define ADC_PHASE_45 0x00000002 // 45 degrees +#define ADC_PHASE_67_5 0x00000003 // 67.5 degrees +#define ADC_PHASE_90 0x00000004 // 90 degrees +#define ADC_PHASE_112_5 0x00000005 // 112.5 degrees +#define ADC_PHASE_135 0x00000006 // 135 degrees +#define ADC_PHASE_157_5 0x00000007 // 157.5 degrees +#define ADC_PHASE_180 0x00000008 // 180 degrees +#define ADC_PHASE_202_5 0x00000009 // 202.5 degrees +#define ADC_PHASE_225 0x0000000A // 225 degrees +#define ADC_PHASE_247_5 0x0000000B // 247.5 degrees +#define ADC_PHASE_270 0x0000000C // 270 degrees +#define ADC_PHASE_292_5 0x0000000D // 292.5 degrees +#define ADC_PHASE_315 0x0000000E // 315 degrees +#define ADC_PHASE_337_5 0x0000000F // 337.5 degrees + +//***************************************************************************** +// +// Values that can be passed to ADCReferenceSet as the ulRef parameter. +// +//***************************************************************************** +#define ADC_REF_INT 0x00000000 // Internal reference +#define ADC_REF_EXT_3V 0x00000001 // External 3V reference + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void ADCIntRegister(unsigned long ulBase, unsigned long ulSequenceNum, + void (*pfnHandler)(void)); +extern void ADCIntUnregister(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCIntDisable(unsigned long ulBase, unsigned long ulSequenceNum); +extern void ADCIntEnable(unsigned long ulBase, unsigned long ulSequenceNum); +extern unsigned long ADCIntStatus(unsigned long ulBase, + unsigned long ulSequenceNum, + tBoolean bMasked); +extern void ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum); +extern void ADCSequenceEnable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceDisable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulTrigger, + unsigned long ulPriority); +extern void ADCSequenceStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig); +extern long ADCSequenceOverflow(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceOverflowClear(unsigned long ulBase, + unsigned long ulSequenceNum); +extern long ADCSequenceUnderflow(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSequenceUnderflowClear(unsigned long ulBase, + unsigned long ulSequenceNum); +extern long ADCSequenceDataGet(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long *pulBuffer); +extern void ADCProcessorTrigger(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCSoftwareOversampleConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulFactor); +extern void ADCSoftwareOversampleStepConfigure(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long ulStep, + unsigned long ulConfig); +extern void ADCSoftwareOversampleDataGet(unsigned long ulBase, + unsigned long ulSequenceNum, + unsigned long *pulBuffer, + unsigned long ulCount); +extern void ADCHardwareOversampleConfigure(unsigned long ulBase, + unsigned long ulFactor); +extern void ADCComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig); +extern void ADCComparatorRegionSet(unsigned long ulBase, unsigned long ulComp, + unsigned long ulLowRef, + unsigned long ulHighRef); +extern void ADCComparatorReset(unsigned long ulBase, unsigned long ulComp, + tBoolean bTrigger, tBoolean bInterrupt); +extern void ADCComparatorIntDisable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern void ADCComparatorIntEnable(unsigned long ulBase, + unsigned long ulSequenceNum); +extern unsigned long ADCComparatorIntStatus(unsigned long ulBase); +extern void ADCComparatorIntClear(unsigned long ulBase, + unsigned long ulStatus); +extern void ADCReferenceSet(unsigned long ulBase, unsigned long ulRef); +extern unsigned long ADCReferenceGet(unsigned long ulBase); +extern void ADCPhaseDelaySet(unsigned long ulBase, unsigned long ulPhase); +extern unsigned long ADCPhaseDelayGet(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __ADC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.c new file mode 100644 index 00000000..8f0a1d5e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.c @@ -0,0 +1,2249 @@ +//***************************************************************************** +// +// can.c - Driver for the CAN module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_can.h" +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/can.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is the maximum number that can be stored as an 11bit Message +// identifier. +// +//***************************************************************************** +#define CAN_MAX_11BIT_MSG_ID 0x7ff + +//***************************************************************************** +// +// This is used as the loop delay for accessing the CAN controller registers. +// +//***************************************************************************** +#define CAN_RW_DELAY 5 + +//***************************************************************************** +// +// The maximum CAN bit timing divisor is 19. +// +//***************************************************************************** +#define CAN_MAX_BIT_DIVISOR 19 + +//***************************************************************************** +// +// The minimum CAN bit timing divisor is 4. +// +//***************************************************************************** +#define CAN_MIN_BIT_DIVISOR 4 + +//***************************************************************************** +// +// The maximum CAN pre-divisor is 1024. +// +//***************************************************************************** +#define CAN_MAX_PRE_DIVISOR 1024 + +//***************************************************************************** +// +// The minimum CAN pre-divisor is 1. +// +//***************************************************************************** +#define CAN_MIN_PRE_DIVISOR 1 + +//***************************************************************************** +// +// Converts a set of CAN bit timing values into the value that needs to be +// programmed into the CAN_BIT register to achieve those timings. +// +//***************************************************************************** +#define CAN_BIT_VALUE(seg1, seg2, sjw) \ + ((((seg1 - 1) << CAN_BIT_TSEG1_S) & \ + CAN_BIT_TSEG1_M) | \ + (((seg2 - 1) << CAN_BIT_TSEG2_S) & \ + CAN_BIT_TSEG2_M) | \ + (((sjw - 1) << CAN_BIT_SJW_S) & \ + CAN_BIT_SJW_M)) + +//***************************************************************************** +// +// This table is used by the CANBitRateSet() API as the register defaults for +// the bit timing values. +// +//***************************************************************************** +static const unsigned short g_usCANBitValues[] = +{ + CAN_BIT_VALUE(2, 1, 1), // 4 clocks/bit + CAN_BIT_VALUE(3, 1, 1), // 5 clocks/bit + CAN_BIT_VALUE(3, 2, 2), // 6 clocks/bit + CAN_BIT_VALUE(4, 2, 2), // 7 clocks/bit + CAN_BIT_VALUE(4, 3, 3), // 8 clocks/bit + CAN_BIT_VALUE(5, 3, 3), // 9 clocks/bit + CAN_BIT_VALUE(5, 4, 4), // 10 clocks/bit + CAN_BIT_VALUE(6, 4, 4), // 11 clocks/bit + CAN_BIT_VALUE(6, 5, 4), // 12 clocks/bit + CAN_BIT_VALUE(7, 5, 4), // 13 clocks/bit + CAN_BIT_VALUE(7, 6, 4), // 14 clocks/bit + CAN_BIT_VALUE(8, 6, 4), // 15 clocks/bit + CAN_BIT_VALUE(8, 7, 4), // 16 clocks/bit + CAN_BIT_VALUE(9, 7, 4), // 17 clocks/bit + CAN_BIT_VALUE(9, 8, 4), // 18 clocks/bit + CAN_BIT_VALUE(10, 8, 4) // 19 clocks/bit +}; + +//***************************************************************************** +// +//! \internal +//! Checks a CAN base address. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! This function determines if a CAN controller base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +CANBaseValid(unsigned long ulBase) +{ + return((ulBase == CAN0_BASE) || (ulBase == CAN1_BASE) || + (ulBase == CAN2_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! +//! Returns the CAN controller interrupt number. +//! +//! \param ulBase is the base address of the selected CAN controller +//! +//! Given a CAN controller base address, returns the corresponding interrupt +//! number. +//! +//! This function replaces the original CANGetIntNumber() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return Returns a CAN interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +CANIntNumberGet(unsigned long ulBase) +{ + long lIntNumber; + + // + // Return the interrupt number for the given CAN controller. + // + switch(ulBase) + { + // + // Return the interrupt number for CAN 0 + // + case CAN0_BASE: + { + lIntNumber = INT_CAN0; + break; + } + + // + // Return the interrupt number for CAN 1 + // + case CAN1_BASE: + { + lIntNumber = INT_CAN1; + break; + } + + // + // Return the interrupt number for CAN 2 + // + case CAN2_BASE: + { + lIntNumber = INT_CAN2; + break; + } + + // + // Return -1 to indicate a bad address was passed in. + // + default: + { + lIntNumber = -1; + } + } + return(lIntNumber); +} + +//***************************************************************************** +// +//! \internal +//! +//! Reads a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be read. +//! +//! This function performs the necessary synchronization to read from a CAN +//! controller register. +//! +//! This function replaces the original CANReadReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note This function provides the delay required to access CAN registers. +//! This delay is required when accessing CAN registers directly. +//! +//! \return Returns the value read from the register. +// +//***************************************************************************** +static unsigned long +CANRegRead(unsigned long ulRegAddress) +{ + volatile int iDelay; + unsigned long ulRetVal; + unsigned long ulIntNumber; + unsigned long ulReenableInts; + + // + // Get the CAN interrupt number from the register base address. + // + ulIntNumber = CANIntNumberGet(ulRegAddress & 0xfffff000); + + // + // Make sure that the CAN base address was valid. + // + ASSERT(ulIntNumber != (unsigned long)-1); + + // + // Remember current state so that CAN interrupts are only re-enabled if + // they were already enabled. + // + ulReenableInts = HWREG(NVIC_EN1) & (1 << (ulIntNumber - 48)); + + // + // If the CAN interrupt was enabled then disable it. + // + if(ulReenableInts) + { + IntDisable(ulIntNumber); + } + + // + // Trigger the initial read to the CAN controller. The value returned at + // this point is not valid. + // + HWREG(ulRegAddress); + + // + // This delay is necessary for the CAN have the correct data on the bus. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } + + // + // Do the final read that has the valid value of the register. + // + ulRetVal = HWREG(ulRegAddress); + + // + // Enable CAN interrupts if they were enabled before this call. + // + if(ulReenableInts) + { + IntEnable(ulIntNumber); + } + + return(ulRetVal); +} + +//***************************************************************************** +// +//! \internal +//! +//! Writes a CAN controller register. +//! +//! \param ulRegAddress is the full address of the CAN register to be written. +//! \param ulRegValue is the value to write into the register specified by +//! \e ulRegAddress. +//! +//! This function takes care of the synchronization necessary to write to a +//! CAN controller register. +//! +//! This function replaces the original CANWriteReg() API and performs the same +//! actions. A macro is provided in can.h to map the original API to +//! this API. +//! +//! \note The delays in this function are required when accessing CAN registers +//! directly. +//! +//! \return None. +// +//***************************************************************************** +static void +CANRegWrite(unsigned long ulRegAddress, unsigned long ulRegValue) +{ + volatile int iDelay; + + // + // Trigger the initial write to the CAN controller. The value will not make + // it out to the CAN controller for CAN_RW_DELAY cycles. + // + HWREG(ulRegAddress) = ulRegValue; + + // + // Delay to allow the CAN controller to receive the new data. + // + for(iDelay = 0; iDelay < CAN_RW_DELAY; iDelay++) + { + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the data to be written out to the CAN +//! controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 0, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy into the CAN controller. +//! +//! This function takes the steps necessary to copy data from a contiguous +//! buffer in memory into the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageSet() +//! function. +//! +//! This function replaces the original CANWriteDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegWrite(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + + // + // Write out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = pucData[iIdx++]; + + // + // Only write the second byte if needed otherwise it will be zero. + // + if(iIdx < iSize) + { + ulValue |= (pucData[iIdx++] << 8); + } + CANRegWrite((unsigned long)(pulRegister++), ulValue); + } +} + +//***************************************************************************** +// +//! \internal +//! +//! Copies data from a buffer to the CAN Data registers. +//! +//! \param pucData is a pointer to the location to store the data read from the +//! CAN controller's data registers. +//! \param pulRegister is an unsigned long pointer to the first register of the +//! CAN controller's data registers. For example, in order to use the IF1 +//! register set on CAN controller 1, the value would be: \b CAN0_BASE \b + +//! \b CAN_O_IF1DA1. +//! \param iSize is the number of bytes to copy from the CAN controller. +//! +//! This function takes the steps necessary to copy data to a contiguous buffer +//! in memory from the non-contiguous data registers used by the CAN +//! controller. This function is rarely used outside of the CANMessageGet() +//! function. +//! +//! This function replaces the original CANReadDataReg() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +static void +CANDataRegRead(unsigned char *pucData, unsigned long *pulRegister, int iSize) +{ + int iIdx; + unsigned long ulValue; + + // + // Loop always copies 1 or 2 bytes per iteration. + // + for(iIdx = 0; iIdx < iSize; ) + { + // + // Read out the data 16 bits at a time since this is how the registers + // are aligned in memory. + // + ulValue = CANRegRead((unsigned long)(pulRegister++)); + + // + // Store the first byte. + // + pucData[iIdx++] = (unsigned char)ulValue; + + // + // Only read the second byte if needed. + // + if(iIdx < iSize) + { + pucData[iIdx++] = (unsigned char)(ulValue >> 8); + } + } +} + +//***************************************************************************** +// +//! Initializes the CAN controller after reset. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! After reset, the CAN controller is left in the disabled state. However, +//! the memory used for message objects contains undefined values and must be +//! cleared prior to enabling the CAN controller the first time. This prevents +//! unwanted transmission or reception of data before the message objects are +//! configured. This function must be called before enabling the controller +//! the first time. +//! +//! \return None. +// +//***************************************************************************** +void +CANInit(unsigned long ulBase) +{ + int iMsg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Place CAN controller in init state, regardless of previous state. This + // will put controller in idle, and allow the message object RAM to be + // programmed. + // + CANRegWrite(ulBase + CAN_O_CTL, CAN_CTL_INIT); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid and is a "safe" condition to leave the message + // object. The same arb reg is used to program all the message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB | + CAN_IF1CMSK_CONTROL); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + CANRegWrite(ulBase + CAN_O_IF1MCTL, 0); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Make sure that the interrupt and new data flags are updated for the + // message objects. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_NEWDAT | + CAN_IF1CMSK_CLRINTPND); + + // + // Loop through to program all 32 message objects + // + for(iMsg = 1; iMsg <= 32; iMsg++) + { + // + // Wait for busy bit to clear. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, iMsg); + } + + // + // Acknowledge any pending status interrupts. + // + CANRegRead(ulBase + CAN_O_STS); +} + +//***************************************************************************** +// +//! Enables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to enable. +//! +//! Enables the CAN controller for message processing. Once enabled, the +//! controller will automatically transmit any pending frames, and process any +//! received frames. The controller can be stopped by calling CANDisable(). +//! Prior to calling CANEnable(), CANInit() should have been called to +//! initialize the controller and the CAN bus clock should be configured by +//! calling CANBitTimingSet(). +//! +//! \return None. +// +//***************************************************************************** +void +CANEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Clear the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Disables the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller to disable. +//! +//! Disables the CAN controller for message processing. When disabled, the +//! controller will no longer automatically process data on the CAN bus. The +//! controller can be restarted by calling CANEnable(). The state of the CAN +//! controller and the message objects in the controller are left as they were +//! before this call was made. +//! +//! \return None. +// +//***************************************************************************** +void +CANDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Set the init bit in the control register. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | CAN_CTL_INIT); +} + +//***************************************************************************** +// +//! Reads the current settings for the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms is a pointer to a structure to hold the timing parameters. +//! +//! This function reads the current configuration of the CAN controller bit +//! clock timing, and stores the resulting information in the structure +//! supplied by the caller. Refer to CANBitTimingSet() for the meaning of the +//! values that are returned in the structure pointed to by \e pClkParms. +//! +//! This function replaces the original CANGetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // Read out all the bit timing values from the CAN controller registers. + // + uBitReg = CANRegRead(ulBase + CAN_O_BIT); + + // + // Set the phase 2 segment. + // + pClkParms->uPhase2Seg = + ((uBitReg & CAN_BIT_TSEG2_M) >> CAN_BIT_TSEG2_S) + 1; + + // + // Set the phase 1 segment. + // + pClkParms->uSyncPropPhase1Seg = + ((uBitReg & CAN_BIT_TSEG1_M) >> CAN_BIT_TSEG1_S) + 1; + + // + // Set the synchronous jump width. + // + pClkParms->uSJW = ((uBitReg & CAN_BIT_SJW_M) >> CAN_BIT_SJW_S) + 1; + + // + // Set the pre-divider for the CAN bus bit clock. + // + pClkParms->uQuantumPrescaler = + ((uBitReg & CAN_BIT_BRP_M) | + ((CANRegRead(ulBase + CAN_O_BRPE) & CAN_BRPE_BRPE_M) << 6)) + 1; +} + +//***************************************************************************** +// +//! This function is used to set the CAN bit timing values to a nominal setting +//! based on a desired bit rate. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulSourceClock is the system clock for the device in Hz. +//! \param ulBitRate is the desired bit rate. +//! +//! This function will set the CAN bit timing for the bit rate passed in the +//! \e ulBitRate parameter based on the \e ulSourceClock parameter. Since the +//! CAN clock is based off of the system clock the calling function should pass +//! in the source clock rate either by retrieving it from SysCtlClockGet() or +//! using a specific value in Hz. The CAN bit timing is calculated assuming a +//! minimal amount of propagation delay, which will work for most cases where +//! the network length is short. If tighter timing requirements or longer +//! network lengths are needed, then the CANBitTimingSet() function is +//! available for full customization of all of the CAN bit timing values. +//! Since not all bit rates can be matched exactly, the bit rate is set to the +//! value closest to the desired bit rate without being higher than the +//! \e ulBitRate value. +//! +//! \note On some devices the source clock is fixed at 8MHz so the +//! \e ulSourceClock should be set to 8000000. +//! +//! \return This function returns the bit rate that the CAN controller was +//! configured to use or it returns 0 to indicate that the bit rate was not +//! changed because the requested bit rate was not valid. +//! +//***************************************************************************** +unsigned long +CANBitRateSet(unsigned long ulBase, unsigned long ulSourceClock, + unsigned long ulBitRate) +{ + unsigned long ulDesiredRatio; + unsigned long ulCANBits; + unsigned long ulPreDivide; + unsigned long ulRegValue; + unsigned short usCANCTL; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(ulSourceClock != 0); + ASSERT(ulBitRate != 0); + + // + // Calculate the desired clock rate. + // + ulDesiredRatio = ulSourceClock / ulBitRate; + + // + // Make sure that the ratio of CAN bit rate to processor clock is not too + // small or too large. + // + ASSERT(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)); + ASSERT(ulDesiredRatio >= (CAN_MIN_PRE_DIVISOR * CAN_MIN_BIT_DIVISOR)); + + // + // Make sure that the Desired Ratio is not too large. This enforces the + // requirement that the bit rate is larger than requested. + // + if((ulSourceClock / ulDesiredRatio) > ulBitRate) + { + ulDesiredRatio += 1; + } + + // + // Check all possible values to find a matching value. + // + while(ulDesiredRatio <= (CAN_MAX_PRE_DIVISOR * CAN_MAX_BIT_DIVISOR)) + { + // + // Loop through all possible CAN bit divisors. + // + for(ulCANBits = CAN_MAX_BIT_DIVISOR; ulCANBits >= CAN_MIN_BIT_DIVISOR; + ulCANBits--) + { + // + // For a given CAN bit divisor save the pre divisor. + // + ulPreDivide = ulDesiredRatio / ulCANBits; + + // + // If the calculated divisors match the desired clock ratio then + // return these bit rate and set the CAN bit timing. + // + if((ulPreDivide * ulCANBits) == ulDesiredRatio) + { + // + // Start building the bit timing value by adding the bit timing + // in time quanta. + // + ulRegValue = g_usCANBitValues[ulCANBits - CAN_MIN_BIT_DIVISOR]; + + // + // To set the bit timing register, the controller must be placed + // in init mode (if not already), and also configuration change + // bit enabled. The state of the register should be saved + // so it can be restored. + // + usCANCTL = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, + usCANCTL | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Now add in the pre-scalar on the bit rate. + // + ulRegValue |= ((ulPreDivide - 1) & CAN_BIT_BRP_M); + + // + // Set the clock bits in the and the lower bits of the + // pre-scalar. + // + CANRegWrite(ulBase + CAN_O_BIT, ulRegValue); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((ulPreDivide - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Restore the saved CAN Control register. + // + CANRegWrite(ulBase + CAN_O_CTL, usCANCTL); + + // + // Return the computed bit rate. + // + return(ulSourceClock / ( ulPreDivide * ulCANBits)); + } + } + + // + // Move the divisor up one and look again. Only in rare cases are + // more than 2 loops required to find the value. + // + ulDesiredRatio++; + } + + // + // A valid combination could not be found, so return 0 to indicate that the + // bit rate was not changed. + // + return(0); +} + +//***************************************************************************** +// +//! Configures the CAN controller bit timing. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pClkParms points to the structure with the clock parameters. +//! +//! Configures the various timing parameters for the CAN bus bit timing: +//! Propagation segment, Phase Buffer 1 segment, Phase Buffer 2 segment, and +//! the Synchronization Jump Width. The values for Propagation and Phase +//! Buffer 1 segments are derived from the combination +//! \e pClkParms->uSyncPropPhase1Seg parameter. Phase Buffer 2 is determined +//! from the \e pClkParms->uPhase2Seg parameter. These two parameters, along +//! with \e pClkParms->uSJW are based in units of bit time quanta. The actual +//! quantum time is determined by the \e pClkParms->uQuantumPrescaler value, +//! which specifies the divisor for the CAN module clock. +//! +//! The total bit time, in quanta, will be the sum of the two Seg parameters, +//! as follows: +//! +//! bit_time_q = uSyncPropPhase1Seg + uPhase2Seg + 1 +//! +//! Note that the Sync_Seg is always one quantum in duration, and will be added +//! to derive the correct duration of Prop_Seg and Phase1_Seg. +//! +//! The equation to determine the actual bit rate is as follows: +//! +//! CAN Clock / +//! ((\e uSyncPropPhase1Seg + \e uPhase2Seg + 1) * (\e uQuantumPrescaler)) +//! +//! This means that with \e uSyncPropPhase1Seg = 4, \e uPhase2Seg = 1, +//! \e uQuantumPrescaler = 2 and an 8 MHz CAN clock, that the bit rate will be +//! (8 MHz) / ((5 + 2 + 1) * 2) or 500 Kbit/sec. +//! +//! This function replaces the original CANSetBitTiming() API and performs the +//! same actions. A macro is provided in can.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms) +{ + unsigned int uBitReg; + unsigned int uSavedInit; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT(pClkParms != 0); + + // + // The phase 1 segment must be in the range from 2 to 16. + // + ASSERT((pClkParms->uSyncPropPhase1Seg >= 2) && + (pClkParms->uSyncPropPhase1Seg <= 16)); + + // + // The phase 2 segment must be in the range from 1 to 8. + // + ASSERT((pClkParms->uPhase2Seg >= 1) && (pClkParms->uPhase2Seg <= 8)); + + // + // The synchronous jump windows must be in the range from 1 to 4. + // + ASSERT((pClkParms->uSJW >= 1) && (pClkParms->uSJW <= 4)); + + // + // The CAN clock pre-divider must be in the range from 1 to 1024. + // + ASSERT((pClkParms->uQuantumPrescaler <= 1024) && + (pClkParms->uQuantumPrescaler >= 1)); + + // + // To set the bit timing register, the controller must be placed in init + // mode (if not already), and also configuration change bit enabled. State + // of the init bit should be saved so it can be restored at the end. + // + uSavedInit = CANRegRead(ulBase + CAN_O_CTL); + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit | CAN_CTL_INIT | CAN_CTL_CCE); + + // + // Set the bit fields of the bit timing register according to the parms. + // + uBitReg = (((pClkParms->uPhase2Seg - 1) << CAN_BIT_TSEG2_S) & + CAN_BIT_TSEG2_M); + uBitReg |= (((pClkParms->uSyncPropPhase1Seg - 1) << CAN_BIT_TSEG1_S) & + CAN_BIT_TSEG1_M); + uBitReg |= ((pClkParms->uSJW - 1) << CAN_BIT_SJW_S) & CAN_BIT_SJW_M; + uBitReg |= (pClkParms->uQuantumPrescaler - 1) & CAN_BIT_BRP_M; + CANRegWrite(ulBase + CAN_O_BIT, uBitReg); + + // + // Set the divider upper bits in the extension register. + // + CANRegWrite(ulBase + CAN_O_BRPE, + ((pClkParms->uQuantumPrescaler - 1) >> 6) & CAN_BRPE_BRPE_M); + + // + // Clear the config change bit, and restore the init bit. + // + uSavedInit &= ~CAN_CTL_CCE; + + // + // If Init was not set before, then clear it. + // + if(uSavedInit & CAN_CTL_INIT) + { + uSavedInit &= ~CAN_CTL_INIT; + } + CANRegWrite(ulBase + CAN_O_CTL, uSavedInit); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled CAN interrupts occur. +//! +//! This function registers the interrupt handler in the interrupt vector +//! table, and enables CAN interrupts on the interrupt controller; specific CAN +//! interrupt sources must be enabled using CANIntEnable(). The interrupt +//! handler being registered must clear the source of the interrupt using +//! CANIntClear(). +//! +//! If the application is using a static interrupt vector table stored in +//! flash, then it is not necessary to register the interrupt handler this way. +//! Instead, IntEnable() should be used to enable CAN interrupts on the +//! interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntRegister(ulIntNumber, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(ulIntNumber); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the CAN controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the previously registered interrupt handler and +//! disables the interrupt on the interrupt controller. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntUnregister(unsigned long ulBase) +{ + unsigned long ulIntNumber; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Get the actual interrupt number for this CAN controller. + // + ulIntNumber = CANIntNumberGet(ulBase); + + // + // Register the interrupt handler. + // + IntUnregister(ulIntNumber); + + // + // Disable the CAN interrupt. + // + IntDisable(ulIntNumber); +} + +//***************************************************************************** +// +//! Enables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables specific interrupt sources of the CAN controller. Only enabled +//! sources will cause a processor interrupt. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b CAN_INT_ERROR - a controller error condition has occurred +//! - \b CAN_INT_STATUS - a message transfer has completed, or a bus error has +//! been detected +//! - \b CAN_INT_MASTER - allow CAN controller to generate interrupts +//! +//! In order to generate any interrupts, \b CAN_INT_MASTER must be enabled. +//! Further, for any particular transaction from a message object to generate +//! an interrupt, that message object must have interrupts enabled (see +//! CANMessageSet()). \b CAN_INT_ERROR will generate an interrupt if the +//! controller enters the ``bus off'' condition, or if the error counters reach +//! a limit. \b CAN_INT_STATUS will generate an interrupt under quite a few +//! status conditions and may provide more interrupts than the application +//! needs to handle. When an interrupt occurs, use CANIntStatus() to determine +//! the cause. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Enable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags); +} + +//***************************************************************************** +// +//! Disables individual CAN controller interrupt sources. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the specified CAN controller interrupt sources. Only enabled +//! interrupt sources can cause a processor interrupt. +//! +//! The \e ulIntFlags parameter has the same definition as in the +//! CANIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0); + + // + // Disable the specified interrupts. + // + CANRegWrite(ulBase + CAN_O_CTL, + CANRegRead(ulBase + CAN_O_CTL) & ~(ulIntFlags)); +} + +//***************************************************************************** +// +//! Returns the current CAN controller interrupt status. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eIntStsReg indicates which interrupt status register to read +//! +//! Returns the value of one of two interrupt status registers. The interrupt +//! status register read is determined by the \e eIntStsReg parameter, which +//! can have one of the following values: +//! +//! - \b CAN_INT_STS_CAUSE - indicates the cause of the interrupt +//! - \b CAN_INT_STS_OBJECT - indicates pending interrupts of all message +//! objects +//! +//! \b CAN_INT_STS_CAUSE returns the value of the controller interrupt register +//! and indicates the cause of the interrupt. It will be a value of +//! \b CAN_INT_INTID_STATUS if the cause is a status interrupt. In this case, +//! the status register should be read with the CANStatusGet() function. +//! Calling this function to read the status will also clear the status +//! interrupt. If the value of the interrupt register is in the range 1-32, +//! then this indicates the number of the highest priority message object that +//! has an interrupt pending. The message object interrupt can be cleared by +//! using the CANIntClear() function, or by reading the message using +//! CANMessageGet() in the case of a received message. The interrupt handler +//! can read the interrupt status again to make sure all pending interrupts are +//! cleared before returning from the interrupt. +//! +//! \b CAN_INT_STS_OBJECT returns a bit mask indicating which message objects +//! have pending interrupts. This can be used to discover all of the pending +//! interrupts at once, as opposed to repeatedly reading the interrupt register +//! by using \b CAN_INT_STS_CAUSE. +//! +//! \return Returns the value of one of the interrupt status registers. +// +//***************************************************************************** +unsigned long +CANIntStatus(unsigned long ulBase, tCANIntStsReg eIntStsReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // See which status the caller is looking for. + // + switch(eIntStsReg) + { + // + // The caller wants the global interrupt status for the CAN controller + // specified by ulBase. + // + case CAN_INT_STS_CAUSE: + { + ulStatus = CANRegRead(ulBase + CAN_O_INT); + break; + } + + // + // The caller wants the current message status interrupt for all + // messages. + // + case CAN_INT_STS_OBJECT: + { + // + // Read and combine both 16 bit values into one 32bit status. + // + ulStatus = (CANRegRead(ulBase + CAN_O_MSG1INT) & + CAN_MSG1INT_INTPND_M); + ulStatus |= (CANRegRead(ulBase + CAN_O_MSG2INT) << 16); + break; + } + + // + // Request was for unknown status so just return 0. + // + default: + { + ulStatus = 0; + break; + } + } + + // + // Return the interrupt status value + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears a CAN interrupt source. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulIntClr is a value indicating which interrupt source to clear. +//! +//! This function can be used to clear a specific interrupt source. The +//! \e ulIntClr parameter should be one of the following values: +//! +//! - \b CAN_INT_INTID_STATUS - Clears a status interrupt. +//! - 1-32 - Clears the specified message object interrupt +//! +//! It is not necessary to use this function to clear an interrupt. This +//! should only be used if the application wants to clear an interrupt source +//! without taking the normal interrupt action. +//! +//! Normally, the status interrupt is cleared by reading the controller status +//! using CANStatusGet(). A specific message object interrupt is normally +//! cleared by reading the message object using CANMessageGet(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +CANIntClear(unsigned long ulBase, unsigned long ulIntClr) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulIntClr == CAN_INT_INTID_STATUS) || + ((ulIntClr>=1) && (ulIntClr <=32))); + + if(ulIntClr == CAN_INT_INTID_STATUS) + { + // + // Simply read and discard the status to clear the interrupt. + // + CANRegRead(ulBase + CAN_O_STS); + } + else + { + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Only change the interrupt pending state by setting only the + // CAN_IF1CMSK_CLRINTPND bit. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_CLRINTPND); + + // + // Send the clear pending interrupt command to the CAN controller. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulIntClr & CAN_IF1CRQ_MNUM_M); + + // + // Wait to be sure that this interface is not busy. + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + } +} + +//***************************************************************************** +// +//! Sets the CAN controller automatic retransmission behavior. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param bAutoRetry enables automatic retransmission. +//! +//! Enables or disables automatic retransmission of messages with detected +//! errors. If \e bAutoRetry is \b true, then automatic retransmission is +//! enabled, otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry) +{ + unsigned long ulCtlReg; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + ulCtlReg = CANRegRead(ulBase + CAN_O_CTL); + + // + // Conditionally set the DAR bit to enable/disable auto-retry. + // + if(bAutoRetry) + { + // + // Clearing the DAR bit tells the controller to not disable the + // auto-retry of messages which were not transmitted or received + // correctly. + // + ulCtlReg &= ~CAN_CTL_DAR; + } + else + { + // + // Setting the DAR bit tells the controller to disable the auto-retry + // of messages which were not transmitted or received correctly. + // + ulCtlReg |= CAN_CTL_DAR; + } + + CANRegWrite(ulBase + CAN_O_CTL, ulCtlReg); +} + +//***************************************************************************** +// +//! Returns the current setting for automatic retransmission. +//! +//! \param ulBase is the base address of the CAN controller. +//! +//! Reads the current setting for the automatic retransmission in the CAN +//! controller and returns it to the caller. +//! +//! \return Returns \b true if automatic retransmission is enabled, \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +CANRetryGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the disable automatic retry setting from the CAN controller. + // + if(CANRegRead(ulBase + CAN_O_CTL) & CAN_CTL_DAR) + { + // + // Automatic data retransmission is not enabled. + // + return(false); + } + + // + // Automatic data retransmission is enabled. + // + return(true); +} + +//***************************************************************************** +// +//! Reads one of the controller status registers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param eStatusReg is the status register to read. +//! +//! Reads a status register of the CAN controller and returns it to the caller. +//! The different status registers are: +//! +//! - \b CAN_STS_CONTROL - the main controller status +//! - \b CAN_STS_TXREQUEST - bit mask of objects pending transmission +//! - \b CAN_STS_NEWDAT - bit mask of objects with new data +//! - \b CAN_STS_MSGVAL - bit mask of objects with valid configuration +//! +//! When reading the main controller status register, a pending status +//! interrupt will be cleared. This should be used in the interrupt handler +//! for the CAN controller if the cause is a status interrupt. The controller +//! status register fields are as follows: +//! +//! - \b CAN_STATUS_BUS_OFF - controller is in bus-off condition +//! - \b CAN_STATUS_EWARN - an error counter has reached a limit of at least 96 +//! - \b CAN_STATUS_EPASS - CAN controller is in the error passive state +//! - \b CAN_STATUS_RXOK - a message was received successfully (independent of +//! any message filtering). +//! - \b CAN_STATUS_TXOK - a message was successfully transmitted +//! - \b CAN_STATUS_LEC_MSK - mask of last error code bits (3 bits) +//! - \b CAN_STATUS_LEC_NONE - no error +//! - \b CAN_STATUS_LEC_STUFF - stuffing error detected +//! - \b CAN_STATUS_LEC_FORM - a format error occurred in the fixed format part +//! of a message +//! - \b CAN_STATUS_LEC_ACK - a transmitted message was not acknowledged +//! - \b CAN_STATUS_LEC_BIT1 - dominant level detected when trying to send in +//! recessive mode +//! - \b CAN_STATUS_LEC_BIT0 - recessive level detected when trying to send in +//! dominant mode +//! - \b CAN_STATUS_LEC_CRC - CRC error in received message +//! +//! The remaining status registers are 32-bit bit maps to the message objects. +//! They can be used to quickly obtain information about the status of all the +//! message objects without needing to query each one. They contain the +//! following information: +//! +//! - \b CAN_STS_TXREQUEST - if a message object's TxRequest bit is set, that +//! means that a transmission is pending on that object. The application can +//! use this to determine which objects are still waiting to send a message. +//! - \b CAN_STS_NEWDAT - if a message object's NewDat bit is set, that means +//! that a new message has been received in that object, and has not yet been +//! picked up by the host application +//! - \b CAN_STS_MSGVAL - if a message object's MsgVal bit is set, that means +//! it has a valid configuration programmed. The host application can use this +//! to determine which message objects are empty/unused. +//! +//! \return Returns the value of the status register. +// +//***************************************************************************** +unsigned long +CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + switch(eStatusReg) + { + // + // Just return the global CAN status register since that is what was + // requested. + // + case CAN_STS_CONTROL: + { + ulStatus = CANRegRead(ulBase + CAN_O_STS); + CANRegWrite(ulBase + CAN_O_STS, + ~(CAN_STS_RXOK | CAN_STS_TXOK | CAN_STS_LEC_M)); + break; + } + + // + // Combine the Transmit status bits into one 32bit value. + // + case CAN_STS_TXREQUEST: + { + ulStatus = CANRegRead(ulBase + CAN_O_TXRQ1); + ulStatus |= CANRegRead(ulBase + CAN_O_TXRQ2) << 16; + break; + } + + // + // Combine the New Data status bits into one 32bit value. + // + case CAN_STS_NEWDAT: + { + ulStatus = CANRegRead(ulBase + CAN_O_NWDA1); + ulStatus |= CANRegRead(ulBase + CAN_O_NWDA2) << 16; + break; + } + + // + // Combine the Message valid status bits into one 32bit value. + // + case CAN_STS_MSGVAL: + { + ulStatus = CANRegRead(ulBase + CAN_O_MSG1VAL); + ulStatus |= CANRegRead(ulBase + CAN_O_MSG2VAL) << 16; + break; + } + + // + // Unknown CAN status requested so return 0. + // + default: + { + ulStatus = 0; + break; + } + } + return(ulStatus); +} + +//***************************************************************************** +// +//! Reads the CAN controller error counter register. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param pulRxCount is a pointer to storage for the receive error counter. +//! \param pulTxCount is a pointer to storage for the transmit error counter. +//! +//! Reads the error counter register and returns the transmit and receive error +//! counts to the caller along with a flag indicating if the controller receive +//! counter has reached the error passive limit. The values of the receive and +//! transmit error counters are returned through the pointers provided as +//! parameters. +//! +//! After this call, \e *pulRxCount will hold the current receive error count +//! and \e *pulTxCount will hold the current transmit error count. +//! +//! \return Returns \b true if the receive error count has reached the error +//! passive limit, and \b false if the error count is below the error passive +//! limit. +// +//***************************************************************************** +tBoolean +CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount) +{ + unsigned long ulCANError; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + + // + // Read the current count of transmit/receive errors. + // + ulCANError = CANRegRead(ulBase + CAN_O_ERR); + + // + // Extract the error numbers from the register value. + // + *pulRxCount = (ulCANError & CAN_ERR_REC_M) >> CAN_ERR_REC_S; + *pulTxCount = (ulCANError & CAN_ERR_TEC_M) >> CAN_ERR_TEC_S; + + if(ulCANError & CAN_ERR_RP) + { + return(true); + } + return(false); +} + +//***************************************************************************** +// +//! Configures a message object in the CAN controller. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to configure (1-32). +//! \param pMsgObject is a pointer to a structure containing message object +//! settings. +//! \param eMsgType indicates the type of message for this object. +//! +//! This function is used to configure any one of the 32 message objects in the +//! CAN controller. A message object can be configured as any type of CAN +//! message object as well as several options for automatic transmission and +//! reception. This call also allows the message object to be configured to +//! generate interrupts on completion of message receipt or transmission. The +//! message object can also be configured with a filter/mask so that actions +//! are only taken when a message that meets certain parameters is seen on the +//! CAN bus. +//! +//! The \e eMsgType parameter must be one of the following values: +//! +//! - \b MSG_OBJ_TYPE_TX - CAN transmit message object. +//! - \b MSG_OBJ_TYPE_TX_REMOTE - CAN transmit remote request message object. +//! - \b MSG_OBJ_TYPE_RX - CAN receive message object. +//! - \b MSG_OBJ_TYPE_RX_REMOTE - CAN receive remote request message object. +//! - \b MSG_OBJ_TYPE_RXTX_REMOTE - CAN remote frame receive remote, then +//! transmit message object. +//! +//! The message object pointed to by \e pMsgObject must be populated by the +//! caller, as follows: +//! +//! - \e ulMsgID - contains the message ID, either 11 or 29 bits. +//! - \e ulMsgIDMask - mask of bits from \e ulMsgID that must match if +//! identifier filtering is enabled. +//! - \e ulFlags +//! - Set \b MSG_OBJ_TX_INT_ENABLE flag to enable interrupt on transmission. +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to enable interrupt on receipt. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable filtering based on the +//! identifier mask specified by \e ulMsgIDMask. +//! - \e ulMsgLen - the number of bytes in the message data. This should be +//! non-zero even for a remote frame; it should match the expected bytes of the +//! data responding data frame. +//! - \e pucMsgData - points to a buffer containing up to 8 bytes of data for a +//! data frame. +//! +//! \b Example: To send a data frame or remote frame(in response to a remote +//! request), take the following steps: +//! +//! -# Set \e eMsgType to \b MSG_OBJ_TYPE_TX. +//! -# Set \e pMsgObject->ulMsgID to the message ID. +//! -# Set \e pMsgObject->ulFlags. Make sure to set \b MSG_OBJ_TX_INT_ENABLE to +//! allow an interrupt to be generated when the message is sent. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the data frame. +//! -# Set \e pMsgObject->pucMsgData to point to an array containing the bytes +//! to send in the message. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! \b Example: To receive a specific data frame, take the following steps: +//! +//! -# Set \e eMsgObjType to \b MSG_OBJ_TYPE_RX. +//! -# Set \e pMsgObject->ulMsgID to the full message ID, or a partial mask to +//! use partial ID matching. +//! -# Set \e pMsgObject->ulMsgIDMask bits that should be used for masking +//! during comparison. +//! -# Set \e pMsgObject->ulFlags as follows: +//! - Set \b MSG_OBJ_RX_INT_ENABLE flag to be interrupted when the data frame +//! is received. +//! - Set \b MSG_OBJ_USE_ID_FILTER flag to enable identifier based filtering. +//! -# Set \e pMsgObject->ulMsgLen to the number of bytes in the expected data +//! frame. +//! -# The buffer pointed to by \e pMsgObject->pucMsgData is not used by this +//! call as no data is present at the time of the call. +//! -# Call this function with \e ulObjID set to one of the 32 object buffers. +//! +//! If you specify a message object buffer that already contains a message +//! definition, it will be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + tBoolean bTransferData; + tBoolean bUseExtendedID; + + bTransferData = 0; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + ASSERT((eMsgType == MSG_OBJ_TYPE_TX) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RX) || + (eMsgType == MSG_OBJ_TYPE_RX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_TX_REMOTE) || + (eMsgType == MSG_OBJ_TYPE_RXTX_REMOTE)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // See if we need to use an extended identifier or not. + // + if((pMsgObject->ulMsgID > CAN_MAX_11BIT_MSG_ID) || + (pMsgObject->ulFlags & MSG_OBJ_EXTENDED_ID)) + { + bUseExtendedID = 1; + } + else + { + bUseExtendedID = 0; + } + + // + // This is always a write to the Message object as this call is setting a + // message object. This call will also always set all size bits so it sets + // both data bits. The call will use the CONTROL register to set control + // bits so this bit needs to be set as well. + // + usCmdMaskReg = (CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL); + + // + // Initialize the values to a known state before filling them in based on + // the type of message object that is being configured. + // + usArbReg0 = 0; + usArbReg1 = 0; + usMsgCtrl = 0; + usMaskReg0 = 0; + usMaskReg1 = 0; + + switch(eMsgType) + { + // + // Transmit message object. + // + case MSG_OBJ_TYPE_TX: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = CAN_IF1ARB2_DIR; + bTransferData = 1; + break; + } + + // + // Transmit remote request message object + // + case MSG_OBJ_TYPE_TX_REMOTE: + { + // + // Set the TXRQST bit and the reset the rest of the register. + // + usMsgCtrl |= CAN_IF1MCTL_TXRQST; + usArbReg1 = 0; + break; + } + + // + // Receive message object. + // + case MSG_OBJ_TYPE_RX: + { + // + // This clears the DIR bit along with everything else. The TXRQST + // bit was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = 0; + break; + } + + // + // Receive remote request message object. + // + case MSG_OBJ_TYPE_RX_REMOTE: + { + // + // The DIR bit is set to one for remote receivers. The TXRQST bit + // was cleared by defaulting usMsgCtrl to 0. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object so that it only indicates that a remote frame + // was received and allow for software to handle it by sending back + // a data frame. + // + usMsgCtrl = CAN_IF1MCTL_UMASK; + + // + // Use the full Identifier by default. + // + usMaskReg0 = 0xffff; + usMaskReg1 = 0x1fff; + + // + // Make sure to send the mask to the message object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + break; + } + + // + // Remote frame receive remote, with auto-transmit message object. + // + case MSG_OBJ_TYPE_RXTX_REMOTE: + { + // + // Oddly the DIR bit is set to one for remote receivers. + // + usArbReg1 = CAN_IF1ARB2_DIR; + + // + // Set this object to auto answer if a matching identifier is seen. + // + usMsgCtrl = CAN_IF1MCTL_RMTEN | CAN_IF1MCTL_UMASK; + + // + // The data to be returned needs to be filled in. + // + bTransferData = 1; + break; + } + + // + // This case should never happen due to the ASSERT statement at the + // beginning of this function. + // + default: + { + return; + } + } + + // + // Configure the Mask Registers. + // + if(pMsgObject->ulFlags & MSG_OBJ_USE_ID_FILTER) + { + if(bUseExtendedID) + { + // + // Set the 29 bits of Identifier mask that were requested. + // + usMaskReg0 = pMsgObject->ulMsgIDMask & CAN_IF1MSK1_IDMSK_M; + usMaskReg1 = ((pMsgObject->ulMsgIDMask >> 16) & + CAN_IF1MSK2_IDMSK_M); + } + else + { + // + // Lower 16 bit are unused so set them to zero. + // + usMaskReg0 = 0; + + // + // Put the 11 bit Mask Identifier into the upper bits of the field + // in the register. + // + usMaskReg1 = ((pMsgObject->ulMsgIDMask << 2) & + CAN_IF1MSK2_IDMSK_M); + } + } + + // + // If the caller wants to filter on the extended ID bit then set it. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_EXT_FILTER) == + MSG_OBJ_USE_EXT_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MXTD; + } + + // + // The caller wants to filter on the message direction field. + // + if((pMsgObject->ulFlags & MSG_OBJ_USE_DIR_FILTER) == + MSG_OBJ_USE_DIR_FILTER) + { + usMaskReg1 |= CAN_IF1MSK2_MDIR; + } + + if(pMsgObject->ulFlags & (MSG_OBJ_USE_ID_FILTER | MSG_OBJ_USE_DIR_FILTER | + MSG_OBJ_USE_EXT_FILTER)) + { + // + // Set the UMASK bit to enable using the mask register. + // + usMsgCtrl |= CAN_IF1MCTL_UMASK; + + // + // Set the MASK bit so that this gets transferred to the Message Object. + // + usCmdMaskReg |= CAN_IF1CMSK_MASK; + } + + // + // Set the Arb bit so that this gets transferred to the Message object. + // + usCmdMaskReg |= CAN_IF1CMSK_ARB; + + // + // Configure the Arbitration registers. + // + if(bUseExtendedID) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + usArbReg0 |= pMsgObject->ulMsgID & CAN_IF1ARB1_ID_M; + usArbReg1 |= (pMsgObject->ulMsgID >> 16) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid and set the extended ID bit. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL | CAN_IF1ARB2_XTD; + } + else + { + // + // Set the 11 bit version of the Identifier for this message object. + // The lower 18 bits are set to zero. + // + usArbReg1 |= (pMsgObject->ulMsgID << 2) & CAN_IF1ARB2_ID_M; + + // + // Mark the message as valid. + // + usArbReg1 |= CAN_IF1ARB2_MSGVAL; + } + + // + // Set the data length since this is set for all transfers. This is also a + // single transfer and not a FIFO transfer so set EOB bit. + // + usMsgCtrl |= (pMsgObject->ulMsgLen & CAN_IF1MCTL_DLC_M); + + // + // Mark this as the last entry if this is not the last entry in a FIFO. + // + if((pMsgObject->ulFlags & MSG_OBJ_FIFO) == 0) + { + usMsgCtrl |= CAN_IF1MCTL_EOB; + } + + // + // Enable transmit interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_TX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_TXIE; + } + + // + // Enable receive interrupts if they should be enabled. + // + if(pMsgObject->ulFlags & MSG_OBJ_RX_INT_ENABLE) + { + usMsgCtrl |= CAN_IF1MCTL_RXIE; + } + + // + // Write the data out to the CAN Data registers if needed. + // + if(bTransferData) + { + CANDataRegWrite(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF1DA1), + pMsgObject->ulMsgLen); + } + + // + // Write out the registers to program the message object. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, usCmdMaskReg); + CANRegWrite(ulBase + CAN_O_IF1MSK1, usMaskReg0); + CANRegWrite(ulBase + CAN_O_IF1MSK2, usMaskReg1); + CANRegWrite(ulBase + CAN_O_IF1ARB1, usArbReg0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, usArbReg1); + CANRegWrite(ulBase + CAN_O_IF1MCTL, usMsgCtrl); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +//! Reads a CAN message from one of the message object buffers. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the object number to read (1-32). +//! \param pMsgObject points to a structure containing message object fields. +//! \param bClrPendingInt indicates whether an associated interrupt should be +//! cleared. +//! +//! This function is used to read the contents of one of the 32 message objects +//! in the CAN controller, and return it to the caller. The data returned is +//! stored in the fields of the caller-supplied structure pointed to by +//! \e pMsgObject. The data consists of all of the parts of a CAN message, +//! plus some control and status information. +//! +//! Normally this is used to read a message object that has received and stored +//! a CAN message with a certain identifier. However, this could also be used +//! to read the contents of a message object in order to load the fields of the +//! structure in case only part of the structure needs to be changed from a +//! previous setting. +//! +//! When using CANMessageGet, all of the same fields of the structure are +//! populated in the same way as when the CANMessageSet() function is used, +//! with the following exceptions: +//! +//! \e pMsgObject->ulFlags: +//! +//! - \b MSG_OBJ_NEW_DATA indicates if this is new data since the last time it +//! was read +//! - \b MSG_OBJ_DATA_LOST indicates that at least one message was received on +//! this message object, and not read by the host before being overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt) +{ + unsigned short usCmdMaskReg; + unsigned short usMaskReg0, usMaskReg1; + unsigned short usArbReg0, usArbReg1; + unsigned short usMsgCtrl; + + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID <= 32) && (ulObjID != 0)); + + // + // This is always a read to the Message object as this call is setting a + // message object. + // + usCmdMaskReg = (CAN_IF1CMSK_DATAA | CAN_IF1CMSK_DATAB | + CAN_IF1CMSK_CONTROL | CAN_IF1CMSK_MASK | CAN_IF1CMSK_ARB); + + // + // Clear a pending interrupt and new data in a message object. + // + if(bClrPendingInt) + { + usCmdMaskReg |= CAN_IF1CMSK_CLRINTPND; + } + + // + // Set up the request for data from the message object. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, usCmdMaskReg); + + // + // Transfer the message object to the message object specified by ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Read out the IF Registers. + // + usMaskReg0 = CANRegRead(ulBase + CAN_O_IF2MSK1); + usMaskReg1 = CANRegRead(ulBase + CAN_O_IF2MSK2); + usArbReg0 = CANRegRead(ulBase + CAN_O_IF2ARB1); + usArbReg1 = CANRegRead(ulBase + CAN_O_IF2ARB2); + usMsgCtrl = CANRegRead(ulBase + CAN_O_IF2MCTL); + + pMsgObject->ulFlags = MSG_OBJ_NO_FLAGS; + + // + // Determine if this is a remote frame by checking the TXRQST and DIR bits. + // + if((!(usMsgCtrl & CAN_IF1MCTL_TXRQST) && (usArbReg1 & CAN_IF1ARB2_DIR)) || + ((usMsgCtrl & CAN_IF1MCTL_TXRQST) && (!(usArbReg1 & CAN_IF1ARB2_DIR)))) + { + pMsgObject->ulFlags |= MSG_OBJ_REMOTE_FRAME; + } + + // + // Get the identifier out of the register, the format depends on size of + // the mask. + // + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // Set the 29 bit version of the Identifier for this message object. + // + pMsgObject->ulMsgID = ((usArbReg1 & CAN_IF1ARB2_ID_M) << 16) | + usArbReg0; + + pMsgObject->ulFlags |= MSG_OBJ_EXTENDED_ID; + } + else + { + // + // The Identifier is an 11 bit value. + // + pMsgObject->ulMsgID = (usArbReg1 & CAN_IF1ARB2_ID_M) >> 2; + } + + // + // Indicate that we lost some data. + // + if(usMsgCtrl & CAN_IF1MCTL_MSGLST) + { + pMsgObject->ulFlags |= MSG_OBJ_DATA_LOST; + } + + // + // Set the flag to indicate if ID masking was used. + // + if(usMsgCtrl & CAN_IF1MCTL_UMASK) + { + if(usArbReg1 & CAN_IF1ARB2_XTD) + { + // + // The Identifier Mask is assumed to also be a 29 bit value. + // + pMsgObject->ulMsgIDMask = + ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) << 16) | usMaskReg0; + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x1fffffff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + else + { + // + // The Identifier Mask is assumed to also be an 11 bit value. + // + pMsgObject->ulMsgIDMask = ((usMaskReg1 & CAN_IF1MSK2_IDMSK_M) >> + 2); + + // + // If this is a fully specified Mask and a remote frame then don't + // set the MSG_OBJ_USE_ID_FILTER because the ID was not really + // filtered. + // + if((pMsgObject->ulMsgIDMask != 0x7ff) || + ((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0)) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_ID_FILTER; + } + } + + // + // Indicate if the extended bit was used in filtering. + // + if(usMaskReg1 & CAN_IF1MSK2_MXTD) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_EXT_FILTER; + } + + // + // Indicate if direction filtering was enabled. + // + if(usMaskReg1 & CAN_IF1MSK2_MDIR) + { + pMsgObject->ulFlags |= MSG_OBJ_USE_DIR_FILTER; + } + } + + // + // Set the interrupt flags. + // + if(usMsgCtrl & CAN_IF1MCTL_TXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_TX_INT_ENABLE; + } + if(usMsgCtrl & CAN_IF1MCTL_RXIE) + { + pMsgObject->ulFlags |= MSG_OBJ_RX_INT_ENABLE; + } + + // + // See if there is new data available. + // + if(usMsgCtrl & CAN_IF1MCTL_NEWDAT) + { + // + // Get the amount of data needed to be read. + // + pMsgObject->ulMsgLen = (usMsgCtrl & CAN_IF1MCTL_DLC_M); + + // + // Don't read any data for a remote frame, there is nothing valid in + // that buffer anyway. + // + if((pMsgObject->ulFlags & MSG_OBJ_REMOTE_FRAME) == 0) + { + // + // Read out the data from the CAN registers. + // + CANDataRegRead(pMsgObject->pucMsgData, + (unsigned long *)(ulBase + CAN_O_IF2DA1), + pMsgObject->ulMsgLen); + } + + // + // Now clear out the new data flag. + // + CANRegWrite(ulBase + CAN_O_IF2CMSK, CAN_IF1CMSK_NEWDAT); + + // + // Transfer the message object to the message object specified by + // ulObjID. + // + CANRegWrite(ulBase + CAN_O_IF2CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF2CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Indicate that there is new data in this message. + // + pMsgObject->ulFlags |= MSG_OBJ_NEW_DATA; + } + else + { + // + // Along with the MSG_OBJ_NEW_DATA not being set the amount of data + // needs to be set to zero if none was available. + // + pMsgObject->ulMsgLen = 0; + } +} + +//***************************************************************************** +// +//! Clears a message object so that it is no longer used. +//! +//! \param ulBase is the base address of the CAN controller. +//! \param ulObjID is the message object number to disable (1-32). +//! +//! This function frees the specified message object from use. Once a message +//! object has been ``cleared,'' it will no longer automatically send or +//! receive messages, or generate interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +CANMessageClear(unsigned long ulBase, unsigned long ulObjID) +{ + // + // Check the arguments. + // + ASSERT(CANBaseValid(ulBase)); + ASSERT((ulObjID >= 1) && (ulObjID <= 32)); + + // + // Wait for busy bit to clear + // + while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY) + { + } + + // + // Clear the message value bit in the arbitration register. This indicates + // the message is not valid. + // + CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB); + CANRegWrite(ulBase + CAN_O_IF1ARB1, 0); + CANRegWrite(ulBase + CAN_O_IF1ARB2, 0); + + // + // Initiate programming the message object + // + CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.h new file mode 100644 index 00000000..39aa7055 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/can.h @@ -0,0 +1,450 @@ +//***************************************************************************** +// +// can.h - Defines and Macros for the CAN controller. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CAN_H__ +#define __CAN_H__ + +//***************************************************************************** +// +//! \addtogroup can_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Miscellaneous defines for Message ID Types +// +//***************************************************************************** + +//***************************************************************************** +// +// These are the flags used by the tCANMsgObject.ulFlags value when calling the +// CANMessageSet() and CANMessageGet() functions. +// +//***************************************************************************** + +// +//! This definition is used with the tCANMsgObject ulFlags value and indicates +//! that transmit interrupts should be enabled, or are enabled. +// +#define MSG_OBJ_TX_INT_ENABLE 0x00000001 + +// +//! This indicates that receive interrupts should be enabled, or are +//! enabled. +// +#define MSG_OBJ_RX_INT_ENABLE 0x00000002 + +// +//! This indicates that a message object will use or is using an extended +//! identifier. +// +#define MSG_OBJ_EXTENDED_ID 0x00000004 + +// +//! This indicates that a message object will use or is using filtering +//! based on the object's message identifier. +// +#define MSG_OBJ_USE_ID_FILTER 0x00000008 + +// +//! This indicates that new data was available in the message object. +// +#define MSG_OBJ_NEW_DATA 0x00000080 + +// +//! This indicates that data was lost since this message object was last +//! read. +// +#define MSG_OBJ_DATA_LOST 0x00000100 + +// +//! This indicates that a message object will use or is using filtering +//! based on the direction of the transfer. If the direction filtering is +//! used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_DIR_FILTER (0x00000010 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object will use or is using message +//! identifier filtering based on the extended identifier. If the extended +//! identifier filtering is used, then ID filtering must also be enabled. +// +#define MSG_OBJ_USE_EXT_FILTER (0x00000020 | MSG_OBJ_USE_ID_FILTER) + +// +//! This indicates that a message object is a remote frame. +// +#define MSG_OBJ_REMOTE_FRAME 0x00000040 + +// +//! This indicates that this message object is part of a FIFO structure and +//! not the final message object in a FIFO. +// +#define MSG_OBJ_FIFO 0x00000200 + +// +//! This indicates that a message object has no flags set. +// +#define MSG_OBJ_NO_FLAGS 0x00000000 + +//***************************************************************************** +// +//! This define is used with the flag values to allow checking only status +//! flags and not configuration flags. +// +//***************************************************************************** +#define MSG_OBJ_STATUS_MASK (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST) + +//***************************************************************************** +// +//! The structure used for encapsulating all the items associated with a CAN +//! message object in the CAN controller. +// +//***************************************************************************** +typedef struct +{ + // + //! The CAN message identifier used for 11 or 29 bit identifiers. + // + unsigned long ulMsgID; + + // + //! The message identifier mask used when identifier filtering is enabled. + // + unsigned long ulMsgIDMask; + + // + //! This value holds various status flags and settings specified by + //! tCANObjFlags. + // + unsigned long ulFlags; + + // + //! This value is the number of bytes of data in the message object. + // + unsigned long ulMsgLen; + + // + //! This is a pointer to the message object's data. + // + unsigned char *pucMsgData; +} +tCANMsgObject; + +//***************************************************************************** +// +//! This structure is used for encapsulating the values associated with setting +//! up the bit timing for a CAN controller. The structure is used when calling +//! the CANGetBitTiming and CANSetBitTiming functions. +// +//***************************************************************************** +typedef struct +{ + // + //! This value holds the sum of the Synchronization, Propagation, and Phase + //! Buffer 1 segments, measured in time quanta. The valid values for this + //! setting range from 2 to 16. + // + unsigned int uSyncPropPhase1Seg; + + // + //! This value holds the Phase Buffer 2 segment in time quanta. The valid + //! values for this setting range from 1 to 8. + // + unsigned int uPhase2Seg; + + // + //! This value holds the Resynchronization Jump Width in time quanta. The + //! valid values for this setting range from 1 to 4. + // + unsigned int uSJW; + + // + //! This value holds the CAN_CLK divider used to determine time quanta. + //! The valid values for this setting range from 1 to 1023. + // + unsigned int uQuantumPrescaler; +} +tCANBitClkParms; + +//***************************************************************************** +// +//! This data type is used to identify the interrupt status register. This is +//! used when calling the CANIntStatus() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the CAN interrupt status information. + // + CAN_INT_STS_CAUSE, + + // + //! Read a message object's interrupt status. + // + CAN_INT_STS_OBJECT +} +tCANIntStsReg; + +//***************************************************************************** +// +//! This data type is used to identify which of several status registers to +//! read when calling the CANStatusGet() function. +// +//***************************************************************************** +typedef enum +{ + // + //! Read the full CAN controller status. + // + CAN_STS_CONTROL, + + // + //! Read the full 32-bit mask of message objects with a transmit request + //! set. + // + CAN_STS_TXREQUEST, + + // + //! Read the full 32-bit mask of message objects with new data available. + // + CAN_STS_NEWDAT, + + // + //! Read the full 32-bit mask of message objects that are enabled. + // + CAN_STS_MSGVAL +} +tCANStsReg; + +//***************************************************************************** +// +// These definitions are used to specify interrupt sources to CANIntEnable() +// and CANIntDisable(). +// +//***************************************************************************** +// +//! This flag is used to allow a CAN controller to generate error +//! interrupts. +// +#define CAN_INT_ERROR 0x00000008 + +// +//! This flag is used to allow a CAN controller to generate status +//! interrupts. +// +#define CAN_INT_STATUS 0x00000004 + +// +//! This flag is used to allow a CAN controller to generate any CAN +//! interrupts. If this is not set, then no interrupts will be generated +//! by the CAN controller. +// +#define CAN_INT_MASTER 0x00000002 + +//***************************************************************************** +// +//! This definition is used to determine the type of message object that will +//! be set up via a call to the CANMessageSet() API. +// +//***************************************************************************** +typedef enum +{ + // + //! Transmit message object. + // + MSG_OBJ_TYPE_TX, + + // + //! Transmit remote request message object + // + MSG_OBJ_TYPE_TX_REMOTE, + + // + //! Receive message object. + // + MSG_OBJ_TYPE_RX, + + // + //! Receive remote request message object. + // + MSG_OBJ_TYPE_RX_REMOTE, + + // + //! Remote frame receive remote, with auto-transmit message object. + // + MSG_OBJ_TYPE_RXTX_REMOTE +} +tMsgObjType; + +//***************************************************************************** +// +// The following enumeration contains all error or status indicators that can +// be returned when calling the CANStatusGet() function. +// +//***************************************************************************** +// +//! CAN controller has entered a Bus Off state. +// +#define CAN_STATUS_BUS_OFF 0x00000080 + +// +//! CAN controller error level has reached warning level. +// +#define CAN_STATUS_EWARN 0x00000040 + +// +//! CAN controller error level has reached error passive level. +// +#define CAN_STATUS_EPASS 0x00000020 + +// +//! A message was received successfully since the last read of this status. +// +#define CAN_STATUS_RXOK 0x00000010 + +// +//! A message was transmitted successfully since the last read of this +//! status. +// +#define CAN_STATUS_TXOK 0x00000008 + +// +//! This is the mask for the last error code field. +// +#define CAN_STATUS_LEC_MSK 0x00000007 + +// +//! There was no error. +// +#define CAN_STATUS_LEC_NONE 0x00000000 + +// +//! A bit stuffing error has occurred. +// +#define CAN_STATUS_LEC_STUFF 0x00000001 + +// +//! A formatting error has occurred. +// +#define CAN_STATUS_LEC_FORM 0x00000002 + +// +//! An acknowledge error has occurred. +// +#define CAN_STATUS_LEC_ACK 0x00000003 + +// +//! The bus remained a bit level of 1 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT1 0x00000004 + +// +//! The bus remained a bit level of 0 for longer than is allowed. +// +#define CAN_STATUS_LEC_BIT0 0x00000005 + +// +//! A CRC error has occurred. +// +#define CAN_STATUS_LEC_CRC 0x00000006 + +// +//! This is the mask for the CAN Last Error Code (LEC). +// +#define CAN_STATUS_LEC_MASK 0x00000007 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void CANBitTimingGet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern void CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms); +extern unsigned long CANBitRateSet(unsigned long ulBase, + unsigned long ulSourceClock, + unsigned long ulBitRate); +extern void CANDisable(unsigned long ulBase); +extern void CANEnable(unsigned long ulBase); +extern tBoolean CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount, + unsigned long *pulTxCount); +extern void CANInit(unsigned long ulBase); +extern void CANIntClear(unsigned long ulBase, unsigned long ulIntClr); +extern void CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern unsigned long CANIntStatus(unsigned long ulBase, + tCANIntStsReg eIntStsReg); +extern void CANIntUnregister(unsigned long ulBase); +extern void CANMessageClear(unsigned long ulBase, unsigned long ulObjID); +extern void CANMessageGet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tBoolean bClrPendingInt); +extern void CANMessageSet(unsigned long ulBase, unsigned long ulObjID, + tCANMsgObject *pMsgObject, tMsgObjType eMsgType); +extern tBoolean CANRetryGet(unsigned long ulBase); +extern void CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry); +extern unsigned long CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg); + +//***************************************************************************** +// +// Several CAN APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define CANSetBitTiming(a, b) CANBitTimingSet(a, b) +#define CANGetBitTiming(a, b) CANBitTimingGet(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +#endif // __CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.c new file mode 100644 index 00000000..313fe8e3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.c @@ -0,0 +1,436 @@ +//***************************************************************************** +// +// comp.c - Driver for the analog comparator. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup comp_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_comp.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/comp.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Configures a comparator. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator to configure. +//! \param ulConfig is the configuration of the comparator. +//! +//! This function configures a comparator. The \e ulConfig parameter is the +//! result of a logical OR operation between the \b COMP_TRIG_xxx, +//! \b COMP_INT_xxx, \b COMP_ASRCP_xxx, and \b COMP_OUTPUT_xxx values. +//! +//! The \b COMP_TRIG_xxx term can take on the following values: +//! +//! - \b COMP_TRIG_NONE to have no trigger to the ADC. +//! - \b COMP_TRIG_HIGH to trigger the ADC when the comparator output is high. +//! - \b COMP_TRIG_LOW to trigger the ADC when the comparator output is low. +//! - \b COMP_TRIG_FALL to trigger the ADC when the comparator output goes low. +//! - \b COMP_TRIG_RISE to trigger the ADC when the comparator output goes +//! high. +//! - \b COMP_TRIG_BOTH to trigger the ADC when the comparator output goes low +//! or high. +//! +//! The \b COMP_INT_xxx term can take on the following values: +//! +//! - \b COMP_INT_HIGH to generate an interrupt when the comparator output is +//! high. +//! - \b COMP_INT_LOW to generate an interrupt when the comparator output is +//! low. +//! - \b COMP_INT_FALL to generate an interrupt when the comparator output goes +//! low. +//! - \b COMP_INT_RISE to generate an interrupt when the comparator output goes +//! high. +//! - \b COMP_INT_BOTH to generate an interrupt when the comparator output goes +//! low or high. +//! +//! The \b COMP_ASRCP_xxx term can take on the following values: +//! +//! - \b COMP_ASRCP_PIN to use the dedicated Comp+ pin as the reference +//! voltage. +//! - \b COMP_ASRCP_PIN0 to use the Comp0+ pin as the reference voltage (this +//! the same as \b COMP_ASRCP_PIN for the comparator 0). +//! - \b COMP_ASRCP_REF to use the internally generated voltage as the +//! reference voltage. +//! +//! The \b COMP_OUTPUT_xxx term can take on the following values: +//! +//! - \b COMP_OUTPUT_NORMAL to enable a non-inverted output from the comparator +//! to a device pin. +//! - \b COMP_OUTPUT_INVERT to enable an inverted output from the comparator to +//! a device pin. +//! - \b COMP_OUTPUT_NONE is deprecated and behaves the same as +//! \b COMP_OUTPUT_NORMAL. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Configure this comparator. + // + HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACCTL0) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the internal reference voltage. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulRef is the desired reference voltage. +//! +//! This function sets the internal reference voltage value. The voltage is +//! specified as one of the following values: +//! +//! - \b COMP_REF_OFF to turn off the reference voltage +//! - \b COMP_REF_0V to set the reference voltage to 0 V +//! - \b COMP_REF_0_1375V to set the reference voltage to 0.1375 V +//! - \b COMP_REF_0_275V to set the reference voltage to 0.275 V +//! - \b COMP_REF_0_4125V to set the reference voltage to 0.4125 V +//! - \b COMP_REF_0_55V to set the reference voltage to 0.55 V +//! - \b COMP_REF_0_6875V to set the reference voltage to 0.6875 V +//! - \b COMP_REF_0_825V to set the reference voltage to 0.825 V +//! - \b COMP_REF_0_928125V to set the reference voltage to 0.928125 V +//! - \b COMP_REF_0_9625V to set the reference voltage to 0.9625 V +//! - \b COMP_REF_1_03125V to set the reference voltage to 1.03125 V +//! - \b COMP_REF_1_134375V to set the reference voltage to 1.134375 V +//! - \b COMP_REF_1_1V to set the reference voltage to 1.1 V +//! - \b COMP_REF_1_2375V to set the reference voltage to 1.2375 V +//! - \b COMP_REF_1_340625V to set the reference voltage to 1.340625 V +//! - \b COMP_REF_1_375V to set the reference voltage to 1.375 V +//! - \b COMP_REF_1_44375V to set the reference voltage to 1.44375 V +//! - \b COMP_REF_1_5125V to set the reference voltage to 1.5125 V +//! - \b COMP_REF_1_546875V to set the reference voltage to 1.546875 V +//! - \b COMP_REF_1_65V to set the reference voltage to 1.65 V +//! - \b COMP_REF_1_753125V to set the reference voltage to 1.753125 V +//! - \b COMP_REF_1_7875V to set the reference voltage to 1.7875 V +//! - \b COMP_REF_1_85625V to set the reference voltage to 1.85625 V +//! - \b COMP_REF_1_925V to set the reference voltage to 1.925 V +//! - \b COMP_REF_1_959375V to set the reference voltage to 1.959375 V +//! - \b COMP_REF_2_0625V to set the reference voltage to 2.0625 V +//! - \b COMP_REF_2_165625V to set the reference voltage to 2.165625 V +//! - \b COMP_REF_2_26875V to set the reference voltage to 2.26875 V +//! - \b COMP_REF_2_371875V to set the reference voltage to 2.371875 V +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorRefSet(unsigned long ulBase, unsigned long ulRef) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + + // + // Set the voltage reference voltage as requested. + // + HWREG(ulBase + COMP_O_ACREFCTL) = ulRef; +} + +//***************************************************************************** +// +//! Gets the current comparator output value. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function retrieves the current value of the comparator output. +//! +//! \return Returns \b true if the comparator output is high and \b false if +//! the comparator output is low. +// +//***************************************************************************** +tBoolean +ComparatorValueGet(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Return the appropriate value based on the comparator's present output + // value. + // + if(HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACSTAT0) & COMP_ACSTAT0_OVAL) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! \param pfnHandler is a pointer to the function to be called when the +//! comparator interrupt occurs. +//! +//! This sets the handler to be called when the comparator interrupt occurs +//! and enables the interrupt in the interrupt controller. It is the interrupt +//! handler's responsibility to clear the interrupt source via +//! ComparatorIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, + void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_COMP0 + ulComp, pfnHandler); + + // + // Enable the interrupt in the interrupt controller. + // + IntEnable(INT_COMP0 + ulComp); + + // + // Enable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) |= 1 << ulComp; +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function clears the handler to be called when a comparator interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntUnregister(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Disable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) &= ~(1 << ulComp); + + // + // Disable the interrupt in the interrupt controller. + // + IntDisable(INT_COMP0 + ulComp); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_COMP0 + ulComp); +} + +//***************************************************************************** +// +//! Enables the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function enables generation of an interrupt from the specified +//! comparator. Only comparators whose interrupts are enabled can be reflected +//! to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntEnable(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Enable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) |= 1 << ulComp; +} + +//***************************************************************************** +// +//! Disables the comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! This function disables generation of an interrupt from the specified +//! comparator. Only comparators whose interrupts are enabled can be reflected +//! to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Disable the comparator interrupt. + // + HWREG(ulBase + COMP_O_ACINTEN) &= ~(1 << ulComp); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the comparator. Either the raw or +//! the masked interrupt status can be returned. +//! +//! \return \b true if the interrupt is asserted and \b false if it is not +//! asserted. +// +//***************************************************************************** +tBoolean +ComparatorIntStatus(unsigned long ulBase, unsigned long ulComp, + tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(((HWREG(ulBase + COMP_O_ACMIS) >> ulComp) & 1) ? true : false); + } + else + { + return(((HWREG(ulBase + COMP_O_ACRIS) >> ulComp) & 1) ? true : false); + } +} + +//***************************************************************************** +// +//! Clears a comparator interrupt. +//! +//! \param ulBase is the base address of the comparator module. +//! \param ulComp is the index of the comparator. +//! +//! The comparator interrupt is cleared, so that it no longer asserts. This +//! fucntion must be called in the interrupt handler to keep the handler from +//! being called again immediately upon exit. Note that for a level-triggered +//! interrupt, the interrupt cannot be cleared until it stops asserting. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +ComparatorIntClear(unsigned long ulBase, unsigned long ulComp) +{ + // + // Check the arguments. + // + ASSERT(ulBase == COMP_BASE); + ASSERT(ulComp < 3); + + // + // Clear the interrupt. + // + HWREG(ulBase + COMP_O_ACMIS) = 1 << ulComp; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.h new file mode 100644 index 00000000..e02e9e25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/comp.h @@ -0,0 +1,130 @@ +//***************************************************************************** +// +// comp.h - Prototypes for the analog comparator driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __COMP_H__ +#define __COMP_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to ComparatorConfigure() as the ulConfig +// parameter. For each group (i.e. COMP_TRIG_xxx, COMP_INT_xxx, etc.), one of +// the values may be selected and combined together with values from the other +// groups via a logical OR. +// +//***************************************************************************** +#define COMP_TRIG_NONE 0x00000000 // No ADC trigger +#define COMP_TRIG_HIGH 0x00000880 // Trigger when high +#define COMP_TRIG_LOW 0x00000800 // Trigger when low +#define COMP_TRIG_FALL 0x00000820 // Trigger on falling edge +#define COMP_TRIG_RISE 0x00000840 // Trigger on rising edge +#define COMP_TRIG_BOTH 0x00000860 // Trigger on both edges +#define COMP_INT_HIGH 0x00000010 // Interrupt when high +#define COMP_INT_LOW 0x00000000 // Interrupt when low +#define COMP_INT_FALL 0x00000004 // Interrupt on falling edge +#define COMP_INT_RISE 0x00000008 // Interrupt on rising edge +#define COMP_INT_BOTH 0x0000000C // Interrupt on both edges +#define COMP_ASRCP_PIN 0x00000000 // Dedicated Comp+ pin +#define COMP_ASRCP_PIN0 0x00000200 // Comp0+ pin +#define COMP_ASRCP_REF 0x00000400 // Internal voltage reference +#ifndef DEPRECATED +#define COMP_OUTPUT_NONE 0x00000000 // No comparator output +#endif +#define COMP_OUTPUT_NORMAL 0x00000000 // Comparator output normal +#define COMP_OUTPUT_INVERT 0x00000002 // Comparator output inverted + +//***************************************************************************** +// +// Values that can be passed to ComparatorSetRef() as the ulRef parameter. +// +//***************************************************************************** +#define COMP_REF_OFF 0x00000000 // Turn off the internal reference +#define COMP_REF_0V 0x00000300 // Internal reference of 0V +#define COMP_REF_0_1375V 0x00000301 // Internal reference of 0.1375V +#define COMP_REF_0_275V 0x00000302 // Internal reference of 0.275V +#define COMP_REF_0_4125V 0x00000303 // Internal reference of 0.4125V +#define COMP_REF_0_55V 0x00000304 // Internal reference of 0.55V +#define COMP_REF_0_6875V 0x00000305 // Internal reference of 0.6875V +#define COMP_REF_0_825V 0x00000306 // Internal reference of 0.825V +#define COMP_REF_0_928125V 0x00000201 // Internal reference of 0.928125V +#define COMP_REF_0_9625V 0x00000307 // Internal reference of 0.9625V +#define COMP_REF_1_03125V 0x00000202 // Internal reference of 1.03125V +#define COMP_REF_1_134375V 0x00000203 // Internal reference of 1.134375V +#define COMP_REF_1_1V 0x00000308 // Internal reference of 1.1V +#define COMP_REF_1_2375V 0x00000309 // Internal reference of 1.2375V +#define COMP_REF_1_340625V 0x00000205 // Internal reference of 1.340625V +#define COMP_REF_1_375V 0x0000030A // Internal reference of 1.375V +#define COMP_REF_1_44375V 0x00000206 // Internal reference of 1.44375V +#define COMP_REF_1_5125V 0x0000030B // Internal reference of 1.5125V +#define COMP_REF_1_546875V 0x00000207 // Internal reference of 1.546875V +#define COMP_REF_1_65V 0x0000030C // Internal reference of 1.65V +#define COMP_REF_1_753125V 0x00000209 // Internal reference of 1.753125V +#define COMP_REF_1_7875V 0x0000030D // Internal reference of 1.7875V +#define COMP_REF_1_85625V 0x0000020A // Internal reference of 1.85625V +#define COMP_REF_1_925V 0x0000030E // Internal reference of 1.925V +#define COMP_REF_1_959375V 0x0000020B // Internal reference of 1.959375V +#define COMP_REF_2_0625V 0x0000030F // Internal reference of 2.0625V +#define COMP_REF_2_165625V 0x0000020D // Internal reference of 2.165625V +#define COMP_REF_2_26875V 0x0000020E // Internal reference of 2.26875V +#define COMP_REF_2_371875V 0x0000020F // Internal reference of 2.371875V + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void ComparatorConfigure(unsigned long ulBase, unsigned long ulComp, + unsigned long ulConfig); +extern void ComparatorRefSet(unsigned long ulBase, unsigned long ulRef); +extern tBoolean ComparatorValueGet(unsigned long ulBase, unsigned long ulComp); +extern void ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, + void (*pfnHandler)(void)); +extern void ComparatorIntUnregister(unsigned long ulBase, + unsigned long ulComp); +extern void ComparatorIntEnable(unsigned long ulBase, unsigned long ulComp); +extern void ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp); +extern tBoolean ComparatorIntStatus(unsigned long ulBase, unsigned long ulComp, + tBoolean bMasked); +extern void ComparatorIntClear(unsigned long ulBase, unsigned long ulComp); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __COMP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.c new file mode 100644 index 00000000..a7d49bfc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.c @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// cpu.c - Instruction wrappers for special CPU instructions needed by the +// drivers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "driverlib/cpu.h" + +//***************************************************************************** +// +// Wrapper function for the CPSID instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsid(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + cpsid i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsid(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsid i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function returning the state of PRIMASK (indicating whether +// interrupts are enabled or disabled). +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUprimask(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + mrs r0, PRIMASK; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUprimask(void) +{ + // + // Read PRIMASK and disable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the CPSIE instruction. Returns the state of PRIMASK +// on entry. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUcpsie(void) +{ + unsigned long ulRet; + + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + mrs r0, PRIMASK; + cpsie i; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUcpsie(void) +{ + // + // Read PRIMASK and enable interrupts. + // + __asm(" mrs r0, PRIMASK\n" + " cpsie i\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif + +//***************************************************************************** +// +// Wrapper function for the WFI instruction. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + wfi; + bx lr +} +#endif +#if defined(ccs) +void +CPUwfi(void) +{ + // + // Wait for the next interrupt. + // + __asm(" wfi\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for writing the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +CPUbasepriSet(unsigned long ulNewBasepri) +{ + + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n" + " bx lr\n"); +} +#endif +#if defined(ewarm) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + msr BASEPRI, r0; + bx lr +} +#endif +#if defined(ccs) +void +CPUbasepriSet(unsigned long ulNewBasepri) +{ + // + // Set the BASEPRI register + // + __asm(" msr BASEPRI, r0\n"); +} +#endif + +//***************************************************************************** +// +// Wrapper function for reading the BASEPRI register. +// +//***************************************************************************** +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +unsigned long __attribute__((naked)) +CPUbasepriGet(void) +{ + unsigned long ulRet; + + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n" + : "=r" (ulRet)); + + // + // The return is handled in the inline assembly, but the compiler will + // still complain if there is not an explicit return here (despite the fact + // that this does not result in any code being produced because of the + // naked attribute). + // + return(ulRet); +} +#endif +#if defined(ewarm) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n"); + + // + // "Warning[Pe940]: missing return statement at end of non-void function" + // is suppressed here to avoid putting a "bx lr" in the inline assembly + // above and a superfluous return statement here. + // +#pragma diag_suppress=Pe940 +} +#pragma diag_default=Pe940 +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + mrs r0, BASEPRI; + bx lr +} +#endif +#if defined(ccs) +unsigned long +CPUbasepriGet(void) +{ + // + // Read BASEPRI + // + __asm(" mrs r0, BASEPRI\n" + " bx lr\n"); + + // + // The following keeps the compiler happy, because it wants to see a + // return value from this function. It will generate code to return + // a zero. However, the real return is the "bx lr" above, so the + // return(0) is never executed and the function returns with the value + // you expect in R0. + // + return(0); +} +#endif diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.h new file mode 100644 index 00000000..c0e073e1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/cpu.h @@ -0,0 +1,60 @@ +//***************************************************************************** +// +// cpu.h - Prototypes for the CPU instruction wrapper functions. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __CPU_H__ +#define __CPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes. +// +//***************************************************************************** +extern unsigned long CPUcpsid(void); +extern unsigned long CPUcpsie(void); +extern unsigned long CPUprimask(void); +extern void CPUwfi(void); +extern unsigned long CPUbasepriGet(void); +extern void CPUbasepriSet(unsigned long ulNewBasepri); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __CPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/debug.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/debug.h new file mode 100644 index 00000000..6fe52fe5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/debug.h @@ -0,0 +1,53 @@ +//***************************************************************************** +// +// debug.h - Macros for assisting debug of the driver library. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +//***************************************************************************** +// +// Prototype for the function that is called when an invalid argument is passed +// to an API. This is only used when doing a DEBUG build. +// +//***************************************************************************** +extern void __error__(char *pcFilename, unsigned long ulLine); + +//***************************************************************************** +// +// The ASSERT macro, which does the actual assertion checking. Typically, this +// will be for procedure arguments. +// +//***************************************************************************** +#ifdef DEBUG +#define ASSERT(expr) { \ + if(!(expr)) \ + { \ + __error__(__FILE__, __LINE__); \ + } \ + } +#else +#define ASSERT(expr) +#endif + +#endif // __DEBUG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.c new file mode 100644 index 00000000..ee53bd42 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.c @@ -0,0 +1,1176 @@ +//***************************************************************************** +// +// epi.c - Driver for the EPI module. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#include "inc/hw_epi.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/epi.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! \addtogroup epi_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +//! Sets the usage mode of the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param ulMode is the usage mode of the EPI module. +//! +//! This functions sets the operating mode of the EPI module. The parameter +//! \e ulMode must be one of the following: +//! +//! - \b EPI_MODE_GENERAL - use for general-purpose mode operation +//! - \b EPI_MODE_SDRAM - use with SDRAM device +//! - \b EPI_MODE_HB8 - use with host-bus 8-bit interface +//! - \b EPI_MODE_HB16 - use with host-bus 16-bit interface +//! - \b EPI_MODE_DISABLE - disable the EPI module +//! +//! Selection of any of the above modes will enable the EPI module, except +//! for \b EPI_MODE_DISABLE which should be used to disable the module. +//! +//! \return None. +// +//***************************************************************************** +void +EPIModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT((ulMode == EPI_MODE_GENERAL) || + (ulMode == EPI_MODE_SDRAM) || + (ulMode == EPI_MODE_HB8) || + (ulMode == EPI_MODE_HB16) || + (ulMode == EPI_MODE_DISABLE)); + + // + // Write the mode word to the register. + // + HWREG(ulBase + EPI_O_CFG) = ulMode; +} + +//***************************************************************************** +// +//! Sets the clock divider for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param ulDivider is the value of the clock divider to be applied to +//! the external interface (0-65535). +//! +//! This functions sets the clock divider(s) that will be used to determine the +//! clock rate of the external interface. The \e ulDivider value is used to +//! derive the EPI clock rate from the system clock based upon the following +//! formula. +//! +//! EPIClock = (Divider == 0) ? SysClk : (SysClk / (((Divider / 2) + 1) * 2)) +//! +//! For example, a divider value of 1 results in an EPI clock rate of half +//! the system clock, value of 2 or 3 yield one quarter of the system clock and +//! a value of 4 results in one sixth of the system clock rate. +//! +//! In cases where a dual chip select mode is in use and different clock rates +//! are required for each chip select, the \e ulDivider parameter must contain +//! two dividers. The lower 16 bits define the divider to be used with CS0n +//! and the upper 16 bits define the divider for CS1n. +//! +//! \return None. +// +//***************************************************************************** +void +EPIDividerSet(unsigned long ulBase, unsigned long ulDivider) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Write the divider value to the register. + // + HWREG(ulBase + EPI_O_BAUD) = ulDivider; +} + +//***************************************************************************** +// +//! Configures the SDRAM mode of operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the SDRAM interface configuration. +//! \param ulRefresh is the refresh count in core clocks (0-2047). +//! +//! This function is used to configure the SDRAM interface, when the SDRAM +//! mode is chosen with the function EPIModeSet(). The parameter \e ulConfig +//! is the logical OR of several sets of choices: +//! +//! The processor core frequency must be specified with one of the following: +//! +//! - \b EPI_SDRAM_CORE_FREQ_0_15 - core clock is 0 MHz < clk <= 15 MHz +//! - \b EPI_SDRAM_CORE_FREQ_15_30 - core clock is 15 MHz < clk <= 30 MHz +//! - \b EPI_SDRAM_CORE_FREQ_30_50 - core clock is 30 MHz < clk <= 50 MHz +//! - \b EPI_SDRAM_CORE_FREQ_50_100 - core clock is 50 MHz < clk <= 100 MHz +//! +//! The low power mode is specified with one of the following: +//! +//! - \b EPI_SDRAM_LOW_POWER - enter low power, self-refresh state +//! - \b EPI_SDRAM_FULL_POWER - normal operating state +//! +//! The SDRAM device size is specified with one of the following: +//! +//! - \b EPI_SDRAM_SIZE_64MBIT - 64 Mbit device (8 MB) +//! - \b EPI_SDRAM_SIZE_128MBIT - 128 Mbit device (16 MB) +//! - \b EPI_SDRAM_SIZE_256MBIT - 256 Mbit device (32 MB) +//! - \b EPI_SDRAM_SIZE_512MBIT - 512 Mbit device (64 MB) +//! +//! The parameter \e ulRefresh sets the refresh counter in units of core +//! clock ticks. It is an 11-bit value with a range of 0 - 2047 counts. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigSDRAMSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulRefresh) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulRefresh < 2048); + + // + // Fill in the refresh count field of the configuration word. + // + ulConfig &= ~EPI_SDRAMCFG_RFSH_M; + ulConfig |= ulRefresh << EPI_SDRAMCFG_RFSH_S; + + // + // Write the SDRAM configuration register. + // + HWREG(ulBase + EPI_O_SDRAMCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for Host-bus 8 operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulMaxWait is the maximum number of external clocks to wait +//! if a FIFO ready signal is holding off the transaction. +//! +//! This function is used to configure the interface when used in Host-bus 8 +//! operation as chosen with the function EPIModeSet(). The parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - one of \b EPI_HB8_MODE_ADMUX, \b EPI_HB8_MODE_ADDEMUX, +//! \b EPI_HB8_MODE_SRAM, or \b EPI_HB8_MODE_FIFO to select the HB8 mode +//! - \b EPI_HB8_USE_TXEMPTY - enable TXEMPTY signal with FIFO +//! - \b EPI_HB8_USE_RXFULL - enable RXFULL signal with FIFO +//! - \b EPI_HB8_WRHIGH - use active high write strobe, otherwise it is +//! active low +//! - \b EPI_HB8_RDHIGH - use active high read strobe, otherwise it is +//! active low +//! - one of \b EPI_HB8_WRWAIT_0, \b EPI_HB8_WRWAIT_1, \b EPI_HB8_WRWAIT_2, +//! or \b EPI_HB8_WRWAIT_3 to select the number of write wait states (default +//! is 0 wait states) +//! - one of \b EPI_HB8_RDWAIT_0, \b EPI_HB8_RDWAIT_1, \b EPI_HB8_RDWAIT_2, +//! or \b EPI_HB8_RDWAIT_3 to select the number of read wait states (default +//! is 0 wait states) +//! - \b EPI_HB8_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in bits [31:8]. If absent, +//! all data transfers use bits [7:0]. +//! - \b EPI_HB8_CSBAUD_DUAL - use different baud rates when accessing devices +//! on each CSn. CS0n uses the baud rate specified by the lower 16 bits of the +//! divider passed to EPIDividerSet() and CS1n uses the divider passed in the +//! upper 16 bits. If this option is absent, both chip selects use the baud +//! rate resulting from the divider in the lower 16 bits of the parameter passed +//! to EPIDividerSet(). +//! - one of \b EPI_HB8_CSCFG_CS, \b EPI_HB8_CSCFG_ALE, +//! \b EPI_HB8_CSCFG_DUAL_CS or \b EPI_HB8_CSCFG_ALE_DUAL_CS. \b +//! EPI_HB8_CSCFG_CS sets EPI30 to operate as a Chip Select (CSn) signal. \b +//! EPI_HB8_CSCFG_ALE sets EPI30 to operate as an address latch (ALE). \b +//! EPI_HB8_CSCFG_DUAL_CS sets EPI30 to operate as CS0n and EPI27 as CS1n with +//! the asserted chip select determined from the most significant address bit +//! for the respective external address map. \b EPI_HB8_CSCFG_ALE_DUAL_CS sets +//! EPI30 as an address latch (ALE), EPI27 as CS0n and EPI26 as CS1n with the +//! asserted chip select determined from the most significant address bit for +//! the respective external address map. +//! +//! The parameter \e ulMaxWait is used if the FIFO mode is chosen. If a +//! FIFO is used along with RXFULL or TXEMPTY ready signals, then this +//! parameter determines the maximum number of clocks to wait when the +//! transaction is being held off by by the FIFO using one of these ready +//! signals. A value of 0 means to wait forever. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigHB8Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMaxWait < 256); + + // + // Determine the CS and word access modes. + // + HWREG(ulBase + EPI_O_HB8CFG2) = (((ulConfig & EPI_HB8_WORD_ACCESS) ? + EPI_HB8CFG2_WORD : 0) | + ((ulConfig & EPI_HB8_CSBAUD_DUAL) ? + EPI_HB8CFG2_CSBAUD : 0) | + ((ulConfig & EPI_HB8_CSCFG_MASK) << 15)); + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_HB8CFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_HB8CFG_MAXWAIT_S; + + // + // Write the main HostBus8 configuration register. + // + HWREG(ulBase + EPI_O_HB8CFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for Host-bus 16 operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulMaxWait is the maximum number of external clocks to wait +//! if a FIFO ready signal is holding off the transaction. +//! +//! This function is used to configure the interface when used in Host-bus 16 +//! operation as chosen with the function EPIModeSet(). The parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - one of \b EPI_HB16_MODE_ADMUX, \b EPI_HB16_MODE_ADDEMUX, +//! \b EPI_HB16_MODE_SRAM, or \b EPI_HB16_MODE_FIFO to select the HB16 mode +//! - \b EPI_HB16_USE_TXEMPTY - enable TXEMPTY signal with FIFO +//! - \b EPI_HB16_USE_RXFULL - enable RXFULL signal with FIFO +//! - \b EPI_HB16_WRHIGH - use active high write strobe, otherwise it is +//! active low +//! - \b EPI_HB16_RDHIGH - use active high read strobe, otherwise it is +//! active low +//! - one of \b EPI_HB16_WRWAIT_0, \b EPI_HB16_WRWAIT_1, \b EPI_HB16_WRWAIT_2, +//! or \b EPI_HB16_WRWAIT_3 to select the number of write wait states (default +//! is 0 wait states) +//! - one of \b EPI_HB16_RDWAIT_0, \b EPI_HB16_RDWAIT_1, \b EPI_HB16_RDWAIT_2, +//! or \b EPI_HB16_RDWAIT_3 to select the number of read wait states (default +//! is 0 wait states) +//! - \b EPI_HB16_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in bits [31:8]. If absent, +//! all data transfers use bits [7:0]. +//! - \b EPI_HB16_BSEL - enables byte selects. In this mode, two EPI signals +//! operate as byte selects allowing 8-bit transfers. If this flag is not +//! specified, data must be read and written using only 16-bit transfers. +//! - \b EPI_HB16_CSBAUD_DUAL - use different baud rates when accessing devices +//! on each CSn. CS0n uses the baud rate specified by the lower 16 bits of the +//! divider passed to EPIDividerSet() and CS1n uses the divider passed in the +//! upper 16 bits. If this option is absent, both chip selects use the baud +//! rate resulting from the divider in the lower 16 bits of the parameter passed +//! to EPIDividerSet(). +//! - one of \b EPI_HB16_CSCFG_CS, \b EPI_HB16_CSCFG_ALE, +//! \b EPI_HB16_CSCFG_DUAL_CS or \b EPI_HB16_CSCFG_ALE_DUAL_CS. \b +//! EPI_HB16_CSCFG_CS sets EPI30 to operate as a Chip Select (CSn) signal. \b +//! EPI_HB16_CSCFG_ALE sets EPI30 to operate as an address latch (ALE). +//! \b EPI_HB16_CSCFG_DUAL_CS sets EPI30 to operate as CS0n and EPI27 as CS1n +//! with the asserted chip select determined from the most significant address +//! bit for the respective external address map. \b EPI_HB16_CSCFG_ALE_DUAL_CS +//! sets EPI30 as an address latch (ALE), EPI27 as CS0n and EPI26 as CS1n with +//! the asserted chip select determined from the most significant address bit +//! for the respective external address map. +//! +//! The parameter \e ulMaxWait is used if the FIFO mode is chosen. If a +//! FIFO is used along with RXFULL or TXEMPTY ready signals, then this +//! parameter determines the maximum number of clocks to wait when the +//! transaction is being held off by by the FIFO using one of these ready +//! signals. A value of 0 means to wait forever. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigHB16Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMaxWait < 256); + + // + // Determine the CS and word access modes. + // + HWREG(ulBase + EPI_O_HB16CFG2) = (((ulConfig & EPI_HB16_WORD_ACCESS) ? + EPI_HB16CFG2_WORD : 0) | + ((ulConfig & EPI_HB16_CSBAUD_DUAL) ? + EPI_HB16CFG2_CSBAUD : 0) | + ((ulConfig & EPI_HB16_CSCFG_MASK) << 15)); + + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_HB16CFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_HB16CFG_MAXWAIT_S; + + // + // Write the main HostBus16 configuration register. + // + HWREG(ulBase + EPI_O_HB16CFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the interface for general-purpose mode operation. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the interface configuration. +//! \param ulFrameCount is the frame size in clocks, if the frame signal +//! is used (0-15). +//! \param ulMaxWait is the maximum number of external clocks to wait +//! when the external clock enable is holding off the transaction (0-255). +//! +//! This function is used to configure the interface when used in +//! general-purpose operation as chosen with the function EPIModeSet(). The +//! parameter +//! \e ulConfig is the logical OR of any of the following: +//! +//! - \b EPI_GPMODE_CLKPIN - interface clock is output on a pin +//! - \b EPI_GPMODE_CLKGATE - clock is stopped when there is no transaction, +//! otherwise it is free-running +//! - \b EPI_GPMODE_RDYEN - the external peripheral drives an iRDY signal into +//! pin EPI0S27. If absent, the peripheral is assumed to be ready at all times. +//! This flag may only be used with a free-running clock (\b EPI_GPMODE_CLKGATE +//! is absent). +//! - \b EPI_GPMODE_FRAMEPIN - framing signal is emitted on a pin +//! - \b EPI_GPMODE_FRAME50 - framing signal is 50/50 duty cycle, otherwise it +//! is a pulse +//! - \b EPI_GPMODE_READWRITE - read and write strobes are emitted on pins +//! - \b EPI_GPMODE_WRITE2CYCLE - a two cycle write is used, otherwise a +//! single-cycle write is used +//! - \b EPI_GPMODE_READ2CYCLE - a two cycle read is used, otherwise a +//! single-cycle read is used +//! - \b EPI_GPMODE_ASIZE_NONE, \b EPI_GPMODE_ASIZE_4, +//! \b EPI_GPMODE_ASIZE_12, or \b EPI_GPMODE_ASIZE_20 to choose no address +//! bus, or and address bus size of 4, 12, or 20 bits +//! - \b EPI_GPMODE_DSIZE_8, \b EPI_GPMODE_DSIZE_16, +//! \b EPI_GPMODE_DSIZE_24, or \b EPI_GPMODE_DSIZE_32 to select a data bus +//! size of 8, 16, 24, or 32 bits +//! - \b EPI_GPMODE_WORD_ACCESS - use Word Access mode to route bytes to the +//! correct byte lanes allowing data to be stored in the upper bits of the word +//! when necessary. +//! +//! The parameter \e ulFrameCount is the number of clocks used to form the +//! framing signal, if the framing signal is used. The behavior depends on +//! whether the frame signal is a pulse or a 50/50 duty cycle. This value +//! is not used if the framing signal is not enabled with the option +//! \b EPI_GPMODE_FRAMEPIN. +//! +//! The parameter \e ulMaxWait is used if the external clock enable is turned +//! on with the \b EPI_GPMODE_CLKENA option is used. In the case that +//! external clock enable is used, this parameter determines the maximum +//! number of clocks to wait when the external clock enable signal is holding +//! off a transaction. A value of 0 means to wait forever. If a non-zero +//! value is used and exceeded, an interrupt will occur and the transaction +//! aborted. +//! +//! \return None. +// +//***************************************************************************** +void +EPIConfigGPModeSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulFrameCount, unsigned long ulMaxWait) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulFrameCount < 16); + ASSERT(ulMaxWait < 256); + + // + // Set the word access mode. + // + HWREG(ulBase + EPI_O_GPCFG2) = ((ulConfig & EPI_GPMODE_WORD_ACCESS) ? + EPI_GPCFG2_WORD : 0); + + // + // Fill in the frame count field of the configuration word. + // + ulConfig &= ~EPI_GPCFG_FRMCNT_M; + ulConfig |= ulFrameCount << EPI_GPCFG_FRMCNT_S; + + // + // Fill in the max wait field of the configuration word. + // + ulConfig &= ~EPI_GPCFG_MAXWAIT_M; + ulConfig |= ulMaxWait << EPI_GPCFG_MAXWAIT_S; + + // + // Write the non-moded configuration register. + // + HWREG(ulBase + EPI_O_GPCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Configures the address map for the external interface. +//! +//! \param ulBase is the EPI module base address. +//! \param ulMap is the address mapping configuration. +//! +//! This function is used to configure the address mapping for the external +//! interface. This determines the base address of the external memory or +//! device within the processor peripheral and/or memory space. +//! +//! The parameter \e ulMap is the logical OR of the following: +//! +//! - \b EPI_ADDR_PER_SIZE_256B, \b EPI_ADDR_PER_SIZE_64KB, +//! \b EPI_ADDR_PER_SIZE_16MB, or \b EPI_ADDR_PER_SIZE_512MB to choose a +//! peripheral address space of 256 bytes, 64 Kbytes, 16 Mbytes or 512 Mbytes +//! - \b EPI_ADDR_PER_BASE_NONE, \b EPI_ADDR_PER_BASE_A, or +//! \b EPI_ADDR_PER_BASE_C to choose the base address of the peripheral +//! space as none, 0xA0000000, or 0xC0000000 +//! - \b EPI_ADDR_RAM_SIZE_256B, \b EPI_ADDR_RAM_SIZE_64KB, +//! \b EPI_ADDR_RAM_SIZE_16MB, or \b EPI_ADDR_RAM_SIZE_512MB to choose a +//! RAM address space of 256 bytes, 64 Kbytes, 16 Mbytes or 512 Mbytes +//! - \b EPI_ADDR_RAM_BASE_NONE, \b EPI_ADDR_RAM_BASE_6, or +//! \b EPI_ADDR_RAM_BASE_8 to choose the base address of the RAM space +//! as none, 0x60000000, or 0x80000000 +//! +//! \return None. +// +//***************************************************************************** +void +EPIAddressMapSet(unsigned long ulBase, unsigned long ulMap) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulMap < 0x100); + + // + // Set the value of the address mapping register. + // + HWREG(ulBase + EPI_O_ADDRMAP) = ulMap; +} + +//***************************************************************************** +// +//! Configures a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! \param ulDataSize is the size of the data items to read. +//! \param ulAddress is the starting address to read. +//! +//! This function is used to configure a non-blocking read channel for a +//! transaction. Two channels are available which can be used in a ping-pong +//! method for continuous reading. It is not necessary to use both channels +//! to perform a non-blocking read. +//! +//! The parameter \e ulDataSize is one of \b EPI_NBCONFIG_SIZE_8, +//! \b EPI_NBCONFIG_SIZE_16, or \b EPI_NBCONFIG_SIZE_32 for 8-bit, 16-bit, +//! or 32-bit sized data transfers. +//! +//! The parameter \e ulAddress is the starting address for the read, relative +//! to the external device. The start of the device is address 0. +//! +//! Once configured, the non-blocking read is started by calling +//! EPINonBlockingReadStart(). If the addresses to be read from the device +//! are in a sequence, it is not necessary to call this function multiple +//! times. Until it is changed, the EPI module will remember the last address +//! that was used for a non-blocking read (per channel). +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadConfigure(unsigned long ulBase, unsigned long ulChannel, + unsigned long ulDataSize, unsigned long ulAddress) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + ASSERT(ulDataSize < 4); + ASSERT(ulAddress < 0x20000000); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RSIZE1 - EPI_O_RSIZE0); + + // + // Write the data size register for the channel. + // + HWREG(ulBase + EPI_O_RSIZE0 + ulOffset) = ulDataSize; + + // + // Write the starting address register for the channel. + // + HWREG(ulBase + EPI_O_RADDR0 + ulOffset) = ulAddress; +} + +//***************************************************************************** +// +//! Starts a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! \param ulCount is the number of items to read (1-4095). +//! +//! This function starts a non-blocking read that was previously configured +//! with the function EPINonBlockingReadConfigure(). Once this function is +//! called, the EPI module will begin reading data from the external device +//! into the read FIFO. The EPI will stop reading when the FIFO fills up +//! and resume reading when the application drains the FIFO, until the +//! total specified count of data items has been read. +//! +//! Once a read transaction is completed and the FIFO drained, another +//! transaction can be started from the next address by calling this +//! function again. +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadStart(unsigned long ulBase, unsigned long ulChannel, + unsigned long ulCount) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + ASSERT(ulCount < 4096); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Write to the read count register. + // + HWREG(ulBase + EPI_O_RPSTD0 + ulOffset) = ulCount; +} + +//***************************************************************************** +// +//! Stops a non-blocking read transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! +//! This function cancels a non-blocking read transaction that is already +//! in progress. +//! +//! \return None. +// +//***************************************************************************** +void +EPINonBlockingReadStop(unsigned long ulBase, unsigned long ulChannel) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Write a 0 to the read count register, which will cancel the transaction. + // + HWREG(ulBase + EPI_O_RPSTD0 + ulOffset) = 0; +} + +//***************************************************************************** +// +//! Get the count remaining for a non-blocking transaction. +//! +//! \param ulBase is the EPI module base address. +//! \param ulChannel is the read channel (0 or 1). +//! +//! This function gets the remaining count of items for a non-blocking read +//! transaction. +//! +//! \return The number of items remaining in the non-blocking read transaction. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadCount(unsigned long ulBase, unsigned long ulChannel) +{ + unsigned long ulOffset; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulChannel < 2); + + // + // Compute the offset needed to select the correct channel regs. + // + ulOffset = ulChannel * (EPI_O_RPSTD1 - EPI_O_RPSTD0); + + // + // Read the count remaining and return the value to the caller. + // + return(HWREG(ulBase + EPI_O_RPSTD0 + ulOffset)); +} + +//***************************************************************************** +// +//! Get the count of items available in the read FIFO. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function gets the number of items that are available to read in +//! the read FIFO. The read FIFO is filled by a non-blocking read transaction +//! which is configured by the functions EPINonBlockingReadConfigure() and +//! EPINonBlockingReadStart(). +//! +//! \return The number of items available to read in the read FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the FIFO count and return it to the caller. + // + return(HWREG(ulBase + EPI_O_RFIFOCNT)); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 32-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pulBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 32-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet32(unsigned long ulBase, unsigned long ulCount, + unsigned long *pulBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pulBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pulBuf = HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pulBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 16-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pusBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 16-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet16(unsigned long ulBase, unsigned long ulCount, + unsigned short *pusBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pusBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pusBuf = (unsigned short)HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pusBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Read available data from the read FIFO, as 8-bit data items. +//! +//! \param ulBase is the EPI module base address. +//! \param ulCount is the maximum count of items to read. +//! \param pucBuf is the caller supplied buffer where the read data should +//! be stored. +//! +//! This function reads 8-bit data items from the read FIFO and stores +//! the values in a caller supplied buffer. The function will read and store +//! data from the FIFO until there is no more data in the FIFO or the maximum +//! count is reached as specified in the parameter \e ulCount. The actual +//! count of items will be returned. +//! +//! \return The number of items read from the FIFO. +// +//***************************************************************************** +unsigned long +EPINonBlockingReadGet8(unsigned long ulBase, unsigned long ulCount, + unsigned char *pucBuf) +{ + unsigned long ulCountRead = 0; + + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulCount < 4096); + ASSERT(pucBuf); + + // + // Read from the FIFO while there are any items to read, and + // the callers specified count is not exceeded. + // + while(HWREG(ulBase + EPI_O_RFIFOCNT) && ulCount--) + { + // + // Read from the FIFO and store in the caller supplied buffer. + // + *pucBuf = (unsigned char)HWREG(ulBase + EPI_O_READFIFO); + + // + // Update the caller's buffer pointer and the count of items read. + // + pucBuf++; + ulCountRead++; + } + + // + // Return the count of items read to the caller. + // + return(ulCountRead); +} + +//***************************************************************************** +// +//! Configures the read FIFO. +//! +//! \param ulBase is the EPI module base address. +//! \param ulConfig is the FIFO configuration. +//! +//! This function configures the FIFO trigger levels and error +//! generation. The parameter \e ulConfig is the logical OR of the +//! following: +//! +//! - \b EPI_FIFO_CONFIG_WTFULLERR - enables an error interrupt when a write is +//! attempted and the write FIFO is full +//! - \b EPI_FIFO_CONFIG_RSTALLERR - enables an error interrupt when a read is +//! stalled due to an interleaved write or other reason +//! - \b EPI_FIFO_CONFIG_TX_EMPTY, \b EPI_FIFO_CONFIG_TX_1_4, +//! \b EPI_FIFO_CONFIG_TX_1_2, or \b EPI_FIFO_CONFIG_TX_3_4 to set the +//! TX FIFO trigger level to empty, 1/4, 1/2, or 3/4 level +//! - \b EPI_FIFO_CONFIG_RX_1_8, \b EPI_FIFO_CONFIG_RX_1_4, +//! \b EPI_FIFO_CONFIG_RX_1_2, \b EPI_FIFO_CONFIG_RX_3_4, +//! \b EPI_FIFO_CONFIG_RX_7_8, or \b EPI_FIFO_CONFIG_RX_FULL to set the +//! RX FIFO trigger level to 1/8, 1/4, 1/2, 3/4, 7/8 or full level +//! +//! \return None. +// +//***************************************************************************** +void +EPIFIFOConfig(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulConfig == (ulConfig & 0x00030077)); + + // + // Load the configuration into the FIFO config reg. + // + HWREG(ulBase + EPI_O_FIFOLVL) = ulConfig; +} + +//***************************************************************************** +// +//! Reads the number of empty slots in the write transaction FIFO. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function returns the number of slots available in the transaction +//! FIFO. It can be used in a polling method to avoid attempting a write +//! that would stall. +//! +//! \return The number of empty slots in the transaction FIFO. +// +//***************************************************************************** +unsigned long +EPIWriteFIFOCountGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the FIFO count and return it to the caller. + // + return(HWREG(ulBase + EPI_O_WFIFOCNT)); +} + +//***************************************************************************** +// +//! Enables EPI interrupt sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! This function enables the specified EPI sources to generate interrupts. +//! The \e ulIntFlags parameter can be the logical OR of any of the following +//! values: +//! +//! - \b EPI_INT_TXREQ - transmit FIFO is below the trigger level +//! - \b EPI_INT_RXREQ - read FIFO is above the trigger level +//! - \b EPI_INT_ERR - an error condition occurred +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulIntFlags < 16); + + // + // Write the interrupt flags mask to the mask register. + // + HWREG(ulBase + EPI_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables EPI interrupt sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! This function disables the specified EPI sources for interrupt +//! generation. The \e ulIntFlags parameter can be the logical OR +//! of any of the following values: \b EPI_INT_RXREQ, \b EPI_INT_TXREQ, or +//! \b I2S_INT_ERR. +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulIntFlags < 16); + + // + // Write the interrupt flags mask to the mask register. + // + HWREG(ulBase + EPI_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the EPI interrupt status. +//! +//! \param ulBase is the EPI module base address. +//! \param bMasked is set \b true to get the masked interrupt status, or +//! \b false to get the raw interrupt status. +//! +//! This function returns the EPI interrupt status. It can return either +//! the raw or masked interrupt status. +//! +//! \return Returns the masked or raw EPI interrupt status, as a bit field +//! of any of the following values: \b EPI_INT_TXREQ, \b EPI_INT_RXREQ, +//! or \b EPI_INT_ERR +// +//***************************************************************************** +unsigned long +EPIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + EPI_O_MIS)); + } + else + { + return(HWREG(ulBase + EPI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Gets the EPI error interrupt status. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function returns the error status of the EPI. If the return value of +//! the function EPIIntStatus() has the flag \b EPI_INT_ERR set, then this +//! function can be used to determine the cause of the error. +//! +//! This function returns a bit mask of error flags, which can be the logical +//! OR of any of the following: +//! +//! - \b EPI_INT_ERR_WTFULL - occurs when a write stalled when the transaction +//! FIFO was full +//! - \b EPI_INT_ERR_RSTALL - occurs when a read stalled +//! - \b EPI_INT_ERR_TIMEOUT - occurs when the external clock enable held +//! off a transaction longer than the configured maximum wait time +//! +//! \return Returns the interrupt error flags as the logical OR of any of +//! the following: \b EPI_INT_ERR_WTFULL, \b EPI_INT_ERR_RSTALL, or +//! \b EPI_INT_ERR_TIMEOUT. +// +//***************************************************************************** +unsigned long +EPIIntErrorStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Read the error status and return to caller. + // + return(HWREG(ulBase + EPI_O_EISC)); +} + +//***************************************************************************** +// +//! Clears pending EPI error sources. +//! +//! \param ulBase is the EPI module base address. +//! \param ulErrFlags is a bit mask of the error sources to be cleared. +//! +//! This function clears the specified pending EPI errors. The \e ulErrFlags +//! parameter can be the logical OR of any of the following values: +//! \b EPI_INT_ERR_WTFULL, \b EPI_INT_ERR_RSTALL, or \b EPI_INT_ERR_TIMEOUT. +//! +//! \return Returns None. +// +//***************************************************************************** +void +EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(ulErrFlags < 16); + + // + // Write the error flags to the register to clear the pending errors. + // + HWREG(ulBase + EPI_O_EISC) = ulErrFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the EPI module +//! generates an interrupt. Specific EPI interrupts must still be enabled +//! with the EPIIntEnable() function. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EPIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(INT_EPI0, pfnHandler); + + // + // Enable the EPI interface interrupt. + // + IntEnable(INT_EPI0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the EPI module. +//! +//! \param ulBase is the EPI module base address. +//! +//! This function will disable and clear the handler to be called when the +//! EPI interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EPIIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == EPI0_BASE); + + // + // Disable the EPI interface interrupt. + // + IntDisable(INT_EPI0); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_EPI0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.h new file mode 100644 index 00000000..44ccb4dc --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/epi.h @@ -0,0 +1,304 @@ +//***************************************************************************** +// +// epi.h - Prototypes and macros for the EPI module. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __EPI_H__ +#define __EPI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to EPIModeSet() +// +//***************************************************************************** +#define EPI_MODE_GENERAL 0x00000010 +#define EPI_MODE_SDRAM 0x00000011 +#define EPI_MODE_HB8 0x00000012 +#define EPI_MODE_HB16 0x00000013 +#define EPI_MODE_DISABLE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigSDRAMSet() +// +//***************************************************************************** +#define EPI_SDRAM_CORE_FREQ_0_15 0x00000000 +#define EPI_SDRAM_CORE_FREQ_15_30 0x40000000 +#define EPI_SDRAM_CORE_FREQ_30_50 0x80000000 +#define EPI_SDRAM_CORE_FREQ_50_100 0xC0000000 +#define EPI_SDRAM_LOW_POWER 0x00000200 +#define EPI_SDRAM_FULL_POWER 0x00000000 +#define EPI_SDRAM_SIZE_64MBIT 0x00000000 +#define EPI_SDRAM_SIZE_128MBIT 0x00000001 +#define EPI_SDRAM_SIZE_256MBIT 0x00000002 +#define EPI_SDRAM_SIZE_512MBIT 0x00000003 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigGPModeSet() +// +//***************************************************************************** +#define EPI_GPMODE_CLKPIN 0x80000000 +#define EPI_GPMODE_CLKGATE 0x40000000 +#define EPI_GPMODE_RDYEN 0x10000000 +#define EPI_GPMODE_FRAMEPIN 0x08000000 +#define EPI_GPMODE_FRAME50 0x04000000 +#define EPI_GPMODE_READWRITE 0x00200000 +#define EPI_GPMODE_WRITE2CYCLE 0x00080000 +#define EPI_GPMODE_READ2CYCLE 0x00040000 +#define EPI_GPMODE_ASIZE_NONE 0x00000000 +#define EPI_GPMODE_ASIZE_4 0x00000010 +#define EPI_GPMODE_ASIZE_12 0x00000020 +#define EPI_GPMODE_ASIZE_20 0x00000030 +#define EPI_GPMODE_DSIZE_8 0x00000000 +#define EPI_GPMODE_DSIZE_16 0x00000001 +#define EPI_GPMODE_DSIZE_24 0x00000002 +#define EPI_GPMODE_DSIZE_32 0x00000003 +#define EPI_GPMODE_WORD_ACCESS 0x00000100 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigHB8ModeSet() +// +//***************************************************************************** +#define EPI_HB8_USE_TXEMPTY 0x00800000 +#define EPI_HB8_USE_RXFULL 0x00400000 +#define EPI_HB8_WRHIGH 0x00200000 +#define EPI_HB8_RDHIGH 0x00100000 +#define EPI_HB8_WRWAIT_0 0x00000000 +#define EPI_HB8_WRWAIT_1 0x00000040 +#define EPI_HB8_WRWAIT_2 0x00000080 +#define EPI_HB8_WRWAIT_3 0x000000C0 +#define EPI_HB8_RDWAIT_0 0x00000000 +#define EPI_HB8_RDWAIT_1 0x00000010 +#define EPI_HB8_RDWAIT_2 0x00000020 +#define EPI_HB8_RDWAIT_3 0x00000030 +#define EPI_HB8_MODE_ADMUX 0x00000000 +#define EPI_HB8_MODE_ADDEMUX 0x00000001 +#define EPI_HB8_MODE_SRAM 0x00000002 +#define EPI_HB8_MODE_FIFO 0x00000003 +#define EPI_HB8_WORD_ACCESS 0x00000100 +#define EPI_HB8_CSCFG_ALE 0x00000000 +#define EPI_HB8_CSCFG_CS 0x00000200 +#define EPI_HB8_CSCFG_DUAL_CS 0x00000400 +#define EPI_HB8_CSCFG_ALE_DUAL_CS 0x00000600 +#define EPI_HB8_CSBAUD_DUAL 0x00000800 + +#define EPI_HB8_CSCFG_MASK 0x00000600 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigHB16ModeSet() +// +//***************************************************************************** +#define EPI_HB16_USE_TXEMPTY 0x00800000 +#define EPI_HB16_USE_RXFULL 0x00400000 +#define EPI_HB16_WRHIGH 0x00200000 +#define EPI_HB16_RDHIGH 0x00100000 +#define EPI_HB16_WRWAIT_0 0x00000000 +#define EPI_HB16_WRWAIT_1 0x00000040 +#define EPI_HB16_WRWAIT_2 0x00000080 +#define EPI_HB16_WRWAIT_3 0x000000C0 +#define EPI_HB16_RDWAIT_0 0x00000000 +#define EPI_HB16_RDWAIT_1 0x00000010 +#define EPI_HB16_RDWAIT_2 0x00000020 +#define EPI_HB16_RDWAIT_3 0x00000030 +#define EPI_HB16_MODE_ADMUX 0x00000000 +#define EPI_HB16_MODE_ADDEMUX 0x00000001 +#define EPI_HB16_MODE_SRAM 0x00000002 +#define EPI_HB16_MODE_FIFO 0x00000003 +#define EPI_HB16_BSEL 0x00000004 +#define EPI_HB16_WORD_ACCESS 0x00000100 +#define EPI_HB16_CSCFG_ALE 0x00000000 +#define EPI_HB16_CSCFG_CS 0x00000200 +#define EPI_HB16_CSCFG_DUAL_CS 0x00000400 +#define EPI_HB16_CSCFG_ALE_DUAL_CS 0x00000600 +#define EPI_HB16_CSBAUD_DUAL 0x00000800 + +#define EPI_HB16_CSCFG_MASK 0x00000600 + +//***************************************************************************** +// +// Values that can be passed to EPIConfigSDRAMSet() +// +//***************************************************************************** +#define EPI_ADDR_PER_SIZE_256B 0x00000000 +#define EPI_ADDR_PER_SIZE_64KB 0x00000040 +#define EPI_ADDR_PER_SIZE_16MB 0x00000080 +#define EPI_ADDR_PER_SIZE_256MB 0x000000C0 +#define EPI_ADDR_PER_BASE_NONE 0x00000000 +#define EPI_ADDR_PER_BASE_A 0x00000010 +#define EPI_ADDR_PER_BASE_C 0x00000020 +#define EPI_ADDR_RAM_SIZE_256B 0x00000000 +#define EPI_ADDR_RAM_SIZE_64KB 0x00000004 +#define EPI_ADDR_RAM_SIZE_16MB 0x00000008 +#define EPI_ADDR_RAM_SIZE_256MB 0x0000000C +#define EPI_ADDR_RAM_BASE_NONE 0x00000000 +#define EPI_ADDR_RAM_BASE_6 0x00000001 +#define EPI_ADDR_RAM_BASE_8 0x00000002 + +//***************************************************************************** +// +// Values that can be passed to EPINonBlockingReadConfigure() +// +//***************************************************************************** +#define EPI_NBCONFIG_SIZE_8 1 +#define EPI_NBCONFIG_SIZE_16 2 +#define EPI_NBCONFIG_SIZE_32 3 + +//***************************************************************************** +// +// Values that can be passed to EPIFIFOConfig() +// +//***************************************************************************** +#define EPI_FIFO_CONFIG_WTFULLERR 0x00020000 +#define EPI_FIFO_CONFIG_RSTALLERR 0x00010000 +#define EPI_FIFO_CONFIG_TX_EMPTY 0x00000000 +#define EPI_FIFO_CONFIG_TX_1_4 0x00000020 +#define EPI_FIFO_CONFIG_TX_1_2 0x00000030 +#define EPI_FIFO_CONFIG_TX_3_4 0x00000040 +#define EPI_FIFO_CONFIG_RX_1_8 0x00000001 +#define EPI_FIFO_CONFIG_RX_1_4 0x00000002 +#define EPI_FIFO_CONFIG_RX_1_2 0x00000003 +#define EPI_FIFO_CONFIG_RX_3_4 0x00000004 +#define EPI_FIFO_CONFIG_RX_7_8 0x00000005 +#define EPI_FIFO_CONFIG_RX_FULL 0x00000006 + +//***************************************************************************** +// +// Values that can be passed to EPIIntEnable(), EPIIntDisable(), or returned +// as flags from EPIIntStatus() +// +//***************************************************************************** +#define EPI_INT_TXREQ 0x00000004 +#define EPI_INT_RXREQ 0x00000002 +#define EPI_INT_ERR 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to EPIIntErrorClear(), or returned as flags from +// EPIIntErrorStatus() +// +//***************************************************************************** +#define EPI_INT_ERR_WTFULL 0x00000004 +#define EPI_INT_ERR_RSTALL 0x00000002 +#define EPI_INT_ERR_TIMEOUT 0x00000001 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void EPIModeSet(unsigned long ulBase, unsigned long ulMode); +extern void EPIDividerSet(unsigned long ulBase, unsigned long ulDivider); +extern void EPIConfigSDRAMSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulRefresh); +extern void EPIConfigGPModeSet(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulFrameCount, + unsigned long ulMaxWait); +extern void EPIConfigHB8Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait); +extern void EPIConfigHB16Set(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxWait); +extern void EPIAddressMapSet(unsigned long ulBase, unsigned long ulMap); +extern void EPINonBlockingReadConfigure(unsigned long ulBase, + unsigned long ulChannel, + unsigned long ulDataSize, + unsigned long ulAddress); +extern void EPINonBlockingReadStart(unsigned long ulBase, + unsigned long ulChannel, + unsigned long ulCount); +extern void EPINonBlockingReadStop(unsigned long ulBase, + unsigned long ulChannel); +extern unsigned long EPINonBlockingReadCount(unsigned long ulBase, + unsigned long ulChannel); +extern unsigned long EPINonBlockingReadAvail(unsigned long ulBase); +extern unsigned long EPINonBlockingReadGet32(unsigned long ulBase, + unsigned long ulCount, + unsigned long *pulBuf); +extern unsigned long EPINonBlockingReadGet16(unsigned long ulBase, + unsigned long ulCount, + unsigned short *pusBuf); +extern unsigned long EPINonBlockingReadGet8(unsigned long ulBase, + unsigned long ulCount, + unsigned char *pucBuf); +extern void EPIFIFOConfig(unsigned long ulBase, unsigned long ulConfig); +extern unsigned long EPIWriteFIFOCountGet(unsigned long ulBase); +extern void EPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void EPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long EPIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern unsigned long EPIIntErrorStatus(unsigned long ulBase); +extern void EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags); +extern void EPIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void EPIIntUnregister(unsigned long ulBase); + +//***************************************************************************** +// +// Several EPI APIs and labels have been renamed, with the original definition +// name being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#define EPI_MODE_NONE EPI_MODE_GENERAL +#define EPI_NONMODE_CLKPIN EPI_GPMODE_CLKPIN +#define EPI_NONMODE_CLKSTOP EPI_GPMODE_CLKGATE +#define EPI_NONMODE_CLKENA EPI_GPMODE_RDYEN +#define EPI_NONMODE_FRAMEPIN EPI_GPMODE_FRAMEPIN +#define EPI_NONMODE_FRAME50 EPI_GPMODE_FRAME50 +#define EPI_NONMODE_READWRITE EPI_GPMODE_READWRITE +#define EPI_NONMODE_WRITE2CYCLE EPI_GPMODE_WRITE2CYCLE +#define EPI_NONMODE_READ2CYCLE EPI_GPMODE_READ2CYCLE +#define EPI_NONMODE_ASIZE_NONE EPI_GPMODE_ASIZE_NONE +#define EPI_NONMODE_ASIZE_4 EPI_GPMODE_ASIZE_4 +#define EPI_NONMODE_ASIZE_12 EPI_GPMODE_ASIZE_12 +#define EPI_NONMODE_ASIZE_20 EPI_GPMODE_ASIZE_20 +#define EPI_NONMODE_DSIZE_8 EPI_GPMODE_DSIZE_8 +#define EPI_NONMODE_DSIZE_16 EPI_GPMODE_DSIZE_16 +#define EPI_NONMODE_DSIZE_24 EPI_GPMODE_DSIZE_24 +#define EPI_NONMODE_DSIZE_32 EPI_GPMODE_DSIZE_32 +#define EPI_NONMODE_WORD_ACCESS EPI_GPMODE_WORD_ACCESS + +#define EPINonBlockingWriteCount(a) EPIWriteFIFOCountGet(a) +#define EPIConfigNoModeSet(a, b, c, d) EPIConfigGPModeSet((a), (b), (c), (d)) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __EPI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.c new file mode 100644 index 00000000..29ade99f --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.c @@ -0,0 +1,1327 @@ +//***************************************************************************** +// +// ethernet.c - Driver for the Integrated Ethernet Controller +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup ethernet_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ethernet.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/ethernet.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Initializes the Ethernet controller for operation. +//! +//! \param ulBase is the base address of the controller. +//! \param ulEthClk is the rate of the clock supplied to the Ethernet module. +//! +//! This function will prepare the Ethernet controller for first time use in +//! a given hardware/software configuration. This function should be called +//! before any other Ethernet API functions are called. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard-coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original EthernetInit() API and performs the +//! same actions. A macro is provided in ethernet.h to map the +//! original API to this API. +//! +//! \note If the device configuration is changed (for example, the system clock +//! is reprogrammed to a different speed), then the Ethernet controller must be +//! disabled by calling the EthernetDisable() function and the controller must +//! be reinitialized by calling the EthernetInitExpClk() function again. After +//! the controller has been reinitialized, the controller should be +//! reconfigured using the appropriate Ethernet API calls. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetInitExpClk(unsigned long ulBase, unsigned long ulEthClk) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Set the Management Clock Divider register for access to the PHY + // register set (via EthernetPHYRead/Write). + // + // The MDC clock divided down from the system clock using the following + // formula. A maximum of 2.5MHz is allowed for F(mdc). + // + // F(mdc) = F(sys) / (2 * (div + 1)) + // div = (F(sys) / (2 * F(mdc))) - 1 + // div = (F(sys) / 2 / F(mdc)) - 1 + // + // Note: Because we should round up, to ensure we don't violate the + // maximum clock speed, we can simplify this as follows: + // + // div = F(sys) / 2 / F(mdc) + // + // For example, given a system clock of 6.0MHz, and a div value of 1, + // the mdc clock would be programmed as 1.5 MHz. + // + ulDiv = (ulEthClk / 2) / 2500000; + HWREG(ulBase + MAC_O_MDV) = (ulDiv & MAC_MDV_DIV_M); +} + +//***************************************************************************** +// +//! Sets the configuration of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param ulConfig is the configuration for the controller. +//! +//! After the EthernetInitExpClk() function has been called, this API function +//! can be used to configure the various features of the Ethernet controller. +//! +//! The Ethernet controller provides three control registers that are used +//! to configure the controller's operation. The transmit control register +//! provides settings to enable full duplex operation, to auto-generate the +//! frame check sequence, and to pad the transmit packets to the minimum +//! length as required by the IEEE standard. The receive control register +//! provides settings to enable reception of packets with bad frame check +//! sequence values and to enable multi-cast or promiscuous modes. The +//! timestamp control register provides settings that enable support logic in +//! the controller that allow the use of the General Purpose Timer 3 to capture +//! timestamps for the transmitted and received packets. +//! +//! The \e ulConfig parameter is the logical OR of the following values: +//! +//! - \b ETH_CFG_TS_TSEN - Enable TX and RX interrupt status as CCP timer +//! inputs +//! - \b ETH_CFG_RX_BADCRCDIS - Disable reception of packets with a bad CRC +//! - \b ETH_CFG_RX_PRMSEN - Enable promiscuous mode reception (all packets) +//! - \b ETH_CFG_RX_AMULEN - Enable reception of multicast packets +//! - \b ETH_CFG_TX_DPLXEN - Enable full duplex transmit mode +//! - \b ETH_CFG_TX_CRCEN - Enable transmit with auto CRC generation +//! - \b ETH_CFG_TX_PADEN - Enable padding of transmit data to minimum size +//! +//! These bit-mapped values are programmed into the transmit, receive, and/or +//! timestamp control register. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT((ulConfig & ~(ETH_CFG_TX_DPLXEN | ETH_CFG_TX_CRCEN | + ETH_CFG_TX_PADEN | ETH_CFG_RX_BADCRCDIS | + ETH_CFG_RX_PRMSEN | ETH_CFG_RX_AMULEN | + ETH_CFG_TS_TSEN)) == 0); + + // + // Setup the Transmit Control Register. + // + ulTemp = HWREG(ulBase + MAC_O_TCTL); + ulTemp &= ~(MAC_TCTL_DUPLEX | MAC_TCTL_CRC | MAC_TCTL_PADEN); + ulTemp |= ulConfig & 0x0FF; + HWREG(ulBase + MAC_O_TCTL) = ulTemp; + + // + // Setup the Receive Control Register. + // + ulTemp = HWREG(ulBase + MAC_O_RCTL); + ulTemp &= ~(MAC_RCTL_BADCRC | MAC_RCTL_PRMS | MAC_RCTL_AMUL); + ulTemp |= (ulConfig >> 8) & 0x0FF; + HWREG(ulBase + MAC_O_RCTL) = ulTemp; + + // + // Setup the Time Stamp Configuration register. + // + ulTemp = HWREG(ulBase + MAC_O_TS); + ulTemp &= ~(MAC_TS_TSEN); + ulTemp |= (ulConfig >> 16) & 0x0FF; + HWREG(ulBase + MAC_O_TS) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the current configuration of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will query the control registers of the Ethernet controller +//! and return a bit-mapped configuration value. +//! +//! \sa The description of the EthernetConfigSet() function provides detailed +//! information for the bit-mapped configuration values that will be returned. +//! +//! \return Returns the bit-mapped Ethernet controller configuration value. +// +//***************************************************************************** +unsigned long +EthernetConfigGet(unsigned long ulBase) +{ + unsigned long ulConfig; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Read and return the Ethernet controller configuration parameters, + // properly shifted into the appropriate bit field positions. + // + ulConfig = HWREG(ulBase + MAC_O_TS) << 16; + ulConfig |= (HWREG(ulBase + MAC_O_RCTL) & ~(MAC_RCTL_RXEN)) << 8; + ulConfig |= HWREG(ulBase + MAC_O_TCTL) & ~(MAC_TCTL_TXEN); + return(ulConfig); +} + +//***************************************************************************** +// +//! Sets the MAC address of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucMACAddr is the pointer to the array of MAC-48 address octets. +//! +//! This function will program the IEEE-defined MAC-48 address specified in +//! \e pucMACAddr into the Ethernet controller. This address is used by the +//! Ethernet controller for hardware-level filtering of incoming Ethernet +//! packets (when promiscuous mode is not enabled). +//! +//! The MAC-48 address is defined as 6 octets, illustrated by the following +//! example address. The numbers are shown in hexadecimal format. +//! +//! AC-DE-48-00-00-80 +//! +//! In this representation, the first three octets (AC-DE-48) are the +//! Organizationally Unique Identifier (OUI). This is a number assigned by +//! the IEEE to an organization that requests a block of MAC addresses. The +//! last three octets (00-00-80) are a 24-bit number managed by the OUI owner +//! to uniquely identify a piece of hardware within that organization that is +//! to be connected to the Ethernet. +//! +//! In this representation, the octets are transmitted from left to right, +//! with the ``AC'' octet being transmitted first and the ``80'' octet being +//! transmitted last. Within an octet, the bits are transmitted LSB to MSB. +//! For this address, the first bit to be transmitted would be ``0'', the LSB +//! of ``AC'', and the last bit to be transmitted would be ``1'', the MSB of +//! ``80''. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetMACAddrSet(unsigned long ulBase, unsigned char *pucMACAddr) +{ + unsigned long ulTemp; + unsigned char *pucTemp = (unsigned char *)&ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucMACAddr != 0); + + // + // Program the MAC Address into the device. The first four bytes of the + // MAC Address are placed into the IA0 register. The remaining two bytes + // of the MAC address are placed into the IA1 register. + // + pucTemp[0] = pucMACAddr[0]; + pucTemp[1] = pucMACAddr[1]; + pucTemp[2] = pucMACAddr[2]; + pucTemp[3] = pucMACAddr[3]; + HWREG(ulBase + MAC_O_IA0) = ulTemp; + ulTemp = 0; + pucTemp[0] = pucMACAddr[4]; + pucTemp[1] = pucMACAddr[5]; + HWREG(ulBase + MAC_O_IA1) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the MAC address of the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucMACAddr is the pointer to the location in which to store the +//! array of MAC-48 address octets. +//! +//! This function will read the currently programmed MAC address into the +//! \e pucMACAddr buffer. +//! +//! \sa Refer to EthernetMACAddrSet() API description for more details about +//! the MAC address format. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetMACAddrGet(unsigned long ulBase, unsigned char *pucMACAddr) +{ + unsigned long ulTemp; + unsigned char *pucTemp = (unsigned char *)&ulTemp; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucMACAddr != 0); + + // + // Read the MAC address from the device. The first four bytes of the + // MAC address are read from the IA0 register. The remaining two bytes + // of the MAC addres + // + ulTemp = HWREG(ulBase + MAC_O_IA0); + pucMACAddr[0] = pucTemp[0]; + pucMACAddr[1] = pucTemp[1]; + pucMACAddr[2] = pucTemp[2]; + pucMACAddr[3] = pucTemp[3]; + ulTemp = HWREG(ulBase + MAC_O_IA1); + pucMACAddr[4] = pucTemp[0]; + pucMACAddr[5] = pucTemp[1]; +} + +//***************************************************************************** +// +//! Enables the Ethernet controller for normal operation. +//! +//! \param ulBase is the base address of the controller. +//! +//! Once the Ethernet controller has been configured using the +//! EthernetConfigSet() function and the MAC address has been programmed using +//! the EthernetMACAddrSet() function, this API function can be called to +//! enable the controller for normal operation. +//! +//! This function will enable the controller's transmitter and receiver, and +//! will reset the receive FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Reset the receive FIFO. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; + + // + // Enable the Ethernet receiver. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RXEN; + + // + // Enable Ethernet transmitter. + // + HWREG(ulBase + MAC_O_TCTL) |= MAC_TCTL_TXEN; + + // + // Reset the receive FIFO again, after the receiver has been enabled. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; +} + +//***************************************************************************** +// +//! Disables the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! When terminating operations on the Ethernet interface, this function should +//! be called. This function will disable the transmitter and receiver, and +//! will clear out the receive FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Reset the receive FIFO. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; + + // + // Disable the Ethernet transmitter. + // + HWREG(ulBase + MAC_O_TCTL) &= ~(MAC_TCTL_TXEN); + + // + // Disable the Ethernet receiver. + // + HWREG(ulBase + MAC_O_RCTL) &= ~(MAC_RCTL_RXEN); + + // + // Reset the receive FIFO again, after the receiver has been disabled. + // + HWREG(ulBase + MAC_O_RCTL) |= MAC_RCTL_RSTFIFO; +} + +//***************************************************************************** +// +//! Check for packet available from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! The Ethernet controller provides a register that contains the number of +//! packets available in the receive FIFO. When the last bytes of a packet are +//! successfully received (that is, the frame check sequence bytes), the packet +//! count is incremented. Once the packet has been fully read (including the +//! frame check sequence bytes) from the FIFO, the packet count will be +//! decremented. +//! +//! \return Returns \b true if there are one or more packets available in the +//! receive FIFO, including the current packet being read, and \b false +//! otherwise. +// +//***************************************************************************** +tBoolean +EthernetPacketAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Return the availability of packets. + // + return((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) ? true : false); +} + +//***************************************************************************** +// +//! Checks for packet space available in the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! +//! The Ethernet controller's transmit FIFO is designed to support a single +//! packet at a time. After the packet has been written into the FIFO, the +//! transmit request bit must be set to enable the transmission of the packet. +//! Only after the packet has been transmitted can a new packet be written +//! into the FIFO. This function will simply check to see if a packet is +//! in progress. If so, there is no space available in the transmit FIFO. +//! +//! \return Returns \b true if a space is available in the transmit FIFO, and +//! \b false otherwise. +// +//***************************************************************************** +tBoolean +EthernetSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Return the availability of space. + // + return((HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) ? false : true); +} + +//***************************************************************************** +// +//! \internal +//! +//! Internal function for reading a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! Based on the following table of how the receive frame is stored in the +//! receive FIFO, this function will extract a packet from the FIFO and store +//! it in the packet buffer that was passed in. +//! +//! Format of the data in the RX FIFO is as follows: +//! +//! \verbatim +//! +---------+----------+----------+----------+----------+ +//! | | 31:24 | 23:16 | 15:8 | 7:0 | +//! +---------+----------+----------+----------+----------+ +//! | Word 0 | DA 2 | DA 1 | FL MSB | FL LSB | +//! +---------+----------+----------+----------+----------+ +//! | Word 1 | DA 6 | DA 5 | DA 4 | DA 3 | +//! +---------+----------+----------+----------+----------+ +//! | Word 2 | SA 4 | SA 3 | SA 2 | SA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 3 | FT LSB | FT MSB | SA 6 | SA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 4 | DATA 4 | DATA 3 | DATA 2 | DATA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 5 | DATA 8 | DATA 7 | DATA 6 | DATA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 6 | DATA 12 | DATA 11 | DATA 10 | DATA 9 | +//! +---------+----------+----------+----------+----------+ +//! | ... | | | | | +//! +---------+----------+----------+----------+----------+ +//! | Word X | DATA n | DATA n-1 | DATA n-2 | DATA n-3 | +//! +---------+----------+----------+----------+----------+ +//! | Word Y | FCS 4 | FCS 3 | FCS 2 | FCS 1 | +//! +---------+----------+----------+----------+----------+ +//! \endverbatim +//! +//! Where FL is Frame Length, (FL + DA + SA + FT + DATA + FCS) Bytes. +//! Where DA is Destination (MAC) Address. +//! Where SA is Source (MAC) Address. +//! Where FT is Frame Type (or Frame Length for Ethernet). +//! Where DATA is Payload Data for the Ethernet Frame. +//! Where FCS is the Frame Check Sequence. +//! +//! \return Returns the negated packet length \b -n if the packet is too large +//! for \e pucBuf, and returns the packet length \b n otherwise. +// +//***************************************************************************** +static long +EthernetPacketGetInternal(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + unsigned long ulTemp; + long lFrameLen, lTempLen; + long i = 0; + + // + // Read WORD 0 (see format above) from the FIFO, set the receive + // Frame Length and store the first two bytes of the destination + // address in the receive buffer. + // + ulTemp = HWREG(ulBase + MAC_O_DATA); + lFrameLen = (long)(ulTemp & 0xFFFF); + pucBuf[i++] = (unsigned char) ((ulTemp >> 16) & 0xff); + pucBuf[i++] = (unsigned char) ((ulTemp >> 24) & 0xff); + + // + // Read all but the last WORD into the receive buffer. + // + lTempLen = (lBufLen < (lFrameLen - 6)) ? lBufLen : (lFrameLen - 6); + while(i <= (lTempLen - 4)) + { + *(unsigned long *)&pucBuf[i] = HWREG(ulBase + MAC_O_DATA); + i += 4; + } + + // + // Read the last 1, 2, or 3 BYTES into the buffer + // + if(i < lTempLen) + { + ulTemp = HWREG(ulBase + MAC_O_DATA); + if(i == lTempLen - 3) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + pucBuf[i++] = ((ulTemp >> 8) & 0xff); + pucBuf[i++] = ((ulTemp >> 16) & 0xff); + i += 1; + } + else if(i == lTempLen - 2) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + pucBuf[i++] = ((ulTemp >> 8) & 0xff); + i += 2; + } + else if(i == lTempLen - 1) + { + pucBuf[i++] = ((ulTemp >> 0) & 0xff); + i += 3; + } + } + + // + // Read any remaining WORDS (that did not fit into the buffer). + // + while(i < (lFrameLen - 2)) + { + ulTemp = HWREG(ulBase + MAC_O_DATA); + i += 4; + } + + // + // If frame was larger than the buffer, return the "negative" frame length + // + lFrameLen -= 6; + if(lFrameLen > lBufLen) + { + return(-lFrameLen); + } + + // + // Return the Frame Length + // + return(lFrameLen); +} + +//***************************************************************************** +// +//! Receives a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! This function reads a packet from the receive FIFO of the controller and +//! places it into \e pucBuf. If no packet is available the function will +//! return immediately. Otherwise, the function will read the entire packet +//! from the receive FIFO. If there are more bytes in the packet than will fit +//! into \e pucBuf (as specified by \e lBufLen), the function will return the +//! negated length of the packet and the buffer will contain \e lBufLen bytes +//! of the packet. Otherwise, the function will return the length of the +//! packet that was read and \e pucBuf will contain the entire packet +//! (excluding the frame check sequence bytes). +//! +//! This function replaces the original EthernetPacketNonBlockingGet() API and +//! performs the same actions. A macro is provided in ethernet.h to +//! map the original API to this API. +//! +//! \note This function will return immediately if no packet is available. +//! +//! \return Returns \b 0 if no packet is available, the negated packet length +//! \b -n if the packet is too large for \e pucBuf, and the packet length \b n +//! otherwise. +// +//***************************************************************************** +long +EthernetPacketGetNonBlocking(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Check to see if any packets are available. + // + if((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) == 0) + { + return(0); + } + + // + // Read the packet, and return. + // + return(EthernetPacketGetInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Waits for a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is the maximum number of bytes to be read into the buffer. +//! +//! This function reads a packet from the receive FIFO of the controller and +//! places it into \e pucBuf. The function will wait until a packet is +//! available in the FIFO. Then the function will read the entire packet +//! from the receive FIFO. If there are more bytes in the packet than will +//! fit into \e pucBuf (as specified by \e lBufLen), the function will return +//! the negated length of the packet and the buffer will contain \e lBufLen +//! bytes of the packet. Otherwise, the function will return the length of +//! the packet that was read and \e pucBuf will contain the entire packet +//! (excluding the frame check sequence bytes). +//! +//! \note This function is blocking and will not return until a packet arrives. +//! +//! \return Returns the negated packet length \b -n if the packet is too large +//! for \e pucBuf, and returns the packet length \b n otherwise. +// +//***************************************************************************** +long +EthernetPacketGet(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Wait for a packet to become available + // + while((HWREG(ulBase + MAC_O_NP) & MAC_NP_NPR_M) == 0) + { + } + + // + // Read the packet + // + return(EthernetPacketGetInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! \internal +//! +//! Internal function for sending a packet to the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! Puts a packet into the transmit FIFO of the controller. +//! +//! Format of the data in the TX FIFO is as follows: +//! +//! \verbatim +//! +---------+----------+----------+----------+----------+ +//! | | 31:24 | 23:16 | 15:8 | 7:0 | +//! +---------+----------+----------+----------+----------+ +//! | Word 0 | DA 2 | DA 1 | PL MSB | PL LSB | +//! +---------+----------+----------+----------+----------+ +//! | Word 1 | DA 6 | DA 5 | DA 4 | DA 3 | +//! +---------+----------+----------+----------+----------+ +//! | Word 2 | SA 4 | SA 3 | SA 2 | SA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 3 | FT LSB | FT MSB | SA 6 | SA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 4 | DATA 4 | DATA 3 | DATA 2 | DATA 1 | +//! +---------+----------+----------+----------+----------+ +//! | Word 5 | DATA 8 | DATA 7 | DATA 6 | DATA 5 | +//! +---------+----------+----------+----------+----------+ +//! | Word 6 | DATA 12 | DATA 11 | DATA 10 | DATA 9 | +//! +---------+----------+----------+----------+----------+ +//! | ... | | | | | +//! +---------+----------+----------+----------+----------+ +//! | Word X | DATA n | DATA n-1 | DATA n-2 | DATA n-3 | +//! +---------+----------+----------+----------+----------+ +//! \endverbatim +//! +//! Where PL is Payload Length, (DATA) only +//! Where DA is Destination (MAC) Address +//! Where SA is Source (MAC) Address +//! Where FT is Frame Type (or Frame Length for Ethernet) +//! Where DATA is Payload Data for the Ethernet Frame +//! +//! \return Returns the negated packet length \b -lBufLen if the packet is too +//! large for FIFO, and the packet length \b lBufLen otherwise. +// +//***************************************************************************** +static long +EthernetPacketPutInternal(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + unsigned long ulTemp; + long i = 0; + + // + // If the packet is too large, return the negative packet length as + // an error code. + // + if(lBufLen > (2048 - 2)) + { + return(-lBufLen); + } + + // + // Build and write WORD 0 (see format above) to the transmit FIFO. + // + ulTemp = (unsigned long)(lBufLen - 14); + ulTemp |= (pucBuf[i++] << 16); + ulTemp |= (pucBuf[i++] << 24); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + + // + // Write each subsequent WORD n to the transmit FIFO, except for the last + // WORD (if the word does not contain 4 bytes). + // + while(i <= (lBufLen - 4)) + { + HWREG(ulBase + MAC_O_DATA) = *(unsigned long *)&pucBuf[i]; + i += 4; + } + + // + // Build the last word of the remaining 1, 2, or 3 bytes, and store + // the WORD into the transmit FIFO. + // + if(i != lBufLen) + { + if(i == (lBufLen - 3)) + { + ulTemp = (pucBuf[i++] << 0); + ulTemp |= (pucBuf[i++] << 8); + ulTemp |= (pucBuf[i++] << 16); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + else if(i == (lBufLen - 2)) + { + ulTemp = (pucBuf[i++] << 0); + ulTemp |= (pucBuf[i++] << 8); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + else if(i == (lBufLen - 1)) + { + ulTemp = (pucBuf[i++] << 0); + HWREG(ulBase + MAC_O_DATA) = ulTemp; + } + } + + // + // Activate the transmitter + // + HWREG(ulBase + MAC_O_TR) = MAC_TR_NEWTX; + + // + // Return the Buffer Length transmitted. + // + return(lBufLen); +} + +//***************************************************************************** +// +//! Sends a packet to the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! This function writes \e lBufLen bytes of the packet contained in \e pucBuf +//! into the transmit FIFO of the controller and then activates the +//! transmitter for this packet. If no space is available in the FIFO, the +//! function will return immediately. If space is available, the +//! function will return once \e lBufLen bytes of the packet have been placed +//! into the FIFO and the transmitter has been started. The function will not +//! wait for the transmission to complete. The function will return the +//! negated \e lBufLen if the length is larger than the space available in +//! the transmit FIFO. +//! +//! This function replaces the original EthernetPacketNonBlockingPut() API and +//! performs the same actions. A macro is provided in ethernet.h to +//! map the original API to this API. +//! +//! \note This function does not block and will return immediately if no space +//! is available for the transmit packet. +//! +//! \return Returns \b 0 if no space is available in the transmit FIFO, the +//! negated packet length \b -lBufLen if the packet is too large for FIFO, and +//! the packet length \b lBufLen otherwise. +// +//***************************************************************************** +long +EthernetPacketPutNonBlocking(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Check if the transmit FIFO is in use and return the appropriate code. + // + if(HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) + { + return(0); + } + + // + // Send the packet and return. + // + return(EthernetPacketPutInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Waits to send a packet from the Ethernet controller. +//! +//! \param ulBase is the base address of the controller. +//! \param pucBuf is the pointer to the packet buffer. +//! \param lBufLen is number of bytes in the packet to be transmitted. +//! +//! This function writes \e lBufLen bytes of the packet contained in \e pucBuf +//! into the transmit FIFO of the controller and then activates the transmitter +//! for this packet. This function will wait until the transmit FIFO is empty. +//! Once space is available, the function will return once \e lBufLen bytes of +//! the packet have been placed into the FIFO and the transmitter has been +//! started. The function will not wait for the transmission to complete. The +//! function will return the negated \e lBufLen if the length is larger than +//! the space available in the transmit FIFO. +//! +//! \note This function blocks and will wait until space is available for the +//! transmit packet before returning. +//! +//! \return Returns the negated packet length \b -lBufLen if the packet is too +//! large for FIFO, and the packet length \b lBufLen otherwise. +// +//***************************************************************************** +long +EthernetPacketPut(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pucBuf != 0); + ASSERT(lBufLen > 0); + + // + // Wait for current packet (if any) to complete. + // + while(HWREG(ulBase + MAC_O_TR) & MAC_TR_NEWTX) + { + } + + // + // Send the packet and return. + // + return(EthernetPacketPutInternal(ulBase, pucBuf, lBufLen)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for an Ethernet interrupt. +//! +//! \param ulBase is the base address of the controller. +//! \param pfnHandler is a pointer to the function to be called when the +//! enabled Ethernet interrupts occur. +//! +//! This function sets the handler to be called when the Ethernet interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific Ethernet interrupts must be enabled via EthernetIntEnable(). It +//! is the interrupt handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(pfnHandler != 0); + + // + // Register the interrupt handler. + // + IntRegister(INT_ETH, pfnHandler); + + // + // Enable the Ethernet interrupt. + // + IntEnable(INT_ETH); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for an Ethernet interrupt. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function unregisters the interrupt handler. This will disable the +//! global interrupt in the interrupt controller so that the interrupt handler +//! no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Disable the interrupt. + // + IntDisable(INT_ETH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_ETH); +} + +//***************************************************************************** +// +//! Enables individual Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated Ethernet interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b ETH_INT_PHY - An interrupt from the PHY has occurred. The integrated +//! PHY supports a number of interrupt conditions. The PHY register, PHY_MR17, +//! must be read to determine which PHY interrupt has occurred. This register +//! can be read using the EthernetPHYRead() API function. +//! - \b ETH_INT_MDIO - This interrupt indicates that a transaction on the +//! management interface has completed successfully. +//! - \b ETH_INT_RXER - This interrupt indicates that an error has occurred +//! during reception of a frame. This error can indicate a length mismatch, a +//! CRC failure, or an error indication from the PHY. +//! - \b ETH_INT_RXOF - This interrupt indicates that a frame has been received +//! that exceeds the available space in the RX FIFO. +//! - \b ETH_INT_TX - This interrupt indicates that the packet stored in the TX +//! FIFO has been successfully transmitted. +//! - \b ETH_INT_TXER - This interrupt indicates that an error has occurred +//! during the transmission of a packet. This error can be either a retry +//! failure during the back-off process, or an invalid length stored in the TX +//! FIFO. +//! - \b ETH_INT_RX - This interrupt indicates that one (or more) packets are +//! available in the RX FIFO for processing. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + MAC_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated Ethernet interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to EthernetIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + MAC_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the current Ethernet interrupt status. +//! +//! \param ulBase is the base address of the controller. +//! \param bMasked is false if the raw interrupt status is required and true +//! if the masked interrupt status is required. +//! +//! This returns the interrupt status for the Ethernet controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in EthernetIntEnable(). +// +//***************************************************************************** +unsigned long +EthernetIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Read the unmasked status. + // + ulStatus = HWREG(ulBase + MAC_O_RIS); + + // + // If masked status is requested, mask it off. + // + if(bMasked) + { + ulStatus &= HWREG(ulBase + MAC_O_IM); + } + + // + // Return the interrupt status value. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears Ethernet interrupt sources. +//! +//! \param ulBase is the base address of the controller. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified Ethernet interrupt sources are cleared so that they no longer +//! assert. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to EthernetIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +EthernetIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + ASSERT(!(ulIntFlags & ~(ETH_INT_PHY | ETH_INT_MDIO | ETH_INT_RXER | + ETH_INT_RXOF | ETH_INT_TX | ETH_INT_TXER | + ETH_INT_RX))); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + MAC_O_IACK) = ulIntFlags; +} + +//***************************************************************************** +// +//! Writes to the PHY register. +//! +//! \param ulBase is the base address of the controller. +//! \param ucRegAddr is the address of the PHY register to be accessed. +//! \param ulData is the data to be written to the PHY register. +//! +//! This function will write the \e ulData to the PHY register specified by +//! \e ucRegAddr. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYWrite(unsigned long ulBase, unsigned char ucRegAddr, + unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Wait for any pending transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Program the DATA to be written. + // + HWREG(ulBase + MAC_O_MTXD) = ulData & MAC_MTXD_MDTX_M; + + // + // Program the PHY register address and initiate the transaction. + // + HWREG(ulBase + MAC_O_MCTL) = (((ucRegAddr << 3) & MAC_MCTL_REGADR_M) | + MAC_MCTL_WRITE | MAC_MCTL_START); + + // + // Wait for the write transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } +} + +//***************************************************************************** +// +//! Reads from a PHY register. +//! +//! \param ulBase is the base address of the controller. +//! \param ucRegAddr is the address of the PHY register to be accessed. +//! +//! This function will return the contents of the PHY register specified by +//! \e ucRegAddr. +//! +//! \return Returns the 16-bit value read from the PHY. +// +//***************************************************************************** +unsigned long +EthernetPHYRead(unsigned long ulBase, unsigned char ucRegAddr) +{ + // + // Check the arguments. + // + ASSERT(ulBase == ETH_BASE); + + // + // Wait for any pending transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Program the PHY register address and initiate the transaction. + // + HWREG(ulBase + MAC_O_MCTL) = (((ucRegAddr << 3) & MAC_MCTL_REGADR_M) | + MAC_MCTL_START); + + // + // Wait for the transaction to complete. + // + while(HWREG(ulBase + MAC_O_MCTL) & MAC_MCTL_START) + { + } + + // + // Return the PHY data that was read. + // + return(HWREG(ulBase + MAC_O_MRXD) & MAC_MRXD_MDRX_M); +} + +//***************************************************************************** +// +//! Powers off the Ethernet PHY. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will power off the Ethernet PHY, reducing the current +//! consuption of the device. While in the powered off state, the Ethernet +//! controller will be unable to connect to the Ethernet. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYPowerOff(unsigned long ulBase) +{ + // + // Set the PWRDN bit and clear the ANEGEN bit in the PHY, putting it into + // its low power mode. + // + EthernetPHYWrite(ulBase, PHY_MR0, + (EthernetPHYRead(ulBase, PHY_MR0) & ~PHY_MR0_ANEGEN) | + PHY_MR0_PWRDN); +} + +//***************************************************************************** +// +//! Powers on the Ethernet PHY. +//! +//! \param ulBase is the base address of the controller. +//! +//! This function will power on the Ethernet PHY, enabling it return to normal +//! operation. By default, the PHY is powered on, so this function only needs +//! to be called if EthernetPHYPowerOff() has previously been called. +//! +//! \return None. +// +//***************************************************************************** +void +EthernetPHYPowerOn(unsigned long ulBase) +{ + // + // Clear the PWRDN bit and set the ANEGEN bit in the PHY, putting it into + // normal operating mode. + // + EthernetPHYWrite(ulBase, PHY_MR0, + (EthernetPHYRead(ulBase, PHY_MR0) & ~PHY_MR0_PWRDN) | + PHY_MR0_ANEGEN); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.h new file mode 100644 index 00000000..860a1365 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ethernet.h @@ -0,0 +1,171 @@ +//***************************************************************************** +// +// ethernet.h - Defines and Macros for the ethernet module. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ETHERNET_H__ +#define __ETHERNET_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to EthernetConfigSet as the ulConfig value, and +// returned from EthernetConfigGet. +// +//***************************************************************************** +#define ETH_CFG_TS_TSEN 0x010000 // Enable Timestamp (CCP) +#define ETH_CFG_RX_BADCRCDIS 0x000800 // Disable RX BAD CRC Packets +#define ETH_CFG_RX_PRMSEN 0x000400 // Enable RX Promiscuous +#define ETH_CFG_RX_AMULEN 0x000200 // Enable RX Multicast +#define ETH_CFG_TX_DPLXEN 0x000010 // Enable TX Duplex Mode +#define ETH_CFG_TX_CRCEN 0x000004 // Enable TX CRC Generation +#define ETH_CFG_TX_PADEN 0x000002 // Enable TX Padding + +//***************************************************************************** +// +// Values that can be passed to EthernetIntEnable, EthernetIntDisable, and +// EthernetIntClear as the ulIntFlags parameter, and returned from +// EthernetIntStatus. +// +//***************************************************************************** +#define ETH_INT_PHY 0x040 // PHY Event/Interrupt +#define ETH_INT_MDIO 0x020 // Management Transaction +#define ETH_INT_RXER 0x010 // RX Error +#define ETH_INT_RXOF 0x008 // RX FIFO Overrun +#define ETH_INT_TX 0x004 // TX Complete +#define ETH_INT_TXER 0x002 // TX Error +#define ETH_INT_RX 0x001 // RX Complete + +//***************************************************************************** +// +// Helper Macros for Ethernet Processing +// +//***************************************************************************** +// +// htonl/ntohl - big endian/little endian byte swapping macros for +// 32-bit (long) values +// +//***************************************************************************** +#ifndef htonl + #define htonl(a) \ + ((((a) >> 24) & 0x000000ff) | \ + (((a) >> 8) & 0x0000ff00) | \ + (((a) << 8) & 0x00ff0000) | \ + (((a) << 24) & 0xff000000)) +#endif + +#ifndef ntohl + #define ntohl(a) htonl((a)) +#endif + +//***************************************************************************** +// +// htons/ntohs - big endian/little endian byte swapping macros for +// 16-bit (short) values +// +//***************************************************************************** +#ifndef htons + #define htons(a) \ + ((((a) >> 8) & 0x00ff) | \ + (((a) << 8) & 0xff00)) +#endif + +#ifndef ntohs + #define ntohs(a) htons((a)) +#endif + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void EthernetInitExpClk(unsigned long ulBase, unsigned long ulEthClk); +extern void EthernetConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern unsigned long EthernetConfigGet(unsigned long ulBase); +extern void EthernetMACAddrSet(unsigned long ulBase, + unsigned char *pucMACAddr); +extern void EthernetMACAddrGet(unsigned long ulBase, + unsigned char *pucMACAddr); +extern void EthernetEnable(unsigned long ulBase); +extern void EthernetDisable(unsigned long ulBase); +extern tBoolean EthernetPacketAvail(unsigned long ulBase); +extern tBoolean EthernetSpaceAvail(unsigned long ulBase); +extern long EthernetPacketGetNonBlocking(unsigned long ulBase, + unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketGet(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketPutNonBlocking(unsigned long ulBase, + unsigned char *pucBuf, + long lBufLen); +extern long EthernetPacketPut(unsigned long ulBase, unsigned char *pucBuf, + long lBufLen); +extern void EthernetIntRegister(unsigned long ulBase, + void (*pfnHandler)(void)); +extern void EthernetIntUnregister(unsigned long ulBase); +extern void EthernetIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void EthernetIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long EthernetIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void EthernetIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void EthernetPHYWrite(unsigned long ulBase, unsigned char ucRegAddr, + unsigned long ulData); +extern unsigned long EthernetPHYRead(unsigned long ulBase, + unsigned char ucRegAddr); +extern void EthernetPHYPowerOff(unsigned long ulBase); +extern void EthernetPHYPowerOn(unsigned long ulBase); + +//***************************************************************************** +// +// Several Ethernet APIs have been renamed, with the original function name +// being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define EthernetInit(a) \ + EthernetInitExpClk(a, SysCtlClockGet()) +#define EthernetPacketNonBlockingGet(a, b, c) \ + EthernetPacketGetNonBlocking(a, b, c) +#define EthernetPacketNonBlockingPut(a, b, c) \ + EthernetPacketPutNonBlocking(a, b, c) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __ETHERNET_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.c new file mode 100644 index 00000000..09585467 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.c @@ -0,0 +1,912 @@ +//***************************************************************************** +// +// flash.c - Driver for programming the on-chip flash. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup flash_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_flash.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/flash.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Program Enable (FMPPE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPPERegs[] = +{ + FLASH_FMPPE, + FLASH_FMPPE1, + FLASH_FMPPE2, + FLASH_FMPPE3 +}; + +//***************************************************************************** +// +// An array that maps the specified memory bank to the appropriate Flash +// Memory Protection Read Enable (FMPRE) register. +// +//***************************************************************************** +static const unsigned long g_pulFMPRERegs[] = +{ + FLASH_FMPRE, + FLASH_FMPRE1, + FLASH_FMPRE2, + FLASH_FMPRE3 +}; + +//***************************************************************************** +// +//! Gets the number of processor clocks per micro-second. +//! +//! This function returns the number of clocks per micro-second, as presently +//! known by the flash controller. +//! +//! \return Returns the number of processor clocks per micro-second. +// +//***************************************************************************** +unsigned long +FlashUsecGet(void) +{ + // + // Return the number of clocks per micro-second. + // + return(HWREG(FLASH_USECRL) + 1); +} + +//***************************************************************************** +// +//! Sets the number of processor clocks per micro-second. +//! +//! \param ulClocks is the number of processor clocks per micro-second. +//! +//! This function is used to tell the flash controller the number of processor +//! clocks per micro-second. This value must be programmed correctly or the +//! flash most likely will not program correctly; it has no affect on reading +//! flash. +//! +//! \return None. +// +//***************************************************************************** +void +FlashUsecSet(unsigned long ulClocks) +{ + // + // Set the number of clocks per micro-second. + // + HWREG(FLASH_USECRL) = ulClocks - 1; +} + +//***************************************************************************** +// +//! Erases a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be erased. +//! +//! This function will erase a 1 kB block of the on-chip flash. After erasing, +//! the block will be filled with 0xFF bytes. Read-only and execute-only +//! blocks cannot be erased. +//! +//! This function will not return until the block has been erased. +//! +//! \return Returns 0 on success, or -1 if an invalid block address was +//! specified or the block is write-protected. +// +//***************************************************************************** +long +FlashErase(unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & (FLASH_ERASE_SIZE - 1))); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // Erase the block. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_ERASE; + + // + // Wait until the block has been erased. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_ERASE) + { + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Programs flash. +//! +//! \param pulData is a pointer to the data to be programmed. +//! \param ulAddress is the starting address in flash to be programmed. Must +//! be a multiple of four. +//! \param ulCount is the number of bytes to be programmed. Must be a multiple +//! of four. +//! +//! This function will program a sequence of words into the on-chip flash. +//! Programming each location consists of the result of an AND operation +//! of the new data and the existing data; in other words bits that contain +//! 1 can remain 1 or be changed to 0, but bits that are 0 cannot be changed +//! to 1. Therefore, a word can be programmed multiple times as long as these +//! rules are followed; if a program operation attempts to change a 0 bit to +//! a 1 bit, that bit will not have its value changed. +//! +//! Since the flash is programmed one word at a time, the starting address and +//! byte count must both be multiples of four. It is up to the caller to +//! verify the programmed contents, if such verification is required. +//! +//! This function will not return until the data has been programmed. +//! +//! \return Returns 0 on success, or -1 if a programming error is encountered. +// +//***************************************************************************** +long +FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount) +{ + // + // Check the arguments. + // + ASSERT(!(ulAddress & 3)); + ASSERT(!(ulCount & 3)); + + // + // Clear the flash access interrupt. + // + HWREG(FLASH_FCMISC) = FLASH_FCMISC_AMISC; + + // + // See if this device has a write buffer. + // + if(HWREG(SYSCTL_NVMSTAT) & SYSCTL_NVMSTAT_FWB) + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Set the address of this block of words. + // + HWREG(FLASH_FMA) = ulAddress & ~(0x7f); + + // + // Loop over the words in this 32-word block. + // + while(((ulAddress & 0x7c) || (HWREG(FLASH_FWBVAL) == 0)) && + (ulCount != 0)) + { + // + // Write this word into the write buffer. + // + HWREG(FLASH_FWBN + (ulAddress & 0x7c)) = *pulData++; + ulAddress += 4; + ulCount -= 4; + } + + // + // Program the contents of the write buffer into flash. + // + HWREG(FLASH_FMC2) = FLASH_FMC2_WRKEY | FLASH_FMC2_WRBUF; + + // + // Wait until the write buffer has been programmed. + // + while(HWREG(FLASH_FMC2) & FLASH_FMC2_WRBUF) + { + } + } + } + else + { + // + // Loop over the words to be programmed. + // + while(ulCount) + { + // + // Program the next word. + // + HWREG(FLASH_FMA) = ulAddress; + HWREG(FLASH_FMD) = *pulData; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_WRITE; + + // + // Wait until the word has been programmed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_WRITE) + { + } + + // + // Increment to the next word. + // + pulData++; + ulAddress += 4; + ulCount -= 4; + } + } + + // + // Return an error if an access violation occurred. + // + if(HWREG(FLASH_FCRIS) & FLASH_FCRIS_ARIS) + { + return(-1); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be queried. +//! +//! This function will get the current protection for the specified 2 kB block +//! of flash. Each block can be read/write, read-only, or execute-only. +//! Read/write blocks can be read, executed, erased, and programmed. Read-only +//! blocks can be read and executed. Execute-only blocks can only be executed; +//! processor and debugger data reads are not allowed. +//! +//! \return Returns the protection setting for this block. See +//! FlashProtectSet() for possible values. +// +//***************************************************************************** +tFlashProtection +FlashProtectGet(unsigned long ulAddress) +{ + unsigned long ulFMPRE, ulFMPPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + + // + // Calculate the Flash Bank from Base Address, and mask off the Bank + // from ulAddress for subsequent reference. + // + ulBank = (((ulAddress / FLASH_PROTECT_SIZE) / 32) % 4); + ulAddress &= ((FLASH_PROTECT_SIZE * 32) - 1); + + // + // Read the appropriate flash protection registers for the specified + // flash bank. + // + ulFMPRE = HWREG(g_pulFMPRERegs[ulBank]); + ulFMPPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When Querying Block + // Protection, assume these bits are 1. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulFMPRE |= (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + } + + // + // Check the appropriate protection bits for the block of memory that + // is specified by the address. + // + switch((((ulFMPRE >> (ulAddress / FLASH_PROTECT_SIZE)) & + FLASH_FMP_BLOCK_0) << 1) | + ((ulFMPPE >> (ulAddress / FLASH_PROTECT_SIZE)) & FLASH_FMP_BLOCK_0)) + { + // + // This block is marked as execute only (that is, it can not be erased + // or programmed, and the only reads allowed are via the instruction + // fetch interface). + // + case 0: + case 1: + { + return(FlashExecuteOnly); + } + + // + // This block is marked as read only (that is, it can not be erased or + // programmed). + // + case 2: + { + return(FlashReadOnly); + } + + // + // This block is read/write; it can be read, erased, and programmed. + // + case 3: + default: + { + return(FlashReadWrite); + } + } +} + +//***************************************************************************** +// +//! Sets the protection setting for a block of flash. +//! +//! \param ulAddress is the start address of the flash block to be protected. +//! \param eProtect is the protection to be applied to the block. Can be one +//! of \b FlashReadWrite, \b FlashReadOnly, or \b FlashExecuteOnly. +//! +//! This function will set the protection for the specified 2 kB block of +//! flash. Blocks which are read/write can be made read-only or execute-only. +//! Blocks which are read-only can be made execute-only. Blocks which are +//! execute-only cannot have their protection modified. Attempts to make the +//! block protection less stringent (that is, read-only to read/write) will +//! result in a failure (and be prevented by the hardware). +//! +//! Changes to the flash protection are maintained only until the next reset. +//! This allows the application to be executed in the desired flash protection +//! environment to check for inappropriate flash access (via the flash +//! interrupt). To make the flash protection permanent, use the +//! FlashProtectSave() function. +//! +//! \return Returns 0 on success, or -1 if an invalid address or an invalid +//! protection was specified. +// +//***************************************************************************** +long +FlashProtectSet(unsigned long ulAddress, tFlashProtection eProtect) +{ + unsigned long ulProtectRE, ulProtectPE; + unsigned long ulBank; + + // + // Check the argument. + // + ASSERT(!(ulAddress & (FLASH_PROTECT_SIZE - 1))); + ASSERT((eProtect == FlashReadWrite) || (eProtect == FlashReadOnly) || + (eProtect == FlashExecuteOnly)); + + // + // Convert the address into a block number. + // + ulAddress /= FLASH_PROTECT_SIZE; + + // + // ulAddress contains a "raw" block number. Derive the Flash Bank from + // the "raw" block number, and convert ulAddress to a "relative" + // block number. + // + ulBank = ((ulAddress / 32) % 4); + ulAddress %= 32; + + // + // Get the current protection for the specified flash bank. + // + ulProtectRE = HWREG(g_pulFMPRERegs[ulBank]); + ulProtectPE = HWREG(g_pulFMPPERegs[ulBank]); + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG protect options, and are + // not available for the FLASH protection scheme. When setting protection, + // check to see if block 30 or 31 and protection is FlashExecuteOnly. If + // so, return an error condition. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + if((ulAddress >= 30) && (eProtect == FlashExecuteOnly)) + { + return(-1); + } + } + + // + // Set the protection based on the requested proection. + // + switch(eProtect) + { + // + // Make this block execute only. + // + case FlashExecuteOnly: + { + // + // Turn off the read and program bits for this block. + // + ulProtectRE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read only. + // + case FlashReadOnly: + { + // + // The block can not be made read only if it is execute only. + // + if(((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) + { + return(-1); + } + + // + // Make this block read only. + // + ulProtectPE &= ~(FLASH_FMP_BLOCK_0 << ulAddress); + + // + // We're done handling this protection. + // + break; + } + + // + // Make this block read/write. + // + case FlashReadWrite: + default: + { + // + // The block can not be made read/write if it is not already + // read/write. + // + if((((ulProtectRE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0) || + (((ulProtectPE >> ulAddress) & FLASH_FMP_BLOCK_0) != + FLASH_FMP_BLOCK_0)) + { + return(-1); + } + + // + // The block is already read/write, so there is nothing to do. + // + return(0); + } + } + + // + // For Stellaris Sandstorm-class devices, revision C1 and C2, the upper + // bits of the FMPPE register are used for JTAG options, and are not + // available for the FLASH protection scheme. When setting block + // protection, ensure that these bits are not altered. + // + if(CLASS_IS_SANDSTORM && (REVISION_IS_C1 || REVISION_IS_C2)) + { + ulProtectRE &= ~(FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30); + ulProtectRE |= (HWREG(g_pulFMPRERegs[ulBank]) & + (FLASH_FMP_BLOCK_31 | FLASH_FMP_BLOCK_30)); + } + + // + // Set the new protection for the specified flash bank. + // + HWREG(g_pulFMPRERegs[ulBank]) = ulProtectRE; + HWREG(g_pulFMPPERegs[ulBank]) = ulProtectPE; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the flash protection settings. +//! +//! This function will make the currently programmed flash protection settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change the flash protection. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashProtectSave(void) +{ + int ulTemp, ulLimit; + + // + // If running on a Sandstorm-class device, only trigger a save of the first + // two protection registers (FMPRE and FMPPE). Otherwise, save the + // entire bank of flash protection registers. + // + ulLimit = CLASS_IS_SANDSTORM ? 2 : 8; + for(ulTemp = 0; ulTemp < ulLimit; ulTemp++) + { + // + // Tell the flash controller to write the flash protection register. + // + HWREG(FLASH_FMA) = ulTemp; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Gets the user registers. +//! +//! \param pulUser0 is a pointer to the location to store USER Register 0. +//! \param pulUser1 is a pointer to the location to store USER Register 1. +//! +//! This function will read the contents of user registers (0 and 1), and +//! store them in the specified locations. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1) +{ + // + // Verify that the pointers are valid. + // + ASSERT(pulUser0 != 0); + ASSERT(pulUser1 != 0); + + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Get and store the current value of the user registers. + // + *pulUser0 = HWREG(FLASH_USERREG0); + *pulUser1 = HWREG(FLASH_USERREG1); + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Sets the user registers. +//! +//! \param ulUser0 is the value to store in USER Register 0. +//! \param ulUser1 is the value to store in USER Register 1. +//! +//! This function will set the contents of the user registers (0 and 1) to +//! the specified values. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSet(unsigned long ulUser0, unsigned long ulUser1) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Save the new values into the user registers. + // + HWREG(FLASH_USERREG0) = ulUser0; + HWREG(FLASH_USERREG1) = ulUser1; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Saves the user registers. +//! +//! This function will make the currently programmed user register settings +//! permanent. This is a non-reversible operation; a chip reset or power cycle +//! will not change this setting. +//! +//! This function will not return until the protection has been saved. +//! +//! \return Returns 0 on success, or -1 if a hardware error is encountered. +// +//***************************************************************************** +long +FlashUserSave(void) +{ + // + // Verify that hardware supports user registers. + // + if(CLASS_IS_SANDSTORM) + { + return(-1); + } + + // + // Setting the MSB of FMA will trigger a permanent save of a USER + // register. Bit 0 will indicate User 0 (0) or User 1 (1). + // + HWREG(FLASH_FMA) = 0x80000000; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Tell the flash controller to write the USER1 Register. + // + HWREG(FLASH_FMA) = 0x80000001; + HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT; + + // + // Wait until the write has completed. + // + while(HWREG(FLASH_FMC) & FLASH_FMC_COMT) + { + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the flash interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the flash +//! interrupt occurs. +//! +//! This sets the handler to be called when the flash interrupt occurs. The +//! flash controller can generate an interrupt when an invalid flash access +//! occurs, such as trying to program or erase a read-only block, or trying to +//! read from an execute-only block. It can also generate an interrupt when a +//! program or erase operation has completed. The interrupt will be +//! automatically enabled when the handler is registered. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_FLASH, pfnHandler); + + // + // Enable the flash interrupt. + // + IntEnable(INT_FLASH); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the flash interrupt. +//! +//! This function will clear the handler to be called when the flash interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler is no longer called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_FLASH); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_FLASH); +} + +//***************************************************************************** +// +//! Enables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Enables the indicated flash controller interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntEnable(unsigned long ulIntFlags) +{ + // + // Enable the specified interrupts. + // + HWREG(FLASH_FCIM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual flash controller interrupt sources. +//! +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_ACCESS values. +//! +//! Disables the indicated flash controller interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntDisable(unsigned long ulIntFlags) +{ + // + // Disable the specified interrupts. + // + HWREG(FLASH_FCIM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the flash controller. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b FLASH_INT_PROGRAM and \b FLASH_INT_ACCESS. +// +//***************************************************************************** +unsigned long +FlashIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(FLASH_FCMISC)); + } + else + { + return(HWREG(FLASH_FCRIS)); + } +} + +//***************************************************************************** +// +//! Clears flash controller interrupt sources. +//! +//! \param ulIntFlags is the bit mask of the interrupt sources to be cleared. +//! Can be any of the \b FLASH_INT_PROGRAM or \b FLASH_INT_AMISC values. +//! +//! The specified flash controller interrupt sources are cleared, so that they +//! no longer assert. This must be done in the interrupt handler to keep it +//! from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +FlashIntClear(unsigned long ulIntFlags) +{ + // + // Clear the flash interrupt. + // + HWREG(FLASH_FCMISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.h new file mode 100644 index 00000000..36203673 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/flash.h @@ -0,0 +1,106 @@ +//***************************************************************************** +// +// flash.h - Prototypes for the flash driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __FLASH_H__ +#define __FLASH_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to FlashProtectSet(), and returned by +// FlashProtectGet(). +// +//***************************************************************************** +typedef enum +{ + FlashReadWrite, // Flash can be read and written + FlashReadOnly, // Flash can only be read + FlashExecuteOnly // Flash can only be executed +} +tFlashProtection; + +//***************************************************************************** +// +// Values passed to FlashIntEnable(), FlashIntDisable() and FlashIntClear() and +// returned from FlashIntStatus(). +// +//***************************************************************************** +#define FLASH_INT_PROGRAM 0x00000002 // Programming Interrupt Mask +#define FLASH_INT_ACCESS 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long FlashUsecGet(void); +extern void FlashUsecSet(unsigned long ulClocks); +extern long FlashErase(unsigned long ulAddress); +extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress, + unsigned long ulCount); +extern tFlashProtection FlashProtectGet(unsigned long ulAddress); +extern long FlashProtectSet(unsigned long ulAddress, + tFlashProtection eProtect); +extern long FlashProtectSave(void); +extern long FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1); +extern long FlashUserSet(unsigned long ulUser0, unsigned long ulUser1); +extern long FlashUserSave(void); +extern void FlashIntRegister(void (*pfnHandler)(void)); +extern void FlashIntUnregister(void); +extern void FlashIntEnable(unsigned long ulIntFlags); +extern void FlashIntDisable(unsigned long ulIntFlags); +extern unsigned long FlashIntStatus(tBoolean bMasked); +extern void FlashIntClear(unsigned long ulIntFlags); + +//***************************************************************************** +// +// Deprecated function names. These definitions ensure backwards compatibility +// but new code should avoid using deprecated function names since these will +// be removed at some point in the future. +// +//***************************************************************************** +#ifndef DEPRECATED +#define FlashIntGetStatus FlashIntStatus +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.c new file mode 100644 index 00000000..4e5afa7c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.c @@ -0,0 +1,1600 @@ +//***************************************************************************** +// +// gpio.c - API for GPIO ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup gpio_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_gpio.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/gpio.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// The base addresses of all the GPIO modules. Both the APB and AHB apertures +// are provided. +// +//***************************************************************************** +static const unsigned long g_pulGPIOBaseAddrs[] = +{ + GPIO_PORTA_BASE, GPIO_PORTA_AHB_BASE, + GPIO_PORTB_BASE, GPIO_PORTB_AHB_BASE, + GPIO_PORTC_BASE, GPIO_PORTC_AHB_BASE, + GPIO_PORTD_BASE, GPIO_PORTD_AHB_BASE, + GPIO_PORTE_BASE, GPIO_PORTE_AHB_BASE, + GPIO_PORTF_BASE, GPIO_PORTF_AHB_BASE, + GPIO_PORTG_BASE, GPIO_PORTG_AHB_BASE, + GPIO_PORTH_BASE, GPIO_PORTH_AHB_BASE, + GPIO_PORTJ_BASE, GPIO_PORTJ_AHB_BASE, +}; + +//***************************************************************************** +// +//! \internal +//! Checks a GPIO base address. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function determines if a GPIO port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +GPIOBaseValid(unsigned long ulPort) +{ + return((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTA_AHB_BASE) || + (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTB_AHB_BASE) || + (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTC_AHB_BASE) || + (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTD_AHB_BASE) || + (ulPort == GPIO_PORTE_BASE) || (ulPort == GPIO_PORTE_AHB_BASE) || + (ulPort == GPIO_PORTF_BASE) || (ulPort == GPIO_PORTF_AHB_BASE) || + (ulPort == GPIO_PORTG_BASE) || (ulPort == GPIO_PORTG_AHB_BASE) || + (ulPort == GPIO_PORTH_BASE) || (ulPort == GPIO_PORTH_AHB_BASE) || + (ulPort == GPIO_PORTJ_BASE) || (ulPort == GPIO_PORTJ_AHB_BASE)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Gets the GPIO interrupt number. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! Given a GPIO base address, returns the corresponding interrupt number. +//! +//! \return Returns a GPIO interrupt number, or -1 if \e ulPort is invalid. +// +//***************************************************************************** +static long +GPIOGetIntNumber(unsigned long ulPort) +{ + unsigned int ulInt; + + // + // Determine the GPIO interrupt number for the given module. + // + switch(ulPort) + { + case GPIO_PORTA_BASE: + case GPIO_PORTA_AHB_BASE: + { + ulInt = INT_GPIOA; + break; + } + + case GPIO_PORTB_BASE: + case GPIO_PORTB_AHB_BASE: + { + ulInt = INT_GPIOB; + break; + } + + case GPIO_PORTC_BASE: + case GPIO_PORTC_AHB_BASE: + { + ulInt = INT_GPIOC; + break; + } + + case GPIO_PORTD_BASE: + case GPIO_PORTD_AHB_BASE: + { + ulInt = INT_GPIOD; + break; + } + + case GPIO_PORTE_BASE: + case GPIO_PORTE_AHB_BASE: + { + ulInt = INT_GPIOE; + break; + } + + case GPIO_PORTF_BASE: + case GPIO_PORTF_AHB_BASE: + { + ulInt = INT_GPIOF; + break; + } + + case GPIO_PORTG_BASE: + case GPIO_PORTG_AHB_BASE: + { + ulInt = INT_GPIOG; + break; + } + + case GPIO_PORTH_BASE: + case GPIO_PORTH_AHB_BASE: + { + ulInt = INT_GPIOH; + break; + } + + case GPIO_PORTJ_BASE: + case GPIO_PORTJ_AHB_BASE: + { + ulInt = INT_GPIOJ; + break; + } + + default: + { + return(-1); + } + } + + // + // Return GPIO interrupt number. + // + return(ulInt); +} + +//***************************************************************************** +// +//! Sets the direction and mode of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulPinIO is the pin direction and/or mode. +//! +//! This function will set the specified pin(s) on the selected GPIO port +//! as either an input or output under software control, or it will set the +//! pin to be under hardware control. +//! +//! The parameter \e ulPinIO is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_DIR_MODE_IN +//! - \b GPIO_DIR_MODE_OUT +//! - \b GPIO_DIR_MODE_HW +//! +//! where \b GPIO_DIR_MODE_IN specifies that the pin will be programmed as +//! a software controlled input, \b GPIO_DIR_MODE_OUT specifies that the pin +//! will be programmed as a software controlled output, and +//! \b GPIO_DIR_MODE_HW specifies that the pin will be placed under +//! hardware control. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note GPIOPadConfigSet() must also be used to configure the corresponding +//! pad(s) in order for them to propagate the signal to/from the GPIO. +//! +//! \return None. +// +//***************************************************************************** +void +GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulPinIO == GPIO_DIR_MODE_IN) || (ulPinIO == GPIO_DIR_MODE_OUT) || + (ulPinIO == GPIO_DIR_MODE_HW)); + + // + // Set the pin direction and mode. + // + HWREG(ulPort + GPIO_O_DIR) = ((ulPinIO & 1) ? + (HWREG(ulPort + GPIO_O_DIR) | ucPins) : + (HWREG(ulPort + GPIO_O_DIR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_AFSEL) = ((ulPinIO & 2) ? + (HWREG(ulPort + GPIO_O_AFSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AFSEL) & + ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the direction and mode of a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the direction and control mode for a specified pin on +//! the selected GPIO port. The pin can be configured as either an input or +//! output under software control, or it can be under hardware control. The +//! type of control and direction are returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIODirModeSet(). +// +//***************************************************************************** +unsigned long +GPIODirModeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulDir, ulAFSEL; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin direction and mode. + // + ulDir = HWREG(ulPort + GPIO_O_DIR); + ulAFSEL = HWREG(ulPort + GPIO_O_AFSEL); + return(((ulDir & ucPin) ? 1 : 0) | ((ulAFSEL & ucPin) ? 2 : 0)); +} + +//***************************************************************************** +// +//! Sets the interrupt type for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulIntType specifies the type of interrupt trigger mechanism. +//! +//! This function sets up the various interrupt trigger mechanisms for the +//! specified pin(s) on the selected GPIO port. +//! +//! The parameter \e ulIntType is an enumerated data type that can be one of +//! the following values: +//! +//! - \b GPIO_FALLING_EDGE +//! - \b GPIO_RISING_EDGE +//! - \b GPIO_BOTH_EDGES +//! - \b GPIO_LOW_LEVEL +//! - \b GPIO_HIGH_LEVEL +//! +//! where the different values describe the interrupt detection mechanism +//! (edge or level) and the particular triggering event (falling, rising, +//! or both edges for edge detect, low or high for level detect). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note In order to avoid any spurious interrupts, the user must +//! ensure that the GPIO inputs remain stable for the duration of +//! this function. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulIntType == GPIO_FALLING_EDGE) || + (ulIntType == GPIO_RISING_EDGE) || (ulIntType == GPIO_BOTH_EDGES) || + (ulIntType == GPIO_LOW_LEVEL) || (ulIntType == GPIO_HIGH_LEVEL)); + + // + // Set the pin interrupt type. + // + HWREG(ulPort + GPIO_O_IBE) = ((ulIntType & 1) ? + (HWREG(ulPort + GPIO_O_IBE) | ucPins) : + (HWREG(ulPort + GPIO_O_IBE) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IS) = ((ulIntType & 2) ? + (HWREG(ulPort + GPIO_O_IS) | ucPins) : + (HWREG(ulPort + GPIO_O_IS) & ~(ucPins))); + HWREG(ulPort + GPIO_O_IEV) = ((ulIntType & 4) ? + (HWREG(ulPort + GPIO_O_IEV) | ucPins) : + (HWREG(ulPort + GPIO_O_IEV) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the interrupt type for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! +//! This function gets the interrupt type for a specified pin on the selected +//! GPIO port. The pin can be configured as a falling edge, rising edge, or +//! both edge detected interrupt, or it can be configured as a low level or +//! high level detected interrupt. The type of interrupt detection mechanism +//! is returned as an enumerated data type. +//! +//! \return Returns one of the enumerated data types described for +//! GPIOIntTypeSet(). +// +//***************************************************************************** +unsigned long +GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin) +{ + unsigned long ulIBE, ulIS, ulIEV; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = 1 << ucPin; + + // + // Return the pin interrupt type. + // + ulIBE = HWREG(ulPort + GPIO_O_IBE); + ulIS = HWREG(ulPort + GPIO_O_IS); + ulIEV = HWREG(ulPort + GPIO_O_IEV); + return(((ulIBE & ucPin) ? 1 : 0) | ((ulIS & ucPin) ? 2 : 0) | + ((ulIEV & ucPin) ? 4 : 0)); +} + +//***************************************************************************** +// +//! Sets the pad configuration for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ulStrength specifies the output drive strength. +//! \param ulPinType specifies the pin type. +//! +//! This function sets the drive strength and type for the specified pin(s) +//! on the selected GPIO port. For pin(s) configured as input ports, the +//! pad is configured as requested, but the only real effect on the input +//! is the configuration of the pull-up or pull-down termination. +//! +//! The parameter \e ulStrength can be one of the following values: +//! +//! - \b GPIO_STRENGTH_2MA +//! - \b GPIO_STRENGTH_4MA +//! - \b GPIO_STRENGTH_8MA +//! - \b GPIO_STRENGTH_8MA_SC +//! +//! where \b GPIO_STRENGTH_xMA specifies either 2, 4, or 8 mA output drive +//! strength, and \b GPIO_OUT_STRENGTH_8MA_SC specifies 8 mA output drive with +//! slew control. +//! +//! The parameter \e ulPinType can be one of the following values: +//! +//! - \b GPIO_PIN_TYPE_STD +//! - \b GPIO_PIN_TYPE_STD_WPU +//! - \b GPIO_PIN_TYPE_STD_WPD +//! - \b GPIO_PIN_TYPE_OD +//! - \b GPIO_PIN_TYPE_OD_WPU +//! - \b GPIO_PIN_TYPE_OD_WPD +//! - \b GPIO_PIN_TYPE_ANALOG +//! +//! where \b GPIO_PIN_TYPE_STD* specifies a push-pull pin, \b GPIO_PIN_TYPE_OD* +//! specifies an open-drain pin, \b *_WPU specifies a weak pull-up, \b *_WPD +//! specifies a weak pull-down, and \b GPIO_PIN_TYPE_ANALOG specifies an +//! analog input (for the comparators). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, unsigned long ulPinType) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT((ulStrength == GPIO_STRENGTH_2MA) || + (ulStrength == GPIO_STRENGTH_4MA) || + (ulStrength == GPIO_STRENGTH_8MA) || + (ulStrength == GPIO_STRENGTH_8MA_SC)); + ASSERT((ulPinType == GPIO_PIN_TYPE_STD) || + (ulPinType == GPIO_PIN_TYPE_STD_WPU) || + (ulPinType == GPIO_PIN_TYPE_STD_WPD) || + (ulPinType == GPIO_PIN_TYPE_OD) || + (ulPinType == GPIO_PIN_TYPE_OD_WPU) || + (ulPinType == GPIO_PIN_TYPE_OD_WPD) || + (ulPinType == GPIO_PIN_TYPE_ANALOG)) + + // + // Set the output drive strength. + // + HWREG(ulPort + GPIO_O_DR2R) = ((ulStrength & 1) ? + (HWREG(ulPort + GPIO_O_DR2R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR2R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR4R) = ((ulStrength & 2) ? + (HWREG(ulPort + GPIO_O_DR4R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR4R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DR8R) = ((ulStrength & 4) ? + (HWREG(ulPort + GPIO_O_DR8R) | ucPins) : + (HWREG(ulPort + GPIO_O_DR8R) & ~(ucPins))); + HWREG(ulPort + GPIO_O_SLR) = ((ulStrength & 8) ? + (HWREG(ulPort + GPIO_O_SLR) | ucPins) : + (HWREG(ulPort + GPIO_O_SLR) & ~(ucPins))); + + // + // Set the pin type. + // + HWREG(ulPort + GPIO_O_ODR) = ((ulPinType & 1) ? + (HWREG(ulPort + GPIO_O_ODR) | ucPins) : + (HWREG(ulPort + GPIO_O_ODR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PUR) = ((ulPinType & 2) ? + (HWREG(ulPort + GPIO_O_PUR) | ucPins) : + (HWREG(ulPort + GPIO_O_PUR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_PDR) = ((ulPinType & 4) ? + (HWREG(ulPort + GPIO_O_PDR) | ucPins) : + (HWREG(ulPort + GPIO_O_PDR) & ~(ucPins))); + HWREG(ulPort + GPIO_O_DEN) = ((ulPinType & 8) ? + (HWREG(ulPort + GPIO_O_DEN) | ucPins) : + (HWREG(ulPort + GPIO_O_DEN) & ~(ucPins))); + + // + // Set the analog mode select register. This register only appears in + // DustDevil-class (and later) devices, but is a harmless write on + // Sandstorm- and Fury-class devices. + // + HWREG(ulPort + GPIO_O_AMSEL) = + ((ulPinType == GPIO_PIN_TYPE_ANALOG) ? + (HWREG(ulPort + GPIO_O_AMSEL) | ucPins) : + (HWREG(ulPort + GPIO_O_AMSEL) & ~(ucPins))); +} + +//***************************************************************************** +// +//! Gets the pad configuration for a pin. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPin is the pin number. +//! \param pulStrength is a pointer to storage for the output drive strength. +//! \param pulPinType is a pointer to storage for the output drive type. +//! +//! This function gets the pad configuration for a specified pin on the +//! selected GPIO port. The values returned in \e pulStrength and +//! \e pulPinType correspond to the values used in GPIOPadConfigSet(). This +//! function also works for pin(s) configured as input pin(s); however, the +//! only meaningful data returned is whether the pin is terminated with a +//! pull-up or down resistor. +//! +//! \return None +// +//***************************************************************************** +void +GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, unsigned long *pulPinType) +{ + unsigned long ulTemp1, ulTemp2, ulTemp3, ulTemp4; + + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + ASSERT(ucPin < 8); + + // + // Convert from a pin number to a bit position. + // + ucPin = (1 << ucPin); + + // + // Get the drive strength for this pin. + // + ulTemp1 = HWREG(ulPort + GPIO_O_DR2R); + ulTemp2 = HWREG(ulPort + GPIO_O_DR4R); + ulTemp3 = HWREG(ulPort + GPIO_O_DR8R); + ulTemp4 = HWREG(ulPort + GPIO_O_SLR); + *pulStrength = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); + + // + // Get the pin type. + // + ulTemp1 = HWREG(ulPort + GPIO_O_ODR); + ulTemp2 = HWREG(ulPort + GPIO_O_PUR); + ulTemp3 = HWREG(ulPort + GPIO_O_PDR); + ulTemp4 = HWREG(ulPort + GPIO_O_DEN); + *pulPinType = (((ulTemp1 & ucPin) ? 1 : 0) | ((ulTemp2 & ucPin) ? 2 : 0) | + ((ulTemp3 & ucPin) ? 4 : 0) | ((ulTemp4 & ucPin) ? 8 : 0)); +} + +//***************************************************************************** +// +//! Enables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Unmasks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Enable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) |= ucPins; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Masks the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Disable the interrupts. + // + HWREG(ulPort + GPIO_O_IM) &= ~(ucPins); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns a bit-packed byte, where each bit that is set identifies +//! an active masked or raw interrupt, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the interrupt status. + // + if(bMasked) + { + return(HWREG(ulPort + GPIO_O_MIS)); + } + else + { + return(HWREG(ulPort + GPIO_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the interrupt for the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Clears the interrupt for the specified pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Clear the interrupts. + // + HWREG(ulPort + GPIO_O_ICR) = ucPins; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param pfnIntHandler is a pointer to the GPIO port interrupt handling +//! function. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected from the selected +//! GPIO port. This function will also enable the corresponding GPIO interrupt +//! in the interrupt controller; individual pin interrupts and interrupt +//! sources must be enabled with GPIOPinIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntRegister(unsigned long ulPort, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Register the interrupt handler. + // + IntRegister(ulPort, pfnIntHandler); + + // + // Enable the GPIO interrupt. + // + IntEnable(ulPort); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for a GPIO port. +//! +//! \param ulPort is the base address of the GPIO port. +//! +//! This function will unregister the interrupt handler for the specified +//! GPIO port. This function will also disable the corresponding +//! GPIO port interrupt in the interrupt controller; individual GPIO interrupts +//! and interrupt sources must be disabled with GPIOPinIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPortIntUnregister(unsigned long ulPort) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Get the interrupt number associated with the specified GPIO. + // + ulPort = GPIOGetIntNumber(ulPort); + + // + // Disable the GPIO interrupt. + // + IntDisable(ulPort); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulPort); +} + +//***************************************************************************** +// +//! Reads the values present of the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The values at the specified pin(s) are read, as specified by \e ucPins. +//! Values are returned for both input and output pin(s), and the value +//! for pin(s) that are not specified by \e ucPins are set to 0. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return Returns a bit-packed byte providing the state of the specified +//! pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents +//! GPIO port pin 1, and so on. Any bit that is not specified by \e ucPins +//! is returned as a 0. Bits 31:8 should be ignored. +// +//***************************************************************************** +long +GPIOPinRead(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Return the pin value(s). + // + return(HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2)))); +} + +//***************************************************************************** +// +//! Writes a value to the specified pin(s). +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! \param ucVal is the value to write to the pin(s). +//! +//! Writes the corresponding bit values to the output pin(s) specified by +//! \e ucPins. Writing to a pin configured as an input pin has no effect. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, unsigned char ucVal) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Write the pins. + // + HWREG(ulPort + (GPIO_O_DATA + (ucPins << 2))) = ucVal; +} + +//***************************************************************************** +// +//! Configures pin(s) for use as analog-to-digital converter inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog-to-digital converter input pins must be properly configured +//! to function correctly on DustDevil-class devices. This function provides +//! the proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an ADC input; it only +//! configures an ADC input pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as a CAN device. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CAN pins must be properly configured for the CAN peripherals to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a CAN pin; it only +//! configures a CAN pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as an analog comparator input. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The analog comparator input pins must be properly configured for the analog +//! comparator to function correctly. This function provides the proper +//! configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an analog comparator input; +//! it only configures an analog comparator pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO inputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO inputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use as GPIO open drain outputs. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The GPIO pins must be properly configured in order to function correctly as +//! GPIO outputs; this is especially true of Fury-class devices where the +//! digital input enable is turned off by default. This function provides the +//! proper configuration for those pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeGPIOOutputOD(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be outputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_OUT); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2C peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The I2C pins must be properly configured for the I2C peripheral to function +//! correctly. This function provides the proper configuration for those +//! pin(s). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an I2C pin; it only +//! configures an I2C pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for open-drain operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the PWM peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The PWM pins must be properly configured for the PWM peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a PWM pin; it only +//! configures a PWM pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the QEI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The QEI pins must be properly configured for the QEI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, not using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a QEI pin; it only +//! configures a QEI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation with a weak pull-up. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the SSI peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The SSI pins must be properly configured for the SSI peripheral to function +//! correctly. This function provides a typical configuration for those +//! pin(s); other configurations may work as well depending upon the board +//! setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a SSI pin; it only +//! configures a SSI pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Timer peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The CCP pins must be properly configured for the timer peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a timer pin; it only +//! configures a timer pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the UART peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The UART pins must be properly configured for the UART peripheral to +//! function correctly. This function provides a typical configuration for +//! those pin(s); other configurations may work as well depending upon the +//! board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a UART pin; it only +//! configures a UART pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB digital pins must be properly configured for the USB peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital USB pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! This function should only be used with EPEN and PFAULT pins as all other +//! USB pins are analog in nature or are not used in devices without OTG +//! functionality. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the USB peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some USB analog pins must be properly configured for the USB peripheral to +//! function correctly. This function provides the proper configuration for +//! any USB pin(s). This can also be used to configure the EPEN and PFAULT pins +//! so that they are no longer used by the USB controller. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a USB pin; it only +//! configures a USB pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be inputs. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_IN); + + // + // Set the pad(s) for analog operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_ANALOG); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the I2S peripheral. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! Some I2S pins must be properly configured for the I2S peripheral to +//! function correctly. This function provides a typical configuration for +//! the digital I2S pin(s); other configurations may work as well depending +//! upon the board setup (for example, using the on-chip pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into a I2S pin; it only +//! configures a I2S pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the Ethernet peripheral as LED signals. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The Ethernet peripheral provides two signals that can be used to drive +//! an LED (e.g. for link status/activity). This function provides a typical +//! configuration for the pins. +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an Ethernet LED pin; it only +//! configures an Ethernet LED pin for proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures pin(s) for use by the external peripheral interface. +//! +//! \param ulPort is the base address of the GPIO port. +//! \param ucPins is the bit-packed representation of the pin(s). +//! +//! The external peripheral interface pins must be properly configured for the +//! external peripheral interface to function correctly. This function +//! provides a typica configuration for those pin(s); other configurations may +//! work as well depending upon the board setup (for exampe, using the on-chip +//! pull-ups). +//! +//! The pin(s) are specified using a bit-packed byte, where each bit that is +//! set identifies the pin to be accessed, and where bit 0 of the byte +//! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. +//! +//! \note This cannot be used to turn any pin into an external peripheral +//! interface pin; it only configures an external peripheral interface pin for +//! proper operation. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins) +{ + // + // Check the arguments. + // + ASSERT(GPIOBaseValid(ulPort)); + + // + // Make the pin(s) be peripheral controlled. + // + GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW); + + // + // Set the pad(s) for standard push-pull operation. + // + GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); +} + +//***************************************************************************** +// +//! Configures the alternate function of a GPIO pin. +//! +//! \param ulPinConfig is the pin configuration value, specified as only one of +//! the \b GPIO_P??_??? values. +//! +//! This function configures the pin mux that selects the peripheral function +//! associated with a particular GPIO pin. Only one peripheral function at a +//! time can be associated with a GPIO pin, and each peripheral function should +//! only be associated with a single GPIO pin at a time (despite the fact that +//! many of them can be associated with more than one GPIO pin). +//! +//! \note This function is only valid on Tempest-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +GPIOPinConfigure(unsigned long ulPinConfig) +{ + unsigned long ulBase, ulShift; + + // + // Check the argument. + // + ASSERT(((ulPinConfig >> 16) & 0xff) < 9); + ASSERT(((ulPinConfig >> 8) & 0xe3) == 0); + + // + // Extract the base address index from the input value. + // + ulBase = (ulPinConfig >> 16) & 0xff; + + // + // Get the base address of the GPIO module, selecting either the APB or the + // AHB aperture as appropriate. + // + if(HWREG(SYSCTL_GPIOHBCTL) & (1 << ulBase)) + { + ulBase = g_pulGPIOBaseAddrs[(ulBase << 1) + 1]; + } + else + { + ulBase = g_pulGPIOBaseAddrs[ulBase << 1]; + } + + // + // Extract the shift from the input value. + // + ulShift = (ulPinConfig >> 8) & 0xff; + + // + // Write the requested pin muxing value for this GPIO pin. + // + HWREG(ulBase + GPIO_O_PCTL) = ((HWREG(ulBase + GPIO_O_PCTL) & + ~(0xf << ulShift)) | + ((ulPinConfig & 0xf) << ulShift)); + +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.h new file mode 100644 index 00000000..3b60fc77 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/gpio.h @@ -0,0 +1,767 @@ +//***************************************************************************** +// +// gpio.h - Defines and Macros for GPIO API. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __GPIO_H__ +#define __GPIO_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following values define the bit field for the ucPins argument to several +// of the APIs. +// +//***************************************************************************** +#define GPIO_PIN_0 0x00000001 // GPIO pin 0 +#define GPIO_PIN_1 0x00000002 // GPIO pin 1 +#define GPIO_PIN_2 0x00000004 // GPIO pin 2 +#define GPIO_PIN_3 0x00000008 // GPIO pin 3 +#define GPIO_PIN_4 0x00000010 // GPIO pin 4 +#define GPIO_PIN_5 0x00000020 // GPIO pin 5 +#define GPIO_PIN_6 0x00000040 // GPIO pin 6 +#define GPIO_PIN_7 0x00000080 // GPIO pin 7 + +//***************************************************************************** +// +// Values that can be passed to GPIODirModeSet as the ulPinIO parameter, and +// returned from GPIODirModeGet. +// +//***************************************************************************** +#define GPIO_DIR_MODE_IN 0x00000000 // Pin is a GPIO input +#define GPIO_DIR_MODE_OUT 0x00000001 // Pin is a GPIO output +#define GPIO_DIR_MODE_HW 0x00000002 // Pin is a peripheral function + +//***************************************************************************** +// +// Values that can be passed to GPIOIntTypeSet as the ulIntType parameter, and +// returned from GPIOIntTypeGet. +// +//***************************************************************************** +#define GPIO_FALLING_EDGE 0x00000000 // Interrupt on falling edge +#define GPIO_RISING_EDGE 0x00000004 // Interrupt on rising edge +#define GPIO_BOTH_EDGES 0x00000001 // Interrupt on both edges +#define GPIO_LOW_LEVEL 0x00000002 // Interrupt on low level +#define GPIO_HIGH_LEVEL 0x00000007 // Interrupt on high level + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulStrength parameter, +// and returned by GPIOPadConfigGet in the *pulStrength parameter. +// +//***************************************************************************** +#define GPIO_STRENGTH_2MA 0x00000001 // 2mA drive strength +#define GPIO_STRENGTH_4MA 0x00000002 // 4mA drive strength +#define GPIO_STRENGTH_8MA 0x00000004 // 8mA drive strength +#define GPIO_STRENGTH_8MA_SC 0x0000000C // 8mA drive with slew rate control + +//***************************************************************************** +// +// Values that can be passed to GPIOPadConfigSet as the ulPadType parameter, +// and returned by GPIOPadConfigGet in the *pulPadType parameter. +// +//***************************************************************************** +#define GPIO_PIN_TYPE_STD 0x00000008 // Push-pull +#define GPIO_PIN_TYPE_STD_WPU 0x0000000A // Push-pull with weak pull-up +#define GPIO_PIN_TYPE_STD_WPD 0x0000000C // Push-pull with weak pull-down +#define GPIO_PIN_TYPE_OD 0x00000009 // Open-drain +#define GPIO_PIN_TYPE_OD_WPU 0x0000000B // Open-drain with weak pull-up +#define GPIO_PIN_TYPE_OD_WPD 0x0000000D // Open-drain with weak pull-down +#define GPIO_PIN_TYPE_ANALOG 0x00000000 // Analog comparator + +//***************************************************************************** +// +// Values that can be passed to GPIOPinConfigure as the ulPinConfig parameter. +// +//***************************************************************************** +// +// GPIO pin A0 +// +#define GPIO_PA0_U0RX 0x00000001 +#define GPIO_PA0_I2C1SCL 0x00000008 +#define GPIO_PA0_U1RX 0x00000009 + +// +// GPIO pin A1 +// +#define GPIO_PA1_U0TX 0x00000401 +#define GPIO_PA1_I2C1SDA 0x00000408 +#define GPIO_PA1_U1TX 0x00000409 + +// +// GPIO pin A2 +// +#define GPIO_PA2_SSI0CLK 0x00000801 +#define GPIO_PA2_PWM4 0x00000804 +#define GPIO_PA2_I2S0RXSD 0x00000809 + +// +// GPIO pin A3 +// +#define GPIO_PA3_SSI0FSS 0x00000c01 +#define GPIO_PA3_PWM5 0x00000c04 +#define GPIO_PA3_I2S0RXMCLK 0x00000c09 + +// +// GPIO pin A4 +// +#define GPIO_PA4_SSI0RX 0x00001001 +#define GPIO_PA4_PWM6 0x00001004 +#define GPIO_PA4_CAN0RX 0x00001005 +#define GPIO_PA4_I2S0TXSCK 0x00001009 + +// +// GPIO pin A5 +// +#define GPIO_PA5_SSI0TX 0x00001401 +#define GPIO_PA5_PWM7 0x00001404 +#define GPIO_PA5_CAN0TX 0x00001405 +#define GPIO_PA5_I2S0TXWS 0x00001409 + +// +// GPIO pin A6 +// +#define GPIO_PA6_I2C1SCL 0x00001801 +#define GPIO_PA6_CCP1 0x00001802 +#define GPIO_PA6_PWM0 0x00001804 +#define GPIO_PA6_PWM4 0x00001805 +#define GPIO_PA6_CAN0RX 0x00001806 +#define GPIO_PA6_USB0EPEN 0x00001808 +#define GPIO_PA6_U1CTS 0x00001809 + +// +// GPIO pin A7 +// +#define GPIO_PA7_I2C1SDA 0x00001c01 +#define GPIO_PA7_CCP4 0x00001c02 +#define GPIO_PA7_PWM1 0x00001c04 +#define GPIO_PA7_PWM5 0x00001c05 +#define GPIO_PA7_CAN0TX 0x00001c06 +#define GPIO_PA7_CCP3 0x00001c07 +#define GPIO_PA7_USB0PFLT 0x00001c08 +#define GPIO_PA7_U1DCD 0x00001c09 + +// +// GPIO pin B0 +// +#define GPIO_PB0_CCP0 0x00010001 +#define GPIO_PB0_PWM2 0x00010002 +#define GPIO_PB0_U1RX 0x00010005 + +// +// GPIO pin B1 +// +#define GPIO_PB1_CCP2 0x00010401 +#define GPIO_PB1_PWM3 0x00010402 +#define GPIO_PB1_CCP1 0x00010404 +#define GPIO_PB1_U1TX 0x00010405 + +// +// GPIO pin B2 +// +#define GPIO_PB2_I2C0SCL 0x00010801 +#define GPIO_PB2_IDX0 0x00010802 +#define GPIO_PB2_CCP3 0x00010804 +#define GPIO_PB2_CCP0 0x00010805 +#define GPIO_PB2_USB0EPEN 0x00010808 + +// +// GPIO pin B3 +// +#define GPIO_PB3_I2C0SDA 0x00010c01 +#define GPIO_PB3_FAULT0 0x00010c02 +#define GPIO_PB3_FAULT3 0x00010c04 +#define GPIO_PB3_USB0PFLT 0x00010c08 + +// +// GPIO pin B4 +// +#define GPIO_PB4_U2RX 0x00011004 +#define GPIO_PB4_CAN0RX 0x00011005 +#define GPIO_PB4_IDX0 0x00011006 +#define GPIO_PB4_U1RX 0x00011007 +#define GPIO_PB4_EPI0S23 0x00011008 + +// +// GPIO pin B5 +// +#define GPIO_PB5_C0O 0x00011401 +#define GPIO_PB5_CCP5 0x00011402 +#define GPIO_PB5_CCP6 0x00011403 +#define GPIO_PB5_CCP0 0x00011404 +#define GPIO_PB5_CAN0TX 0x00011405 +#define GPIO_PB5_CCP2 0x00011406 +#define GPIO_PB5_U1TX 0x00011407 +#define GPIO_PB5_EPI0S22 0x00011408 + +// +// GPIO pin B6 +// +#define GPIO_PB6_CCP1 0x00011801 +#define GPIO_PB6_CCP7 0x00011802 +#define GPIO_PB6_C0O 0x00011803 +#define GPIO_PB6_FAULT1 0x00011804 +#define GPIO_PB6_IDX0 0x00011805 +#define GPIO_PB6_CCP5 0x00011806 +#define GPIO_PB6_I2S0TXSCK 0x00011809 + +// +// GPIO pin B7 +// +#define GPIO_PB7_NMI 0x00011c04 + +// +// GPIO pin C0 +// +#define GPIO_PC0_TCK 0x00020003 + +// +// GPIO pin C1 +// +#define GPIO_PC1_TMS 0x00020403 + +// +// GPIO pin C2 +// +#define GPIO_PC2_TDI 0x00020803 + +// +// GPIO pin C3 +// +#define GPIO_PC3_TDO 0x00020c03 + +// +// GPIO pin C4 +// +#define GPIO_PC4_CCP5 0x00021001 +#define GPIO_PC4_PHA0 0x00021002 +#define GPIO_PC4_PWM6 0x00021004 +#define GPIO_PC4_CCP2 0x00021005 +#define GPIO_PC4_CCP4 0x00021006 +#define GPIO_PC4_EPI0S2 0x00021008 +#define GPIO_PC4_CCP1 0x00021009 + +// +// GPIO pin C5 +// +#define GPIO_PC5_CCP1 0x00021401 +#define GPIO_PC5_C1O 0x00021402 +#define GPIO_PC5_C0O 0x00021403 +#define GPIO_PC5_FAULT2 0x00021404 +#define GPIO_PC5_CCP3 0x00021405 +#define GPIO_PC5_USB0EPEN 0x00021406 +#define GPIO_PC5_EPI0S3 0x00021408 + +// +// GPIO pin C6 +// +#define GPIO_PC6_CCP3 0x00021801 +#define GPIO_PC6_PHB0 0x00021802 +#define GPIO_PC6_C2O 0x00021803 +#define GPIO_PC6_PWM7 0x00021804 +#define GPIO_PC6_U1RX 0x00021805 +#define GPIO_PC6_CCP0 0x00021806 +#define GPIO_PC6_USB0PFLT 0x00021807 +#define GPIO_PC6_EPI0S4 0x00021808 + +// +// GPIO pin C7 +// +#define GPIO_PC7_CCP4 0x00021c01 +#define GPIO_PC7_PHB0 0x00021c02 +#define GPIO_PC7_CCP0 0x00021c04 +#define GPIO_PC7_U1TX 0x00021c05 +#define GPIO_PC7_USB0PFLT 0x00021c06 +#define GPIO_PC7_C1O 0x00021c07 +#define GPIO_PC7_EPI0S5 0x00021c08 + +// +// GPIO pin D0 +// +#define GPIO_PD0_PWM0 0x00030001 +#define GPIO_PD0_CAN0RX 0x00030002 +#define GPIO_PD0_IDX0 0x00030003 +#define GPIO_PD0_U2RX 0x00030004 +#define GPIO_PD0_U1RX 0x00030005 +#define GPIO_PD0_CCP6 0x00030006 +#define GPIO_PD0_I2S0RXSCK 0x00030008 +#define GPIO_PD0_U1CTS 0x00030009 + +// +// GPIO pin D1 +// +#define GPIO_PD1_PWM1 0x00030401 +#define GPIO_PD1_CAN0TX 0x00030402 +#define GPIO_PD1_PHA0 0x00030403 +#define GPIO_PD1_U2TX 0x00030404 +#define GPIO_PD1_U1TX 0x00030405 +#define GPIO_PD1_CCP7 0x00030406 +#define GPIO_PD1_I2S0RXWS 0x00030408 +#define GPIO_PD1_U1DCD 0x00030409 +#define GPIO_PD1_CCP2 0x0003040a +#define GPIO_PD1_PHB1 0x0003040b + +// +// GPIO pin D2 +// +#define GPIO_PD2_U1RX 0x00030801 +#define GPIO_PD2_CCP6 0x00030802 +#define GPIO_PD2_PWM2 0x00030803 +#define GPIO_PD2_CCP5 0x00030804 +#define GPIO_PD2_EPI0S20 0x00030808 + +// +// GPIO pin D3 +// +#define GPIO_PD3_U1TX 0x00030c01 +#define GPIO_PD3_CCP7 0x00030c02 +#define GPIO_PD3_PWM3 0x00030c03 +#define GPIO_PD3_CCP0 0x00030c04 +#define GPIO_PD3_EPI0S21 0x00030c08 + +// +// GPIO pin D4 +// +#define GPIO_PD4_CCP0 0x00031001 +#define GPIO_PD4_CCP3 0x00031002 +#define GPIO_PD4_I2S0RXSD 0x00031008 +#define GPIO_PD4_U1RI 0x00031009 +#define GPIO_PD4_EPI0S19 0x0003100a + +// +// GPIO pin D5 +// +#define GPIO_PD5_CCP2 0x00031401 +#define GPIO_PD5_CCP4 0x00031402 +#define GPIO_PD5_I2S0RXMCLK 0x00031408 +#define GPIO_PD5_U2RX 0x00031409 +#define GPIO_PD5_EPI0S28 0x0003140a + +// +// GPIO pin D6 +// +#define GPIO_PD6_FAULT0 0x00031801 +#define GPIO_PD6_I2S0TXSCK 0x00031808 +#define GPIO_PD6_U2TX 0x00031809 +#define GPIO_PD6_EPI0S29 0x0003180a + +// +// GPIO pin D7 +// +#define GPIO_PD7_IDX0 0x00031c01 +#define GPIO_PD7_C0O 0x00031c02 +#define GPIO_PD7_CCP1 0x00031c03 +#define GPIO_PD7_I2S0TXWS 0x00031c08 +#define GPIO_PD7_U1DTR 0x00031c09 +#define GPIO_PD7_EPI0S30 0x00031c0a + +// +// GPIO pin E0 +// +#define GPIO_PE0_PWM4 0x00040001 +#define GPIO_PE0_SSI1CLK 0x00040002 +#define GPIO_PE0_CCP3 0x00040003 +#define GPIO_PE0_EPI0S8 0x00040008 +#define GPIO_PE0_USB0PFLT 0x00040009 + +// +// GPIO pin E1 +// +#define GPIO_PE1_PWM5 0x00040401 +#define GPIO_PE1_SSI1FSS 0x00040402 +#define GPIO_PE1_FAULT0 0x00040403 +#define GPIO_PE1_CCP2 0x00040404 +#define GPIO_PE1_CCP6 0x00040405 +#define GPIO_PE1_EPI0S9 0x00040408 + +// +// GPIO pin E2 +// +#define GPIO_PE2_CCP4 0x00040801 +#define GPIO_PE2_SSI1RX 0x00040802 +#define GPIO_PE2_PHB1 0x00040803 +#define GPIO_PE2_PHA0 0x00040804 +#define GPIO_PE2_CCP2 0x00040805 +#define GPIO_PE2_EPI0S24 0x00040808 + +// +// GPIO pin E3 +// +#define GPIO_PE3_CCP1 0x00040c01 +#define GPIO_PE3_SSI1TX 0x00040c02 +#define GPIO_PE3_PHA1 0x00040c03 +#define GPIO_PE3_PHB0 0x00040c04 +#define GPIO_PE3_CCP7 0x00040c05 +#define GPIO_PE3_EPI0S25 0x00040c08 + +// +// GPIO pin E4 +// +#define GPIO_PE4_CCP3 0x00041001 +#define GPIO_PE4_FAULT0 0x00041004 +#define GPIO_PE4_U2TX 0x00041005 +#define GPIO_PE4_CCP2 0x00041006 +#define GPIO_PE4_I2S0TXWS 0x00041009 + +// +// GPIO pin E5 +// +#define GPIO_PE5_CCP5 0x00041401 +#define GPIO_PE5_I2S0TXSD 0x00041409 + +// +// GPIO pin E6 +// +#define GPIO_PE6_PWM4 0x00041801 +#define GPIO_PE6_C1O 0x00041802 +#define GPIO_PE6_U1CTS 0x00041809 + +// +// GPIO pin E7 +// +#define GPIO_PE7_PWM5 0x00041c01 +#define GPIO_PE7_C2O 0x00041c02 +#define GPIO_PE7_U1DCD 0x00041c09 + +// +// GPIO pin F0 +// +#define GPIO_PF0_CAN1RX 0x00050001 +#define GPIO_PF0_PHB0 0x00050002 +#define GPIO_PF0_PWM0 0x00050003 +#define GPIO_PF0_I2S0TXSD 0x00050008 +#define GPIO_PF0_U1DSR 0x00050009 + +// +// GPIO pin F1 +// +#define GPIO_PF1_CAN1TX 0x00050401 +#define GPIO_PF1_IDX1 0x00050402 +#define GPIO_PF1_PWM1 0x00050403 +#define GPIO_PF1_I2S0TXMCLK 0x00050408 +#define GPIO_PF1_U1RTS 0x00050409 +#define GPIO_PF1_CCP3 0x0005040a + +// +// GPIO pin F2 +// +#define GPIO_PF2_LED1 0x00050801 +#define GPIO_PF2_PWM4 0x00050802 +#define GPIO_PF2_PWM2 0x00050804 +#define GPIO_PF2_SSI1CLK 0x00050809 + +// +// GPIO pin F3 +// +#define GPIO_PF3_LED0 0x00050c01 +#define GPIO_PF3_PWM5 0x00050c02 +#define GPIO_PF3_PWM3 0x00050c04 +#define GPIO_PF3_SSI1FSS 0x00050c09 + +// +// GPIO pin F4 +// +#define GPIO_PF4_CCP0 0x00051001 +#define GPIO_PF4_C0O 0x00051002 +#define GPIO_PF4_FAULT0 0x00051004 +#define GPIO_PF4_EPI0S12 0x00051008 +#define GPIO_PF4_SSI1RX 0x00051009 + +// +// GPIO pin F5 +// +#define GPIO_PF5_CCP2 0x00051401 +#define GPIO_PF5_C1O 0x00051402 +#define GPIO_PF5_EPI0S15 0x00051408 +#define GPIO_PF5_SSI1TX 0x00051409 + +// +// GPIO pin F6 +// +#define GPIO_PF6_CCP1 0x00051801 +#define GPIO_PF6_C2O 0x00051802 +#define GPIO_PF6_PHA0 0x00051804 +#define GPIO_PF6_I2S0TXMCLK 0x00051809 +#define GPIO_PF6_U1RTS 0x0005180a + +// +// GPIO pin F7 +// +#define GPIO_PF7_CCP4 0x00051c01 +#define GPIO_PF7_PHB0 0x00051c04 +#define GPIO_PF7_EPI0S12 0x00051c08 +#define GPIO_PF7_FAULT1 0x00051c09 + +// +// GPIO pin G0 +// +#define GPIO_PG0_U2RX 0x00060001 +#define GPIO_PG0_PWM0 0x00060002 +#define GPIO_PG0_I2C1SCL 0x00060003 +#define GPIO_PG0_PWM4 0x00060004 +#define GPIO_PG0_USB0EPEN 0x00060007 +#define GPIO_PG0_EPI0S13 0x00060008 + +// +// GPIO pin G1 +// +#define GPIO_PG1_U2TX 0x00060401 +#define GPIO_PG1_PWM1 0x00060402 +#define GPIO_PG1_I2C1SDA 0x00060403 +#define GPIO_PG1_PWM5 0x00060404 +#define GPIO_PG1_EPI0S14 0x00060408 + +// +// GPIO pin G2 +// +#define GPIO_PG2_PWM0 0x00060801 +#define GPIO_PG2_FAULT0 0x00060804 +#define GPIO_PG2_IDX1 0x00060808 +#define GPIO_PG2_I2S0RXSD 0x00060809 + +// +// GPIO pin G3 +// +#define GPIO_PG3_PWM1 0x00060c01 +#define GPIO_PG3_FAULT2 0x00060c04 +#define GPIO_PG3_FAULT0 0x00060c08 +#define GPIO_PG3_I2S0RXMCLK 0x00060c09 + +// +// GPIO pin G4 +// +#define GPIO_PG4_CCP3 0x00061001 +#define GPIO_PG4_FAULT1 0x00061004 +#define GPIO_PG4_EPI0S15 0x00061008 +#define GPIO_PG4_PWM6 0x00061009 +#define GPIO_PG4_U1RI 0x0006100a + +// +// GPIO pin G5 +// +#define GPIO_PG5_CCP5 0x00061401 +#define GPIO_PG5_IDX0 0x00061404 +#define GPIO_PG5_FAULT1 0x00061405 +#define GPIO_PG5_PWM7 0x00061408 +#define GPIO_PG5_I2S0RXSCK 0x00061409 +#define GPIO_PG5_U1DTR 0x0006140a + +// +// GPIO pin G6 +// +#define GPIO_PG6_PHA1 0x00061801 +#define GPIO_PG6_PWM6 0x00061804 +#define GPIO_PG6_FAULT1 0x00061808 +#define GPIO_PG6_I2S0RXWS 0x00061809 +#define GPIO_PG6_U1RI 0x0006180a + +// +// GPIO pin G7 +// +#define GPIO_PG7_PHB1 0x00061c01 +#define GPIO_PG7_PWM7 0x00061c04 +#define GPIO_PG7_CCP5 0x00061c08 +#define GPIO_PG7_EPI0S31 0x00061c09 + +// +// GPIO pin H0 +// +#define GPIO_PH0_CCP6 0x00070001 +#define GPIO_PH0_PWM2 0x00070002 +#define GPIO_PH0_EPI0S6 0x00070008 +#define GPIO_PH0_PWM4 0x00070009 + +// +// GPIO pin H1 +// +#define GPIO_PH1_CCP7 0x00070401 +#define GPIO_PH1_PWM3 0x00070402 +#define GPIO_PH1_EPI0S7 0x00070408 +#define GPIO_PH1_PWM5 0x00070409 + +// +// GPIO pin H2 +// +#define GPIO_PH2_IDX1 0x00070801 +#define GPIO_PH2_C1O 0x00070802 +#define GPIO_PH2_FAULT3 0x00070804 +#define GPIO_PH2_EPI0S1 0x00070808 + +// +// GPIO pin H3 +// +#define GPIO_PH3_PHB0 0x00070c01 +#define GPIO_PH3_FAULT0 0x00070c02 +#define GPIO_PH3_USB0EPEN 0x00070c04 +#define GPIO_PH3_EPI0S0 0x00070c08 + +// +// GPIO pin H4 +// +#define GPIO_PH4_USB0PFLT 0x00071004 +#define GPIO_PH4_EPI0S10 0x00071008 +#define GPIO_PH4_SSI1CLK 0x0007100b + +// +// GPIO pin H5 +// +#define GPIO_PH5_EPI0S11 0x00071408 +#define GPIO_PH5_FAULT2 0x0007140a +#define GPIO_PH5_SSI1FSS 0x0007140b + +// +// GPIO pin H6 +// +#define GPIO_PH6_EPI0S26 0x00071808 +#define GPIO_PH6_PWM4 0x0007180a +#define GPIO_PH6_SSI1RX 0x0007180b + +// +// GPIO pin H7 +// +#define GPIO_PH7_EPI0S27 0x00071c08 +#define GPIO_PH7_PWM5 0x00071c0a +#define GPIO_PH7_SSI1TX 0x00071c0b + +// +// GPIO pin J0 +// +#define GPIO_PJ0_EPI0S16 0x00080008 +#define GPIO_PJ0_PWM0 0x0008000a +#define GPIO_PJ0_I2C1SCL 0x0008000b + +// +// GPIO pin J1 +// +#define GPIO_PJ1_EPI0S17 0x00080408 +#define GPIO_PJ1_USB0PFLT 0x00080409 +#define GPIO_PJ1_PWM1 0x0008040a +#define GPIO_PJ1_I2C1SDA 0x0008040b + +// +// GPIO pin J2 +// +#define GPIO_PJ2_EPI0S18 0x00080808 +#define GPIO_PJ2_CCP0 0x00080809 +#define GPIO_PJ2_FAULT0 0x0008080a + +// +// GPIO pin J3 +// +#define GPIO_PJ3_EPI0S19 0x00080c08 +#define GPIO_PJ3_U1CTS 0x00080c09 +#define GPIO_PJ3_CCP6 0x00080c0a + +// +// GPIO pin J4 +// +#define GPIO_PJ4_EPI0S28 0x00081008 +#define GPIO_PJ4_U1DCD 0x00081009 +#define GPIO_PJ4_CCP4 0x0008100a + +// +// GPIO pin J5 +// +#define GPIO_PJ5_EPI0S29 0x00081408 +#define GPIO_PJ5_U1DSR 0x00081409 +#define GPIO_PJ5_CCP2 0x0008140a + +// +// GPIO pin J6 +// +#define GPIO_PJ6_EPI0S30 0x00081808 +#define GPIO_PJ6_U1RTS 0x00081809 +#define GPIO_PJ6_CCP1 0x0008180a + +// +// GPIO pin J7 +// +#define GPIO_PJ7_U1DTR 0x00081c09 +#define GPIO_PJ7_CCP0 0x00081c0a + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void GPIODirModeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulPinIO); +extern unsigned long GPIODirModeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulIntType); +extern unsigned long GPIOIntTypeGet(unsigned long ulPort, unsigned char ucPin); +extern void GPIOPadConfigSet(unsigned long ulPort, unsigned char ucPins, + unsigned long ulStrength, + unsigned long ulPadType); +extern void GPIOPadConfigGet(unsigned long ulPort, unsigned char ucPin, + unsigned long *pulStrength, + unsigned long *pulPadType); +extern void GPIOPinIntEnable(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinIntDisable(unsigned long ulPort, unsigned char ucPins); +extern long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked); +extern void GPIOPinIntClear(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPortIntRegister(unsigned long ulPort, + void (*pfnIntHandler)(void)); +extern void GPIOPortIntUnregister(unsigned long ulPort); +extern long GPIOPinRead(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinWrite(unsigned long ulPort, unsigned char ucPins, + unsigned char ucVal); +extern void GPIOPinConfigure(unsigned long ulPinConfig); +extern void GPIOPinTypeADC(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeComparator(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEPI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutput(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeGPIOOutputOD(unsigned long ulPort, + unsigned char ucPins); +extern void GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeI2S(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypePWM(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeQEI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeTimer(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUART(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBAnalog(unsigned long ulPort, unsigned char ucPins); +extern void GPIOPinTypeUSBDigital(unsigned long ulPort, unsigned char ucPins); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.c new file mode 100644 index 00000000..2e4f858e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.c @@ -0,0 +1,962 @@ +//***************************************************************************** +// +// hibernate.c - Driver for the Hibernation module +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup hibernate_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_hibernate.h" +#include "inc/hw_ints.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/hibernate.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// The delay in microseconds for writing to the Hibernation module registers. +// +//***************************************************************************** +#define DELAY_USECS 95 + +//***************************************************************************** +// +// The number of processor cycles to execute one pass of the delay loop. +// +//***************************************************************************** +#define LOOP_CYCLES 3 + +//***************************************************************************** +// +// The calculated number of delay loops to achieve the write delay. +// +//***************************************************************************** +static unsigned long g_ulWriteDelay; + +//***************************************************************************** +// +//! \internal +//! +//! Polls until the write complete (WRC) bit in the hibernate control register +//! is set. +//! +//! \param None. +//! +//! On non-Fury-class devices, the hibernate module provides an indication when +//! any write is completed. This is used to pace writes to the module. This +//! function merely polls this bit and returns as soon as it is set. At this +//! point, it is safe to perform another write to the module. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateWriteComplete(void) +{ + // + // Spin until the write complete bit is set. + // + while(!(HWREG(HIB_CTL) & HIB_CTL_WRC)) + { + } +} + +//***************************************************************************** +// +//! Enables the Hibernation module for operation. +//! +//! \param ulHibClk is the rate of the clock supplied to the Hibernation +//! module. +//! +//! Enables the Hibernation module for operation. This function should be +//! called before any of the Hibernation module features are used. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard-coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original HibernateEnable() API and performs the +//! same actions. A macro is provided in hibernate.h to map the +//! original API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateEnableExpClk(unsigned long ulHibClk) +{ + // + // Turn on the clock enable bit. + // + HWREG(HIB_CTL) |= HIB_CTL_CLK32EN; + + // + // For Fury-class devices, compute the number of delay loops that must be + // used to achieve the desired delay for writes to the hibernation + // registers. This value will be used in calls to SysCtlDelay(). + // + if(CLASS_IS_FURY) + { + g_ulWriteDelay = (((ulHibClk / 1000) * DELAY_USECS) / + (1000L * LOOP_CYCLES)); + g_ulWriteDelay++; + } +} + +//***************************************************************************** +// +//! Disables the Hibernation module for operation. +//! +//! Disables the Hibernation module for operation. After this function is +//! called, none of the Hibernation module features are available. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDisable(void) +{ + // + // Turn off the clock enable bit. + // + HWREG(HIB_CTL) &= ~HIB_CTL_CLK32EN; +} + +//***************************************************************************** +// +//! Selects the clock input for the Hibernation module. +//! +//! \param ulClockInput specifies the clock input. +//! +//! Configures the clock input for the Hibernation module. The configuration +//! option chosen depends entirely on hardware design. The clock input for the +//! module will either be a 32.768 kHz oscillator or a 4.194304 MHz crystal. +//! The \e ulClockFlags parameter must be one of the following: +//! +//! - \b HIBERNATE_CLOCK_SEL_RAW - use the raw signal from a 32.768 kHz +//! oscillator. +//! - \b HIBERNATE_CLOCK_SEL_DIV128 - use the crystal input, divided by 128. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateClockSelect(unsigned long ulClockInput) +{ + // + // Check the arguments. + // + ASSERT((ulClockInput == HIBERNATE_CLOCK_SEL_RAW) || + (ulClockInput == HIBERNATE_CLOCK_SEL_DIV128)); + + // + // Set the clock selection bit according to the parameter. + // + HWREG(HIB_CTL) = ulClockInput | (HWREG(HIB_CTL) & ~HIB_CTL_CLKSEL); +} + +//***************************************************************************** +// +//! Enables the RTC feature of the Hibernation module. +//! +//! Enables the RTC in the Hibernation module. The RTC can be used to wake the +//! processor from hibernation at a certain time, or to generate interrupts at +//! certain times. This function must be called before using any of the RTC +//! features of the Hibernation module. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCEnable(void) +{ + // + // Turn on the RTC enable bit. + // + HWREG(HIB_CTL) |= HIB_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Disables the RTC feature of the Hibernation module. +//! +//! Disables the RTC in the Hibernation module. After calling this function +//! the RTC features of the Hibernation module will not be available. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCDisable(void) +{ + // + // Turn off the RTC enable bit. + // + HWREG(HIB_CTL) &= ~HIB_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Configures the wake conditions for the Hibernation module. +//! +//! \param ulWakeFlags specifies which conditions should be used for waking. +//! +//! Enables the conditions under which the Hibernation module will wake. The +//! \e ulWakeFlags parameter is the logical OR of any combination of the +//! following: +//! +//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted. +//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateWakeSet(unsigned long ulWakeFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulWakeFlags & ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC))); + + // + // Set the specified wake flags in the control register. + // + HWREG(HIB_CTL) = (ulWakeFlags | + (HWREG(HIB_CTL) & + ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC))); +} + +//***************************************************************************** +// +//! Gets the currently configured wake conditions for the Hibernation module. +//! +//! Returns the flags representing the wake configuration for the Hibernation +//! module. The return value will be a combination of the following flags: +//! +//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted. +//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs. +//! +//! \return Returns flags indicating the configured wake conditions. +// +//***************************************************************************** +unsigned long +HibernateWakeGet(void) +{ + // + // Read the wake bits from the control register and return + // those bits to the caller. + // + return(HWREG(HIB_CTL) & (HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC)); +} + +//***************************************************************************** +// +//! Configures the low battery detection. +//! +//! \param ulLowBatFlags specifies behavior of low battery detection. +//! +//! Enables the low battery detection and whether hibernation is allowed if a +//! low battery is detected. If low battery detection is enabled, then a low +//! battery condition will be indicated in the raw interrupt status register, +//! and can also trigger an interrupt. Optionally, hibernation can be aborted +//! if a low battery is detected. +//! +//! The \e ulLowBatFlags parameter is one of the following values: +//! +//! - \b HIBERNATE_LOW_BAT_DETECT - detect a low battery condition. +//! - \b HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort +//! hibernation if low battery is detected. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateLowBatSet(unsigned long ulLowBatFlags) +{ + // + // Check the arguments. + // + ASSERT((ulLowBatFlags == HIBERNATE_LOW_BAT_DETECT) || + (ulLowBatFlags == HIBERNATE_LOW_BAT_ABORT)); + + // + // Set the low battery detect and abort bits in the control register, + // according to the parameter. + // + HWREG(HIB_CTL) = (ulLowBatFlags | + (HWREG(HIB_CTL) & ~HIBERNATE_LOW_BAT_ABORT)); +} + +//***************************************************************************** +// +//! Gets the currently configured low battery detection behavior. +//! +//! Returns a value representing the currently configured low battery detection +//! behavior. The return value will be one of the following: +//! +//! - \b HIBERNATE_LOW_BAT_DETECT - detect a low battery condition. +//! - \b HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort +//! hibernation if low battery is detected. +//! +//! \return Returns a value indicating the configured low battery detection. +// +//***************************************************************************** +unsigned long +HibernateLowBatGet(void) +{ + // + // Read the low bat bits from the control register and return those bits to + // the caller. + // + return(HWREG(HIB_CTL) & HIBERNATE_LOW_BAT_ABORT); +} + +//***************************************************************************** +// +//! Sets the value of the real time clock (RTC) counter. +//! +//! \param ulRTCValue is the new value for the RTC. +//! +//! Sets the value of the RTC. The RTC will count seconds if the hardware is +//! configured correctly. The RTC must be enabled by calling +//! HibernateRTCEnable() before calling this function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCSet(unsigned long ulRTCValue) +{ + // + // Write the new RTC value to the RTC load register. + // + HWREG(HIB_RTCLD) = ulRTCValue; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the real time clock (RTC) counter. +//! +//! Gets the value of the RTC and returns it to the caller. +//! +//! \return Returns the value of the RTC. +// +//***************************************************************************** +unsigned long +HibernateRTCGet(void) +{ + // + // Return the value of the RTC counter register to the caller. + // + return(HWREG(HIB_RTCC)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC match 0 register. +//! +//! \param ulMatch is the value for the match register. +//! +//! Sets the match 0 register for the RTC. The Hibernation module can be +//! configured to wake from hibernation, and/or generate an interrupt when the +//! value of the RTC counter is the same as the match register. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCMatch0Set(unsigned long ulMatch) +{ + // + // Write the new match value to the match register. + // + HWREG(HIB_RTCM0) = ulMatch; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC match 0 register. +//! +//! Gets the value of the match 0 register for the RTC. +//! +//! \return Returns the value of the match register. +// +//***************************************************************************** +unsigned long +HibernateRTCMatch0Get(void) +{ + // + // Return the value of the match register to the caller. + // + return(HWREG(HIB_RTCM0)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC match 1 register. +//! +//! \param ulMatch is the value for the match register. +//! +//! Sets the match 1 register for the RTC. The Hibernation module can be +//! configured to wake from hibernation, and/or generate an interrupt when the +//! value of the RTC counter is the same as the match register. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCMatch1Set(unsigned long ulMatch) +{ + // + // Write the new match value to the match register. + // + HWREG(HIB_RTCM1) = ulMatch; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC match 1 register. +//! +//! Gets the value of the match 1 register for the RTC. +//! +//! \return Returns the value of the match register. +// +//***************************************************************************** +unsigned long +HibernateRTCMatch1Get(void) +{ + // + // Return the value of the match register to the caller. + // + return(HWREG(HIB_RTCM1)); +} + +//***************************************************************************** +// +//! Sets the value of the RTC predivider trim register. +//! +//! \param ulTrim is the new value for the pre-divider trim register. +//! +//! Sets the value of the pre-divider trim register. The input time source is +//! divided by the pre-divider to achieve a one-second clock rate. Once every +//! 64 seconds, the value of the pre-divider trim register is applied to the +//! predivider to allow fine-tuning of the RTC rate, in order to make +//! corrections to the rate. The software application can make adjustments to +//! the predivider trim register to account for variations in the accuracy of +//! the input time source. The nominal value is 0x7FFF, and it can be adjusted +//! up or down in order to fine-tune the RTC rate. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRTCTrimSet(unsigned long ulTrim) +{ + // + // Check the arguments. + // + ASSERT(ulTrim < 0x10000); + + // + // Write the new trim value to the trim register. + // + HWREG(HIB_RTCT) = ulTrim; + + // + // Add a delay here to enforce the required delay between write accesses to + // certain Hibernation module registers. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } +} + +//***************************************************************************** +// +//! Gets the value of the RTC predivider trim register. +//! +//! Gets the value of the pre-divider trim register. This function can be used +//! to get the current value of the trim register prior to making an adjustment +//! by using the HibernateRTCTrimSet() function. +//! +//! \return None. +// +//***************************************************************************** +unsigned long +HibernateRTCTrimGet(void) +{ + // + // Return the value of the trim register to the caller. + // + return(HWREG(HIB_RTCT)); +} + +//***************************************************************************** +// +//! Stores data in the non-volatile memory of the Hibernation module. +//! +//! \param pulData points to the data that the caller wants to store in the +//! memory of the Hibernation module. +//! \param ulCount is the count of 32-bit words to store. +//! +//! Stores a set of data in the Hibernation module non-volatile memory. This +//! memory will be preserved when the power to the processor is turned off, and +//! can be used to store application state information which will be available +//! when the processor wakes. Up to 64 32-bit words can be stored in the +//! non-volatile memory. The data can be restored by calling the +//! HibernateDataGet() function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDataSet(unsigned long *pulData, unsigned long ulCount) +{ + unsigned int uIdx; + + // + // Check the arguments. + // + ASSERT(ulCount <= 64); + ASSERT(pulData != 0); + + // + // Loop through all the words to be stored, storing one at a time. + // + for(uIdx = 0; uIdx < ulCount; uIdx++) + { + // + // Write a word to the non-volatile storage area. + // + HWREG(HIB_DATA + (uIdx * 4)) = pulData[uIdx]; + + // + // Add a delay between writes to the data area. + // + if(CLASS_IS_FURY) + { + // + // Delay a fixed time on Fury-class devices + // + SysCtlDelay(g_ulWriteDelay); + } + else + { + // + // Wait for write complete to be signaled on later devices. + // + HibernateWriteComplete(); + } + } +} + +//***************************************************************************** +// +//! Reads a set of data from the non-volatile memory of the Hibernation module. +//! +//! \param pulData points to a location where the data that is read from the +//! Hibernation module will be stored. +//! \param ulCount is the count of 32-bit words to read. +//! +//! Retrieves a set of data from the Hibernation module non-volatile memory +//! that was previously stored with the HibernateDataSet() function. The +//! caller must ensure that \e pulData points to a large enough memory block to +//! hold all the data that is read from the non-volatile memory. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateDataGet(unsigned long *pulData, unsigned long ulCount) +{ + unsigned int uIdx; + + // + // Check the arguments. + // + ASSERT(ulCount <= 64); + ASSERT(pulData != 0); + + // + // Loop through all the words to be restored, reading one at a time. + // + for(uIdx = 0; uIdx < ulCount; uIdx++) + { + // + // Read a word from the non-volatile storage area. No delay is + // required between reads. + // + pulData[uIdx] = HWREG(HIB_DATA + (uIdx * 4)); + } +} + +//***************************************************************************** +// +//! Requests hibernation mode. +//! +//! This function requests the Hibernation module to disable the external +//! regulator, thus removing power from the processor and all peripherals. The +//! Hibernation module will remain powered from the battery or auxiliary power +//! supply. +//! +//! The Hibernation module will re-enable the external regulator when one of +//! the configured wake conditions occurs (such as RTC match or external +//! \b WAKE pin). When the power is restored the processor will go through a +//! normal power-on reset. The processor can retrieve saved state information +//! with the HibernateDataGet() function. Prior to calling the function to +//! request hibernation mode, the conditions for waking must have already been +//! set by using the HibernateWakeSet() function. +//! +//! Note that this function may return because some time may elapse before the +//! power is actually removed, or it may not be removed at all. For this +//! reason, the processor will continue to execute instructions for some time +//! and the caller should be prepared for this function to return. There are +//! various reasons why the power may not be removed. For example, if the +//! HibernateLowBatSet() function was used to configure an abort if low +//! battery is detected, then the power will not be removed if the battery +//! voltage is too low. There may be other reasons, related to the external +//! circuit design, that a request for hibernation may not actually occur. +//! +//! For all these reasons, the caller must be prepared for this function to +//! return. The simplest way to handle it is to just enter an infinite loop +//! and wait for the power to be removed. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateRequest(void) +{ + // + // Set the bit in the control register to cut main power to the processor. + // + HWREG(HIB_CTL) |= HIB_CTL_HIBREQ; +} + +//***************************************************************************** +// +//! Enables interrupts for the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be enabled. +//! +//! Enables the specified interrupt sources from the Hibernation module. +//! +//! The \e ulIntFlags parameter must be the logical OR of any combination of +//! the following: +//! +//! - \b HIBERNATE_INT_PIN_WAKE - wake from pin interrupt +//! - \b HIBERNATE_INT_LOW_BAT - low battery interrupt +//! - \b HIBERNATE_INT_RTC_MATCH_0 - RTC match 0 interrupt +//! - \b HIBERNATE_INT_RTC_MATCH_1 - RTC match 1 interrupt +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntEnable(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Set the specified interrupt mask bits. + // + HWREG(HIB_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables interrupts for the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be disabled. +//! +//! Disables the specified interrupt sources from the Hibernation module. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to the HibernateIntEnable() function. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntDisable(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Clear the specified interrupt mask bits. + // + HWREG(HIB_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the Hibernation module interrupt. +//! +//! \param pfnHandler points to the function to be called when a hibernation +//! interrupt occurs. +//! +//! Registers the interrupt handler in the system interrupt controller. The +//! interrupt is enabled at the global level, but individual interrupt sources +//! must still be enabled with a call to HibernateIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler. + // + IntRegister(INT_HIBERNATE, pfnHandler); + + // + // Enable the hibernate module interrupt. + // + IntEnable(INT_HIBERNATE); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the Hibernation module interrupt. +//! +//! Unregisters the interrupt handler in the system interrupt controller. The +//! interrupt is disabled at the global level, and the interrupt handler will +//! no longer be called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntUnregister(void) +{ + // + // Disable the hibernate interrupt. + // + IntDisable(INT_HIBERNATE); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_HIBERNATE); +} + +//***************************************************************************** +// +//! Gets the current interrupt status of the Hibernation module. +//! +//! \param bMasked is false to retrieve the raw interrupt status, and true to +//! retrieve the masked interrupt status. +//! +//! Returns the interrupt status of the Hibernation module. The caller can use +//! this to determine the cause of a hibernation interrupt. Either the masked +//! or raw interrupt status can be returned. +//! +//! \return Returns the interrupt status as a bit field with the values as +//! described in the HibernateIntEnable() function. +// +//***************************************************************************** +unsigned long +HibernateIntStatus(tBoolean bMasked) +{ + // + // Read and return the Hibernation module raw or masked interrupt status. + // + if(bMasked == true) + { + return(HWREG(HIB_MIS) & 0xf); + } + else + { + return(HWREG(HIB_RIS) & 0xf); + } +} + +//***************************************************************************** +// +//! Clears pending interrupts from the Hibernation module. +//! +//! \param ulIntFlags is the bit mask of the interrupts to be cleared. +//! +//! Clears the specified interrupt sources. This must be done from within the +//! interrupt handler or else the handler will be called again upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to the HibernateIntEnable() function. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +HibernateIntClear(unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT | + HIBERNATE_INT_RTC_MATCH_0 | + HIBERNATE_INT_RTC_MATCH_1))); + + // + // Write the specified interrupt bits into the interrupt clear register. + // + HWREG(HIB_IC) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Checks to see if the Hibernation module is already powered up. +//! +//! This function queries the control register to determine if the module is +//! already active. This function can be called at a power-on reset to help +//! determine if the reset is due to a wake from hibernation or a cold start. +//! If the Hibernation module is already active, then it does not need to be +//! re-enabled and its status can be queried immediately. +//! +//! The software application should also use the HibernateIntStatus() function +//! to read the raw interrupt status to determine the cause of the wake. The +//! HibernateDataGet() function can be used to restore state. These +//! combinations of functions can be used by the software to determine if the +//! processor is waking from hibernation and the appropriate action to take as +//! a result. +//! +//! \return Returns \b true if the module is already active, and \b false if +//! not. +// +//***************************************************************************** +unsigned int +HibernateIsActive(void) +{ + // + // Read the control register, and return true if the module is enabled. + // + return(HWREG(HIB_CTL) & HIB_CTL_CLK32EN ? 1 : 0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.h new file mode 100644 index 00000000..b5df6f2b --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/hibernate.h @@ -0,0 +1,127 @@ +//***************************************************************************** +// +// hibernate.h - API definition for the Hibernation module. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __HIBERNATE_H__ +#define __HIBERNATE_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macros needed for selecting the clock source for HibernateClockSelect() +// +//***************************************************************************** +#define HIBERNATE_CLOCK_SEL_RAW 0x04 +#define HIBERNATE_CLOCK_SEL_DIV128 0x00 + +//***************************************************************************** +// +// Macros need to configure wake events for HibernateWakeSet() +// +//***************************************************************************** +#define HIBERNATE_WAKE_PIN 0x10 +#define HIBERNATE_WAKE_RTC 0x08 + +//***************************************************************************** +// +// Macros needed to configure low battery detect for HibernateLowBatSet() +// +//***************************************************************************** +#define HIBERNATE_LOW_BAT_DETECT 0x20 +#define HIBERNATE_LOW_BAT_ABORT 0xA0 + +//***************************************************************************** +// +// Macros defining interrupt source bits for the interrupt functions. +// +//***************************************************************************** +#define HIBERNATE_INT_PIN_WAKE 0x08 +#define HIBERNATE_INT_LOW_BAT 0x04 +#define HIBERNATE_INT_RTC_MATCH_0 0x01 +#define HIBERNATE_INT_RTC_MATCH_1 0x02 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void HibernateEnableExpClk(unsigned long ulHibClk); +extern void HibernateDisable(void); +extern void HibernateClockSelect(unsigned long ulClockInput); +extern void HibernateRTCEnable(void); +extern void HibernateRTCDisable(void); +extern void HibernateWakeSet(unsigned long ulWakeFlags); +extern unsigned long HibernateWakeGet(void); +extern void HibernateLowBatSet(unsigned long ulLowBatFlags); +extern unsigned long HibernateLowBatGet(void); +extern void HibernateRTCSet(unsigned long ulRTCValue); +extern unsigned long HibernateRTCGet(void); +extern void HibernateRTCMatch0Set(unsigned long ulMatch); +extern unsigned long HibernateRTCMatch0Get(void); +extern void HibernateRTCMatch1Set(unsigned long ulMatch); +extern unsigned long HibernateRTCMatch1Get(void); +extern void HibernateRTCTrimSet(unsigned long ulTrim); +extern unsigned long HibernateRTCTrimGet(void); +extern void HibernateDataSet(unsigned long *pulData, unsigned long ulCount); +extern void HibernateDataGet(unsigned long *pulData, unsigned long ulCount); +extern void HibernateRequest(void); +extern void HibernateIntEnable(unsigned long ulIntFlags); +extern void HibernateIntDisable(unsigned long ulIntFlags); +extern void HibernateIntRegister(void (*pfnHandler)(void)); +extern void HibernateIntUnregister(void); +extern unsigned long HibernateIntStatus(tBoolean bMasked); +extern void HibernateIntClear(unsigned long ulIntFlags); +extern unsigned int HibernateIsActive(void); + +//***************************************************************************** +// +// Several Hibernate module APIs have been renamed, with the original function +// name being deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define HibernateEnable(a) \ + HibernateEnableExpClk(a, SysCtlClockGet()) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __HIBERNATE_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.c new file mode 100644 index 00000000..ed9ef655 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.c @@ -0,0 +1,1106 @@ +//***************************************************************************** +// +// i2c.c - Driver for Inter-IC (I2C) bus block. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup i2c_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_i2c.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/i2c.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Initializes the I2C Master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ulI2CClk is the rate of the clock supplied to the I2C module. +//! \param bFast set up for fast data transfers +//! +//! This function initializes operation of the I2C Master block. Upon +//! successful initialization of the I2C block, this function will have set the +//! bus speed for the master, and will have enabled the I2C Master block. +//! +//! If the parameter \e bFast is \b true, then the master block will be set up +//! to transfer data at 400 kbps; otherwise, it will be set up to transfer data +//! at 100 kbps. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original I2CMasterInit() API and performs the +//! same actions. A macro is provided in i2c.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterInitExpClk(unsigned long ulBase, unsigned long ulI2CClk, + tBoolean bFast) +{ + unsigned long ulSCLFreq; + unsigned long ulTPR; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Must enable the device before doing anything else. + // + I2CMasterEnable(ulBase); + + // + // Get the desired SCL speed. + // + if(bFast == true) + { + ulSCLFreq = 400000; + } + else + { + ulSCLFreq = 100000; + } + + // + // Compute the clock divider that achieves the fastest speed less than or + // equal to the desired speed. The numerator is biased to favor a larger + // clock divider so that the resulting clock is always less than or equal + // to the desired clock, never greater. + // + ulTPR = ((ulI2CClk + (2 * 10 * ulSCLFreq) - 1) / (2 * 10 * ulSCLFreq)) - 1; + HWREG(ulBase + I2C_O_MTPR) = ulTPR; +} + +//***************************************************************************** +// +//! Initializes the I2C Slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ucSlaveAddr 7-bit slave address +//! +//! This function initializes operation of the I2C Slave block. Upon +//! successful initialization of the I2C blocks, this function will have set +//! the slave address and have enabled the I2C Slave block. +//! +//! The parameter \e ucSlaveAddr is the value that will be compared against the +//! slave address sent by an I2C master. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveInit(unsigned long ulBase, unsigned char ucSlaveAddr) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + ASSERT(!(ucSlaveAddr & 0x80)); + + // + // Must enable the device before doing anything else. + // + I2CSlaveEnable(ulBase); + + // + // Set up the slave address. + // + HWREG(ulBase + I2C_O_SOAR) = ucSlaveAddr; +} + +//***************************************************************************** +// +//! Enables the I2C Master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This will enable operation of the I2C Master block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Enable the master block. + // + HWREG(ulBase + I2C_O_MCR) |= I2C_MCR_MFE; +} + +//***************************************************************************** +// +//! Enables the I2C Slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This will enable operation of the I2C Slave block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the clock to the slave block. + // + HWREG(ulBase - I2C0_SLAVE_BASE + I2C0_MASTER_BASE + I2C_O_MCR) |= + I2C_MCR_SFE; + + // + // Enable the slave. + // + HWREG(ulBase + I2C_O_SCSR) = I2C_SCSR_DA; +} + +//***************************************************************************** +// +//! Disables the I2C master block. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This will disable operation of the I2C master block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Disable the master block. + // + HWREG(ulBase + I2C_O_MCR) &= ~(I2C_MCR_MFE); +} + +//***************************************************************************** +// +//! Disables the I2C slave block. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This will disable operation of the I2C slave block. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave. + // + HWREG(ulBase + I2C_O_SCSR) = 0; + + // + // Disable the clock to the slave block. + // + HWREG(ulBase - I2C0_SLAVE_BASE + I2C0_MASTER_BASE + I2C_O_MCR) &= + ~(I2C_MCR_SFE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the I2C module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param pfnHandler is a pointer to the function to be called when the +//! I2C interrupt occurs. +//! +//! This sets the handler to be called when an I2C interrupt occurs. This will +//! enable the global interrupt in the interrupt controller; specific I2C +//! interrupts must be enabled via I2CMasterIntEnable() and +//! I2CSlaveIntEnable(). If necessary, it is the interrupt handler's +//! responsibility to clear the interrupt source via I2CMasterIntClear() and +//! I2CSlaveIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2CIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Determine the interrupt number based on the I2C port. + // + ulInt = (ulBase == I2C0_MASTER_BASE) ? INT_I2C0 : INT_I2C1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the I2C interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the I2C module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function will clear the handler to be called when an I2C interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2CIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Determine the interrupt number based on the I2C port. + // + ulInt = (ulBase == I2C0_MASTER_BASE) ? INT_I2C0 : INT_I2C1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables the I2C Master interrupt. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! Enables the I2C Master interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Enable the master interrupt. + // + HWREG(ulBase + I2C_O_MIMR) = 1; +} + +//***************************************************************************** +// +//! Enables the I2C Slave interrupt. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! Enables the I2C Slave interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) |= I2C_SLAVE_INT_DATA; +} + +//***************************************************************************** +// +//! Enables individual I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated I2C Slave interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b I2C_SLAVE_INT_STOP - Stop condition detected interrupt +//! - \b I2C_SLAVE_INT_START - Start condition detected interrupt +//! - \b I2C_SLAVE_INT_DATA - Data interrupt +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntEnableEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Enable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables the I2C Master interrupt. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! Disables the I2C Master interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Disable the master interrupt. + // + HWREG(ulBase + I2C_O_MIMR) = 0; +} + +//***************************************************************************** +// +//! Disables the I2C Slave interrupt. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! Disables the I2C Slave interrupt source. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) &= ~I2C_SLAVE_INT_DATA; +} + +//***************************************************************************** +// +//! Disables individual I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated I2C Slave interrupt sources. Only the sources that +//! are enabled can be reflected to the processor interrupt; disabled sources +//! have no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to I2CSlaveIntEnableEx(). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntDisableEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Disable the slave interrupt. + // + HWREG(ulBase + I2C_O_SIMR) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the current I2C Master interrupt status. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Master module. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, returned as \b true if active +//! or \b false if not active. +// +//***************************************************************************** +tBoolean +I2CMasterIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return((HWREG(ulBase + I2C_O_MMIS)) ? true : false); + } + else + { + return((HWREG(ulBase + I2C_O_MRIS)) ? true : false); + } +} + +//***************************************************************************** +// +//! Gets the current I2C Slave interrupt status. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Slave module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, returned as \b true if active +//! or \b false if not active. +// +//***************************************************************************** +tBoolean +I2CSlaveIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return((HWREG(ulBase + I2C_O_SMIS)) ? true : false); + } + else + { + return((HWREG(ulBase + I2C_O_SRIS)) ? true : false); + } +} + +//***************************************************************************** +// +//! Gets the current I2C Slave interrupt status. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param bMasked is false if the raw interrupt status is requested and +//! true if the masked interrupt status is requested. +//! +//! This returns the interrupt status for the I2C Slave module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in I2CSlaveIntEnableEx(). +// +//***************************************************************************** +unsigned long +I2CSlaveIntStatusEx(unsigned long ulBase, tBoolean bMasked) +{ + unsigned long ulValue; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + // + // Workaround for I2C slave masked interrupt status register errata + // (7.1) for Dustdevil Rev A0 devices. + // + if(CLASS_IS_DUSTDEVIL && REVISION_IS_A0) + { + ulValue = HWREG(ulBase + I2C_O_SRIS); + return(ulValue & HWREG(ulBase + I2C_O_SIMR)); + } + else + { + return(HWREG(ulBase + I2C_O_SMIS)); + } + } + else + { + return(HWREG(ulBase + I2C_O_SRIS)); + } +} + +//***************************************************************************** +// +//! Clears I2C Master interrupt sources. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! The I2C Master interrupt source is cleared, so that it no longer asserts. +//! This must be done in the interrupt handler to keep it from being called +//! again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Clear the I2C master interrupt source. + // + HWREG(ulBase + I2C_O_MICR) = I2C_MICR_IC; + + // + // Workaround for I2C master interrupt clear errata for rev B Stellaris + // devices. For later devices, this write is ignored and therefore + // harmless (other than the slight performance hit). + // + HWREG(ulBase + I2C_O_MMIS) = I2C_MICR_IC; +} + +//***************************************************************************** +// +//! Clears I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! The I2C Slave interrupt source is cleared, so that it no longer asserts. +//! This must be done in the interrupt handler to keep it from being called +//! again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Clear the I2C slave interrupt source. + // + HWREG(ulBase + I2C_O_SICR) = I2C_SICR_DATAIC; +} + +//***************************************************************************** +// +//! Clears I2C Slave interrupt sources. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified I2C Slave interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to I2CSlaveIntEnableEx(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveIntClearEx(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Clear the I2C slave interrupt source. + // + HWREG(ulBase + I2C_O_SICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Sets the address that the I2C Master will place on the bus. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ucSlaveAddr 7-bit slave address +//! \param bReceive flag indicating the type of communication with the slave +//! +//! This function will set the address that the I2C Master will place on the +//! bus when initiating a transaction. When the \e bReceive parameter is set +//! to \b true, the address will indicate that the I2C Master is initiating a +//! read from the slave; otherwise the address will indicate that the I2C +//! Master is initiating a write to the slave. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterSlaveAddrSet(unsigned long ulBase, unsigned char ucSlaveAddr, + tBoolean bReceive) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + ASSERT(!(ucSlaveAddr & 0x80)); + + // + // Set the address of the slave with which the master will communicate. + // + HWREG(ulBase + I2C_O_MSA) = (ucSlaveAddr << 1) | bReceive; +} + +//***************************************************************************** +// +//! Indicates whether or not the I2C Master is busy. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function returns an indication of whether or not the I2C Master is +//! busy transmitting or receiving data. +//! +//! \return Returns \b true if the I2C Master is busy; otherwise, returns +//! \b false. +// +//***************************************************************************** +tBoolean +I2CMasterBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return the busy status. + // + if(HWREG(ulBase + I2C_O_MCS) & I2C_MCS_BUSY) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Indicates whether or not the I2C bus is busy. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function returns an indication of whether or not the I2C bus is busy. +//! This function can be used in a multi-master environment to determine if +//! another master is currently using the bus. +//! +//! \return Returns \b true if the I2C bus is busy; otherwise, returns +//! \b false. +// +//***************************************************************************** +tBoolean +I2CMasterBusBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Return the bus busy status. + // + if(HWREG(ulBase + I2C_O_MCS) & I2C_MCS_BUSBSY) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Controls the state of the I2C Master module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ulCmd command to be issued to the I2C Master module +//! +//! This function is used to control the state of the Master module send and +//! receive operations. The \e ucCmd parameter can be one of the following +//! values: +//! +//! - \b I2C_MASTER_CMD_SINGLE_SEND +//! - \b I2C_MASTER_CMD_SINGLE_RECEIVE +//! - \b I2C_MASTER_CMD_BURST_SEND_START +//! - \b I2C_MASTER_CMD_BURST_SEND_CONT +//! - \b I2C_MASTER_CMD_BURST_SEND_FINISH +//! - \b I2C_MASTER_CMD_BURST_SEND_ERROR_STOP +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_START +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_CONT +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_FINISH +//! - \b I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterControl(unsigned long ulBase, unsigned long ulCmd) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + ASSERT((ulCmd == I2C_MASTER_CMD_SINGLE_SEND) || + (ulCmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_START) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_CONT) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_FINISH) || + (ulCmd == I2C_MASTER_CMD_BURST_SEND_ERROR_STOP) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_START) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_CONT) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_FINISH) || + (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP)); + + // + // Send the command. + // + HWREG(ulBase + I2C_O_MCS) = ulCmd; +} + +//***************************************************************************** +// +//! Gets the error status of the I2C Master module. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function is used to obtain the error status of the Master module send +//! and receive operations. +//! +//! \return Returns the error status, as one of \b I2C_MASTER_ERR_NONE, +//! \b I2C_MASTER_ERR_ADDR_ACK, \b I2C_MASTER_ERR_DATA_ACK, or +//! \b I2C_MASTER_ERR_ARB_LOST. +// +//***************************************************************************** +unsigned long +I2CMasterErr(unsigned long ulBase) +{ + unsigned long ulErr; + + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Get the raw error state + // + ulErr = HWREG(ulBase + I2C_O_MCS); + + // + // If the I2C master is busy, then all the other bit are invalid, and + // don't have an error to report. + // + if(ulErr & I2C_MCS_BUSY) + { + return(I2C_MASTER_ERR_NONE); + } + + // + // Check for errors. + // + if(ulErr & (I2C_MCS_ERROR | I2C_MCS_ARBLST)) + { + return(ulErr & (I2C_MCS_ARBLST | I2C_MCS_DATACK | I2C_MCS_ADRACK)); + } + else + { + return(I2C_MASTER_ERR_NONE); + } +} + +//***************************************************************************** +// +//! Transmits a byte from the I2C Master. +//! +//! \param ulBase is the base address of the I2C Master module. +//! \param ucData data to be transmitted from the I2C Master +//! +//! This function will place the supplied data into I2C Master Data Register. +//! +//! \return None. +// +//***************************************************************************** +void +I2CMasterDataPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Write the byte. + // + HWREG(ulBase + I2C_O_MDR) = ucData; +} + +//***************************************************************************** +// +//! Receives a byte that has been sent to the I2C Master. +//! +//! \param ulBase is the base address of the I2C Master module. +//! +//! This function reads a byte of data from the I2C Master Data Register. +//! +//! \return Returns the byte received from by the I2C Master, cast as an +//! unsigned long. +// +//***************************************************************************** +unsigned long +I2CMasterDataGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE)); + + // + // Read a byte. + // + return(HWREG(ulBase + I2C_O_MDR)); +} + +//***************************************************************************** +// +//! Gets the I2C Slave module status +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This function will return the action requested from a master, if any. +//! Possible values are: +//! +//! - \b I2C_SLAVE_ACT_NONE +//! - \b I2C_SLAVE_ACT_RREQ +//! - \b I2C_SLAVE_ACT_TREQ +//! - \b I2C_SLAVE_ACT_RREQ_FBR +//! +//! \return Returns \b I2C_SLAVE_ACT_NONE to indicate that no action has been +//! requested of the I2C Slave module, \b I2C_SLAVE_ACT_RREQ to indicate that +//! an I2C master has sent data to the I2C Slave module, \b I2C_SLAVE_ACT_TREQ +//! to indicate that an I2C master has requested that the I2C Slave module send +//! data, and \b I2C_SLAVE_ACT_RREQ_FBR to indicate that an I2C master has sent +//! data to the I2C slave and the first byte following the slave's own address +//! has been received. +// +//***************************************************************************** +unsigned long +I2CSlaveStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Return the slave status. + // + return(HWREG(ulBase + I2C_O_SCSR)); +} + +//***************************************************************************** +// +//! Transmits a byte from the I2C Slave. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! \param ucData data to be transmitted from the I2C Slave +//! +//! This function will place the supplied data into I2C Slave Data Register. +//! +//! \return None. +// +//***************************************************************************** +void +I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Write the byte. + // + HWREG(ulBase + I2C_O_SDR) = ucData; +} + +//***************************************************************************** +// +//! Receives a byte that has been sent to the I2C Slave. +//! +//! \param ulBase is the base address of the I2C Slave module. +//! +//! This function reads a byte of data from the I2C Slave Data Register. +//! +//! \return Returns the byte received from by the I2C Slave, cast as an +//! unsigned long. +// +//***************************************************************************** +unsigned long +I2CSlaveDataGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == I2C0_SLAVE_BASE) || (ulBase == I2C1_SLAVE_BASE)); + + // + // Read a byte. + // + return(HWREG(ulBase + I2C_O_SDR)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.h new file mode 100644 index 00000000..d277dce3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2c.h @@ -0,0 +1,179 @@ +//***************************************************************************** +// +// i2c.h - Prototypes for the I2C Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __I2C_H__ +#define __I2C_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Defines for the API. +// +//***************************************************************************** + +//***************************************************************************** +// +// Interrupt defines. +// +//***************************************************************************** +#define I2C_INT_MASTER 0x00000001 +#define I2C_INT_SLAVE 0x00000002 + +//***************************************************************************** +// +// I2C Master commands. +// +//***************************************************************************** +#define I2C_MASTER_CMD_SINGLE_SEND \ + 0x00000007 +#define I2C_MASTER_CMD_SINGLE_RECEIVE \ + 0x00000007 +#define I2C_MASTER_CMD_BURST_SEND_START \ + 0x00000003 +#define I2C_MASTER_CMD_BURST_SEND_CONT \ + 0x00000001 +#define I2C_MASTER_CMD_BURST_SEND_FINISH \ + 0x00000005 +#define I2C_MASTER_CMD_BURST_SEND_ERROR_STOP \ + 0x00000004 +#define I2C_MASTER_CMD_BURST_RECEIVE_START \ + 0x0000000b +#define I2C_MASTER_CMD_BURST_RECEIVE_CONT \ + 0x00000009 +#define I2C_MASTER_CMD_BURST_RECEIVE_FINISH \ + 0x00000005 +#define I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP \ + 0x00000004 + +//***************************************************************************** +// +// I2C Master error status. +// +//***************************************************************************** +#define I2C_MASTER_ERR_NONE 0 +#define I2C_MASTER_ERR_ADDR_ACK 0x00000004 +#define I2C_MASTER_ERR_DATA_ACK 0x00000008 +#define I2C_MASTER_ERR_ARB_LOST 0x00000010 + +//***************************************************************************** +// +// I2C Slave action requests +// +//***************************************************************************** +#define I2C_SLAVE_ACT_NONE 0 +#define I2C_SLAVE_ACT_RREQ 0x00000001 // Master has sent data +#define I2C_SLAVE_ACT_TREQ 0x00000002 // Master has requested data +#define I2C_SLAVE_ACT_RREQ_FBR 0x00000005 // Master has sent first byte + +//***************************************************************************** +// +// Miscellaneous I2C driver definitions. +// +//***************************************************************************** +#define I2C_MASTER_MAX_RETRIES 1000 // Number of retries + + +//***************************************************************************** +// +// I2C Slave interrupts. +// +//***************************************************************************** +#define I2C_SLAVE_INT_STOP 0x00000004 // Stop Condition Interrupt. +#define I2C_SLAVE_INT_START 0x00000002 // Start Condition Interrupt. +#define I2C_SLAVE_INT_DATA 0x00000001 // Data Interrupt. + + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void I2CIntRegister(unsigned long ulBase, void(fnHandler)(void)); +extern void I2CIntUnregister(unsigned long ulBase); +extern tBoolean I2CMasterBusBusy(unsigned long ulBase); +extern tBoolean I2CMasterBusy(unsigned long ulBase); +extern void I2CMasterControl(unsigned long ulBase, unsigned long ulCmd); +extern unsigned long I2CMasterDataGet(unsigned long ulBase); +extern void I2CMasterDataPut(unsigned long ulBase, unsigned char ucData); +extern void I2CMasterDisable(unsigned long ulBase); +extern void I2CMasterEnable(unsigned long ulBase); +extern unsigned long I2CMasterErr(unsigned long ulBase); +extern void I2CMasterInitExpClk(unsigned long ulBase, unsigned long ulI2CClk, + tBoolean bFast); +extern void I2CMasterIntClear(unsigned long ulBase); +extern void I2CMasterIntDisable(unsigned long ulBase); +extern void I2CMasterIntEnable(unsigned long ulBase); +extern tBoolean I2CMasterIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void I2CMasterSlaveAddrSet(unsigned long ulBase, + unsigned char ucSlaveAddr, + tBoolean bReceive); +extern unsigned long I2CSlaveDataGet(unsigned long ulBase); +extern void I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData); +extern void I2CSlaveDisable(unsigned long ulBase); +extern void I2CSlaveEnable(unsigned long ulBase); +extern void I2CSlaveInit(unsigned long ulBase, unsigned char ucSlaveAddr); +extern void I2CSlaveIntClear(unsigned long ulBase); +extern void I2CSlaveIntDisable(unsigned long ulBase); +extern void I2CSlaveIntEnable(unsigned long ulBase); +extern void I2CSlaveIntClearEx(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2CSlaveIntDisableEx(unsigned long ulBase, + unsigned long ulIntFlags); +extern void I2CSlaveIntEnableEx(unsigned long ulBase, unsigned long ulIntFlags); +extern tBoolean I2CSlaveIntStatus(unsigned long ulBase, tBoolean bMasked); +extern unsigned long I2CSlaveIntStatusEx(unsigned long ulBase, + tBoolean bMasked); +extern unsigned long I2CSlaveStatus(unsigned long ulBase); + +//***************************************************************************** +// +// Several I2C APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define I2CMasterInit(a, b) \ + I2CMasterInitExpClk(a, SysCtlClockGet(), b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __I2C_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.c new file mode 100644 index 00000000..42749354 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.c @@ -0,0 +1,1136 @@ +//***************************************************************************** +// +// i2s.c - Driver for the I2S controller. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup i2s_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_i2s.h" +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/i2s.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +//! Enables the I2S transmit module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function enables the transmit module for operation. The module +//! should be enabled after configuration. When the module is disabled, +//! no data or clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the tx FIFO service request. + // + HWREG(ulBase + I2S_O_TXISM) = I2S_TXISM_FFM; + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_TXEN; +} + +//***************************************************************************** +// +//! Disables the I2S transmit module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function disables the transmit module for operation. The module +//! should be disabled before configuration. When the module is disabled, +//! no data or clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) &= ~I2S_CFG_TXEN; +} + +//***************************************************************************** +// +//! Writes data samples to the I2S transmit FIFO with blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param ulData is the single or dual channel I2S data. +//! +//! This function writes a single channel sample or combined left-right +//! samples to the I2S transmit FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2STxConfigSet(). +//! If the transmit mode is I2S_MODE_DUAL_STEREO then the \e ulData parameter +//! contains either the left or right sample. The left and right sample +//! alternate with each write to the FIFO, left sample first. If the transmit +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! \e ulData parameter contains both the left and right samples. If the +//! transmit mode is I2S_MODE_SINGLE_MONO then the \e ulData parameter +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are written at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no room in the transmit FIFO, then this function will wait +//! in a polling loop until the data can be written. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxDataPut(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Wait until there is space. + // + while(HWREG(ulBase + I2S_O_TXLEV) >= 16) + { + } + + // + // Write the data to the I2S. + // + HWREG(ulBase + I2S_O_TXFIFO) = ulData; +} + +//***************************************************************************** +// +//! Writes data samples to the I2S transmit FIFO without blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param ulData is the single or dual channel I2S data. +//! +//! This function writes a single channel sample or combined left-right +//! samples to the I2S transmit FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2STxConfigSet(). +//! If the transmit mode is I2S_MODE_DUAL_STEREO then the \e ulData parameter +//! contains either the left or right sample. The left and right sample +//! alternate with each write to the FIFO, left sample first. If the transmit +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! \e ulData parameter contains both the left and right samples. If the +//! transmit mode is I2S_MODE_SINGLE_MONO then the \e ulData parameter +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are written at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no room in the transmit FIFO, then this function will return +//! immediately without writing any data to the FIFO. +//! +//! \return The number of elements written to the I2S transmit FIFO (1 or 0). +// +//***************************************************************************** +long +I2STxDataPutNonBlocking(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Check for space to write. + // + if(HWREG(ulBase + I2S_O_TXLEV) < 16) + { + HWREG(ulBase + I2S_O_TXFIFO) = ulData; + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Configures the I2S transmit module. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S transmit +//! channel. The parameter \e ulConfig is the logical OR of the following +//! options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S transmitter is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! - \b I2S_CONFIG_EMPTY_ZERO or \b I2S_CONFIG_EMPTY_REPEAT to select whether +//! the module transmits zeroes or repeats the last sample when the FIFO is +//! empty. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_EMPTY_MASK | I2S_CONFIG_CLK_MASK | + I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Check to see if a compact mode is used. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + // + // If compact 8 mode is used, then need to adjust some bits + // before writing the config register. Also set the FIFO + // config register for 8 bit compact samples. + // + ulConfig &= ~I2S_CONFIG_MODE_MONO; + HWREG(ulBase + I2S_O_TXFIFOCFG) = I2S_TXFIFOCFG_CSS; + } + else + { + // + // If compact 8 mode is not used, then set the FIFO config + // register for 16 bit. This is okay if a compact mode is + // not used. + // + HWREG(ulBase + I2S_O_TXFIFOCFG) = 0; + } + + // + // Write the configuration register. Since all the fields are + // specified by the configuration parameter, it is not necessary + // to do a read-modify-write. + // + HWREG(ulBase + I2S_O_TXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the FIFO level at which a service request is generated. +//! +//! \param ulBase is the I2S module base address. +//! \param ulLevel is the FIFO service request limit. +//! +//! This function is used to set the transmit FIFO fullness level at which +//! a service request will occur. The service request is used to generate +//! an interrupt or a DMA transfer request. The transmit FIFO will +//! generate a service request when the number of items in the FIFO is +//! less than the level specified in the \e ulLevel parameter. For example, +//! if \e ulLevel is 8, then a service request will be generated when +//! there are less than 8 samples remaining in the transmit FIFO. +//! +//! For the purposes of counting the FIFO level, a left-right sample pair +//! counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, the level must be an even number from 0 to 16. The +//! maximum value is 16, which will cause a service request when there +//! is any room in the FIFO. The minimum value is 0, which disables the +//! service request. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(ulLevel <= 16); + + // + // Write the FIFO limit + // + HWREG(ulBase + I2S_O_TXLIMIT) = ulLevel; +} + +//***************************************************************************** +// +//! Gets the current setting of the FIFO service request level. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the value of the transmit FIFO service +//! request level. This value is set using the I2STxFIFOLimitSet() +//! function. +//! +//! \return Returns the current value of the FIFO service request limit. +// +//***************************************************************************** +unsigned long +I2STxFIFOLimitGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the FIFO limit + // + return(HWREG(ulBase + I2S_O_TXLIMIT)); +} + +//***************************************************************************** +// +//! Gets the number of samples in the transmit FIFO. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the number of samples in the transmit +//! FIFO. For the purposes of measuring the FIFO level, a left-right sample +//! pair counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, normally the level will be an even number from 0 to +//! 16. If dual stereo mode is used and only the left sample has been +//! written without the matching right sample, then the FIFO level will be an +//! odd value. If the FIFO level is odd, it indicates a left-right sample +//! mismatch. +//! +//! \return Returns the number of samples in the transmit FIFO, which will +//! normally be an even number. +// +//***************************************************************************** +unsigned long +I2STxFIFOLevelGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the transmit FIFO level. + // + return(HWREG(ulBase + I2S_O_TXLEV)); +} + +//***************************************************************************** +// +//! Enables the I2S receive module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function enables the receive module for operation. The module +//! should be enabled after configuration. When the module is disabled, +//! no data will be clocked in regardless of the signals on the I2S interface. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the tx FIFO service request. + // + HWREG(ulBase + I2S_O_RXISM) = I2S_RXISM_FFM; + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Disables the I2S receive module for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function disables the receive module for operation. The module +//! should be disabled before configuration. When the module is disabled, +//! no data will be clocked in regardless of the signals on the I2S interface. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + I2S_O_CFG) &= ~I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Reads data samples from the I2S receive FIFO with blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param pulData points to storage for the returned I2S sample data. +//! +//! This function reads a single channel sample or combined left-right +//! samples from the I2S receive FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2SRxConfigSet(). +//! If the receive mode is I2S_MODE_DUAL_STEREO then the returned value +//! contains either the left or right sample. The left and right sample +//! alternate with each read from the FIFO, left sample first. If the receive +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! returned data contains both the left and right samples. If the +//! receive mode is I2S_MODE_SINGLE_MONO then the returned data +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are read at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no data in the receive FIFO, then this function will wait +//! in a polling loop until data is available. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxDataGet(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Wait until there is data available. + // + while(HWREG(ulBase + I2S_O_RXLEV) == 0) + { + } + + // + // Read data from the I2S receive FIFO. + // + *pulData = HWREG(ulBase + I2S_O_RXFIFO); +} + +//***************************************************************************** +// +//! Reads data samples from the I2S receive FIFO without blocking. +//! +//! \param ulBase is the I2S module base address. +//! \param pulData points to storage for the returned I2S sample data. +//! +//! This function reads a single channel sample or combined left-right +//! samples from the I2S receive FIFO. The format of the sample is determined +//! by the configuration that was used with the function I2SRxConfigSet(). +//! If the receive mode is I2S_MODE_DUAL_STEREO then the received data +//! contains either the left or right sample. The left and right sample +//! alternate with each read from the FIFO, left sample first. If the receive +//! mode is I2S_MODE_COMPACT_STEREO_16 or I2S_MODE_COMPACT_STEREO_8, then the +//! received data contains both the left and right samples. If the +//! receive mode is I2S_MODE_SINGLE_MONO then the received data +//! contains the single channel sample. +//! +//! For the compact modes, both the left and right samples are read at +//! the same time. If 16-bit compact mode is used, then the least significant +//! 16 bits contain the left sample, and the most significant 16 bits contain +//! the right sample. If 8-bit compact mode is used, then the lower 8 bits +//! contain the left sample, and the next 8 bits contain the right sample, +//! with the upper 16 bits unused. +//! +//! If there is no data in the receive FIFO, then this function will return +//! immediately without reading any data from the FIFO. +//! +//! \return The number of elements read from the I2S receive FIFO (1 or 0). +// +//***************************************************************************** +long +I2SRxDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Check for available samples. + // + if(HWREG(ulBase + I2S_O_RXLEV) != 0) + { + *pulData = HWREG(ulBase + I2S_O_RXFIFO); + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Configures the I2S receive module. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S receive +//! channel. The parameter \e ulConfig is the logical OR of the following +//! options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S receiver is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_CLK_MASK | I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Clear out any prior config of the RX FIFO config register. + // + HWREG(ulBase + I2S_O_RXFIFOCFG) = 0; + + // + // If mono mode is used, then the FMM bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_MONO) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_FMM; + } + + // + // If a compact mode is used, then the CSS bit needs to be set. + // + else if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_CSS; + } + + // + // The "mono" bits needs to be removed from the configuration word + // prior to writing to hardware, because the RX configuration register + // does not actually use these bits. + // + ulConfig &= ~I2S_CONFIG_MODE_MONO; + + // + // Write the configuration register. Since all the fields are + // specified by the configuration parameter, it is not necessary + // to do a read-modify-write. + // + HWREG(ulBase + I2S_O_RXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Sets the FIFO level at which a service request is generated. +//! +//! \param ulBase is the I2S module base address. +//! \param ulLevel is the FIFO service request limit. +//! +//! This function is used to set the receive FIFO fullness level at which +//! a service request will occur. The service request is used to generate +//! an interrupt or a DMA transfer request. The receive FIFO will +//! generate a service request when the number of items in the FIFO is +//! greater than the level specified in the \e ulLevel parameter. For example, +//! if \e ulLevel is 4, then a service request will be generated when +//! there are more than 4 samples available in the receive FIFO. +//! +//! For the purposes of counting the FIFO level, a left-right sample pair +//! counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, the level must be an even number from 0 to 16. The +//! minimum value is 0, which will cause a service request when there +//! is any data available in the FIFO. The maximum value is 16, which +//! disables the service request (because there cannot be more than 16 +//! items in the FIFO). +//! +//! \return None. +// +//***************************************************************************** +void +I2SRxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(ulLevel <= 16); + + // + // Write the FIFO limit + // + HWREG(ulBase + I2S_O_RXLIMIT) = ulLevel; +} + +//***************************************************************************** +// +//! Gets the current setting of the FIFO service request level. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the value of the receive FIFO service +//! request level. This value is set using the I2SRxFIFOLimitSet() +//! function. +//! +//! \return Returns the current value of the FIFO service request limit. +// +//***************************************************************************** +unsigned long +I2SRxFIFOLimitGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the FIFO limit. The lower bit is masked + // because it always reads as 1, and has no meaning. + // + return(HWREG(ulBase + I2S_O_RXLIMIT) & 0xFFFE); +} + +//***************************************************************************** +// +//! Gets the number of samples in the receive FIFO. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function is used to get the number of samples in the receive +//! FIFO. For the purposes of measuring the FIFO level, a left-right sample +//! pair counts as 2, whether the mode is dual or compact stereo. When mono +//! mode is used, internally the mono sample is still treated as a sample +//! pair, so a single mono sample counts as 2. Since the FIFO always deals +//! with sample pairs, normally the level will be an even number from 0 to +//! 16. If dual stereo mode is used and only the left sample has been +//! read without reading the matching right sample, then the FIFO level will +//! be an odd value. If the FIFO level is odd, it indicates a left-right +//! sample mismatch. +//! +//! \return Returns the number of samples in the transmit FIFO, which will +//! normally be an even number. +// +//***************************************************************************** +unsigned long +I2SRxFIFOLevelGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Read and return the receive FIFO level. + // + return(HWREG(ulBase + I2S_O_RXLEV)); +} + +//***************************************************************************** +// +//! Enables the I2S transmit and receive modules for operation. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function simultaneously enables the transmit and receive modules for +//! operation, providing a synchronized SCLK and LRCLK. The module should be +//! enabled after configuration. When the module is disabled, no data or +//! clocks will be generated on the I2S signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Enable the Tx FIFO service request. + // + HWREG(ulBase + I2S_O_TXISM) = I2S_TXISM_FFM; + + // + // Enable the Rx FIFO service request. + // + HWREG(ulBase + I2S_O_RXISM) = I2S_RXISM_FFM; + + // + // Enable the transmit and receive modules. + // + HWREG(ulBase + I2S_O_CFG) |= I2S_CFG_TXEN | I2S_CFG_RXEN; +} + +//***************************************************************************** +// +//! Disables the I2S transmit and receive modules. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function simultaneously disables the transmit and receive modules. +//! When the module is disabled, no data or clocks will be generated on the I2S +//! signals. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Disable the transmit and receive modules. + // + HWREG(ulBase + I2S_O_CFG) &= ~(I2S_CFG_TXEN | I2S_CFG_RXEN); +} + +//***************************************************************************** +// +//! Configures the I2S transmit and receive modules. +//! +//! \param ulBase is the I2S module base address. +//! \param ulConfig is the logical OR of the configuration options. +//! +//! This function is used to configure the options for the I2S transmit and +//! receive channels with identical parameters. The parameter \e ulConfig is +//! the logical OR of the following options: +//! +//! - \b I2S_CONFIG_FORMAT_I2S for standard I2S format, +//! \b I2S_CONFIG_FORMAT_LEFT_JUST for left justified format, or +//! \b I2S_CONFIG_FORMAT_RIGHT_JUST for right justified format. +//! - \b I2S_CONFIG_SCLK_INVERT to invert the polarity of the serial bit clock. +//! - \b I2S_CONFIG_MODE_DUAL for dual channel stereo, +//! \b I2S_CONFIG_MODE_COMPACT_16 for 16-bit compact stereo mode, +//! \b I2S_CONFIG_MODE_COMPACT_8 for 8-bit compact stereo mode, or +//! \b I2S_CONFIG_MODE_MONO for single channel mono format. +//! - \b I2S_CONFIG_CLK_MASTER or \b I2S_CONFIG_CLK_SLAVE to select whether +//! the I2S transmitter is the clock master or slave. +//! - \b I2S_CONFIG_SAMPLE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per sample. +//! - \b I2S_CONFIG_WIRE_SIZE_32, \b _24, \b _20, \b _16, or \b _8 +//! to select the number of bits per word that are transferred on the data +//! line. +//! - \b I2S_CONFIG_EMPTY_ZERO or \b I2S_CONFIG_EMPTY_REPEAT to select whether +//! the module transmits zeroes or repeats the last sample when the FIFO is +//! empty. +//! +//! \return None. +// +//***************************************************************************** +void +I2STxRxConfigSet(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulConfig & (I2S_CONFIG_FORMAT_MASK | I2S_CONFIG_MODE_MASK | + I2S_CONFIG_EMPTY_MASK | I2S_CONFIG_CLK_MASK | + I2S_CONFIG_SAMPLE_SIZE_MASK | + I2S_CONFIG_WIRE_SIZE_MASK)) == ulConfig); + + // + // Clear out any prior configuration of the FIFO config registers. + // + HWREG(ulBase + I2S_O_TXFIFOCFG) = 0; + HWREG(ulBase + I2S_O_RXFIFOCFG) = 0; + + // + // If mono mode is used, then the FMM bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_MONO) + { + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_FMM; + ulConfig &= ~(I2S_CONFIG_MODE_MONO); + } + + // + // If a compact mode is used, then the CSS bit needs to be set. + // + if((ulConfig & I2S_CONFIG_MODE_MASK) == I2S_CONFIG_MODE_COMPACT_8) + { + HWREG(ulBase + I2S_O_TXFIFOCFG) |= I2S_TXFIFOCFG_CSS; + HWREG(ulBase + I2S_O_RXFIFOCFG) |= I2S_RXFIFOCFG_CSS; + } + + // + // Write the configuration register. Since all the fields are specified by + // the configuration parameter, it is not necessary to do a + // read-modify-write. + // + HWREG(ulBase + I2S_O_TXCFG) = ulConfig; + HWREG(ulBase + I2S_O_RXCFG) = ulConfig; +} + +//***************************************************************************** +// +//! Selects the source of the master clock, internal or external. +//! +//! \param ulBase is the I2S module base address. +//! \param ulMClock is the logical OR of the master clock configuration +//! choices. +//! +//! This function selects whether the master clock is sourced from the device +//! internal PLL, or comes from an external pin. The I2S serial bit clock +//! (SCLK) and left-right word clock (LRCLK) are derived from the I2S master +//! clock. The transmit and receive modules can be configured independently. +//! The \e ulMClock parameter is chosen from the following: +//! +//! - one of \b I2S_TX_MCLK_EXT or \b I2S_TX_MCLK_INT +//! - one of \b I2S_RX_MCLK_EXT or \b I2S_RX_MCLK_INT +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock) +{ + unsigned long ulConfig; + + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulMClock & (I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT)) == ulMClock); + + // + // Set the clock selection bits in the configuation word. + // + ulConfig = HWREG(ulBase + I2S_O_CFG) & + ~(I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT); + HWREG(ulBase + I2S_O_CFG) = ulConfig | ulMClock; +} + +//***************************************************************************** +// +//! Enables I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! This function enables the specified I2S sources to generate interrupts. +//! The \e ulIntFlags parameter can be the logical OR of any of the following +//! values: +//! +//! - \b I2S_INT_RXERR for receive errors +//! - \b I2S_INT_RXREQ for receive FIFO service requests +//! - \b I2S_INT_TXERR for transmit errors +//! - \b I2S_INT_TXREQ for transmit FIFO service requests +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + I2S_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! This function disables the specified I2S sources for interrupt +//! generation. The \e ulIntFlags parameter can be the logical OR +//! of any of the following values: \b I2S_INT_RXERR, \b I2S_INT_RXREQ, +//! \b I2S_INT_TXERR, or \b I2S_INT_TXREQ. +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + I2S_O_IM) &= ~ulIntFlags; +} + +//***************************************************************************** +// +//! Gets the I2S interrupt status. +//! +//! \param ulBase is the I2S module base address. +//! \param bMasked is set \b true to get the masked interrupt status, or +//! \b false to get the raw interrupt status. +//! +//! This function returns the I2S interrupt status. It can return either +//! the raw or masked interrupt status. +//! +//! \return Returns the masked or raw I2S interrupt status, as a bit field +//! of any of the following values: \b I2S_INT_RXERR, \b I2S_INT_RXREQ, +//! \b I2S_INT_TXERR, or \b I2S_INT_TXREQ +// +//***************************************************************************** +unsigned long +I2SIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + I2S_O_MIS)); + } + else + { + return(HWREG(ulBase + I2S_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears pending I2S interrupt sources. +//! +//! \param ulBase is the I2S module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! This function clears the specified pending I2S interrupts. This must +//! be done in the interrupt handler to keep the handler from being called +//! again immediately upon exit. The \e ulIntFlags parameter can be the +//! logical OR of any of the following values: \b I2S_INT_RXERR, +//! \b I2S_INT_RXREQ, \b I2S_INT_TXERR, or \b I2S_INT_TXREQ. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return Returns None. +// +//***************************************************************************** +void +I2SIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT((ulIntFlags & (I2S_INT_RXERR | I2S_INT_RXREQ | + I2S_INT_TXERR | I2S_INT_TXREQ)) == ulIntFlags); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + I2S_O_IC) = ulIntFlags; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the I2S controller. +//! +//! \param ulBase is the I2S module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the I2S controller +//! generates an interrupt. Specific I2S interrupts must still be enabled +//! with the I2SIntEnable() function. It is the responsibility of the +//! interrupt handler to clear any pending interrupts with I2SIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2SIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(INT_I2S0, pfnHandler); + + // + // Enable the I2S interface interrupt. + // + IntEnable(INT_I2S0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the I2S controller. +//! +//! \param ulBase is the I2S module base address. +//! +//! This function will disable and clear the handler to be called when the +//! I2S interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +I2SIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == I2S0_BASE); + + // + // Disable the I2S interface interrupt. + // + IntDisable(INT_I2S0); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_I2S0); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.h new file mode 100644 index 00000000..5782c61b --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/i2s.h @@ -0,0 +1,154 @@ +//***************************************************************************** +// +// i2s.h - Prototypes and macros for the I2S controller. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __I2S_H__ +#define __I2S_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to I2STxConfigSet() and I2SRxConfigSet() +// +//***************************************************************************** +#define I2S_CONFIG_FORMAT_MASK 0x3C000000 // JST, DLY, SCP, LRP +#define I2S_CONFIG_FORMAT_I2S 0x14000000 // !JST, DLY, !SCP, LRP +#define I2S_CONFIG_FORMAT_LEFT_JUST \ + 0x00000000 // !JST, !DLY, !SCP, !LRP +#define I2S_CONFIG_FORMAT_RIGHT_JUST \ + 0x20000000 // JST, !DLY, !SCP, !LRP + +#define I2S_CONFIG_SCLK_INVERT 0x08000000 + +#define I2S_CONFIG_MODE_MASK 0x03000000 +#define I2S_CONFIG_MODE_DUAL 0x00000000 +#define I2S_CONFIG_MODE_COMPACT_16 \ + 0x01000000 +#define I2S_CONFIG_MODE_COMPACT_8 \ + 0x03000000 +#define I2S_CONFIG_MODE_MONO 0x02000000 + +#define I2S_CONFIG_EMPTY_MASK 0x00800000 +#define I2S_CONFIG_EMPTY_ZERO 0x00000000 +#define I2S_CONFIG_EMPTY_REPEAT 0x00800000 + +#define I2S_CONFIG_CLK_MASK 0x00400000 +#define I2S_CONFIG_CLK_MASTER 0x00400000 +#define I2S_CONFIG_CLK_SLAVE 0x00000000 + +#define I2S_CONFIG_SAMPLE_SIZE_MASK \ + 0x0000FC00 +#define I2S_CONFIG_SAMPLE_SIZE_32 \ + 0x00007C00 +#define I2S_CONFIG_SAMPLE_SIZE_24 \ + 0x00005C00 +#define I2S_CONFIG_SAMPLE_SIZE_20 \ + 0x00004C00 +#define I2S_CONFIG_SAMPLE_SIZE_16 \ + 0x00003C00 +#define I2S_CONFIG_SAMPLE_SIZE_8 \ + 0x00001C00 + +#define I2S_CONFIG_WIRE_SIZE_MASK \ + 0x000003F0 +#define I2S_CONFIG_WIRE_SIZE_32 0x000001F0 +#define I2S_CONFIG_WIRE_SIZE_24 0x00000170 +#define I2S_CONFIG_WIRE_SIZE_20 0x00000130 +#define I2S_CONFIG_WIRE_SIZE_16 0x000000F0 +#define I2S_CONFIG_WIRE_SIZE_8 0x00000070 + +//***************************************************************************** +// +// Values that can be passed to I2SMasterClockSelect() +// +//***************************************************************************** +#define I2S_TX_MCLK_EXT 0x00000010 +#define I2S_TX_MCLK_INT 0x00000000 +#define I2S_RX_MCLK_EXT 0x00000020 +#define I2S_RX_MCLK_INT 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to I2SIntEnable(), I2SIntDisable(), and +// I2SIntClear() +// +//***************************************************************************** +#define I2S_INT_RXERR 0x00000020 +#define I2S_INT_RXREQ 0x00000010 +#define I2S_INT_TXERR 0x00000002 +#define I2S_INT_TXREQ 0x00000001 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void I2STxEnable(unsigned long ulBase); +extern void I2STxDisable(unsigned long ulBase); +extern void I2STxDataPut(unsigned long ulBase, unsigned long ulData); +extern long I2STxDataPutNonBlocking(unsigned long ulBase, + unsigned long ulData); +extern void I2STxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2STxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel); +extern unsigned long I2STxFIFOLimitGet(unsigned long ulBase); +extern unsigned long I2STxFIFOLevelGet(unsigned long ulBase); +extern void I2SRxEnable(unsigned long ulBase); +extern void I2SRxDisable(unsigned long ulBase); +extern void I2SRxDataGet(unsigned long ulBase, unsigned long *pulData); +extern long I2SRxDataGetNonBlocking(unsigned long ulBase, + unsigned long *pulData); +extern void I2SRxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2SRxFIFOLimitSet(unsigned long ulBase, unsigned long ulLevel); +extern unsigned long I2SRxFIFOLimitGet(unsigned long ulBase); +extern unsigned long I2SRxFIFOLevelGet(unsigned long ulBase); +extern void I2STxRxEnable(unsigned long ulBase); +extern void I2STxRxDisable(unsigned long ulBase); +extern void I2STxRxConfigSet(unsigned long ulBase, unsigned long ulConfig); +extern void I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock); +extern void I2SIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2SIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long I2SIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void I2SIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void I2SIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void I2SIntUnregister(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __I2S_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.c new file mode 100644 index 00000000..20e3a052 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.c @@ -0,0 +1,723 @@ +//***************************************************************************** +// +// interrupt.c - Driver for the NVIC Interrupt Controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup interrupt_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/cpu.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" + +//***************************************************************************** +// +// This is a mapping between priority grouping encodings and the number of +// preemption priority bits. +// +//***************************************************************************** +static const unsigned long g_pulPriority[] = +{ + NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6, + NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3, + NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1 +}; + +//***************************************************************************** +// +// This is a mapping between interrupt number and the register that contains +// the priority encoding for that interrupt. +// +//***************************************************************************** +static const unsigned long g_pulRegs[] = +{ + 0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1, + NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7, + NVIC_PRI8, NVIC_PRI9, NVIC_PRI10, NVIC_PRI11, NVIC_PRI12, NVIC_PRI13 +}; + +//***************************************************************************** +// +//! \internal +//! The default interrupt handler. +//! +//! This is the default interrupt handler for all interrupts. It simply loops +//! forever so that the system state is preserved for observation by a +//! debugger. Since interrupts should be disabled before unregistering the +//! corresponding handler, this should never be called. +//! +//! \return None. +// +//***************************************************************************** +static void +IntDefaultHandler(void) +{ + // + // Go into an infinite loop. + // + while(1) + { + } +} + +//***************************************************************************** +// +// The processor vector table. +// +// This contains a list of the handlers for the various interrupt sources in +// the system. The layout of this list is defined by the hardware; assertion +// of an interrupt causes the processor to start executing directly at the +// address given in the corresponding location in this list. +// +//***************************************************************************** +#if defined(ewarm) +static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE"; +#elif defined(sourcerygxx) +static __attribute__((section(".cs3.region-head.ram"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#elif defined(ccs) +#pragma DATA_SECTION(g_pfnRAMVectors, ".vtable") +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#else +static __attribute__((section("vtable"))) +void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void); +#endif + +//***************************************************************************** +// +//! Enables the processor interrupt. +//! +//! Allows the processor to respond to interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were disabled when the function was +//! called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterEnable(void) +{ + // + // Enable processor interrupts. + // + return(CPUcpsie()); +} + +//***************************************************************************** +// +//! Disables the processor interrupt. +//! +//! Prevents the processor from receiving interrupts. This does not affect the +//! set of interrupts enabled in the interrupt controller; it just gates the +//! single interrupt from the controller to the processor. +//! +//! \note Previously, this function had no return value. As such, it was +//! possible to include interrupt.h and call this function without +//! having included hw_types.h. Now that the return is a +//! tBoolean, a compiler error will occur in this case. The solution +//! is to include hw_types.h before including interrupt.h. +//! +//! \return Returns \b true if interrupts were already disabled when the +//! function was called or \b false if they were initially enabled. +// +//***************************************************************************** +tBoolean +IntMasterDisable(void) +{ + // + // Disable processor interrupts. + // + return(CPUcpsid()); +} + +//***************************************************************************** +// +//! Registers a function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param pfnHandler is a pointer to the function to be called. +//! +//! This function is used to specify the handler function to be called when the +//! given interrupt is asserted to the processor. When the interrupt occurs, +//! if it is enabled (via IntEnable()), the handler function will be called in +//! interrupt context. Since the handler function can preempt other code, care +//! must be taken to protect memory or peripherals that are accessed by the +//! handler and other non-handler code. +//! +//! \note The use of this function (directly or indirectly via a peripheral +//! driver interrupt register function) moves the interrupt vector table from +//! flash to SRAM. Therefore, care must be taken when linking the application +//! to ensure that the SRAM vector table is located at the beginning of SRAM; +//! otherwise NVIC will not look in the correct portion of memory for the +//! vector table (it requires the vector table be on a 1 kB memory alignment). +//! Normally, the SRAM vector table is so placed via the use of linker scripts. +//! See the discussion of compile-time versus run-time interrupt handler +//! registration in the introduction to this chapter. +//! +//! \return None. +// +//***************************************************************************** +void +IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)) +{ + unsigned long ulIdx, ulValue; + + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Make sure that the RAM vector table is correctly aligned. + // + ASSERT(((unsigned long)g_pfnRAMVectors & 0x000003ff) == 0); + + // + // See if the RAM vector table has been initialized. + // + if(HWREG(NVIC_VTABLE) != (unsigned long)g_pfnRAMVectors) + { + // + // Copy the vector table from the beginning of FLASH to the RAM vector + // table. + // + ulValue = HWREG(NVIC_VTABLE); + for(ulIdx = 0; ulIdx < NUM_INTERRUPTS; ulIdx++) + { + g_pfnRAMVectors[ulIdx] = (void (*)(void))HWREG((ulIdx * 4) + + ulValue); + } + + // + // Point NVIC at the RAM vector table. + // + HWREG(NVIC_VTABLE) = (unsigned long)g_pfnRAMVectors; + } + + // + // Save the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = pfnHandler; +} + +//***************************************************************************** +// +//! Unregisters the function to be called when an interrupt occurs. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function is used to indicate that no handler should be called when the +//! given interrupt is asserted to the processor. The interrupt source will be +//! automatically disabled (via IntDisable()) if necessary. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +IntUnregister(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Reset the interrupt handler. + // + g_pfnRAMVectors[ulInterrupt] = IntDefaultHandler; +} + +//***************************************************************************** +// +//! Sets the priority grouping of the interrupt controller. +//! +//! \param ulBits specifies the number of bits of preemptable priority. +//! +//! This function specifies the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. The range of +//! the grouping values are dependent upon the hardware implementation; on +//! the Stellaris family, three bits are available for hardware interrupt +//! prioritization and therefore priority grouping values of three through +//! seven have the same effect. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityGroupingSet(unsigned long ulBits) +{ + // + // Check the arguments. + // + ASSERT(ulBits < NUM_PRIORITY); + + // + // Set the priority grouping. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | g_pulPriority[ulBits]; +} + +//***************************************************************************** +// +//! Gets the priority grouping of the interrupt controller. +//! +//! This function returns the split between preemptable priority levels and +//! subpriority levels in the interrupt priority specification. +//! +//! \return The number of bits of preemptable priority. +// +//***************************************************************************** +unsigned long +IntPriorityGroupingGet(void) +{ + unsigned long ulLoop, ulValue; + + // + // Read the priority grouping. + // + ulValue = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M; + + // + // Loop through the priority grouping values. + // + for(ulLoop = 0; ulLoop < NUM_PRIORITY; ulLoop++) + { + // + // Stop looping if this value matches. + // + if(ulValue == g_pulPriority[ulLoop]) + { + break; + } + } + + // + // Return the number of priority bits. + // + return(ulLoop); +} + +//***************************************************************************** +// +//! Sets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! \param ucPriority specifies the priority of the interrupt. +//! +//! This function is used to set the priority of an interrupt. When multiple +//! interrupts are asserted simultaneously, the ones with the highest priority +//! are processed before the lower priority interrupts. Smaller numbers +//! correspond to higher interrupt priorities; priority 0 is the highest +//! interrupt priority. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. The remaining bits can be +//! used to sub-prioritize the interrupt sources, and may be used by the +//! hardware priority mechanism on a future part. This arrangement allows +//! priorities to migrate to different NVIC implementations without changing +//! the gross prioritization of the interrupts. +//! +//! \return None. +// +//***************************************************************************** +void +IntPrioritySet(unsigned long ulInterrupt, unsigned char ucPriority) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Set the interrupt priority. + // + ulTemp = HWREG(g_pulRegs[ulInterrupt >> 2]); + ulTemp &= ~(0xFF << (8 * (ulInterrupt & 3))); + ulTemp |= ucPriority << (8 * (ulInterrupt & 3)); + HWREG(g_pulRegs[ulInterrupt >> 2]) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the priority of an interrupt. +//! +//! \param ulInterrupt specifies the interrupt in question. +//! +//! This function gets the priority of an interrupt. See IntPrioritySet() for +//! a definition of the priority value. +//! +//! \return Returns the interrupt priority, or -1 if an invalid interrupt was +//! specified. +// +//***************************************************************************** +long +IntPriorityGet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT((ulInterrupt >= 4) && (ulInterrupt < NUM_INTERRUPTS)); + + // + // Return the interrupt priority. + // + return((HWREG(g_pulRegs[ulInterrupt >> 2]) >> (8 * (ulInterrupt & 3))) & + 0xFF); +} + +//***************************************************************************** +// +//! Enables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be enabled. +//! +//! The specified interrupt is enabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntEnable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to enable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Enable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM; + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Enable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS; + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Enable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Enable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Enable the general interrupt. + // + HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Disables an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be disabled. +//! +//! The specified interrupt is disabled in the interrupt controller. Other +//! enables for the interrupt (such as at the peripheral level) are unaffected +//! by this function. +//! +//! \return None. +// +//***************************************************************************** +void +IntDisable(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to disable. + // + if(ulInterrupt == FAULT_MPU) + { + // + // Disable the MemManage interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM); + } + else if(ulInterrupt == FAULT_BUS) + { + // + // Disable the bus fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS); + } + else if(ulInterrupt == FAULT_USAGE) + { + // + // Disable the usage fault interrupt. + // + HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE); + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Disable the System Tick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Disable the general interrupt. + // + HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Pends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be pended. +//! +//! The specified interrupt is pended in the interrupt controller. This will +//! cause the interrupt controller to execute the corresponding interrupt +//! handler at the next available time, based on the current interrupt state +//! priorities. For example, if called by a higher priority interrupt handler, +//! the specified interrupt handler will not be called until after the current +//! interrupt handler has completed execution. The interrupt must have been +//! enabled for it to be called. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendSet(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to pend. + // + if(ulInterrupt == FAULT_NMI) + { + // + // Pend the NMI interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_NMI_SET; + } + else if(ulInterrupt == FAULT_PENDSV) + { + // + // Pend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Pend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTSET; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Pend the general interrupt. + // + HWREG(NVIC_PEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Unpends an interrupt. +//! +//! \param ulInterrupt specifies the interrupt to be unpended. +//! +//! The specified interrupt is unpended in the interrupt controller. This will +//! cause any previously generated interrupts that have not been handled yet +//! (due to higher priority interrupts or the interrupt no having been enabled +//! yet) to be discarded. +//! +//! \return None. +// +//***************************************************************************** +void +IntPendClear(unsigned long ulInterrupt) +{ + // + // Check the arguments. + // + ASSERT(ulInterrupt < NUM_INTERRUPTS); + + // + // Determine the interrupt to unpend. + // + if(ulInterrupt == FAULT_PENDSV) + { + // + // Unpend the PendSV interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_UNPEND_SV; + } + else if(ulInterrupt == FAULT_SYSTICK) + { + // + // Unpend the SysTick interrupt. + // + HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTCLR; + } + else if((ulInterrupt >= 16) && (ulInterrupt <= 47)) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND0) = 1 << (ulInterrupt - 16); + } + else if(ulInterrupt >= 48) + { + // + // Unpend the general interrupt. + // + HWREG(NVIC_UNPEND1) = 1 << (ulInterrupt - 48); + } +} + +//***************************************************************************** +// +//! Sets the priority masking level +//! +//! \param ulPriorityMask is the priority level that will be masked. +//! +//! This function sets the interrupt priority masking level so that all +//! interrupts at the specified or lesser priority level is masked. This +//! can be used to globally disable a set of interrupts with priority below +//! a predetermined threshold. A value of 0 disables priority +//! masking. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return None. +// +//***************************************************************************** +void +IntPriorityMaskSet(unsigned long ulPriorityMask) +{ + CPUbasepriSet(ulPriorityMask); +} + +//***************************************************************************** +// +//! Gets the priority masking level +//! +//! This function gets the current setting of the interrupt priority masking +//! level. The value returned is the priority level such that all interrupts +//! of that and lesser priority are masked. A value of 0 means that priority +//! masking is disabled. +//! +//! Smaller numbers correspond to higher interrupt priorities. So for example +//! a priority level mask of 4 will allow interrupts of priority level 0-3, +//! and interrupts with a numerical priority of 4 and greater will be blocked. +//! +//! The hardware priority mechanism will only look at the upper N bits of the +//! priority level (where N is 3 for the Stellaris family), so any +//! prioritization must be performed in those bits. +//! +//! \return Returns the value of the interrupt priority level mask. +// +//***************************************************************************** +unsigned long +IntPriorityMaskGet(void) +{ + return(CPUbasepriGet()); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.h new file mode 100644 index 00000000..954f5775 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/interrupt.h @@ -0,0 +1,77 @@ +//***************************************************************************** +// +// interrupt.h - Prototypes for the NVIC Interrupt Controller Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __INTERRUPT_H__ +#define __INTERRUPT_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Macro to generate an interrupt priority mask based on the number of bits +// of priority supported by the hardware. +// +//***************************************************************************** +#define INT_PRIORITY_MASK ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF) + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean IntMasterEnable(void); +extern tBoolean IntMasterDisable(void); +extern void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)); +extern void IntUnregister(unsigned long ulInterrupt); +extern void IntPriorityGroupingSet(unsigned long ulBits); +extern unsigned long IntPriorityGroupingGet(void); +extern void IntPrioritySet(unsigned long ulInterrupt, + unsigned char ucPriority); +extern long IntPriorityGet(unsigned long ulInterrupt); +extern void IntEnable(unsigned long ulInterrupt); +extern void IntDisable(unsigned long ulInterrupt); +extern void IntPendSet(unsigned long ulInterrupt); +extern void IntPendClear(unsigned long ulInterrupt); +extern void IntPriorityMaskSet(unsigned long ulPriorityMask); +extern unsigned long IntPriorityMaskGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __INTERRUPT_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.c new file mode 100644 index 00000000..cb570006 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.c @@ -0,0 +1,446 @@ +//***************************************************************************** +// +// mpu.c - Driver for the Cortex-M3 memory protection unit (MPU). +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup mpu_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/mpu.h" + +//***************************************************************************** +// +//! Enables and configures the MPU for use. +//! +//! \param ulMPUConfig is the logical OR of the possible configurations. +//! +//! This function enables the Cortex-M3 memory protection unit. It also +//! configures the default behavior when in privileged mode and while +//! handling a hard fault or NMI. Prior to enabling the MPU, at least one +//! region must be set by calling MPURegionSet() or else by enabling the +//! default region for privileged mode by passing the +//! \b MPU_CONFIG_PRIV_DEFAULT flag to MPUEnable(). +//! Once the MPU is enabled, a memory management fault will be generated +//! for any memory access violations. +//! +//! The \e ulMPUConfig parameter should be the logical OR of any of the +//! following: +//! +//! - \b MPU_CONFIG_PRIV_DEFAULT enables the default memory map when in +//! privileged mode and when no other regions are defined. If this option +//! is not enabled, then there must be at least one valid region already +//! defined when the MPU is enabled. +//! - \b MPU_CONFIG_HARDFLT_NMI enables the MPU while in a hard fault or NMI +//! exception handler. If this option is not enabled, then the MPU is +//! disabled while in one of these exception handlers and the default +//! memory map is applied. +//! - \b MPU_CONFIG_NONE chooses none of the above options. In this case, +//! no default memory map is provided in privileged mode, and the MPU will +//! not be enabled in the fault handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUEnable(unsigned long ulMPUConfig) +{ + // + // Check the arguments. + // + ASSERT(!(ulMPUConfig & ~(MPU_CONFIG_PRIV_DEFAULT | + MPU_CONFIG_HARDFLT_NMI))); + + // + // Set the MPU control bits according to the flags passed by the user, + // and also set the enable bit. + // + HWREG(NVIC_MPU_CTRL) = ulMPUConfig | NVIC_MPU_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the MPU for use. +//! +//! This function disables the Cortex-M3 memory protection unit. When the +//! MPU is disabled, the default memory map is used and memory management +//! faults are not generated. +//! +//! \return None. +// +//***************************************************************************** +void +MPUDisable(void) +{ + // + // Turn off the MPU enable bit. + // + HWREG(NVIC_MPU_CTRL) &= ~NVIC_MPU_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Gets the count of regions supported by the MPU. +//! +//! This function is used to get the number of regions that are supported by +//! the MPU. This is the total number that are supported, including regions +//! that are already programmed. +//! +//! \return The number of memory protection regions that are available +//! for programming using MPURegionSet(). +// +//***************************************************************************** +unsigned long +MPURegionCountGet(void) +{ + // + // Read the DREGION field of the MPU type register, and mask off + // the bits of interest to get the count of regions. + // + return((HWREG(NVIC_MPU_TYPE) & NVIC_MPU_TYPE_DREGION_M) + >> NVIC_MPU_TYPE_DREGION_S); +} + +//***************************************************************************** +// +//! Enables a specific region. +//! +//! \param ulRegion is the region number to enable. +//! +//! This function is used to enable a memory protection region. The region +//! should already be set up with the MPURegionSet() function. Once enabled, +//! the memory protection rules of the region will be applied and access +//! violations will cause a memory management fault. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionEnable(unsigned long ulRegion) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + + // + // Select the region to modify. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Modify the enable bit in the region attributes. + // + HWREG(NVIC_MPU_ATTR) |= NVIC_MPU_ATTR_ENABLE; +} + +//***************************************************************************** +// +//! Disables a specific region. +//! +//! \param ulRegion is the region number to disable. +//! +//! This function is used to disable a previously enabled memory protection +//! region. The region will remain configured if it is not overwritten with +//! another call to MPURegionSet(), and can be enabled again by calling +//! MPURegionEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionDisable(unsigned long ulRegion) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + + // + // Select the region to modify. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Modify the enable bit in the region attributes. + // + HWREG(NVIC_MPU_ATTR) &= ~NVIC_MPU_ATTR_ENABLE; +} + +//***************************************************************************** +// +//! Sets up the access rules for a specific region. +//! +//! \param ulRegion is the region number to set up. +//! \param ulAddr is the base address of the region. It must be aligned +//! according to the size of the region specified in ulFlags. +//! \param ulFlags is a set of flags to define the attributes of the region. +//! +//! This function sets up the protection rules for a region. The region has +//! a base address and a set of attributes including the size, which must +//! be a power of 2. The base address parameter, \e ulAddr, must be aligned +//! according to the size. +//! +//! The \e ulFlags parameter is the logical OR of all of the attributes +//! of the region. It is a combination of choices for region size, +//! execute permission, read/write permissions, disabled sub-regions, +//! and a flag to determine if the region is enabled. +//! +//! The size flag determines the size of a region, and must be one of the +//! following: +//! +//! - \b MPU_RGN_SIZE_32B +//! - \b MPU_RGN_SIZE_64B +//! - \b MPU_RGN_SIZE_128B +//! - \b MPU_RGN_SIZE_256B +//! - \b MPU_RGN_SIZE_512B +//! - \b MPU_RGN_SIZE_1K +//! - \b MPU_RGN_SIZE_2K +//! - \b MPU_RGN_SIZE_4K +//! - \b MPU_RGN_SIZE_8K +//! - \b MPU_RGN_SIZE_16K +//! - \b MPU_RGN_SIZE_32K +//! - \b MPU_RGN_SIZE_64K +//! - \b MPU_RGN_SIZE_128K +//! - \b MPU_RGN_SIZE_256K +//! - \b MPU_RGN_SIZE_512K +//! - \b MPU_RGN_SIZE_1M +//! - \b MPU_RGN_SIZE_2M +//! - \b MPU_RGN_SIZE_4M +//! - \b MPU_RGN_SIZE_8M +//! - \b MPU_RGN_SIZE_16M +//! - \b MPU_RGN_SIZE_32M +//! - \b MPU_RGN_SIZE_64M +//! - \b MPU_RGN_SIZE_128M +//! - \b MPU_RGN_SIZE_256M +//! - \b MPU_RGN_SIZE_512M +//! - \b MPU_RGN_SIZE_1G +//! - \b MPU_RGN_SIZE_2G +//! - \b MPU_RGN_SIZE_4G +//! +//! The execute permission flag must be one of the following: +//! +//! - \b MPU_RGN_PERM_EXEC enables the region for execution of code +//! - \b MPU_RGN_PERM_NOEXEC disables the region for execution of code +//! +//! The read/write access permissions are applied separately for the +//! privileged and user modes. The read/write access flags must be one +//! of the following: +//! +//! - \b MPU_RGN_PERM_PRV_NO_USR_NO - no access in privileged or user mode +//! - \b MPU_RGN_PERM_PRV_RW_USR_NO - privileged read/write, user no access +//! - \b MPU_RGN_PERM_PRV_RW_USR_RO - privileged read/write, user read-only +//! - \b MPU_RGN_PERM_PRV_RW_USR_RW - privileged read/write, user read/write +//! - \b MPU_RGN_PERM_PRV_RO_USR_NO - privileged read-only, user no access +//! - \b MPU_RGN_PERM_PRV_RO_USR_RO - privileged read-only, user read-only +//! +//! The region is automatically divided into 8 equally-sized sub-regions by +//! the MPU. Sub-regions can only be used in regions of size 256 bytes +//! or larger. Any of these 8 sub-regions can be disabled. This allows +//! for creation of ``holes'' in a region which can be left open, or overlaid +//! by another region with different attributes. Any of the 8 sub-regions +//! can be disabled with a logical OR of any of the following flags: +//! +//! - \b MPU_SUB_RGN_DISABLE_0 +//! - \b MPU_SUB_RGN_DISABLE_1 +//! - \b MPU_SUB_RGN_DISABLE_2 +//! - \b MPU_SUB_RGN_DISABLE_3 +//! - \b MPU_SUB_RGN_DISABLE_4 +//! - \b MPU_SUB_RGN_DISABLE_5 +//! - \b MPU_SUB_RGN_DISABLE_6 +//! - \b MPU_SUB_RGN_DISABLE_7 +//! +//! Finally, the region can be initially enabled or disabled with one of +//! the following flags: +//! +//! - \b MPU_RGN_ENABLE +//! - \b MPU_RGN_DISABLE +//! +//! As an example, to set a region with the following attributes: size of +//! 32 KB, execution enabled, read-only for both privileged and user, one +//! sub-region disabled, and initially enabled; the \e ulFlags parameter would +//! have the following value: +//! +//! +//! (MPU_RG_SIZE_32K | MPU_RGN_PERM_EXEC | MPU_RGN_PERM_PRV_RO_USR_RO | +//! MPU_SUB_RGN_DISABLE_2 | MPU_RGN_ENABLE) +//! +//! +//! \note This function will write to multiple registers and is not protected +//! from interrupts. It is possible that an interrupt which accesses a +//! region may occur while that region is in the process of being changed. +//! The safest way to handle this is to disable a region before changing it. +//! Refer to the discussion of this in the API Detailed Description section. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionSet(unsigned long ulRegion, unsigned long ulAddr, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + ASSERT((ulAddr & ~0 << (((ulFlags & NVIC_MPU_ATTR_SIZE_M) >> 1) + 1)) + == ulAddr); + + // + // Program the base address, use the region field to select the + // region at the same time. + // + HWREG(NVIC_MPU_BASE) = ulAddr | ulRegion | NVIC_MPU_BASE_VALID; + + // + // Program the region attributes. Set the TEX field and the S, C, + // and B bits to fixed values that are suitable for all Stellaris + // memory. + // + HWREG(NVIC_MPU_ATTR) = (ulFlags & ~(NVIC_MPU_ATTR_TEX_M | + NVIC_MPU_ATTR_CACHEABLE)) | + NVIC_MPU_ATTR_SHAREABLE | + NVIC_MPU_ATTR_BUFFRABLE; +} + +//***************************************************************************** +// +//! Gets the current settings for a specific region. +//! +//! \param ulRegion is the region number to get. +//! \param pulAddr points to storage for the base address of the region. +//! \param pulFlags points to the attribute flags for the region. +//! +//! This function retrieves the configuration of a specific region. The +//! meanings and format of the parameters is the same as that of the +//! MPURegionSet() function. +//! +//! This function can be used to save the configuration of a region for +//! later use with the MPURegionSet() function. The region's enable state +//! will be preserved in the attributes that are saved. +//! +//! \return None. +// +//***************************************************************************** +void +MPURegionGet(unsigned long ulRegion, unsigned long *pulAddr, + unsigned long *pulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulRegion < 8); + ASSERT(pulAddr); + ASSERT(pulFlags); + + // + // Select the region to get. + // + HWREG(NVIC_MPU_NUMBER) = ulRegion; + + // + // Read and store the base address for the region. + // + *pulAddr = HWREG(NVIC_MPU_BASE); + + // + // Read and store the region attributes. + // + *pulFlags = HWREG(NVIC_MPU_ATTR); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the memory management fault. +//! +//! \param pfnHandler is a pointer to the function to be called when the +//! memory management fault occurs. +//! +//! This sets and enables the handler to be called when the MPU generates +//! a memory management fault due to a protection region access violation. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUIntRegister(void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(pfnHandler); + + // + // Register the interrupt handler. + // + IntRegister(FAULT_MPU, pfnHandler); + + // + // Enable the memory management fault. + // + IntEnable(FAULT_MPU); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the memory management fault. +//! +//! This function will disable and clear the handler to be called when a +//! memory management fault occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +MPUIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(FAULT_MPU); + + // + // Unregister the interrupt handler. + // + IntUnregister(FAULT_MPU); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.h new file mode 100644 index 00000000..744be354 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/mpu.h @@ -0,0 +1,147 @@ +//***************************************************************************** +// +// mpu.h - Defines and Macros for the memory protection unit. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __MPU_H__ +#define __MPU_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Flags that can be passed to MPUEnable. +// +//***************************************************************************** +#define MPU_CONFIG_PRIV_DEFAULT 4 +#define MPU_CONFIG_HARDFLT_NMI 2 +#define MPU_CONFIG_NONE 0 + +//***************************************************************************** +// +// Flags for the region size to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_SIZE_32B (4 << 1) +#define MPU_RGN_SIZE_64B (5 << 1) +#define MPU_RGN_SIZE_128B (6 << 1) +#define MPU_RGN_SIZE_256B (7 << 1) +#define MPU_RGN_SIZE_512B (8 << 1) + +#define MPU_RGN_SIZE_1K (9 << 1) +#define MPU_RGN_SIZE_2K (10 << 1) +#define MPU_RGN_SIZE_4K (11 << 1) +#define MPU_RGN_SIZE_8K (12 << 1) +#define MPU_RGN_SIZE_16K (13 << 1) +#define MPU_RGN_SIZE_32K (14 << 1) +#define MPU_RGN_SIZE_64K (15 << 1) +#define MPU_RGN_SIZE_128K (16 << 1) +#define MPU_RGN_SIZE_256K (17 << 1) +#define MPU_RGN_SIZE_512K (18 << 1) + +#define MPU_RGN_SIZE_1M (19 << 1) +#define MPU_RGN_SIZE_2M (20 << 1) +#define MPU_RGN_SIZE_4M (21 << 1) +#define MPU_RGN_SIZE_8M (22 << 1) +#define MPU_RGN_SIZE_16M (23 << 1) +#define MPU_RGN_SIZE_32M (24 << 1) +#define MPU_RGN_SIZE_64M (25 << 1) +#define MPU_RGN_SIZE_128M (26 << 1) +#define MPU_RGN_SIZE_256M (27 << 1) +#define MPU_RGN_SIZE_512M (28 << 1) + +#define MPU_RGN_SIZE_1G (29 << 1) +#define MPU_RGN_SIZE_2G (30 << 1) +#define MPU_RGN_SIZE_4G (31 << 1) + +//***************************************************************************** +// +// Flags for the permissions to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_PERM_EXEC 0x00000000 +#define MPU_RGN_PERM_NOEXEC 0x10000000 +#define MPU_RGN_PERM_PRV_NO_USR_NO 0x00000000 +#define MPU_RGN_PERM_PRV_RW_USR_NO 0x01000000 +#define MPU_RGN_PERM_PRV_RW_USR_RO 0x02000000 +#define MPU_RGN_PERM_PRV_RW_USR_RW 0x03000000 +#define MPU_RGN_PERM_PRV_RO_USR_NO 0x05000000 +#define MPU_RGN_PERM_PRV_RO_USR_RO 0x06000000 + +//***************************************************************************** +// +// Flags for the sub-region to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_SUB_RGN_DISABLE_0 0x00000100 +#define MPU_SUB_RGN_DISABLE_1 0x00000200 +#define MPU_SUB_RGN_DISABLE_2 0x00000400 +#define MPU_SUB_RGN_DISABLE_3 0x00000800 +#define MPU_SUB_RGN_DISABLE_4 0x00001000 +#define MPU_SUB_RGN_DISABLE_5 0x00002000 +#define MPU_SUB_RGN_DISABLE_6 0x00004000 +#define MPU_SUB_RGN_DISABLE_7 0x00008000 + +//***************************************************************************** +// +// Flags to enable or disable a region, to be passed to MPURegionSet. +// +//***************************************************************************** +#define MPU_RGN_ENABLE 1 +#define MPU_RGN_DISABLE 0 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void MPUEnable(unsigned long ulMPUConfig); +extern void MPUDisable(void); +extern unsigned long MPURegionCountGet(void); +extern void MPURegionEnable(unsigned long ulRegion); +extern void MPURegionDisable(unsigned long ulRegion); +extern void MPURegionSet(unsigned long ulRegion, unsigned long ulAddr, + unsigned long ulFlags); +extern void MPURegionGet(unsigned long ulRegion, unsigned long *pulAddr, + unsigned long *pulFlags); +extern void MPUIntRegister(void (*pfnHandler)(void)); +extern void MPUIntUnregister(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __MPU_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pin_map.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pin_map.h new file mode 100644 index 00000000..d946c355 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pin_map.h @@ -0,0 +1,20413 @@ +//***************************************************************************** +// +// pin_map.h - Mapping of peripherals to pins for all parts. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __PIN_MAP_H__ +#define __PIN_MAP_H__ + +//***************************************************************************** +// +// LM3S101 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S101 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define 32KHZ_PERIPH (SYSCTL_PERIPH_GPIOB) +#define 32KHZ_PORT (GPIO_PORTB_BASE) +#define 32KHZ_PIN (GPIO_PIN_1) + +#endif // PART_LM3S101 + +//***************************************************************************** +// +// LM3S102 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S102 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define 32KHZ_PERIPH (SYSCTL_PERIPH_GPIOB) +#define 32KHZ_PORT (GPIO_PORTB_BASE) +#define 32KHZ_PIN (GPIO_PIN_1) + +#endif // PART_LM3S102 + +//***************************************************************************** +// +// LM3S300 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S300 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S300 + +//***************************************************************************** +// +// LM3S301 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S301 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S301 + +//***************************************************************************** +// +// LM3S308 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S308 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S308 + +//***************************************************************************** +// +// LM3S310 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S310 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S310 + +//***************************************************************************** +// +// LM3S315 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S315 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S315 + +//***************************************************************************** +// +// LM3S316 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S316 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S316 + +//***************************************************************************** +// +// LM3S317 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S317 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S317 + +//***************************************************************************** +// +// LM3S328 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S328 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S328 + +//***************************************************************************** +// +// LM3S600 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S600 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S600 + +//***************************************************************************** +// +// LM3S601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX_PORT (GPIO_PORTD_BASE) +#define IDX_PIN (GPIO_PIN_7) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S601 + +//***************************************************************************** +// +// LM3S608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S608 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S608 + +//***************************************************************************** +// +// LM3S610 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S610 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S610 + +//***************************************************************************** +// +// LM3S611 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S611 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S611 + +//***************************************************************************** +// +// LM3S612 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S612 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S612 + +//***************************************************************************** +// +// LM3S613 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S613 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S613 + +//***************************************************************************** +// +// LM3S615 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S615 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S615 + +//***************************************************************************** +// +// LM3S617 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S617 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S617 + +//***************************************************************************** +// +// LM3S618 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S618 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX_PORT (GPIO_PORTB_BASE) +#define IDX_PIN (GPIO_PIN_2) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S618 + +//***************************************************************************** +// +// LM3S628 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S628 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S628 + +//***************************************************************************** +// +// LM3S800 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S800 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S800 + +//***************************************************************************** +// +// LM3S801 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S801 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX_PORT (GPIO_PORTD_BASE) +#define IDX_PIN (GPIO_PIN_7) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S801 + +//***************************************************************************** +// +// LM3S808 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S808 + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S808 + +//***************************************************************************** +// +// LM3S811 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S811 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S811 + +//***************************************************************************** +// +// LM3S812 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S812 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S812 + +//***************************************************************************** +// +// LM3S815 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S815 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S815 + +//***************************************************************************** +// +// LM3S817 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S817 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S817 + +//***************************************************************************** +// +// LM3S818 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S818 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX_PORT (GPIO_PORTB_BASE) +#define IDX_PIN (GPIO_PIN_2) + +#define PHA_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA_PORT (GPIO_PORTC_BASE) +#define PHA_PIN (GPIO_PIN_4) + +#define PHB_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB_PORT (GPIO_PORTC_BASE) +#define PHB_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S818 + +//***************************************************************************** +// +// LM3S828 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S828 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2CSCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSCL_PORT (GPIO_PORTB_BASE) +#define I2CSCL_PIN (GPIO_PIN_2) + +#define I2CSDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2CSDA_PORT (GPIO_PORTB_BASE) +#define I2CSDA_PIN (GPIO_PIN_3) + +#define SSICLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSICLK_PORT (GPIO_PORTA_BASE) +#define SSICLK_PIN (GPIO_PIN_2) + +#define SSIFSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIFSS_PORT (GPIO_PORTA_BASE) +#define SSIFSS_PIN (GPIO_PIN_3) + +#define SSIRX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSIRX_PORT (GPIO_PORTA_BASE) +#define SSIRX_PIN (GPIO_PIN_4) + +#define SSITX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSITX_PORT (GPIO_PORTA_BASE) +#define SSITX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S828 + +//***************************************************************************** +// +// LM3S1110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1110 + +//***************************************************************************** +// +// LM3S1133 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1133 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1133 + +//***************************************************************************** +// +// LM3S1138 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1138 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1138 + +//***************************************************************************** +// +// LM3S1150 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1150 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1150 + +//***************************************************************************** +// +// LM3S1162 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1162 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1162 + +//***************************************************************************** +// +// LM3S1165 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1165 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP6_PORT (GPIO_PORTB_BASE) +#define CCP6_PIN (GPIO_PIN_5) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1165 + +//***************************************************************************** +// +// LM3S1332 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1332 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1332 + +//***************************************************************************** +// +// LM3S1435 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1435 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1435 + +//***************************************************************************** +// +// LM3S1439 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1439 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1439 + +//***************************************************************************** +// +// LM3S1512 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1512 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP4_PORT (GPIO_PORTD_BASE) +#define CCP4_PIN (GPIO_PIN_5) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1512 + +//***************************************************************************** +// +// LM3S1538 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1538 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1538 + +//***************************************************************************** +// +// LM3S1601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1601 + +//***************************************************************************** +// +// LM3S1607 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1607 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_1) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_0) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U2RX_PORT (GPIO_PORTB_BASE) +#define U2RX_PIN (GPIO_PIN_4) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define U2TX_PORT (GPIO_PORTE_BASE) +#define U2TX_PIN (GPIO_PIN_4) + +#endif // PART_LM3S1607 + +//***************************************************************************** +// +// LM3S1608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1608 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1608 + +//***************************************************************************** +// +// LM3S1620 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1620 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1620 + +//***************************************************************************** +// +// LM3S1625 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1625 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1625 + +//***************************************************************************** +// +// LM3S1626 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1626 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_4) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_5) + +#endif // PART_LM3S1626 + +//***************************************************************************** +// +// LM3S1627 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1627 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_4) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1627 + +//***************************************************************************** +// +// LM3S1635 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1635 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1635 + +//***************************************************************************** +// +// LM3S1637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1637 + +//***************************************************************************** +// +// LM3S1751 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1751 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1751 + +//***************************************************************************** +// +// LM3S1776 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1776 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1776 + +//***************************************************************************** +// +// LM3S1850 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1850 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1850 + +//***************************************************************************** +// +// LM3S1911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1911 + +//***************************************************************************** +// +// LM3S1918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1918 + +//***************************************************************************** +// +// LM3S1937 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1937 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S1937 + +//***************************************************************************** +// +// LM3S1958 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1958 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1958 + +//***************************************************************************** +// +// LM3S1960 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1960 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOH) +#define IDX1_PORT (GPIO_PORTH_BASE) +#define IDX1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1960 + +//***************************************************************************** +// +// LM3S1968 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S1968 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT_PORT (GPIO_PORTH_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S1968 + +//***************************************************************************** +// +// LM3S2016 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2016 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2016 + +//***************************************************************************** +// +// LM3S2110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2110 + +//***************************************************************************** +// +// LM3S2139 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2139 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2139 + +//***************************************************************************** +// +// LM3S2276 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2276 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2276 + +//***************************************************************************** +// +// LM3S2410 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2410 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2410 + +//***************************************************************************** +// +// LM3S2412 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2412 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2412 + +//***************************************************************************** +// +// LM3S2432 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2432 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2432 + +//***************************************************************************** +// +// LM3S2533 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2533 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2533 + +//***************************************************************************** +// +// LM3S2601 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2601 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2601 + +//***************************************************************************** +// +// LM3S2608 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2608 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2608 + +//***************************************************************************** +// +// LM3S2616 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2616 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0RX_PORT (GPIO_PORTA_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0TX_PORT (GPIO_PORTA_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2616 + +//***************************************************************************** +// +// LM3S2620 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2620 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C2O_PORT (GPIO_PORTE_BASE) +#define C2O_PIN (GPIO_PIN_7) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2620 + +//***************************************************************************** +// +// LM3S2637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2637 + +//***************************************************************************** +// +// LM3S2651 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2651 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2651 + +//***************************************************************************** +// +// LM3S2671 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2671 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_5) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2671 + +//***************************************************************************** +// +// LM3S2678 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2678 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_1) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP1_PORT (GPIO_PORTC_BASE) +#define CCP1_PIN (GPIO_PIN_5) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_2) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM0_PORT (GPIO_PORTA_BASE) +#define PWM0_PIN (GPIO_PIN_6) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM1_PORT (GPIO_PORTA_BASE) +#define PWM1_PIN (GPIO_PIN_7) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2678 + +//***************************************************************************** +// +// LM3S2730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2730 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2730 + +//***************************************************************************** +// +// LM3S2739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2739 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2739 + +//***************************************************************************** +// +// LM3S2776 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2776 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT1_PORT (GPIO_PORTB_BASE) +#define FAULT1_PIN (GPIO_PIN_6) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define FAULT2_PORT (GPIO_PORTC_BASE) +#define FAULT2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM6_PORT (GPIO_PORTC_BASE) +#define PWM6_PIN (GPIO_PIN_4) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PWM7_PORT (GPIO_PORTC_BASE) +#define PWM7_PIN (GPIO_PIN_6) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2776 + +//***************************************************************************** +// +// LM3S2911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2911 + +//***************************************************************************** +// +// LM3S2918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S2918 + +//***************************************************************************** +// +// LM3S2939 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2939 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2939 + +//***************************************************************************** +// +// LM3S2948 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2948 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2948 + +//***************************************************************************** +// +// LM3S2950 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2950 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C2O_PORT (GPIO_PORTF_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP5_PORT (GPIO_PORTE_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_3) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2950 + +//***************************************************************************** +// +// LM3S2965 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S2965 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP4_PORT (GPIO_PORTD_BASE) +#define CCP4_PIN (GPIO_PIN_5) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP5_PORT (GPIO_PORTG_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOH) +#define IDX1_PORT (GPIO_PORTH_BASE) +#define IDX1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHA1_PORT (GPIO_PORTG_BASE) +#define PHA1_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PHB0_PORT (GPIO_PORTH_BASE) +#define PHB0_PIN (GPIO_PIN_3) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PHB1_PORT (GPIO_PORTG_BASE) +#define PHB1_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_2) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_3) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S2965 + +//***************************************************************************** +// +// LM3S3651 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3651 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_7) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP6_PORT (GPIO_PORTD_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S3651 + +//***************************************************************************** +// +// LM3S3739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3739 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3739 + +//***************************************************************************** +// +// LM3S3748 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3748 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP2_PORT (GPIO_PORTF_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_4) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP7_PORT (GPIO_PORTH_BASE) +#define CCP7_PIN (GPIO_PIN_1) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define FAULT0_PORT (GPIO_PORTF_BASE) +#define FAULT0_PIN (GPIO_PIN_4) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_5) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM2_PORT (GPIO_PORTF_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM3_PORT (GPIO_PORTF_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM4_PORT (GPIO_PORTG_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM5_PORT (GPIO_PORTG_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOC) +#define U1RX_PORT (GPIO_PORTC_BASE) +#define U1RX_PIN (GPIO_PIN_6) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOC) +#define U1TX_PORT (GPIO_PORTC_BASE) +#define U1TX_PIN (GPIO_PIN_7) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3748 + +//***************************************************************************** +// +// LM3S3749 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S3749 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_7) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_3) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP2_PORT (GPIO_PORTF_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP4_PORT (GPIO_PORTF_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP6_PORT (GPIO_PORTD_BASE) +#define CCP6_PIN (GPIO_PIN_2) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT0_PORT (GPIO_PORTG_BASE) +#define FAULT0_PIN (GPIO_PIN_2) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_4) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SDA_PORT (GPIO_PORTG_BASE) +#define I2C1SDA_PIN (GPIO_PIN_1) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define IDX0_PORT (GPIO_PORTG_BASE) +#define IDX0_PIN (GPIO_PIN_5) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHA0_PORT (GPIO_PORTF_BASE) +#define PHA0_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S3749 + +//***************************************************************************** +// +// LM3S5632 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5632 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5632 + +//***************************************************************************** +// +// LM3S5652 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5652 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP2_PORT (GPIO_PORTE_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5652 + +//***************************************************************************** +// +// LM3S5662 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5662 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_2) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5662 + +//***************************************************************************** +// +// LM3S5732 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5732 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5732 + +//***************************************************************************** +// +// LM3S5737 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5737 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5737 + +//***************************************************************************** +// +// LM3S5739 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5739 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0RX_PORT (GPIO_PORTA_BASE) +#define CAN0RX_PIN (GPIO_PIN_6) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CAN0TX_PORT (GPIO_PORTA_BASE) +#define CAN0TX_PIN (GPIO_PIN_7) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP0_PORT (GPIO_PORTC_BASE) +#define CCP0_PIN (GPIO_PIN_6) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CCP1_PORT (GPIO_PORTF_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOG) +#define CCP3_PORT (GPIO_PORTG_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP5_PORT (GPIO_PORTD_BASE) +#define CCP5_PIN (GPIO_PIN_2) + +#define CCP6_PERIPH (SYSCTL_PERIPH_GPIOH) +#define CCP6_PORT (GPIO_PORTH_BASE) +#define CCP6_PIN (GPIO_PIN_0) + +#define CCP7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP7_PORT (GPIO_PORTD_BASE) +#define CCP7_PIN (GPIO_PIN_3) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SDA_PORT (GPIO_PORTG_BASE) +#define I2C1SDA_PIN (GPIO_PIN_1) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1RX_PORT (GPIO_PORTB_BASE) +#define U1RX_PIN (GPIO_PIN_0) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define U1TX_PORT (GPIO_PORTB_BASE) +#define U1TX_PIN (GPIO_PIN_1) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2RX_PORT (GPIO_PORTD_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U2TX_PORT (GPIO_PORTD_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S5739 + +//***************************************************************************** +// +// LM3S5747 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5747 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT0_PORT (GPIO_PORTE_BASE) +#define FAULT0_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#endif // PART_LM3S5747 + +//***************************************************************************** +// +// LM3S5749 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5749 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_7) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_6) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_5) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_4) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_7) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_6) + +#define ADC6_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC6_PORT (GPIO_PORTD_BASE) +#define ADC6_PIN (GPIO_PIN_5) + +#define ADC7_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC7_PORT (GPIO_PORTD_BASE) +#define ADC7_PIN (GPIO_PIN_4) + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C0O_PORT (GPIO_PORTF_BASE) +#define C0O_PIN (GPIO_PIN_4) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOF) +#define C1O_PORT (GPIO_PORTF_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_1) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT0_PORT (GPIO_PORTG_BASE) +#define FAULT0_PIN (GPIO_PIN_2) + +#define FAULT1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT1_PORT (GPIO_PORTG_BASE) +#define FAULT1_PIN (GPIO_PIN_4) + +#define FAULT2_PERIPH (SYSCTL_PERIPH_GPIOG) +#define FAULT2_PORT (GPIO_PORTG_BASE) +#define FAULT2_PIN (GPIO_PIN_3) + +#define FAULT3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define FAULT3_PORT (GPIO_PORTH_BASE) +#define FAULT3_PIN (GPIO_PIN_2) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define IDX0_PORT (GPIO_PORTG_BASE) +#define IDX0_PIN (GPIO_PIN_5) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHA0_PORT (GPIO_PORTF_BASE) +#define PHA0_PIN (GPIO_PIN_6) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM0_PORT (GPIO_PORTG_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM2_PORT (GPIO_PORTH_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOH) +#define PWM3_PORT (GPIO_PORTH_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM4_PORT (GPIO_PORTF_BASE) +#define PWM4_PIN (GPIO_PIN_2) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM5_PORT (GPIO_PORTF_BASE) +#define PWM5_PIN (GPIO_PIN_3) + +#define PWM6_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM6_PORT (GPIO_PORTG_BASE) +#define PWM6_PIN (GPIO_PIN_6) + +#define PWM7_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM7_PORT (GPIO_PORTG_BASE) +#define PWM7_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0EPEN_PORT (GPIO_PORTH_BASE) +#define USB0EPEN_PIN (GPIO_PIN_3) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOH) +#define USB0PFLT_PORT (GPIO_PORTH_BASE) +#define USB0PFLT_PIN (GPIO_PIN_4) + +#endif // PART_LM3S5749 + +//***************************************************************************** +// +// LM3S5752 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5752 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define ADC4_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC4_PORT (GPIO_PORTD_BASE) +#define ADC4_PIN (GPIO_PIN_3) + +#define ADC5_PERIPH (SYSCTL_PERIPH_GPIOD) +#define ADC5_PORT (GPIO_PORTD_BASE) +#define ADC5_PIN (GPIO_PIN_2) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_5) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP2_PORT (GPIO_PORTE_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP3_PORT (GPIO_PORTA_BASE) +#define CCP3_PIN (GPIO_PIN_7) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5752 + +//***************************************************************************** +// +// LM3S5762 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S5762 + +#define ADC0_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC0_PORT (GPIO_PORTE_BASE) +#define ADC0_PIN (GPIO_PIN_3) + +#define ADC1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC1_PORT (GPIO_PORTE_BASE) +#define ADC1_PIN (GPIO_PIN_2) + +#define ADC2_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC2_PORT (GPIO_PORTE_BASE) +#define ADC2_PIN (GPIO_PIN_1) + +#define ADC3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define ADC3_PORT (GPIO_PORTE_BASE) +#define ADC3_PIN (GPIO_PIN_0) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0RX_PORT (GPIO_PORTB_BASE) +#define CAN0RX_PIN (GPIO_PIN_4) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CAN0TX_PORT (GPIO_PORTB_BASE) +#define CAN0TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_2) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP1_PORT (GPIO_PORTB_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP2_PORT (GPIO_PORTC_BASE) +#define CCP2_PIN (GPIO_PIN_4) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT0_PORT (GPIO_PORTB_BASE) +#define FAULT0_PIN (GPIO_PIN_3) + +#define NMI_PERIPH (SYSCTL_PERIPH_GPIOB) +#define NMI_PORT (GPIO_PORTB_BASE) +#define NMI_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM4_PORT (GPIO_PORTA_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOA) +#define PWM5_PORT (GPIO_PORTA_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define USB0EPEN_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0EPEN_PORT (GPIO_PORTC_BASE) +#define USB0EPEN_PIN (GPIO_PIN_5) + +#define USB0ID_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0ID_PORT (GPIO_PORTB_BASE) +#define USB0ID_PIN (GPIO_PIN_0) + +#define USB0PFLT_PERIPH (SYSCTL_PERIPH_GPIOC) +#define USB0PFLT_PORT (GPIO_PORTC_BASE) +#define USB0PFLT_PIN (GPIO_PIN_6) + +#define USB0VBUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define USB0VBUS_PORT (GPIO_PORTB_BASE) +#define USB0VBUS_PIN (GPIO_PIN_1) + +#endif // PART_LM3S5762 + +//***************************************************************************** +// +// LM3S6100 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6100 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6100 + +//***************************************************************************** +// +// LM3S6110 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6110 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6110 + +//***************************************************************************** +// +// LM3S6420 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6420 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6420 + +//***************************************************************************** +// +// LM3S6422 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6422 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6422 + +//***************************************************************************** +// +// LM3S6432 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6432 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6432 + +//***************************************************************************** +// +// LM3S6537 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6537 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6537 + +//***************************************************************************** +// +// LM3S6610 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6610 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C2O_PORT (GPIO_PORTE_BASE) +#define C2O_PIN (GPIO_PIN_7) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6610 + +//***************************************************************************** +// +// LM3S6611 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6611 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6611 + +//***************************************************************************** +// +// LM3S6618 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6618 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6618 + +//***************************************************************************** +// +// LM3S6633 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6633 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6633 + +//***************************************************************************** +// +// LM3S6637 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6637 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6637 + +//***************************************************************************** +// +// LM3S6730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6730 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6730 + +//***************************************************************************** +// +// LM3S6753 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6753 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6753 + +//***************************************************************************** +// +// LM3S6816 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6816 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT_PORT (GPIO_PORTE_BASE) +#define FAULT_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6816 + +//***************************************************************************** +// +// LM3S6911 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6911 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOE) +#define C1O_PORT (GPIO_PORTE_BASE) +#define C1O_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6911 + +//***************************************************************************** +// +// LM3S6916 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6916 + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOE) +#define FAULT_PORT (GPIO_PORTE_BASE) +#define FAULT_PIN (GPIO_PIN_1) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6916 + +//***************************************************************************** +// +// LM3S6918 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6918 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP4_PORT (GPIO_PORTC_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOG) +#define I2C1SCL_PORT (GPIO_PORTG_BASE) +#define I2C1SCL_PIN (GPIO_PIN_0) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S6918 + +//***************************************************************************** +// +// LM3S6938 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6938 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6938 + +//***************************************************************************** +// +// LM3S6950 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6950 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PHA0_PORT (GPIO_PORTD_BASE) +#define PHA0_PIN (GPIO_PIN_1) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_6) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_7) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6950 + +//***************************************************************************** +// +// LM3S6952 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6952 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PHB0_PORT (GPIO_PORTF_BASE) +#define PHB0_PIN (GPIO_PIN_0) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM0_PORT (GPIO_PORTD_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6952 + +//***************************************************************************** +// +// LM3S6965 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S6965 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP1_PORT (GPIO_PORTD_BASE) +#define CCP1_PIN (GPIO_PIN_7) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP2_PORT (GPIO_PORTD_BASE) +#define CCP2_PIN (GPIO_PIN_5) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_0) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHA1_PORT (GPIO_PORTE_BASE) +#define PHA1_PIN (GPIO_PIN_3) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHB1_PORT (GPIO_PORTE_BASE) +#define PHB1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM1_PORT (GPIO_PORTD_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S6965 + +//***************************************************************************** +// +// LM3S8530 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8530 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CAN2RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2RX_PORT (GPIO_PORTE_BASE) +#define CAN2RX_PIN (GPIO_PIN_4) + +#define CAN2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2TX_PORT (GPIO_PORTE_BASE) +#define CAN2TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8530 + +//***************************************************************************** +// +// LM3S8538 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8538 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8538 + +//***************************************************************************** +// +// LM3S8630 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8630 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8630 + +//***************************************************************************** +// +// LM3S8730 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8730 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8730 + +//***************************************************************************** +// +// LM3S8733 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8733 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8733 + +//***************************************************************************** +// +// LM3S8738 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8738 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8738 + +//***************************************************************************** +// +// LM3S8930 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8930 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8930 + +//***************************************************************************** +// +// LM3S8933 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8933 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOD) +#define C0O_PORT (GPIO_PORTD_BASE) +#define C0O_PIN (GPIO_PIN_7) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP3_PORT (GPIO_PORTD_BASE) +#define CCP3_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8933 + +//***************************************************************************** +// +// LM3S8938 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8938 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_6) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define C1O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1O_PORT (GPIO_PORTC_BASE) +#define C1O_PIN (GPIO_PIN_5) + +#define C1_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C1_MINUS_PORT (GPIO_PORTB_BASE) +#define C1_MINUS_PIN (GPIO_PIN_5) + +#define C1_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C1_PLUS_PORT (GPIO_PORTC_BASE) +#define C1_PLUS_PIN (GPIO_PIN_5) + +#define C2O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2O_PORT (GPIO_PORTC_BASE) +#define C2O_PIN (GPIO_PIN_6) + +#define C2_MINUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_MINUS_PORT (GPIO_PORTC_BASE) +#define C2_MINUS_PIN (GPIO_PIN_7) + +#define C2_PLUS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C2_PLUS_PORT (GPIO_PORTC_BASE) +#define C2_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP1_PORT (GPIO_PORTE_BASE) +#define CCP1_PIN (GPIO_PIN_3) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP3_PORT (GPIO_PORTE_BASE) +#define CCP3_PIN (GPIO_PIN_0) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CCP4_PORT (GPIO_PORTE_BASE) +#define CCP4_PIN (GPIO_PIN_2) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP5_PORT (GPIO_PORTC_BASE) +#define CCP5_PIN (GPIO_PIN_4) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define I2C1SCL_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SCL_PORT (GPIO_PORTA_BASE) +#define I2C1SCL_PIN (GPIO_PIN_6) + +#define I2C1SDA_PERIPH (SYSCTL_PERIPH_GPIOA) +#define I2C1SDA_PORT (GPIO_PORTA_BASE) +#define I2C1SDA_PIN (GPIO_PIN_7) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#define U2RX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2RX_PORT (GPIO_PORTG_BASE) +#define U2RX_PIN (GPIO_PIN_0) + +#define U2TX_PERIPH (SYSCTL_PERIPH_GPIOG) +#define U2TX_PORT (GPIO_PORTG_BASE) +#define U2TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8938 + +//***************************************************************************** +// +// LM3S8962 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8962 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0O_PORT (GPIO_PORTB_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CCP0_PORT (GPIO_PORTD_BASE) +#define CCP0_PIN (GPIO_PIN_4) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOD) +#define FAULT_PORT (GPIO_PORTD_BASE) +#define FAULT_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOD) +#define IDX0_PORT (GPIO_PORTD_BASE) +#define IDX0_PIN (GPIO_PIN_7) + +#define IDX1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define IDX1_PORT (GPIO_PORTF_BASE) +#define IDX1_PIN (GPIO_PIN_1) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHA1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHA1_PORT (GPIO_PORTE_BASE) +#define PHA1_PIN (GPIO_PIN_3) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_6) + +#define PHB1_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PHB1_PORT (GPIO_PORTE_BASE) +#define PHB1_PIN (GPIO_PIN_2) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOG) +#define PWM1_PORT (GPIO_PORTG_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM2_PORT (GPIO_PORTB_BASE) +#define PWM2_PIN (GPIO_PIN_0) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOB) +#define PWM3_PORT (GPIO_PORTB_BASE) +#define PWM3_PIN (GPIO_PIN_1) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8962 + +//***************************************************************************** +// +// LM3S8970 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8970 + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CAN1RX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1RX_PORT (GPIO_PORTF_BASE) +#define CAN1RX_PIN (GPIO_PIN_0) + +#define CAN1TX_PERIPH (SYSCTL_PERIPH_GPIOF) +#define CAN1TX_PORT (GPIO_PORTF_BASE) +#define CAN1TX_PIN (GPIO_PIN_1) + +#define CAN2RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2RX_PORT (GPIO_PORTE_BASE) +#define CAN2RX_PIN (GPIO_PIN_4) + +#define CAN2TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define CAN2TX_PORT (GPIO_PORTE_BASE) +#define CAN2TX_PIN (GPIO_PIN_5) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define I2C0SCL_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SCL_PORT (GPIO_PORTB_BASE) +#define I2C0SCL_PIN (GPIO_PIN_2) + +#define I2C0SDA_PERIPH (SYSCTL_PERIPH_GPIOB) +#define I2C0SDA_PORT (GPIO_PORTB_BASE) +#define I2C0SDA_PIN (GPIO_PIN_3) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SSI1CLK_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1CLK_PORT (GPIO_PORTE_BASE) +#define SSI1CLK_PIN (GPIO_PIN_0) + +#define SSI1FSS_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1FSS_PORT (GPIO_PORTE_BASE) +#define SSI1FSS_PIN (GPIO_PIN_1) + +#define SSI1RX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1RX_PORT (GPIO_PORTE_BASE) +#define SSI1RX_PIN (GPIO_PIN_2) + +#define SSI1TX_PERIPH (SYSCTL_PERIPH_GPIOE) +#define SSI1TX_PORT (GPIO_PORTE_BASE) +#define SSI1TX_PIN (GPIO_PIN_3) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#define U1RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1RX_PORT (GPIO_PORTD_BASE) +#define U1RX_PIN (GPIO_PIN_2) + +#define U1TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define U1TX_PORT (GPIO_PORTD_BASE) +#define U1TX_PIN (GPIO_PIN_3) + +#endif // PART_LM3S8970 + +//***************************************************************************** +// +// LM3S8971 Port/Pin Mapping Definitions +// +//***************************************************************************** +#ifdef PART_LM3S8971 + +#define C0O_PERIPH (SYSCTL_PERIPH_GPIOC) +#define C0O_PORT (GPIO_PORTC_BASE) +#define C0O_PIN (GPIO_PIN_5) + +#define C0_MINUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_MINUS_PORT (GPIO_PORTB_BASE) +#define C0_MINUS_PIN (GPIO_PIN_4) + +#define C0_PLUS_PERIPH (SYSCTL_PERIPH_GPIOB) +#define C0_PLUS_PORT (GPIO_PORTB_BASE) +#define C0_PLUS_PIN (GPIO_PIN_6) + +#define CAN0RX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0RX_PORT (GPIO_PORTD_BASE) +#define CAN0RX_PIN (GPIO_PIN_0) + +#define CAN0TX_PERIPH (SYSCTL_PERIPH_GPIOD) +#define CAN0TX_PORT (GPIO_PORTD_BASE) +#define CAN0TX_PIN (GPIO_PIN_1) + +#define CCP0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP0_PORT (GPIO_PORTB_BASE) +#define CCP0_PIN (GPIO_PIN_0) + +#define CCP1_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP1_PORT (GPIO_PORTA_BASE) +#define CCP1_PIN (GPIO_PIN_6) + +#define CCP2_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP2_PORT (GPIO_PORTB_BASE) +#define CCP2_PIN (GPIO_PIN_1) + +#define CCP3_PERIPH (SYSCTL_PERIPH_GPIOC) +#define CCP3_PORT (GPIO_PORTC_BASE) +#define CCP3_PIN (GPIO_PIN_6) + +#define CCP4_PERIPH (SYSCTL_PERIPH_GPIOA) +#define CCP4_PORT (GPIO_PORTA_BASE) +#define CCP4_PIN (GPIO_PIN_7) + +#define CCP5_PERIPH (SYSCTL_PERIPH_GPIOB) +#define CCP5_PORT (GPIO_PORTB_BASE) +#define CCP5_PIN (GPIO_PIN_5) + +#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOB) +#define FAULT_PORT (GPIO_PORTB_BASE) +#define FAULT_PIN (GPIO_PIN_3) + +#define IDX0_PERIPH (SYSCTL_PERIPH_GPIOB) +#define IDX0_PORT (GPIO_PORTB_BASE) +#define IDX0_PIN (GPIO_PIN_2) + +#define LED0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED0_PORT (GPIO_PORTF_BASE) +#define LED0_PIN (GPIO_PIN_3) + +#define LED1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define LED1_PORT (GPIO_PORTF_BASE) +#define LED1_PIN (GPIO_PIN_2) + +#define PHA0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHA0_PORT (GPIO_PORTC_BASE) +#define PHA0_PIN (GPIO_PIN_4) + +#define PHB0_PERIPH (SYSCTL_PERIPH_GPIOC) +#define PHB0_PORT (GPIO_PORTC_BASE) +#define PHB0_PIN (GPIO_PIN_7) + +#define PWM0_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM0_PORT (GPIO_PORTF_BASE) +#define PWM0_PIN (GPIO_PIN_0) + +#define PWM1_PERIPH (SYSCTL_PERIPH_GPIOF) +#define PWM1_PORT (GPIO_PORTF_BASE) +#define PWM1_PIN (GPIO_PIN_1) + +#define PWM2_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM2_PORT (GPIO_PORTD_BASE) +#define PWM2_PIN (GPIO_PIN_2) + +#define PWM3_PERIPH (SYSCTL_PERIPH_GPIOD) +#define PWM3_PORT (GPIO_PORTD_BASE) +#define PWM3_PIN (GPIO_PIN_3) + +#define PWM4_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM4_PORT (GPIO_PORTE_BASE) +#define PWM4_PIN (GPIO_PIN_0) + +#define PWM5_PERIPH (SYSCTL_PERIPH_GPIOE) +#define PWM5_PORT (GPIO_PORTE_BASE) +#define PWM5_PIN (GPIO_PIN_1) + +#define SSI0CLK_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0CLK_PORT (GPIO_PORTA_BASE) +#define SSI0CLK_PIN (GPIO_PIN_2) + +#define SSI0FSS_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0FSS_PORT (GPIO_PORTA_BASE) +#define SSI0FSS_PIN (GPIO_PIN_3) + +#define SSI0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0RX_PORT (GPIO_PORTA_BASE) +#define SSI0RX_PIN (GPIO_PIN_4) + +#define SSI0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define SSI0TX_PORT (GPIO_PORTA_BASE) +#define SSI0TX_PIN (GPIO_PIN_5) + +#define SWCLK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWCLK_PORT (GPIO_PORTC_BASE) +#define SWCLK_PIN (GPIO_PIN_0) + +#define SWDIO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWDIO_PORT (GPIO_PORTC_BASE) +#define SWDIO_PIN (GPIO_PIN_1) + +#define SWO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define SWO_PORT (GPIO_PORTC_BASE) +#define SWO_PIN (GPIO_PIN_3) + +#define TCK_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TCK_PORT (GPIO_PORTC_BASE) +#define TCK_PIN (GPIO_PIN_0) + +#define TDI_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDI_PORT (GPIO_PORTC_BASE) +#define TDI_PIN (GPIO_PIN_2) + +#define TDO_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TDO_PORT (GPIO_PORTC_BASE) +#define TDO_PIN (GPIO_PIN_3) + +#define TMS_PERIPH (SYSCTL_PERIPH_GPIOC) +#define TMS_PORT (GPIO_PORTC_BASE) +#define TMS_PIN (GPIO_PIN_1) + +#define TRST_PERIPH (SYSCTL_PERIPH_GPIOB) +#define TRST_PORT (GPIO_PORTB_BASE) +#define TRST_PIN (GPIO_PIN_7) + +#define U0RX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0RX_PORT (GPIO_PORTA_BASE) +#define U0RX_PIN (GPIO_PIN_0) + +#define U0TX_PERIPH (SYSCTL_PERIPH_GPIOA) +#define U0TX_PORT (GPIO_PORTA_BASE) +#define U0TX_PIN (GPIO_PIN_1) + +#endif // PART_LM3S8971 + +//***************************************************************************** +// +// Pin Mapping Functions +// +// This section describes the code that is responsible for handling the +// mapping of peripheral functions to their physical location on the pins of +// a device. +// +//***************************************************************************** + +//***************************************************************************** +// +// Definitions to support mapping GPIO Ports and Pins to their function. +// +//***************************************************************************** + +//***************************************************************************** +// +// Configures the specified ADC pin to function as an ADC pin. +// +// \param ulName is one of the valid names for the ADC pins. +// +// This function takes on of the valid names for an ADC pin and configures +// the pin for its ADC functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b ADC0, \b ADC1, \b ADC2, +// \b ADC3, \b ADC4, \b ADC5, \b ADC6, or \b ADC7. +// +// \sa GPIOPinTypeADC() in order to configure multiple ADC pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeADC(ulName) GPIOPinTypeADC(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified CAN pin to function as a CAN pin. +// +// \param ulName is one of the valid names for the CAN pins. +// +// This function takes one of the valid names for a CAN pin and configures +// the pin for its CAN functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b CAN0RX, \b CAN0TX, +// \b CAN1RX, \b CAN1TX, \b CAN2RX, or \b CAN2TX. +// +// \sa GPIOPinTypeCAN() in order to configure multiple CAN pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeCAN(ulName) GPIOPinTypeCAN(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified comparator pin to function as a comparator pin. +// +// \param ulName is one of the valid names for the Comparator pins. +// +// This function takes one of the valid names for a comparator pin and +// configures the pin for its comparator functionality depending on the part +// that is defined. +// +// The valid names for the pins are as follows: \b C0_MINUS, \b C0_PLUS, +// \b C1_MINUS, \b C1_PLUS, \b C2_MINUS, or \b C2_PLUS. +// +// \sa GPIOPinTypeComparator() in order to configure multiple comparator pins +// at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeComparator(ulName) \ + GPIOPinTypeComparator(ulName##_PORT, \ + ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified I2C pin to function as an I2C pin. +// +// \param ulName is one of the valid names for the I2C pins. +// +// This function takes one of the valid names for an I2C pin and configures +// the pin for its I2C functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b I2C0SCL, \b I2C0SDA, +// \b I2C1SCL, or \b I2C1SDA. +// +// \sa GPIOPinTypeI2C() in order to configure multiple I2C pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeI2C(ulName) GPIOPinTypeI2C(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified PWM pin to function as a PWM pin. +// +// \param ulName is one of the valid names for the PWM pins. +// +// This function takes one of the valid names for a PWM pin and configures +// the pin for its PWM functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b PWM0, \b PWM1, \b PWM2, +// \b PWM3, \b PWM4, \b PWM5, or \b FAULT. +// +// \sa GPIOPinTypePWM() in order to configure multiple PWM pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypePWM(ulName) GPIOPinTypePWM(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified QEI pin to function as a QEI pin. +// +// \param ulName is one of the valid names for the QEI pins. +// +// This function takes one of the valid names for a QEI pin and configures +// the pin for its QEI functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b PHA0, \b PHB0, \b IDX0, +// \b PHA1, \b PHB1, or \b IDX1. +// +// \sa GPIOPinTypeQEI() in order to configure multiple QEI pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeQEI(ulName) GPIOPinTypeQEI(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified SSI pin to function as an SSI pin. +// +// \param ulName is one of the valid names for the SSI pins. +// +// This function takes one of the valid names for an SSI pin and configures +// the pin for its SSI functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b SSI0CLK, \b SSI0FSS, +// \b SSI0RX, \b SSI0TX, \b SSI1CLK, \b SSI1FSS, \b SSI1RX, or \b SSI1TX. +// +// \sa GPIOPinTypeSSI() in order to configure multiple SSI pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeSSI(ulName) GPIOPinTypeSSI(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified Timer pin to function as a Timer pin. +// +// \param ulName is one of the valid names for the Timer pins. +// +// This function takes one of the valid names for a Timer pin and configures +// the pin for its Timer functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b CCP0, \b CCP1, \b CCP2, +// \b CCP3, \b CCP4, \b CCP5, \b CCP6, or \b CCP7. +// +// \sa GPIOPinTypeTimer() in order to configure multiple CCP pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeTimer(ulName) GPIOPinTypeTimer(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +// Configures the specified UART pin to function as a UART pin. +// +// \param ulName is one of the valid names for the UART pins. +// +// This function takes one of the valid names for a UART pin and configures +// the pin for its UART functionality depending on the part that is defined. +// +// The valid names for the pins are as follows: \b U0RX, \b U0TX, \b U1RX, +// \b U1TX, \b U2RX, or \b U2TX. +// +// \sa GPIOPinTypeUART() in order to configure multiple UART pins at once. +// +// \return None. +// +//***************************************************************************** +#define PinTypeUART(ulName) GPIOPinTypeUART(ulName##_PORT, ulName##_PIN) + +//***************************************************************************** +// +//! Configures the specified USB digital pin to function as a USB pin. +//! +//! \param ulName is one of the valid names for a USB digital pin. +//! +//! This function takes one of the valid names for a USB digital pin and +//! configures the pin for its USB functionality depending on the part that is +//! defined. +//! +//! The valid names for the pins are as follows: \b EPEN or \b PFAULT. +//! +//! \sa GPIOPinTypeUSBDigital() in order to configure multiple USB pins at +//! once. +//! +//! \return None. +// +//***************************************************************************** +#define PinTypeUSBDigital(ulName) \ + GPIOPinTypeUSBDigital(ulName##_PORT, \ + ulName##_PIN) + +//***************************************************************************** +// +//! Enables the peripheral port used by the given pin. +//! +//! \param ulName is one of the valid names for a pin. +//! +//! This function takes one of the valid names for a pin function and +//! enables the peripheral port for that pin depending on the part that is +//! defined. +//! +//! Any valid pin name can be used. +//! +//! \sa SysCtlPeripheralEnable() in order to enable a single port when +//! multiple pins are on the same port. +//! +//! \return None. +// +//***************************************************************************** +#define PeripheralEnable(ulName) \ + SysCtlPeripheralEnable(ulName##_PERIPH) + +#endif // __PIN_MAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.c new file mode 100644 index 00000000..5f82c487 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.c @@ -0,0 +1,1748 @@ +//***************************************************************************** +// +// pwm.c - API for the PWM modules +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup pwm_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_pwm.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/pwm.h" + +//***************************************************************************** +// +// Misc macros for manipulating the encoded generator and output defines used +// by the API. +// +//***************************************************************************** +#define PWM_GEN_BADDR(_mod_, _gen_) \ + ((_mod_) + (_gen_)) +#define PWM_GEN_EXT_BADDR(_mod_, _gen_) \ + ((_mod_) + PWM_GEN_EXT_0 + \ + ((_gen_) - PWM_GEN_0) * 2) +#define PWM_OUT_BADDR(_mod_, _out_) \ + ((_mod_) + ((_out_) & 0xFFFFFFC0)) +#define PWM_IS_OUTPUT_ODD(_out_) \ + ((_out_) & 0x00000001) + +//***************************************************************************** +// +//! \internal +//! Checks a PWM generator number. +//! +//! \param ulGen is the generator number. +//! +//! This function determines if a PWM generator number is valid. +//! +//! \return Returnes \b true if the generator number is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +PWMGenValid(unsigned long ulGen) +{ + return((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) || + (ulGen == PWM_GEN_2) || (ulGen == PWM_GEN_3)); +} +#endif + +//***************************************************************************** +// +//! \internal +//! Checks a PWM output number. +//! +//! \param ulPWMOut is the output number. +//! +//! This function determines if a PWM output number is valid. +//! +//! \return Returns \b true if the output number is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +PWMOutValid(unsigned long ulPWMOut) +{ + return((ulPWMOut == PWM_OUT_0) || (ulPWMOut == PWM_OUT_1) || + (ulPWMOut == PWM_OUT_2) || (ulPWMOut == PWM_OUT_3) || + (ulPWMOut == PWM_OUT_4) || (ulPWMOut == PWM_OUT_5) || + (ulPWMOut == PWM_OUT_6) || (ulPWMOut == PWM_OUT_7)); +} +#endif + +//***************************************************************************** +// +//! Configures a PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to configure. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulConfig is the configuration for the PWM generator. +//! +//! This function is used to set the mode of operation for a PWM generator. +//! The counting mode, synchronization mode, and debug behavior are all +//! configured. After configuration, the generator is left in the disabled +//! state. +//! +//! A PWM generator can count in two different modes: count down mode or count +//! up/down mode. In count down mode, it will count from a value down to zero, +//! and then reset to the preset value. This will produce left-aligned PWM +//! signals (that is the rising edge of the two PWM signals produced by the +//! generator will occur at the same time). In count up/down mode, it will +//! count up from zero to the preset value, count back down to zero, and then +//! repeat the process. This will produce center-aligned PWM signals (that is, +//! the middle of the high/low period of the PWM signals produced by the +//! generator will occur at the same time). +//! +//! When the PWM generator parameters (period and pulse width) are modified, +//! their affect on the output PWM signals can be delayed. In synchronous +//! mode, the parameter updates are not applied until a synchronization event +//! occurs. This allows multiple parameters to be modified and take affect +//! simultaneously, instead of one at a time. Additionally, parameters to +//! multiple PWM generators in synchronous mode can be updated simultaneously, +//! allowing them to be treated as if they were a unified generator. In +//! non-synchronous mode, the parameter updates are not delayed until a +//! synchronization event. In either mode, the parameter updates only occur +//! when the counter is at zero to help prevent oddly formed PWM signals during +//! the update (that is, a PWM pulse that is too short or too long). +//! +//! The PWM generator can either pause or continue running when the processor +//! is stopped via the debugger. If configured to pause, it will continue to +//! count until it reaches zero, at which point it will pause until the +//! processor is restarted. If configured to continue running, it will keep +//! counting as if nothing had happened. +//! +//! The \e ulConfig parameter contains the desired configuration. It is the +//! logical OR of the following: +//! +//! - \b PWM_GEN_MODE_DOWN or \b PWM_GEN_MODE_UP_DOWN to specify the counting +//! mode +//! - \b PWM_GEN_MODE_SYNC or \b PWM_GEN_MODE_NO_SYNC to specify the counter +//! load and comparator update synchronization mode +//! - \b PWM_GEN_MODE_DBG_RUN or \b PWM_GEN_MODE_DBG_STOP to specify the debug +//! behavior +//! - \b PWM_GEN_MODE_GEN_NO_SYNC, \b PWM_GEN_MODE_GEN_SYNC_LOCAL, or +//! \b PWM_GEN_MODE_GEN_SYNC_GLOBAL to specify the update synchronization +//! mode for generator counting mode changes +//! - \b PWM_GEN_MODE_DB_NO_SYNC, \b PWM_GEN_MODE_DB_SYNC_LOCAL, or +//! \b PWM_GEN_MODE_DB_SYNC_GLOBAL to specify the deadband parameter +//! synchronization mode +//! - \b PWM_GEN_MODE_FAULT_LATCHED or \b PWM_GEN_MODE_FAULT_UNLATCHED to +//! specify whether fault conditions are latched or not +//! - \b PWM_GEN_MODE_FAULT_MINPER or \b PWM_GEN_MODE_FAULT_NO_MINPER to +//! specify whether minimum fault period support is required +//! - \b PWM_GEN_MODE_FAULT_EXT or \b PWM_GEN_MODE_FAULT_LEGACY to specify +//! whether extended fault source selection support is enabled or not +//! +//! Setting \b PWM_GEN_MODE_FAULT_MINPER allows an application to set the +//! minimum duration of a PWM fault signal. Fault will be signaled for at +//! least this time even if the external fault pin deasserts earlier. Care +//! should be taken when using this mode since during the fault signal period, +//! the fault interrupt from the PWM generator will remain asserted. The fault +//! interrupt handler may, therefore, reenter immediately if it exits prior to +//! expiration of the fault timer. +//! +//! \note Changes to the counter mode will affect the period of the PWM signals +//! produced. PWMGenPeriodSet() and PWMPulseWidthSet() should be called after +//! any changes to the counter mode of a generator. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Change the global configuration of the generator. + // + HWREG(ulGen + PWM_O_X_CTL) = ((HWREG(ulGen + PWM_O_X_CTL) & + ~(PWM_X_CTL_MODE | PWM_X_CTL_DEBUG | + PWM_X_CTL_LATCH | PWM_X_CTL_MINFLTPER | + PWM_X_CTL_FLTSRC | PWM_X_CTL_DBFALLUPD_M | + PWM_X_CTL_DBRISEUPD_M | + PWM_X_CTL_DBCTLUPD_M | + PWM_X_CTL_GENBUPD_M | + PWM_X_CTL_GENAUPD_M | + PWM_X_CTL_LOADUPD | PWM_X_CTL_CMPAUPD | + PWM_X_CTL_CMPBUPD)) | ulConfig); + + // + // Set the individual PWM generator controls. + // + if(ulConfig & PWM_X_CTL_MODE) + { + // + // In up/down count mode, set the signal high on up count comparison + // and low on down count comparison (that is, center align the + // signals). + // + HWREG(ulGen + PWM_O_X_GENA) = (PWM_X_GENA_ACTCMPAU_ONE | + PWM_X_GENA_ACTCMPAD_ZERO); + HWREG(ulGen + PWM_O_X_GENB) = (PWM_X_GENB_ACTCMPBU_ONE | + PWM_X_GENB_ACTCMPBD_ZERO); + } + else + { + // + // In down count mode, set the signal high on load and low on count + // comparison (that is, left align the signals). + // + HWREG(ulGen + PWM_O_X_GENA) = (PWM_X_GENA_ACTLOAD_ONE | + PWM_X_GENA_ACTCMPAD_ZERO); + HWREG(ulGen + PWM_O_X_GENB) = (PWM_X_GENB_ACTLOAD_ONE | + PWM_X_GENB_ACTCMPBD_ZERO); + } +} + +//***************************************************************************** +// +//! Set the period of a PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be modified. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulPeriod specifies the period of PWM generator output, measured +//! in clock ticks. +//! +//! This function sets the period of the specified PWM generator block, where +//! the period of the generator block is defined as the number of PWM clock +//! ticks between pulses on the generator block zero signal. +//! +//! \note Any subsequent calls made to this function before an update occurs +//! will cause the previous values to be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenPeriodSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Set the reload register based on the mode. + // + if(HWREG(ulGen + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + // + // In up/down count mode, set the reload register to half the requested + // period. + // + ASSERT((ulPeriod / 2) < 65536); + HWREG(ulGen + PWM_O_X_LOAD) = ulPeriod / 2; + } + else + { + // + // In down count mode, set the reload register to the requested period + // minus one. + // + ASSERT((ulPeriod <= 65536) && (ulPeriod != 0)); + HWREG(ulGen + PWM_O_X_LOAD) = ulPeriod - 1; + } +} + +//***************************************************************************** +// +//! Gets the period of a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function gets the period of the specified PWM generator block. The +//! period of the generator block is defined as the number of PWM clock ticks +//! between pulses on the generator block zero signal. +//! +//! If the update of the counter for the specified PWM generator has yet +//! to be completed, the value returned may not be the active period. The +//! value returned is the programmed period, measured in PWM clock ticks. +//! +//! \return Returns the programmed period of the specified generator block +//! in PWM clock ticks. +// +//***************************************************************************** +unsigned long +PWMGenPeriodGet(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Figure out the counter mode. + // + if(HWREG(ulGen + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + // + // The period is twice the reload register value. + // + return(HWREG(ulGen + PWM_O_X_LOAD) * 2); + } + else + { + // + // The period is the reload register value plus one. + // + return(HWREG(ulGen + PWM_O_X_LOAD) + 1); + } +} + +//***************************************************************************** +// +//! Enables the timer/counter for a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be enabled. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function allows the PWM clock to drive the timer/counter for the +//! specified generator block. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenEnable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Enable the PWM generator. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_CTL) |= PWM_X_CTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the timer/counter for a PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to be disabled. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function blocks the PWM clock from driving the timer/counter for the +//! specified generator block. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenDisable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Disable the PWM generator. + // + HWREG(PWM_GEN_BADDR(ulBase, + ulGen) + PWM_O_X_CTL) &= ~(PWM_X_CTL_ENABLE); +} + +//***************************************************************************** +// +//! Sets the pulse width for the specified PWM output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOut is the PWM output to modify. Must be one of \b PWM_OUT_0, +//! \b PWM_OUT_1, \b PWM_OUT_2, \b PWM_OUT_3, \b PWM_OUT_4, \b PWM_OUT_5, +//! \b PWM_OUT_6, or \b PWM_OUT_7. +//! \param ulWidth specifies the width of the positive portion of the pulse. +//! +//! This function sets the pulse width for the specified PWM output, where the +//! pulse width is defined as the number of PWM clock ticks. +//! +//! \note Any subsequent calls made to this function before an update occurs +//! will cause the previous values to be overwritten. +//! +//! \return None. +// +//***************************************************************************** +void +PWMPulseWidthSet(unsigned long ulBase, unsigned long ulPWMOut, + unsigned long ulWidth) +{ + unsigned long ulGenBase, ulReg; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMOutValid(ulPWMOut)); + + // + // Compute the generator's base address. + // + ulGenBase = PWM_OUT_BADDR(ulBase, ulPWMOut); + + // + // If the counter is in up/down count mode, divide the width by two. + // + if(HWREG(ulGenBase + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + ulWidth /= 2; + } + + // + // Get the period. + // + ulReg = HWREG(ulGenBase + PWM_O_X_LOAD); + + // + // Make sure the width is not too large. + // + ASSERT(ulWidth < ulReg); + + // + // Compute the compare value. + // + ulReg = ulReg - ulWidth; + + // + // Write to the appropriate registers. + // + if(PWM_IS_OUTPUT_ODD(ulPWMOut)) + { + HWREG(ulGenBase + PWM_O_X_CMPB) = ulReg; + } + else + { + HWREG(ulGenBase + PWM_O_X_CMPA) = ulReg; + } +} + +//***************************************************************************** +// +//! Gets the pulse width of a PWM output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOut is the PWM output to query. Must be one of \b PWM_OUT_0, +//! \b PWM_OUT_1, \b PWM_OUT_2, \b PWM_OUT_3, \b PWM_OUT_4, \b PWM_OUT_5, +//! \b PWM_OUT_6, or \b PWM_OUT_7. +//! +//! This function gets the currently programmed pulse width for the specified +//! PWM output. If the update of the comparator for the specified output has +//! yet to be completed, the value returned may not be the active pulse width. +//! The value returned is the programmed pulse width, measured in PWM clock +//! ticks. +//! +//! \return Returns the width of the pulse in PWM clock ticks. +// +//***************************************************************************** +unsigned long +PWMPulseWidthGet(unsigned long ulBase, unsigned long ulPWMOut) +{ + unsigned long ulGenBase, ulReg, ulLoad; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMOutValid(ulPWMOut)); + + // + // Compute the generator's base address. + // + ulGenBase = PWM_OUT_BADDR(ulBase, ulPWMOut); + + // + // Then compute the pulse width. If mode is UpDown, set + // width = (load - compare) * 2. Otherwise, set width = load - compare. + // + ulLoad = HWREG(ulGenBase + PWM_O_X_LOAD); + if(PWM_IS_OUTPUT_ODD(ulPWMOut)) + { + ulReg = HWREG(ulGenBase + PWM_O_X_CMPB); + } + else + { + ulReg = HWREG(ulGenBase + PWM_O_X_CMPA); + } + ulReg = ulLoad - ulReg; + + // + // If in up/down count mode, double the pulse width. + // + if(HWREG(ulGenBase + PWM_O_X_CTL) & PWM_X_CTL_MODE) + { + ulReg = ulReg * 2; + } + + // + // Return the pulse width. + // + return(ulReg); +} + +//***************************************************************************** +// +//! Enables the PWM dead band output, and sets the dead band delays. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to modify. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param usRise specifies the width of delay from the rising edge. +//! \param usFall specifies the width of delay from the falling edge. +//! +//! This function sets the dead bands for the specified PWM generator, +//! where the dead bands are defined as the number of \b PWM clock ticks +//! from the rising or falling edge of the generator's \b OutA signal. +//! Note that this function causes the coupling of \b OutB to \b OutA. +//! +//! \return None. +// +//***************************************************************************** +void +PWMDeadBandEnable(unsigned long ulBase, unsigned long ulGen, + unsigned short usRise, unsigned short usFall) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT(usRise < 4096); + ASSERT(usFall < 4096); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Write the dead band delay values. + // + HWREG(ulGen + PWM_O_X_DBRISE) = usRise; + HWREG(ulGen + PWM_O_X_DBFALL) = usFall; + + // + // Enable the deadband functionality. + // + HWREG(ulGen + PWM_O_X_DBCTL) |= PWM_X_DBCTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the PWM dead band output. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to modify. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function disables the dead band mode for the specified PWM generator. +//! Doing so decouples the \b OutA and \b OutB signals. +//! +//! \return None. +// +//***************************************************************************** +void +PWMDeadBandDisable(unsigned long ulBase, unsigned long ulGen) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Disable the deadband functionality. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_DBCTL) &= + ~(PWM_X_DBCTL_ENABLE); +} + +//***************************************************************************** +// +//! Synchronizes all pending updates. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenBits are the PWM generator blocks to be updated. Must be the +//! logical OR of any of \b PWM_GEN_0_BIT, \b PWM_GEN_1_BIT, +//! \b PWM_GEN_2_BIT, or \b PWM_GEN_3_BIT. +//! +//! For the selected PWM generators, this function causes all queued updates to +//! the period or pulse width to be applied the next time the corresponding +//! counter becomes zero. +//! +//! \return None. +// +//***************************************************************************** +void +PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulGenBits & ~(PWM_GEN_0_BIT | PWM_GEN_1_BIT | PWM_GEN_2_BIT | + PWM_GEN_3_BIT))); + + // + // Synchronize pending PWM register changes. + // + HWREG(ulBase + PWM_O_CTL) = ulGenBits; +} + +//***************************************************************************** +// +//! Synchronizes the counters in one or multiple PWM generator blocks. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenBits are the PWM generator blocks to be synchronized. Must be +//! the logical OR of any of \b PWM_GEN_0_BIT, \b PWM_GEN_1_BIT, +//! \b PWM_GEN_2_BIT, or \b PWM_GEN_3_BIT. +//! +//! For the selected PWM module, this function synchronizes the time base +//! of the generator blocks by causing the specified generator counters to be +//! reset to zero. +//! +//! \return None. +// +//***************************************************************************** +void +PWMSyncTimeBase(unsigned long ulBase, unsigned long ulGenBits) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulGenBits & ~(PWM_GEN_0_BIT | PWM_GEN_1_BIT | PWM_GEN_2_BIT | + PWM_GEN_3_BIT))); + + // + // Synchronize the counters in the specified generators by writing to the + // module's synchronization register. + // + HWREG(ulBase + PWM_O_SYNC) = ulGenBits; +} + +//***************************************************************************** +// +//! Enables or disables PWM outputs. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, +//! or \b PWM_OUT_7_BIT. +//! \param bEnable determines if the signal is enabled or disabled. +//! +//! This function is used to enable or disable the selected PWM outputs. The +//! outputs are selected using the parameter \e ulPWMOutBits. The parameter +//! \e bEnable determines the state of the selected outputs. If \e bEnable is +//! \b true, then the selected PWM outputs are enabled, or placed in the active +//! state. If \e bEnable is \b false, then the selected outputs are disabled, +//! or placed in the inactive state. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputState(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bEnable) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's ENABLE output control register, and set or clear the + // requested bits. + // + if(bEnable == true) + { + HWREG(ulBase + PWM_O_ENABLE) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_ENABLE) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Selects the inversion mode for PWM outputs. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bInvert determines if the signal is inverted or passed through. +//! +//! This function is used to select the inversion mode for the selected PWM +//! outputs. The outputs are selected using the parameter \e ulPWMOutBits. +//! The parameter \e bInvert determines the inversion mode for the selected +//! outputs. If \e bInvert is \b true, this function will cause the specified +//! PWM output signals to be inverted, or made active low. If \e bInvert is +//! \b false, the specified output will be passed through as is, or be made +//! active high. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputInvert(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bInvert) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's INVERT output control register, and set or clear the + // requested bits. + // + if(bInvert == true) + { + HWREG(ulBase + PWM_O_INVERT) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_INVERT) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Specifies the level of PWM outputs suppressed in response to a fault +//! condition. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bDriveHigh determines if the signal is driven high or low during an +//! active fault condition. +//! +//! This function determines whether a PWM output pin that is suppressed in +//! response to a fault condition will be driven high or low. The affected +//! outputs are selected using the parameter \e ulPWMOutBits. The parameter +//! \e bDriveHigh determines the output level for the pins identified by +//! \e ulPWMOutBits. If \e bDriveHigh is \b true then the selected outputs +//! will be driven high when a fault is detected. If it is \e false, the pins +//! will be driven low. +//! +//! In a fault condition, pins which have not been configured to be suppressed +//! via a call to PWMOutputFault() are unaffected by this function. +//! +//! \note This function is available only on devices which support extended +//! PWM fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputFaultLevel(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bDriveHigh) +{ + // + // Check the arguments. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's FAULT output control register, and set or clear the + // requested bits. + // + if(bDriveHigh == true) + { + HWREG(ulBase + PWM_O_FAULTVAL) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_FAULTVAL) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Specifies the state of PWM outputs in response to a fault condition. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulPWMOutBits are the PWM outputs to be modified. Must be the +//! logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT, \b PWM_OUT_2_BIT, +//! \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT, \b PWM_OUT_6_BIT, or +//! \b PWM_OUT_7_BIT. +//! \param bFaultSuppress determines if the signal is suppressed or passed +//! through during an active fault condition. +//! +//! This function sets the fault handling characteristics of the selected PWM +//! outputs. The outputs are selected using the parameter \e ulPWMOutBits. +//! The parameter \e bFaultSuppress determines the fault handling +//! characteristics for the selected outputs. If \e bFaultSuppress is \b true, +//! then the selected outputs will be made inactive. If \e bFaultSuppress is +//! \b false, then the selected outputs are unaffected by the detected fault. +//! +//! On devices supporting extended PWM fault handling, the state the affected +//! output pins are driven to can be configured with PWMOutputFaultLevel(). If +//! not configured, or if the device does not support extended PWM fault +//! handling, affected outputs will be driven low on a fault condition. +//! +//! \return None. +// +//***************************************************************************** +void +PWMOutputFault(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bFaultSuppress) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(!(ulPWMOutBits & ~(PWM_OUT_0_BIT | PWM_OUT_1_BIT | PWM_OUT_2_BIT | + PWM_OUT_3_BIT | PWM_OUT_4_BIT | PWM_OUT_5_BIT | + PWM_OUT_6_BIT | PWM_OUT_7_BIT))); + + // + // Read the module's FAULT output control register, and set or clear the + // requested bits. + // + if(bFaultSuppress == true) + { + HWREG(ulBase + PWM_O_FAULT) |= ulPWMOutBits; + } + else + { + HWREG(ulBase + PWM_O_FAULT) &= ~(ulPWMOutBits); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator in question. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param pfnIntHandler is a pointer to the function to be called when the PWM +//! generator interrupt occurs. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when an interrupt is detected for the specified +//! PWM generator block. This function will also enable the corresponding +//! PWM generator interrupt in the interrupt controller; individual generator +//! interrupts and interrupt sources must be enabled with PWMIntEnable() and +//! PWMGenIntTrigEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, + void (*pfnIntHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Get the interrupt number associated with the specified generator. + // + if(ulGen == PWM_GEN_3) + { + ulInt = INT_PWM3; + } + else + { + ulInt = INT_PWM0 + (ulGen >> 6) - 1; + } + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnIntHandler); + + // + // Enable the PWMx interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Removes an interrupt handler for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator in question. Must be one of +//! \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! +//! This function will unregister the interrupt handler for the specified +//! PWM generator block. This function will also disable the corresponding +//! PWM generator interrupt in the interrupt controller; individual generator +//! interrupts and interrupt sources must be disabled with PWMIntDisable() and +//! PWMGenIntTrigDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Get the interrupt number associated with the specified generator. + // + if(ulGen == PWM_GEN_3) + { + ulInt = INT_PWM3; + } + else + { + ulInt = INT_PWM0 + (ulGen >> 6) - 1; + } + + // + // Disable the PWMx interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a fault condition detected in a PWM +//! module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param pfnIntHandler is a pointer to the function to be called when the PWM +//! fault interrupt occurs. +//! +//! This function will ensure that the interrupt handler specified by +//! \e pfnIntHandler is called when a fault interrupt is detected for the +//! selected PWM module. This function will also enable the PWM fault +//! interrupt in the NVIC; the PWM fault interrupt must also be enabled at the +//! module level using PWMIntEnable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntRegister(unsigned long ulBase, void (*pfnIntHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Register the interrupt handler, returning an error if one occurs. + // + IntRegister(INT_PWM_FAULT, pfnIntHandler); + + // + // Enable the PWM fault interrupt. + // + IntEnable(INT_PWM_FAULT); +} + +//***************************************************************************** +// +//! Removes the PWM fault condition interrupt handler. +//! +//! \param ulBase is the base address of the PWM module. +//! +//! This function will remove the interrupt handler for a PWM fault interrupt +//! from the selected PWM module. This function will also disable the PWM +//! fault interrupt in the NVIC; the PWM fault interrupt must also be disabled +//! at the module level using PWMIntDisable(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Disable the PWM fault interrupt. + // + IntDisable(INT_PWM_FAULT); + + // + // Unregister the interrupt handler, returning an error if one occurs. + // + IntUnregister(INT_PWM_FAULT); +} + +//***************************************************************************** +// +//! Enables interrupts and triggers for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to have interrupts and triggers enabled. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulIntTrig specifies the interrupts and triggers to be enabled. +//! +//! Unmasks the specified interrupt(s) and trigger(s) by setting the +//! specified bits of the interrupt/trigger enable register for the specified +//! PWM generator. The \e ulIntTrig parameter is the logical OR of +//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, +//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD, +//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD, +//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | + PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU | + PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD | + PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU | + PWM_TR_CNT_BD)) == 0); + + // + // Enable the specified interrupts/triggers. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) |= ulIntTrig; +} + +//***************************************************************************** +// +//! Disables interrupts for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to have interrupts and triggers disabled. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulIntTrig specifies the interrupts and triggers to be disabled. +//! +//! Masks the specified interrupt(s) and trigger(s) by clearing the +//! specified bits of the interrupt/trigger enable register for the specified +//! PWM generator. The \e ulIntTrig parameter is the logical OR of +//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, +//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD, +//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD, +//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | + PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU | + PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD | + PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU | + PWM_TR_CNT_BD)) == 0); + + // + // Disable the specified interrupts/triggers. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) &= ~(ulIntTrig); +} + +//***************************************************************************** +// +//! Gets interrupt status for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of \b PWM_GEN_0, +//! \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return Returns the contents of the interrupt status register, or the +//! contents of the raw interrupt status register, for the specified +//! PWM generator. +// +//***************************************************************************** +unsigned long +PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + + // + // Compute the generator's base address. + // + ulGen = PWM_GEN_BADDR(ulBase, ulGen); + + // + // Read and return the specified generator's raw or enabled interrupt + // status. + // + if(bMasked == true) + { + return(HWREG(ulGen + PWM_O_X_ISC)); + } + else + { + return(HWREG(ulGen + PWM_O_X_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the specified interrupt(s) for the specified PWM generator block. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator to query. Must be one of \b PWM_GEN_0, +//! \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulInts specifies the interrupts to be cleared. +//! +//! Clears the specified interrupt(s) by writing a 1 to the specified bits +//! of the interrupt status register for the specified PWM generator. The +//! \e ulInts parameter is the logical OR of \b PWM_INT_CNT_ZERO, +//! \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, \b PWM_INT_CNT_AD, +//! \b PWM_INT_CNT_BU, or \b PWM_INT_CNT_BD. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, unsigned long ulInts) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulInts & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | PWM_INT_CNT_AU | + PWM_INT_CNT_AD | PWM_INT_CNT_BU | PWM_INT_CNT_BD)) == + 0); + + // + // Clear the requested interrupts by writing ones to the specified bit + // of the module's interrupt enable register. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_ISC) = ulInts; +} + +//***************************************************************************** +// +//! Enables generator and fault interrupts for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenFault contains the interrupts to be enabled. Must be a logical +//! OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, +//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, +//! or \b PWM_INT_FAULT3. +//! +//! Unmasks the specified interrupt(s) by setting the specified bits of +//! the interrupt enable register for the selected PWM module. +//! +//! \return None. +// +//***************************************************************************** +void +PWMIntEnable(unsigned long ulBase, unsigned long ulGenFault) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 | + PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Read the module's interrupt enable register, and enable interrupts + // for the specified PWM generators. + // + HWREG(ulBase + PWM_O_INTEN) |= ulGenFault; +} + +//***************************************************************************** +// +//! Disables generator and fault interrupts for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGenFault contains the interrupts to be disabled. Must be a +//! logical OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, +//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, +//! or \b PWM_INT_FAULT3. +//! +//! Masks the specified interrupt(s) by clearing the specified bits of +//! the interrupt enable register for the selected PWM module. +//! +//! \return None. +// +//***************************************************************************** +void +PWMIntDisable(unsigned long ulBase, unsigned long ulGenFault) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 | + PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Read the module's interrupt enable register, and disable interrupts + // for the specified PWM generators. + // + HWREG(ulBase + PWM_O_INTEN) &= ~(ulGenFault); +} + +//***************************************************************************** +// +//! Clears the fault interrupt for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! +//! Clears the fault interrupt by writing to the appropriate bit of the +//! interrupt status register for the selected PWM module. +//! +//! This function clears only the FAULT0 interrupt and is retained for +//! backwards compatibility. It is recommended that PWMFaultIntClearExt() be +//! used instead since it supports all fault interrupts supported on devices +//! with and without extended PWM fault handling support. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Write the only writeable bit in the module's interrupt register. + // + HWREG(ulBase + PWM_O_ISC) = PWM_ISC_INTFAULT0; +} + +//***************************************************************************** +// +//! Gets the interrupt status for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param bMasked specifies whether masked or raw interrupt status is +//! returned. +//! +//! If \e bMasked is set as \b true, then the masked interrupt status is +//! returned; otherwise, the raw interrupt status will be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, \b PWM_INT_GEN_3, +//! \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2, and +//! \b PWM_INT_FAULT3. +//! +//***************************************************************************** +unsigned long +PWMIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + + // + // Read and return either the module's raw or enabled interrupt status. + // + if(bMasked == true) + { + return(HWREG(ulBase + PWM_O_ISC)); + } + else + { + return(HWREG(ulBase + PWM_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the fault interrupt for a PWM module. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulFaultInts specifies the fault interrupts to clear. +//! +//! Clears one or more fault interrupts by writing to the appropriate bit of +//! the PWM interrupt status register. The parameter \e ulFaultInts must be +//! the logical OR of any of \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, +//! \b PWM_INT_FAULT2, or \b PWM_INT_FAULT3. +//! +//! When running on a device supporting extended PWM fault handling, the fault +//! interrupts are derived by performing a logical OR of each of the configured +//! fault trigger signals for a given generator. Therefore, these interrupts +//! are not directly related to the four possible FAULTn inputs to the device +//! but indicate that a fault has been signaled to one of the four possible PWM +//! generators. On a device without extended PWM fault handling, the interrupt +//! is directly related to the state of the single FAULT pin. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +PWMFaultIntClearExt(unsigned long ulBase, unsigned long ulFaultInts) +{ + // + // Check the arguments. + // + ASSERT(ulBase == PWM_BASE); + ASSERT((ulFaultInts & ~(PWM_INT_FAULT0 | PWM_INT_FAULT1 | + PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0); + + // + // Clear the supplied fault bits. + // + HWREG(ulBase + PWM_O_ISC) = ulFaultInts; +} + +//***************************************************************************** +// +//! Configures the minimum fault period and fault pin senses for a given +//! PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault configuration is being set. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulMinFaultPeriod is the minimum fault active period expressed in +//! PWM clock cycles. +//! \param ulFaultSenses indicates which sense of each FAULT input should be +//! considered the ``asserted'' state. Valid values are logical OR +//! combinations of \b PWM_FAULTn_SENSE_HIGH and \b PWM_FAULTn_SENSE_LOW. +//! +//! This function sets the minimum fault period for a given generator along +//! with the sense of each of the 4 possible fault inputs. The minimum fault +//! period is expressed in PWM clock cycles and takes effect only if +//! PWMGenConfigure() is called with flag \b PWM_GEN_MODE_FAULT_PER set in the +//! \e ulConfig parameter. When a fault input is asserted, the minimum fault +//! period timer ensures that it remains asserted for at least the number of +//! clock cycles specified. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulMinFaultPeriod, + unsigned long ulFaultSenses) +{ + // + // Check the arguments. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT(ulMinFaultPeriod < PWM_X_MINFLTPER_M); + ASSERT((ulFaultSenses & ~(PWM_FAULT0_SENSE_HIGH | PWM_FAULT0_SENSE_LOW | + PWM_FAULT1_SENSE_HIGH | PWM_FAULT1_SENSE_LOW | + PWM_FAULT2_SENSE_HIGH | PWM_FAULT2_SENSE_LOW | + PWM_FAULT3_SENSE_HIGH | PWM_FAULT3_SENSE_LOW)) == + 0); + + // + // Write the minimum fault period. + // + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_MINFLTPER) = ulMinFaultPeriod; + + // + // Write the fault senses. + // + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSEN) = ulFaultSenses; +} + +//***************************************************************************** +// +//! Configures the set of fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault triggers are being set. Must +//! be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulGroup indicates the subset of possible faults that are to be +//! configured. This must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! \param ulFaultTriggers defines the set of inputs that are to contribute +//! towards generation of the fault signal to the given PWM generator. For +//! \b PWM_FAULT_GROUP_0, this will be the logical OR of \b PWM_FAULT_FAULT0, +//! \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or \b PWM_FAULT_FAULT3. For +//! \b PWM_FAULT_GROUP_1, this will be the logical OR of \b PWM_FAULT_DCMP0, +//! \b PWM_FAULT_DCMP1, \b PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b +//! PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, \b PWM_FAULT_DCMP6, or \b +//! PWM_FAULT_DCMP7. +//! +//! This function allows selection of the set of fault inputs that will be +//! combined to generate a fault condition to a given PWM generator. By +//! default, all generators use only FAULT0 (for backwards compatibility) but +//! if PWMGenConfigure() is called with flag \b PWM_GEN_MODE_FAULT_SRC in the +//! \e ulConfig parameter, extended fault handling is enabled and this function +//! must be called to configure the fault triggers. +//! +//! The fault signal to the PWM generator is generated by ORing together each +//! of the signals whose inputs are specified in the \e ulFaultTriggers +//! parameter after having adjusted the sense of each FAULTn input based on the +//! configuration previously set using a call to PWMGenFaultConfigure(). +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultTriggerSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, unsigned long ulFaultTriggers) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) && + ((ulFaultTriggers & ~(PWM_FAULT_FAULT0 | PWM_FAULT_FAULT1 | + PWM_FAULT_FAULT2 | PWM_FAULT_FAULT3)) == 0)); + ASSERT((ulGroup == PWM_FAULT_GROUP_1) && + ((ulFaultTriggers & ~(PWM_FAULT_DCMP0 | PWM_FAULT_DCMP1 | + PWM_FAULT_DCMP2 | PWM_FAULT_DCMP3 | + PWM_FAULT_DCMP4 | PWM_FAULT_DCMP5 | + PWM_FAULT_DCMP6 | PWM_FAULT_DCMP7)) == 0)); + + // + // Write the fault triggers to the appropriate register. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC0) = + ulFaultTriggers; + } + else + { + HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC1) = + ulFaultTriggers; + } +} + +//***************************************************************************** +// +//! Returns the set of fault triggers currently configured for a given PWM +//! generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault triggers are being queried. +//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! +//! This function allows an application to query the current set of inputs that +//! contribute towards the generation of a fault condition to a given PWM +//! generator. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return Returns the current fault triggers configured for the fault group +//! provided. For \b PWM_FAULT_GROUP_0, the returned value will be a logical +//! OR of \b PWM_FAULT_FAULT0, \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or +//! \b PWM_FAULT_FAULT3. For \b PWM_FAULT_GROUP_1, the return value will be +//! the logical OR of \b PWM_FAULT_DCMP0, \b PWM_FAULT_DCMP1, \b +//! PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, +//! \b PWM_FAULT_DCMP6, or \b PWM_FAULT_DCMP7. +// +//***************************************************************************** +unsigned long +PWMGenFaultTriggerGet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + + // + // Return the current fault triggers. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + return(HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC0)); + } + else + { + return(HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_FLTSRC1)); + } +} + +//***************************************************************************** +// +//! Returns the current state of the fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault trigger states are being +//! queried. Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or +//! \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! +//! This function allows an application to query the current state of each of +//! the fault trigger inputs to a given PWM generator. The current state of +//! each fault trigger input is returned unless PWMGenConfigure() has +//! previously been called with flag \b PWM_GEN_MODE_LATCH_FAULT in the +//! \e ulConfig parameter in which case the returned status is the latched +//! fault trigger status. +//! +//! If latched faults are configured, the application must call +//! PWMGenFaultClear() to clear each trigger. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return Returns the current state of the fault triggers for the given PWM +//! generator. A set bit indicates that the associated trigger is active. For +//! \b PWM_FAULT_GROUP_0, the returned value will be a logical OR of +//! \b PWM_FAULT_FAULT0, \b PWM_FAULT_FAULT1, \b PWM_FAULT_FAULT2, or +//! \b PWM_FAULT_FAULT3. For \b PWM_FAULT_GROUP_1, the return value will be +//! the logical OR of \b PWM_FAULT_DCMP0, \b PWM_FAULT_DCMP1, \b +//! PWM_FAULT_DCMP2, \b PWM_FAULT_DCMP3, \b PWM_FAULT_DCMP4, \b PWM_FAULT_DCMP5, +//! \b PWM_FAULT_DCMP6, or \b PWM_FAULT_DCMP7. +// +//***************************************************************************** +unsigned long +PWMGenFaultStatus(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + + // + // Return the current fault status. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + return(HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT0)); + } + else + { + return(HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT1)); + } +} + +//***************************************************************************** +// +//! Clears one or more latched fault triggers for a given PWM generator. +//! +//! \param ulBase is the base address of the PWM module. +//! \param ulGen is the PWM generator whose fault trigger states are being +//! queried. Must be one of \b PWM_GEN_0, \b PWM_GEN_1, \b PWM_GEN_2, or +//! \b PWM_GEN_3. +//! \param ulGroup indicates the subset of faults that are being queried. This +//! must be \b PWM_FAULT_GROUP_0 or \b PWM_FAULT_GROUP_1. +//! \param ulFaultTriggers is the set of fault triggers which are to be +//! cleared. +//! +//! This function allows an application to clear the fault triggers for a given +//! PWM generator. This is only required if PWMGenConfigure() has previously +//! been called with flag \b PWM_GEN_MODE_LATCH_FAULT in parameter \e ulConfig. +//! +//! \note This function is only available on devices supporting extended PWM +//! fault handling. +//! +//! \return None. +// +//***************************************************************************** +void +PWMGenFaultClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, unsigned long ulFaultTriggers) +{ + // + // Check for valid parameters. + // + ASSERT(HWREG(SYSCTL_DC5) & SYSCTL_DC5_PWMEFLT); + ASSERT(ulBase == PWM_BASE); + ASSERT(PWMGenValid(ulGen)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) || (ulGroup == PWM_FAULT_GROUP_1)); + ASSERT((ulGroup == PWM_FAULT_GROUP_0) && + ((ulFaultTriggers & ~(PWM_FAULT_FAULT0 | PWM_FAULT_FAULT1 | + PWM_FAULT_FAULT2 | PWM_FAULT_FAULT3)) == 0)); + ASSERT((ulGroup == PWM_FAULT_GROUP_1) && + ((ulFaultTriggers & ~(PWM_FAULT_DCMP0 | PWM_FAULT_DCMP1 | + PWM_FAULT_DCMP2 | PWM_FAULT_DCMP3 | + PWM_FAULT_DCMP4 | PWM_FAULT_DCMP5 | + PWM_FAULT_DCMP6 | PWM_FAULT_DCMP7)) == 0)); + + // + // Clear the given faults. + // + if(ulGroup == PWM_FAULT_GROUP_0) + { + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT0) = + ulFaultTriggers; + } + else + { + HWREG(PWM_GEN_EXT_BADDR(ulBase, ulGen) + PWM_O_X_FLTSTAT1) = + ulFaultTriggers; + } +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.h new file mode 100644 index 00000000..8eca5912 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/pwm.h @@ -0,0 +1,283 @@ +//***************************************************************************** +// +// pwm.h - API function protoypes for Pulse Width Modulation (PWM) ports +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __PWM_H__ +#define __PWM_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following defines are passed to PWMGenConfigure() as the ulConfig +// parameter and specify the configuration of the PWM generator. +// +//***************************************************************************** +#define PWM_GEN_MODE_DOWN 0x00000000 // Down count mode +#define PWM_GEN_MODE_UP_DOWN 0x00000002 // Up/Down count mode +#define PWM_GEN_MODE_SYNC 0x00000038 // Synchronous updates +#define PWM_GEN_MODE_NO_SYNC 0x00000000 // Immediate updates +#define PWM_GEN_MODE_DBG_RUN 0x00000004 // Continue running in debug mode +#define PWM_GEN_MODE_DBG_STOP 0x00000000 // Stop running in debug mode +#define PWM_GEN_MODE_FAULT_LATCHED \ + 0x00040000 // Fault is latched +#define PWM_GEN_MODE_FAULT_UNLATCHED \ + 0x00000000 // Fault is not latched +#define PWM_GEN_MODE_FAULT_MINPER \ + 0x00020000 // Enable min fault period +#define PWM_GEN_MODE_FAULT_NO_MINPER \ + 0x00000000 // Disable min fault period +#define PWM_GEN_MODE_FAULT_EXT 0x00010000 // Enable extended fault support +#define PWM_GEN_MODE_FAULT_LEGACY \ + 0x00000000 // Disable extended fault support +#define PWM_GEN_MODE_DB_NO_SYNC 0x00000000 // Deadband updates occur + // immediately +#define PWM_GEN_MODE_DB_SYNC_LOCAL \ + 0x0000A800 // Deadband updates locally + // synchronized +#define PWM_GEN_MODE_DB_SYNC_GLOBAL \ + 0x0000FC00 // Deadband updates globally + // synchronized +#define PWM_GEN_MODE_GEN_NO_SYNC \ + 0x00000000 // Generator mode updates occur + // immediately +#define PWM_GEN_MODE_GEN_SYNC_LOCAL \ + 0x00000280 // Generator mode updates locally + // synchronized +#define PWM_GEN_MODE_GEN_SYNC_GLOBAL \ + 0x000003C0 // Generator mode updates globally + // synchronized + +//***************************************************************************** +// +// Defines for enabling, disabling, and clearing PWM generator interrupts and +// triggers. +// +//***************************************************************************** +#define PWM_INT_CNT_ZERO 0x00000001 // Int if COUNT = 0 +#define PWM_INT_CNT_LOAD 0x00000002 // Int if COUNT = LOAD +#define PWM_INT_CNT_AU 0x00000004 // Int if COUNT = CMPA U +#define PWM_INT_CNT_AD 0x00000008 // Int if COUNT = CMPA D +#define PWM_INT_CNT_BU 0x00000010 // Int if COUNT = CMPA U +#define PWM_INT_CNT_BD 0x00000020 // Int if COUNT = CMPA D +#define PWM_TR_CNT_ZERO 0x00000100 // Trig if COUNT = 0 +#define PWM_TR_CNT_LOAD 0x00000200 // Trig if COUNT = LOAD +#define PWM_TR_CNT_AU 0x00000400 // Trig if COUNT = CMPA U +#define PWM_TR_CNT_AD 0x00000800 // Trig if COUNT = CMPA D +#define PWM_TR_CNT_BU 0x00001000 // Trig if COUNT = CMPA U +#define PWM_TR_CNT_BD 0x00002000 // Trig if COUNT = CMPA D + +//***************************************************************************** +// +// Defines for enabling, disabling, and clearing PWM interrupts. +// +//***************************************************************************** +#define PWM_INT_GEN_0 0x00000001 // Generator 0 interrupt +#define PWM_INT_GEN_1 0x00000002 // Generator 1 interrupt +#define PWM_INT_GEN_2 0x00000004 // Generator 2 interrupt +#define PWM_INT_GEN_3 0x00000008 // Generator 3 interrupt +#ifndef DEPRECATED +#define PWM_INT_FAULT 0x00010000 // Fault interrupt +#endif +#define PWM_INT_FAULT0 0x00010000 // Fault0 interrupt +#define PWM_INT_FAULT1 0x00020000 // Fault1 interrupt +#define PWM_INT_FAULT2 0x00040000 // Fault2 interrupt +#define PWM_INT_FAULT3 0x00080000 // Fault3 interrupt +#define PWM_INT_FAULT_M 0x000F0000 // Fault interrupt source mask + +//***************************************************************************** +// +// Defines to identify the generators within a module. +// +//***************************************************************************** +#define PWM_GEN_0 0x00000040 // Offset address of Gen0 +#define PWM_GEN_1 0x00000080 // Offset address of Gen1 +#define PWM_GEN_2 0x000000C0 // Offset address of Gen2 +#define PWM_GEN_3 0x00000100 // Offset address of Gen3 + +#define PWM_GEN_0_BIT 0x00000001 // Bit-wise ID for Gen0 +#define PWM_GEN_1_BIT 0x00000002 // Bit-wise ID for Gen1 +#define PWM_GEN_2_BIT 0x00000004 // Bit-wise ID for Gen2 +#define PWM_GEN_3_BIT 0x00000008 // Bit-wise ID for Gen3 + +#define PWM_GEN_EXT_0 0x00000800 // Offset of Gen0 ext address range +#define PWM_GEN_EXT_1 0x00000880 // Offset of Gen1 ext address range +#define PWM_GEN_EXT_2 0x00000900 // Offset of Gen2 ext address range +#define PWM_GEN_EXT_3 0x00000980 // Offset of Gen3 ext address range + +//***************************************************************************** +// +// Defines to identify the outputs within a module. +// +//***************************************************************************** +#define PWM_OUT_0 0x00000040 // Encoded offset address of PWM0 +#define PWM_OUT_1 0x00000041 // Encoded offset address of PWM1 +#define PWM_OUT_2 0x00000082 // Encoded offset address of PWM2 +#define PWM_OUT_3 0x00000083 // Encoded offset address of PWM3 +#define PWM_OUT_4 0x000000C4 // Encoded offset address of PWM4 +#define PWM_OUT_5 0x000000C5 // Encoded offset address of PWM5 +#define PWM_OUT_6 0x00000106 // Encoded offset address of PWM6 +#define PWM_OUT_7 0x00000107 // Encoded offset address of PWM7 + +#define PWM_OUT_0_BIT 0x00000001 // Bit-wise ID for PWM0 +#define PWM_OUT_1_BIT 0x00000002 // Bit-wise ID for PWM1 +#define PWM_OUT_2_BIT 0x00000004 // Bit-wise ID for PWM2 +#define PWM_OUT_3_BIT 0x00000008 // Bit-wise ID for PWM3 +#define PWM_OUT_4_BIT 0x00000010 // Bit-wise ID for PWM4 +#define PWM_OUT_5_BIT 0x00000020 // Bit-wise ID for PWM5 +#define PWM_OUT_6_BIT 0x00000040 // Bit-wise ID for PWM6 +#define PWM_OUT_7_BIT 0x00000080 // Bit-wise ID for PWM7 + +//***************************************************************************** +// +// Defines to identify each of the possible fault trigger conditions in +// PWM_FAULT_GROUP_0. +// +//***************************************************************************** +#define PWM_FAULT_GROUP_0 0 + +#define PWM_FAULT_FAULT0 0x00000001 +#define PWM_FAULT_FAULT1 0x00000002 +#define PWM_FAULT_FAULT2 0x00000004 +#define PWM_FAULT_FAULT3 0x00000008 +#define PWM_FAULT_ACMP0 0x00010000 +#define PWM_FAULT_ACMP1 0x00020000 +#define PWM_FAULT_ACMP2 0x00040000 + +//***************************************************************************** +// +// Defines to identify each of the possible fault trigger conditions in +// PWM_FAULT_GROUP_1. +// +//***************************************************************************** +#define PWM_FAULT_GROUP_1 1 + +#define PWM_FAULT_DCMP0 0x00000001 +#define PWM_FAULT_DCMP1 0x00000002 +#define PWM_FAULT_DCMP2 0x00000004 +#define PWM_FAULT_DCMP3 0x00000008 +#define PWM_FAULT_DCMP4 0x00000010 +#define PWM_FAULT_DCMP5 0x00000020 +#define PWM_FAULT_DCMP6 0x00000040 +#define PWM_FAULT_DCMP7 0x00000080 + +//***************************************************************************** +// +// Defines to identify the sense of each of the external FAULTn signals +// +//***************************************************************************** +#define PWM_FAULT0_SENSE_HIGH 0x00000000 +#define PWM_FAULT0_SENSE_LOW 0x00000001 +#define PWM_FAULT1_SENSE_HIGH 0x00000000 +#define PWM_FAULT1_SENSE_LOW 0x00000002 +#define PWM_FAULT2_SENSE_HIGH 0x00000000 +#define PWM_FAULT2_SENSE_LOW 0x00000004 +#define PWM_FAULT3_SENSE_HIGH 0x00000000 +#define PWM_FAULT3_SENSE_LOW 0x00000008 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void PWMGenConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulConfig); +extern void PWMGenPeriodSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulPeriod); +extern unsigned long PWMGenPeriodGet(unsigned long ulBase, + unsigned long ulGen); +extern void PWMGenEnable(unsigned long ulBase, unsigned long ulGen); +extern void PWMGenDisable(unsigned long ulBase, unsigned long ulGen); +extern void PWMPulseWidthSet(unsigned long ulBase, unsigned long ulPWMOut, + unsigned long ulWidth); +extern unsigned long PWMPulseWidthGet(unsigned long ulBase, + unsigned long ulPWMOut); +extern void PWMDeadBandEnable(unsigned long ulBase, unsigned long ulGen, + unsigned short usRise, unsigned short usFall); +extern void PWMDeadBandDisable(unsigned long ulBase, unsigned long ulGen); +extern void PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits); +extern void PWMSyncTimeBase(unsigned long ulBase, unsigned long ulGenBits); +extern void PWMOutputState(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bEnable); +extern void PWMOutputInvert(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bInvert); +extern void PWMOutputFaultLevel(unsigned long ulBase, + unsigned long ulPWMOutBits, + tBoolean bDriveHigh); +extern void PWMOutputFault(unsigned long ulBase, unsigned long ulPWMOutBits, + tBoolean bFaultSuppress); +extern void PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, + void (*pfnIntHandler)(void)); +extern void PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen); +extern void PWMFaultIntRegister(unsigned long ulBase, + void (*pfnIntHandler)(void)); +extern void PWMFaultIntUnregister(unsigned long ulBase); +extern void PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig); +extern void PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen, + unsigned long ulIntTrig); +extern unsigned long PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, + tBoolean bMasked); +extern void PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulInts); +extern void PWMIntEnable(unsigned long ulBase, unsigned long ulGenFault); +extern void PWMIntDisable(unsigned long ulBase, unsigned long ulGenFault); +extern void PWMFaultIntClear(unsigned long ulBase); +extern unsigned long PWMIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void PWMFaultIntClearExt(unsigned long ulBase, + unsigned long ulFaultInts); +extern void PWMGenFaultConfigure(unsigned long ulBase, unsigned long ulGen, + unsigned long ulMinFaultPeriod, + unsigned long ulFaultSenses); +extern void PWMGenFaultTriggerSet(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, + unsigned long ulFaultTriggers); +extern unsigned long PWMGenFaultTriggerGet(unsigned long ulBase, + unsigned long ulGen, + unsigned long ulGroup); +extern unsigned long PWMGenFaultStatus(unsigned long ulBase, + unsigned long ulGen, + unsigned long ulGroup); +extern void PWMGenFaultClear(unsigned long ulBase, unsigned long ulGen, + unsigned long ulGroup, + unsigned long ulFaultTriggers); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __PWM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.c new file mode 100644 index 00000000..4615846e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.c @@ -0,0 +1,616 @@ +//***************************************************************************** +// +// qei.c - Driver for the Quadrature Encoder with Index. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup qei_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_qei.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/qei.h" + +//***************************************************************************** +// +//! Enables the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will enable operation of the quadrature encoder module. It must be +//! configured before it is enabled. +//! +//! \sa QEIConfigure() +//! +//! \return None. +// +//***************************************************************************** +void +QEIEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the QEI module. + // + HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will disable operation of the quadrature encoder module. +//! +//! \return None. +// +//***************************************************************************** +void +QEIDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the QEI module. + // + HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_ENABLE); +} + +//***************************************************************************** +// +//! Configures the quadrature encoder. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulConfig is the configuration for the quadrature encoder. See below +//! for a description of this parameter. +//! \param ulMaxPosition specifies the maximum position value. +//! +//! This will configure the operation of the quadrature encoder. The +//! \e ulConfig parameter provides the configuration of the encoder and is the +//! logical OR of several values: +//! +//! - \b QEI_CONFIG_CAPTURE_A or \b QEI_CONFIG_CAPTURE_A_B to specify if edges +//! on channel A or on both channels A and B should be counted by the +//! position integrator and velocity accumulator. +//! - \b QEI_CONFIG_NO_RESET or \b QEI_CONFIG_RESET_IDX to specify if the +//! position integrator should be reset when the index pulse is detected. +//! - \b QEI_CONFIG_QUADRATURE or \b QEI_CONFIG_CLOCK_DIR to specify if +//! quadrature signals are being provided on ChA and ChB, or if a direction +//! signal and a clock are being provided instead. +//! - \b QEI_CONFIG_NO_SWAP or \b QEI_CONFIG_SWAP to specify if the signals +//! provided on ChA and ChB should be swapped before being processed. +//! +//! \e ulMaxPosition is the maximum value of the position integrator, and is +//! the value used to reset the position capture when in index reset mode and +//! moving in the reverse (negative) direction. +//! +//! \return None. +// +//***************************************************************************** +void +QEIConfigure(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxPosition) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Write the new configuration to the hardware. + // + HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) & + ~(QEI_CTL_CAPMODE | QEI_CTL_RESMODE | + QEI_CTL_SIGMODE | QEI_CTL_SWAP)) | + ulConfig); + + // + // Set the maximum position. + // + HWREG(ulBase + QEI_O_MAXPOS) = ulMaxPosition; +} + +//***************************************************************************** +// +//! Gets the current encoder position. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current position of the encoder. Depending upon the +//! configuration of the encoder, and the incident of an index pulse, this +//! value may or may not contain the expected data (that is, if in reset on +//! index mode, if an index pulse has not been encountered, the position +//! counter will not be aligned with the index pulse yet). +//! +//! \return The current position of the encoder. +// +//***************************************************************************** +unsigned long +QEIPositionGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the current position counter. + // + return(HWREG(ulBase + QEI_O_POS)); +} + +//***************************************************************************** +// +//! Sets the current encoder position. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulPosition is the new position for the encoder. +//! +//! This sets the current position of the encoder; the encoder position will +//! then be measured relative to this value. +//! +//! \return None. +// +//***************************************************************************** +void +QEIPositionSet(unsigned long ulBase, unsigned long ulPosition) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Set the position counter. + // + HWREG(ulBase + QEI_O_POS) = ulPosition; +} + +//***************************************************************************** +// +//! Gets the current direction of rotation. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current direction of rotation. In this case, current +//! means the most recently detected direction of the encoder; it may not be +//! presently moving but this is the direction it last moved before it stopped. +//! +//! \return Returns 1 if moving in the forward direction or -1 if moving in the +//! reverse direction. +// +//***************************************************************************** +long +QEIDirectionGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the direction of rotation. + // + return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_DIRECTION) ? -1 : 1); +} + +//***************************************************************************** +// +//! Gets the encoder error indicator. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the error indicator for the quadrature encoder. It is an +//! error for both of the signals of the quadrature input to change at the same +//! time. +//! +//! \return Returns \b true if an error has occurred and \b false otherwise. +// +//***************************************************************************** +tBoolean +QEIErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the error indicator. + // + return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_ERROR) ? true : false); +} + +//***************************************************************************** +// +//! Enables the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will enable operation of the velocity capture in the quadrature +//! encoder module. It must be configured before it is enabled. Velocity +//! capture will not occur if the quadrature encoder is not enabled. +//! +//! \sa QEIVelocityConfigure() and QEIEnable() +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the velocity capture. + // + HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_VELEN; +} + +//***************************************************************************** +// +//! Disables the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This will disable operation of the velocity capture in the quadrature +//! encoder module. +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the velocity capture. + // + HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_VELEN); +} + +//***************************************************************************** +// +//! Configures the velocity capture. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulPreDiv specifies the predivider applied to the input quadrature +//! signal before it is counted; can be one of \b QEI_VELDIV_1, +//! \b QEI_VELDIV_2, \b QEI_VELDIV_4, \b QEI_VELDIV_8, \b QEI_VELDIV_16, +//! \b QEI_VELDIV_32, \b QEI_VELDIV_64, or \b QEI_VELDIV_128. +//! \param ulPeriod specifies the number of clock ticks over which to measure +//! the velocity; must be non-zero. +//! +//! This will configure the operation of the velocity capture portion of the +//! quadrature encoder. The position increment signal is predivided as +//! specified by \e ulPreDiv before being accumulated by the velocity capture. +//! The divided signal is accumulated over \e ulPeriod system clock before +//! being saved and resetting the accumulator. +//! +//! \return None. +// +//***************************************************************************** +void +QEIVelocityConfigure(unsigned long ulBase, unsigned long ulPreDiv, + unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + ASSERT(!(ulPreDiv & ~(QEI_CTL_VELDIV_M))); + ASSERT(ulPeriod != 0); + + // + // Set the velocity predivider. + // + HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) & + ~(QEI_CTL_VELDIV_M)) | ulPreDiv); + + // + // Set the timer period. + // + HWREG(ulBase + QEI_O_LOAD) = ulPeriod - 1; +} + +//***************************************************************************** +// +//! Gets the current encoder speed. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This returns the current speed of the encoder. The value returned is the +//! number of pulses detected in the specified time period; this number can be +//! multiplied by the number of time periods per second and divided by the +//! number of pulses per revolution to obtain the number of revolutions per +//! second. +//! +//! \return Returns the number of pulses captured in the given time period. +// +//***************************************************************************** +unsigned long +QEIVelocityGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return the speed capture value. + // + return(HWREG(ulBase + QEI_O_SPEED)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the quadrature encoder interrupt. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param pfnHandler is a pointer to the function to be called when the +//! quadrature encoder interrupt occurs. +//! +//! This sets the handler to be called when a quadrature encoder interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific quadrature encoder interrupts must be enabled via QEIIntEnable(). +//! It is the interrupt handler's responsibility to clear the interrupt source +//! via QEIIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Determine the interrupt number based on the QEI module. + // + ulInt = (ulBase == QEI0_BASE) ? INT_QEI0 : INT_QEI1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the quadrature encoder interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the quadrature encoder interrupt. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! +//! This function will clear the handler to be called when a quadrature encoder +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Determine the interrupt number based on the QEI module. + // + ulInt = (ulBase == QEI0_BASE) ? INT_QEI0 : INT_QEI1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! Enables the indicated quadrature encoder interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + QEI_O_INTEN) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! Disables the indicated quadrature encoder interrupt sources. Only the +//! sources that are enabled can be reflected to the processor interrupt; +//! disabled sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + QEI_O_INTEN) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the quadrature encoder module. +//! Either the raw interrupt status or the status of interrupts that are +//! allowed to reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, and \b QEI_INTINDEX. +// +//***************************************************************************** +unsigned long +QEIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + QEI_O_ISC)); + } + else + { + return(HWREG(ulBase + QEI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears quadrature encoder interrupt sources. +//! +//! \param ulBase is the base address of the quadrature encoder module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! Can be any of the \b QEI_INTERROR, \b QEI_INTDIR, \b QEI_INTTIMER, or +//! \b QEI_INTINDEX values. +//! +//! The specified quadrature encoder interrupt sources are cleared, so that +//! they no longer assert. This must be done in the interrupt handler to keep +//! it from being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +QEIIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + QEI_O_ISC) = ulIntFlags; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.h new file mode 100644 index 00000000..0ad5e1e9 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/qei.h @@ -0,0 +1,112 @@ +//***************************************************************************** +// +// qei.h - Prototypes for the Quadrature Encoder Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __QEI_H__ +#define __QEI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to QEIConfigure as the ulConfig paramater. +// +//***************************************************************************** +#define QEI_CONFIG_CAPTURE_A 0x00000000 // Count on ChA edges only +#define QEI_CONFIG_CAPTURE_A_B 0x00000008 // Count on ChA and ChB edges +#define QEI_CONFIG_NO_RESET 0x00000000 // Do not reset on index pulse +#define QEI_CONFIG_RESET_IDX 0x00000010 // Reset position on index pulse +#define QEI_CONFIG_QUADRATURE 0x00000000 // ChA and ChB are quadrature +#define QEI_CONFIG_CLOCK_DIR 0x00000004 // ChA and ChB are clock and dir +#define QEI_CONFIG_NO_SWAP 0x00000000 // Do not swap ChA and ChB +#define QEI_CONFIG_SWAP 0x00000002 // Swap ChA and ChB + +//***************************************************************************** +// +// Values that can be passed to QEIVelocityConfigure as the ulPreDiv parameter. +// +//***************************************************************************** +#define QEI_VELDIV_1 0x00000000 // Predivide by 1 +#define QEI_VELDIV_2 0x00000040 // Predivide by 2 +#define QEI_VELDIV_4 0x00000080 // Predivide by 4 +#define QEI_VELDIV_8 0x000000C0 // Predivide by 8 +#define QEI_VELDIV_16 0x00000100 // Predivide by 16 +#define QEI_VELDIV_32 0x00000140 // Predivide by 32 +#define QEI_VELDIV_64 0x00000180 // Predivide by 64 +#define QEI_VELDIV_128 0x000001C0 // Predivide by 128 + +//***************************************************************************** +// +// Values that can be passed to QEIEnableInts, QEIDisableInts, and QEIClearInts +// as the ulIntFlags parameter, and returned by QEIGetIntStatus. +// +//***************************************************************************** +#define QEI_INTERROR 0x00000008 // Phase error detected +#define QEI_INTDIR 0x00000004 // Direction change +#define QEI_INTTIMER 0x00000002 // Velocity timer expired +#define QEI_INTINDEX 0x00000001 // Index pulse detected + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void QEIEnable(unsigned long ulBase); +extern void QEIDisable(unsigned long ulBase); +extern void QEIConfigure(unsigned long ulBase, unsigned long ulConfig, + unsigned long ulMaxPosition); +extern unsigned long QEIPositionGet(unsigned long ulBase); +extern void QEIPositionSet(unsigned long ulBase, unsigned long ulPosition); +extern long QEIDirectionGet(unsigned long ulBase); +extern tBoolean QEIErrorGet(unsigned long ulBase); +extern void QEIVelocityEnable(unsigned long ulBase); +extern void QEIVelocityDisable(unsigned long ulBase); +extern void QEIVelocityConfigure(unsigned long ulBase, unsigned long ulPreDiv, + unsigned long ulPeriod); +extern unsigned long QEIVelocityGet(unsigned long ulBase); +extern void QEIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); +extern void QEIIntUnregister(unsigned long ulBase); +extern void QEIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long QEIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void QEIIntClear(unsigned long ulBase, unsigned long ulIntFlags); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __QEI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom.h new file mode 100644 index 00000000..467d6c20 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom.h @@ -0,0 +1,3584 @@ +//***************************************************************************** +// +// rom.h - Macros to facilitate calling functions in the ROM. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ROM_H__ +#define __ROM_H__ + +//***************************************************************************** +// +// Pointers to the main API tables. +// +//***************************************************************************** +#define ROM_APITABLE ((unsigned long *)0x01000010) +#define ROM_VERSION (ROM_APITABLE[0]) +#define ROM_UARTTABLE ((unsigned long *)(ROM_APITABLE[1])) +#define ROM_SSITABLE ((unsigned long *)(ROM_APITABLE[2])) +#define ROM_I2CTABLE ((unsigned long *)(ROM_APITABLE[3])) +#define ROM_GPIOTABLE ((unsigned long *)(ROM_APITABLE[4])) +#define ROM_ADCTABLE ((unsigned long *)(ROM_APITABLE[5])) +#define ROM_COMPARATORTABLE ((unsigned long *)(ROM_APITABLE[6])) +#define ROM_FLASHTABLE ((unsigned long *)(ROM_APITABLE[7])) +#define ROM_PWMTABLE ((unsigned long *)(ROM_APITABLE[8])) +#define ROM_QEITABLE ((unsigned long *)(ROM_APITABLE[9])) +#define ROM_SYSTICKTABLE ((unsigned long *)(ROM_APITABLE[10])) +#define ROM_TIMERTABLE ((unsigned long *)(ROM_APITABLE[11])) +#define ROM_WATCHDOGTABLE ((unsigned long *)(ROM_APITABLE[12])) +#define ROM_SYSCTLTABLE ((unsigned long *)(ROM_APITABLE[13])) +#define ROM_INTERRUPTTABLE ((unsigned long *)(ROM_APITABLE[14])) +#define ROM_ETHERNETTABLE ((unsigned long *)(ROM_APITABLE[15])) +#define ROM_USBTABLE ((unsigned long *)(ROM_APITABLE[16])) +#define ROM_UDMATABLE ((unsigned long *)(ROM_APITABLE[17])) +#define ROM_CANTABLE ((unsigned long *)(ROM_APITABLE[18])) +#define ROM_HIBERNATETABLE ((unsigned long *)(ROM_APITABLE[19])) +#define ROM_MPUTABLE ((unsigned long *)(ROM_APITABLE[20])) +#define ROM_SOFTWARETABLE ((unsigned long *)(ROM_APITABLE[21])) +#define ROM_I2STABLE ((unsigned long *)(ROM_APITABLE[22])) +#define ROM_EPITABLE ((unsigned long *)(ROM_APITABLE[23])) + +//***************************************************************************** +// +// Macros for calling ROM functions in the ADC API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceDataGet \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long *pulBuffer))ROM_ADCTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + tBoolean bMasked))ROM_ADCTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long ulTrigger, \ + unsigned long ulPriority))ROM_ADCTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceStepConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum, \ + unsigned long ulStep, \ + unsigned long ulConfig))ROM_ADCTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceOverflow \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceOverflowClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceUnderflow \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCSequenceUnderflowClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCProcessorTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCHardwareOversampleConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFactor))ROM_ADCTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulConfig))ROM_ADCTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorRegionSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulLowRef, \ + unsigned long ulHighRef))ROM_ADCTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorReset \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + tBoolean bTrigger, \ + tBoolean bInterrupt))ROM_ADCTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSequenceNum))ROM_ADCTABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCComparatorIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulStatus))ROM_ADCTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCReferenceSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulRef))ROM_ADCTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCReferenceGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCPhaseDelaySet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPhase))ROM_ADCTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ADCPhaseDelayGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ADCTABLE[25]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the CAN API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntClr))ROM_CANTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANInit \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANEnable \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANDisable \ + ((void (*)(unsigned long ulBase))ROM_CANTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitTimingSet \ + ((void (*)(unsigned long ulBase, \ + tCANBitClkParms *pClkParms))ROM_CANTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitTimingGet \ + ((void (*)(unsigned long ulBase, \ + tCANBitClkParms *pClkParms))ROM_CANTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID, \ + tCANMsgObject *pMsgObject, \ + tMsgObjType eMsgType))ROM_CANTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID, \ + tCANMsgObject *pMsgObject, \ + tBoolean bClrPendingInt))ROM_CANTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANStatusGet \ + ((unsigned long (*)(unsigned long ulBase, \ + tCANStsReg eStatusReg))ROM_CANTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANMessageClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulObjID))ROM_CANTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_CANTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_CANTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tCANIntStsReg eIntStsReg))ROM_CANTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANRetryGet \ + ((tBoolean (*)(unsigned long ulBase))ROM_CANTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANRetrySet \ + ((void (*)(unsigned long ulBase, \ + tBoolean bAutoRetry))ROM_CANTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANErrCntrGet \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long *pulRxCount, \ + unsigned long *pulTxCount))ROM_CANTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_CANBitRateSet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulSourceClock, \ + unsigned long ulBitRate))ROM_CANTABLE[16]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Comparator API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + unsigned long ulConfig))ROM_COMPARATORTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorRefSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulRef))ROM_COMPARATORTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorValueGet \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulComp))ROM_COMPARATORTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_ComparatorIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned long ulComp, \ + tBoolean bMasked))ROM_COMPARATORTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Ethernet API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_EPITABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMode))ROM_EPITABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIDividerSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDivider))ROM_EPITABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigSDRAMSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulRefresh))ROM_EPITABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigGPModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulFrameCount, \ + unsigned long ulMaxWait))ROM_EPITABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigHB8Set \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxWait))ROM_EPITABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIConfigHB16Set \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxWait))ROM_EPITABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIAddressMapSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMap))ROM_EPITABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel, \ + unsigned long ulDataSize, \ + unsigned long ulAddress))ROM_EPITABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadStart \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel, \ + unsigned long ulCount))ROM_EPITABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadStop \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulChannel))ROM_EPITABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadCount \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulChannel))ROM_EPITABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadAvail \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet32 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned long *pulBuf))ROM_EPITABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet16 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned short *pusBuf))ROM_EPITABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPINonBlockingReadGet8 \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulCount, \ + unsigned char *pucBuf))ROM_EPITABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIFIFOConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_EPITABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIWriteFIFOCountGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_EPITABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_EPITABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntErrorStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_EPITABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EPIIntErrorClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulErrFlags))ROM_EPITABLE[21]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Ethernet API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetInitExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEthClk))ROM_ETHERNETTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_ETHERNETTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetConfigGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_ETHERNETTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetMACAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned char *pucMACAddr))ROM_ETHERNETTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetMACAddrGet \ + ((void (*)(unsigned long ulBase, \ + unsigned char *pucMACAddr))ROM_ETHERNETTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetEnable \ + ((void (*)(unsigned long ulBase))ROM_ETHERNETTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetDisable \ + ((void (*)(unsigned long ulBase))ROM_ETHERNETTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_ETHERNETTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetSpaceAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_ETHERNETTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketGet \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPacketPut \ + ((long (*)(unsigned long ulBase, \ + unsigned char *pucBuf, \ + long lBufLen))ROM_ETHERNETTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_ETHERNETTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_ETHERNETTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPHYWrite \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucRegAddr, \ + unsigned long ulData))ROM_ETHERNETTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_EthernetPHYRead \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned char ucRegAddr))ROM_ETHERNETTABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateEthernet \ + ((void (*)(unsigned long ulClock))ROM_ETHERNETTABLE[19]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Flash API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProgram \ + ((long (*)(unsigned long *pulData, \ + unsigned long ulAddress, \ + unsigned long ulCount))ROM_FLASHTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUsecGet \ + ((unsigned long (*)(void))ROM_FLASHTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUsecSet \ + ((void (*)(unsigned long ulClocks))ROM_FLASHTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashErase \ + ((long (*)(unsigned long ulAddress))ROM_FLASHTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectGet \ + ((tFlashProtection (*)(unsigned long ulAddress))ROM_FLASHTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectSet \ + ((long (*)(unsigned long ulAddress, \ + tFlashProtection eProtect))ROM_FLASHTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashProtectSave \ + ((long (*)(void))ROM_FLASHTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserGet \ + ((long (*)(unsigned long *pulUser0, \ + unsigned long *pulUser1))ROM_FLASHTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserSet \ + ((long (*)(unsigned long ulUser0, \ + unsigned long ulUser1))ROM_FLASHTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashUserSave \ + ((long (*)(void))ROM_FLASHTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntEnable \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntDisable \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_FLASHTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_FlashIntClear \ + ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[13]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the GPIO API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinWrite \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned char ucVal))ROM_GPIOTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIODirModeSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulPinIO))ROM_GPIOTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIODirModeGet \ + ((unsigned long (*)(unsigned long ulPort, \ + unsigned char ucPin))ROM_GPIOTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOIntTypeSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulIntType))ROM_GPIOTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOIntTypeGet \ + ((unsigned long (*)(unsigned long ulPort, \ + unsigned char ucPin))ROM_GPIOTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPadConfigSet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins, \ + unsigned long ulStrength, \ + unsigned long ulPadType))ROM_GPIOTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPadConfigGet \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPin, \ + unsigned long *pulStrength, \ + unsigned long *pulPadType))ROM_GPIOTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntEnable \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntDisable \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntStatus \ + ((long (*)(unsigned long ulPort, \ + tBoolean bMasked))ROM_GPIOTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinIntClear \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinRead \ + ((long (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeCAN \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeComparator \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOInput \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOOutput \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeI2C \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypePWM \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeQEI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeSSI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeTimer \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUART \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeGPIOOutputOD \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeADC \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUSBDigital \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeI2S \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinConfigure \ + ((void (*)(unsigned long ulPinConfig))ROM_GPIOTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEthernetLED \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeUSBAnalog \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEPI \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_GPIOPinTypeEthernetMII \ + ((void (*)(unsigned long ulPort, \ + unsigned char ucPins))ROM_GPIOTABLE[30]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Hibernate API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntClear \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateEnableExpClk \ + ((void (*)(unsigned long ulHibClk))ROM_HIBERNATETABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDisable \ + ((void (*)(void))ROM_HIBERNATETABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateClockSelect \ + ((void (*)(unsigned long ulClockInput))ROM_HIBERNATETABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCEnable \ + ((void (*)(void))ROM_HIBERNATETABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCDisable \ + ((void (*)(void))ROM_HIBERNATETABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateWakeSet \ + ((void (*)(unsigned long ulWakeFlags))ROM_HIBERNATETABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateWakeGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateLowBatSet \ + ((void (*)(unsigned long ulLowBatFlags))ROM_HIBERNATETABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateLowBatGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCSet \ + ((void (*)(unsigned long ulRTCValue))ROM_HIBERNATETABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch0Set \ + ((void (*)(unsigned long ulMatch))ROM_HIBERNATETABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch0Get \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch1Set \ + ((void (*)(unsigned long ulMatch))ROM_HIBERNATETABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCMatch1Get \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCTrimSet \ + ((void (*)(unsigned long ulTrim))ROM_HIBERNATETABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRTCTrimGet \ + ((unsigned long (*)(void))ROM_HIBERNATETABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDataSet \ + ((void (*)(unsigned long *pulData, \ + unsigned long ulCount))ROM_HIBERNATETABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateDataGet \ + ((void (*)(unsigned long *pulData, \ + unsigned long ulCount))ROM_HIBERNATETABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateRequest \ + ((void (*)(void))ROM_HIBERNATETABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntEnable \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntDisable \ + ((void (*)(unsigned long ulIntFlags))ROM_HIBERNATETABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_HIBERNATETABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_HibernateIsActive \ + ((unsigned int (*)(void))ROM_HIBERNATETABLE[24]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the I2C API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_I2CTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterInitExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulI2CClk, \ + tBoolean bFast))ROM_I2CTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveInit \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucSlaveAddr))ROM_I2CTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntEnable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntDisable \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntStatus \ + ((tBoolean (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterIntClear \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntClear \ + ((void (*)(unsigned long ulBase))ROM_I2CTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterSlaveAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucSlaveAddr, \ + tBoolean bReceive))ROM_I2CTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterBusBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulCmd))ROM_I2CTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterErr \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CMasterDataGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_I2CTABLE[22]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveDataGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[23]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateI2C \ + ((void (*)(void))ROM_I2CTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntEnableEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntDisableEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntStatusEx \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2CTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2CSlaveIntClearEx \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2CTABLE[28]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the I2S API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_I2STABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_I2STABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxDataPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_I2STABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLimitSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLevel))ROM_I2STABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLimitGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxFIFOLevelGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDataGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_I2STABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxDataGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_I2STABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLimitSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLevel))ROM_I2STABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLimitGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SRxFIFOLevelGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_I2STABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxEnable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxDisable \ + ((void (*)(unsigned long ulBase))ROM_I2STABLE[18]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2STxRxConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_I2STABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SMasterClockSelect \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMClock))ROM_I2STABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_I2SIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_I2STABLE[23]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Interrupt API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntEnable \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntMasterEnable \ + ((tBoolean (*)(void))ROM_INTERRUPTTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntMasterDisable \ + ((tBoolean (*)(void))ROM_INTERRUPTTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntDisable \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGroupingSet \ + ((void (*)(unsigned long ulBits))ROM_INTERRUPTTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGroupingGet \ + ((unsigned long (*)(void))ROM_INTERRUPTTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPrioritySet \ + ((void (*)(unsigned long ulInterrupt, \ + unsigned char ucPriority))ROM_INTERRUPTTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPriorityGet \ + ((long (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPendSet \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_IntPendClear \ + ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[9]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the MPU API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPUEnable \ + ((void (*)(unsigned long ulMPUConfig))ROM_MPUTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPUDisable \ + ((void (*)(void))ROM_MPUTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionCountGet \ + ((unsigned long (*)(void))ROM_MPUTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionEnable \ + ((void (*)(unsigned long ulRegion))ROM_MPUTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionDisable \ + ((void (*)(unsigned long ulRegion))ROM_MPUTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionSet \ + ((void (*)(unsigned long ulRegion, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_MPUTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_MPURegionGet \ + ((void (*)(unsigned long ulRegion, \ + unsigned long *pulAddr, \ + unsigned long *pulFlags))ROM_MPUTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the PWM API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMPulseWidthSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOut, \ + unsigned long ulWidth))ROM_PWMTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulConfig))ROM_PWMTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenPeriodSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulPeriod))ROM_PWMTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenPeriodGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMPulseWidthGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulPWMOut))ROM_PWMTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMDeadBandEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned short usRise, \ + unsigned short usFall))ROM_PWMTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMDeadBandDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen))ROM_PWMTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMSyncUpdate \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenBits))ROM_PWMTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMSyncTimeBase \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenBits))ROM_PWMTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputState \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bEnable))ROM_PWMTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputInvert \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bInvert))ROM_PWMTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputFault \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bFaultSuppress))ROM_PWMTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntTrigEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulIntTrig))ROM_PWMTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntTrigDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulIntTrig))ROM_PWMTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + tBoolean bMasked))ROM_PWMTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulInts))ROM_PWMTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenFault))ROM_PWMTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGenFault))ROM_PWMTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMFaultIntClear \ + ((void (*)(unsigned long ulBase))ROM_PWMTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_PWMTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMOutputFaultLevel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPWMOutBits, \ + tBoolean bDriveHigh))ROM_PWMTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMFaultIntClearExt \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFaultInts))ROM_PWMTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulMinFaultPeriod, \ + unsigned long ulFaultSenses))ROM_PWMTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultTriggerSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup, \ + unsigned long ulFaultTriggers))ROM_PWMTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultTriggerGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup))ROM_PWMTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup))ROM_PWMTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_PWMGenFaultClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulGen, \ + unsigned long ulGroup, \ + unsigned long ulFaultTriggers))ROM_PWMTABLE[28]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the QEI API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIPositionGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIEnable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIDisable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig, \ + unsigned long ulMaxPosition))ROM_QEITABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIPositionSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPosition))ROM_QEITABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIDirectionGet \ + ((long (*)(unsigned long ulBase))ROM_QEITABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIErrorGet \ + ((tBoolean (*)(unsigned long ulBase))ROM_QEITABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityEnable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityDisable \ + ((void (*)(unsigned long ulBase))ROM_QEITABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulPreDiv, \ + unsigned long ulPeriod))ROM_QEITABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIVelocityGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_QEITABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_QEIIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_QEITABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SSI API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataPut \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_SSITABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIConfigSetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulSSIClk, \ + unsigned long ulProtocol, \ + unsigned long ulMode, \ + unsigned long ulBitRate, \ + unsigned long ulDataWidth))ROM_SSITABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIEnable \ + ((void (*)(unsigned long ulBase))ROM_SSITABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDisable \ + ((void (*)(unsigned long ulBase))ROM_SSITABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_SSITABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_SSITABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataPutNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulData))ROM_SSITABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_SSITABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDataGetNonBlocking \ + ((long (*)(unsigned long ulBase, \ + unsigned long *pulData))ROM_SSITABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateSSI \ + ((void (*)(void))ROM_SSITABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDMAEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_SSITABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIDMADisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_SSITABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SSIBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_SSITABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SysCtl API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlSleep \ + ((void (*)(void))ROM_SYSCTLTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlSRAMSizeGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlFlashSizeGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPinPresent \ + ((tBoolean (*)(unsigned long ulPin))ROM_SYSCTLTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralPresent \ + ((tBoolean (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralReset \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralSleepEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralSleepDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDeepSleepEnable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralDeepSleepDisable \ + ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPeripheralClockGating \ + ((void (*)(tBoolean bEnable))ROM_SYSCTLTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntEnable \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntDisable \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntClear \ + ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlIntStatus \ + ((unsigned long (*)(tBoolean bMasked))ROM_SYSCTLTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlLDOSet \ + ((void (*)(unsigned long ulVoltage))ROM_SYSCTLTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlLDOGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlReset \ + ((void (*)(void))ROM_SYSCTLTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlDeepSleep \ + ((void (*)(void))ROM_SYSCTLTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlResetCauseGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[21]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlResetCauseClear \ + ((void (*)(unsigned long ulCauses))ROM_SYSCTLTABLE[22]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlClockSet \ + ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[23]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlClockGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[24]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPWMClockSet \ + ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[25]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlPWMClockGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[26]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlADCSpeedSet \ + ((void (*)(unsigned long ulSpeed))ROM_SYSCTLTABLE[27]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlADCSpeedGet \ + ((unsigned long (*)(void))ROM_SYSCTLTABLE[28]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlGPIOAHBEnable \ + ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[29]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlGPIOAHBDisable \ + ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[30]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlUSBPLLEnable \ + ((void (*)(void))ROM_SYSCTLTABLE[31]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlUSBPLLDisable \ + ((void (*)(void))ROM_SYSCTLTABLE[32]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlI2SMClkSet \ + ((unsigned long (*)(unsigned long ulInputClock, \ + unsigned long ulMClk))ROM_SYSCTLTABLE[33]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysCtlDelay \ + ((void (*)(unsigned long ulCount))ROM_SYSCTLTABLE[34]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the SysTick API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickValueGet \ + ((unsigned long (*)(void))ROM_SYSTICKTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickEnable \ + ((void (*)(void))ROM_SYSTICKTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickDisable \ + ((void (*)(void))ROM_SYSTICKTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickIntEnable \ + ((void (*)(void))ROM_SYSTICKTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickIntDisable \ + ((void (*)(void))ROM_SYSTICKTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickPeriodSet \ + ((void (*)(unsigned long ulPeriod))ROM_SYSTICKTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_SysTickPeriodGet \ + ((unsigned long (*)(void))ROM_SYSTICKTABLE[6]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Timer API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerConfigure \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulConfig))ROM_TIMERTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlLevel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bInvert))ROM_TIMERTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bEnable))ROM_TIMERTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlEvent \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulEvent))ROM_TIMERTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlStall \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bStall))ROM_TIMERTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerRTCEnable \ + ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerRTCDisable \ + ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleMatchSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerPrescaleMatchGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerLoadSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerLoadGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerValueGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerMatchSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + unsigned long ulValue))ROM_TIMERTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerMatchGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulTimer))ROM_TIMERTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_TIMERTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_TIMERTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RC3) +#define ROM_TimerControlWaitOnTrigger \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTimer, \ + tBoolean bWait))ROM_TIMERTABLE[22]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the UART API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharPut \ + ((void (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_UARTTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTParityModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulParity))ROM_UARTTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTParityModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOLevelSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulTxLevel, \ + unsigned long ulRxLevel))ROM_UARTTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOLevelGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long *pulTxLevel, \ + unsigned long *pulRxLevel))ROM_UARTTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTConfigSetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulUARTClk, \ + unsigned long ulBaud, \ + unsigned long ulConfig))ROM_UARTTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTConfigGetExpClk \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulUARTClk, \ + unsigned long *pulBaud, \ + unsigned long *pulConfig))ROM_UARTTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTEnable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDisable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTEnableSIR \ + ((void (*)(unsigned long ulBase, \ + tBoolean bLowPower))ROM_UARTTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDisableSIR \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharsAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTSpaceAvail \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharGetNonBlocking \ + ((long (*)(unsigned long ulBase))ROM_UARTTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharGet \ + ((long (*)(unsigned long ulBase))ROM_UARTTABLE[14]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTCharPutNonBlocking \ + ((tBoolean (*)(unsigned long ulBase, \ + unsigned char ucData))ROM_UARTTABLE[15]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTBreakCtl \ + ((void (*)(unsigned long ulBase, \ + tBoolean bBreakState))ROM_UARTTABLE[16]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[17]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[18]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_UARTTABLE[19]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTIntClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_UARTTABLE[20]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UpdateUART \ + ((void (*)(void))ROM_UARTTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDMAEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_UARTTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTDMADisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulDMAFlags))ROM_UARTTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFOEnable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTFIFODisable \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTBusy \ + ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTTxIntModeSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulMode))ROM_UARTTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTTxIntModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTRxErrorGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_UARTRxErrorClear \ + ((void (*)(unsigned long ulBase))ROM_UARTTABLE[30]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the uDMA API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelTransferSet \ + ((void (*)(unsigned long ulChannelStructIndex, \ + unsigned long ulMode, \ + void *pvSrcAddr, \ + void *pvDstAddr, \ + unsigned long ulTransferSize))ROM_UDMATABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAEnable \ + ((void (*)(void))ROM_UDMATABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMADisable \ + ((void (*)(void))ROM_UDMATABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAErrorStatusGet \ + ((unsigned long (*)(void))ROM_UDMATABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAErrorStatusClear \ + ((void (*)(void))ROM_UDMATABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelEnable \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelDisable \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelIsEnabled \ + ((tBoolean (*)(unsigned long ulChannelNum))ROM_UDMATABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAControlBaseSet \ + ((void (*)(void *pControlTable))ROM_UDMATABLE[8]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAControlBaseGet \ + ((void * (*)(void))ROM_UDMATABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelRequest \ + ((void (*)(unsigned long ulChannelNum))ROM_UDMATABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeEnable \ + ((void (*)(unsigned long ulChannelNum, \ + unsigned long ulAttr))ROM_UDMATABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeDisable \ + ((void (*)(unsigned long ulChannelNum, \ + unsigned long ulAttr))ROM_UDMATABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelAttributeGet \ + ((unsigned long (*)(unsigned long ulChannelNum))ROM_UDMATABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelControlSet \ + ((void (*)(unsigned long ulChannelStructIndex, \ + unsigned long ulControl))ROM_UDMATABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSizeGet \ + ((unsigned long (*)(unsigned long ulChannelStructIndex))ROM_UDMATABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelModeGet \ + ((unsigned long (*)(unsigned long ulChannelStructIndex))ROM_UDMATABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSelectSecondary \ + ((void (*)(unsigned long ulSecPeriphs))ROM_UDMATABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_uDMAChannelSelectDefault \ + ((void (*)(unsigned long ulDefPeriphs))ROM_UDMATABLE[18]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the USB API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatus \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[0]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevAddrGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulAddress))ROM_USBTABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevConnect \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[3]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevDisconnect \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[4]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulMaxPacketSize, \ + unsigned long ulFlags))ROM_USBTABLE[5]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointDataAck \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + tBoolean bIsLastPacket))ROM_USBTABLE[6]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointStall \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[7]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointStatusClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[9]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataGet \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned char *pucData, \ + unsigned long *pulSize))ROM_USBTABLE[10]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataPut \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned char *pucData, \ + unsigned long ulSize))ROM_USBTABLE[11]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataSend \ + ((long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulTransType))ROM_USBTABLE[12]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataToggleClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[13]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[14]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[15]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOConfigGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long *pulFIFOAddress, \ + unsigned long *pulFIFOSize, \ + unsigned long ulFlags))ROM_USBTABLE[16]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFIFOConfigSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFIFOAddress, \ + unsigned long ulFIFOSize, \ + unsigned long ulFlags))ROM_USBTABLE[17]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBFrameNumberGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[19]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[20]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_USBTABLE[21]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulMaxPacketSize, \ + unsigned long ulNAKPollInterval, \ + unsigned long ulTargetEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[22]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointDataAck \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[23]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointDataToggle \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + tBoolean bDataToggle, \ + unsigned long ulFlags))ROM_USBTABLE[24]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostEndpointStatusClear \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[25]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostHubAddrGet \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulFlags))ROM_USBTABLE[26]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostHubAddrSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulAddr, \ + unsigned long ulFlags))ROM_USBTABLE[27]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrDisable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[28]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrEnable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[29]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrConfig \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulFlags))ROM_USBTABLE[30]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrFaultDisable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[31]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostPwrFaultEnable \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[32]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostRequestIN \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[33]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostRequestStatus \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[34]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostReset \ + ((void (*)(unsigned long ulBase, \ + tBoolean bStart))ROM_USBTABLE[35]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostResume \ + ((void (*)(unsigned long ulBase, \ + tBoolean bStart))ROM_USBTABLE[36]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostSpeedGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[37]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBHostSuspend \ + ((void (*)(unsigned long ulBase))ROM_USBTABLE[38]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[39]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnable \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[40]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBDevEndpointConfigGet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long *pulMaxPacketSize, \ + unsigned long *pulFlags))ROM_USBTABLE[41]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDataAvail \ + ((unsigned long (*)(unsigned long ulBase, \ + unsigned long ulEndpoint))ROM_USBTABLE[44]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBOTGHostRequest \ + ((void (*)(unsigned long ulBase, \ + tBoolean bHNP))ROM_USBTABLE[45]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBModeGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[46]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBEndpointDMAChannel \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulEndpoint, \ + unsigned long ulChannel))ROM_USBTABLE[47]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisableControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[48]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnableControl \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[49]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatusControl \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[50]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntDisableEndpoint \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[51]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntEnableEndpoint \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulIntFlags))ROM_USBTABLE[52]) +#endif +#if defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_USBIntStatusEndpoint \ + ((unsigned long (*)(unsigned long ulBase))ROM_USBTABLE[53]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Watchdog API. +// +//***************************************************************************** +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntClear \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[0]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogRunning \ + ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[1]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[2]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogResetEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[3]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogResetDisable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[4]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogLock \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[5]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogUnlock \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[6]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogLockState \ + ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[7]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogReloadSet \ + ((void (*)(unsigned long ulBase, \ + unsigned long ulLoadVal))ROM_WATCHDOGTABLE[8]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogReloadGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[9]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogValueGet \ + ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[10]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[11]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogIntStatus \ + ((unsigned long (*)(unsigned long ulBase, \ + tBoolean bMasked))ROM_WATCHDOGTABLE[12]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogStallEnable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[13]) +#endif +#if defined(TARGET_IS_DUSTDEVIL_RA0) || \ + defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_WatchdogStallDisable \ + ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[14]) +#endif + +//***************************************************************************** +// +// Macros for calling ROM functions in the Software API. +// +//***************************************************************************** +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_Crc16Array \ + ((unsigned short (*)(unsigned long ulWordLen, \ + const unsigned long *pulData))ROM_SOFTWARETABLE[1]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_Crc16Array3 \ + ((void (*)(unsigned long ulWordLen, \ + const unsigned long *pulData, \ + unsigned short *pusCrc3))ROM_SOFTWARETABLE[2]) +#endif +#if defined(TARGET_IS_TEMPEST_RB1) || \ + defined(TARGET_IS_TEMPEST_RC1) || \ + defined(TARGET_IS_TEMPEST_RC3) +#define ROM_pvAESTable \ + ((void *)&(ROM_SOFTWARETABLE[7])) +#endif + +//***************************************************************************** +// +// Deprecated ROM functions. +// +//***************************************************************************** +#ifndef DEPRECATED +#ifdef ROM_FlashIntStatus +#define ROM_FlashIntGetStatus \ + ROM_FlashIntStatus +#endif +#ifdef ROM_USBDevEndpointConfigSet +#define ROM_USBDevEndpointConfig \ + ROM_USBDevEndpointConfigSet +#endif +#ifdef ROM_USBHostPwrConfig +#define ROM_USBHostPwrFaultConfig \ + ROM_USBHostPwrConfig +#endif +#endif + +#endif // __ROM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom_map.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom_map.h new file mode 100644 index 00000000..cc6682f3 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/rom_map.h @@ -0,0 +1,3444 @@ +//***************************************************************************** +// +// rom_map.h - Macros to facilitate calling functions in the ROM when they are +// available and in flash otherwise. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __ROM_MAP_H__ +#define __ROM_MAP_H__ + +//***************************************************************************** +// +// Macros for the ADC API. +// +//***************************************************************************** +#ifdef ROM_ADCSequenceDataGet +#define MAP_ADCSequenceDataGet \ + ROM_ADCSequenceDataGet +#else +#define MAP_ADCSequenceDataGet \ + ADCSequenceDataGet +#endif +#ifdef ROM_ADCIntDisable +#define MAP_ADCIntDisable \ + ROM_ADCIntDisable +#else +#define MAP_ADCIntDisable \ + ADCIntDisable +#endif +#ifdef ROM_ADCIntEnable +#define MAP_ADCIntEnable \ + ROM_ADCIntEnable +#else +#define MAP_ADCIntEnable \ + ADCIntEnable +#endif +#ifdef ROM_ADCIntStatus +#define MAP_ADCIntStatus \ + ROM_ADCIntStatus +#else +#define MAP_ADCIntStatus \ + ADCIntStatus +#endif +#ifdef ROM_ADCIntClear +#define MAP_ADCIntClear \ + ROM_ADCIntClear +#else +#define MAP_ADCIntClear \ + ADCIntClear +#endif +#ifdef ROM_ADCSequenceEnable +#define MAP_ADCSequenceEnable \ + ROM_ADCSequenceEnable +#else +#define MAP_ADCSequenceEnable \ + ADCSequenceEnable +#endif +#ifdef ROM_ADCSequenceDisable +#define MAP_ADCSequenceDisable \ + ROM_ADCSequenceDisable +#else +#define MAP_ADCSequenceDisable \ + ADCSequenceDisable +#endif +#ifdef ROM_ADCSequenceConfigure +#define MAP_ADCSequenceConfigure \ + ROM_ADCSequenceConfigure +#else +#define MAP_ADCSequenceConfigure \ + ADCSequenceConfigure +#endif +#ifdef ROM_ADCSequenceStepConfigure +#define MAP_ADCSequenceStepConfigure \ + ROM_ADCSequenceStepConfigure +#else +#define MAP_ADCSequenceStepConfigure \ + ADCSequenceStepConfigure +#endif +#ifdef ROM_ADCSequenceOverflow +#define MAP_ADCSequenceOverflow \ + ROM_ADCSequenceOverflow +#else +#define MAP_ADCSequenceOverflow \ + ADCSequenceOverflow +#endif +#ifdef ROM_ADCSequenceOverflowClear +#define MAP_ADCSequenceOverflowClear \ + ROM_ADCSequenceOverflowClear +#else +#define MAP_ADCSequenceOverflowClear \ + ADCSequenceOverflowClear +#endif +#ifdef ROM_ADCSequenceUnderflow +#define MAP_ADCSequenceUnderflow \ + ROM_ADCSequenceUnderflow +#else +#define MAP_ADCSequenceUnderflow \ + ADCSequenceUnderflow +#endif +#ifdef ROM_ADCSequenceUnderflowClear +#define MAP_ADCSequenceUnderflowClear \ + ROM_ADCSequenceUnderflowClear +#else +#define MAP_ADCSequenceUnderflowClear \ + ADCSequenceUnderflowClear +#endif +#ifdef ROM_ADCProcessorTrigger +#define MAP_ADCProcessorTrigger \ + ROM_ADCProcessorTrigger +#else +#define MAP_ADCProcessorTrigger \ + ADCProcessorTrigger +#endif +#ifdef ROM_ADCHardwareOversampleConfigure +#define MAP_ADCHardwareOversampleConfigure \ + ROM_ADCHardwareOversampleConfigure +#else +#define MAP_ADCHardwareOversampleConfigure \ + ADCHardwareOversampleConfigure +#endif +#ifdef ROM_ADCComparatorConfigure +#define MAP_ADCComparatorConfigure \ + ROM_ADCComparatorConfigure +#else +#define MAP_ADCComparatorConfigure \ + ADCComparatorConfigure +#endif +#ifdef ROM_ADCComparatorRegionSet +#define MAP_ADCComparatorRegionSet \ + ROM_ADCComparatorRegionSet +#else +#define MAP_ADCComparatorRegionSet \ + ADCComparatorRegionSet +#endif +#ifdef ROM_ADCComparatorReset +#define MAP_ADCComparatorReset \ + ROM_ADCComparatorReset +#else +#define MAP_ADCComparatorReset \ + ADCComparatorReset +#endif +#ifdef ROM_ADCComparatorIntDisable +#define MAP_ADCComparatorIntDisable \ + ROM_ADCComparatorIntDisable +#else +#define MAP_ADCComparatorIntDisable \ + ADCComparatorIntDisable +#endif +#ifdef ROM_ADCComparatorIntEnable +#define MAP_ADCComparatorIntEnable \ + ROM_ADCComparatorIntEnable +#else +#define MAP_ADCComparatorIntEnable \ + ADCComparatorIntEnable +#endif +#ifdef ROM_ADCComparatorIntStatus +#define MAP_ADCComparatorIntStatus \ + ROM_ADCComparatorIntStatus +#else +#define MAP_ADCComparatorIntStatus \ + ADCComparatorIntStatus +#endif +#ifdef ROM_ADCComparatorIntClear +#define MAP_ADCComparatorIntClear \ + ROM_ADCComparatorIntClear +#else +#define MAP_ADCComparatorIntClear \ + ADCComparatorIntClear +#endif +#ifdef ROM_ADCReferenceSet +#define MAP_ADCReferenceSet \ + ROM_ADCReferenceSet +#else +#define MAP_ADCReferenceSet \ + ADCReferenceSet +#endif +#ifdef ROM_ADCReferenceGet +#define MAP_ADCReferenceGet \ + ROM_ADCReferenceGet +#else +#define MAP_ADCReferenceGet \ + ADCReferenceGet +#endif +#ifdef ROM_ADCPhaseDelaySet +#define MAP_ADCPhaseDelaySet \ + ROM_ADCPhaseDelaySet +#else +#define MAP_ADCPhaseDelaySet \ + ADCPhaseDelaySet +#endif +#ifdef ROM_ADCPhaseDelayGet +#define MAP_ADCPhaseDelayGet \ + ROM_ADCPhaseDelayGet +#else +#define MAP_ADCPhaseDelayGet \ + ADCPhaseDelayGet +#endif + +//***************************************************************************** +// +// Macros for the CAN API. +// +//***************************************************************************** +#ifdef ROM_CANIntClear +#define MAP_CANIntClear \ + ROM_CANIntClear +#else +#define MAP_CANIntClear \ + CANIntClear +#endif +#ifdef ROM_CANInit +#define MAP_CANInit \ + ROM_CANInit +#else +#define MAP_CANInit \ + CANInit +#endif +#ifdef ROM_CANEnable +#define MAP_CANEnable \ + ROM_CANEnable +#else +#define MAP_CANEnable \ + CANEnable +#endif +#ifdef ROM_CANDisable +#define MAP_CANDisable \ + ROM_CANDisable +#else +#define MAP_CANDisable \ + CANDisable +#endif +#ifdef ROM_CANBitTimingSet +#define MAP_CANBitTimingSet \ + ROM_CANBitTimingSet +#else +#define MAP_CANBitTimingSet \ + CANBitTimingSet +#endif +#ifdef ROM_CANBitTimingGet +#define MAP_CANBitTimingGet \ + ROM_CANBitTimingGet +#else +#define MAP_CANBitTimingGet \ + CANBitTimingGet +#endif +#ifdef ROM_CANMessageSet +#define MAP_CANMessageSet \ + ROM_CANMessageSet +#else +#define MAP_CANMessageSet \ + CANMessageSet +#endif +#ifdef ROM_CANMessageGet +#define MAP_CANMessageGet \ + ROM_CANMessageGet +#else +#define MAP_CANMessageGet \ + CANMessageGet +#endif +#ifdef ROM_CANStatusGet +#define MAP_CANStatusGet \ + ROM_CANStatusGet +#else +#define MAP_CANStatusGet \ + CANStatusGet +#endif +#ifdef ROM_CANMessageClear +#define MAP_CANMessageClear \ + ROM_CANMessageClear +#else +#define MAP_CANMessageClear \ + CANMessageClear +#endif +#ifdef ROM_CANIntEnable +#define MAP_CANIntEnable \ + ROM_CANIntEnable +#else +#define MAP_CANIntEnable \ + CANIntEnable +#endif +#ifdef ROM_CANIntDisable +#define MAP_CANIntDisable \ + ROM_CANIntDisable +#else +#define MAP_CANIntDisable \ + CANIntDisable +#endif +#ifdef ROM_CANIntStatus +#define MAP_CANIntStatus \ + ROM_CANIntStatus +#else +#define MAP_CANIntStatus \ + CANIntStatus +#endif +#ifdef ROM_CANRetryGet +#define MAP_CANRetryGet \ + ROM_CANRetryGet +#else +#define MAP_CANRetryGet \ + CANRetryGet +#endif +#ifdef ROM_CANRetrySet +#define MAP_CANRetrySet \ + ROM_CANRetrySet +#else +#define MAP_CANRetrySet \ + CANRetrySet +#endif +#ifdef ROM_CANErrCntrGet +#define MAP_CANErrCntrGet \ + ROM_CANErrCntrGet +#else +#define MAP_CANErrCntrGet \ + CANErrCntrGet +#endif +#ifdef ROM_CANBitRateSet +#define MAP_CANBitRateSet \ + ROM_CANBitRateSet +#else +#define MAP_CANBitRateSet \ + CANBitRateSet +#endif + +//***************************************************************************** +// +// Macros for the Comparator API. +// +//***************************************************************************** +#ifdef ROM_ComparatorIntClear +#define MAP_ComparatorIntClear \ + ROM_ComparatorIntClear +#else +#define MAP_ComparatorIntClear \ + ComparatorIntClear +#endif +#ifdef ROM_ComparatorConfigure +#define MAP_ComparatorConfigure \ + ROM_ComparatorConfigure +#else +#define MAP_ComparatorConfigure \ + ComparatorConfigure +#endif +#ifdef ROM_ComparatorRefSet +#define MAP_ComparatorRefSet \ + ROM_ComparatorRefSet +#else +#define MAP_ComparatorRefSet \ + ComparatorRefSet +#endif +#ifdef ROM_ComparatorValueGet +#define MAP_ComparatorValueGet \ + ROM_ComparatorValueGet +#else +#define MAP_ComparatorValueGet \ + ComparatorValueGet +#endif +#ifdef ROM_ComparatorIntEnable +#define MAP_ComparatorIntEnable \ + ROM_ComparatorIntEnable +#else +#define MAP_ComparatorIntEnable \ + ComparatorIntEnable +#endif +#ifdef ROM_ComparatorIntDisable +#define MAP_ComparatorIntDisable \ + ROM_ComparatorIntDisable +#else +#define MAP_ComparatorIntDisable \ + ComparatorIntDisable +#endif +#ifdef ROM_ComparatorIntStatus +#define MAP_ComparatorIntStatus \ + ROM_ComparatorIntStatus +#else +#define MAP_ComparatorIntStatus \ + ComparatorIntStatus +#endif + +//***************************************************************************** +// +// Macros for the Ethernet API. +// +//***************************************************************************** +#ifdef ROM_EPIIntStatus +#define MAP_EPIIntStatus \ + ROM_EPIIntStatus +#else +#define MAP_EPIIntStatus \ + EPIIntStatus +#endif +#ifdef ROM_EPIModeSet +#define MAP_EPIModeSet \ + ROM_EPIModeSet +#else +#define MAP_EPIModeSet \ + EPIModeSet +#endif +#ifdef ROM_EPIDividerSet +#define MAP_EPIDividerSet \ + ROM_EPIDividerSet +#else +#define MAP_EPIDividerSet \ + EPIDividerSet +#endif +#ifdef ROM_EPIConfigSDRAMSet +#define MAP_EPIConfigSDRAMSet \ + ROM_EPIConfigSDRAMSet +#else +#define MAP_EPIConfigSDRAMSet \ + EPIConfigSDRAMSet +#endif +#ifdef ROM_EPIConfigGPModeSet +#define MAP_EPIConfigGPModeSet \ + ROM_EPIConfigGPModeSet +#else +#define MAP_EPIConfigGPModeSet \ + EPIConfigGPModeSet +#endif +#ifdef ROM_EPIConfigHB8Set +#define MAP_EPIConfigHB8Set \ + ROM_EPIConfigHB8Set +#else +#define MAP_EPIConfigHB8Set \ + EPIConfigHB8Set +#endif +#ifdef ROM_EPIConfigHB16Set +#define MAP_EPIConfigHB16Set \ + ROM_EPIConfigHB16Set +#else +#define MAP_EPIConfigHB16Set \ + EPIConfigHB16Set +#endif +#ifdef ROM_EPIAddressMapSet +#define MAP_EPIAddressMapSet \ + ROM_EPIAddressMapSet +#else +#define MAP_EPIAddressMapSet \ + EPIAddressMapSet +#endif +#ifdef ROM_EPINonBlockingReadConfigure +#define MAP_EPINonBlockingReadConfigure \ + ROM_EPINonBlockingReadConfigure +#else +#define MAP_EPINonBlockingReadConfigure \ + EPINonBlockingReadConfigure +#endif +#ifdef ROM_EPINonBlockingReadStart +#define MAP_EPINonBlockingReadStart \ + ROM_EPINonBlockingReadStart +#else +#define MAP_EPINonBlockingReadStart \ + EPINonBlockingReadStart +#endif +#ifdef ROM_EPINonBlockingReadStop +#define MAP_EPINonBlockingReadStop \ + ROM_EPINonBlockingReadStop +#else +#define MAP_EPINonBlockingReadStop \ + EPINonBlockingReadStop +#endif +#ifdef ROM_EPINonBlockingReadCount +#define MAP_EPINonBlockingReadCount \ + ROM_EPINonBlockingReadCount +#else +#define MAP_EPINonBlockingReadCount \ + EPINonBlockingReadCount +#endif +#ifdef ROM_EPINonBlockingReadAvail +#define MAP_EPINonBlockingReadAvail \ + ROM_EPINonBlockingReadAvail +#else +#define MAP_EPINonBlockingReadAvail \ + EPINonBlockingReadAvail +#endif +#ifdef ROM_EPINonBlockingReadGet32 +#define MAP_EPINonBlockingReadGet32 \ + ROM_EPINonBlockingReadGet32 +#else +#define MAP_EPINonBlockingReadGet32 \ + EPINonBlockingReadGet32 +#endif +#ifdef ROM_EPINonBlockingReadGet16 +#define MAP_EPINonBlockingReadGet16 \ + ROM_EPINonBlockingReadGet16 +#else +#define MAP_EPINonBlockingReadGet16 \ + EPINonBlockingReadGet16 +#endif +#ifdef ROM_EPINonBlockingReadGet8 +#define MAP_EPINonBlockingReadGet8 \ + ROM_EPINonBlockingReadGet8 +#else +#define MAP_EPINonBlockingReadGet8 \ + EPINonBlockingReadGet8 +#endif +#ifdef ROM_EPIFIFOConfig +#define MAP_EPIFIFOConfig \ + ROM_EPIFIFOConfig +#else +#define MAP_EPIFIFOConfig \ + EPIFIFOConfig +#endif +#ifdef ROM_EPIWriteFIFOCountGet +#define MAP_EPIWriteFIFOCountGet \ + ROM_EPIWriteFIFOCountGet +#else +#define MAP_EPIWriteFIFOCountGet \ + EPIWriteFIFOCountGet +#endif +#ifdef ROM_EPIIntEnable +#define MAP_EPIIntEnable \ + ROM_EPIIntEnable +#else +#define MAP_EPIIntEnable \ + EPIIntEnable +#endif +#ifdef ROM_EPIIntDisable +#define MAP_EPIIntDisable \ + ROM_EPIIntDisable +#else +#define MAP_EPIIntDisable \ + EPIIntDisable +#endif +#ifdef ROM_EPIIntErrorStatus +#define MAP_EPIIntErrorStatus \ + ROM_EPIIntErrorStatus +#else +#define MAP_EPIIntErrorStatus \ + EPIIntErrorStatus +#endif +#ifdef ROM_EPIIntErrorClear +#define MAP_EPIIntErrorClear \ + ROM_EPIIntErrorClear +#else +#define MAP_EPIIntErrorClear \ + EPIIntErrorClear +#endif + +//***************************************************************************** +// +// Macros for the Ethernet API. +// +//***************************************************************************** +#ifdef ROM_EthernetIntClear +#define MAP_EthernetIntClear \ + ROM_EthernetIntClear +#else +#define MAP_EthernetIntClear \ + EthernetIntClear +#endif +#ifdef ROM_EthernetInitExpClk +#define MAP_EthernetInitExpClk \ + ROM_EthernetInitExpClk +#else +#define MAP_EthernetInitExpClk \ + EthernetInitExpClk +#endif +#ifdef ROM_EthernetConfigSet +#define MAP_EthernetConfigSet \ + ROM_EthernetConfigSet +#else +#define MAP_EthernetConfigSet \ + EthernetConfigSet +#endif +#ifdef ROM_EthernetConfigGet +#define MAP_EthernetConfigGet \ + ROM_EthernetConfigGet +#else +#define MAP_EthernetConfigGet \ + EthernetConfigGet +#endif +#ifdef ROM_EthernetMACAddrSet +#define MAP_EthernetMACAddrSet \ + ROM_EthernetMACAddrSet +#else +#define MAP_EthernetMACAddrSet \ + EthernetMACAddrSet +#endif +#ifdef ROM_EthernetMACAddrGet +#define MAP_EthernetMACAddrGet \ + ROM_EthernetMACAddrGet +#else +#define MAP_EthernetMACAddrGet \ + EthernetMACAddrGet +#endif +#ifdef ROM_EthernetEnable +#define MAP_EthernetEnable \ + ROM_EthernetEnable +#else +#define MAP_EthernetEnable \ + EthernetEnable +#endif +#ifdef ROM_EthernetDisable +#define MAP_EthernetDisable \ + ROM_EthernetDisable +#else +#define MAP_EthernetDisable \ + EthernetDisable +#endif +#ifdef ROM_EthernetPacketAvail +#define MAP_EthernetPacketAvail \ + ROM_EthernetPacketAvail +#else +#define MAP_EthernetPacketAvail \ + EthernetPacketAvail +#endif +#ifdef ROM_EthernetSpaceAvail +#define MAP_EthernetSpaceAvail \ + ROM_EthernetSpaceAvail +#else +#define MAP_EthernetSpaceAvail \ + EthernetSpaceAvail +#endif +#ifdef ROM_EthernetPacketGetNonBlocking +#define MAP_EthernetPacketGetNonBlocking \ + ROM_EthernetPacketGetNonBlocking +#else +#define MAP_EthernetPacketGetNonBlocking \ + EthernetPacketGetNonBlocking +#endif +#ifdef ROM_EthernetPacketGet +#define MAP_EthernetPacketGet \ + ROM_EthernetPacketGet +#else +#define MAP_EthernetPacketGet \ + EthernetPacketGet +#endif +#ifdef ROM_EthernetPacketPutNonBlocking +#define MAP_EthernetPacketPutNonBlocking \ + ROM_EthernetPacketPutNonBlocking +#else +#define MAP_EthernetPacketPutNonBlocking \ + EthernetPacketPutNonBlocking +#endif +#ifdef ROM_EthernetPacketPut +#define MAP_EthernetPacketPut \ + ROM_EthernetPacketPut +#else +#define MAP_EthernetPacketPut \ + EthernetPacketPut +#endif +#ifdef ROM_EthernetIntEnable +#define MAP_EthernetIntEnable \ + ROM_EthernetIntEnable +#else +#define MAP_EthernetIntEnable \ + EthernetIntEnable +#endif +#ifdef ROM_EthernetIntDisable +#define MAP_EthernetIntDisable \ + ROM_EthernetIntDisable +#else +#define MAP_EthernetIntDisable \ + EthernetIntDisable +#endif +#ifdef ROM_EthernetIntStatus +#define MAP_EthernetIntStatus \ + ROM_EthernetIntStatus +#else +#define MAP_EthernetIntStatus \ + EthernetIntStatus +#endif +#ifdef ROM_EthernetPHYWrite +#define MAP_EthernetPHYWrite \ + ROM_EthernetPHYWrite +#else +#define MAP_EthernetPHYWrite \ + EthernetPHYWrite +#endif +#ifdef ROM_EthernetPHYRead +#define MAP_EthernetPHYRead \ + ROM_EthernetPHYRead +#else +#define MAP_EthernetPHYRead \ + EthernetPHYRead +#endif + +//***************************************************************************** +// +// Macros for the Flash API. +// +//***************************************************************************** +#ifdef ROM_FlashProgram +#define MAP_FlashProgram \ + ROM_FlashProgram +#else +#define MAP_FlashProgram \ + FlashProgram +#endif +#ifdef ROM_FlashUsecGet +#define MAP_FlashUsecGet \ + ROM_FlashUsecGet +#else +#define MAP_FlashUsecGet \ + FlashUsecGet +#endif +#ifdef ROM_FlashUsecSet +#define MAP_FlashUsecSet \ + ROM_FlashUsecSet +#else +#define MAP_FlashUsecSet \ + FlashUsecSet +#endif +#ifdef ROM_FlashErase +#define MAP_FlashErase \ + ROM_FlashErase +#else +#define MAP_FlashErase \ + FlashErase +#endif +#ifdef ROM_FlashProtectGet +#define MAP_FlashProtectGet \ + ROM_FlashProtectGet +#else +#define MAP_FlashProtectGet \ + FlashProtectGet +#endif +#ifdef ROM_FlashProtectSet +#define MAP_FlashProtectSet \ + ROM_FlashProtectSet +#else +#define MAP_FlashProtectSet \ + FlashProtectSet +#endif +#ifdef ROM_FlashProtectSave +#define MAP_FlashProtectSave \ + ROM_FlashProtectSave +#else +#define MAP_FlashProtectSave \ + FlashProtectSave +#endif +#ifdef ROM_FlashUserGet +#define MAP_FlashUserGet \ + ROM_FlashUserGet +#else +#define MAP_FlashUserGet \ + FlashUserGet +#endif +#ifdef ROM_FlashUserSet +#define MAP_FlashUserSet \ + ROM_FlashUserSet +#else +#define MAP_FlashUserSet \ + FlashUserSet +#endif +#ifdef ROM_FlashUserSave +#define MAP_FlashUserSave \ + ROM_FlashUserSave +#else +#define MAP_FlashUserSave \ + FlashUserSave +#endif +#ifdef ROM_FlashIntEnable +#define MAP_FlashIntEnable \ + ROM_FlashIntEnable +#else +#define MAP_FlashIntEnable \ + FlashIntEnable +#endif +#ifdef ROM_FlashIntDisable +#define MAP_FlashIntDisable \ + ROM_FlashIntDisable +#else +#define MAP_FlashIntDisable \ + FlashIntDisable +#endif +#ifdef ROM_FlashIntStatus +#define MAP_FlashIntStatus \ + ROM_FlashIntStatus +#else +#define MAP_FlashIntStatus \ + FlashIntStatus +#endif +#ifdef ROM_FlashIntClear +#define MAP_FlashIntClear \ + ROM_FlashIntClear +#else +#define MAP_FlashIntClear \ + FlashIntClear +#endif + +//***************************************************************************** +// +// Macros for the GPIO API. +// +//***************************************************************************** +#ifdef ROM_GPIOPinWrite +#define MAP_GPIOPinWrite \ + ROM_GPIOPinWrite +#else +#define MAP_GPIOPinWrite \ + GPIOPinWrite +#endif +#ifdef ROM_GPIODirModeSet +#define MAP_GPIODirModeSet \ + ROM_GPIODirModeSet +#else +#define MAP_GPIODirModeSet \ + GPIODirModeSet +#endif +#ifdef ROM_GPIODirModeGet +#define MAP_GPIODirModeGet \ + ROM_GPIODirModeGet +#else +#define MAP_GPIODirModeGet \ + GPIODirModeGet +#endif +#ifdef ROM_GPIOIntTypeSet +#define MAP_GPIOIntTypeSet \ + ROM_GPIOIntTypeSet +#else +#define MAP_GPIOIntTypeSet \ + GPIOIntTypeSet +#endif +#ifdef ROM_GPIOIntTypeGet +#define MAP_GPIOIntTypeGet \ + ROM_GPIOIntTypeGet +#else +#define MAP_GPIOIntTypeGet \ + GPIOIntTypeGet +#endif +#ifdef ROM_GPIOPadConfigSet +#define MAP_GPIOPadConfigSet \ + ROM_GPIOPadConfigSet +#else +#define MAP_GPIOPadConfigSet \ + GPIOPadConfigSet +#endif +#ifdef ROM_GPIOPadConfigGet +#define MAP_GPIOPadConfigGet \ + ROM_GPIOPadConfigGet +#else +#define MAP_GPIOPadConfigGet \ + GPIOPadConfigGet +#endif +#ifdef ROM_GPIOPinIntEnable +#define MAP_GPIOPinIntEnable \ + ROM_GPIOPinIntEnable +#else +#define MAP_GPIOPinIntEnable \ + GPIOPinIntEnable +#endif +#ifdef ROM_GPIOPinIntDisable +#define MAP_GPIOPinIntDisable \ + ROM_GPIOPinIntDisable +#else +#define MAP_GPIOPinIntDisable \ + GPIOPinIntDisable +#endif +#ifdef ROM_GPIOPinIntStatus +#define MAP_GPIOPinIntStatus \ + ROM_GPIOPinIntStatus +#else +#define MAP_GPIOPinIntStatus \ + GPIOPinIntStatus +#endif +#ifdef ROM_GPIOPinIntClear +#define MAP_GPIOPinIntClear \ + ROM_GPIOPinIntClear +#else +#define MAP_GPIOPinIntClear \ + GPIOPinIntClear +#endif +#ifdef ROM_GPIOPinRead +#define MAP_GPIOPinRead \ + ROM_GPIOPinRead +#else +#define MAP_GPIOPinRead \ + GPIOPinRead +#endif +#ifdef ROM_GPIOPinTypeCAN +#define MAP_GPIOPinTypeCAN \ + ROM_GPIOPinTypeCAN +#else +#define MAP_GPIOPinTypeCAN \ + GPIOPinTypeCAN +#endif +#ifdef ROM_GPIOPinTypeComparator +#define MAP_GPIOPinTypeComparator \ + ROM_GPIOPinTypeComparator +#else +#define MAP_GPIOPinTypeComparator \ + GPIOPinTypeComparator +#endif +#ifdef ROM_GPIOPinTypeGPIOInput +#define MAP_GPIOPinTypeGPIOInput \ + ROM_GPIOPinTypeGPIOInput +#else +#define MAP_GPIOPinTypeGPIOInput \ + GPIOPinTypeGPIOInput +#endif +#ifdef ROM_GPIOPinTypeGPIOOutput +#define MAP_GPIOPinTypeGPIOOutput \ + ROM_GPIOPinTypeGPIOOutput +#else +#define MAP_GPIOPinTypeGPIOOutput \ + GPIOPinTypeGPIOOutput +#endif +#ifdef ROM_GPIOPinTypeI2C +#define MAP_GPIOPinTypeI2C \ + ROM_GPIOPinTypeI2C +#else +#define MAP_GPIOPinTypeI2C \ + GPIOPinTypeI2C +#endif +#ifdef ROM_GPIOPinTypePWM +#define MAP_GPIOPinTypePWM \ + ROM_GPIOPinTypePWM +#else +#define MAP_GPIOPinTypePWM \ + GPIOPinTypePWM +#endif +#ifdef ROM_GPIOPinTypeQEI +#define MAP_GPIOPinTypeQEI \ + ROM_GPIOPinTypeQEI +#else +#define MAP_GPIOPinTypeQEI \ + GPIOPinTypeQEI +#endif +#ifdef ROM_GPIOPinTypeSSI +#define MAP_GPIOPinTypeSSI \ + ROM_GPIOPinTypeSSI +#else +#define MAP_GPIOPinTypeSSI \ + GPIOPinTypeSSI +#endif +#ifdef ROM_GPIOPinTypeTimer +#define MAP_GPIOPinTypeTimer \ + ROM_GPIOPinTypeTimer +#else +#define MAP_GPIOPinTypeTimer \ + GPIOPinTypeTimer +#endif +#ifdef ROM_GPIOPinTypeUART +#define MAP_GPIOPinTypeUART \ + ROM_GPIOPinTypeUART +#else +#define MAP_GPIOPinTypeUART \ + GPIOPinTypeUART +#endif +#ifdef ROM_GPIOPinTypeGPIOOutputOD +#define MAP_GPIOPinTypeGPIOOutputOD \ + ROM_GPIOPinTypeGPIOOutputOD +#else +#define MAP_GPIOPinTypeGPIOOutputOD \ + GPIOPinTypeGPIOOutputOD +#endif +#ifdef ROM_GPIOPinTypeADC +#define MAP_GPIOPinTypeADC \ + ROM_GPIOPinTypeADC +#else +#define MAP_GPIOPinTypeADC \ + GPIOPinTypeADC +#endif +#ifdef ROM_GPIOPinTypeUSBDigital +#define MAP_GPIOPinTypeUSBDigital \ + ROM_GPIOPinTypeUSBDigital +#else +#define MAP_GPIOPinTypeUSBDigital \ + GPIOPinTypeUSBDigital +#endif +#ifdef ROM_GPIOPinTypeI2S +#define MAP_GPIOPinTypeI2S \ + ROM_GPIOPinTypeI2S +#else +#define MAP_GPIOPinTypeI2S \ + GPIOPinTypeI2S +#endif +#ifdef ROM_GPIOPinConfigure +#define MAP_GPIOPinConfigure \ + ROM_GPIOPinConfigure +#else +#define MAP_GPIOPinConfigure \ + GPIOPinConfigure +#endif +#ifdef ROM_GPIOPinTypeEthernetLED +#define MAP_GPIOPinTypeEthernetLED \ + ROM_GPIOPinTypeEthernetLED +#else +#define MAP_GPIOPinTypeEthernetLED \ + GPIOPinTypeEthernetLED +#endif +#ifdef ROM_GPIOPinTypeUSBAnalog +#define MAP_GPIOPinTypeUSBAnalog \ + ROM_GPIOPinTypeUSBAnalog +#else +#define MAP_GPIOPinTypeUSBAnalog \ + GPIOPinTypeUSBAnalog +#endif +#ifdef ROM_GPIOPinTypeEPI +#define MAP_GPIOPinTypeEPI \ + ROM_GPIOPinTypeEPI +#else +#define MAP_GPIOPinTypeEPI \ + GPIOPinTypeEPI +#endif +#ifdef ROM_GPIOPinTypeEthernetMII +#define MAP_GPIOPinTypeEthernetMII \ + ROM_GPIOPinTypeEthernetMII +#else +#define MAP_GPIOPinTypeEthernetMII \ + GPIOPinTypeEthernetMII +#endif + +//***************************************************************************** +// +// Macros for the Hibernate API. +// +//***************************************************************************** +#ifdef ROM_HibernateIntClear +#define MAP_HibernateIntClear \ + ROM_HibernateIntClear +#else +#define MAP_HibernateIntClear \ + HibernateIntClear +#endif +#ifdef ROM_HibernateEnableExpClk +#define MAP_HibernateEnableExpClk \ + ROM_HibernateEnableExpClk +#else +#define MAP_HibernateEnableExpClk \ + HibernateEnableExpClk +#endif +#ifdef ROM_HibernateDisable +#define MAP_HibernateDisable \ + ROM_HibernateDisable +#else +#define MAP_HibernateDisable \ + HibernateDisable +#endif +#ifdef ROM_HibernateClockSelect +#define MAP_HibernateClockSelect \ + ROM_HibernateClockSelect +#else +#define MAP_HibernateClockSelect \ + HibernateClockSelect +#endif +#ifdef ROM_HibernateRTCEnable +#define MAP_HibernateRTCEnable \ + ROM_HibernateRTCEnable +#else +#define MAP_HibernateRTCEnable \ + HibernateRTCEnable +#endif +#ifdef ROM_HibernateRTCDisable +#define MAP_HibernateRTCDisable \ + ROM_HibernateRTCDisable +#else +#define MAP_HibernateRTCDisable \ + HibernateRTCDisable +#endif +#ifdef ROM_HibernateWakeSet +#define MAP_HibernateWakeSet \ + ROM_HibernateWakeSet +#else +#define MAP_HibernateWakeSet \ + HibernateWakeSet +#endif +#ifdef ROM_HibernateWakeGet +#define MAP_HibernateWakeGet \ + ROM_HibernateWakeGet +#else +#define MAP_HibernateWakeGet \ + HibernateWakeGet +#endif +#ifdef ROM_HibernateLowBatSet +#define MAP_HibernateLowBatSet \ + ROM_HibernateLowBatSet +#else +#define MAP_HibernateLowBatSet \ + HibernateLowBatSet +#endif +#ifdef ROM_HibernateLowBatGet +#define MAP_HibernateLowBatGet \ + ROM_HibernateLowBatGet +#else +#define MAP_HibernateLowBatGet \ + HibernateLowBatGet +#endif +#ifdef ROM_HibernateRTCSet +#define MAP_HibernateRTCSet \ + ROM_HibernateRTCSet +#else +#define MAP_HibernateRTCSet \ + HibernateRTCSet +#endif +#ifdef ROM_HibernateRTCGet +#define MAP_HibernateRTCGet \ + ROM_HibernateRTCGet +#else +#define MAP_HibernateRTCGet \ + HibernateRTCGet +#endif +#ifdef ROM_HibernateRTCMatch0Set +#define MAP_HibernateRTCMatch0Set \ + ROM_HibernateRTCMatch0Set +#else +#define MAP_HibernateRTCMatch0Set \ + HibernateRTCMatch0Set +#endif +#ifdef ROM_HibernateRTCMatch0Get +#define MAP_HibernateRTCMatch0Get \ + ROM_HibernateRTCMatch0Get +#else +#define MAP_HibernateRTCMatch0Get \ + HibernateRTCMatch0Get +#endif +#ifdef ROM_HibernateRTCMatch1Set +#define MAP_HibernateRTCMatch1Set \ + ROM_HibernateRTCMatch1Set +#else +#define MAP_HibernateRTCMatch1Set \ + HibernateRTCMatch1Set +#endif +#ifdef ROM_HibernateRTCMatch1Get +#define MAP_HibernateRTCMatch1Get \ + ROM_HibernateRTCMatch1Get +#else +#define MAP_HibernateRTCMatch1Get \ + HibernateRTCMatch1Get +#endif +#ifdef ROM_HibernateRTCTrimSet +#define MAP_HibernateRTCTrimSet \ + ROM_HibernateRTCTrimSet +#else +#define MAP_HibernateRTCTrimSet \ + HibernateRTCTrimSet +#endif +#ifdef ROM_HibernateRTCTrimGet +#define MAP_HibernateRTCTrimGet \ + ROM_HibernateRTCTrimGet +#else +#define MAP_HibernateRTCTrimGet \ + HibernateRTCTrimGet +#endif +#ifdef ROM_HibernateDataSet +#define MAP_HibernateDataSet \ + ROM_HibernateDataSet +#else +#define MAP_HibernateDataSet \ + HibernateDataSet +#endif +#ifdef ROM_HibernateDataGet +#define MAP_HibernateDataGet \ + ROM_HibernateDataGet +#else +#define MAP_HibernateDataGet \ + HibernateDataGet +#endif +#ifdef ROM_HibernateRequest +#define MAP_HibernateRequest \ + ROM_HibernateRequest +#else +#define MAP_HibernateRequest \ + HibernateRequest +#endif +#ifdef ROM_HibernateIntEnable +#define MAP_HibernateIntEnable \ + ROM_HibernateIntEnable +#else +#define MAP_HibernateIntEnable \ + HibernateIntEnable +#endif +#ifdef ROM_HibernateIntDisable +#define MAP_HibernateIntDisable \ + ROM_HibernateIntDisable +#else +#define MAP_HibernateIntDisable \ + HibernateIntDisable +#endif +#ifdef ROM_HibernateIntStatus +#define MAP_HibernateIntStatus \ + ROM_HibernateIntStatus +#else +#define MAP_HibernateIntStatus \ + HibernateIntStatus +#endif +#ifdef ROM_HibernateIsActive +#define MAP_HibernateIsActive \ + ROM_HibernateIsActive +#else +#define MAP_HibernateIsActive \ + HibernateIsActive +#endif + +//***************************************************************************** +// +// Macros for the I2C API. +// +//***************************************************************************** +#ifdef ROM_I2CMasterDataPut +#define MAP_I2CMasterDataPut \ + ROM_I2CMasterDataPut +#else +#define MAP_I2CMasterDataPut \ + I2CMasterDataPut +#endif +#ifdef ROM_I2CMasterInitExpClk +#define MAP_I2CMasterInitExpClk \ + ROM_I2CMasterInitExpClk +#else +#define MAP_I2CMasterInitExpClk \ + I2CMasterInitExpClk +#endif +#ifdef ROM_I2CSlaveInit +#define MAP_I2CSlaveInit \ + ROM_I2CSlaveInit +#else +#define MAP_I2CSlaveInit \ + I2CSlaveInit +#endif +#ifdef ROM_I2CMasterEnable +#define MAP_I2CMasterEnable \ + ROM_I2CMasterEnable +#else +#define MAP_I2CMasterEnable \ + I2CMasterEnable +#endif +#ifdef ROM_I2CSlaveEnable +#define MAP_I2CSlaveEnable \ + ROM_I2CSlaveEnable +#else +#define MAP_I2CSlaveEnable \ + I2CSlaveEnable +#endif +#ifdef ROM_I2CMasterDisable +#define MAP_I2CMasterDisable \ + ROM_I2CMasterDisable +#else +#define MAP_I2CMasterDisable \ + I2CMasterDisable +#endif +#ifdef ROM_I2CSlaveDisable +#define MAP_I2CSlaveDisable \ + ROM_I2CSlaveDisable +#else +#define MAP_I2CSlaveDisable \ + I2CSlaveDisable +#endif +#ifdef ROM_I2CMasterIntEnable +#define MAP_I2CMasterIntEnable \ + ROM_I2CMasterIntEnable +#else +#define MAP_I2CMasterIntEnable \ + I2CMasterIntEnable +#endif +#ifdef ROM_I2CSlaveIntEnable +#define MAP_I2CSlaveIntEnable \ + ROM_I2CSlaveIntEnable +#else +#define MAP_I2CSlaveIntEnable \ + I2CSlaveIntEnable +#endif +#ifdef ROM_I2CMasterIntDisable +#define MAP_I2CMasterIntDisable \ + ROM_I2CMasterIntDisable +#else +#define MAP_I2CMasterIntDisable \ + I2CMasterIntDisable +#endif +#ifdef ROM_I2CSlaveIntDisable +#define MAP_I2CSlaveIntDisable \ + ROM_I2CSlaveIntDisable +#else +#define MAP_I2CSlaveIntDisable \ + I2CSlaveIntDisable +#endif +#ifdef ROM_I2CMasterIntStatus +#define MAP_I2CMasterIntStatus \ + ROM_I2CMasterIntStatus +#else +#define MAP_I2CMasterIntStatus \ + I2CMasterIntStatus +#endif +#ifdef ROM_I2CSlaveIntStatus +#define MAP_I2CSlaveIntStatus \ + ROM_I2CSlaveIntStatus +#else +#define MAP_I2CSlaveIntStatus \ + I2CSlaveIntStatus +#endif +#ifdef ROM_I2CMasterIntClear +#define MAP_I2CMasterIntClear \ + ROM_I2CMasterIntClear +#else +#define MAP_I2CMasterIntClear \ + I2CMasterIntClear +#endif +#ifdef ROM_I2CSlaveIntClear +#define MAP_I2CSlaveIntClear \ + ROM_I2CSlaveIntClear +#else +#define MAP_I2CSlaveIntClear \ + I2CSlaveIntClear +#endif +#ifdef ROM_I2CMasterSlaveAddrSet +#define MAP_I2CMasterSlaveAddrSet \ + ROM_I2CMasterSlaveAddrSet +#else +#define MAP_I2CMasterSlaveAddrSet \ + I2CMasterSlaveAddrSet +#endif +#ifdef ROM_I2CMasterBusy +#define MAP_I2CMasterBusy \ + ROM_I2CMasterBusy +#else +#define MAP_I2CMasterBusy \ + I2CMasterBusy +#endif +#ifdef ROM_I2CMasterBusBusy +#define MAP_I2CMasterBusBusy \ + ROM_I2CMasterBusBusy +#else +#define MAP_I2CMasterBusBusy \ + I2CMasterBusBusy +#endif +#ifdef ROM_I2CMasterControl +#define MAP_I2CMasterControl \ + ROM_I2CMasterControl +#else +#define MAP_I2CMasterControl \ + I2CMasterControl +#endif +#ifdef ROM_I2CMasterErr +#define MAP_I2CMasterErr \ + ROM_I2CMasterErr +#else +#define MAP_I2CMasterErr \ + I2CMasterErr +#endif +#ifdef ROM_I2CMasterDataGet +#define MAP_I2CMasterDataGet \ + ROM_I2CMasterDataGet +#else +#define MAP_I2CMasterDataGet \ + I2CMasterDataGet +#endif +#ifdef ROM_I2CSlaveStatus +#define MAP_I2CSlaveStatus \ + ROM_I2CSlaveStatus +#else +#define MAP_I2CSlaveStatus \ + I2CSlaveStatus +#endif +#ifdef ROM_I2CSlaveDataPut +#define MAP_I2CSlaveDataPut \ + ROM_I2CSlaveDataPut +#else +#define MAP_I2CSlaveDataPut \ + I2CSlaveDataPut +#endif +#ifdef ROM_I2CSlaveDataGet +#define MAP_I2CSlaveDataGet \ + ROM_I2CSlaveDataGet +#else +#define MAP_I2CSlaveDataGet \ + I2CSlaveDataGet +#endif +#ifdef ROM_I2CSlaveIntEnableEx +#define MAP_I2CSlaveIntEnableEx \ + ROM_I2CSlaveIntEnableEx +#else +#define MAP_I2CSlaveIntEnableEx \ + I2CSlaveIntEnableEx +#endif +#ifdef ROM_I2CSlaveIntDisableEx +#define MAP_I2CSlaveIntDisableEx \ + ROM_I2CSlaveIntDisableEx +#else +#define MAP_I2CSlaveIntDisableEx \ + I2CSlaveIntDisableEx +#endif +#ifdef ROM_I2CSlaveIntStatusEx +#define MAP_I2CSlaveIntStatusEx \ + ROM_I2CSlaveIntStatusEx +#else +#define MAP_I2CSlaveIntStatusEx \ + I2CSlaveIntStatusEx +#endif +#ifdef ROM_I2CSlaveIntClearEx +#define MAP_I2CSlaveIntClearEx \ + ROM_I2CSlaveIntClearEx +#else +#define MAP_I2CSlaveIntClearEx \ + I2CSlaveIntClearEx +#endif + +//***************************************************************************** +// +// Macros for the I2S API. +// +//***************************************************************************** +#ifdef ROM_I2SIntStatus +#define MAP_I2SIntStatus \ + ROM_I2SIntStatus +#else +#define MAP_I2SIntStatus \ + I2SIntStatus +#endif +#ifdef ROM_I2STxEnable +#define MAP_I2STxEnable \ + ROM_I2STxEnable +#else +#define MAP_I2STxEnable \ + I2STxEnable +#endif +#ifdef ROM_I2STxDisable +#define MAP_I2STxDisable \ + ROM_I2STxDisable +#else +#define MAP_I2STxDisable \ + I2STxDisable +#endif +#ifdef ROM_I2STxDataPut +#define MAP_I2STxDataPut \ + ROM_I2STxDataPut +#else +#define MAP_I2STxDataPut \ + I2STxDataPut +#endif +#ifdef ROM_I2STxDataPutNonBlocking +#define MAP_I2STxDataPutNonBlocking \ + ROM_I2STxDataPutNonBlocking +#else +#define MAP_I2STxDataPutNonBlocking \ + I2STxDataPutNonBlocking +#endif +#ifdef ROM_I2STxConfigSet +#define MAP_I2STxConfigSet \ + ROM_I2STxConfigSet +#else +#define MAP_I2STxConfigSet \ + I2STxConfigSet +#endif +#ifdef ROM_I2STxFIFOLimitSet +#define MAP_I2STxFIFOLimitSet \ + ROM_I2STxFIFOLimitSet +#else +#define MAP_I2STxFIFOLimitSet \ + I2STxFIFOLimitSet +#endif +#ifdef ROM_I2STxFIFOLimitGet +#define MAP_I2STxFIFOLimitGet \ + ROM_I2STxFIFOLimitGet +#else +#define MAP_I2STxFIFOLimitGet \ + I2STxFIFOLimitGet +#endif +#ifdef ROM_I2STxFIFOLevelGet +#define MAP_I2STxFIFOLevelGet \ + ROM_I2STxFIFOLevelGet +#else +#define MAP_I2STxFIFOLevelGet \ + I2STxFIFOLevelGet +#endif +#ifdef ROM_I2SRxEnable +#define MAP_I2SRxEnable \ + ROM_I2SRxEnable +#else +#define MAP_I2SRxEnable \ + I2SRxEnable +#endif +#ifdef ROM_I2SRxDisable +#define MAP_I2SRxDisable \ + ROM_I2SRxDisable +#else +#define MAP_I2SRxDisable \ + I2SRxDisable +#endif +#ifdef ROM_I2SRxDataGet +#define MAP_I2SRxDataGet \ + ROM_I2SRxDataGet +#else +#define MAP_I2SRxDataGet \ + I2SRxDataGet +#endif +#ifdef ROM_I2SRxDataGetNonBlocking +#define MAP_I2SRxDataGetNonBlocking \ + ROM_I2SRxDataGetNonBlocking +#else +#define MAP_I2SRxDataGetNonBlocking \ + I2SRxDataGetNonBlocking +#endif +#ifdef ROM_I2SRxConfigSet +#define MAP_I2SRxConfigSet \ + ROM_I2SRxConfigSet +#else +#define MAP_I2SRxConfigSet \ + I2SRxConfigSet +#endif +#ifdef ROM_I2SRxFIFOLimitSet +#define MAP_I2SRxFIFOLimitSet \ + ROM_I2SRxFIFOLimitSet +#else +#define MAP_I2SRxFIFOLimitSet \ + I2SRxFIFOLimitSet +#endif +#ifdef ROM_I2SRxFIFOLimitGet +#define MAP_I2SRxFIFOLimitGet \ + ROM_I2SRxFIFOLimitGet +#else +#define MAP_I2SRxFIFOLimitGet \ + I2SRxFIFOLimitGet +#endif +#ifdef ROM_I2SRxFIFOLevelGet +#define MAP_I2SRxFIFOLevelGet \ + ROM_I2SRxFIFOLevelGet +#else +#define MAP_I2SRxFIFOLevelGet \ + I2SRxFIFOLevelGet +#endif +#ifdef ROM_I2STxRxEnable +#define MAP_I2STxRxEnable \ + ROM_I2STxRxEnable +#else +#define MAP_I2STxRxEnable \ + I2STxRxEnable +#endif +#ifdef ROM_I2STxRxDisable +#define MAP_I2STxRxDisable \ + ROM_I2STxRxDisable +#else +#define MAP_I2STxRxDisable \ + I2STxRxDisable +#endif +#ifdef ROM_I2STxRxConfigSet +#define MAP_I2STxRxConfigSet \ + ROM_I2STxRxConfigSet +#else +#define MAP_I2STxRxConfigSet \ + I2STxRxConfigSet +#endif +#ifdef ROM_I2SMasterClockSelect +#define MAP_I2SMasterClockSelect \ + ROM_I2SMasterClockSelect +#else +#define MAP_I2SMasterClockSelect \ + I2SMasterClockSelect +#endif +#ifdef ROM_I2SIntEnable +#define MAP_I2SIntEnable \ + ROM_I2SIntEnable +#else +#define MAP_I2SIntEnable \ + I2SIntEnable +#endif +#ifdef ROM_I2SIntDisable +#define MAP_I2SIntDisable \ + ROM_I2SIntDisable +#else +#define MAP_I2SIntDisable \ + I2SIntDisable +#endif +#ifdef ROM_I2SIntClear +#define MAP_I2SIntClear \ + ROM_I2SIntClear +#else +#define MAP_I2SIntClear \ + I2SIntClear +#endif + +//***************************************************************************** +// +// Macros for the Interrupt API. +// +//***************************************************************************** +#ifdef ROM_IntEnable +#define MAP_IntEnable \ + ROM_IntEnable +#else +#define MAP_IntEnable \ + IntEnable +#endif +#ifdef ROM_IntMasterEnable +#define MAP_IntMasterEnable \ + ROM_IntMasterEnable +#else +#define MAP_IntMasterEnable \ + IntMasterEnable +#endif +#ifdef ROM_IntMasterDisable +#define MAP_IntMasterDisable \ + ROM_IntMasterDisable +#else +#define MAP_IntMasterDisable \ + IntMasterDisable +#endif +#ifdef ROM_IntDisable +#define MAP_IntDisable \ + ROM_IntDisable +#else +#define MAP_IntDisable \ + IntDisable +#endif +#ifdef ROM_IntPriorityGroupingSet +#define MAP_IntPriorityGroupingSet \ + ROM_IntPriorityGroupingSet +#else +#define MAP_IntPriorityGroupingSet \ + IntPriorityGroupingSet +#endif +#ifdef ROM_IntPriorityGroupingGet +#define MAP_IntPriorityGroupingGet \ + ROM_IntPriorityGroupingGet +#else +#define MAP_IntPriorityGroupingGet \ + IntPriorityGroupingGet +#endif +#ifdef ROM_IntPrioritySet +#define MAP_IntPrioritySet \ + ROM_IntPrioritySet +#else +#define MAP_IntPrioritySet \ + IntPrioritySet +#endif +#ifdef ROM_IntPriorityGet +#define MAP_IntPriorityGet \ + ROM_IntPriorityGet +#else +#define MAP_IntPriorityGet \ + IntPriorityGet +#endif +#ifdef ROM_IntPendSet +#define MAP_IntPendSet \ + ROM_IntPendSet +#else +#define MAP_IntPendSet \ + IntPendSet +#endif +#ifdef ROM_IntPendClear +#define MAP_IntPendClear \ + ROM_IntPendClear +#else +#define MAP_IntPendClear \ + IntPendClear +#endif + +//***************************************************************************** +// +// Macros for the MPU API. +// +//***************************************************************************** +#ifdef ROM_MPUEnable +#define MAP_MPUEnable \ + ROM_MPUEnable +#else +#define MAP_MPUEnable \ + MPUEnable +#endif +#ifdef ROM_MPUDisable +#define MAP_MPUDisable \ + ROM_MPUDisable +#else +#define MAP_MPUDisable \ + MPUDisable +#endif +#ifdef ROM_MPURegionCountGet +#define MAP_MPURegionCountGet \ + ROM_MPURegionCountGet +#else +#define MAP_MPURegionCountGet \ + MPURegionCountGet +#endif +#ifdef ROM_MPURegionEnable +#define MAP_MPURegionEnable \ + ROM_MPURegionEnable +#else +#define MAP_MPURegionEnable \ + MPURegionEnable +#endif +#ifdef ROM_MPURegionDisable +#define MAP_MPURegionDisable \ + ROM_MPURegionDisable +#else +#define MAP_MPURegionDisable \ + MPURegionDisable +#endif +#ifdef ROM_MPURegionSet +#define MAP_MPURegionSet \ + ROM_MPURegionSet +#else +#define MAP_MPURegionSet \ + MPURegionSet +#endif +#ifdef ROM_MPURegionGet +#define MAP_MPURegionGet \ + ROM_MPURegionGet +#else +#define MAP_MPURegionGet \ + MPURegionGet +#endif + +//***************************************************************************** +// +// Macros for the PWM API. +// +//***************************************************************************** +#ifdef ROM_PWMPulseWidthSet +#define MAP_PWMPulseWidthSet \ + ROM_PWMPulseWidthSet +#else +#define MAP_PWMPulseWidthSet \ + PWMPulseWidthSet +#endif +#ifdef ROM_PWMGenConfigure +#define MAP_PWMGenConfigure \ + ROM_PWMGenConfigure +#else +#define MAP_PWMGenConfigure \ + PWMGenConfigure +#endif +#ifdef ROM_PWMGenPeriodSet +#define MAP_PWMGenPeriodSet \ + ROM_PWMGenPeriodSet +#else +#define MAP_PWMGenPeriodSet \ + PWMGenPeriodSet +#endif +#ifdef ROM_PWMGenPeriodGet +#define MAP_PWMGenPeriodGet \ + ROM_PWMGenPeriodGet +#else +#define MAP_PWMGenPeriodGet \ + PWMGenPeriodGet +#endif +#ifdef ROM_PWMGenEnable +#define MAP_PWMGenEnable \ + ROM_PWMGenEnable +#else +#define MAP_PWMGenEnable \ + PWMGenEnable +#endif +#ifdef ROM_PWMGenDisable +#define MAP_PWMGenDisable \ + ROM_PWMGenDisable +#else +#define MAP_PWMGenDisable \ + PWMGenDisable +#endif +#ifdef ROM_PWMPulseWidthGet +#define MAP_PWMPulseWidthGet \ + ROM_PWMPulseWidthGet +#else +#define MAP_PWMPulseWidthGet \ + PWMPulseWidthGet +#endif +#ifdef ROM_PWMDeadBandEnable +#define MAP_PWMDeadBandEnable \ + ROM_PWMDeadBandEnable +#else +#define MAP_PWMDeadBandEnable \ + PWMDeadBandEnable +#endif +#ifdef ROM_PWMDeadBandDisable +#define MAP_PWMDeadBandDisable \ + ROM_PWMDeadBandDisable +#else +#define MAP_PWMDeadBandDisable \ + PWMDeadBandDisable +#endif +#ifdef ROM_PWMSyncUpdate +#define MAP_PWMSyncUpdate \ + ROM_PWMSyncUpdate +#else +#define MAP_PWMSyncUpdate \ + PWMSyncUpdate +#endif +#ifdef ROM_PWMSyncTimeBase +#define MAP_PWMSyncTimeBase \ + ROM_PWMSyncTimeBase +#else +#define MAP_PWMSyncTimeBase \ + PWMSyncTimeBase +#endif +#ifdef ROM_PWMOutputState +#define MAP_PWMOutputState \ + ROM_PWMOutputState +#else +#define MAP_PWMOutputState \ + PWMOutputState +#endif +#ifdef ROM_PWMOutputInvert +#define MAP_PWMOutputInvert \ + ROM_PWMOutputInvert +#else +#define MAP_PWMOutputInvert \ + PWMOutputInvert +#endif +#ifdef ROM_PWMOutputFault +#define MAP_PWMOutputFault \ + ROM_PWMOutputFault +#else +#define MAP_PWMOutputFault \ + PWMOutputFault +#endif +#ifdef ROM_PWMGenIntTrigEnable +#define MAP_PWMGenIntTrigEnable \ + ROM_PWMGenIntTrigEnable +#else +#define MAP_PWMGenIntTrigEnable \ + PWMGenIntTrigEnable +#endif +#ifdef ROM_PWMGenIntTrigDisable +#define MAP_PWMGenIntTrigDisable \ + ROM_PWMGenIntTrigDisable +#else +#define MAP_PWMGenIntTrigDisable \ + PWMGenIntTrigDisable +#endif +#ifdef ROM_PWMGenIntStatus +#define MAP_PWMGenIntStatus \ + ROM_PWMGenIntStatus +#else +#define MAP_PWMGenIntStatus \ + PWMGenIntStatus +#endif +#ifdef ROM_PWMGenIntClear +#define MAP_PWMGenIntClear \ + ROM_PWMGenIntClear +#else +#define MAP_PWMGenIntClear \ + PWMGenIntClear +#endif +#ifdef ROM_PWMIntEnable +#define MAP_PWMIntEnable \ + ROM_PWMIntEnable +#else +#define MAP_PWMIntEnable \ + PWMIntEnable +#endif +#ifdef ROM_PWMIntDisable +#define MAP_PWMIntDisable \ + ROM_PWMIntDisable +#else +#define MAP_PWMIntDisable \ + PWMIntDisable +#endif +#ifdef ROM_PWMFaultIntClear +#define MAP_PWMFaultIntClear \ + ROM_PWMFaultIntClear +#else +#define MAP_PWMFaultIntClear \ + PWMFaultIntClear +#endif +#ifdef ROM_PWMIntStatus +#define MAP_PWMIntStatus \ + ROM_PWMIntStatus +#else +#define MAP_PWMIntStatus \ + PWMIntStatus +#endif +#ifdef ROM_PWMOutputFaultLevel +#define MAP_PWMOutputFaultLevel \ + ROM_PWMOutputFaultLevel +#else +#define MAP_PWMOutputFaultLevel \ + PWMOutputFaultLevel +#endif +#ifdef ROM_PWMFaultIntClearExt +#define MAP_PWMFaultIntClearExt \ + ROM_PWMFaultIntClearExt +#else +#define MAP_PWMFaultIntClearExt \ + PWMFaultIntClearExt +#endif +#ifdef ROM_PWMGenFaultConfigure +#define MAP_PWMGenFaultConfigure \ + ROM_PWMGenFaultConfigure +#else +#define MAP_PWMGenFaultConfigure \ + PWMGenFaultConfigure +#endif +#ifdef ROM_PWMGenFaultTriggerSet +#define MAP_PWMGenFaultTriggerSet \ + ROM_PWMGenFaultTriggerSet +#else +#define MAP_PWMGenFaultTriggerSet \ + PWMGenFaultTriggerSet +#endif +#ifdef ROM_PWMGenFaultTriggerGet +#define MAP_PWMGenFaultTriggerGet \ + ROM_PWMGenFaultTriggerGet +#else +#define MAP_PWMGenFaultTriggerGet \ + PWMGenFaultTriggerGet +#endif +#ifdef ROM_PWMGenFaultStatus +#define MAP_PWMGenFaultStatus \ + ROM_PWMGenFaultStatus +#else +#define MAP_PWMGenFaultStatus \ + PWMGenFaultStatus +#endif +#ifdef ROM_PWMGenFaultClear +#define MAP_PWMGenFaultClear \ + ROM_PWMGenFaultClear +#else +#define MAP_PWMGenFaultClear \ + PWMGenFaultClear +#endif + +//***************************************************************************** +// +// Macros for the QEI API. +// +//***************************************************************************** +#ifdef ROM_QEIPositionGet +#define MAP_QEIPositionGet \ + ROM_QEIPositionGet +#else +#define MAP_QEIPositionGet \ + QEIPositionGet +#endif +#ifdef ROM_QEIEnable +#define MAP_QEIEnable \ + ROM_QEIEnable +#else +#define MAP_QEIEnable \ + QEIEnable +#endif +#ifdef ROM_QEIDisable +#define MAP_QEIDisable \ + ROM_QEIDisable +#else +#define MAP_QEIDisable \ + QEIDisable +#endif +#ifdef ROM_QEIConfigure +#define MAP_QEIConfigure \ + ROM_QEIConfigure +#else +#define MAP_QEIConfigure \ + QEIConfigure +#endif +#ifdef ROM_QEIPositionSet +#define MAP_QEIPositionSet \ + ROM_QEIPositionSet +#else +#define MAP_QEIPositionSet \ + QEIPositionSet +#endif +#ifdef ROM_QEIDirectionGet +#define MAP_QEIDirectionGet \ + ROM_QEIDirectionGet +#else +#define MAP_QEIDirectionGet \ + QEIDirectionGet +#endif +#ifdef ROM_QEIErrorGet +#define MAP_QEIErrorGet \ + ROM_QEIErrorGet +#else +#define MAP_QEIErrorGet \ + QEIErrorGet +#endif +#ifdef ROM_QEIVelocityEnable +#define MAP_QEIVelocityEnable \ + ROM_QEIVelocityEnable +#else +#define MAP_QEIVelocityEnable \ + QEIVelocityEnable +#endif +#ifdef ROM_QEIVelocityDisable +#define MAP_QEIVelocityDisable \ + ROM_QEIVelocityDisable +#else +#define MAP_QEIVelocityDisable \ + QEIVelocityDisable +#endif +#ifdef ROM_QEIVelocityConfigure +#define MAP_QEIVelocityConfigure \ + ROM_QEIVelocityConfigure +#else +#define MAP_QEIVelocityConfigure \ + QEIVelocityConfigure +#endif +#ifdef ROM_QEIVelocityGet +#define MAP_QEIVelocityGet \ + ROM_QEIVelocityGet +#else +#define MAP_QEIVelocityGet \ + QEIVelocityGet +#endif +#ifdef ROM_QEIIntEnable +#define MAP_QEIIntEnable \ + ROM_QEIIntEnable +#else +#define MAP_QEIIntEnable \ + QEIIntEnable +#endif +#ifdef ROM_QEIIntDisable +#define MAP_QEIIntDisable \ + ROM_QEIIntDisable +#else +#define MAP_QEIIntDisable \ + QEIIntDisable +#endif +#ifdef ROM_QEIIntStatus +#define MAP_QEIIntStatus \ + ROM_QEIIntStatus +#else +#define MAP_QEIIntStatus \ + QEIIntStatus +#endif +#ifdef ROM_QEIIntClear +#define MAP_QEIIntClear \ + ROM_QEIIntClear +#else +#define MAP_QEIIntClear \ + QEIIntClear +#endif + +//***************************************************************************** +// +// Macros for the SSI API. +// +//***************************************************************************** +#ifdef ROM_SSIDataPut +#define MAP_SSIDataPut \ + ROM_SSIDataPut +#else +#define MAP_SSIDataPut \ + SSIDataPut +#endif +#ifdef ROM_SSIConfigSetExpClk +#define MAP_SSIConfigSetExpClk \ + ROM_SSIConfigSetExpClk +#else +#define MAP_SSIConfigSetExpClk \ + SSIConfigSetExpClk +#endif +#ifdef ROM_SSIEnable +#define MAP_SSIEnable \ + ROM_SSIEnable +#else +#define MAP_SSIEnable \ + SSIEnable +#endif +#ifdef ROM_SSIDisable +#define MAP_SSIDisable \ + ROM_SSIDisable +#else +#define MAP_SSIDisable \ + SSIDisable +#endif +#ifdef ROM_SSIIntEnable +#define MAP_SSIIntEnable \ + ROM_SSIIntEnable +#else +#define MAP_SSIIntEnable \ + SSIIntEnable +#endif +#ifdef ROM_SSIIntDisable +#define MAP_SSIIntDisable \ + ROM_SSIIntDisable +#else +#define MAP_SSIIntDisable \ + SSIIntDisable +#endif +#ifdef ROM_SSIIntStatus +#define MAP_SSIIntStatus \ + ROM_SSIIntStatus +#else +#define MAP_SSIIntStatus \ + SSIIntStatus +#endif +#ifdef ROM_SSIIntClear +#define MAP_SSIIntClear \ + ROM_SSIIntClear +#else +#define MAP_SSIIntClear \ + SSIIntClear +#endif +#ifdef ROM_SSIDataPutNonBlocking +#define MAP_SSIDataPutNonBlocking \ + ROM_SSIDataPutNonBlocking +#else +#define MAP_SSIDataPutNonBlocking \ + SSIDataPutNonBlocking +#endif +#ifdef ROM_SSIDataGet +#define MAP_SSIDataGet \ + ROM_SSIDataGet +#else +#define MAP_SSIDataGet \ + SSIDataGet +#endif +#ifdef ROM_SSIDataGetNonBlocking +#define MAP_SSIDataGetNonBlocking \ + ROM_SSIDataGetNonBlocking +#else +#define MAP_SSIDataGetNonBlocking \ + SSIDataGetNonBlocking +#endif +#ifdef ROM_SSIDMAEnable +#define MAP_SSIDMAEnable \ + ROM_SSIDMAEnable +#else +#define MAP_SSIDMAEnable \ + SSIDMAEnable +#endif +#ifdef ROM_SSIDMADisable +#define MAP_SSIDMADisable \ + ROM_SSIDMADisable +#else +#define MAP_SSIDMADisable \ + SSIDMADisable +#endif +#ifdef ROM_SSIBusy +#define MAP_SSIBusy \ + ROM_SSIBusy +#else +#define MAP_SSIBusy \ + SSIBusy +#endif + +//***************************************************************************** +// +// Macros for the SysCtl API. +// +//***************************************************************************** +#ifdef ROM_SysCtlSleep +#define MAP_SysCtlSleep \ + ROM_SysCtlSleep +#else +#define MAP_SysCtlSleep \ + SysCtlSleep +#endif +#ifdef ROM_SysCtlSRAMSizeGet +#define MAP_SysCtlSRAMSizeGet \ + ROM_SysCtlSRAMSizeGet +#else +#define MAP_SysCtlSRAMSizeGet \ + SysCtlSRAMSizeGet +#endif +#ifdef ROM_SysCtlFlashSizeGet +#define MAP_SysCtlFlashSizeGet \ + ROM_SysCtlFlashSizeGet +#else +#define MAP_SysCtlFlashSizeGet \ + SysCtlFlashSizeGet +#endif +#ifdef ROM_SysCtlPinPresent +#define MAP_SysCtlPinPresent \ + ROM_SysCtlPinPresent +#else +#define MAP_SysCtlPinPresent \ + SysCtlPinPresent +#endif +#ifdef ROM_SysCtlPeripheralPresent +#define MAP_SysCtlPeripheralPresent \ + ROM_SysCtlPeripheralPresent +#else +#define MAP_SysCtlPeripheralPresent \ + SysCtlPeripheralPresent +#endif +#ifdef ROM_SysCtlPeripheralReset +#define MAP_SysCtlPeripheralReset \ + ROM_SysCtlPeripheralReset +#else +#define MAP_SysCtlPeripheralReset \ + SysCtlPeripheralReset +#endif +#ifdef ROM_SysCtlPeripheralEnable +#define MAP_SysCtlPeripheralEnable \ + ROM_SysCtlPeripheralEnable +#else +#define MAP_SysCtlPeripheralEnable \ + SysCtlPeripheralEnable +#endif +#ifdef ROM_SysCtlPeripheralDisable +#define MAP_SysCtlPeripheralDisable \ + ROM_SysCtlPeripheralDisable +#else +#define MAP_SysCtlPeripheralDisable \ + SysCtlPeripheralDisable +#endif +#ifdef ROM_SysCtlPeripheralSleepEnable +#define MAP_SysCtlPeripheralSleepEnable \ + ROM_SysCtlPeripheralSleepEnable +#else +#define MAP_SysCtlPeripheralSleepEnable \ + SysCtlPeripheralSleepEnable +#endif +#ifdef ROM_SysCtlPeripheralSleepDisable +#define MAP_SysCtlPeripheralSleepDisable \ + ROM_SysCtlPeripheralSleepDisable +#else +#define MAP_SysCtlPeripheralSleepDisable \ + SysCtlPeripheralSleepDisable +#endif +#ifdef ROM_SysCtlPeripheralDeepSleepEnable +#define MAP_SysCtlPeripheralDeepSleepEnable \ + ROM_SysCtlPeripheralDeepSleepEnable +#else +#define MAP_SysCtlPeripheralDeepSleepEnable \ + SysCtlPeripheralDeepSleepEnable +#endif +#ifdef ROM_SysCtlPeripheralDeepSleepDisable +#define MAP_SysCtlPeripheralDeepSleepDisable \ + ROM_SysCtlPeripheralDeepSleepDisable +#else +#define MAP_SysCtlPeripheralDeepSleepDisable \ + SysCtlPeripheralDeepSleepDisable +#endif +#ifdef ROM_SysCtlPeripheralClockGating +#define MAP_SysCtlPeripheralClockGating \ + ROM_SysCtlPeripheralClockGating +#else +#define MAP_SysCtlPeripheralClockGating \ + SysCtlPeripheralClockGating +#endif +#ifdef ROM_SysCtlIntEnable +#define MAP_SysCtlIntEnable \ + ROM_SysCtlIntEnable +#else +#define MAP_SysCtlIntEnable \ + SysCtlIntEnable +#endif +#ifdef ROM_SysCtlIntDisable +#define MAP_SysCtlIntDisable \ + ROM_SysCtlIntDisable +#else +#define MAP_SysCtlIntDisable \ + SysCtlIntDisable +#endif +#ifdef ROM_SysCtlIntClear +#define MAP_SysCtlIntClear \ + ROM_SysCtlIntClear +#else +#define MAP_SysCtlIntClear \ + SysCtlIntClear +#endif +#ifdef ROM_SysCtlIntStatus +#define MAP_SysCtlIntStatus \ + ROM_SysCtlIntStatus +#else +#define MAP_SysCtlIntStatus \ + SysCtlIntStatus +#endif +#ifdef ROM_SysCtlLDOSet +#define MAP_SysCtlLDOSet \ + ROM_SysCtlLDOSet +#else +#define MAP_SysCtlLDOSet \ + SysCtlLDOSet +#endif +#ifdef ROM_SysCtlLDOGet +#define MAP_SysCtlLDOGet \ + ROM_SysCtlLDOGet +#else +#define MAP_SysCtlLDOGet \ + SysCtlLDOGet +#endif +#ifdef ROM_SysCtlReset +#define MAP_SysCtlReset \ + ROM_SysCtlReset +#else +#define MAP_SysCtlReset \ + SysCtlReset +#endif +#ifdef ROM_SysCtlDeepSleep +#define MAP_SysCtlDeepSleep \ + ROM_SysCtlDeepSleep +#else +#define MAP_SysCtlDeepSleep \ + SysCtlDeepSleep +#endif +#ifdef ROM_SysCtlResetCauseGet +#define MAP_SysCtlResetCauseGet \ + ROM_SysCtlResetCauseGet +#else +#define MAP_SysCtlResetCauseGet \ + SysCtlResetCauseGet +#endif +#ifdef ROM_SysCtlResetCauseClear +#define MAP_SysCtlResetCauseClear \ + ROM_SysCtlResetCauseClear +#else +#define MAP_SysCtlResetCauseClear \ + SysCtlResetCauseClear +#endif +#ifdef ROM_SysCtlClockSet +#define MAP_SysCtlClockSet \ + ROM_SysCtlClockSet +#else +#define MAP_SysCtlClockSet \ + SysCtlClockSet +#endif +#ifdef ROM_SysCtlClockGet +#define MAP_SysCtlClockGet \ + ROM_SysCtlClockGet +#else +#define MAP_SysCtlClockGet \ + SysCtlClockGet +#endif +#ifdef ROM_SysCtlPWMClockSet +#define MAP_SysCtlPWMClockSet \ + ROM_SysCtlPWMClockSet +#else +#define MAP_SysCtlPWMClockSet \ + SysCtlPWMClockSet +#endif +#ifdef ROM_SysCtlPWMClockGet +#define MAP_SysCtlPWMClockGet \ + ROM_SysCtlPWMClockGet +#else +#define MAP_SysCtlPWMClockGet \ + SysCtlPWMClockGet +#endif +#ifdef ROM_SysCtlADCSpeedSet +#define MAP_SysCtlADCSpeedSet \ + ROM_SysCtlADCSpeedSet +#else +#define MAP_SysCtlADCSpeedSet \ + SysCtlADCSpeedSet +#endif +#ifdef ROM_SysCtlADCSpeedGet +#define MAP_SysCtlADCSpeedGet \ + ROM_SysCtlADCSpeedGet +#else +#define MAP_SysCtlADCSpeedGet \ + SysCtlADCSpeedGet +#endif +#ifdef ROM_SysCtlGPIOAHBEnable +#define MAP_SysCtlGPIOAHBEnable \ + ROM_SysCtlGPIOAHBEnable +#else +#define MAP_SysCtlGPIOAHBEnable \ + SysCtlGPIOAHBEnable +#endif +#ifdef ROM_SysCtlGPIOAHBDisable +#define MAP_SysCtlGPIOAHBDisable \ + ROM_SysCtlGPIOAHBDisable +#else +#define MAP_SysCtlGPIOAHBDisable \ + SysCtlGPIOAHBDisable +#endif +#ifdef ROM_SysCtlUSBPLLEnable +#define MAP_SysCtlUSBPLLEnable \ + ROM_SysCtlUSBPLLEnable +#else +#define MAP_SysCtlUSBPLLEnable \ + SysCtlUSBPLLEnable +#endif +#ifdef ROM_SysCtlUSBPLLDisable +#define MAP_SysCtlUSBPLLDisable \ + ROM_SysCtlUSBPLLDisable +#else +#define MAP_SysCtlUSBPLLDisable \ + SysCtlUSBPLLDisable +#endif +#ifdef ROM_SysCtlI2SMClkSet +#define MAP_SysCtlI2SMClkSet \ + ROM_SysCtlI2SMClkSet +#else +#define MAP_SysCtlI2SMClkSet \ + SysCtlI2SMClkSet +#endif +#ifdef ROM_SysCtlDelay +#define MAP_SysCtlDelay \ + ROM_SysCtlDelay +#else +#define MAP_SysCtlDelay \ + SysCtlDelay +#endif + +//***************************************************************************** +// +// Macros for the SysTick API. +// +//***************************************************************************** +#ifdef ROM_SysTickValueGet +#define MAP_SysTickValueGet \ + ROM_SysTickValueGet +#else +#define MAP_SysTickValueGet \ + SysTickValueGet +#endif +#ifdef ROM_SysTickEnable +#define MAP_SysTickEnable \ + ROM_SysTickEnable +#else +#define MAP_SysTickEnable \ + SysTickEnable +#endif +#ifdef ROM_SysTickDisable +#define MAP_SysTickDisable \ + ROM_SysTickDisable +#else +#define MAP_SysTickDisable \ + SysTickDisable +#endif +#ifdef ROM_SysTickIntEnable +#define MAP_SysTickIntEnable \ + ROM_SysTickIntEnable +#else +#define MAP_SysTickIntEnable \ + SysTickIntEnable +#endif +#ifdef ROM_SysTickIntDisable +#define MAP_SysTickIntDisable \ + ROM_SysTickIntDisable +#else +#define MAP_SysTickIntDisable \ + SysTickIntDisable +#endif +#ifdef ROM_SysTickPeriodSet +#define MAP_SysTickPeriodSet \ + ROM_SysTickPeriodSet +#else +#define MAP_SysTickPeriodSet \ + SysTickPeriodSet +#endif +#ifdef ROM_SysTickPeriodGet +#define MAP_SysTickPeriodGet \ + ROM_SysTickPeriodGet +#else +#define MAP_SysTickPeriodGet \ + SysTickPeriodGet +#endif + +//***************************************************************************** +// +// Macros for the Timer API. +// +//***************************************************************************** +#ifdef ROM_TimerIntClear +#define MAP_TimerIntClear \ + ROM_TimerIntClear +#else +#define MAP_TimerIntClear \ + TimerIntClear +#endif +#ifdef ROM_TimerEnable +#define MAP_TimerEnable \ + ROM_TimerEnable +#else +#define MAP_TimerEnable \ + TimerEnable +#endif +#ifdef ROM_TimerDisable +#define MAP_TimerDisable \ + ROM_TimerDisable +#else +#define MAP_TimerDisable \ + TimerDisable +#endif +#ifdef ROM_TimerConfigure +#define MAP_TimerConfigure \ + ROM_TimerConfigure +#else +#define MAP_TimerConfigure \ + TimerConfigure +#endif +#ifdef ROM_TimerControlLevel +#define MAP_TimerControlLevel \ + ROM_TimerControlLevel +#else +#define MAP_TimerControlLevel \ + TimerControlLevel +#endif +#ifdef ROM_TimerControlTrigger +#define MAP_TimerControlTrigger \ + ROM_TimerControlTrigger +#else +#define MAP_TimerControlTrigger \ + TimerControlTrigger +#endif +#ifdef ROM_TimerControlEvent +#define MAP_TimerControlEvent \ + ROM_TimerControlEvent +#else +#define MAP_TimerControlEvent \ + TimerControlEvent +#endif +#ifdef ROM_TimerControlStall +#define MAP_TimerControlStall \ + ROM_TimerControlStall +#else +#define MAP_TimerControlStall \ + TimerControlStall +#endif +#ifdef ROM_TimerRTCEnable +#define MAP_TimerRTCEnable \ + ROM_TimerRTCEnable +#else +#define MAP_TimerRTCEnable \ + TimerRTCEnable +#endif +#ifdef ROM_TimerRTCDisable +#define MAP_TimerRTCDisable \ + ROM_TimerRTCDisable +#else +#define MAP_TimerRTCDisable \ + TimerRTCDisable +#endif +#ifdef ROM_TimerPrescaleSet +#define MAP_TimerPrescaleSet \ + ROM_TimerPrescaleSet +#else +#define MAP_TimerPrescaleSet \ + TimerPrescaleSet +#endif +#ifdef ROM_TimerPrescaleGet +#define MAP_TimerPrescaleGet \ + ROM_TimerPrescaleGet +#else +#define MAP_TimerPrescaleGet \ + TimerPrescaleGet +#endif +#ifdef ROM_TimerPrescaleMatchSet +#define MAP_TimerPrescaleMatchSet \ + ROM_TimerPrescaleMatchSet +#else +#define MAP_TimerPrescaleMatchSet \ + TimerPrescaleMatchSet +#endif +#ifdef ROM_TimerPrescaleMatchGet +#define MAP_TimerPrescaleMatchGet \ + ROM_TimerPrescaleMatchGet +#else +#define MAP_TimerPrescaleMatchGet \ + TimerPrescaleMatchGet +#endif +#ifdef ROM_TimerLoadSet +#define MAP_TimerLoadSet \ + ROM_TimerLoadSet +#else +#define MAP_TimerLoadSet \ + TimerLoadSet +#endif +#ifdef ROM_TimerLoadGet +#define MAP_TimerLoadGet \ + ROM_TimerLoadGet +#else +#define MAP_TimerLoadGet \ + TimerLoadGet +#endif +#ifdef ROM_TimerValueGet +#define MAP_TimerValueGet \ + ROM_TimerValueGet +#else +#define MAP_TimerValueGet \ + TimerValueGet +#endif +#ifdef ROM_TimerMatchSet +#define MAP_TimerMatchSet \ + ROM_TimerMatchSet +#else +#define MAP_TimerMatchSet \ + TimerMatchSet +#endif +#ifdef ROM_TimerMatchGet +#define MAP_TimerMatchGet \ + ROM_TimerMatchGet +#else +#define MAP_TimerMatchGet \ + TimerMatchGet +#endif +#ifdef ROM_TimerIntEnable +#define MAP_TimerIntEnable \ + ROM_TimerIntEnable +#else +#define MAP_TimerIntEnable \ + TimerIntEnable +#endif +#ifdef ROM_TimerIntDisable +#define MAP_TimerIntDisable \ + ROM_TimerIntDisable +#else +#define MAP_TimerIntDisable \ + TimerIntDisable +#endif +#ifdef ROM_TimerIntStatus +#define MAP_TimerIntStatus \ + ROM_TimerIntStatus +#else +#define MAP_TimerIntStatus \ + TimerIntStatus +#endif +#ifdef ROM_TimerControlWaitOnTrigger +#define MAP_TimerControlWaitOnTrigger \ + ROM_TimerControlWaitOnTrigger +#else +#define MAP_TimerControlWaitOnTrigger \ + TimerControlWaitOnTrigger +#endif + +//***************************************************************************** +// +// Macros for the UART API. +// +//***************************************************************************** +#ifdef ROM_UARTCharPut +#define MAP_UARTCharPut \ + ROM_UARTCharPut +#else +#define MAP_UARTCharPut \ + UARTCharPut +#endif +#ifdef ROM_UARTParityModeSet +#define MAP_UARTParityModeSet \ + ROM_UARTParityModeSet +#else +#define MAP_UARTParityModeSet \ + UARTParityModeSet +#endif +#ifdef ROM_UARTParityModeGet +#define MAP_UARTParityModeGet \ + ROM_UARTParityModeGet +#else +#define MAP_UARTParityModeGet \ + UARTParityModeGet +#endif +#ifdef ROM_UARTFIFOLevelSet +#define MAP_UARTFIFOLevelSet \ + ROM_UARTFIFOLevelSet +#else +#define MAP_UARTFIFOLevelSet \ + UARTFIFOLevelSet +#endif +#ifdef ROM_UARTFIFOLevelGet +#define MAP_UARTFIFOLevelGet \ + ROM_UARTFIFOLevelGet +#else +#define MAP_UARTFIFOLevelGet \ + UARTFIFOLevelGet +#endif +#ifdef ROM_UARTConfigSetExpClk +#define MAP_UARTConfigSetExpClk \ + ROM_UARTConfigSetExpClk +#else +#define MAP_UARTConfigSetExpClk \ + UARTConfigSetExpClk +#endif +#ifdef ROM_UARTConfigGetExpClk +#define MAP_UARTConfigGetExpClk \ + ROM_UARTConfigGetExpClk +#else +#define MAP_UARTConfigGetExpClk \ + UARTConfigGetExpClk +#endif +#ifdef ROM_UARTEnable +#define MAP_UARTEnable \ + ROM_UARTEnable +#else +#define MAP_UARTEnable \ + UARTEnable +#endif +#ifdef ROM_UARTDisable +#define MAP_UARTDisable \ + ROM_UARTDisable +#else +#define MAP_UARTDisable \ + UARTDisable +#endif +#ifdef ROM_UARTEnableSIR +#define MAP_UARTEnableSIR \ + ROM_UARTEnableSIR +#else +#define MAP_UARTEnableSIR \ + UARTEnableSIR +#endif +#ifdef ROM_UARTDisableSIR +#define MAP_UARTDisableSIR \ + ROM_UARTDisableSIR +#else +#define MAP_UARTDisableSIR \ + UARTDisableSIR +#endif +#ifdef ROM_UARTCharsAvail +#define MAP_UARTCharsAvail \ + ROM_UARTCharsAvail +#else +#define MAP_UARTCharsAvail \ + UARTCharsAvail +#endif +#ifdef ROM_UARTSpaceAvail +#define MAP_UARTSpaceAvail \ + ROM_UARTSpaceAvail +#else +#define MAP_UARTSpaceAvail \ + UARTSpaceAvail +#endif +#ifdef ROM_UARTCharGetNonBlocking +#define MAP_UARTCharGetNonBlocking \ + ROM_UARTCharGetNonBlocking +#else +#define MAP_UARTCharGetNonBlocking \ + UARTCharGetNonBlocking +#endif +#ifdef ROM_UARTCharGet +#define MAP_UARTCharGet \ + ROM_UARTCharGet +#else +#define MAP_UARTCharGet \ + UARTCharGet +#endif +#ifdef ROM_UARTCharPutNonBlocking +#define MAP_UARTCharPutNonBlocking \ + ROM_UARTCharPutNonBlocking +#else +#define MAP_UARTCharPutNonBlocking \ + UARTCharPutNonBlocking +#endif +#ifdef ROM_UARTBreakCtl +#define MAP_UARTBreakCtl \ + ROM_UARTBreakCtl +#else +#define MAP_UARTBreakCtl \ + UARTBreakCtl +#endif +#ifdef ROM_UARTIntEnable +#define MAP_UARTIntEnable \ + ROM_UARTIntEnable +#else +#define MAP_UARTIntEnable \ + UARTIntEnable +#endif +#ifdef ROM_UARTIntDisable +#define MAP_UARTIntDisable \ + ROM_UARTIntDisable +#else +#define MAP_UARTIntDisable \ + UARTIntDisable +#endif +#ifdef ROM_UARTIntStatus +#define MAP_UARTIntStatus \ + ROM_UARTIntStatus +#else +#define MAP_UARTIntStatus \ + UARTIntStatus +#endif +#ifdef ROM_UARTIntClear +#define MAP_UARTIntClear \ + ROM_UARTIntClear +#else +#define MAP_UARTIntClear \ + UARTIntClear +#endif +#ifdef ROM_UARTDMAEnable +#define MAP_UARTDMAEnable \ + ROM_UARTDMAEnable +#else +#define MAP_UARTDMAEnable \ + UARTDMAEnable +#endif +#ifdef ROM_UARTDMADisable +#define MAP_UARTDMADisable \ + ROM_UARTDMADisable +#else +#define MAP_UARTDMADisable \ + UARTDMADisable +#endif +#ifdef ROM_UARTFIFOEnable +#define MAP_UARTFIFOEnable \ + ROM_UARTFIFOEnable +#else +#define MAP_UARTFIFOEnable \ + UARTFIFOEnable +#endif +#ifdef ROM_UARTFIFODisable +#define MAP_UARTFIFODisable \ + ROM_UARTFIFODisable +#else +#define MAP_UARTFIFODisable \ + UARTFIFODisable +#endif +#ifdef ROM_UARTBusy +#define MAP_UARTBusy \ + ROM_UARTBusy +#else +#define MAP_UARTBusy \ + UARTBusy +#endif +#ifdef ROM_UARTTxIntModeSet +#define MAP_UARTTxIntModeSet \ + ROM_UARTTxIntModeSet +#else +#define MAP_UARTTxIntModeSet \ + UARTTxIntModeSet +#endif +#ifdef ROM_UARTTxIntModeGet +#define MAP_UARTTxIntModeGet \ + ROM_UARTTxIntModeGet +#else +#define MAP_UARTTxIntModeGet \ + UARTTxIntModeGet +#endif +#ifdef ROM_UARTRxErrorGet +#define MAP_UARTRxErrorGet \ + ROM_UARTRxErrorGet +#else +#define MAP_UARTRxErrorGet \ + UARTRxErrorGet +#endif +#ifdef ROM_UARTRxErrorClear +#define MAP_UARTRxErrorClear \ + ROM_UARTRxErrorClear +#else +#define MAP_UARTRxErrorClear \ + UARTRxErrorClear +#endif + +//***************************************************************************** +// +// Macros for the uDMA API. +// +//***************************************************************************** +#ifdef ROM_uDMAChannelTransferSet +#define MAP_uDMAChannelTransferSet \ + ROM_uDMAChannelTransferSet +#else +#define MAP_uDMAChannelTransferSet \ + uDMAChannelTransferSet +#endif +#ifdef ROM_uDMAEnable +#define MAP_uDMAEnable \ + ROM_uDMAEnable +#else +#define MAP_uDMAEnable \ + uDMAEnable +#endif +#ifdef ROM_uDMADisable +#define MAP_uDMADisable \ + ROM_uDMADisable +#else +#define MAP_uDMADisable \ + uDMADisable +#endif +#ifdef ROM_uDMAErrorStatusGet +#define MAP_uDMAErrorStatusGet \ + ROM_uDMAErrorStatusGet +#else +#define MAP_uDMAErrorStatusGet \ + uDMAErrorStatusGet +#endif +#ifdef ROM_uDMAErrorStatusClear +#define MAP_uDMAErrorStatusClear \ + ROM_uDMAErrorStatusClear +#else +#define MAP_uDMAErrorStatusClear \ + uDMAErrorStatusClear +#endif +#ifdef ROM_uDMAChannelEnable +#define MAP_uDMAChannelEnable \ + ROM_uDMAChannelEnable +#else +#define MAP_uDMAChannelEnable \ + uDMAChannelEnable +#endif +#ifdef ROM_uDMAChannelDisable +#define MAP_uDMAChannelDisable \ + ROM_uDMAChannelDisable +#else +#define MAP_uDMAChannelDisable \ + uDMAChannelDisable +#endif +#ifdef ROM_uDMAChannelIsEnabled +#define MAP_uDMAChannelIsEnabled \ + ROM_uDMAChannelIsEnabled +#else +#define MAP_uDMAChannelIsEnabled \ + uDMAChannelIsEnabled +#endif +#ifdef ROM_uDMAControlBaseSet +#define MAP_uDMAControlBaseSet \ + ROM_uDMAControlBaseSet +#else +#define MAP_uDMAControlBaseSet \ + uDMAControlBaseSet +#endif +#ifdef ROM_uDMAControlBaseGet +#define MAP_uDMAControlBaseGet \ + ROM_uDMAControlBaseGet +#else +#define MAP_uDMAControlBaseGet \ + uDMAControlBaseGet +#endif +#ifdef ROM_uDMAChannelRequest +#define MAP_uDMAChannelRequest \ + ROM_uDMAChannelRequest +#else +#define MAP_uDMAChannelRequest \ + uDMAChannelRequest +#endif +#ifdef ROM_uDMAChannelAttributeEnable +#define MAP_uDMAChannelAttributeEnable \ + ROM_uDMAChannelAttributeEnable +#else +#define MAP_uDMAChannelAttributeEnable \ + uDMAChannelAttributeEnable +#endif +#ifdef ROM_uDMAChannelAttributeDisable +#define MAP_uDMAChannelAttributeDisable \ + ROM_uDMAChannelAttributeDisable +#else +#define MAP_uDMAChannelAttributeDisable \ + uDMAChannelAttributeDisable +#endif +#ifdef ROM_uDMAChannelAttributeGet +#define MAP_uDMAChannelAttributeGet \ + ROM_uDMAChannelAttributeGet +#else +#define MAP_uDMAChannelAttributeGet \ + uDMAChannelAttributeGet +#endif +#ifdef ROM_uDMAChannelControlSet +#define MAP_uDMAChannelControlSet \ + ROM_uDMAChannelControlSet +#else +#define MAP_uDMAChannelControlSet \ + uDMAChannelControlSet +#endif +#ifdef ROM_uDMAChannelSizeGet +#define MAP_uDMAChannelSizeGet \ + ROM_uDMAChannelSizeGet +#else +#define MAP_uDMAChannelSizeGet \ + uDMAChannelSizeGet +#endif +#ifdef ROM_uDMAChannelModeGet +#define MAP_uDMAChannelModeGet \ + ROM_uDMAChannelModeGet +#else +#define MAP_uDMAChannelModeGet \ + uDMAChannelModeGet +#endif +#ifdef ROM_uDMAChannelSelectSecondary +#define MAP_uDMAChannelSelectSecondary \ + ROM_uDMAChannelSelectSecondary +#else +#define MAP_uDMAChannelSelectSecondary \ + uDMAChannelSelectSecondary +#endif +#ifdef ROM_uDMAChannelSelectDefault +#define MAP_uDMAChannelSelectDefault \ + ROM_uDMAChannelSelectDefault +#else +#define MAP_uDMAChannelSelectDefault \ + uDMAChannelSelectDefault +#endif + +//***************************************************************************** +// +// Macros for the USB API. +// +//***************************************************************************** +#ifdef ROM_USBIntStatus +#define MAP_USBIntStatus \ + ROM_USBIntStatus +#else +#define MAP_USBIntStatus \ + USBIntStatus +#endif +#ifdef ROM_USBDevAddrGet +#define MAP_USBDevAddrGet \ + ROM_USBDevAddrGet +#else +#define MAP_USBDevAddrGet \ + USBDevAddrGet +#endif +#ifdef ROM_USBDevAddrSet +#define MAP_USBDevAddrSet \ + ROM_USBDevAddrSet +#else +#define MAP_USBDevAddrSet \ + USBDevAddrSet +#endif +#ifdef ROM_USBDevConnect +#define MAP_USBDevConnect \ + ROM_USBDevConnect +#else +#define MAP_USBDevConnect \ + USBDevConnect +#endif +#ifdef ROM_USBDevDisconnect +#define MAP_USBDevDisconnect \ + ROM_USBDevDisconnect +#else +#define MAP_USBDevDisconnect \ + USBDevDisconnect +#endif +#ifdef ROM_USBDevEndpointConfigSet +#define MAP_USBDevEndpointConfigSet \ + ROM_USBDevEndpointConfigSet +#else +#define MAP_USBDevEndpointConfigSet \ + USBDevEndpointConfigSet +#endif +#ifdef ROM_USBDevEndpointDataAck +#define MAP_USBDevEndpointDataAck \ + ROM_USBDevEndpointDataAck +#else +#define MAP_USBDevEndpointDataAck \ + USBDevEndpointDataAck +#endif +#ifdef ROM_USBDevEndpointStall +#define MAP_USBDevEndpointStall \ + ROM_USBDevEndpointStall +#else +#define MAP_USBDevEndpointStall \ + USBDevEndpointStall +#endif +#ifdef ROM_USBDevEndpointStatusClear +#define MAP_USBDevEndpointStatusClear \ + ROM_USBDevEndpointStatusClear +#else +#define MAP_USBDevEndpointStatusClear \ + USBDevEndpointStatusClear +#endif +#ifdef ROM_USBEndpointDataGet +#define MAP_USBEndpointDataGet \ + ROM_USBEndpointDataGet +#else +#define MAP_USBEndpointDataGet \ + USBEndpointDataGet +#endif +#ifdef ROM_USBEndpointDataPut +#define MAP_USBEndpointDataPut \ + ROM_USBEndpointDataPut +#else +#define MAP_USBEndpointDataPut \ + USBEndpointDataPut +#endif +#ifdef ROM_USBEndpointDataSend +#define MAP_USBEndpointDataSend \ + ROM_USBEndpointDataSend +#else +#define MAP_USBEndpointDataSend \ + USBEndpointDataSend +#endif +#ifdef ROM_USBEndpointDataToggleClear +#define MAP_USBEndpointDataToggleClear \ + ROM_USBEndpointDataToggleClear +#else +#define MAP_USBEndpointDataToggleClear \ + USBEndpointDataToggleClear +#endif +#ifdef ROM_USBEndpointStatus +#define MAP_USBEndpointStatus \ + ROM_USBEndpointStatus +#else +#define MAP_USBEndpointStatus \ + USBEndpointStatus +#endif +#ifdef ROM_USBFIFOAddrGet +#define MAP_USBFIFOAddrGet \ + ROM_USBFIFOAddrGet +#else +#define MAP_USBFIFOAddrGet \ + USBFIFOAddrGet +#endif +#ifdef ROM_USBFIFOConfigGet +#define MAP_USBFIFOConfigGet \ + ROM_USBFIFOConfigGet +#else +#define MAP_USBFIFOConfigGet \ + USBFIFOConfigGet +#endif +#ifdef ROM_USBFIFOConfigSet +#define MAP_USBFIFOConfigSet \ + ROM_USBFIFOConfigSet +#else +#define MAP_USBFIFOConfigSet \ + USBFIFOConfigSet +#endif +#ifdef ROM_USBFrameNumberGet +#define MAP_USBFrameNumberGet \ + ROM_USBFrameNumberGet +#else +#define MAP_USBFrameNumberGet \ + USBFrameNumberGet +#endif +#ifdef ROM_USBHostAddrGet +#define MAP_USBHostAddrGet \ + ROM_USBHostAddrGet +#else +#define MAP_USBHostAddrGet \ + USBHostAddrGet +#endif +#ifdef ROM_USBHostAddrSet +#define MAP_USBHostAddrSet \ + ROM_USBHostAddrSet +#else +#define MAP_USBHostAddrSet \ + USBHostAddrSet +#endif +#ifdef ROM_USBHostEndpointConfig +#define MAP_USBHostEndpointConfig \ + ROM_USBHostEndpointConfig +#else +#define MAP_USBHostEndpointConfig \ + USBHostEndpointConfig +#endif +#ifdef ROM_USBHostEndpointDataAck +#define MAP_USBHostEndpointDataAck \ + ROM_USBHostEndpointDataAck +#else +#define MAP_USBHostEndpointDataAck \ + USBHostEndpointDataAck +#endif +#ifdef ROM_USBHostEndpointDataToggle +#define MAP_USBHostEndpointDataToggle \ + ROM_USBHostEndpointDataToggle +#else +#define MAP_USBHostEndpointDataToggle \ + USBHostEndpointDataToggle +#endif +#ifdef ROM_USBHostEndpointStatusClear +#define MAP_USBHostEndpointStatusClear \ + ROM_USBHostEndpointStatusClear +#else +#define MAP_USBHostEndpointStatusClear \ + USBHostEndpointStatusClear +#endif +#ifdef ROM_USBHostHubAddrGet +#define MAP_USBHostHubAddrGet \ + ROM_USBHostHubAddrGet +#else +#define MAP_USBHostHubAddrGet \ + USBHostHubAddrGet +#endif +#ifdef ROM_USBHostHubAddrSet +#define MAP_USBHostHubAddrSet \ + ROM_USBHostHubAddrSet +#else +#define MAP_USBHostHubAddrSet \ + USBHostHubAddrSet +#endif +#ifdef ROM_USBHostPwrDisable +#define MAP_USBHostPwrDisable \ + ROM_USBHostPwrDisable +#else +#define MAP_USBHostPwrDisable \ + USBHostPwrDisable +#endif +#ifdef ROM_USBHostPwrEnable +#define MAP_USBHostPwrEnable \ + ROM_USBHostPwrEnable +#else +#define MAP_USBHostPwrEnable \ + USBHostPwrEnable +#endif +#ifdef ROM_USBHostPwrConfig +#define MAP_USBHostPwrConfig \ + ROM_USBHostPwrConfig +#else +#define MAP_USBHostPwrConfig \ + USBHostPwrConfig +#endif +#ifdef ROM_USBHostPwrFaultDisable +#define MAP_USBHostPwrFaultDisable \ + ROM_USBHostPwrFaultDisable +#else +#define MAP_USBHostPwrFaultDisable \ + USBHostPwrFaultDisable +#endif +#ifdef ROM_USBHostPwrFaultEnable +#define MAP_USBHostPwrFaultEnable \ + ROM_USBHostPwrFaultEnable +#else +#define MAP_USBHostPwrFaultEnable \ + USBHostPwrFaultEnable +#endif +#ifdef ROM_USBHostRequestIN +#define MAP_USBHostRequestIN \ + ROM_USBHostRequestIN +#else +#define MAP_USBHostRequestIN \ + USBHostRequestIN +#endif +#ifdef ROM_USBHostRequestStatus +#define MAP_USBHostRequestStatus \ + ROM_USBHostRequestStatus +#else +#define MAP_USBHostRequestStatus \ + USBHostRequestStatus +#endif +#ifdef ROM_USBHostReset +#define MAP_USBHostReset \ + ROM_USBHostReset +#else +#define MAP_USBHostReset \ + USBHostReset +#endif +#ifdef ROM_USBHostResume +#define MAP_USBHostResume \ + ROM_USBHostResume +#else +#define MAP_USBHostResume \ + USBHostResume +#endif +#ifdef ROM_USBHostSpeedGet +#define MAP_USBHostSpeedGet \ + ROM_USBHostSpeedGet +#else +#define MAP_USBHostSpeedGet \ + USBHostSpeedGet +#endif +#ifdef ROM_USBHostSuspend +#define MAP_USBHostSuspend \ + ROM_USBHostSuspend +#else +#define MAP_USBHostSuspend \ + USBHostSuspend +#endif +#ifdef ROM_USBIntDisable +#define MAP_USBIntDisable \ + ROM_USBIntDisable +#else +#define MAP_USBIntDisable \ + USBIntDisable +#endif +#ifdef ROM_USBIntEnable +#define MAP_USBIntEnable \ + ROM_USBIntEnable +#else +#define MAP_USBIntEnable \ + USBIntEnable +#endif +#ifdef ROM_USBDevEndpointConfigGet +#define MAP_USBDevEndpointConfigGet \ + ROM_USBDevEndpointConfigGet +#else +#define MAP_USBDevEndpointConfigGet \ + USBDevEndpointConfigGet +#endif +#ifdef ROM_USBEndpointDataAvail +#define MAP_USBEndpointDataAvail \ + ROM_USBEndpointDataAvail +#else +#define MAP_USBEndpointDataAvail \ + USBEndpointDataAvail +#endif +#ifdef ROM_USBOTGHostRequest +#define MAP_USBOTGHostRequest \ + ROM_USBOTGHostRequest +#else +#define MAP_USBOTGHostRequest \ + USBOTGHostRequest +#endif +#ifdef ROM_USBModeGet +#define MAP_USBModeGet \ + ROM_USBModeGet +#else +#define MAP_USBModeGet \ + USBModeGet +#endif +#ifdef ROM_USBEndpointDMAChannel +#define MAP_USBEndpointDMAChannel \ + ROM_USBEndpointDMAChannel +#else +#define MAP_USBEndpointDMAChannel \ + USBEndpointDMAChannel +#endif +#ifdef ROM_USBIntDisableControl +#define MAP_USBIntDisableControl \ + ROM_USBIntDisableControl +#else +#define MAP_USBIntDisableControl \ + USBIntDisableControl +#endif +#ifdef ROM_USBIntEnableControl +#define MAP_USBIntEnableControl \ + ROM_USBIntEnableControl +#else +#define MAP_USBIntEnableControl \ + USBIntEnableControl +#endif +#ifdef ROM_USBIntStatusControl +#define MAP_USBIntStatusControl \ + ROM_USBIntStatusControl +#else +#define MAP_USBIntStatusControl \ + USBIntStatusControl +#endif +#ifdef ROM_USBIntDisableEndpoint +#define MAP_USBIntDisableEndpoint \ + ROM_USBIntDisableEndpoint +#else +#define MAP_USBIntDisableEndpoint \ + USBIntDisableEndpoint +#endif +#ifdef ROM_USBIntEnableEndpoint +#define MAP_USBIntEnableEndpoint \ + ROM_USBIntEnableEndpoint +#else +#define MAP_USBIntEnableEndpoint \ + USBIntEnableEndpoint +#endif +#ifdef ROM_USBIntStatusEndpoint +#define MAP_USBIntStatusEndpoint \ + ROM_USBIntStatusEndpoint +#else +#define MAP_USBIntStatusEndpoint \ + USBIntStatusEndpoint +#endif + +//***************************************************************************** +// +// Macros for the Watchdog API. +// +//***************************************************************************** +#ifdef ROM_WatchdogIntClear +#define MAP_WatchdogIntClear \ + ROM_WatchdogIntClear +#else +#define MAP_WatchdogIntClear \ + WatchdogIntClear +#endif +#ifdef ROM_WatchdogRunning +#define MAP_WatchdogRunning \ + ROM_WatchdogRunning +#else +#define MAP_WatchdogRunning \ + WatchdogRunning +#endif +#ifdef ROM_WatchdogEnable +#define MAP_WatchdogEnable \ + ROM_WatchdogEnable +#else +#define MAP_WatchdogEnable \ + WatchdogEnable +#endif +#ifdef ROM_WatchdogResetEnable +#define MAP_WatchdogResetEnable \ + ROM_WatchdogResetEnable +#else +#define MAP_WatchdogResetEnable \ + WatchdogResetEnable +#endif +#ifdef ROM_WatchdogResetDisable +#define MAP_WatchdogResetDisable \ + ROM_WatchdogResetDisable +#else +#define MAP_WatchdogResetDisable \ + WatchdogResetDisable +#endif +#ifdef ROM_WatchdogLock +#define MAP_WatchdogLock \ + ROM_WatchdogLock +#else +#define MAP_WatchdogLock \ + WatchdogLock +#endif +#ifdef ROM_WatchdogUnlock +#define MAP_WatchdogUnlock \ + ROM_WatchdogUnlock +#else +#define MAP_WatchdogUnlock \ + WatchdogUnlock +#endif +#ifdef ROM_WatchdogLockState +#define MAP_WatchdogLockState \ + ROM_WatchdogLockState +#else +#define MAP_WatchdogLockState \ + WatchdogLockState +#endif +#ifdef ROM_WatchdogReloadSet +#define MAP_WatchdogReloadSet \ + ROM_WatchdogReloadSet +#else +#define MAP_WatchdogReloadSet \ + WatchdogReloadSet +#endif +#ifdef ROM_WatchdogReloadGet +#define MAP_WatchdogReloadGet \ + ROM_WatchdogReloadGet +#else +#define MAP_WatchdogReloadGet \ + WatchdogReloadGet +#endif +#ifdef ROM_WatchdogValueGet +#define MAP_WatchdogValueGet \ + ROM_WatchdogValueGet +#else +#define MAP_WatchdogValueGet \ + WatchdogValueGet +#endif +#ifdef ROM_WatchdogIntEnable +#define MAP_WatchdogIntEnable \ + ROM_WatchdogIntEnable +#else +#define MAP_WatchdogIntEnable \ + WatchdogIntEnable +#endif +#ifdef ROM_WatchdogIntStatus +#define MAP_WatchdogIntStatus \ + ROM_WatchdogIntStatus +#else +#define MAP_WatchdogIntStatus \ + WatchdogIntStatus +#endif +#ifdef ROM_WatchdogStallEnable +#define MAP_WatchdogStallEnable \ + ROM_WatchdogStallEnable +#else +#define MAP_WatchdogStallEnable \ + WatchdogStallEnable +#endif +#ifdef ROM_WatchdogStallDisable +#define MAP_WatchdogStallDisable \ + ROM_WatchdogStallDisable +#else +#define MAP_WatchdogStallDisable \ + WatchdogStallDisable +#endif + +//***************************************************************************** +// +// Deprecated ROM functions. +// +//***************************************************************************** +#ifndef DEPRECATED +#define MAP_FlashIntGetStatus \ + MAP_FlashIntStatus +#define MAP_USBDevEndpointConfig \ + MAP_USBDevEndpointConfigSet +#define MAP_USBHostPwrFaultConfig \ + MAP_USBHostPwrConfig +#endif + +#endif // __ROM_MAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.c new file mode 100644 index 00000000..48923091 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.c @@ -0,0 +1,706 @@ +//***************************************************************************** +// +// ssi.c - Driver for Synchronous Serial Interface. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup ssi_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_ssi.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/ssi.h" + +//***************************************************************************** +// +//! Configures the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulSSIClk is the rate of the clock supplied to the SSI module. +//! \param ulProtocol specifies the data transfer protocol. +//! \param ulMode specifies the mode of operation. +//! \param ulBitRate specifies the clock rate. +//! \param ulDataWidth specifies number of bits transferred per frame. +//! +//! This function configures the synchronous serial interface. It sets +//! the SSI protocol, mode of operation, bit rate, and data width. +//! +//! The \e ulProtocol parameter defines the data frame format. The +//! \e ulProtocol parameter can be one of the following values: +//! \b SSI_FRF_MOTO_MODE_0, \b SSI_FRF_MOTO_MODE_1, \b SSI_FRF_MOTO_MODE_2, +//! \b SSI_FRF_MOTO_MODE_3, \b SSI_FRF_TI, or \b SSI_FRF_NMW. The Motorola +//! frame formats imply the following polarity and phase configurations: +//! +//!
+//! Polarity Phase       Mode
+//!   0       0   SSI_FRF_MOTO_MODE_0
+//!   0       1   SSI_FRF_MOTO_MODE_1
+//!   1       0   SSI_FRF_MOTO_MODE_2
+//!   1       1   SSI_FRF_MOTO_MODE_3
+//! 
+//! +//! The \e ulMode parameter defines the operating mode of the SSI module. The +//! SSI module can operate as a master or slave; if a slave, the SSI can be +//! configured to disable output on its serial output line. The \e ulMode +//! parameter can be one of the following values: \b SSI_MODE_MASTER, +//! \b SSI_MODE_SLAVE, or \b SSI_MODE_SLAVE_OD. +//! +//! The \e ulBitRate parameter defines the bit rate for the SSI. This bit rate +//! must satisfy the following clock ratio criteria: +//! +//! - FSSI >= 2 * bit rate (master mode) +//! - FSSI >= 12 * bit rate (slave modes) +//! +//! where FSSI is the frequency of the clock supplied to the SSI module. +//! +//! The \e ulDataWidth parameter defines the width of the data transfers, and +//! can be a value between 4 and 16, inclusive. +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original SSIConfig() API and performs the same +//! actions. A macro is provided in ssi.h to map the original API to +//! this API. +//! +//! \return None. +// +//***************************************************************************** +void +SSIConfigSetExpClk(unsigned long ulBase, unsigned long ulSSIClk, + unsigned long ulProtocol, unsigned long ulMode, + unsigned long ulBitRate, unsigned long ulDataWidth) +{ + unsigned long ulMaxBitRate; + unsigned long ulRegVal; + unsigned long ulPreDiv; + unsigned long ulSCR; + unsigned long ulSPH_SPO; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulProtocol == SSI_FRF_MOTO_MODE_0) || + (ulProtocol == SSI_FRF_MOTO_MODE_1) || + (ulProtocol == SSI_FRF_MOTO_MODE_2) || + (ulProtocol == SSI_FRF_MOTO_MODE_3) || + (ulProtocol == SSI_FRF_TI) || + (ulProtocol == SSI_FRF_NMW)); + ASSERT((ulMode == SSI_MODE_MASTER) || + (ulMode == SSI_MODE_SLAVE) || + (ulMode == SSI_MODE_SLAVE_OD)); + ASSERT(((ulMode == SSI_MODE_MASTER) && (ulBitRate <= (ulSSIClk / 2))) || + ((ulMode != SSI_MODE_MASTER) && (ulBitRate <= (ulSSIClk / 12)))); + ASSERT((ulSSIClk / ulBitRate) <= (254 * 256)); + ASSERT((ulDataWidth >= 4) && (ulDataWidth <= 16)); + + // + // Set the mode. + // + ulRegVal = (ulMode == SSI_MODE_SLAVE_OD) ? SSI_CR1_SOD : 0; + ulRegVal |= (ulMode == SSI_MODE_MASTER) ? 0 : SSI_CR1_MS; + HWREG(ulBase + SSI_O_CR1) = ulRegVal; + + // + // Set the clock predivider. + // + ulMaxBitRate = ulSSIClk / ulBitRate; + ulPreDiv = 0; + do + { + ulPreDiv += 2; + ulSCR = (ulMaxBitRate / ulPreDiv) - 1; + } + while(ulSCR > 255); + HWREG(ulBase + SSI_O_CPSR) = ulPreDiv; + + // + // Set protocol and clock rate. + // + ulSPH_SPO = (ulProtocol & 3) << 6; + ulProtocol &= SSI_CR0_FRF_M; + ulRegVal = (ulSCR << 8) | ulSPH_SPO | ulProtocol | (ulDataWidth - 1); + HWREG(ulBase + SSI_O_CR0) = ulRegVal; +} + +//***************************************************************************** +// +//! Enables the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function enables operation of the synchronous serial interface. The +//! synchronous serial interface must be configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +SSIEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + SSI_O_CR1) |= SSI_CR1_SSE; +} + +//***************************************************************************** +// +//! Disables the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function disables operation of the synchronous serial interface. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Read-modify-write the enable bit. + // + HWREG(ulBase + SSI_O_CR1) &= ~(SSI_CR1_SSE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pfnHandler is a pointer to the function to be called when the +//! synchronous serial interface interrupt occurs. +//! +//! This sets the handler to be called when an SSI interrupt +//! occurs. This will enable the global interrupt in the interrupt controller; +//! specific SSI interrupts must be enabled via SSIIntEnable(). If necessary, +//! it is the interrupt handler's responsibility to clear the interrupt source +//! via SSIIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine the interrupt number based on the SSI port. + // + ulInt = (ulBase == SSI0_BASE) ? INT_SSI0 : INT_SSI1; + + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the synchronous serial interface interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the synchronous serial interface. +//! +//! \param ulBase specifies the SSI module base address. +//! +//! This function will clear the handler to be called when a SSI +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine the interrupt number based on the SSI port. + // + ulInt = (ulBase == SSI0_BASE) ? INT_SSI0 : INT_SSI1; + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated SSI interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. The \e ulIntFlags parameter can be any of the +//! \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, or \b SSI_RXOR values. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + SSI_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated SSI interrupt sources. The \e ulIntFlags parameter +//! can be any of the \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, or \b SSI_RXOR +//! values. +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + SSI_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase specifies the SSI module base address. +//! \param bMasked is \b false if the raw interrupt status is required or +//! \b true if the masked interrupt status is required. +//! +//! This function returns the interrupt status for the SSI module. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SSI_TXFF, \b SSI_RXFF, \b SSI_RXTO, and \b SSI_RXOR. +// +//***************************************************************************** +unsigned long +SSIIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + SSI_O_MIS)); + } + else + { + return(HWREG(ulBase + SSI_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears SSI interrupt sources. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified SSI interrupt sources are cleared so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupts from being recognized again immediately upon exit. The +//! \e ulIntFlags parameter can consist of either or both the \b SSI_RXTO and +//! \b SSI_RXOR values. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SSIIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + SSI_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Puts a data element into the SSI transmit FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulData is the data to be transmitted over the SSI interface. +//! +//! This function places the supplied data into the transmit FIFO of the +//! specified SSI module. +//! +//! \note The upper 32 - N bits of the \e ulData are discarded by the hardware, +//! where N is the data width as configured by SSIConfigSetExpClk(). For +//! example, if the interface is configured for 8-bit data width, the upper 24 +//! bits of \e ulData are discarded. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDataPut(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulData & (0xfffffffe << (HWREG(ulBase + SSI_O_CR0) & + SSI_CR0_DSS_M))) == 0); + + // + // Wait until there is space. + // + while(!(HWREG(ulBase + SSI_O_SR) & SSI_SR_TNF)) + { + } + + // + // Write the data to the SSI. + // + HWREG(ulBase + SSI_O_DR) = ulData; +} + +//***************************************************************************** +// +//! Puts a data element into the SSI transmit FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param ulData is the data to be transmitted over the SSI interface. +//! +//! This function places the supplied data into the transmit FIFO of the +//! specified SSI module. If there is no space in the FIFO, then this function +//! returns a zero. +//! +//! This function replaces the original SSIDataNonBlockingPut() API and +//! performs the same actions. A macro is provided in ssi.h to map +//! the original API to this API. +//! +//! \note The upper 32 - N bits of the \e ulData are discarded by the hardware, +//! where N is the data width as configured by SSIConfigSetExpClk(). For +//! example, if the interface is configured for 8-bit data width, the upper 24 +//! bits of \e ulData are discarded. +//! +//! \return Returns the number of elements written to the SSI transmit FIFO. +// +//***************************************************************************** +long +SSIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + ASSERT((ulData & (0xfffffffe << (HWREG(ulBase + SSI_O_CR0) & + SSI_CR0_DSS_M))) == 0); + + // + // Check for space to write. + // + if(HWREG(ulBase + SSI_O_SR) & SSI_SR_TNF) + { + HWREG(ulBase + SSI_O_DR) = ulData; + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Gets a data element from the SSI receive FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pulData is a pointer to a storage location for data that was +//! received over the SSI interface. +//! +//! This function gets received data from the receive FIFO of the specified +//! SSI module and places that data into the location specified by the +//! \e pulData parameter. +//! +//! \note Only the lower N bits of the value written to \e pulData contain +//! valid data, where N is the data width as configured by +//! SSIConfigSetExpClk(). For example, if the interface is configured for +//! 8-bit data width, only the lower 8 bits of the value written to \e pulData +//! contain valid data. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDataGet(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Wait until there is data to be read. + // + while(!(HWREG(ulBase + SSI_O_SR) & SSI_SR_RNE)) + { + } + + // + // Read data from SSI. + // + *pulData = HWREG(ulBase + SSI_O_DR); +} + +//***************************************************************************** +// +//! Gets a data element from the SSI receive FIFO. +//! +//! \param ulBase specifies the SSI module base address. +//! \param pulData is a pointer to a storage location for data that was +//! received over the SSI interface. +//! +//! This function gets received data from the receive FIFO of the specified SSI +//! module and places that data into the location specified by the \e ulData +//! parameter. If there is no data in the FIFO, then this function returns a +//! zero. +//! +//! This function replaces the original SSIDataNonBlockingGet() API and +//! performs the same actions. A macro is provided in ssi.h to map +//! the original API to this API. +//! +//! \note Only the lower N bits of the value written to \e pulData contain +//! valid data, where N is the data width as configured by +//! SSIConfigSetExpClk(). For example, if the interface is configured for +//! 8-bit data width, only the lower 8 bits of the value written to \e pulData +//! contain valid data. +//! +//! \return Returns the number of elements read from the SSI receive FIFO. +// +//***************************************************************************** +long +SSIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Check for data to read. + // + if(HWREG(ulBase + SSI_O_SR) & SSI_SR_RNE) + { + *pulData = HWREG(ulBase + SSI_O_DR); + return(1); + } + else + { + return(0); + } +} + +//***************************************************************************** +// +//! Enable SSI DMA operation. +//! +//! \param ulBase is the base address of the SSI port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified SSI DMA features are enabled. The SSI can be +//! configured to use DMA for transmit and/or receive data transfers. +//! The \e ulDMAFlags parameter is the logical OR of any of the following +//! values: +//! +//! - SSI_DMA_RX - enable DMA for receive +//! - SSI_DMA_TX - enable DMA for transmit +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the SSI. +//! +//! \return None. +// +//***************************************************************************** +void +SSIDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + SSI_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable SSI DMA operation. +//! +//! \param ulBase is the base address of the SSI port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable SSI DMA features that were enabled +//! by SSIDMAEnable(). The specified SSI DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - SSI_DMA_RX - disable DMA for receive +//! - SSI_DMA_TX - disable DMA for transmit +//! +//! \return None. +// +//***************************************************************************** +void +SSIDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + SSI_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Determines whether the SSI transmitter is busy or not. +//! +//! \param ulBase is the base address of the SSI port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, then the transmit FIFO +//! is empty and all bits of the last transmitted word have left the hardware +//! shift register. +//! +//! \return Returns \b true if the SSI is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +SSIBusy(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == SSI0_BASE) || (ulBase == SSI1_BASE)); + + // + // Determine if the SSI is busy. + // + return((HWREG(ulBase + SSI_O_SR) & SSI_SR_BSY) ? true : false); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.h new file mode 100644 index 00000000..7970bdda --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/ssi.h @@ -0,0 +1,125 @@ +//***************************************************************************** +// +// ssi.h - Prototypes for the Synchronous Serial Interface Driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SSI_H__ +#define __SSI_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to SSIIntEnable, SSIIntDisable, and SSIIntClear +// as the ulIntFlags parameter, and returned by SSIIntStatus. +// +//***************************************************************************** +#define SSI_TXFF 0x00000008 // TX FIFO half full or less +#define SSI_RXFF 0x00000004 // RX FIFO half full or more +#define SSI_RXTO 0x00000002 // RX timeout +#define SSI_RXOR 0x00000001 // RX overrun + +//***************************************************************************** +// +// Values that can be passed to SSIConfigSetExpClk. +// +//***************************************************************************** +#define SSI_FRF_MOTO_MODE_0 0x00000000 // Moto fmt, polarity 0, phase 0 +#define SSI_FRF_MOTO_MODE_1 0x00000002 // Moto fmt, polarity 0, phase 1 +#define SSI_FRF_MOTO_MODE_2 0x00000001 // Moto fmt, polarity 1, phase 0 +#define SSI_FRF_MOTO_MODE_3 0x00000003 // Moto fmt, polarity 1, phase 1 +#define SSI_FRF_TI 0x00000010 // TI frame format +#define SSI_FRF_NMW 0x00000020 // National MicroWire frame format + +#define SSI_MODE_MASTER 0x00000000 // SSI master +#define SSI_MODE_SLAVE 0x00000001 // SSI slave +#define SSI_MODE_SLAVE_OD 0x00000002 // SSI slave with output disabled + +//***************************************************************************** +// +// Values that can be passed to SSIDMAEnable() and SSIDMADisable(). +// +//***************************************************************************** +#define SSI_DMA_TX 0x00000002 // Enable DMA for transmit +#define SSI_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void SSIConfigSetExpClk(unsigned long ulBase, unsigned long ulSSIClk, + unsigned long ulProtocol, unsigned long ulMode, + unsigned long ulBitRate, + unsigned long ulDataWidth); +extern void SSIDataGet(unsigned long ulBase, unsigned long *pulData); +extern long SSIDataGetNonBlocking(unsigned long ulBase, + unsigned long *pulData); +extern void SSIDataPut(unsigned long ulBase, unsigned long ulData); +extern long SSIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData); +extern void SSIDisable(unsigned long ulBase); +extern void SSIEnable(unsigned long ulBase); +extern void SSIIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void SSIIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern unsigned long SSIIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void SSIIntUnregister(unsigned long ulBase); +extern void SSIDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void SSIDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern tBoolean SSIBusy(unsigned long ulBase); + +//***************************************************************************** +// +// Several SSI APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define SSIConfig(a, b, c, d, e) \ + SSIConfigSetExpClk(a, SysCtlClockGet(), b, c, d, e) +#define SSIDataNonBlockingGet(a, b) \ + SSIDataGetNonBlocking(a, b) +#define SSIDataNonBlockingPut(a, b) \ + SSIDataPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SSI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.c new file mode 100644 index 00000000..e0023a9d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.c @@ -0,0 +1,2366 @@ +//***************************************************************************** +// +// sysctl.c - Driver for the system controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup sysctl_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "driverlib/cpu.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/sysctl.h" + +//***************************************************************************** +// +// This macro extracts the array index out of the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_INDEX(a) (((a) >> 28) & 0xf) + +//***************************************************************************** +// +// This macro constructs the peripheral bit mask from the peripheral number. +// +//***************************************************************************** +#define SYSCTL_PERIPH_MASK(a) (((a) & 0xffff) << (((a) & 0x001f0000) >> 16)) + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL DC? register that +// contains the peripheral present bit for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCRegs[] = +{ + SYSCTL_DC1, + SYSCTL_DC2, + SYSCTL_DC4, + SYSCTL_DC1 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SRCR? register that +// controls the software reset for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSRCRRegs[] = +{ + SYSCTL_SRCR0, + SYSCTL_SRCR1, + SYSCTL_SRCR2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_RCGC? register that +// controls the run-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulRCGCRegs[] = +{ + SYSCTL_RCGC0, + SYSCTL_RCGC1, + SYSCTL_RCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SCGC? register that +// controls the sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulSCGCRegs[] = +{ + SYSCTL_SCGC0, + SYSCTL_SCGC1, + SYSCTL_SCGC2 +}; + +//***************************************************************************** +// +// An array that maps the "peripheral set" number (which is stored in the upper +// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_DCGC? register that +// controls the deep-sleep-mode enable for that peripheral. +// +//***************************************************************************** +static const unsigned long g_pulDCGCRegs[] = +{ + SYSCTL_DCGC0, + SYSCTL_DCGC1, + SYSCTL_DCGC2 +}; + +//***************************************************************************** +// +// An array that maps the crystal number in RCC to a frequency. +// +//***************************************************************************** +static const unsigned long g_pulXtals[] = +{ + 1000000, + 1843200, + 2000000, + 2457600, + 3579545, + 3686400, + 4000000, + 4096000, + 4915200, + 5000000, + 5120000, + 6000000, + 6144000, + 7372800, + 8000000, + 8192000, + 10000000, + 12000000, + 12288000, + 13560000, + 14318180, + 16000000, + 16384000 +}; + +//***************************************************************************** +// +//! \internal +//! Checks a peripheral identifier. +//! +//! \param ulPeripheral is the peripheral identifier. +//! +//! This function determines if a peripheral identifier is valid. +//! +//! \return Returns \b true if the peripheral identifier is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +SysCtlPeripheralValid(unsigned long ulPeripheral) +{ + return((ulPeripheral == SYSCTL_PERIPH_ADC0) || + (ulPeripheral == SYSCTL_PERIPH_ADC1) || + (ulPeripheral == SYSCTL_PERIPH_CAN0) || + (ulPeripheral == SYSCTL_PERIPH_CAN1) || + (ulPeripheral == SYSCTL_PERIPH_CAN2) || + (ulPeripheral == SYSCTL_PERIPH_COMP0) || + (ulPeripheral == SYSCTL_PERIPH_COMP1) || + (ulPeripheral == SYSCTL_PERIPH_COMP2) || + (ulPeripheral == SYSCTL_PERIPH_EPI0) || + (ulPeripheral == SYSCTL_PERIPH_ETH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulPeripheral == SYSCTL_PERIPH_GPIOJ) || + (ulPeripheral == SYSCTL_PERIPH_HIBERNATE) || + (ulPeripheral == SYSCTL_PERIPH_I2C0) || + (ulPeripheral == SYSCTL_PERIPH_I2C1) || + (ulPeripheral == SYSCTL_PERIPH_I2S0) || + (ulPeripheral == SYSCTL_PERIPH_IEEE1588) || + (ulPeripheral == SYSCTL_PERIPH_MPU) || + (ulPeripheral == SYSCTL_PERIPH_PLL) || + (ulPeripheral == SYSCTL_PERIPH_PWM) || + (ulPeripheral == SYSCTL_PERIPH_QEI0) || + (ulPeripheral == SYSCTL_PERIPH_QEI1) || + (ulPeripheral == SYSCTL_PERIPH_SSI0) || + (ulPeripheral == SYSCTL_PERIPH_SSI1) || + (ulPeripheral == SYSCTL_PERIPH_TEMP) || + (ulPeripheral == SYSCTL_PERIPH_TIMER0) || + (ulPeripheral == SYSCTL_PERIPH_TIMER1) || + (ulPeripheral == SYSCTL_PERIPH_TIMER2) || + (ulPeripheral == SYSCTL_PERIPH_TIMER3) || + (ulPeripheral == SYSCTL_PERIPH_UART0) || + (ulPeripheral == SYSCTL_PERIPH_UART1) || + (ulPeripheral == SYSCTL_PERIPH_UART2) || + (ulPeripheral == SYSCTL_PERIPH_UDMA) || + (ulPeripheral == SYSCTL_PERIPH_USB0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG0) || + (ulPeripheral == SYSCTL_PERIPH_WDOG1)); +} +#endif + +//***************************************************************************** +// +//! Gets the size of the SRAM. +//! +//! This function determines the size of the SRAM on the Stellaris device. +//! +//! \return The total number of bytes of SRAM. +// +//***************************************************************************** +unsigned long +SysCtlSRAMSizeGet(void) +{ + // + // Compute the size of the SRAM. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_SRAMSZ_M) >> 8) + 0x100); +} + +//***************************************************************************** +// +//! Gets the size of the flash. +//! +//! This function determines the size of the flash on the Stellaris device. +//! +//! \return The total number of bytes of flash. +// +//***************************************************************************** +unsigned long +SysCtlFlashSizeGet(void) +{ + // + // Compute the size of the flash. + // + return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_M) << 11) + 0x800); +} + +//***************************************************************************** +// +//! Determines if a pin is present. +//! +//! \param ulPin is the pin in question. +//! +//! Determines if a particular pin is present in the device. The PWM, analog +//! comparators, ADC, and timers have a varying number of pins across members +//! of the Stellaris family; this will determine which are present on this +//! device. +//! +//! The \e ulPin argument must be only one of the following values: +//! \b SYSCTL_PIN_PWM0, \b SYSCTL_PIN_PWM1, \b SYSCTL_PIN_PWM2, +//! \b SYSCTL_PIN_PWM3, \b SYSCTL_PIN_PWM4, \b SYSCTL_PIN_PWM5, +//! \b SYSCTL_PIN_C0MINUS, \b SYSCTL_PIN_C0PLUS, \b SYSCTL_PIN_C0O, +//! \b SYSCTL_PIN_C1MINUS, \b SYSCTL_PIN_C1PLUS, \b SYSCTL_PIN_C1O, +//! \b SYSCTL_PIN_C2MINUS, \b SYSCTL_PIN_C2PLUS, \b SYSCTL_PIN_C2O, +//! \b SYSCTL_PIN_ADC0, \b SYSCTL_PIN_ADC1, \b SYSCTL_PIN_ADC2, +//! \b SYSCTL_PIN_ADC3, \b SYSCTL_PIN_ADC4, \b SYSCTL_PIN_ADC5, +//! \b SYSCTL_PIN_ADC6, \b SYSCTL_PIN_ADC7, \b SYSCTL_PIN_CCP0, +//! \b SYSCTL_PIN_CCP1, \b SYSCTL_PIN_CCP2, \b SYSCTL_PIN_CCP3, +//! \b SYSCTL_PIN_CCP4, \b SYSCTL_PIN_CCP5, \b SYSCTL_PIN_CCP6, +//! \b SYSCTL_PIN_CCP7, \b SYSCTL_PIN_32KHZ, or \b SYSCTL_PIN_MC_FAULT0. +//! +//! \return Returns \b true if the specified pin is present and \b false if it +//! is not. +// +//***************************************************************************** +tBoolean +SysCtlPinPresent(unsigned long ulPin) +{ + // + // Check the arguments. + // + ASSERT((ulPin == SYSCTL_PIN_PWM0) || + (ulPin == SYSCTL_PIN_PWM1) || + (ulPin == SYSCTL_PIN_PWM2) || + (ulPin == SYSCTL_PIN_PWM3) || + (ulPin == SYSCTL_PIN_PWM4) || + (ulPin == SYSCTL_PIN_PWM5) || + (ulPin == SYSCTL_PIN_C0MINUS) || + (ulPin == SYSCTL_PIN_C0PLUS) || + (ulPin == SYSCTL_PIN_C0O) || + (ulPin == SYSCTL_PIN_C1MINUS) || + (ulPin == SYSCTL_PIN_C1PLUS) || + (ulPin == SYSCTL_PIN_C1O) || + (ulPin == SYSCTL_PIN_C2MINUS) || + (ulPin == SYSCTL_PIN_C2PLUS) || + (ulPin == SYSCTL_PIN_C2O) || + (ulPin == SYSCTL_PIN_MC_FAULT0) || + (ulPin == SYSCTL_PIN_ADC0) || + (ulPin == SYSCTL_PIN_ADC1) || + (ulPin == SYSCTL_PIN_ADC2) || + (ulPin == SYSCTL_PIN_ADC3) || + (ulPin == SYSCTL_PIN_ADC4) || + (ulPin == SYSCTL_PIN_ADC5) || + (ulPin == SYSCTL_PIN_ADC6) || + (ulPin == SYSCTL_PIN_ADC7) || + (ulPin == SYSCTL_PIN_CCP0) || + (ulPin == SYSCTL_PIN_CCP1) || + (ulPin == SYSCTL_PIN_CCP2) || + (ulPin == SYSCTL_PIN_CCP3) || + (ulPin == SYSCTL_PIN_CCP4) || + (ulPin == SYSCTL_PIN_CCP5) || + (ulPin == SYSCTL_PIN_32KHZ)); + + // + // Determine if this pin is present. + // + if(HWREG(SYSCTL_DC3) & ulPin) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Determines if a peripheral is present. +//! +//! \param ulPeripheral is the peripheral in question. +//! +//! Determines if a particular peripheral is present in the device. Each +//! member of the Stellaris family has a different peripheral set; this will +//! determine which are present on this device. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_IEEE1588, +//! \b SYSCTL_PERIPH_MPU, \b SYSCTL_PERIPH_PLL, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return Returns \b true if the specified peripheral is present and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +SysCtlPeripheralPresent(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Read the correct DC register and determine if this peripheral exists. + // + if(ulPeripheral == SYSCTL_PERIPH_USB0) + { + // + // USB is a special case since the DC bit is missing for USB0. + // + if(HWREG(SYSCTL_DC6) & SYSCTL_DC6_USB0_M) + { + return(true); + } + else + { + return(false); + } + } + else if(HWREG(g_pulDCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) & + SYSCTL_PERIPH_MASK(ulPeripheral)) + { + return(true); + } + else + { + return(false); + } +} + +//***************************************************************************** +// +//! Performs a software reset of a peripheral. +//! +//! \param ulPeripheral is the peripheral to reset. +//! +//! This function performs a software reset of the specified peripheral. An +//! individual peripheral reset signal is asserted for a brief period and then +//! deasserted, returning the internal state of the peripheral to its reset +//! condition. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralReset(unsigned long ulPeripheral) +{ + volatile unsigned long ulDelay; + + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Put the peripheral into the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); + + // + // Delay for a little bit. + // + for(ulDelay = 0; ulDelay < 16; ulDelay++) + { + } + + // + // Take the peripheral out of the reset state. + // + HWREG(g_pulSRCRRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral. +//! +//! \param ulPeripheral is the peripheral to enable. +//! +//! Peripherals are enabled with this function. At power-up, all peripherals +//! are disabled; they must be enabled in order to operate or respond to +//! register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \note It takes five clock cycles after the write to enable a peripheral +//! before the the peripheral is actually enabled. During this time, attempts +//! to access the peripheral will result in a bus fault. Care should be taken +//! to ensure that the peripheral is not accessed during this brief time +//! period. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral. +//! +//! \param ulPeripheral is the peripheral to disable. +//! +//! Peripherals are disabled with this function. Once disabled, they will not +//! operate or respond to register reads/writes. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral. + // + HWREG(g_pulRCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into sleep mode. Since the clocking configuration of the device does +//! not change, any peripheral can safely continue operating while the +//! processor is in sleep mode, and can therefore wake the processor from sleep +//! mode. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into sleep mode. Disabling peripherals while in sleep mode helps to lower +//! the current draw of the device. If enabled (via SysCtlPeripheralEnable()), +//! the peripheral will automatically resume operation when the processor +//! leaves sleep mode, maintaining its entire state from before sleep mode was +//! entered. +//! +//! Sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral sleep mode +//! configuration is maintained but has no effect when sleep mode is entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in sleep mode. + // + HWREG(g_pulSCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Enables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to enable in deep-sleep mode. +//! +//! This function allows a peripheral to continue operating when the processor +//! goes into deep-sleep mode. Since the clocking configuration of the device +//! may change, not all peripherals can safely continue operating while the +//! processor is in sleep mode. Those that must run at a particular frequency +//! (such as a UART) will not work as expected if the clock changes. It is the +//! responsibility of the caller to make sensible choices. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Enable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) |= + SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Disables a peripheral in deep-sleep mode. +//! +//! \param ulPeripheral is the peripheral to disable in deep-sleep mode. +//! +//! This function causes a peripheral to stop operating when the processor goes +//! into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps +//! to lower the current draw of the device, and can keep peripherals that +//! require a particular clock frequency from operating when the clock changes +//! as a result of entering deep-sleep mode. If enabled (via +//! SysCtlPeripheralEnable()), the peripheral will automatically resume +//! operation when the processor leaves deep-sleep mode, maintaining its entire +//! state from before deep-sleep mode was entered. +//! +//! Deep-sleep mode clocking of peripherals must be enabled via +//! SysCtlPeripheralClockGating(); if disabled, the peripheral deep-sleep mode +//! configuration is maintained but has no effect when deep-sleep mode is +//! entered. +//! +//! The \e ulPeripheral parameter must be only one of the following values: +//! \b SYSCTL_PERIPH_ADC0, \b SYSCTL_PERIPH_ADC1, \b SYSCTL_PERIPH_CAN0, +//! \b SYSCTL_PERIPH_CAN1, \b SYSCTL_PERIPH_CAN2, \b SYSCTL_PERIPH_COMP0, +//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_EPI0, +//! \b SYSCTL_PERIPH_ETH, \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, +//! \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, +//! \b SYSCTL_PERIPH_GPIOF, \b SYSCTL_PERIPH_GPIOG, \b SYSCTL_PERIPH_GPIOH, +//! \b SYSCTL_PERIPH_GPIOJ, \b SYSCTL_PERIPH_HIBERNATE, \b SYSCTL_PERIPH_I2C0, +//! \b SYSCTL_PERIPH_I2C1, \b SYSCTL_PERIPH_I2S0, \b SYSCTL_PERIPH_PWM, +//! \b SYSCTL_PERIPH_QEI0, \b SYSCTL_PERIPH_QEI1, \b SYSCTL_PERIPH_SSI0, +//! \b SYSCTL_PERIPH_SSI1, \b SYSCTL_PERIPH_TIMER0, \b SYSCTL_PERIPH_TIMER1, +//! \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_TIMER3, \b SYSCTL_PERIPH_TEMP, +//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_UART2, +//! \b SYSCTL_PERIPH_UDMA, \b SYSCTL_PERIPH_USB0, \b SYSCTL_PERIPH_WDOG0, or +//! \b SYSCTL_PERIPH_WDOG1. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral) +{ + // + // Check the arguments. + // + ASSERT(SysCtlPeripheralValid(ulPeripheral)); + + // + // Disable this peripheral in deep-sleep mode. + // + HWREG(g_pulDCGCRegs[SYSCTL_PERIPH_INDEX(ulPeripheral)]) &= + ~SYSCTL_PERIPH_MASK(ulPeripheral); +} + +//***************************************************************************** +// +//! Controls peripheral clock gating in sleep and deep-sleep mode. +//! +//! \param bEnable is a boolean that is \b true if the sleep and deep-sleep +//! peripheral configuration should be used and \b false if not. +//! +//! This function controls how peripherals are clocked when the processor goes +//! into sleep or deep-sleep mode. By default, the peripherals are clocked the +//! same as in run mode; if peripheral clock gating is enabled they are clocked +//! according to the configuration set by SysCtlPeripheralSleepEnable(), +//! SysCtlPeripheralSleepDisable(), SysCtlPeripheralDeepSleepEnable(), and +//! SysCtlPeripheralDeepSleepDisable(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPeripheralClockGating(tBoolean bEnable) +{ + // + // Enable peripheral clock gating as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_ACG; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_ACG); + } +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the system control interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the system +//! control interrupt occurs. +//! +//! This sets the handler to be called when a system control interrupt occurs. +//! This will enable the global interrupt in the interrupt controller; specific +//! system control interrupts must be enabled via SysCtlIntEnable(). It is the +//! interrupt handler's responsibility to clear the interrupt source via +//! SysCtlIntClear(). +//! +//! System control can generate interrupts when the PLL achieves lock, if the +//! internal LDO current limit is exceeded, if the internal oscillator fails, +//! if the main oscillator fails, if the internal LDO output voltage droops too +//! much, if the external voltage droops too much, or if the PLL fails. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(INT_SYSCTL, pfnHandler); + + // + // Enable the system control interrupt. + // + IntEnable(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the system control interrupt. +//! +//! This function will clear the handler to be called when a system control +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntUnregister(void) +{ + // + // Disable the interrupt. + // + IntDisable(INT_SYSCTL); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_SYSCTL); +} + +//***************************************************************************** +// +//! Enables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be enabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Enables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntEnable(unsigned long ulInts) +{ + // + // Enable the specified interrupts. + // + HWREG(SYSCTL_IMC) |= ulInts; +} + +//***************************************************************************** +// +//! Disables individual system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be disabled. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! Disables the indicated system control interrupt sources. Only the sources +//! that are enabled can be reflected to the processor interrupt; disabled +//! sources have no effect on the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntDisable(unsigned long ulInts) +{ + // + // Disable the specified interrupts. + // + HWREG(SYSCTL_IMC) &= ~(ulInts); +} + +//***************************************************************************** +// +//! Clears system control interrupt sources. +//! +//! \param ulInts is a bit mask of the interrupt sources to be cleared. Must +//! be a logical OR of \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, +//! \b SYSCTL_INT_IOSC_FAIL, \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, +//! \b SYSCTL_INT_BOR, and/or \b SYSCTL_INT_PLL_FAIL. +//! +//! The specified system control interrupt sources are cleared, so that they no +//! longer assert. This must be done in the interrupt handler to keep it from +//! being called again immediately upon exit. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIntClear(unsigned long ulInts) +{ + // + // Clear the requested interrupt sources. + // + HWREG(SYSCTL_MISC) = ulInts; +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the system controller. Either the +//! raw interrupt status or the status of interrupts that are allowed to +//! reflect to the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! \b SYSCTL_INT_PLL_LOCK, \b SYSCTL_INT_CUR_LIMIT, \b SYSCTL_INT_IOSC_FAIL, +//! \b SYSCTL_INT_MOSC_FAIL, \b SYSCTL_INT_POR, \b SYSCTL_INT_BOR, and +//! \b SYSCTL_INT_PLL_FAIL. +// +//***************************************************************************** +unsigned long +SysCtlIntStatus(tBoolean bMasked) +{ + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(SYSCTL_MISC)); + } + else + { + return(HWREG(SYSCTL_RIS)); + } +} + +//***************************************************************************** +// +//! Sets the output voltage of the LDO. +//! +//! \param ulVoltage is the required output voltage from the LDO. Must be one +//! of \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +//! +//! This function sets the output voltage of the LDO. The default voltage is +//! 2.5 V; it can be adjusted +/- 10%. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOSet(unsigned long ulVoltage) +{ + // + // Check the arguments. + // + ASSERT((ulVoltage == SYSCTL_LDO_2_25V) || + (ulVoltage == SYSCTL_LDO_2_30V) || + (ulVoltage == SYSCTL_LDO_2_35V) || + (ulVoltage == SYSCTL_LDO_2_40V) || + (ulVoltage == SYSCTL_LDO_2_45V) || + (ulVoltage == SYSCTL_LDO_2_50V) || + (ulVoltage == SYSCTL_LDO_2_55V) || + (ulVoltage == SYSCTL_LDO_2_60V) || + (ulVoltage == SYSCTL_LDO_2_65V) || + (ulVoltage == SYSCTL_LDO_2_70V) || + (ulVoltage == SYSCTL_LDO_2_75V)); + + // + // Set the LDO voltage to the requested value. + // + HWREG(SYSCTL_LDOPCTL) = ulVoltage; +} + +//***************************************************************************** +// +//! Gets the output voltage of the LDO. +//! +//! This function determines the output voltage of the LDO, as specified by the +//! control register. +//! +//! \return Returns the current voltage of the LDO; will be one of +//! \b SYSCTL_LDO_2_25V, \b SYSCTL_LDO_2_30V, \b SYSCTL_LDO_2_35V, +//! \b SYSCTL_LDO_2_40V, \b SYSCTL_LDO_2_45V, \b SYSCTL_LDO_2_50V, +//! \b SYSCTL_LDO_2_55V, \b SYSCTL_LDO_2_60V, \b SYSCTL_LDO_2_65V, +//! \b SYSCTL_LDO_2_70V, or \b SYSCTL_LDO_2_75V. +// +//***************************************************************************** +unsigned long +SysCtlLDOGet(void) +{ + // + // Return the LDO voltage setting. + // + return(HWREG(SYSCTL_LDOPCTL)); +} + +//***************************************************************************** +// +//! Configures the LDO failure control. +//! +//! \param ulConfig is the required LDO failure control setting; can be either +//! \b SYSCTL_LDOCFG_ARST or \b SYSCTL_LDOCFG_NORST. +//! +//! This function allows the LDO to be configured to cause a processor reset +//! when the output voltage becomes unregulated. +//! +//! The LDO failure control is only available on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlLDOConfigSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_LDOCFG_ARST) || + (ulConfig == SYSCTL_LDOCFG_NORST)); + + // + // Set the reset control as requested. + // + HWREG(SYSCTL_LDOARST) = ulConfig; +} + +//***************************************************************************** +// +//! Resets the device. +//! +//! This function will perform a software reset of the entire device. The +//! processor and all peripherals will be reset and all device registers will +//! return to their default values (with the exception of the reset cause +//! register, which will maintain its current value but have the software reset +//! bit set as well). +//! +//! \return This function does not return. +// +//***************************************************************************** +void +SysCtlReset(void) +{ + // + // Perform a software reset request. This will cause the device to reset, + // no further code will be executed. + // + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ; + + // + // The device should have reset, so this should never be reached. Just in + // case, loop forever. + // + while(1) + { + } +} + +//***************************************************************************** +// +//! Puts the processor into sleep mode. +//! +//! This function places the processor into sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralSleepEnable() continue to operate and can wake up the +//! processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlSleep(void) +{ + // + // Wait for an interrupt. + // + CPUwfi(); +} + +//***************************************************************************** +// +//! Puts the processor into deep-sleep mode. +//! +//! This function places the processor into deep-sleep mode; it will not return +//! until the processor returns to run mode. The peripherals that are enabled +//! via SysCtlPeripheralDeepSleepEnable() continue to operate and can wake up +//! the processor (if automatic clock gating is enabled with +//! SysCtlPeripheralClockGating(), otherwise all peripherals continue to +//! operate). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlDeepSleep(void) +{ + // + // Enable deep-sleep. + // + HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP; + + // + // Wait for an interrupt. + // + CPUwfi(); + + // + // Disable deep-sleep so that a future sleep will work correctly. + // + HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP); +} + +//***************************************************************************** +// +//! Gets the reason for a reset. +//! +//! This function will return the reason(s) for a reset. Since the reset +//! reasons are sticky until either cleared by software or an external reset, +//! multiple reset reasons may be returned if multiple resets have occurred. +//! The reset reason will be a logical OR of \b SYSCTL_CAUSE_LDO, +//! \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, \b SYSCTL_CAUSE_BOR, +//! \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! \return Returns the reason(s) for a reset. +// +//***************************************************************************** +unsigned long +SysCtlResetCauseGet(void) +{ + // + // Return the reset reasons. + // + return(HWREG(SYSCTL_RESC)); +} + +//***************************************************************************** +// +//! Clears reset reasons. +//! +//! \param ulCauses are the reset causes to be cleared; must be a logical OR of +//! \b SYSCTL_CAUSE_LDO, \b SYSCTL_CAUSE_SW, \b SYSCTL_CAUSE_WDOG, +//! \b SYSCTL_CAUSE_BOR, \b SYSCTL_CAUSE_POR, and/or \b SYSCTL_CAUSE_EXT. +//! +//! This function clears the specified sticky reset reasons. Once cleared, +//! another reset for the same reason can be detected, and a reset for a +//! different reason can be distinguished (instead of having two reset causes +//! set). If the reset reason is used by an application, all reset causes +//! should be cleared after they are retrieved with SysCtlResetCauseGet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlResetCauseClear(unsigned long ulCauses) +{ + // + // Clear the given reset reasons. + // + HWREG(SYSCTL_RESC) &= ~(ulCauses); +} + +//***************************************************************************** +// +//! Configures the brown-out control. +//! +//! \param ulConfig is the desired configuration of the brown-out control. +//! Must be the logical OR of \b SYSCTL_BOR_RESET and/or +//! \b SYSCTL_BOR_RESAMPLE. +//! \param ulDelay is the number of internal oscillator cycles to wait before +//! resampling an asserted brown-out signal. This value only has meaning when +//! \b SYSCTL_BOR_RESAMPLE is set and must be less than 8192. +//! +//! This function configures how the brown-out control operates. It can detect +//! a brown-out by looking at only the brown-out output, or it can wait for it +//! to be active for two consecutive samples separated by a configurable time. +//! When it detects a brown-out condition, it can either reset the device or +//! generate a processor interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) +{ + // + // Check the arguments. + // + ASSERT(!(ulConfig & ~(SYSCTL_BOR_RESET | SYSCTL_BOR_RESAMPLE))); + ASSERT(ulDelay < 8192); + + // + // Configure the brown-out reset control. + // + HWREG(SYSCTL_PBORCTL) = (ulDelay << SYSCTL_PBORCTL_BORTIM_S) | ulConfig; +} + +//***************************************************************************** +// +//! Provides a small delay. +//! +//! \param ulCount is the number of delay loop iterations to perform. +//! +//! This function provides a means of generating a constant length delay. It +//! is written in assembly to keep the delay consistent across tool chains, +//! avoiding the need to tune the delay based on the tool chain in use. +//! +//! The loop takes 3 cycles/loop. +//! +//! \return None. +// +//***************************************************************************** +#if defined(ewarm) || defined(DOXYGEN) +void +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(codered) || defined(gcc) || defined(sourcerygxx) +void __attribute__((naked)) +SysCtlDelay(unsigned long ulCount) +{ + __asm(" subs r0, #1\n" + " bne SysCtlDelay\n" + " bx lr"); +} +#endif +#if defined(rvmdk) || defined(__ARMCC_VERSION) +__asm void +SysCtlDelay(unsigned long ulCount) +{ + subs r0, #1; + bne SysCtlDelay; + bx lr; +} +#endif +// +// For CCS implement this function in pure assembly. This prevents the TI +// compiler from doing funny things with the optimizer. +// +#if defined(ccs) + __asm(" .sect \".text:SysCtlDelay\"\n" + " .clink\n" + " .thumbfunc SysCtlDelay\n" + " .thumb\n" + " .global SysCtlDelay\n" + "SysCtlDelay:\n" + " subs r0, #1\n" + " bne.n SysCtlDelay\n" + " bx lr\n"); +#endif + + +//***************************************************************************** +// +//! Sets the clocking of the device. +//! +//! \param ulConfig is the required configuration of the device clocking. +//! +//! This function configures the clocking of the device. The input crystal +//! frequency, oscillator to be used, use of the PLL, and the system clock +//! divider are all configured with this function. +//! +//! The \e ulConfig parameter is the logical OR of several different values, +//! many of which are grouped into sets where only one can be chosen. +//! +//! The system clock divider is chosen with one of the following values: +//! \b SYSCTL_SYSDIV_1, \b SYSCTL_SYSDIV_2, \b SYSCTL_SYSDIV_3, ... +//! \b SYSCTL_SYSDIV_64. Only \b SYSCTL_SYSDIV_1 through \b SYSCTL_SYSDIV_16 +//! are valid on Sandstorm-class devices. +//! +//! The use of the PLL is chosen with either \b SYSCTL_USE_PLL or +//! \b SYSCTL_USE_OSC. +//! +//! The external crystal frequency is chosen with one of the following values: +//! \b SYSCTL_XTAL_1MHZ, \b SYSCTL_XTAL_1_84MHZ, \b SYSCTL_XTAL_2MHZ, +//! \b SYSCTL_XTAL_2_45MHZ, \b SYSCTL_XTAL_3_57MHZ, \b SYSCTL_XTAL_3_68MHZ, +//! \b SYSCTL_XTAL_4MHZ, \b SYSCTL_XTAL_4_09MHZ, \b SYSCTL_XTAL_4_91MHZ, +//! \b SYSCTL_XTAL_5MHZ, \b SYSCTL_XTAL_5_12MHZ, \b SYSCTL_XTAL_6MHZ, +//! \b SYSCTL_XTAL_6_14MHZ, \b SYSCTL_XTAL_7_37MHZ, \b SYSCTL_XTAL_8MHZ, +//! \b SYSCTL_XTAL_8_19MHZ, \b SYSCTL_XTAL_10MHZ, \b SYSCTL_XTAL_12MHZ, +//! \b SYSCTL_XTAL_12_2MHZ, \b SYSCTL_XTAL_13_5MHZ, \b SYSCTL_XTAL_14_3MHZ, +//! \b SYSCTL_XTAL_16MHZ, or \b SYSCTL_XTAL_16_3MHZ. Values below +//! \b SYSCTL_XTAL_3_57MHZ are not valid when the PLL is in operation. On +//! Sandstorm- and Fury-class devices, values above \b SYSCTL_XTAL_8_19MHZ are +//! not valid. +//! +//! The oscillator source is chosen with one of the following values: +//! \b SYSCTL_OSC_MAIN, \b SYSCTL_OSC_INT, \b SYSCTL_OSC_INT4, +//! \b SYSCTL_OSC_INT30, or \b SYSCTL_OSC_EXT32. On Sandstorm-class devices, +//! \b SYSCTL_OSC_INT30 and \b SYSCTL_OSC_EXT32 are not valid. +//! \b SYSCTL_OSC_EXT32 is only available on devices with the hibernate module, +//! and then only when the hibernate module has been enabled. +//! +//! The internal and main oscillators are disabled with the +//! \b SYSCTL_INT_OSC_DIS and \b SYSCTL_MAIN_OSC_DIS flags, respectively. +//! The external oscillator must be enabled in order to use an external clock +//! source. Note that attempts to disable the oscillator used to clock the +//! device will be prevented by the hardware. +//! +//! To clock the system from an external source (such as an external crystal +//! oscillator), use \b SYSCTL_USE_OSC \b | \b SYSCTL_OSC_MAIN. To clock the +//! system from the main oscillator, use \b SYSCTL_USE_OSC \b | +//! \b SYSCTL_OSC_MAIN. To clock the system from the PLL, use +//! \b SYSCTL_USE_PLL \b | \b SYSCTL_OSC_MAIN, and select the appropriate +//! crystal with one of the \b SYSCTL_XTAL_xxx values. +//! +//! \note If selecting the PLL as the system clock source (that is, via +//! \b SYSCTL_USE_PLL), this function will poll the PLL lock interrupt to +//! determine when the PLL has locked. If an interrupt handler for the +//! system control interrupt is in place, and it responds to and clears the +//! PLL lock interrupt, this function will delay until its timeout has occurred +//! instead of completing as soon as PLL lock is achieved. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClockSet(unsigned long ulConfig) +{ + unsigned long ulDelay, ulRCC, ulRCC2; + + // + // See if this is a Sandstorm-class device and clocking features from newer + // devices were requested. + // + if(CLASS_IS_SANDSTORM && (ulConfig & SYSCTL_RCC2_USERCC2)) + { + // + // Return without changing the clocking since the requested + // configuration can not be achieved. + // + return; + } + + // + // Get the current value of the RCC and RCC2 registers. If using a + // Sandstorm-class device, the RCC2 register will read back as zero and the + // writes to it from within this function will be ignored. + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Bypass the PLL and system clock dividers for now. + // + ulRCC |= SYSCTL_RCC_BYPASS; + ulRCC &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= SYSCTL_RCC2_BYPASS2; + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // See if either oscillator needs to be enabled. + // + if(((ulRCC & SYSCTL_RCC_IOSCDIS) && !(ulConfig & SYSCTL_RCC_IOSCDIS)) || + ((ulRCC & SYSCTL_RCC_MOSCDIS) && !(ulConfig & SYSCTL_RCC_MOSCDIS))) + { + // + // Make sure that the required oscillators are enabled. For now, the + // previously enabled oscillators must be enabled along with the newly + // requested oscillators. + // + ulRCC &= (~(SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS) | + (ulConfig & (SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS))); + + // + // Write the new RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + + // + // Wait for a bit, giving the oscillator time to stabilize. The number + // of iterations is adjusted based on the current clock source; a + // smaller number of iterations is required for slower clock rates. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && + (((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_30) || + ((ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) == SYSCTL_RCC2_OSCSRC2_32))) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + ((ulRCC & SYSCTL_RCC_OSCSRC_M) == SYSCTL_RCC_OSCSRC_30))) + { + // + // Delay for 4096 iterations. + // + SysCtlDelay(4096); + } + else + { + // + // Delay for 524,288 iterations. + // + SysCtlDelay(524288); + } + } + + // + // Set the new crystal value, oscillator source, and PLL configuration. + // Since the OSCSRC2 field in RCC2 overlaps the XTAL field in RCC, the + // OSCSRC field has a special encoding within ulConfig to avoid the + // overlap. + // + ulRCC &= ~(SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC |= ulConfig & (SYSCTL_RCC_XTAL_M | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC_PWRDN | SYSCTL_RCC_OEN); + ulRCC2 &= ~(SYSCTL_RCC2_USERCC2 | SYSCTL_RCC2_OSCSRC2_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_USERCC2 | SYSCTL_RCC_OSCSRC_M | + SYSCTL_RCC2_PWRDN2); + ulRCC2 |= (ulConfig & 0x00000008) << 3; + + // + // Clear the PLL lock interrupt. + // + HWREG(SYSCTL_MISC) = SYSCTL_INT_PLL_LOCK; + + // + // Write the new RCC value. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + HWREG(SYSCTL_RCC2) = ulRCC2; + HWREG(SYSCTL_RCC) = ulRCC; + } + else + { + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + } + + // + // Wait for a bit so that new crystal value and oscillator source can take + // effect. + // + SysCtlDelay(16); + + // + // Set the requested system divider and disable the appropriate + // oscillators. This will not get written immediately. + // + ulRCC &= ~(SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC |= ulConfig & (SYSCTL_RCC_SYSDIV_M | SYSCTL_RCC_USESYSDIV | + SYSCTL_RCC_IOSCDIS | SYSCTL_RCC_MOSCDIS); + ulRCC2 &= ~(SYSCTL_RCC2_SYSDIV2_M); + ulRCC2 |= ulConfig & SYSCTL_RCC2_SYSDIV2_M; + if(ulConfig & SYSCTL_RCC2_DIV400) + { + ulRCC |= SYSCTL_RCC_USESYSDIV; + ulRCC2 &= ~(SYSCTL_RCC_USESYSDIV); + ulRCC2 |= ulConfig & (SYSCTL_RCC2_DIV400 | SYSCTL_RCC2_SYSDIV2LSB); + } + else + { + ulRCC2 &= ~(SYSCTL_RCC2_DIV400); + } + + // + // See if the PLL output is being used to clock the system. + // + if(!(ulConfig & SYSCTL_RCC_BYPASS)) + { + // + // Wait until the PLL has locked. + // + for(ulDelay = 32768; ulDelay > 0; ulDelay--) + { + if(HWREG(SYSCTL_RIS) & SYSCTL_INT_PLL_LOCK) + { + break; + } + } + + // + // Enable use of the PLL. + // + ulRCC &= ~(SYSCTL_RCC_BYPASS); + ulRCC2 &= ~(SYSCTL_RCC2_BYPASS2); + } + + // + // Write the final RCC value. + // + HWREG(SYSCTL_RCC) = ulRCC; + HWREG(SYSCTL_RCC2) = ulRCC2; + + // + // Delay for a little bit so that the system divider takes effect. + // + SysCtlDelay(16); +} + +//***************************************************************************** +// +//! Gets the processor clock rate. +//! +//! This function determines the clock rate of the processor clock. This is +//! also the clock rate of all the peripheral modules (with the exception of +//! PWM, which has its own clock divider). +//! +//! \note This will not return accurate results if SysCtlClockSet() has not +//! been called to configure the clocking of the device, or if the device is +//! directly clocked from a crystal (or a clock source) that is not one of the +//! supported crystal frequencies. In the later case, this function should be +//! modified to directly return the correct system clock rate. +//! +//! \return The processor clock rate. +// +//***************************************************************************** +unsigned long +SysCtlClockGet(void) +{ + unsigned long ulRCC, ulRCC2, ulPLL, ulClk; + + // + // Read RCC and RCC2. For Sandstorm-class devices (which do not have + // RCC2), the RCC2 read will return 0, which indicates that RCC2 is + // disabled (since the SYSCTL_RCC2_USERCC2 bit is clear). + // + ulRCC = HWREG(SYSCTL_RCC); + ulRCC2 = HWREG(SYSCTL_RCC2); + + // + // Get the base clock rate. + // + switch((ulRCC2 & SYSCTL_RCC2_USERCC2) ? + (ulRCC2 & SYSCTL_RCC2_OSCSRC2_M) : + (ulRCC & SYSCTL_RCC_OSCSRC_M)) + { + // + // The main oscillator is the clock source. Determine its rate from + // the crystal setting field. + // + case SYSCTL_RCC_OSCSRC_MAIN: + { + ulClk = g_pulXtals[(ulRCC & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + break; + } + + // + // The internal oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000; + } + else + { + // + // The internal oscillator on all other devices is 16 MHz. + // + ulClk = 16000000; + } + break; + } + + // + // The internal oscillator divided by four is the source clock. + // + case SYSCTL_RCC_OSCSRC_INT4: + { + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // The internal oscillator on a Sandstorm-class device is + // 15 MHz +/- 50%. + // + ulClk = 15000000 / 4; + } + else if((CLASS_IS_FURY && REVISION_IS_A2) || + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) + { + // + // The internal oscillator on a rev A2 Fury-class device and a + // rev A0 Dustdevil-class device is 12 MHz +/- 30%. + // + ulClk = 12000000 / 4; + } + else + { + // + // The internal oscillator on a Tempest-class device is 16 MHz. + // + ulClk = 16000000 / 4; + } + break; + } + + // + // The internal 30 KHz oscillator is the source clock. + // + case SYSCTL_RCC_OSCSRC_30: + { + // + // The internal 30 KHz oscillator has an accuracy of +/- 30%. + // + ulClk = 30000; + break; + } + + // + // The 4.19 MHz clock from the hibernate module is the clock source. + // + case SYSCTL_RCC2_OSCSRC2_419: + { + ulClk = 4194304; + break; + } + + // + // The 32 KHz clock from the hibernate module is the source clock. + // + case SYSCTL_RCC2_OSCSRC2_32: + { + ulClk = 32768; + break; + } + + // + // An unknown setting, so return a zero clock (that is, an unknown + // clock rate). + // + default: + { + return(0); + } + } + + // + // See if the PLL is being used. + // + if(((ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && !(ulRCC & SYSCTL_RCC_BYPASS))) + { + // + // Get the PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // See if this is a Sandstorm-class or Fury-class device. + // + if(CLASS_IS_SANDSTORM) + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Sandstorm-class devices is + // "(xtal * (f + 2)) / (r + 2)". + // + ulClk = ((ulClk * (((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S) + 2)) / + (((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 2)); + } + else + { + // + // Compute the PLL output frequency based on its input frequency. + // The formula for a Fury-class device is + // "(xtal * f) / ((r + 1) * 2)". + // + ulClk = ((ulClk * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1) * 2)); + } + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulClk /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulClk /= 4; + } + + // + // Force the system divider to be enabled. It is always used when + // using the PLL, but in some cases it will not read as being enabled. + // + ulRCC |= SYSCTL_RCC_USESYSDIV; + } + + // + // See if the system divider is being used. + // + if(ulRCC & SYSCTL_RCC_USESYSDIV) + { + // + // Adjust the clock rate by the system clock divider. + // + if(ulRCC2 & SYSCTL_RCC2_USERCC2) + { + if((ulRCC2 & SYSCTL_RCC2_DIV400) && + (((ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC2 & SYSCTL_RCC2_BYPASS2)) || + (!(ulRCC2 & SYSCTL_RCC2_USERCC2) && + !(ulRCC & SYSCTL_RCC_BYPASS)))) + + { + ulClk = ((ulClk * 2) / (((ulRCC2 & (SYSCTL_RCC2_SYSDIV2_M | + SYSCTL_RCC2_SYSDIV2LSB)) >> + (SYSCTL_RCC2_SYSDIV2_S - 1)) + 1)); + } + else + { + ulClk /= (((ulRCC2 & SYSCTL_RCC2_SYSDIV2_M) >> + SYSCTL_RCC2_SYSDIV2_S) + 1); + } + } + else + { + ulClk /= (((ulRCC & SYSCTL_RCC_SYSDIV_M) >> SYSCTL_RCC_SYSDIV_S) + + 1); + } + } + + // + // Return the computed clock rate. + // + return(ulClk); +} + +//***************************************************************************** +// +//! Sets the PWM clock configuration. +//! +//! \param ulConfig is the configuration for the PWM clock; it must be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +//! +//! This function sets the rate of the clock provided to the PWM module as a +//! ratio of the processor clock. This clock is used by the PWM module to +//! generate PWM signals; its rate forms the basis for all PWM signals. +//! +//! \note The clocking of the PWM is dependent upon the system clock rate as +//! configured by SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPWMClockSet(unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT((ulConfig == SYSCTL_PWMDIV_1) || + (ulConfig == SYSCTL_PWMDIV_2) || + (ulConfig == SYSCTL_PWMDIV_4) || + (ulConfig == SYSCTL_PWMDIV_8) || + (ulConfig == SYSCTL_PWMDIV_16) || + (ulConfig == SYSCTL_PWMDIV_32) || + (ulConfig == SYSCTL_PWMDIV_64)); + + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Set the PWM clock configuration into the run-mode clock configuration + // register. + // + HWREG(SYSCTL_RCC) = ((HWREG(SYSCTL_RCC) & + ~(SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)) | + ulConfig); +} + +//***************************************************************************** +// +//! Gets the current PWM clock configuration. +//! +//! This function returns the current PWM clock configuration. +//! +//! \return Returns the current PWM clock configuration; will be one of +//! \b SYSCTL_PWMDIV_1, \b SYSCTL_PWMDIV_2, \b SYSCTL_PWMDIV_4, +//! \b SYSCTL_PWMDIV_8, \b SYSCTL_PWMDIV_16, \b SYSCTL_PWMDIV_32, or +//! \b SYSCTL_PWMDIV_64. +// +//***************************************************************************** +unsigned long +SysCtlPWMClockGet(void) +{ + // + // Check that there is a PWM block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_PWM); + + // + // Return the current PWM clock configuration. Make sure that + // SYSCTL_PWMDIV_1 is returned in all cases where the divider is disabled. + // + if(!(HWREG(SYSCTL_RCC) & SYSCTL_RCC_USEPWMDIV)) + { + // + // The divider is not active so reflect this in the value we return. + // + return(SYSCTL_PWMDIV_1); + } + else + { + // + // The divider is active so directly return the masked register value. + // + return(HWREG(SYSCTL_RCC) & + (SYSCTL_RCC_USEPWMDIV | SYSCTL_RCC_PWMDIV_M)); + } +} + +//***************************************************************************** +// +//! Sets the sample rate of the ADC. +//! +//! \param ulSpeed is the desired sample rate of the ADC; must be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +//! +//! This function sets the rate at which the ADC samples are captured by the +//! ADC block. The sampling speed may be limited by the hardware, so the +//! sample rate may end up being slower than requested. SysCtlADCSpeedGet() +//! will return the actual speed in use. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlADCSpeedSet(unsigned long ulSpeed) +{ + // + // Check the arguments. + // + ASSERT((ulSpeed == SYSCTL_ADCSPEED_1MSPS) || + (ulSpeed == SYSCTL_ADCSPEED_500KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_250KSPS) || + (ulSpeed == SYSCTL_ADCSPEED_125KSPS)); + + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Set the ADC speed in run, sleep, and deep-sleep mode. + // + HWREG(SYSCTL_RCGC0) = ((HWREG(SYSCTL_RCGC0) & ~(SYSCTL_RCGC0_ADCSPD_M)) | + ulSpeed); + HWREG(SYSCTL_SCGC0) = ((HWREG(SYSCTL_SCGC0) & ~(SYSCTL_SCGC0_ADCSPD_M)) | + ulSpeed); +} + +//***************************************************************************** +// +//! Gets the sample rate of the ADC. +//! +//! This function gets the current sample rate of the ADC. +//! +//! \return Returns the current ADC sample rate; will be one of +//! \b SYSCTL_ADCSPEED_1MSPS, \b SYSCTL_ADCSPEED_500KSPS, +//! \b SYSCTL_ADCSPEED_250KSPS, or \b SYSCTL_ADCSPEED_125KSPS. +// +//***************************************************************************** +unsigned long +SysCtlADCSpeedGet(void) +{ + // + // Check that there is an ADC block on this part. + // + ASSERT(HWREG(SYSCTL_DC1) & SYSCTL_DC1_ADC0); + + // + // Return the current ADC speed. + // + return(HWREG(SYSCTL_RCGC0) & SYSCTL_RCGC0_ADCSPD_M); +} + +//***************************************************************************** +// +//! Configures the internal oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the internal oscillator +//! verification timer should be enabled. +//! +//! This function allows the internal oscillator verification timer to be +//! enabled or disabled. When enabled, an interrupt will be generated if the +//! internal oscillator ceases to operate. +//! +//! The internal oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the main oscillator will verify the +//! internal oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlIOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the internal oscillator verification timer as + // requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_IOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_IOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the main oscillator verification timer. +//! +//! \param bEnable is a boolean that is \b true if the main oscillator +//! verification timer should be enabled. +//! +//! This function allows the main oscillator verification timer to be enabled +//! or disabled. When enabled, an interrupt will be generated if the main +//! oscillator ceases to operate. +//! +//! The main oscillator verification timer is only available on +//! Sandstorm-class devices. +//! +//! \note Both oscillators (main and internal) must be enabled for this +//! verification timer to operate as the internal oscillator will verify the +//! main oscillator. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlMOSCVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the main oscillator verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_MOSCVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_MOSCVER); + } +} + +//***************************************************************************** +// +//! Configures the PLL verification timer. +//! +//! \param bEnable is a boolean that is \b true if the PLL verification timer +//! should be enabled. +//! +//! This function allows the PLL verification timer to be enabled or disabled. +//! When enabled, an interrupt will be generated if the PLL ceases to operate. +//! +//! The PLL verification timer is only available on Sandstorm-class devices. +//! +//! \note The main oscillator must be enabled for this verification timer to +//! operate as it is used to check the PLL. Also, the verification timer +//! should be disabled while the PLL is being reconfigured via +//! SysCtlClockSet(). +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlPLLVerificationSet(tBoolean bEnable) +{ + // + // Enable or disable the PLL verification timer as requested. + // + if(bEnable) + { + HWREG(SYSCTL_RCC) |= SYSCTL_RCC_PLLVER; + } + else + { + HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_PLLVER); + } +} + +//***************************************************************************** +// +//! Clears the clock verification status. +//! +//! This function clears the status of the clock verification timers, allowing +//! them to assert another failure if detected. +//! +//! The clock verification timers are only available on Sandstorm-class +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlClkVerificationClear(void) +{ + // + // Clear the clock verification. + // + HWREG(SYSCTL_CLKVCLR) = SYSCTL_CLKVCLR_VERCLR; + + // + // The bit does not self-reset, so clear it. + // + HWREG(SYSCTL_CLKVCLR) = 0; +} + +//***************************************************************************** +// +//! Enables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to enable. +//! +//! This function is used to enable the specified GPIO peripheral to be +//! accessed from the Advanced Host Bus (AHB) instead of the legacy Advanced +//! Peripheral Bus (APB). When a GPIO peripheral is enabled for AHB access, +//! the \b _AHB_BASE form of the base address should be used for GPIO +//! functions. For example, instead of using \b GPIO_PORTA_BASE as the base +//! address for GPIO functions, use \b GPIO_PORTA_AHB_BASE instead. +//! +//! The \e ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Enable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) |= ulGPIOPeripheral & 0xFFFF; +} + +//***************************************************************************** +// +//! Disables a GPIO peripheral for access from the AHB. +//! +//! \param ulGPIOPeripheral is the GPIO peripheral to disable. +//! +//! This function disables the specified GPIO peripheral for access from the +//! Advanced Host Bus (AHB). Once disabled, the GPIO peripheral is accessed +//! from the legacy Advanced Peripheral Bus (AHB). +//! +//! The \b ulGPIOPeripheral argument must be only one of the following values: +//! \b SYSCTL_PERIPH_GPIOA, \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, +//! \b SYSCTL_PERIPH_GPIOD, \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_GPIOF, +//! \b SYSCTL_PERIPH_GPIOG, or \b SYSCTL_PERIPH_GPIOH. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral) +{ + // + // Check the arguments. + // + ASSERT((ulGPIOPeripheral == SYSCTL_PERIPH_GPIOA) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOB) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOC) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOD) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOE) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOF) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOG) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOH) || + (ulGPIOPeripheral == SYSCTL_PERIPH_GPIOJ)); + + // + // Disable this GPIO for AHB access. + // + HWREG(SYSCTL_GPIOHBCTL) &= ~(ulGPIOPeripheral & 0xFFFF); +} + +//***************************************************************************** +// +//! Powers up the USB PLL. +//! +//! This function will enable the USB controller's PLL which is used by it's +//! physical layer. This call is necessary before connecting to any external +//! devices. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLEnable(void) +{ + // + // Turn on the USB PLL. + // + HWREG(SYSCTL_RCC2) &= ~SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Powers down the USB PLL. +//! +//! This function will disable the USB controller's PLL which is used by it's +//! physical layer. The USB registers are still accessible, but the physical +//! layer will no longer function. +//! +//! \return None. +// +//***************************************************************************** +void +SysCtlUSBPLLDisable(void) +{ + // + // Turn of USB PLL. + // + HWREG(SYSCTL_RCC2) |= SYSCTL_RCC2_USBPWRDN; +} + +//***************************************************************************** +// +//! Sets the MCLK frequency provided to the I2S module. +//! +//! \param ulInputClock is the input clock to the MCLK divider. If this is +//! zero, the value is computed from the current PLL configuration. +//! \param ulMClk is the desired MCLK frequency. If this is zero, MCLK output +//! is disabled. +//! +//! This function sets the dividers to provide MCLK to the I2S module. A MCLK +//! divider will be chosen that produces the MCLK frequency that is the closest +//! possible to the requested frequency, which may be above or below the +//! requested frequency. +//! +//! The actual MCLK frequency will be returned. It is the responsibility of +//! the application to determine if the selected MCLK is acceptable; in general +//! the human ear can not discern the frequency difference if it is within 0.3% +//! of the desired frequency (though there is a very small percentage of the +//! population that can discern lower frequency deviations). +//! +//! \return Returns the actual MCLK frequency. +// +//***************************************************************************** +unsigned long +SysCtlI2SMClkSet(unsigned long ulInputClock, unsigned long ulMClk) +{ + unsigned long ulDivInt, ulDivFrac, ulPLL; + + // + // See if the I2S MCLK should be disabled. + // + if(ulMClk == 0) + { + // + // Disable the I2S MCLK and return. + // + HWREG(SYSCTL_I2SMCLKCFG) = 0; + return(0); + } + + // + // See if the input clock was specified. + // + if(ulInputClock == 0) + { + // + // The input clock was not specified, so compute the output frequency + // of the PLL. Get the current PLL configuration. + // + ulPLL = HWREG(SYSCTL_PLLCFG); + + // + // Get the frequency of the crystal in use. + // + ulInputClock = g_pulXtals[(HWREG(SYSCTL_RCC) & SYSCTL_RCC_XTAL_M) >> + SYSCTL_RCC_XTAL_S]; + + // + // Calculate the PLL output frequency. + // + ulInputClock = ((ulInputClock * ((ulPLL & SYSCTL_PLLCFG_F_M) >> + SYSCTL_PLLCFG_F_S)) / + ((((ulPLL & SYSCTL_PLLCFG_R_M) >> + SYSCTL_PLLCFG_R_S) + 1))); + + // + // See if the optional output divide by 2 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_2) + { + ulInputClock /= 2; + } + + // + // See if the optional output divide by 4 is being used. + // + if(ulPLL & SYSCTL_PLLCFG_OD_4) + { + ulInputClock /= 4; + } + } + + // + // Verify that the requested MCLK frequency is attainable. + // + ASSERT(ulMClk < ulInputClock); + + // + // Add a rounding factor to the input clock, so that the MCLK frequency + // that is closest to the desire value is selected. + // + ulInputClock += (ulMClk / 32) - 1; + + // + // Compute the integer portion of the MCLK divider. + // + ulDivInt = ulInputClock / ulMClk; + + // + // If the divisor is too large, then simply use the maximum divisor. + // + if(CLASS_IS_TEMPEST && REVISION_IS_B1 && (ulDivInt > 255)) + { + ulDivInt = 255; + ulDivFrac = 15; + } + else if(ulDivInt > 1023) + { + ulDivInt = 1023; + ulDivFrac = 15; + } + else + { + // + // Compute the fractional portion of the MCLK divider. + // + ulDivFrac = ((ulInputClock - (ulDivInt * ulMClk)) * 16) / ulMClk; + } + + // + // Set the divisor for the Tx and Rx MCLK generators and enable the clocks. + // + HWREG(SYSCTL_I2SMCLKCFG) = (SYSCTL_I2SMCLKCFG_RXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_RXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_RXF_S) | + SYSCTL_I2SMCLKCFG_TXEN | + (ulDivInt << SYSCTL_I2SMCLKCFG_TXI_S) | + (ulDivFrac << SYSCTL_I2SMCLKCFG_TXF_S)); + + // + // Return the actual MCLK frequency. + // + ulInputClock -= (ulMClk / 32) - 1; + ulDivInt = (ulDivInt * 16) + ulDivFrac; + ulMClk = (ulInputClock / ulDivInt) * 16; + ulMClk += ((ulInputClock - ((ulMClk / 16) * ulDivInt)) * 16) / ulDivInt; + return(ulMClk); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.h new file mode 100644 index 00000000..d5b00681 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/sysctl.h @@ -0,0 +1,466 @@ +//***************************************************************************** +// +// sysctl.h - Prototypes for the system control driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSCTL_H__ +#define __SYSCTL_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to the +// SysCtlPeripheralPresent(), SysCtlPeripheralEnable(), +// SysCtlPeripheralDisable(), and SysCtlPeripheralReset() APIs as the +// ulPeripheral parameter. The peripherals in the fourth group (upper nibble +// is 3) can only be used with the SysCtlPeripheralPresent() API. +// +//***************************************************************************** +#ifndef DEPRECATED +#define SYSCTL_PERIPH_WDOG 0x00000008 // Watchdog +#endif +#define SYSCTL_PERIPH_WDOG0 0x00000008 // Watchdog 0 +#define SYSCTL_PERIPH_HIBERNATE 0x00000040 // Hibernation module +#ifndef DEPRECATED +#define SYSCTL_PERIPH_ADC 0x00100001 // ADC +#endif +#define SYSCTL_PERIPH_ADC0 0x00100001 // ADC0 +#define SYSCTL_PERIPH_ADC1 0x00100002 // ADC1 +#define SYSCTL_PERIPH_PWM 0x00100010 // PWM +#define SYSCTL_PERIPH_CAN0 0x00100100 // CAN 0 +#define SYSCTL_PERIPH_CAN1 0x00100200 // CAN 1 +#define SYSCTL_PERIPH_CAN2 0x00100400 // CAN 2 +#define SYSCTL_PERIPH_WDOG1 0x00101000 // Watchdog 1 +#define SYSCTL_PERIPH_UART0 0x10000001 // UART 0 +#define SYSCTL_PERIPH_UART1 0x10000002 // UART 1 +#define SYSCTL_PERIPH_UART2 0x10000004 // UART 2 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_SSI 0x10000010 // SSI +#endif +#define SYSCTL_PERIPH_SSI0 0x10000010 // SSI 0 +#define SYSCTL_PERIPH_SSI1 0x10000020 // SSI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_QEI 0x10000100 // QEI +#endif +#define SYSCTL_PERIPH_QEI0 0x10000100 // QEI 0 +#define SYSCTL_PERIPH_QEI1 0x10000200 // QEI 1 +#ifndef DEPRECATED +#define SYSCTL_PERIPH_I2C 0x10001000 // I2C +#endif +#define SYSCTL_PERIPH_I2C0 0x10001000 // I2C 0 +#define SYSCTL_PERIPH_I2C1 0x10004000 // I2C 1 +#define SYSCTL_PERIPH_TIMER0 0x10100001 // Timer 0 +#define SYSCTL_PERIPH_TIMER1 0x10100002 // Timer 1 +#define SYSCTL_PERIPH_TIMER2 0x10100004 // Timer 2 +#define SYSCTL_PERIPH_TIMER3 0x10100008 // Timer 3 +#define SYSCTL_PERIPH_COMP0 0x10100100 // Analog comparator 0 +#define SYSCTL_PERIPH_COMP1 0x10100200 // Analog comparator 1 +#define SYSCTL_PERIPH_COMP2 0x10100400 // Analog comparator 2 +#define SYSCTL_PERIPH_I2S0 0x10101000 // I2S0 +#define SYSCTL_PERIPH_EPI0 0x10104000 // EPI0 +#define SYSCTL_PERIPH_GPIOA 0x20000001 // GPIO A +#define SYSCTL_PERIPH_GPIOB 0x20000002 // GPIO B +#define SYSCTL_PERIPH_GPIOC 0x20000004 // GPIO C +#define SYSCTL_PERIPH_GPIOD 0x20000008 // GPIO D +#define SYSCTL_PERIPH_GPIOE 0x20000010 // GPIO E +#define SYSCTL_PERIPH_GPIOF 0x20000020 // GPIO F +#define SYSCTL_PERIPH_GPIOG 0x20000040 // GPIO G +#define SYSCTL_PERIPH_GPIOH 0x20000080 // GPIO H +#define SYSCTL_PERIPH_GPIOJ 0x20000100 // GPIO J +#define SYSCTL_PERIPH_UDMA 0x20002000 // uDMA +#define SYSCTL_PERIPH_USB0 0x20100001 // USB0 +#define SYSCTL_PERIPH_ETH 0x20105000 // ETH +#define SYSCTL_PERIPH_IEEE1588 0x20100100 // IEEE1588 +#define SYSCTL_PERIPH_PLL 0x30000010 // PLL +#define SYSCTL_PERIPH_TEMP 0x30000020 // Temperature sensor +#define SYSCTL_PERIPH_MPU 0x30000080 // Cortex M3 MPU + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPinPresent() API +// as the ulPin parameter. +// +//***************************************************************************** +#define SYSCTL_PIN_PWM0 0x00000001 // PWM0 pin +#define SYSCTL_PIN_PWM1 0x00000002 // PWM1 pin +#define SYSCTL_PIN_PWM2 0x00000004 // PWM2 pin +#define SYSCTL_PIN_PWM3 0x00000008 // PWM3 pin +#define SYSCTL_PIN_PWM4 0x00000010 // PWM4 pin +#define SYSCTL_PIN_PWM5 0x00000020 // PWM5 pin +#define SYSCTL_PIN_PWM6 0x00000040 // PWM6 pin +#define SYSCTL_PIN_PWM7 0x00000080 // PWM7 pin +#define SYSCTL_PIN_C0MINUS 0x00000040 // C0- pin +#define SYSCTL_PIN_C0PLUS 0x00000080 // C0+ pin +#define SYSCTL_PIN_C0O 0x00000100 // C0o pin +#define SYSCTL_PIN_C1MINUS 0x00000200 // C1- pin +#define SYSCTL_PIN_C1PLUS 0x00000400 // C1+ pin +#define SYSCTL_PIN_C1O 0x00000800 // C1o pin +#define SYSCTL_PIN_C2MINUS 0x00001000 // C2- pin +#define SYSCTL_PIN_C2PLUS 0x00002000 // C2+ pin +#define SYSCTL_PIN_C2O 0x00004000 // C2o pin +#define SYSCTL_PIN_MC_FAULT0 0x00008000 // MC0 Fault pin +#define SYSCTL_PIN_ADC0 0x00010000 // ADC0 pin +#define SYSCTL_PIN_ADC1 0x00020000 // ADC1 pin +#define SYSCTL_PIN_ADC2 0x00040000 // ADC2 pin +#define SYSCTL_PIN_ADC3 0x00080000 // ADC3 pin +#define SYSCTL_PIN_ADC4 0x00100000 // ADC4 pin +#define SYSCTL_PIN_ADC5 0x00200000 // ADC5 pin +#define SYSCTL_PIN_ADC6 0x00400000 // ADC6 pin +#define SYSCTL_PIN_ADC7 0x00800000 // ADC7 pin +#define SYSCTL_PIN_CCP0 0x01000000 // CCP0 pin +#define SYSCTL_PIN_CCP1 0x02000000 // CCP1 pin +#define SYSCTL_PIN_CCP2 0x04000000 // CCP2 pin +#define SYSCTL_PIN_CCP3 0x08000000 // CCP3 pin +#define SYSCTL_PIN_CCP4 0x10000000 // CCP4 pin +#define SYSCTL_PIN_CCP5 0x20000000 // CCP5 pin +#define SYSCTL_PIN_32KHZ 0x80000000 // 32kHz pin + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOSet() API as +// the ulVoltage value, or returned by the SysCtlLDOGet() API. +// +//***************************************************************************** +#define SYSCTL_LDO_2_25V 0x00000005 // LDO output of 2.25V +#define SYSCTL_LDO_2_30V 0x00000004 // LDO output of 2.30V +#define SYSCTL_LDO_2_35V 0x00000003 // LDO output of 2.35V +#define SYSCTL_LDO_2_40V 0x00000002 // LDO output of 2.40V +#define SYSCTL_LDO_2_45V 0x00000001 // LDO output of 2.45V +#define SYSCTL_LDO_2_50V 0x00000000 // LDO output of 2.50V +#define SYSCTL_LDO_2_55V 0x0000001f // LDO output of 2.55V +#define SYSCTL_LDO_2_60V 0x0000001e // LDO output of 2.60V +#define SYSCTL_LDO_2_65V 0x0000001d // LDO output of 2.65V +#define SYSCTL_LDO_2_70V 0x0000001c // LDO output of 2.70V +#define SYSCTL_LDO_2_75V 0x0000001b // LDO output of 2.75V + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlLDOConfigSet() API. +// +//***************************************************************************** +#define SYSCTL_LDOCFG_ARST 0x00000001 // Allow LDO failure to reset +#define SYSCTL_LDOCFG_NORST 0x00000000 // Do not reset on LDO failure + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlIntEnable(), +// SysCtlIntDisable(), and SysCtlIntClear() APIs, or returned in the bit mask +// by the SysCtlIntStatus() API. +// +//***************************************************************************** +#define SYSCTL_INT_MOSC_PUP 0x00000100 // MOSC power-up interrupt +#define SYSCTL_INT_USBPLL_LOCK 0x00000080 // USB PLL lock interrupt +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlResetCauseClear() +// API or returned by the SysCtlResetCauseGet() API. +// +//***************************************************************************** +#define SYSCTL_CAUSE_LDO 0x00000020 // LDO power not OK reset +#define SYSCTL_CAUSE_SW 0x00000010 // Software reset +#define SYSCTL_CAUSE_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset +#define SYSCTL_CAUSE_POR 0x00000002 // Power on reset +#define SYSCTL_CAUSE_EXT 0x00000001 // External reset + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlBrownOutConfigSet() +// API as the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_BOR_RESET 0x00000002 // Reset instead of interrupting +#define SYSCTL_BOR_RESAMPLE 0x00000001 // Resample BOR before asserting + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlPWMClockSet() API +// as the ulConfig parameter, and can be returned by the SysCtlPWMClockGet() +// API. +// +//***************************************************************************** +#define SYSCTL_PWMDIV_1 0x00000000 // PWM clock is processor clock /1 +#define SYSCTL_PWMDIV_2 0x00100000 // PWM clock is processor clock /2 +#define SYSCTL_PWMDIV_4 0x00120000 // PWM clock is processor clock /4 +#define SYSCTL_PWMDIV_8 0x00140000 // PWM clock is processor clock /8 +#define SYSCTL_PWMDIV_16 0x00160000 // PWM clock is processor clock /16 +#define SYSCTL_PWMDIV_32 0x00180000 // PWM clock is processor clock /32 +#define SYSCTL_PWMDIV_64 0x001A0000 // PWM clock is processor clock /64 + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlADCSpeedSet() API +// as the ulSpeed parameter, and can be returned by the SyCtlADCSpeedGet() +// API. +// +//***************************************************************************** +#define SYSCTL_ADCSPEED_1MSPS 0x00000F00 // 1,000,000 samples per second +#define SYSCTL_ADCSPEED_500KSPS 0x00000A00 // 500,000 samples per second +#define SYSCTL_ADCSPEED_250KSPS 0x00000500 // 250,000 samples per second +#define SYSCTL_ADCSPEED_125KSPS 0x00000000 // 125,000 samples per second + +//***************************************************************************** +// +// The following are values that can be passed to the SysCtlClockSet() API as +// the ulConfig parameter. +// +//***************************************************************************** +#define SYSCTL_SYSDIV_1 0x07800000 // Processor clock is osc/pll /1 +#define SYSCTL_SYSDIV_2 0x00C00000 // Processor clock is osc/pll /2 +#define SYSCTL_SYSDIV_3 0x01400000 // Processor clock is osc/pll /3 +#define SYSCTL_SYSDIV_4 0x01C00000 // Processor clock is osc/pll /4 +#define SYSCTL_SYSDIV_5 0x02400000 // Processor clock is osc/pll /5 +#define SYSCTL_SYSDIV_6 0x02C00000 // Processor clock is osc/pll /6 +#define SYSCTL_SYSDIV_7 0x03400000 // Processor clock is osc/pll /7 +#define SYSCTL_SYSDIV_8 0x03C00000 // Processor clock is osc/pll /8 +#define SYSCTL_SYSDIV_9 0x04400000 // Processor clock is osc/pll /9 +#define SYSCTL_SYSDIV_10 0x04C00000 // Processor clock is osc/pll /10 +#define SYSCTL_SYSDIV_11 0x05400000 // Processor clock is osc/pll /11 +#define SYSCTL_SYSDIV_12 0x05C00000 // Processor clock is osc/pll /12 +#define SYSCTL_SYSDIV_13 0x06400000 // Processor clock is osc/pll /13 +#define SYSCTL_SYSDIV_14 0x06C00000 // Processor clock is osc/pll /14 +#define SYSCTL_SYSDIV_15 0x07400000 // Processor clock is osc/pll /15 +#define SYSCTL_SYSDIV_16 0x07C00000 // Processor clock is osc/pll /16 +#define SYSCTL_SYSDIV_17 0x88400000 // Processor clock is osc/pll /17 +#define SYSCTL_SYSDIV_18 0x88C00000 // Processor clock is osc/pll /18 +#define SYSCTL_SYSDIV_19 0x89400000 // Processor clock is osc/pll /19 +#define SYSCTL_SYSDIV_20 0x89C00000 // Processor clock is osc/pll /20 +#define SYSCTL_SYSDIV_21 0x8A400000 // Processor clock is osc/pll /21 +#define SYSCTL_SYSDIV_22 0x8AC00000 // Processor clock is osc/pll /22 +#define SYSCTL_SYSDIV_23 0x8B400000 // Processor clock is osc/pll /23 +#define SYSCTL_SYSDIV_24 0x8BC00000 // Processor clock is osc/pll /24 +#define SYSCTL_SYSDIV_25 0x8C400000 // Processor clock is osc/pll /25 +#define SYSCTL_SYSDIV_26 0x8CC00000 // Processor clock is osc/pll /26 +#define SYSCTL_SYSDIV_27 0x8D400000 // Processor clock is osc/pll /27 +#define SYSCTL_SYSDIV_28 0x8DC00000 // Processor clock is osc/pll /28 +#define SYSCTL_SYSDIV_29 0x8E400000 // Processor clock is osc/pll /29 +#define SYSCTL_SYSDIV_30 0x8EC00000 // Processor clock is osc/pll /30 +#define SYSCTL_SYSDIV_31 0x8F400000 // Processor clock is osc/pll /31 +#define SYSCTL_SYSDIV_32 0x8FC00000 // Processor clock is osc/pll /32 +#define SYSCTL_SYSDIV_33 0x90400000 // Processor clock is osc/pll /33 +#define SYSCTL_SYSDIV_34 0x90C00000 // Processor clock is osc/pll /34 +#define SYSCTL_SYSDIV_35 0x91400000 // Processor clock is osc/pll /35 +#define SYSCTL_SYSDIV_36 0x91C00000 // Processor clock is osc/pll /36 +#define SYSCTL_SYSDIV_37 0x92400000 // Processor clock is osc/pll /37 +#define SYSCTL_SYSDIV_38 0x92C00000 // Processor clock is osc/pll /38 +#define SYSCTL_SYSDIV_39 0x93400000 // Processor clock is osc/pll /39 +#define SYSCTL_SYSDIV_40 0x93C00000 // Processor clock is osc/pll /40 +#define SYSCTL_SYSDIV_41 0x94400000 // Processor clock is osc/pll /41 +#define SYSCTL_SYSDIV_42 0x94C00000 // Processor clock is osc/pll /42 +#define SYSCTL_SYSDIV_43 0x95400000 // Processor clock is osc/pll /43 +#define SYSCTL_SYSDIV_44 0x95C00000 // Processor clock is osc/pll /44 +#define SYSCTL_SYSDIV_45 0x96400000 // Processor clock is osc/pll /45 +#define SYSCTL_SYSDIV_46 0x96C00000 // Processor clock is osc/pll /46 +#define SYSCTL_SYSDIV_47 0x97400000 // Processor clock is osc/pll /47 +#define SYSCTL_SYSDIV_48 0x97C00000 // Processor clock is osc/pll /48 +#define SYSCTL_SYSDIV_49 0x98400000 // Processor clock is osc/pll /49 +#define SYSCTL_SYSDIV_50 0x98C00000 // Processor clock is osc/pll /50 +#define SYSCTL_SYSDIV_51 0x99400000 // Processor clock is osc/pll /51 +#define SYSCTL_SYSDIV_52 0x99C00000 // Processor clock is osc/pll /52 +#define SYSCTL_SYSDIV_53 0x9A400000 // Processor clock is osc/pll /53 +#define SYSCTL_SYSDIV_54 0x9AC00000 // Processor clock is osc/pll /54 +#define SYSCTL_SYSDIV_55 0x9B400000 // Processor clock is osc/pll /55 +#define SYSCTL_SYSDIV_56 0x9BC00000 // Processor clock is osc/pll /56 +#define SYSCTL_SYSDIV_57 0x9C400000 // Processor clock is osc/pll /57 +#define SYSCTL_SYSDIV_58 0x9CC00000 // Processor clock is osc/pll /58 +#define SYSCTL_SYSDIV_59 0x9D400000 // Processor clock is osc/pll /59 +#define SYSCTL_SYSDIV_60 0x9DC00000 // Processor clock is osc/pll /60 +#define SYSCTL_SYSDIV_61 0x9E400000 // Processor clock is osc/pll /61 +#define SYSCTL_SYSDIV_62 0x9EC00000 // Processor clock is osc/pll /62 +#define SYSCTL_SYSDIV_63 0x9F400000 // Processor clock is osc/pll /63 +#define SYSCTL_SYSDIV_64 0x9FC00000 // Processor clock is osc/pll /64 +#define SYSCTL_SYSDIV_2_5 0xC1000000 // Processor clock is pll / 2.5 +#define SYSCTL_SYSDIV_3_5 0xC1800000 // Processor clock is pll / 3.5 +#define SYSCTL_SYSDIV_4_5 0xC2000000 // Processor clock is pll / 4.5 +#define SYSCTL_SYSDIV_5_5 0xC2800000 // Processor clock is pll / 5.5 +#define SYSCTL_SYSDIV_6_5 0xC3000000 // Processor clock is pll / 6.5 +#define SYSCTL_SYSDIV_7_5 0xC3800000 // Processor clock is pll / 7.5 +#define SYSCTL_SYSDIV_8_5 0xC4000000 // Processor clock is pll / 8.5 +#define SYSCTL_SYSDIV_9_5 0xC4800000 // Processor clock is pll / 9.5 +#define SYSCTL_SYSDIV_10_5 0xC5000000 // Processor clock is pll / 10.5 +#define SYSCTL_SYSDIV_11_5 0xC5800000 // Processor clock is pll / 11.5 +#define SYSCTL_SYSDIV_12_5 0xC6000000 // Processor clock is pll / 12.5 +#define SYSCTL_SYSDIV_13_5 0xC6800000 // Processor clock is pll / 13.5 +#define SYSCTL_SYSDIV_14_5 0xC7000000 // Processor clock is pll / 14.5 +#define SYSCTL_SYSDIV_15_5 0xC7800000 // Processor clock is pll / 15.5 +#define SYSCTL_SYSDIV_16_5 0xC8000000 // Processor clock is pll / 16.5 +#define SYSCTL_SYSDIV_17_5 0xC8800000 // Processor clock is pll / 17.5 +#define SYSCTL_SYSDIV_18_5 0xC9000000 // Processor clock is pll / 18.5 +#define SYSCTL_SYSDIV_19_5 0xC9800000 // Processor clock is pll / 19.5 +#define SYSCTL_SYSDIV_20_5 0xCA000000 // Processor clock is pll / 20.5 +#define SYSCTL_SYSDIV_21_5 0xCA800000 // Processor clock is pll / 21.5 +#define SYSCTL_SYSDIV_22_5 0xCB000000 // Processor clock is pll / 22.5 +#define SYSCTL_SYSDIV_23_5 0xCB800000 // Processor clock is pll / 23.5 +#define SYSCTL_SYSDIV_24_5 0xCC000000 // Processor clock is pll / 24.5 +#define SYSCTL_SYSDIV_25_5 0xCC800000 // Processor clock is pll / 25.5 +#define SYSCTL_SYSDIV_26_5 0xCD000000 // Processor clock is pll / 26.5 +#define SYSCTL_SYSDIV_27_5 0xCD800000 // Processor clock is pll / 27.5 +#define SYSCTL_SYSDIV_28_5 0xCE000000 // Processor clock is pll / 28.5 +#define SYSCTL_SYSDIV_29_5 0xCE800000 // Processor clock is pll / 29.5 +#define SYSCTL_SYSDIV_30_5 0xCF000000 // Processor clock is pll / 30.5 +#define SYSCTL_SYSDIV_31_5 0xCF800000 // Processor clock is pll / 31.5 +#define SYSCTL_SYSDIV_32_5 0xD0000000 // Processor clock is pll / 32.5 +#define SYSCTL_SYSDIV_33_5 0xD0800000 // Processor clock is pll / 33.5 +#define SYSCTL_SYSDIV_34_5 0xD1000000 // Processor clock is pll / 34.5 +#define SYSCTL_SYSDIV_35_5 0xD1800000 // Processor clock is pll / 35.5 +#define SYSCTL_SYSDIV_36_5 0xD2000000 // Processor clock is pll / 36.5 +#define SYSCTL_SYSDIV_37_5 0xD2800000 // Processor clock is pll / 37.5 +#define SYSCTL_SYSDIV_38_5 0xD3000000 // Processor clock is pll / 38.5 +#define SYSCTL_SYSDIV_39_5 0xD3800000 // Processor clock is pll / 39.5 +#define SYSCTL_SYSDIV_40_5 0xD4000000 // Processor clock is pll / 40.5 +#define SYSCTL_SYSDIV_41_5 0xD4800000 // Processor clock is pll / 41.5 +#define SYSCTL_SYSDIV_42_5 0xD5000000 // Processor clock is pll / 42.5 +#define SYSCTL_SYSDIV_43_5 0xD5800000 // Processor clock is pll / 43.5 +#define SYSCTL_SYSDIV_44_5 0xD6000000 // Processor clock is pll / 44.5 +#define SYSCTL_SYSDIV_45_5 0xD6800000 // Processor clock is pll / 45.5 +#define SYSCTL_SYSDIV_46_5 0xD7000000 // Processor clock is pll / 46.5 +#define SYSCTL_SYSDIV_47_5 0xD7800000 // Processor clock is pll / 47.5 +#define SYSCTL_SYSDIV_48_5 0xD8000000 // Processor clock is pll / 48.5 +#define SYSCTL_SYSDIV_49_5 0xD8800000 // Processor clock is pll / 49.5 +#define SYSCTL_SYSDIV_50_5 0xD9000000 // Processor clock is pll / 50.5 +#define SYSCTL_SYSDIV_51_5 0xD9800000 // Processor clock is pll / 51.5 +#define SYSCTL_SYSDIV_52_5 0xDA000000 // Processor clock is pll / 52.5 +#define SYSCTL_SYSDIV_53_5 0xDA800000 // Processor clock is pll / 53.5 +#define SYSCTL_SYSDIV_54_5 0xDB000000 // Processor clock is pll / 54.5 +#define SYSCTL_SYSDIV_55_5 0xDB800000 // Processor clock is pll / 55.5 +#define SYSCTL_SYSDIV_56_5 0xDC000000 // Processor clock is pll / 56.5 +#define SYSCTL_SYSDIV_57_5 0xDC800000 // Processor clock is pll / 57.5 +#define SYSCTL_SYSDIV_58_5 0xDD000000 // Processor clock is pll / 58.5 +#define SYSCTL_SYSDIV_59_5 0xDD800000 // Processor clock is pll / 59.5 +#define SYSCTL_SYSDIV_60_5 0xDE000000 // Processor clock is pll / 60.5 +#define SYSCTL_SYSDIV_61_5 0xDE800000 // Processor clock is pll / 61.5 +#define SYSCTL_SYSDIV_62_5 0xDF000000 // Processor clock is pll / 62.5 +#define SYSCTL_SYSDIV_63_5 0xDF800000 // Processor clock is pll / 63.5 +#define SYSCTL_USE_PLL 0x00000000 // System clock is the PLL clock +#define SYSCTL_USE_OSC 0x00003800 // System clock is the osc clock +#define SYSCTL_XTAL_1MHZ 0x00000000 // External crystal is 1MHz +#define SYSCTL_XTAL_1_84MHZ 0x00000040 // External crystal is 1.8432MHz +#define SYSCTL_XTAL_2MHZ 0x00000080 // External crystal is 2MHz +#define SYSCTL_XTAL_2_45MHZ 0x000000C0 // External crystal is 2.4576MHz +#define SYSCTL_XTAL_3_57MHZ 0x00000100 // External crystal is 3.579545MHz +#define SYSCTL_XTAL_3_68MHZ 0x00000140 // External crystal is 3.6864MHz +#define SYSCTL_XTAL_4MHZ 0x00000180 // External crystal is 4MHz +#define SYSCTL_XTAL_4_09MHZ 0x000001C0 // External crystal is 4.096MHz +#define SYSCTL_XTAL_4_91MHZ 0x00000200 // External crystal is 4.9152MHz +#define SYSCTL_XTAL_5MHZ 0x00000240 // External crystal is 5MHz +#define SYSCTL_XTAL_5_12MHZ 0x00000280 // External crystal is 5.12MHz +#define SYSCTL_XTAL_6MHZ 0x000002C0 // External crystal is 6MHz +#define SYSCTL_XTAL_6_14MHZ 0x00000300 // External crystal is 6.144MHz +#define SYSCTL_XTAL_7_37MHZ 0x00000340 // External crystal is 7.3728MHz +#define SYSCTL_XTAL_8MHZ 0x00000380 // External crystal is 8MHz +#define SYSCTL_XTAL_8_19MHZ 0x000003C0 // External crystal is 8.192MHz +#define SYSCTL_XTAL_10MHZ 0x00000400 // External crystal is 10 MHz +#define SYSCTL_XTAL_12MHZ 0x00000440 // External crystal is 12 MHz +#define SYSCTL_XTAL_12_2MHZ 0x00000480 // External crystal is 12.288 MHz +#define SYSCTL_XTAL_13_5MHZ 0x000004C0 // External crystal is 13.56 MHz +#define SYSCTL_XTAL_14_3MHZ 0x00000500 // External crystal is 14.31818 MHz +#define SYSCTL_XTAL_16MHZ 0x00000540 // External crystal is 16 MHz +#define SYSCTL_XTAL_16_3MHZ 0x00000580 // External crystal is 16.384 MHz +#define SYSCTL_OSC_MAIN 0x00000000 // Osc source is main osc +#define SYSCTL_OSC_INT 0x00000010 // Osc source is int. osc +#define SYSCTL_OSC_INT4 0x00000020 // Osc source is int. osc /4 +#define SYSCTL_OSC_INT30 0x00000030 // Osc source is int. 30 KHz +#define SYSCTL_OSC_EXT4_19 0x80000028 // Osc source is ext. 4.19 MHz +#define SYSCTL_OSC_EXT32 0x80000038 // Osc source is ext. 32 KHz +#define SYSCTL_INT_PIOSC_DIS 0x00000004 // Disable interal precision osc. +#define SYSCTL_INT_OSC_DIS 0x00000002 // Disable internal oscillator +#define SYSCTL_MAIN_OSC_DIS 0x00000001 // Disable main oscillator + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long SysCtlSRAMSizeGet(void); +extern unsigned long SysCtlFlashSizeGet(void); +extern tBoolean SysCtlPinPresent(unsigned long ulPin); +extern tBoolean SysCtlPeripheralPresent(unsigned long ulPeripheral); +extern void SysCtlPeripheralReset(unsigned long ulPeripheral); +extern void SysCtlPeripheralEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepEnable(unsigned long ulPeripheral); +extern void SysCtlPeripheralDeepSleepDisable(unsigned long ulPeripheral); +extern void SysCtlPeripheralClockGating(tBoolean bEnable); +extern void SysCtlIntRegister(void (*pfnHandler)(void)); +extern void SysCtlIntUnregister(void); +extern void SysCtlIntEnable(unsigned long ulInts); +extern void SysCtlIntDisable(unsigned long ulInts); +extern void SysCtlIntClear(unsigned long ulInts); +extern unsigned long SysCtlIntStatus(tBoolean bMasked); +extern void SysCtlLDOSet(unsigned long ulVoltage); +extern unsigned long SysCtlLDOGet(void); +extern void SysCtlLDOConfigSet(unsigned long ulConfig); +extern void SysCtlReset(void); +extern void SysCtlSleep(void); +extern void SysCtlDeepSleep(void); +extern unsigned long SysCtlResetCauseGet(void); +extern void SysCtlResetCauseClear(unsigned long ulCauses); +extern void SysCtlBrownOutConfigSet(unsigned long ulConfig, + unsigned long ulDelay); +extern void SysCtlDelay(unsigned long ulCount); +extern void SysCtlClockSet(unsigned long ulConfig); +extern unsigned long SysCtlClockGet(void); +extern void SysCtlPWMClockSet(unsigned long ulConfig); +extern unsigned long SysCtlPWMClockGet(void); +extern void SysCtlADCSpeedSet(unsigned long ulSpeed); +extern unsigned long SysCtlADCSpeedGet(void); +extern void SysCtlIOSCVerificationSet(tBoolean bEnable); +extern void SysCtlMOSCVerificationSet(tBoolean bEnable); +extern void SysCtlPLLVerificationSet(tBoolean bEnable); +extern void SysCtlClkVerificationClear(void); +extern void SysCtlGPIOAHBEnable(unsigned long ulGPIOPeripheral); +extern void SysCtlGPIOAHBDisable(unsigned long ulGPIOPeripheral); +extern void SysCtlUSBPLLEnable(void); +extern void SysCtlUSBPLLDisable(void); +extern unsigned long SysCtlI2SMClkSet(unsigned long ulInputClock, + unsigned long ulMClk); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.c new file mode 100644 index 00000000..f19f19e7 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.c @@ -0,0 +1,259 @@ +//***************************************************************************** +// +// systick.c - Driver for the SysTick timer in NVIC. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup systick_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_nvic.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/systick.h" + +//***************************************************************************** +// +//! Enables the SysTick counter. +//! +//! This will start the SysTick counter. If an interrupt handler has been +//! registered, it will be called when the SysTick counter rolls over. +//! +//! \note Calling this function will cause the SysTick counter to (re)commence +//! counting from its current value. The counter is not automatically reloaded +//! with the period as specified in a previous call to SysTickPeriodSet(). If +//! an immediate reload is required, the \b NVIC_ST_CURRENT register must be +//! written to force this. Any write to this register clears the SysTick +//! counter to 0 and will cause a reload with the supplied period on the next +//! clock. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickEnable(void) +{ + // + // Enable SysTick. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_ENABLE; +} + +//***************************************************************************** +// +//! Disables the SysTick counter. +//! +//! This will stop the SysTick counter. If an interrupt handler has been +//! registered, it will no longer be called until SysTick is restarted. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickDisable(void) +{ + // + // Disable SysTick. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_ENABLE); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the SysTick interrupt. +//! +//! \param pfnHandler is a pointer to the function to be called when the +//! SysTick interrupt occurs. +//! +//! This sets the handler to be called when a SysTick interrupt occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntRegister(void (*pfnHandler)(void)) +{ + // + // Register the interrupt handler, returning an error if an error occurs. + // + IntRegister(FAULT_SYSTICK, pfnHandler); + + // + // Enable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; +} + +//***************************************************************************** +// +//! Unregisters the interrupt handler for the SysTick interrupt. +//! +//! This function will clear the handler to be called when a SysTick interrupt +//! occurs. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntUnregister(void) +{ + // + // Disable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); + + // + // Unregister the interrupt handler. + // + IntUnregister(FAULT_SYSTICK); +} + +//***************************************************************************** +// +//! Enables the SysTick interrupt. +//! +//! This function will enable the SysTick interrupt, allowing it to be +//! reflected to the processor. +//! +//! \note The SysTick interrupt handler does not need to clear the SysTick +//! interrupt source as this is done automatically by NVIC when the interrupt +//! handler is called. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntEnable(void) +{ + // + // Enable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN; +} + +//***************************************************************************** +// +//! Disables the SysTick interrupt. +//! +//! This function will disable the SysTick interrupt, preventing it from being +//! reflected to the processor. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickIntDisable(void) +{ + // + // Disable the SysTick interrupt. + // + HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN); +} + +//***************************************************************************** +// +//! Sets the period of the SysTick counter. +//! +//! \param ulPeriod is the number of clock ticks in each period of the SysTick +//! counter; must be between 1 and 16,777,216, inclusive. +//! +//! This function sets the rate at which the SysTick counter wraps; this +//! equates to the number of processor clocks between interrupts. +//! +//! \note Calling this function does not cause the SysTick counter to reload +//! immediately. If an immediate reload is required, the \b NVIC_ST_CURRENT +//! register must be written. Any write to this register clears the SysTick +//! counter to 0 and will cause a reload with the \e ulPeriod supplied here on +//! the next clock after the SysTick is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +SysTickPeriodSet(unsigned long ulPeriod) +{ + // + // Check the arguments. + // + ASSERT((ulPeriod > 0) && (ulPeriod <= 16777216)); + + // + // Set the period of the SysTick counter. + // + HWREG(NVIC_ST_RELOAD) = ulPeriod - 1; +} + +//***************************************************************************** +// +//! Gets the period of the SysTick counter. +//! +//! This function returns the rate at which the SysTick counter wraps; this +//! equates to the number of processor clocks between interrupts. +//! +//! \return Returns the period of the SysTick counter. +// +//***************************************************************************** +unsigned long +SysTickPeriodGet(void) +{ + // + // Return the period of the SysTick counter. + // + return(HWREG(NVIC_ST_RELOAD) + 1); +} + +//***************************************************************************** +// +//! Gets the current value of the SysTick counter. +//! +//! This function returns the current value of the SysTick counter; this will +//! be a value between the period - 1 and zero, inclusive. +//! +//! \return Returns the current value of the SysTick counter. +// +//***************************************************************************** +unsigned long +SysTickValueGet(void) +{ + // + // Return the current value of the SysTick counter. + // + return(HWREG(NVIC_ST_CURRENT)); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.h new file mode 100644 index 00000000..31a7e5d1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/systick.h @@ -0,0 +1,63 @@ +//***************************************************************************** +// +// systick.h - Prototypes for the SysTick driver. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __SYSTICK_H__ +#define __SYSTICK_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void SysTickEnable(void); +extern void SysTickDisable(void); +extern void SysTickIntRegister(void (*pfnHandler)(void)); +extern void SysTickIntUnregister(void); +extern void SysTickIntEnable(void); +extern void SysTickIntDisable(void); +extern void SysTickPeriodSet(unsigned long ulPeriod); +extern unsigned long SysTickPeriodGet(void); +extern unsigned long SysTickValueGet(void); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __SYSTICK_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.c new file mode 100644 index 00000000..9fd98c8a --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.c @@ -0,0 +1,1161 @@ +//***************************************************************************** +// +// timer.c - Driver for the timer module. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup timer_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_timer.h" +#include "inc/hw_types.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/timer.h" + +//***************************************************************************** +// +//! \internal +//! Checks a timer base address. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function determines if a timer module base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +TimerBaseValid(unsigned long ulBase) +{ + return((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) || + (ulBase == TIMER2_BASE) || (ulBase == TIMER3_BASE)); +} +#endif + +//***************************************************************************** +// +//! Enables the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to enable; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! +//! This will enable operation of the timer module. The timer must be +//! configured before it is enabled. +//! +//! \return None. +// +//***************************************************************************** +void +TimerEnable(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Enable the timer(s) module. + // + HWREG(ulBase + TIMER_O_CTL) |= ulTimer & (TIMER_CTL_TAEN | TIMER_CTL_TBEN); +} + +//***************************************************************************** +// +//! Disables the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to disable; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! +//! This will disable operation of the timer module. +//! +//! \return None. +// +//***************************************************************************** +void +TimerDisable(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Disable the timer module. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(ulTimer & + (TIMER_CTL_TAEN | TIMER_CTL_TBEN)); +} + +//***************************************************************************** +// +//! Configures the timer(s). +//! +//! \param ulBase is the base address of the timer module. +//! \param ulConfig is the configuration for the timer. +//! +//! This function configures the operating mode of the timer(s). The timer +//! module is disabled before being configured, and is left in the disabled +//! state. The configuration is specified in \e ulConfig as one of the +//! following values: +//! +//! - \b TIMER_CFG_32_BIT_OS - 32-bit one-shot timer +//! - \b TIMER_CFG_32_BIT_OS_UP - 32-bit one-shot timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_32_BIT_PER - 32-bit periodic timer +//! - \b TIMER_CFG_32_BIT_PER_UP - 32-bit periodic timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_32_RTC - 32-bit real time clock timer +//! - \b TIMER_CFG_16_BIT_PAIR - Two 16-bit timers +//! +//! When configured for a pair of 16-bit timers, each timer is separately +//! configured. The first timer is configured by setting \e ulConfig to +//! the result of a logical OR operation between one of the following values +//! and \e ulConfig: +//! +//! - \b TIMER_CFG_A_ONE_SHOT - 16-bit one-shot timer +//! - \b TIMER_CFG_A_ONE_SHOT_UP - 16-bit one-shot timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_A_PERIODIC - 16-bit periodic timer +//! - \b TIMER_CFG_A_PERIODIC_UP - 16-bit periodic timer that counts up instead +//! of down (not available on all parts) +//! - \b TIMER_CFG_A_CAP_COUNT - 16-bit edge count capture +//! - \b TIMER_CFG_A_CAP_TIME - 16-bit edge time capture +//! - \b TIMER_CFG_A_PWM - 16-bit PWM output +//! +//! Similarly, the second timer is configured by setting \e ulConfig to +//! the result of a logical OR operation between one of the corresponding +//! \b TIMER_CFG_B_* values and \e ulConfig. +//! +//! \return None. +// +//***************************************************************************** +void +TimerConfigure(unsigned long ulBase, unsigned long ulConfig) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulConfig == TIMER_CFG_32_BIT_OS) || + (ulConfig == TIMER_CFG_32_BIT_OS_UP) || + (ulConfig == TIMER_CFG_32_BIT_PER) || + (ulConfig == TIMER_CFG_32_BIT_PER_UP) || + (ulConfig == TIMER_CFG_32_RTC) || + ((ulConfig & 0xff000000) == TIMER_CFG_16_BIT_PAIR)); + ASSERT(((ulConfig & 0xff000000) != TIMER_CFG_16_BIT_PAIR) || + ((((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT_UP) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC_UP) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_COUNT) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_TIME) || + ((ulConfig & 0x000000ff) == TIMER_CFG_A_PWM)) && + (((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT_UP) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PERIODIC) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PERIODIC_UP) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_CAP_COUNT) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_CAP_TIME) || + ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PWM)))); + + // + // Disable the timers. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(TIMER_CTL_TAEN | TIMER_CTL_TBEN); + + // + // Set the global timer configuration. + // + HWREG(ulBase + TIMER_O_CFG) = ulConfig >> 24; + + // + // Set the configuration of the A and B timers. Note that the B timer + // configuration is ignored by the hardware in 32-bit modes. + // + HWREG(ulBase + TIMER_O_TAMR) = ulConfig & 255; + HWREG(ulBase + TIMER_O_TBMR) = (ulConfig >> 8) & 255; +} + +//***************************************************************************** +// +//! Controls the output level. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param bInvert specifies the output level. +//! +//! This function sets the PWM output level for the specified timer. If the +//! \e bInvert parameter is \b true, then the timer's output will be made +//! active low; otherwise, it will be made active high. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlLevel(unsigned long ulBase, unsigned long ulTimer, + tBoolean bInvert) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the output levels as requested. + // + ulTimer &= TIMER_CTL_TAPWML | TIMER_CTL_TBPWML; + HWREG(ulBase + TIMER_O_CTL) = (bInvert ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Enables or disables the trigger output. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param bEnable specifies the desired trigger state. +//! +//! This function controls the trigger output for the specified timer. If the +//! \e bEnable parameter is \b true, then the timer's output trigger is +//! enabled; otherwise it is disabled. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bEnable) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the trigger output as requested. + // + ulTimer &= TIMER_CTL_TAOTE | TIMER_CTL_TBOTE; + HWREG(ulBase + TIMER_O_CTL) = (bEnable ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Controls the event type. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param ulEvent specifies the type of event; must be one of +//! \b TIMER_EVENT_POS_EDGE, \b TIMER_EVENT_NEG_EDGE, or +//! \b TIMER_EVENT_BOTH_EDGES. +//! +//! This function sets the signal edge(s) that will trigger the timer when in +//! capture mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlEvent(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulEvent) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the event type. + // + ulEvent &= ulTimer & (TIMER_CTL_TAEVENT_M | TIMER_CTL_TBEVENT_M); + HWREG(ulBase + TIMER_O_CTL) = ((HWREG(ulBase + TIMER_O_CTL) & + ~(TIMER_CTL_TAEVENT_M | + TIMER_CTL_TBEVENT_M)) | ulEvent); +} + +//***************************************************************************** +// +//! Controls the stall handling. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param bStall specifies the response to a stall signal. +//! +//! This function controls the stall response for the specified timer. If the +//! \e bStall parameter is \b true, then the timer will stop counting if the +//! processor enters debug mode; otherwise the timer will keep running while in +//! debug mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlStall(unsigned long ulBase, unsigned long ulTimer, + tBoolean bStall) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the stall mode. + // + ulTimer &= TIMER_CTL_TASTALL | TIMER_CTL_TBSTALL; + HWREG(ulBase + TIMER_O_CTL) = (bStall ? + (HWREG(ulBase + TIMER_O_CTL) | ulTimer) : + (HWREG(ulBase + TIMER_O_CTL) & ~(ulTimer))); +} + +//***************************************************************************** +// +//! Controls the wait on trigger handling. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to be adjusted; must be one of +//! \b TIMER_A, \b TIMER_B, or \b TIMER_BOTH. +//! \param bWait specifies if the timer should wait for a trigger input. +//! +//! This function controls whether or not a timer waits for a trigger input to +//! start counting. When enabled, the previous timer in the trigger chain must +//! count to its timeout in order for this timer to start counting. Refer to +//! the part's data sheet for a description of the trigger chain. +//! +//! \note This functionality is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +TimerControlWaitOnTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bWait) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the wait on trigger mode for timer A. + // + if((ulTimer & TIMER_A) != 0) + { + if(bWait) + { + HWREG(ulBase + TIMER_O_TAMR) |= TIMER_TAMR_TAWOT; + } + else + { + HWREG(ulBase + TIMER_O_TAMR) &= ~(TIMER_TAMR_TAWOT); + } + } + + // + // Set the wait on trigger mode for timer A. + // + if((ulTimer & TIMER_B) != 0) + { + if(bWait) + { + HWREG(ulBase + TIMER_O_TBMR) |= TIMER_TBMR_TBWOT; + } + else + { + HWREG(ulBase + TIMER_O_TBMR) &= ~(TIMER_TBMR_TBWOT); + } + } +} + +//***************************************************************************** +// +//! Enable RTC counting. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function causes the timer to start counting when in RTC mode. If not +//! configured for RTC mode, this will do nothing. +//! +//! \return None. +// +//***************************************************************************** +void +TimerRTCEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Enable RTC counting. + // + HWREG(ulBase + TIMER_O_CTL) |= TIMER_CTL_RTCEN; +} + +//***************************************************************************** +// +//! Disable RTC counting. +//! +//! \param ulBase is the base address of the timer module. +//! +//! This function causes the timer to stop counting when in RTC mode. +//! +//! \return None. +// +//***************************************************************************** +void +TimerRTCDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable RTC counting. + // + HWREG(ulBase + TIMER_O_CTL) &= ~(TIMER_CTL_RTCEN); +} + +//***************************************************************************** +// +//! Set the timer prescale value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param ulValue is the timer prescale value; must be between 0 and 255, +//! inclusive. +//! +//! This function sets the value of the input clock prescaler. The prescaler +//! is only operational when in 16-bit mode and is used to extend the range of +//! the 16-bit timer modes. +//! +//! \return None. +// +//***************************************************************************** +void +TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + ASSERT(ulValue < 256); + + // + // Set the timer A prescaler if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAPR) = ulValue; + } + + // + // Set the timer B prescaler if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBPR) = ulValue; + } +} + +//***************************************************************************** +// +//! Get the timer prescale value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. +//! +//! This function gets the value of the input clock prescaler. The prescaler +//! is only operational when in 16-bit mode and is used to extend the range of +//! the 16-bit timer modes. +//! +//! \return The value of the timer prescaler. +// +//***************************************************************************** +unsigned long +TimerPrescaleGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Return the appropriate prescale value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAPR) : + HWREG(ulBase + TIMER_O_TBPR)); +} + +//***************************************************************************** +// +//! Set the timer prescale match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param ulValue is the timer prescale match value; must be between 0 and +//! 255, inclusive. +//! +//! This function sets the value of the input clock prescaler match value. +//! When in a 16-bit mode that uses the counter match and the prescaler, the +//! prescale match effectively extends the range of the counter to 24-bits. +//! +//! \note This functionality is not available on all parts. +//! +//! \return None. +// +//***************************************************************************** +void +TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + ASSERT(ulValue < 256); + + // + // Set the timer A prescale match if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAPMR) = ulValue; + } + + // + // Set the timer B prescale match if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBPMR) = ulValue; + } +} + +//***************************************************************************** +// +//! Get the timer prescale match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. +//! +//! This function gets the value of the input clock prescaler match value. +//! When in a 16-bit mode that uses the counter match and prescaler, the +//! prescale match effectively extends the range of the counter to 24-bits. +//! +//! \note This functionality is not available on all parts. +//! +//! \return The value of the timer prescale match. +// +//***************************************************************************** +unsigned long +TimerPrescaleMatchGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Return the appropriate prescale match value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAPMR) : + HWREG(ulBase + TIMER_O_TBPMR)); +} + +//***************************************************************************** +// +//! Sets the timer load value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. Only \b TIMER_A should be used when the +//! timer is configured for 32-bit operation. +//! \param ulValue is the load value. +//! +//! This function sets the timer load value; if the timer is running then the +//! value will be immediately loaded into the timer. +//! +//! \return None. +// +//***************************************************************************** +void +TimerLoadSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the timer A load value if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAILR) = ulValue; + } + + // + // Set the timer B load value if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBILR) = ulValue; + } +} + +//***************************************************************************** +// +//! Gets the timer load value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function gets the currently programmed interval load value for the +//! specified timer. +//! +//! \return Returns the load value for the timer. +// +//***************************************************************************** +unsigned long +TimerLoadGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate load value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAILR) : + HWREG(ulBase + TIMER_O_TBILR)); +} + +//***************************************************************************** +// +//! Gets the current timer value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function reads the current value of the specified timer. +//! +//! \return Returns the current value of the timer. +// +//***************************************************************************** +unsigned long +TimerValueGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate timer value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAR) : + HWREG(ulBase + TIMER_O_TBR)); +} + +//***************************************************************************** +// +//! Sets the timer match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. Only \b TIMER_A should be used when the +//! timer is configured for 32-bit operation. +//! \param ulValue is the match value. +//! +//! This function sets the match value for a timer. This is used in capture +//! count mode to determine when to interrupt the processor and in PWM mode to +//! determine the duty cycle of the output signal. +//! +//! \return None. +// +//***************************************************************************** +void +TimerMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Set the timer A match value if requested. + // + if(ulTimer & TIMER_A) + { + HWREG(ulBase + TIMER_O_TAMATCHR) = ulValue; + } + + // + // Set the timer B match value if requested. + // + if(ulTimer & TIMER_B) + { + HWREG(ulBase + TIMER_O_TBMATCHR) = ulValue; + } +} + +//***************************************************************************** +// +//! Gets the timer match value. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer; must be one of \b TIMER_A or +//! \b TIMER_B. Only \b TIMER_A should be used when the timer is configured +//! for 32-bit operation. +//! +//! This function gets the match value for the specified timer. +//! +//! \return Returns the match value for the timer. +// +//***************************************************************************** +unsigned long +TimerMatchGet(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B)); + + // + // Return the appropriate match value. + // + return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAMATCHR) : + HWREG(ulBase + TIMER_O_TBMATCHR)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the timer interrupt. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! \param pfnHandler is a pointer to the function to be called when the timer +//! interrupt occurs. +//! +//! This sets the handler to be called when a timer interrupt occurs. This +//! will enable the global interrupt in the interrupt controller; specific +//! timer interrupts must be enabled via TimerIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source via TimerIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, + void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Get the interrupt number for this timer module. + // + ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A : + ((ulBase == TIMER1_BASE) ? INT_TIMER1A : + ((ulBase == TIMER2_BASE) ? INT_TIMER2A : INT_TIMER3A))); + + // + // Register an interrupt handler for timer A if requested. + // + if(ulTimer & TIMER_A) + { + // + // Register the interrupt handler. + // + IntRegister(ulBase, pfnHandler); + + // + // Enable the interrupt. + // + IntEnable(ulBase); + } + + // + // Register an interrupt handler for timer B if requested. + // + if(ulTimer & TIMER_B) + { + // + // Register the interrupt handler. + // + IntRegister(ulBase + 1, pfnHandler); + + // + // Enable the interrupt. + // + IntEnable(ulBase + 1); + } +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the timer interrupt. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A, +//! \b TIMER_B, or \b TIMER_BOTH. +//! +//! This function will clear the handler to be called when a timer interrupt +//! occurs. This will also mask off the interrupt in the interrupt controller +//! so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) || + (ulTimer == TIMER_BOTH)); + + // + // Get the interrupt number for this timer module. + // + ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A : + ((ulBase == TIMER1_BASE) ? INT_TIMER1A : + ((ulBase == TIMER2_BASE) ? INT_TIMER2A : INT_TIMER3A))); + + // + // Unregister the interrupt handler for timer A if requested. + // + if(ulTimer & TIMER_A) + { + // + // Disable the interrupt. + // + IntDisable(ulBase); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulBase); + } + + // + // Unregister the interrupt handler for timer B if requested. + // + if(ulTimer & TIMER_B) + { + // + // Disable the interrupt. + // + IntDisable(ulBase + 1); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulBase + 1); + } +} + +//***************************************************************************** +// +//! Enables individual timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated timer interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter must be the logical OR of any combination of +//! the following: +//! +//! - \b TIMER_CAPB_EVENT - Capture B event interrupt +//! - \b TIMER_CAPB_MATCH - Capture B match interrupt +//! - \b TIMER_TIMB_TIMEOUT - Timer B timeout interrupt +//! - \b TIMER_RTC_MATCH - RTC interrupt mask +//! - \b TIMER_CAPA_EVENT - Capture A event interrupt +//! - \b TIMER_CAPA_MATCH - Capture A match interrupt +//! - \b TIMER_TIMA_TIMEOUT - Timer A timeout interrupt +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + TIMER_O_IMR) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated timer interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to TimerIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + TIMER_O_IMR) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the timer module. +//! \param bMasked is false if the raw interrupt status is required and true if +//! the masked interrupt status is required. +//! +//! This returns the interrupt status for the timer module. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return The current interrupt status, enumerated as a bit field of +//! values described in TimerIntEnable(). +// +//***************************************************************************** +unsigned long +TimerIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + return(bMasked ? HWREG(ulBase + TIMER_O_MIS) : + HWREG(ulBase + TIMER_O_RIS)); +} + +//***************************************************************************** +// +//! Clears timer interrupt sources. +//! +//! \param ulBase is the base address of the timer module. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified timer interrupt sources are cleared, so that they no longer +//! assert. This must be done in the interrupt handler to keep it from being +//! called again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to TimerIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + TIMER_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +// Puts the timer into its reset state. +// +// \param ulBase is the base address of the timer module. +// +// The specified timer is disabled, and all its interrupts are disabled, +// cleared, and unregistered. Then the timer registers are set to their reset +// value. +// +// \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +TimerQuiesce(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(TimerBaseValid(ulBase)); + + // + // Disable the timer. + // + HWREG(ulBase + TIMER_O_CTL) = TIMER_RV_CTL; + + // + // Disable all the timer interrupts. + // + HWREG(ulBase + TIMER_O_IMR) = TIMER_RV_IMR; + + // + // Clear all the timer interrupts. + // + HWREG(ulBase + TIMER_O_ICR) = 0xFFFFFFFF; + + // + // Unregister the interrupt handler. This also disables interrupts to the + // core. + // + TimerIntUnregister(ulBase, TIMER_BOTH); + + // + // Set all the registers to their reset value. + // + HWREG(ulBase + TIMER_O_CFG) = TIMER_RV_CFG; + HWREG(ulBase + TIMER_O_TAMR) = TIMER_RV_TAMR; + HWREG(ulBase + TIMER_O_TBMR) = TIMER_RV_TBMR; + HWREG(ulBase + TIMER_O_RIS) = TIMER_RV_RIS; + HWREG(ulBase + TIMER_O_MIS) = TIMER_RV_MIS; + HWREG(ulBase + TIMER_O_TAILR) = TIMER_RV_TAILR; + HWREG(ulBase + TIMER_O_TBILR) = TIMER_RV_TBILR; + HWREG(ulBase + TIMER_O_TAMATCHR) = TIMER_RV_TAMATCHR; + HWREG(ulBase + TIMER_O_TBMATCHR) = TIMER_RV_TBMATCHR; + HWREG(ulBase + TIMER_O_TAPR) = TIMER_RV_TAPR; + HWREG(ulBase + TIMER_O_TBPR) = TIMER_RV_TBPR; + HWREG(ulBase + TIMER_O_TAPMR) = TIMER_RV_TAPMR; + HWREG(ulBase + TIMER_O_TBPMR) = TIMER_RV_TBPMR; + HWREG(ulBase + TIMER_O_TAR) = TIMER_RV_TAR; + HWREG(ulBase + TIMER_O_TBR) = TIMER_RV_TBR; +} +#endif // DEPRECATED + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.h new file mode 100644 index 00000000..e59b1e9e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/timer.h @@ -0,0 +1,165 @@ +//***************************************************************************** +// +// timer.h - Prototypes for the timer module +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __TIMER_H__ +#define __TIMER_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to TimerConfigure as the ulConfig parameter. +// +//***************************************************************************** +#define TIMER_CFG_32_BIT_OS 0x00000001 // 32-bit one-shot timer +#define TIMER_CFG_32_BIT_OS_UP 0x00000011 // 32-bit one-shot up-count timer +#define TIMER_CFG_32_BIT_PER 0x00000002 // 32-bit periodic timer +#define TIMER_CFG_32_BIT_PER_UP 0x00000012 // 32-bit periodic up-count timer +#define TIMER_CFG_32_RTC 0x01000000 // 32-bit RTC timer +#define TIMER_CFG_16_BIT_PAIR 0x04000000 // Two 16-bit timers +#define TIMER_CFG_A_ONE_SHOT 0x00000001 // Timer A one-shot timer +#define TIMER_CFG_A_ONE_SHOT_UP 0x00000011 // Timer A one-shot up-count timer +#define TIMER_CFG_A_PERIODIC 0x00000002 // Timer A periodic timer +#define TIMER_CFG_A_PERIODIC_UP 0x00000012 // Timer A periodic up-count timer +#define TIMER_CFG_A_CAP_COUNT 0x00000003 // Timer A event counter +#define TIMER_CFG_A_CAP_TIME 0x00000007 // Timer A event timer +#define TIMER_CFG_A_PWM 0x0000000A // Timer A PWM output +#define TIMER_CFG_B_ONE_SHOT 0x00000100 // Timer B one-shot timer +#define TIMER_CFG_B_ONE_SHOT_UP 0x00001100 // Timer B one-shot up-count timer +#define TIMER_CFG_B_PERIODIC 0x00000200 // Timer B periodic timer +#define TIMER_CFG_B_PERIODIC_UP 0x00001200 // Timer B periodic up-count timer +#define TIMER_CFG_B_CAP_COUNT 0x00000300 // Timer B event counter +#define TIMER_CFG_B_CAP_TIME 0x00000700 // Timer B event timer +#define TIMER_CFG_B_PWM 0x00000A00 // Timer B PWM output + +//***************************************************************************** +// +// Values that can be passed to TimerIntEnable, TimerIntDisable, and +// TimerIntClear as the ulIntFlags parameter, and returned from TimerIntStatus. +// +//***************************************************************************** +#define TIMER_TIMB_MATCH 0x00000800 // TimerB match interrupt +#define TIMER_CAPB_EVENT 0x00000400 // CaptureB event interrupt +#define TIMER_CAPB_MATCH 0x00000200 // CaptureB match interrupt +#define TIMER_TIMB_TIMEOUT 0x00000100 // TimerB time out interrupt +#define TIMER_TIMA_MATCH 0x00000010 // TimerA match interrupt +#define TIMER_RTC_MATCH 0x00000008 // RTC interrupt mask +#define TIMER_CAPA_EVENT 0x00000004 // CaptureA event interrupt +#define TIMER_CAPA_MATCH 0x00000002 // CaptureA match interrupt +#define TIMER_TIMA_TIMEOUT 0x00000001 // TimerA time out interrupt + +//***************************************************************************** +// +// Values that can be passed to TimerControlEvent as the ulEvent parameter. +// +//***************************************************************************** +#define TIMER_EVENT_POS_EDGE 0x00000000 // Count positive edges +#define TIMER_EVENT_NEG_EDGE 0x00000404 // Count negative edges +#define TIMER_EVENT_BOTH_EDGES 0x00000C0C // Count both edges + +//***************************************************************************** +// +// Values that can be passed to most of the timer APIs as the ulTimer +// parameter. +// +//***************************************************************************** +#define TIMER_A 0x000000ff // Timer A +#define TIMER_B 0x0000ff00 // Timer B +#define TIMER_BOTH 0x0000ffff // Timer Both + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern void TimerEnable(unsigned long ulBase, unsigned long ulTimer); +extern void TimerDisable(unsigned long ulBase, unsigned long ulTimer); +extern void TimerConfigure(unsigned long ulBase, unsigned long ulConfig); +extern void TimerControlLevel(unsigned long ulBase, unsigned long ulTimer, + tBoolean bInvert); +extern void TimerControlTrigger(unsigned long ulBase, unsigned long ulTimer, + tBoolean bEnable); +extern void TimerControlEvent(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulEvent); +extern void TimerControlStall(unsigned long ulBase, unsigned long ulTimer, + tBoolean bStall); +extern void TimerControlWaitOnTrigger(unsigned long ulBase, + unsigned long ulTimer, + tBoolean bWait); +extern void TimerRTCEnable(unsigned long ulBase); +extern void TimerRTCDisable(unsigned long ulBase); +extern void TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerPrescaleGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerPrescaleMatchGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerLoadSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerLoadGet(unsigned long ulBase, unsigned long ulTimer); +extern unsigned long TimerValueGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerMatchSet(unsigned long ulBase, unsigned long ulTimer, + unsigned long ulValue); +extern unsigned long TimerMatchGet(unsigned long ulBase, + unsigned long ulTimer); +extern void TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, + void (*pfnHandler)(void)); +extern void TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer); +extern void TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long TimerIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags); + +//***************************************************************************** +// +// TimerQuiesce() has been deprecated. SysCtlPeripheralReset() should be used +// instead to return the timer to its reset state. +// +//***************************************************************************** +#ifndef DEPRECATED +extern void TimerQuiesce(unsigned long ulBase); +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __TIMER_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.c new file mode 100644 index 00000000..51f8ab81 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.c @@ -0,0 +1,1611 @@ +//***************************************************************************** +// +// uart.c - Driver for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup uart_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_sysctl.h" +#include "inc/hw_types.h" +#include "inc/hw_uart.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/uart.h" + +//***************************************************************************** +// +// The system clock divider defining the maximum baud rate supported by the +// UART. +// +//***************************************************************************** +#define UART_CLK_DIVIDER ((CLASS_IS_SANDSTORM || \ + (CLASS_IS_FURY && REVISION_IS_A2) || \ + (CLASS_IS_DUSTDEVIL && REVISION_IS_A0)) ? \ + 16 : 8) + +//***************************************************************************** +// +//! \internal +//! Checks a UART base address. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function determines if a UART port base address is valid. +//! +//! \return Returns \b true if the base address is valid and \b false +//! otherwise. +// +//***************************************************************************** +#ifdef DEBUG +static tBoolean +UARTBaseValid(unsigned long ulBase) +{ + return((ulBase == UART0_BASE) || (ulBase == UART1_BASE) || + (ulBase == UART2_BASE)); +} +#endif + +//***************************************************************************** +// +//! Sets the type of parity. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulParity specifies the type of parity to use. +//! +//! Sets the type of parity to use for transmitting and expect when receiving. +//! The \e ulParity parameter must be one of \b UART_CONFIG_PAR_NONE, +//! \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, +//! or \b UART_CONFIG_PAR_ZERO. The last two allow direct control of the +//! parity bit; it is always either one or zero based on the mode. +//! +//! \return None. +// +//***************************************************************************** +void +UARTParityModeSet(unsigned long ulBase, unsigned long ulParity) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulParity == UART_CONFIG_PAR_NONE) || + (ulParity == UART_CONFIG_PAR_EVEN) || + (ulParity == UART_CONFIG_PAR_ODD) || + (ulParity == UART_CONFIG_PAR_ONE) || + (ulParity == UART_CONFIG_PAR_ZERO)); + + // + // Set the parity mode. + // + HWREG(ulBase + UART_O_LCRH) = ((HWREG(ulBase + UART_O_LCRH) & + ~(UART_LCRH_SPS | UART_LCRH_EPS | + UART_LCRH_PEN)) | ulParity); +} + +//***************************************************************************** +// +//! Gets the type of parity currently being used. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function gets the type of parity used for transmitting data and +//! expected when receiving data. +//! +//! \return Returns the current parity settings, specified as one of +//! \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, \b UART_CONFIG_PAR_ODD, +//! \b UART_CONFIG_PAR_ONE, or \b UART_CONFIG_PAR_ZERO. +// +//***************************************************************************** +unsigned long +UARTParityModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current parity setting. + // + return(HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Sets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulTxLevel is the transmit FIFO interrupt level, specified as one of +//! \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, \b UART_FIFO_TX4_8, +//! \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param ulRxLevel is the receive FIFO interrupt level, specified as one of +//! \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, \b UART_FIFO_RX4_8, +//! \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function sets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulTxLevel == UART_FIFO_TX1_8) || + (ulTxLevel == UART_FIFO_TX2_8) || + (ulTxLevel == UART_FIFO_TX4_8) || + (ulTxLevel == UART_FIFO_TX6_8) || + (ulTxLevel == UART_FIFO_TX7_8)); + ASSERT((ulRxLevel == UART_FIFO_RX1_8) || + (ulRxLevel == UART_FIFO_RX2_8) || + (ulRxLevel == UART_FIFO_RX4_8) || + (ulRxLevel == UART_FIFO_RX6_8) || + (ulRxLevel == UART_FIFO_RX7_8)); + + // + // Set the FIFO interrupt levels. + // + HWREG(ulBase + UART_O_IFLS) = ulTxLevel | ulRxLevel; +} + +//***************************************************************************** +// +//! Gets the FIFO level at which interrupts are generated. +//! +//! \param ulBase is the base address of the UART port. +//! \param pulTxLevel is a pointer to storage for the transmit FIFO level, +//! returned as one of \b UART_FIFO_TX1_8, \b UART_FIFO_TX2_8, +//! \b UART_FIFO_TX4_8, \b UART_FIFO_TX6_8, or \b UART_FIFO_TX7_8. +//! \param pulRxLevel is a pointer to storage for the receive FIFO level, +//! returned as one of \b UART_FIFO_RX1_8, \b UART_FIFO_RX2_8, +//! \b UART_FIFO_RX4_8, \b UART_FIFO_RX6_8, or \b UART_FIFO_RX7_8. +//! +//! This function gets the FIFO level at which transmit and receive interrupts +//! are generated. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Read the FIFO level register. + // + ulTemp = HWREG(ulBase + UART_O_IFLS); + + // + // Extract the transmit and receive FIFO levels. + // + *pulTxLevel = ulTemp & UART_IFLS_TX_M; + *pulRxLevel = ulTemp & UART_IFLS_RX_M; +} + +//***************************************************************************** +// +//! Sets the configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param ulBaud is the desired baud rate. +//! \param ulConfig is the data format for the port (number of data bits, +//! number of stop bits, and parity). +//! +//! This function configures the UART for operation in the specified data +//! format. The baud rate is provided in the \e ulBaud parameter and the data +//! format in the \e ulConfig parameter. +//! +//! The \e ulConfig parameter is the logical OR of three values: the number of +//! data bits, the number of stop bits, and the parity. \b UART_CONFIG_WLEN_8, +//! \b UART_CONFIG_WLEN_7, \b UART_CONFIG_WLEN_6, and \b UART_CONFIG_WLEN_5 +//! select from eight to five data bits per byte (respectively). +//! \b UART_CONFIG_STOP_ONE and \b UART_CONFIG_STOP_TWO select one or two stop +//! bits (respectively). \b UART_CONFIG_PAR_NONE, \b UART_CONFIG_PAR_EVEN, +//! \b UART_CONFIG_PAR_ODD, \b UART_CONFIG_PAR_ONE, and \b UART_CONFIG_PAR_ZERO +//! select the parity mode (no parity bit, even parity bit, odd parity bit, +//! parity bit always one, and parity bit always zero, respectively). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigSet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig) +{ + unsigned long ulDiv; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT(ulBaud != 0); + ASSERT(ulUARTClk >= (ulBaud * UART_CLK_DIVIDER)); + + // + // Stop the UART. + // + UARTDisable(ulBase); + + // + // Is the required baud rate greater than the maximum rate supported + // without the use of high speed mode? + // + if((ulBaud * 16) > ulUARTClk) + { + // + // Enable high speed mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_HSE; + + // + // Half the supplied baud rate to compensate for enabling high speed + // mode. This allows the following code to be common to both cases. + // + ulBaud /= 2; + } + else + { + // + // Disable high speed mode. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_HSE); + } + + // + // Compute the fractional baud rate divider. + // + ulDiv = (((ulUARTClk * 8) / ulBaud) + 1) / 2; + + // + // Set the baud rate. + // + HWREG(ulBase + UART_O_IBRD) = ulDiv / 64; + HWREG(ulBase + UART_O_FBRD) = ulDiv % 64; + + // + // Set parity, data length, and number of stop bits. + // + HWREG(ulBase + UART_O_LCRH) = ulConfig; + + // + // Clear the flags register. + // + HWREG(ulBase + UART_O_FR) = 0; + + // + // Start the UART. + // + UARTEnable(ulBase); +} + +//***************************************************************************** +// +//! Gets the current configuration of a UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulUARTClk is the rate of the clock supplied to the UART module. +//! \param pulBaud is a pointer to storage for the baud rate. +//! \param pulConfig is a pointer to storage for the data format. +//! +//! The baud rate and data format for the UART is determined, given an +//! explicitly provided peripheral clock (hence the ExpClk suffix). The +//! returned baud rate is the actual baud rate; it may not be the exact baud +//! rate requested or an ``official'' baud rate. The data format returned in +//! \e pulConfig is enumerated the same as the \e ulConfig parameter of +//! UARTConfigSetExpClk(). +//! +//! The peripheral clock will be the same as the processor clock. This will be +//! the value returned by SysCtlClockGet(), or it can be explicitly hard coded +//! if it is constant and known (to save the code/execution overhead of a call +//! to SysCtlClockGet()). +//! +//! This function replaces the original UARTConfigGet() API and performs the +//! same actions. A macro is provided in uart.h to map the original +//! API to this API. +//! +//! \return None. +// +//***************************************************************************** +void +UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, unsigned long *pulConfig) +{ + unsigned long ulInt, ulFrac; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Compute the baud rate. + // + ulInt = HWREG(ulBase + UART_O_IBRD); + ulFrac = HWREG(ulBase + UART_O_FBRD); + *pulBaud = (ulUARTClk * 4) / ((64 * ulInt) + ulFrac); + + // + // See if high speed mode enabled. + // + if(HWREG(ulBase + UART_O_CTL) & UART_CTL_HSE) + { + // + // High speed mode is enabled so the actual baud rate is actually + // double what was just calculated. + // + *pulBaud *= 2; + } + + // + // Get the parity, data length, and number of stop bits. + // + *pulConfig = (HWREG(ulBase + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_WLEN_M | UART_LCRH_STP2 | + UART_LCRH_EPS | UART_LCRH_PEN)); +} + +//***************************************************************************** +// +//! Enables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Sets the UARTEN, TXE, and RXE bits, and enables the transmit and receive +//! FIFOs. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; + + // + // Enable RX, TX, and the UART. + // + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Disables transmitting and receiving. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the UARTEN, TXE, and RXE bits, then waits for the end of +//! transmission of the current character, and flushes the transmit FIFO. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait for end of TX. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) + { + } + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); + + // + // Disable the UART. + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_UARTEN | UART_CTL_TXE | + UART_CTL_RXE); +} + +//***************************************************************************** +// +//! Enables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions enables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFOEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) |= UART_LCRH_FEN; +} + +//***************************************************************************** +// +//! Disables the transmit and receive FIFOs. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This functions disables the transmit and receive FIFOs in the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFIFODisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the FIFO. + // + HWREG(ulBase + UART_O_LCRH) &= ~(UART_LCRH_FEN); +} + +//***************************************************************************** +// +//! Enables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! \param bLowPower indicates if SIR Low Power Mode is to be used. +//! +//! Enables the SIREN control bit for IrDA mode on the UART. If the +//! \e bLowPower flag is set, then SIRLP bit will also be set. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable SIR and SIRLP (if appropriate). + // + if(bLowPower) + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN | UART_CTL_SIRLP); + } + else + { + HWREG(ulBase + UART_O_CTL) |= (UART_CTL_SIREN); + } +} + +//***************************************************************************** +// +//! Disables SIR (IrDA) mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SIREN (IrDA) and SIRLP (Low Power) bits. +//! +//! \note SIR (IrDA) operation is not supported on Sandstorm-class devices. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDisableSIR(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable SIR and SIRLP (if appropriate). + // + HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_SIREN | UART_CTL_SIRLP); +} + +//***************************************************************************** +// +//! Enables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Enables the SMART control bit for ISO 7816 smart card mode on the UART. +//! This call also sets 8 bit word length and even parity as required by ISO +//! 7816. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardEnable(unsigned long ulBase) +{ + unsigned long ulVal; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Set 8 bit word length, even parity, 2 stop bits (even though the STP2 + // bit is ignored when in smartcard mode, this lets the caller read back + // the actual setting in use). + // + ulVal = HWREG(ulBase + UART_O_LCRH); + ulVal &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN | + UART_LCRH_WLEN_M); + ulVal |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | UART_LCRH_STP2; + HWREG(ulBase + UART_O_LCRH) = ulVal; + + // + // Enable SMART mode. + // + HWREG(ulBase + UART_O_CTL) |= UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Disables ISO 7816 smart card mode on the specified UART. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Clears the SMART (ISO 7816 smart card) bits in the UART control register. +//! +//! \note The availability of ISO 7816 smart card mode varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTSmartCardDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the SMART bit. + // + HWREG(ulBase + UART_O_CTL) &= ~UART_CTL_SMART; +} + +//***************************************************************************** +// +//! Sets the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Sets the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlSet(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp |= (ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Clears the states of the DTR and/or RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulControl is a bit-mapped flag indicating which modem control bits +//! should be set. +//! +//! Clears the states of the DTR or RTS modem handshake outputs from the UART. +//! +//! The \e ulControl parameter is the logical OR of any of the following: +//! +//! - \b UART_OUTPUT_DTR - The Modem Control DTR signal +//! - \b UART_OUTPUT_RTS - The Modem Control RTS signal +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTModemControlClear(unsigned long ulBase, unsigned long ulControl) +{ + unsigned long ulTemp; + + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + ASSERT((ulControl & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); + + // + // Set the appropriate modem control output bits. + // + ulTemp = HWREG(ulBase + UART_O_CTL); + ulTemp &= ~(ulControl & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); + HWREG(ulBase + UART_O_CTL) = ulTemp; +} + +//***************************************************************************** +// +//! Gets the states of the DTR and RTS modem control signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the two UART modem control signals, +//! DTR and RTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_OUTPUT_RTS and +//! \b UART_OUTPUT_DTR where the presence of each flag indicates that the +//! associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_CTL) & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); +} + +//***************************************************************************** +// +//! Gets the states of the RI, DCD, DSR and CTS modem status signals. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current states of each of the four UART modem status signals, +//! RI, DCD, DSR and CTS. +//! +//! \note The availability of hardware modem handshake signals varies with the +//! Stellaris part and UART in use. Please consult the datasheet for the part +//! you are using to determine whether this support is available. +//! +//! \return Returns the states of the handshake output signals. This will be a +//! logical logical OR combination of values \b UART_INPUT_RI, \b +//! UART_INPUT_DCD, \b UART_INPUT_CTS and \b UART_INPUT_DSR where the +//! presence of each flag indicates that the associated signal is asserted. +// +//***************************************************************************** +unsigned long +UARTModemStatusGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(ulBase == UART1_BASE); + + return(HWREG(ulBase + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD | + UART_INPUT_CTS | UART_INPUT_DSR)); +} + +//***************************************************************************** +// +//! Sets the UART hardware flow control mode to be used. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode indicates the flow control modes to be used. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX and \b +//! UART_FLOWCONTROL_RX to enable hardware transmit (CTS) and receive (RTS) +//! flow control or \b UART_FLOWCONTROL_NONE to disable hardware flow control. +//! +//! Sets the required hardware flow control modes. If \e ulMode contains +//! flag \b UART_FLOWCONTROL_TX, data is only transmitted if the incoming CTS +//! signal is asserted. If \e ulMode contains flag \b UART_FLOWCONTROL_RX, +//! the RTS output is controlled by the hardware and is asserted only when +//! there is space available in the receive FIFO. If no hardware flow control +//! is required, UART_FLOWCONTROL_NONE should be passed. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode & ~(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX)) == 0); + + // + // Set the flow control mode as requested. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the UART hardware flow control mode currently in use. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Returns the current hardware flow control mode. +//! +//! \note The availability of hardware flow control varies with the Stellaris +//! part and UART in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns the current flow control mode in use. This is a +//! logical OR combination of values \b UART_FLOWCONTROL_TX if transmit +//! (CTS) flow control is enabled and \b UART_FLOWCONTROL_RX if receive (RTS) +//! flow control is in use. If hardware flow control is disabled, \b +//! UART_FLOWCONTROL_NONE will be returned. +// +//***************************************************************************** +unsigned long +UARTFlowControlGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL); + ASSERT(UARTBaseValid(ulBase)); + + return(HWREG(ulBase + UART_O_CTL) & (UART_FLOWCONTROL_TX | + UART_FLOWCONTROL_RX)); +} + +//***************************************************************************** +// +//! Sets the operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulMode is the operating mode for the transmit interrupt. It may be +//! \b UART_TXINT_MODE_EOT to trigger interrupts when the transmitter is idle +//! or \b UART_TXINT_MODE_FIFO to trigger based on the current transmit FIFO +//! level. +//! +//! This function allows the mode of the UART transmit interrupt to be set. By +//! default, the transmit interrupt is asserted when the FIFO level falls past +//! a threshold set via a call to UARTFIFOLevelSet(). Alternatively, if this +//! function is called with \e ulMode set to \b UART_TXINT_MODE_EOT, the +//! transmit interrupt will only be asserted once the transmitter is completely +//! idle - the transmit FIFO is empty and all bits, including any stop bits, +//! have cleared the transmitter. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return None. +// +//***************************************************************************** +void +UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + ASSERT((ulMode == UART_TXINT_MODE_EOT) || + (ulMode == UART_TXINT_MODE_FIFO)); + + // + // Set or clear the EOT bit of the UART control register as appropriate. + // + HWREG(ulBase + UART_O_CTL) = ((HWREG(ulBase + UART_O_CTL) & + ~(UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)) | ulMode); +} + +//***************************************************************************** +// +//! Returns the current operating mode for the UART transmit interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current operating mode for the UART transmit +//! interrupt. The return value will be \b UART_TXINT_MODE_EOT if the +//! transmit interrupt is currently set to be asserted once the transmitter is +//! completely idle - the transmit FIFO is empty and all bits, including any +//! stop bits, have cleared the transmitter. The return value will be \b +//! UART_TXINT_MODE_FIFO if the interrupt is set to be asserted based upon the +//! level of the transmit FIFO. +//! +//! \note The availability of end-of-transmission mode varies with the +//! Stellaris part in use. Please consult the datasheet for the part you are +//! using to determine whether this support is available. +//! +//! \return Returns \b UART_TXINT_MODE_FIFO or \b UART_TXINT_MODE_EOT. +// +//***************************************************************************** +unsigned long +UARTTxIntModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current transmit interrupt mode. + // + return(HWREG(ulBase + UART_O_CTL) & (UART_TXINT_MODE_EOT | + UART_TXINT_MODE_FIFO)); +} + +//***************************************************************************** +// +//! Determines if there are any characters in the receive FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is data +//! available in the receive FIFO. +//! +//! \return Returns \b true if there is data in the receive FIFO or \b false +//! if there is no data in the receive FIFO. +// +//***************************************************************************** +tBoolean +UARTCharsAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of characters. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) ? false : true); +} + +//***************************************************************************** +// +//! Determines if there is any space in the transmit FIFO. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns a flag indicating whether or not there is space +//! available in the transmit FIFO. +//! +//! \return Returns \b true if there is space available in the transmit FIFO +//! or \b false if there is no space available in the transmit FIFO. +// +//***************************************************************************** +tBoolean +UARTSpaceAvail(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the availability of space. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) ? false : true); +} + +//***************************************************************************** +// +//! Receives a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. +//! +//! This function replaces the original UARTCharNonBlockingGet() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. A \b -1 is returned if there are no characters present in the +//! receive FIFO. The UARTCharsAvail() function should be called before +//! attempting to call this function. +// +//***************************************************************************** +long +UARTCharGetNonBlocking(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there are any characters in the receive FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)) + { + // + // Read and return the next character. + // + return(HWREG(ulBase + UART_O_DR)); + } + else + { + // + // There are no characters, so return a failure. + // + return(-1); + } +} + +//***************************************************************************** +// +//! Waits for a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Gets a character from the receive FIFO for the specified port. If there +//! are no characters available, this function waits until a character is +//! received before returning. +//! +//! \return Returns the character read from the specified port, cast as a +//! \e long. +// +//***************************************************************************** +long +UARTCharGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until a char is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE) + { + } + + // + // Now get the char. + // + return(HWREG(ulBase + UART_O_DR)); +} + +//***************************************************************************** +// +//! Sends a character to the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Writes the character \e ucData to the transmit FIFO for the specified port. +//! This function does not block, so if there is no space available, then a +//! \b false is returned, and the application must retry the function later. +//! +//! This function replaces the original UARTCharNonBlockingPut() API and +//! performs the same actions. A macro is provided in uart.h to map +//! the original API to this API. +//! +//! \return Returns \b true if the character was successfully placed in the +//! transmit FIFO or \b false if there was no space available in the transmit +//! FIFO. +// +//***************************************************************************** +tBoolean +UARTCharPutNonBlocking(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // See if there is space in the transmit FIFO. + // + if(!(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF)) + { + // + // Write this character to the transmit FIFO. + // + HWREG(ulBase + UART_O_DR) = ucData; + + // + // Success. + // + return(true); + } + else + { + // + // There is no space in the transmit FIFO, so return a failure. + // + return(false); + } +} + +//***************************************************************************** +// +//! Waits to send a character from the specified port. +//! +//! \param ulBase is the base address of the UART port. +//! \param ucData is the character to be transmitted. +//! +//! Sends the character \e ucData to the transmit FIFO for the specified port. +//! If there is no space available in the transmit FIFO, this function waits +//! until there is space available before returning. +//! +//! \return None. +// +//***************************************************************************** +void +UARTCharPut(unsigned long ulBase, unsigned char ucData) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Wait until space is available. + // + while(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF) + { + } + + // + // Send the char. + // + HWREG(ulBase + UART_O_DR) = ucData; +} + +//***************************************************************************** +// +//! Causes a BREAK to be sent. +//! +//! \param ulBase is the base address of the UART port. +//! \param bBreakState controls the output level. +//! +//! Calling this function with \e bBreakState set to \b true asserts a break +//! condition on the UART. Calling this function with \e bBreakState set to +//! \b false removes the break condition. For proper transmission of a break +//! command, the break must be asserted for at least two complete frames. +//! +//! \return None. +// +//***************************************************************************** +void +UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the break condition as requested. + // + HWREG(ulBase + UART_O_LCRH) = + (bBreakState ? + (HWREG(ulBase + UART_O_LCRH) | UART_LCRH_BRK) : + (HWREG(ulBase + UART_O_LCRH) & ~(UART_LCRH_BRK))); +} + +//***************************************************************************** +// +//! Determines whether the UART transmitter is busy or not. +//! +//! \param ulBase is the base address of the UART port. +//! +//! Allows the caller to determine whether all transmitted bytes have cleared +//! the transmitter hardware. If \b false is returned, the transmit FIFO is +//! empty and all bits of the last transmitted character, including all stop +//! bits, have left the hardware shift register. +//! +//! \return Returns \b true if the UART is transmitting or \b false if all +//! transmissions are complete. +// +//***************************************************************************** +tBoolean +UARTBusy(unsigned long ulBase) +{ + // + // Check the argument. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine if the UART is busy. + // + return((HWREG(ulBase + UART_O_FR) & UART_FR_BUSY) ? true : false); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! \param pfnHandler is a pointer to the function to be called when the +//! UART interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; specific UART +//! interrupts must be enabled via UARTIntEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Register the interrupt handler. + // + IntRegister(ulInt, pfnHandler); + + // + // Enable the UART interrupt. + // + IntEnable(ulInt); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for a UART interrupt. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function does the actual unregistering of the interrupt handler. It +//! will clear the handler to be called when a UART interrupt occurs. This +//! will also mask off the interrupt in the interrupt controller so that the +//! interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntUnregister(unsigned long ulBase) +{ + unsigned long ulInt; + + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Determine the interrupt number based on the UART port. + // + ulInt = ((ulBase == UART0_BASE) ? INT_UART0 : + ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2)); + + // + // Disable the interrupt. + // + IntDisable(ulInt); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulInt); +} + +//***************************************************************************** +// +//! Enables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled. +//! +//! Enables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter is the logical OR of any of the following: +//! +//! - \b UART_INT_OE - Overrun Error interrupt +//! - \b UART_INT_BE - Break Error interrupt +//! - \b UART_INT_PE - Parity Error interrupt +//! - \b UART_INT_FE - Framing Error interrupt +//! - \b UART_INT_RT - Receive Timeout interrupt +//! - \b UART_INT_TX - Transmit interrupt +//! - \b UART_INT_RX - Receive interrupt +//! - \b UART_INT_DSR - DSR interrupt +//! - \b UART_INT_DCD - DCD interrupt +//! - \b UART_INT_CTS - CTS interrupt +//! - \b UART_INT_RI - RI interrupt +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Enable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) |= ulIntFlags; +} + +//***************************************************************************** +// +//! Disables individual UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled. +//! +//! Disables the indicated UART interrupt sources. Only the sources that are +//! enabled can be reflected to the processor interrupt; disabled sources have +//! no effect on the processor. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Disable the specified interrupts. + // + HWREG(ulBase + UART_O_IM) &= ~(ulIntFlags); +} + +//***************************************************************************** +// +//! Gets the current interrupt status. +//! +//! \param ulBase is the base address of the UART port. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the specified UART. Either the raw +//! interrupt status or the status of interrupts that are allowed to reflect to +//! the processor can be returned. +//! +//! \return Returns the current interrupt status, enumerated as a bit field of +//! values described in UARTIntEnable(). +// +//***************************************************************************** +unsigned long +UARTIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + UART_O_MIS)); + } + else + { + return(HWREG(ulBase + UART_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears UART interrupt sources. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared. +//! +//! The specified UART interrupt sources are cleared, so that they no longer +//! assert. This function must be called in the interrupt handler to keep the +//! interrupt from being recognized again immediately upon exit. +//! +//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags +//! parameter to UARTIntEnable(). +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested interrupt sources. + // + HWREG(ulBase + UART_O_ICR) = ulIntFlags; +} + +//***************************************************************************** +// +//! Enable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to enable. +//! +//! The specified UART DMA features are enabled. The UART can be +//! configured to use DMA for transmit or receive, and to disable +//! receive if an error occurs. The \e ulDMAFlags parameter is the +//! logical OR of any of the following values: +//! +//! - UART_DMA_RX - enable DMA for receive +//! - UART_DMA_TX - enable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - disable DMA receive on UART error +//! +//! \note The uDMA controller must also be set up before DMA can be used +//! with the UART. +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Set the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) |= ulDMAFlags; +} + +//***************************************************************************** +// +//! Disable UART DMA operation. +//! +//! \param ulBase is the base address of the UART port. +//! \param ulDMAFlags is a bit mask of the DMA features to disable. +//! +//! This function is used to disable UART DMA features that were enabled +//! by UARTDMAEnable(). The specified UART DMA features are disabled. The +//! \e ulDMAFlags parameter is the logical OR of any of the following values: +//! +//! - UART_DMA_RX - disable DMA for receive +//! - UART_DMA_TX - disable DMA for transmit +//! - UART_DMA_ERR_RXSTOP - do not disable DMA receive on UART error +//! +//! \return None. +// +//***************************************************************************** +void +UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Clear the requested bits in the UART DMA control register. + // + HWREG(ulBase + UART_O_DMACTL) &= ~ulDMAFlags; +} + +//***************************************************************************** +// +//! Gets current receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function returns the current state of each of the 4 receiver error +//! sources. The returned errors are equivalent to the four error bits +//! returned via the previous call to UARTCharGet() or UARTCharGetNonBlocking() +//! with the exception that the overrun error is set immediately the overrun +//! occurs rather than when a character is next read. +//! +//! \return Returns a logical OR combination of the receiver error flags, +//! \b UART_RXERROR_FRAMING, \b UART_RXERROR_PARITY, \b UART_RXERROR_BREAK +//! and \b UART_RXERROR_OVERRUN. +// +//***************************************************************************** +unsigned long +UARTRxErrorGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Return the current value of the receive status register. + // + return(HWREG(ulBase + UART_O_RSR) & 0x0000000F); +} + +//***************************************************************************** +// +//! Clears all reported receiver errors. +//! +//! \param ulBase is the base address of the UART port. +//! +//! This function is used to clear all receiver error conditions reported via +//! UARTRxErrorGet(). If using the overrun, framing error, parity error or +//! break interrupts, this function must be called after clearing the interrupt +//! to ensure that later errors of the same type trigger another interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +UARTRxErrorClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(UARTBaseValid(ulBase)); + + // + // Any write to the Error Clear Register will clear all bits which are + // currently set. + // + HWREG(ulBase + UART_O_ECR) = 0; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.h new file mode 100644 index 00000000..2a23fa63 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/uart.h @@ -0,0 +1,243 @@ +//***************************************************************************** +// +// uart.h - Defines and Macros for the UART. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UART_H__ +#define __UART_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Values that can be passed to UARTIntEnable, UARTIntDisable, and UARTIntClear +// as the ulIntFlags parameter, and returned from UARTIntStatus. +// +//***************************************************************************** +#define UART_INT_OE 0x400 // Overrun Error Interrupt Mask +#define UART_INT_BE 0x200 // Break Error Interrupt Mask +#define UART_INT_PE 0x100 // Parity Error Interrupt Mask +#define UART_INT_FE 0x080 // Framing Error Interrupt Mask +#define UART_INT_RT 0x040 // Receive Timeout Interrupt Mask +#define UART_INT_TX 0x020 // Transmit Interrupt Mask +#define UART_INT_RX 0x010 // Receive Interrupt Mask +#define UART_INT_DSR 0x008 // DSR Modem Interrupt Mask +#define UART_INT_DCD 0x004 // DCD Modem Interrupt Mask +#define UART_INT_CTS 0x002 // CTS Modem Interrupt Mask +#define UART_INT_RI 0x001 // RI Modem Interrupt Mask + +//***************************************************************************** +// +// Values that can be passed to UARTConfigSetExpClk as the ulConfig parameter +// and returned by UARTConfigGetExpClk in the pulConfig parameter. +// Additionally, the UART_CONFIG_PAR_* subset can be passed to +// UARTParityModeSet as the ulParity parameter, and are returned by +// UARTParityModeGet. +// +//***************************************************************************** +#define UART_CONFIG_WLEN_MASK 0x00000060 // Mask for extracting word length +#define UART_CONFIG_WLEN_8 0x00000060 // 8 bit data +#define UART_CONFIG_WLEN_7 0x00000040 // 7 bit data +#define UART_CONFIG_WLEN_6 0x00000020 // 6 bit data +#define UART_CONFIG_WLEN_5 0x00000000 // 5 bit data +#define UART_CONFIG_STOP_MASK 0x00000008 // Mask for extracting stop bits +#define UART_CONFIG_STOP_ONE 0x00000000 // One stop bit +#define UART_CONFIG_STOP_TWO 0x00000008 // Two stop bits +#define UART_CONFIG_PAR_MASK 0x00000086 // Mask for extracting parity +#define UART_CONFIG_PAR_NONE 0x00000000 // No parity +#define UART_CONFIG_PAR_EVEN 0x00000006 // Even parity +#define UART_CONFIG_PAR_ODD 0x00000002 // Odd parity +#define UART_CONFIG_PAR_ONE 0x00000082 // Parity bit is one +#define UART_CONFIG_PAR_ZERO 0x00000086 // Parity bit is zero + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulTxLevel parameter and +// returned by UARTFIFOLevelGet in the pulTxLevel. +// +//***************************************************************************** +#define UART_FIFO_TX1_8 0x00000000 // Transmit interrupt at 1/8 Full +#define UART_FIFO_TX2_8 0x00000001 // Transmit interrupt at 1/4 Full +#define UART_FIFO_TX4_8 0x00000002 // Transmit interrupt at 1/2 Full +#define UART_FIFO_TX6_8 0x00000003 // Transmit interrupt at 3/4 Full +#define UART_FIFO_TX7_8 0x00000004 // Transmit interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTFIFOLevelSet as the ulRxLevel parameter and +// returned by UARTFIFOLevelGet in the pulRxLevel. +// +//***************************************************************************** +#define UART_FIFO_RX1_8 0x00000000 // Receive interrupt at 1/8 Full +#define UART_FIFO_RX2_8 0x00000008 // Receive interrupt at 1/4 Full +#define UART_FIFO_RX4_8 0x00000010 // Receive interrupt at 1/2 Full +#define UART_FIFO_RX6_8 0x00000018 // Receive interrupt at 3/4 Full +#define UART_FIFO_RX7_8 0x00000020 // Receive interrupt at 7/8 Full + +//***************************************************************************** +// +// Values that can be passed to UARTDMAEnable() and UARTDMADisable(). +// +//***************************************************************************** +#define UART_DMA_ERR_RXSTOP 0x00000004 // Stop DMA receive if UART error +#define UART_DMA_TX 0x00000002 // Enable DMA for transmit +#define UART_DMA_RX 0x00000001 // Enable DMA for receive + +//***************************************************************************** +// +// Values returned from UARTRxErrorGet(). +// +//***************************************************************************** +#define UART_RXERROR_OVERRUN 0x00000008 +#define UART_RXERROR_BREAK 0x00000004 +#define UART_RXERROR_PARITY 0x00000002 +#define UART_RXERROR_FRAMING 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTHandshakeOutputsSet() or returned from +// UARTHandshakeOutputGet(). +// +//***************************************************************************** +#define UART_OUTPUT_RTS 0x00000800 +#define UART_OUTPUT_DTR 0x00000400 + +//***************************************************************************** +// +// Values that can be returned from UARTHandshakeInputsGet(). +// +//***************************************************************************** +#define UART_INPUT_RI 0x00000100 +#define UART_INPUT_DCD 0x00000004 +#define UART_INPUT_DSR 0x00000002 +#define UART_INPUT_CTS 0x00000001 + +//***************************************************************************** +// +// Values that can be passed to UARTFlowControl() or returned from +// UARTFlowControlGet(). +// +//***************************************************************************** +#define UART_FLOWCONTROL_TX 0x00008000 +#define UART_FLOWCONTROL_RX 0x00004000 +#define UART_FLOWCONTROL_NONE 0x00000000 + +//***************************************************************************** +// +// Values that can be passed to UARTTxIntModeSet() or returned from +// UARTTxIntModeGet(). +// +//***************************************************************************** +#define UART_TXINT_MODE_FIFO 0x00000000 +#define UART_TXINT_MODE_EOT 0x00000010 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void UARTParityModeSet(unsigned long ulBase, unsigned long ulParity); +extern unsigned long UARTParityModeGet(unsigned long ulBase); +extern void UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, + unsigned long ulRxLevel); +extern void UARTFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, + unsigned long *pulRxLevel); +extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long ulBaud, unsigned long ulConfig); +extern void UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk, + unsigned long *pulBaud, + unsigned long *pulConfig); +extern void UARTEnable(unsigned long ulBase); +extern void UARTDisable(unsigned long ulBase); +extern void UARTFIFOEnable(unsigned long ulBase); +extern void UARTFIFODisable(unsigned long ulBase); +extern void UARTEnableSIR(unsigned long ulBase, tBoolean bLowPower); +extern void UARTDisableSIR(unsigned long ulBase); +extern tBoolean UARTCharsAvail(unsigned long ulBase); +extern tBoolean UARTSpaceAvail(unsigned long ulBase); +extern long UARTCharGetNonBlocking(unsigned long ulBase); +extern long UARTCharGet(unsigned long ulBase); +extern tBoolean UARTCharPutNonBlocking(unsigned long ulBase, + unsigned char ucData); +extern void UARTCharPut(unsigned long ulBase, unsigned char ucData); +extern void UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState); +extern tBoolean UARTBusy(unsigned long ulBase); +extern void UARTIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void UARTIntUnregister(unsigned long ulBase); +extern void UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long UARTIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags); +extern void UARTDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags); +extern void UARTDMADisable(unsigned long ulBase, unsigned long ulDMAFlags); +extern unsigned long UARTRxErrorGet(unsigned long ulBase); +extern void UARTRxErrorClear(unsigned long ulBase); +extern void UARTSmartCardEnable(unsigned long ulBase); +extern void UARTSmartCardDisable(unsigned long ulBase); +extern void UARTModemControlSet(unsigned long ulBase, + unsigned long ulControl); +extern void UARTModemControlClear(unsigned long ulBase, + unsigned long ulControl); +extern unsigned long UARTModemControlGet(unsigned long ulBase); +extern unsigned long UARTModemStatusGet(unsigned long ulBase); +extern void UARTFlowControlSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTFlowControlGet(unsigned long ulBase); +extern void UARTTxIntModeSet(unsigned long ulBase, unsigned long ulMode); +extern unsigned long UARTTxIntModeGet(unsigned long ulBase); + +//***************************************************************************** +// +// Several UART APIs have been renamed, with the original function name being +// deprecated. These defines provide backward compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +#include "driverlib/sysctl.h" +#define UARTConfigSet(a, b, c) \ + UARTConfigSetExpClk(a, SysCtlClockGet(), b, c) +#define UARTConfigGet(a, b, c) \ + UARTConfigGetExpClk(a, SysCtlClockGet(), b, c) +#define UARTCharNonBlockingGet(a) \ + UARTCharGetNonBlocking(a) +#define UARTCharNonBlockingPut(a, b) \ + UARTCharPutNonBlocking(a, b) +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.c new file mode 100644 index 00000000..a9596641 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.c @@ -0,0 +1,1178 @@ +//***************************************************************************** +// +// udma.c - Driver for the micro-DMA controller. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup udma_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_types.h" +#include "inc/hw_udma.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/udma.h" + +//***************************************************************************** +// +//! Enables the uDMA controller for use. +//! +//! This function enables the uDMA controller. The uDMA controller must be +//! enabled before it can be configured and used. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAEnable(void) +{ + // + // Set the master enable bit in the config register. + // + HWREG(UDMA_CFG) = UDMA_CFG_MASTEN; +} + +//***************************************************************************** +// +//! Disables the uDMA controller for use. +//! +//! This function disables the uDMA controller. Once disabled, the uDMA +//! controller will not operate until re-enabled with uDMAEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +uDMADisable(void) +{ + // + // Clear the master enable bit in the config register. + // + HWREG(UDMA_CFG) = 0; +} + +//***************************************************************************** +// +//! Gets the uDMA error status. +//! +//! This function returns the uDMA error status. It should be called from +//! within the uDMA error interrupt handler to determine if a uDMA error +//! occurred. +//! +//! \return Returns non-zero if a uDMA error is pending. +// +//***************************************************************************** +unsigned long +uDMAErrorStatusGet(void) +{ + // + // Return the uDMA error status. + // + return(HWREG(UDMA_ERRCLR)); +} + +//***************************************************************************** +// +//! Clears the uDMA error interrupt. +//! +//! This function clears a pending uDMA error interrupt. It should be called +//! from within the uDMA error interrupt handler to clear the interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAErrorStatusClear(void) +{ + // + // Clear the uDMA error interrupt. + // + HWREG(UDMA_ERRCLR) = 1; +} + +//***************************************************************************** +// +//! Enables a uDMA channel for operation. +//! +//! \param ulChannelNum is the channel number to enable. +//! +//! This function enables a specific uDMA channel for use. This function must +//! be used to enable a channel before it can be used to perform a uDMA +//! transfer. +//! +//! When a uDMA transfer is completed, the channel will be automatically +//! disabled by the uDMA controller. Therefore, this function should be called +//! prior to starting up any new transfer. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelEnable(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the enable set register. + // + HWREG(UDMA_ENASET) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Disables a uDMA channel for operation. +//! +//! \param ulChannelNum is the channel number to disable. +//! +//! This function disables a specific uDMA channel. Once disabled, a channel +//! will not respond to uDMA transfer requests until re-enabled via +//! uDMAChannelEnable(). +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelDisable(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the enable clear register. + // + HWREG(UDMA_ENACLR) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Checks if a uDMA channel is enabled for operation. +//! +//! \param ulChannelNum is the channel number to check. +//! +//! This function checks to see if a specific uDMA channel is enabled. This +//! can be used to check the status of a transfer, since the channel will +//! be automatically disabled at the end of a transfer. +//! +//! \return Returns \b true if the channel is enabled, \b false if disabled. +// +//***************************************************************************** +tBoolean +uDMAChannelIsEnabled(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // AND the specified channel bit with the enable register, and return the + // result. + // + return((HWREG(UDMA_ENASET) & (1 << ulChannelNum)) ? true : false); +} + +//***************************************************************************** +// +//! Sets the base address for the channel control table. +//! +//! \param pControlTable is a pointer to the 1024 byte aligned base address +//! of the uDMA channel control table. +//! +//! This function sets the base address of the channel control table. This +//! table resides in system memory and holds control information for each uDMA +//! channel. The table must be aligned on a 1024 byte boundary. The base +//! address must be set before any of the channel functions can be used. +//! +//! The size of the channel control table depends on the number of uDMA +//! channels, and which transfer modes are used. Refer to the introductory +//! text and the microcontroller datasheet for more information about the +//! channel control table. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAControlBaseSet(void *pControlTable) +{ + // + // Check the arguments. + // + ASSERT(((unsigned long)pControlTable & ~0x3FF) == + (unsigned long)pControlTable); + ASSERT((unsigned long)pControlTable >= 0x20000000); + + // + // Program the base address into the register. + // + HWREG(UDMA_CTLBASE) = (unsigned long)pControlTable; +} + +//***************************************************************************** +// +//! Gets the base address for the channel control table. +//! +//! This function gets the base address of the channel control table. This +//! table resides in system memory and holds control information for each uDMA +//! channel. +//! +//! \return Returns a pointer to the base address of the channel control table. +// +//***************************************************************************** +void * +uDMAControlBaseGet(void) +{ + // + // Read the current value of the control base register, and return it to + // the caller. + // + return((void *)HWREG(UDMA_CTLBASE)); +} + +//***************************************************************************** +// +//! Gets the base address for the channel control table alternate structures. +//! +//! This function gets the base address of the second half of the channel +//! control table that holds the alternate control structures for each channel. +//! +//! \return Returns a pointer to the base address of the second half of the +//! channel control table. +// +//***************************************************************************** +void * +uDMAControlAlternateBaseGet(void) +{ + // + // Read the current value of the control base register, and return it to + // the caller. + // + return((void *)HWREG(UDMA_ALTBASE)); +} + +//***************************************************************************** +// +//! Requests a uDMA channel to start a transfer. +//! +//! \param ulChannelNum is the channel number on which to request a uDMA +//! transfer. +//! +//! This function allows software to request a uDMA channel to begin a +//! transfer. This could be used for performing a memory to memory transfer, +//! or if for some reason a transfer needs to be initiated by software instead +//! of the peripheral associated with that channel. +//! +//! \note If the channel is \b UDMA_CHANNEL_SW and interrupts are used, then +//! the completion will be signaled on the uDMA dedicated interrupt. If a +//! peripheral channel is used, then the completion will be signaled on the +//! peripheral's interrupt. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelRequest(unsigned long ulChannelNum) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Set the bit for this channel in the software uDMA request register. + // + HWREG(UDMA_SWREQ) = 1 << ulChannelNum; +} + +//***************************************************************************** +// +//! Enables attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! \param ulAttr is a combination of attributes for the channel. +//! +//! The \e ulAttr parameter is the logical OR of any of the following: +//! +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel (it is very unlikely that this flag should be used) +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelAttributeEnable(unsigned long ulChannelNum, unsigned long ulAttr) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + ASSERT((ulAttr & ~(UDMA_ATTR_USEBURST | UDMA_ATTR_ALTSELECT | + UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK)) == 0); + + // + // Set the useburst bit for this channel if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_USEBURST) + { + HWREG(UDMA_USEBURSTSET) = 1 << ulChannelNum; + } + + // + // Set the alternate control select bit for this channel, + // if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_ALTSELECT) + { + HWREG(UDMA_ALTSET) = 1 << ulChannelNum; + } + + // + // Set the high priority bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_HIGH_PRIORITY) + { + HWREG(UDMA_PRIOSET) = 1 << ulChannelNum; + } + + // + // Set the request mask bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_REQMASK) + { + HWREG(UDMA_REQMASKSET) = 1 << ulChannelNum; + } +} + +//***************************************************************************** +// +//! Disables attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! \param ulAttr is a combination of attributes for the channel. +//! +//! This function is used to disable attributes of a uDMA channel. +//! +//! The \e ulAttr parameter is the logical OR of any of the following: +//! +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel. +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority. +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelAttributeDisable(unsigned long ulChannelNum, unsigned long ulAttr) +{ + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + ASSERT((ulAttr & ~(UDMA_ATTR_USEBURST | UDMA_ATTR_ALTSELECT | + UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK)) == 0); + + // + // Clear the useburst bit for this channel if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_USEBURST) + { + HWREG(UDMA_USEBURSTCLR) = 1 << ulChannelNum; + } + + // + // Clear the alternate control select bit for this channel, if set in + // ulConfig. + // + if(ulAttr & UDMA_ATTR_ALTSELECT) + { + HWREG(UDMA_ALTCLR) = 1 << ulChannelNum; + } + + // + // Clear the high priority bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_HIGH_PRIORITY) + { + HWREG(UDMA_PRIOCLR) = 1 << ulChannelNum; + } + + // + // Clear the request mask bit for this channel, if set in ulConfig. + // + if(ulAttr & UDMA_ATTR_REQMASK) + { + HWREG(UDMA_REQMASKCLR) = 1 << ulChannelNum; + } +} + +//***************************************************************************** +// +//! Gets the enabled attributes of a uDMA channel. +//! +//! \param ulChannelNum is the channel to configure. +//! +//! This function returns a combination of flags representing the attributes of +//! the uDMA channel. +//! +//! \return Returns the logical OR of the attributes of the uDMA channel, which +//! can be any of the following: +//! - \b UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst +//! mode. +//! - \b UDMA_ATTR_ALTSELECT is used to select the alternate control structure +//! for this channel. +//! - \b UDMA_ATTR_HIGH_PRIORITY is used to set this channel to high priority. +//! - \b UDMA_ATTR_REQMASK is used to mask the hardware request signal from the +//! peripheral for this channel. +// +//***************************************************************************** +unsigned long +uDMAChannelAttributeGet(unsigned long ulChannelNum) +{ + unsigned long ulAttr = 0; + + // + // Check the arguments. + // + ASSERT(ulChannelNum < 32); + + // + // Check to see if useburst bit is set for this channel. + // + if(HWREG(UDMA_USEBURSTSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_USEBURST; + } + + // + // Check to see if the alternate control bit is set for this channel. + // + if(HWREG(UDMA_ALTSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_ALTSELECT; + } + + // + // Check to see if the high priority bit is set for this channel. + // + if(HWREG(UDMA_PRIOSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_HIGH_PRIORITY; + } + + // + // Check to see if the request mask bit is set for this channel. + // + if(HWREG(UDMA_REQMASKSET) & (1 << ulChannelNum)) + { + ulAttr |= UDMA_ATTR_REQMASK; + } + + // + // Return the configuration flags. + // + return(ulAttr); +} + +//***************************************************************************** +// +//! Sets the control parameters for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! \param ulControl is logical OR of several control values to set the control +//! parameters for the channel. +//! +//! This function is used to set control parameters for a uDMA transfer. These +//! are typically parameters that are not changed often. +//! +//! The \e ulChannelStructIndex parameter should be the logical OR of the +//! channel number with one of \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT to +//! choose whether the primary or alternate data structure is used. +//! +//! The \e ulControl parameter is the logical OR of five values: the data size, +//! the source address increment, the destination address increment, the +//! arbitration size, and the use burst flag. The choices available for each +//! of these values is described below. +//! +//! Choose the data size from one of \b UDMA_SIZE_8, \b UDMA_SIZE_16, or +//! \b UDMA_SIZE_32 to select a data size of 8, 16, or 32 bits. +//! +//! Choose the source address increment from one of \b UDMA_SRC_INC_8, +//! \b UDMA_SRC_INC_16, \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE to select +//! an address increment of 8-bit bytes, 16-bit halfwords, 32-bit words, or +//! to select non-incrementing. +//! +//! Choose the destination address increment from one of \b UDMA_DST_INC_8, +//! \b UDMA_DST_INC_16, \b UDMA_DST_INC_32, or \b UDMA_DST_INC_NONE to select +//! an address increment of 8-bit bytes, 16-bit halfwords, 32-bit words, or +//! to select non-incrementing. +//! +//! The arbitration size determines how many items are transferred before +//! the uDMA controller re-arbitrates for the bus. Choose the arbitration size +//! from one of \b UDMA_ARB_1, \b UDMA_ARB_2, \b UDMA_ARB_4, \b UDMA_ARB_8, +//! through \b UDMA_ARB_1024 to select the arbitration size from 1 to 1024 +//! items, in powers of 2. +//! +//! The value \b UDMA_NEXT_USEBURST is used to force the channel to only +//! respond to burst requests at the tail end of a scatter-gather transfer. +//! +//! \note The address increment cannot be smaller than the data size. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelControlSet(unsigned long ulChannelStructIndex, + unsigned long ulControl) +{ + tDMAControlTable *pCtl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pCtl = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off the fields to be + // changed, then OR in the new settings. + // + pCtl[ulChannelStructIndex].ulControl = + ((pCtl[ulChannelStructIndex].ulControl & + ~(UDMA_CHCTL_DSTINC_M | + UDMA_CHCTL_DSTSIZE_M | + UDMA_CHCTL_SRCINC_M | + UDMA_CHCTL_SRCSIZE_M | + UDMA_CHCTL_ARBSIZE_M | + UDMA_CHCTL_NXTUSEBURST)) | + ulControl); +} + +//***************************************************************************** +// +//! Sets the transfer parameters for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! \param ulMode is the type of uDMA transfer. +//! \param pvSrcAddr is the source address for the transfer. +//! \param pvDstAddr is the destination address for the transfer. +//! \param ulTransferSize is the number of data items to transfer. +//! +//! This function is used to set the parameters for a uDMA transfer. These are +//! typically parameters that are changed often. The function +//! uDMAChannelControlSet() MUST be called at least once for this channel prior +//! to calling this function. +//! +//! The \e ulChannelStructIndex parameter should be the logical OR of the +//! channel number with one of \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT to +//! choose whether the primary or alternate data structure is used. +//! +//! The \e ulMode parameter should be one of the following values: +//! +//! - \b UDMA_MODE_STOP stops the uDMA transfer. The controller sets the mode +//! to this value at the end of a transfer. +//! - \b UDMA_MODE_BASIC to perform a basic transfer based on request. +//! - \b UDMA_MODE_AUTO to perform a transfer that will always complete once +//! started even if request is removed. +//! - \b UDMA_MODE_PINGPONG to set up a transfer that switches between the +//! primary and alternate control structures for the channel. This allows +//! use of ping-pong buffering for uDMA transfers. +//! - \b UDMA_MODE_MEM_SCATTER_GATHER to set up a memory scatter-gather +//! transfer. +//! - \b UDMA_MODE_PER_SCATTER_GATHER to set up a peripheral scatter-gather +//! transfer. +//! +//! The \e pvSrcAddr and \e pvDstAddr parameters are pointers to the first +//! location of the data to be transferred. These addresses should be aligned +//! according to the item size. The compiler will take care of this if the +//! pointers are pointing to storage of the appropriate data type. +//! +//! The \e ulTransferSize parameter is the number of data items, not the number +//! of bytes. +//! +//! The two scatter/gather modes, memory and peripheral, are actually different +//! depending on whether the primary or alternate control structure is +//! selected. This function will look for the \b UDMA_PRI_SELECT and +//! \b UDMA_ALT_SELECT flag along with the channel number and will set the +//! scatter/gather mode as appropriate for the primary or alternate control +//! structure. +//! +//! The channel must also be enabled using uDMAChannelEnable() after calling +//! this function. The transfer will not begin until the channel has been set +//! up and enabled. Note that the channel is automatically disabled after the +//! transfer is completed, meaning that uDMAChannelEnable() must be called +//! again after setting up the next transfer. +//! +//! \note Great care must be taken to not modify a channel control structure +//! that is in use or else the results will be unpredictable, including the +//! possibility of undesired data transfers to or from memory or peripherals. +//! For BASIC and AUTO modes, it is safe to make changes when the channel is +//! disabled, or the uDMAChannelModeGet() returns \b UDMA_MODE_STOP. For +//! PINGPONG or one of the SCATTER_GATHER modes, it is safe to modify the +//! primary or alternate control structure only when the other is being used. +//! The uDMAChannelModeGet() function will return \b UDMA_MODE_STOP when a +//! channel control structure is inactive and safe to modify. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelTransferSet(unsigned long ulChannelStructIndex, + unsigned long ulMode, void *pvSrcAddr, void *pvDstAddr, + unsigned long ulTransferSize) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + unsigned long ulInc; + unsigned long ulBufferBytes; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + ASSERT(ulMode <= UDMA_MODE_PER_SCATTER_GATHER); + ASSERT((unsigned long)pvSrcAddr >= 0x20000000); + ASSERT((unsigned long)pvDstAddr >= 0x20000000); + ASSERT((ulTransferSize != 0) && (ulTransferSize <= 1024)); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off the mode and size + // fields. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + ~(UDMA_CHCTL_XFERSIZE_M | UDMA_CHCTL_XFERMODE_M)); + + // + // Adjust the mode if the alt control structure is selected. + // + if(ulChannelStructIndex & UDMA_ALT_SELECT) + { + if((ulMode == UDMA_MODE_MEM_SCATTER_GATHER) || + (ulMode == UDMA_MODE_PER_SCATTER_GATHER)) + { + ulMode |= UDMA_MODE_ALT_SELECT; + } + } + + // + // Set the transfer size and mode in the control word (but don't write the + // control word yet as it could kick off a transfer). + // + ulControl |= ulMode | ((ulTransferSize - 1) << 4); + + // + // Get the address increment value for the source, from the control word. + // + ulInc = (ulControl & UDMA_CHCTL_SRCINC_M); + + // + // Compute the ending source address of the transfer. If the source + // increment is set to none, then the ending address is the same as the + // beginning. + // + if(ulInc != UDMA_SRC_INC_NONE) + { + ulInc = ulInc >> 26; + ulBufferBytes = ulTransferSize << ulInc; + pvSrcAddr = (void *)((unsigned long)pvSrcAddr + ulBufferBytes - 1); + } + + // + // Load the source ending address into the control block. + // + pControlTable[ulChannelStructIndex].pvSrcEndAddr = pvSrcAddr; + + // + // Get the address increment value for the destination, from the control + // word. + // + ulInc = ulControl & UDMA_CHCTL_DSTINC_M; + + // + // Compute the ending destination address of the transfer. If the + // destination increment is set to none, then the ending address is the + // same as the beginning. + // + if(ulInc != UDMA_DST_INC_NONE) + { + // + // There is a special case if this is setting up a scatter-gather + // transfer. The destination pointer needs to point to the end of + // the alternate structure for this channel instead of calculating + // the end of the buffer in the normal way. + // + if((ulMode == UDMA_MODE_MEM_SCATTER_GATHER) || + (ulMode == UDMA_MODE_PER_SCATTER_GATHER)) + { + pvDstAddr = + (void *)&pControlTable[ulChannelStructIndex | + UDMA_ALT_SELECT].ulSpare; + } + // + // Not a scatter-gather transfer, calculate end pointer normally. + // + else + { + ulInc = ulInc >> 30; + ulBufferBytes = ulTransferSize << ulInc; + pvDstAddr = (void *)((unsigned long)pvDstAddr + ulBufferBytes - 1); + } + } + + // + // Load the destination ending address into the control block. + // + pControlTable[ulChannelStructIndex].pvDstEndAddr = pvDstAddr; + + // + // Write the new control word value. + // + pControlTable[ulChannelStructIndex].ulControl = ulControl; +} + +//***************************************************************************** +// +//! Configures a uDMA channel for scatter-gather mode. +//! +//! \param ulChannelNum is the uDMA channel number. +//! \param ulTaskCount is the number of scatter-gather tasks to execute. +//! \param pvTaskList is a pointer to the beginning of the scatter-gather +//! task list. +//! \param ulIsPeriphSG is a flag to indicate it is a peripheral scatter-gather +//! transfer (else it will be memory scatter-gather transfer) +//! +//! This function is used to configure a channel for scatter-gather mode. +//! The caller must have already set up a task list, and pass a pointer to +//! the start of the task list as the \e pvTaskList parameter. The +//! \e ulTaskCount parameter is the count of tasks in the task list, not the +//! size of the task list. The flag \e bIsPeriphSG should be used to indicate +//! if the scatter-gather should be configured for a peripheral or memory +//! scatter-gather operation. +//! +//! \sa uDMATaskStructEntry +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelScatterGatherSet(unsigned long ulChannelNum, unsigned ulTaskCount, + void *pvTaskList, unsigned long ulIsPeriphSG) +{ + tDMAControlTable *pControlTable; + tDMAControlTable *pTaskTable; + + // + // Check the parameters + // + ASSERT(ulChannelNum < 32); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + ASSERT(pvTaskList != 0); + ASSERT(ulTaskCount <= 1024); + ASSERT(ulTaskCount != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get a handy pointer to the task list + // + pTaskTable = (tDMAControlTable *)pvTaskList; + + // + // Compute the ending address for the source pointer. This will be the + // last element of the last task in the task table + // + pControlTable[ulChannelNum].pvSrcEndAddr = + &pTaskTable[ulTaskCount - 1].ulSpare; + + // + // Compute the ending address for the destination pointer. This will be + // the end of the alternate structure for this channel. + // + pControlTable[ulChannelNum].pvDstEndAddr = + &pControlTable[ulChannelNum | UDMA_ALT_SELECT].ulSpare; + + // + // Compute the control word. Most configurable items are fixed for + // scatter-gather. Item and increment sizes are all 32-bit and arb + // size must be 4. The count is the number of items in the task list + // times 4 (4 words per task). + // + pControlTable[ulChannelNum].ulControl = + (UDMA_CHCTL_DSTINC_32 | UDMA_CHCTL_DSTSIZE_32 | + UDMA_CHCTL_SRCINC_32 | UDMA_CHCTL_SRCSIZE_32 | + UDMA_CHCTL_ARBSIZE_4 | + (((ulTaskCount * 4) - 1) << UDMA_CHCTL_XFERSIZE_S) | + (ulIsPeriphSG ? UDMA_CHCTL_XFERMODE_PER_SG : + UDMA_CHCTL_XFERMODE_MEM_SG)); +} + +//***************************************************************************** +// +//! Gets the current transfer size for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! +//! This function is used to get the uDMA transfer size for a channel. The +//! transfer size is the number of items to transfer, where the size of an item +//! might be 8, 16, or 32 bits. If a partial transfer has already occurred, +//! then the number of remaining items will be returned. If the transfer is +//! complete, then 0 will be returned. +//! +//! \return Returns the number of items remaining to transfer. +// +//***************************************************************************** +unsigned long +uDMAChannelSizeGet(unsigned long ulChannelStructIndex) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off all but the size field + // and the mode field. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + (UDMA_CHCTL_XFERSIZE_M | UDMA_CHCTL_XFERMODE_M)); + + // + // If the size field and mode field are 0 then the transfer is finished + // and there are no more items to transfer + // + if(ulControl == 0) + { + return(0); + } + + // + // Otherwise, if either the size field or more field is non-zero, then + // not all the items have been transferred. + // + else + { + // + // Shift the size field and add one, then return to user. + // + return((ulControl >> 4) + 1); + } +} + +//***************************************************************************** +// +//! Gets the transfer mode for a uDMA channel control structure. +//! +//! \param ulChannelStructIndex is the logical OR of the uDMA channel number +//! with either \b UDMA_PRI_SELECT or \b UDMA_ALT_SELECT. +//! +//! This function is used to get the transfer mode for the uDMA channel. It +//! can be used to query the status of a transfer on a channel. When the +//! transfer is complete the mode will be \b UDMA_MODE_STOP. +//! +//! \return Returns the transfer mode of the specified channel and control +//! structure, which will be one of the following values: \b UDMA_MODE_STOP, +//! \b UDMA_MODE_BASIC, \b UDMA_MODE_AUTO, \b UDMA_MODE_PINGPONG, +//! \b UDMA_MODE_MEM_SCATTER_GATHER, or \b UDMA_MODE_PER_SCATTER_GATHER. +// +//***************************************************************************** +unsigned long +uDMAChannelModeGet(unsigned long ulChannelStructIndex) +{ + tDMAControlTable *pControlTable; + unsigned long ulControl; + + // + // Check the arguments. + // + ASSERT(ulChannelStructIndex < 64); + ASSERT(HWREG(UDMA_CTLBASE) != 0); + + // + // Get the base address of the control table. + // + pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE); + + // + // Get the current control word value and mask off all but the mode field. + // + ulControl = (pControlTable[ulChannelStructIndex].ulControl & + UDMA_CHCTL_XFERMODE_M); + + // + // Check if scatter/gather mode, and if so, mask off the alt bit. + // + if(((ulControl & ~UDMA_MODE_ALT_SELECT) == UDMA_MODE_MEM_SCATTER_GATHER) || + ((ulControl & ~UDMA_MODE_ALT_SELECT) == UDMA_MODE_PER_SCATTER_GATHER)) + { + ulControl &= ~UDMA_MODE_ALT_SELECT; + } + + // + // Return the mode to the caller. + // + return(ulControl); +} + +//***************************************************************************** +// +//! Selects the secondary peripheral for a set of uDMA channels. +//! +//! \param ulSecPeriphs is the logical or of the uDMA channels for which to +//! use the secondary peripheral, instead of the default peripheral. +//! +//! This function is used to select the secondary peripheral assignment for +//! a set of uDMA channels. By selecting the secondary peripheral assignment +//! for a channel, the default peripheral assignment is no longer available +//! for that channel. +//! +//! The parameter \e ulSecPeriphs can be the logical OR of any of the +//! following macros. If one of the macros below is in the list passed +//! to this function, then the secondary peripheral (marked as \b _SEC_) +//! will be selected. +//! +//! - \b UDMA_DEF_USBEP1RX_SEC_UART2RX +//! - \b UDMA_DEF_USBEP1TX_SEC_UART2TX +//! - \b UDMA_DEF_USBEP2RX_SEC_TMR3A +//! - \b UDMA_DEF_USBEP2TX_SEC_TMR3B +//! - \b UDMA_DEF_USBEP3RX_SEC_TMR2A +//! - \b UDMA_DEF_USBEP3TX_SEC_TMR2B +//! - \b UDMA_DEF_ETH0RX_SEC_TMR2A +//! - \b UDMA_DEF_ETH0TX_SEC_TMR2B +//! - \b UDMA_DEF_UART0RX_SEC_UART1RX +//! - \b UDMA_DEF_UART0TX_SEC_UART1TX +//! - \b UDMA_DEF_SSI0RX_SEC_SSI1RX +//! - \b UDMA_DEF_SSI0TX_SEC_SSI1TX +//! - \b UDMA_DEF_RESERVED_SEC_UART2RX +//! - \b UDMA_DEF_RESERVED_SEC_UART2TX +//! - \b UDMA_DEF_ADC00_SEC_TMR2A +//! - \b UDMA_DEF_ADC01_SEC_TMR2B +//! - \b UDMA_DEF_ADC02_SEC_RESERVED +//! - \b UDMA_DEF_ADC03_SEC_RESERVED +//! - \b UDMA_DEF_TMR0A_SEC_TMR1A +//! - \b UDMA_DEF_TMR0B_SEC_TMR1B +//! - \b UDMA_DEF_TMR1A_SEC_EPI0RX +//! - \b UDMA_DEF_TMR1B_SEC_EPI0TX +//! - \b UDMA_DEF_UART1RX_SEC_RESERVED +//! - \b UDMA_DEF_UART1TX_SEC_RESERVED +//! - \b UDMA_DEF_SSI1RX_SEC_ADC10 +//! - \b UDMA_DEF_SSI1TX_SEC_ADC11 +//! - \b UDMA_DEF_RESERVED_SEC_ADC12 +//! - \b UDMA_DEF_RESERVED_SEC_ADC13 +//! - \b UDMA_DEF_I2S0RX_SEC_RESERVED +//! - \b UDMA_DEF_I2S0TX_SEC_RESERVED +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelSelectSecondary(unsigned long ulSecPeriphs) +{ + // + // Select the secondary peripheral for the specified channels. + // + HWREG(UDMA_CHASGN) |= ulSecPeriphs; +} + +//***************************************************************************** +// +//! Selects the default peripheral for a set of uDMA channels. +//! +//! \param ulDefPeriphs is the logical or of the uDMA channels for which to +//! use the default peripheral, instead of the secondary peripheral. +//! +//! This function is used to select the default peripheral assignment for +//! a set of uDMA channels. +//! +//! The parameter \e ulDefPeriphs can be the logical OR of any of the +//! following macros. If one of the macros below is in the list passed +//! to this function, then the default peripheral (marked as \b _DEF_) +//! will be selected. +//! +//! - \b UDMA_DEF_USBEP1RX_SEC_UART2RX +//! - \b UDMA_DEF_USBEP1TX_SEC_UART2TX +//! - \b UDMA_DEF_USBEP2RX_SEC_TMR3A +//! - \b UDMA_DEF_USBEP2TX_SEC_TMR3B +//! - \b UDMA_DEF_USBEP3RX_SEC_TMR2A +//! - \b UDMA_DEF_USBEP3TX_SEC_TMR2B +//! - \b UDMA_DEF_ETH0RX_SEC_TMR2A +//! - \b UDMA_DEF_ETH0TX_SEC_TMR2B +//! - \b UDMA_DEF_UART0RX_SEC_UART1RX +//! - \b UDMA_DEF_UART0TX_SEC_UART1TX +//! - \b UDMA_DEF_SSI0RX_SEC_SSI1RX +//! - \b UDMA_DEF_SSI0TX_SEC_SSI1TX +//! - \b UDMA_DEF_RESERVED_SEC_UART2RX +//! - \b UDMA_DEF_RESERVED_SEC_UART2TX +//! - \b UDMA_DEF_ADC00_SEC_TMR2A +//! - \b UDMA_DEF_ADC01_SEC_TMR2B +//! - \b UDMA_DEF_ADC02_SEC_RESERVED +//! - \b UDMA_DEF_ADC03_SEC_RESERVED +//! - \b UDMA_DEF_TMR0A_SEC_TMR1A +//! - \b UDMA_DEF_TMR0B_SEC_TMR1B +//! - \b UDMA_DEF_TMR1A_SEC_EPI0RX +//! - \b UDMA_DEF_TMR1B_SEC_EPI0TX +//! - \b UDMA_DEF_UART1RX_SEC_RESERVED +//! - \b UDMA_DEF_UART1TX_SEC_RESERVED +//! - \b UDMA_DEF_SSI1RX_SEC_ADC10 +//! - \b UDMA_DEF_SSI1TX_SEC_ADC11 +//! - \b UDMA_DEF_RESERVED_SEC_ADC12 +//! - \b UDMA_DEF_RESERVED_SEC_ADC13 +//! - \b UDMA_DEF_I2S0RX_SEC_RESERVED +//! - \b UDMA_DEF_I2S0TX_SEC_RESERVED +//! +//! \return None. +// +//***************************************************************************** +void +uDMAChannelSelectDefault(unsigned long ulDefPeriphs) +{ + // + // Select the default peripheral for the specified channels. + // + HWREG(UDMA_CHASGN) &= ~ulDefPeriphs; +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the uDMA controller. +//! +//! \param ulIntChannel identifies which uDMA interrupt is to be registered. +//! \param pfnHandler is a pointer to the function to be called when the +//! interrupt is activated. +//! +//! This sets and enables the handler to be called when the uDMA controller +//! generates an interrupt. The \e ulIntChannel parameter should be one of the +//! following: +//! +//! - \b UDMA_INT_SW to register an interrupt handler to process interrupts +//! from the uDMA software channel (UDMA_CHANNEL_SW) +//! - \b UDMA_INT_ERR to register an interrupt handler to process uDMA error +//! interrupts +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \note The interrupt handler for uDMA is for transfer completion when the +//! channel UDMA_CHANNEL_SW is used, and for error interrupts. The +//! interrupts for each peripheral channel are handled through the individual +//! peripheral interrupt handlers. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAIntRegister(unsigned long ulIntChannel, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(pfnHandler); + ASSERT((ulIntChannel == UDMA_INT_SW) || (ulIntChannel == UDMA_INT_ERR)); + + // + // Register the interrupt handler. + // + IntRegister(ulIntChannel, pfnHandler); + + // + // Enable the memory management fault. + // + IntEnable(ulIntChannel); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the uDMA controller. +//! +//! \param ulIntChannel identifies which uDMA interrupt to unregister. +//! +//! This function will disable and clear the handler to be called for the +//! specified uDMA interrupt. The \e ulIntChannel parameter should be one of +//! \b UDMA_INT_SW or \b UDMA_INT_ERR as documented for the function +//! uDMAIntRegister(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +uDMAIntUnregister(unsigned long ulIntChannel) +{ + // + // Disable the interrupt. + // + IntDisable(ulIntChannel); + + // + // Unregister the interrupt handler. + // + IntUnregister(ulIntChannel); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.h new file mode 100644 index 00000000..5a876fdb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/udma.h @@ -0,0 +1,442 @@ +//***************************************************************************** +// +// udma.h - Prototypes and macros for the uDMA controller. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __UDMA_H__ +#define __UDMA_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +//! \addtogroup udma_api +//! @{ +// +//***************************************************************************** + +//***************************************************************************** +// +// A structure that defines an entry in the channel control table. These +// fields are used by the uDMA controller and normally it is not necessary for +// software to directly read or write fields in the table. +// +//***************************************************************************** +typedef struct +{ + // + // The ending source address of the data transfer. + // + volatile void *pvSrcEndAddr; + + // + // The ending destination address of the data transfer. + // + volatile void *pvDstEndAddr; + + // + // The channel control mode. + // + volatile unsigned long ulControl; + + // + // An unused location. + // + volatile unsigned long ulSpare; +} +tDMAControlTable; + +//***************************************************************************** +// +//! A helper macro for building scatter-gather task table entries. +//! +//! \param ulTransferCount is the count of items to transfer for this task. +//! \param ulItemSize is the bit size of the items to transfer for this task. +//! \param ulSrcIncrement is the bit size increment for source data. +//! \param pvSrcAddr is the starting address of the data to transfer. +//! \param ulDstIncrement is the bit size increment for destination data. +//! \param pvDstAddr is the starting address of the destination data. +//! \param ulArbSize is the arbitration size to use for the transfer task. +//! \param ulMode is the transfer mode for this task. +//! +//! This macro is intended to be used to help populate a table of uDMA tasks +//! for a scatter-gather transfer. This macro will calculate the values for +//! the fields of a task structure entry based on the input parameters. +//! +//! There are specific requirements for the values of each parameter. No +//! checking is done so it is up to the caller to ensure that correct values +//! are used for the parameters. +//! +//! The \e ulTransferCount parameter is the number of items that will be +//! transferred by this task. It must be in the range 1-1024. +//! +//! The \e ulItemSize parameter is the bit size of the transfer data. It must +//! be one of \b UDMA_SIZE_8, \b UDMA_SIZE_16, or \b UDMA_SIZE_32. +//! +//! The \e ulSrcIncrement parameter is the increment size for the source data. +//! It must be one of \b UDMA_SRC_INC_8, \b UDMA_SRC_INC_16, +//! \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE. +//! +//! The \e pvSrcAddr parameter is a void pointer to the beginning of the source +//! data. +//! +//! The \e ulDstIncrement parameter is the increment size for the destination +//! data. It must be one of \b UDMA_SRC_INC_8, \b UDMA_SRC_INC_16, +//! \b UDMA_SRC_INC_32, or \b UDMA_SRC_INC_NONE. +//! +//! The \e pvDstAddr parameter is a void pointer to the beginning of the +//! location where the data will be transferred. +//! +//! The \e ulArbSize parameter is the arbitration size for the transfer, and +//! must be one of \b UDMA_ARB_1, \b UDMA_ARB_2, \b UDMA_ARB_4, and so on +//! up to \b UDMA_ARB_1024. This is used to select the arbitration size in +//! powers of 2, from 1 to 1024. +//! +//! The \e ulMode parameter is the mode to use for this transfer task. It +//! must be one of \b UDMA_MODE_BASIC, \b UDMA_MODE_AUTO, +//! \b UDMA_MODE_MEM_SCATTER_GATHER, or \b UDMA_MODE_PER_SCATTER_GATHER. Note +//! that normally all tasks will be one of the scatter-gather modes while the +//! last task is a task list will be AUTO or BASIC. +//! +//! This macro is intended to be used to initialize individual entries of +//! a structure of tDMAControlTable type, like this: +//! +//! \verbatim +//! tDMAControlTable MyTaskList[] = +//! { +//! uDMATaskStructEntry(Task1Count, UDMA_SIZE_8, +//! UDMA_SRC_INC_8, MySourceBuf, +//! UDMA_DST_INC_8, MyDestBuf, +//! UDMA_ARB_8, UDMA_MODE_MEM_SCATTER_GATHER), +//! uDMATaskStructEntry(Task2Count, ... ), +//! } +//! \endverbatim +//! +//! \return Nothing; this is not a function. +// +//***************************************************************************** +#define uDMATaskStructEntry(ulTransferCount, \ + ulItemSize, \ + ulSrcIncrement, \ + pvSrcAddr, \ + ulDstIncrement, \ + pvDstAddr, \ + ulArbSize, \ + ulMode) \ + { \ + (((ulSrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ + ((void *)(&((unsigned char *)(pvSrcAddr))[((ulTransferCount) << \ + ((ulSrcIncrement) >> 26)) - 1]))), \ + (((ulDstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ + ((void *)(&((unsigned char *)(pvDstAddr))[((ulTransferCount) << \ + ((ulDstIncrement) >> 30)) - 1]))), \ + (ulSrcIncrement) | (ulDstIncrement) | (ulItemSize) | (ulArbSize) | \ + (((ulTransferCount) - 1) << 4) | \ + ((((ulMode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ + ((ulMode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ + (ulMode) | UDMA_MODE_ALT_SELECT : (ulMode)), 0 \ + } + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** + +//***************************************************************************** +// +// Flags that can be passed to uDMAChannelAttributeEnable(), +// uDMAChannelAttributeDisable(), and returned from uDMAChannelAttributeGet(). +// +//***************************************************************************** +#define UDMA_ATTR_USEBURST 0x00000001 +#define UDMA_ATTR_ALTSELECT 0x00000002 +#define UDMA_ATTR_HIGH_PRIORITY 0x00000004 +#define UDMA_ATTR_REQMASK 0x00000008 +#define UDMA_ATTR_ALL 0x0000000F + +//***************************************************************************** +// +// DMA control modes that can be passed to uDMAModeSet() and returned +// uDMAModeGet(). +// +//***************************************************************************** +#define UDMA_MODE_STOP 0x00000000 +#define UDMA_MODE_BASIC 0x00000001 +#define UDMA_MODE_AUTO 0x00000002 +#define UDMA_MODE_PINGPONG 0x00000003 +#define UDMA_MODE_MEM_SCATTER_GATHER \ + 0x00000004 +#define UDMA_MODE_PER_SCATTER_GATHER \ + 0x00000006 +#define UDMA_MODE_ALT_SELECT 0x00000001 + +//***************************************************************************** +// +// Channel configuration values that can be passed to uDMAControlSet(). +// +//***************************************************************************** +#define UDMA_DST_INC_8 0x00000000 +#define UDMA_DST_INC_16 0x40000000 +#define UDMA_DST_INC_32 0x80000000 +#define UDMA_DST_INC_NONE 0xc0000000 +#define UDMA_SRC_INC_8 0x00000000 +#define UDMA_SRC_INC_16 0x04000000 +#define UDMA_SRC_INC_32 0x08000000 +#define UDMA_SRC_INC_NONE 0x0c000000 +#define UDMA_SIZE_8 0x00000000 +#define UDMA_SIZE_16 0x11000000 +#define UDMA_SIZE_32 0x22000000 +#define UDMA_ARB_1 0x00000000 +#define UDMA_ARB_2 0x00004000 +#define UDMA_ARB_4 0x00008000 +#define UDMA_ARB_8 0x0000c000 +#define UDMA_ARB_16 0x00010000 +#define UDMA_ARB_32 0x00014000 +#define UDMA_ARB_64 0x00018000 +#define UDMA_ARB_128 0x0001c000 +#define UDMA_ARB_256 0x00020000 +#define UDMA_ARB_512 0x00024000 +#define UDMA_ARB_1024 0x00028000 +#define UDMA_NEXT_USEBURST 0x00000008 + +//***************************************************************************** +// +// Channel numbers to be passed to API functions that require a channel number +// ID. +// +//***************************************************************************** +#define UDMA_CHANNEL_USBEP1RX 0 +#define UDMA_CHANNEL_USBEP1TX 1 +#define UDMA_CHANNEL_USBEP2RX 2 +#define UDMA_CHANNEL_USBEP2TX 3 +#define UDMA_CHANNEL_USBEP3RX 4 +#define UDMA_CHANNEL_USBEP3TX 5 +#define UDMA_CHANNEL_ETH0RX 6 +#define UDMA_CHANNEL_ETH0TX 7 +#define UDMA_CHANNEL_UART0RX 8 +#define UDMA_CHANNEL_UART0TX 9 +#define UDMA_CHANNEL_SSI0RX 10 +#define UDMA_CHANNEL_SSI0TX 11 +#define UDMA_CHANNEL_ADC0 14 +#define UDMA_CHANNEL_ADC1 15 +#define UDMA_CHANNEL_ADC2 16 +#define UDMA_CHANNEL_ADC3 17 +#define UDMA_CHANNEL_TMR0A 18 +#define UDMA_CHANNEL_TMR0B 19 +#define UDMA_CHANNEL_TMR1A 20 +#define UDMA_CHANNEL_TMR1B 21 +#define UDMA_CHANNEL_UART1RX 22 +#define UDMA_CHANNEL_UART1TX 23 +#define UDMA_CHANNEL_SSI1RX 24 +#define UDMA_CHANNEL_SSI1TX 25 +#define UDMA_CHANNEL_I2S0RX 28 +#define UDMA_CHANNEL_I2S0TX 29 +#define UDMA_CHANNEL_SW 30 + +//***************************************************************************** +// +// Flags to be OR'd with the channel ID to indicate if the primary or alternate +// control structure should be used. +// +//***************************************************************************** +#define UDMA_PRI_SELECT 0x00000000 +#define UDMA_ALT_SELECT 0x00000020 + +//***************************************************************************** +// +// uDMA interrupt sources, to be passed to uDMAIntRegister() and +// uDMAIntUnregister(). +// +//***************************************************************************** +#define UDMA_INT_SW 62 +#define UDMA_INT_ERR 63 + +//***************************************************************************** +// +// Channel numbers to be passed to API functions that require a channel number +// ID. These are for secondary peripheral assignments. +// +//***************************************************************************** +#define UDMA_SEC_CHANNEL_UART2RX_0 \ + 0 +#define UDMA_SEC_CHANNEL_UART2TX_1 \ + 1 +#define UDMA_SEC_CHANNEL_TMR3A 2 +#define UDMA_SEC_CHANNEL_TMR3B 3 +#define UDMA_SEC_CHANNEL_TMR2A_4 \ + 4 +#define UDMA_SEC_CHANNEL_TMR2B_5 \ + 5 +#define UDMA_SEC_CHANNEL_TMR2A_6 \ + 6 +#define UDMA_SEC_CHANNEL_TMR2B_7 \ + 7 +#define UDMA_SEC_CHANNEL_UART1RX \ + 8 +#define UDMA_SEC_CHANNEL_UART1TX \ + 9 +#define UDMA_SEC_CHANNEL_SSI1RX 10 +#define UDMA_SEC_CHANNEL_SSI1TX 11 +#define UDMA_SEC_CHANNEL_UART2RX_12 \ + 12 +#define UDMA_SEC_CHANNEL_UART2TX_13 \ + 13 +#define UDMA_SEC_CHANNEL_TMR2A_14 \ + 14 +#define UDMA_SEC_CHANNEL_TMR2B_15 \ + 15 +#define UDMA_SEC_CHANNEL_TMR1A 18 +#define UDMA_SEC_CHANNEL_TMR1B 19 +#define UDMA_SEC_CHANNEL_EPI0RX 20 +#define UDMA_SEC_CHANNEL_EPI0TX 21 +#define UDMA_SEC_CHANNEL_ADC10 24 +#define UDMA_SEC_CHANNEL_ADC11 25 +#define UDMA_SEC_CHANNEL_ADC12 26 +#define UDMA_SEC_CHANNEL_ADC13 27 +#define UDMA_SEC_CHANNEL_SW 30 + +//***************************************************************************** +// +// uDMA default/secondary peripheral selections, to be passed to +// uDMAChannelSelectSecondary() and uDMAChannelSelectDefault(). +// +//***************************************************************************** +#define UDMA_DEF_USBEP1RX_SEC_UART2RX \ + 0x00000001 +#define UDMA_DEF_USBEP1TX_SEC_UART2TX \ + 0x00000002 +#define UDMA_DEF_USBEP2RX_SEC_TMR3A \ + 0x00000004 +#define UDMA_DEF_USBEP2TX_SEC_TMR3B \ + 0x00000008 +#define UDMA_DEF_USBEP3RX_SEC_TMR2A \ + 0x00000010 +#define UDMA_DEF_USBEP3TX_SEC_TMR2B \ + 0x00000020 +#define UDMA_DEF_ETH0RX_SEC_TMR2A \ + 0x00000040 +#define UDMA_DEF_ETH0TX_SEC_TMR2B \ + 0x00000080 +#define UDMA_DEF_UART0RX_SEC_UART1RX \ + 0x00000100 +#define UDMA_DEF_UART0TX_SEC_UART1TX \ + 0x00000200 +#define UDMA_DEF_SSI0RX_SEC_SSI1RX \ + 0x00000400 +#define UDMA_DEF_SSI0TX_SEC_SSI1TX \ + 0x00000800 +#define UDMA_DEF_RESERVED_SEC_UART2RX \ + 0x00001000 +#define UDMA_DEF_RESERVED_SEC_UART2TX \ + 0x00002000 +#define UDMA_DEF_ADC00_SEC_TMR2A \ + 0x00004000 +#define UDMA_DEF_ADC01_SEC_TMR2B \ + 0x00008000 +#define UDMA_DEF_ADC02_SEC_RESERVED \ + 0x00010000 +#define UDMA_DEF_ADC03_SEC_RESERVED \ + 0x00020000 +#define UDMA_DEF_TMR0A_SEC_TMR1A \ + 0x00040000 +#define UDMA_DEF_TMR0B_SEC_TMR1B \ + 0x00080000 +#define UDMA_DEF_TMR1A_SEC_EPI0RX \ + 0x00100000 +#define UDMA_DEF_TMR1B_SEC_EPI0TX \ + 0x00200000 +#define UDMA_DEF_UART1RX_SEC_RESERVED \ + 0x00400000 +#define UDMA_DEF_UART1TX_SEC_RESERVED \ + 0x00800000 +#define UDMA_DEF_SSI1RX_SEC_ADC10 \ + 0x01000000 +#define UDMA_DEF_SSI1TX_SEC_ADC11 \ + 0x02000000 +#define UDMA_DEF_RESERVED_SEC_ADC12 \ + 0x04000000 +#define UDMA_DEF_RESERVED_SEC_ADC13 \ + 0x08000000 +#define UDMA_DEF_I2S0RX_SEC_RESERVED \ + 0x10000000 +#define UDMA_DEF_I2S0TX_SEC_RESERVED \ + 0x20000000 + +//***************************************************************************** +// +// API Function prototypes +// +//***************************************************************************** +extern void uDMAEnable(void); +extern void uDMADisable(void); +extern unsigned long uDMAErrorStatusGet(void); +extern void uDMAErrorStatusClear(void); +extern void uDMAChannelEnable(unsigned long ulChannelNum); +extern void uDMAChannelDisable(unsigned long ulChannelNum); +extern tBoolean uDMAChannelIsEnabled(unsigned long ulChannelNum); +extern void uDMAControlBaseSet(void *pControlTable); +extern void *uDMAControlBaseGet(void); +extern void *uDMAControlAlternateBaseGet(void); +extern void uDMAChannelRequest(unsigned long ulChannelNum); +extern void uDMAChannelAttributeEnable(unsigned long ulChannelNum, + unsigned long ulAttr); +extern void uDMAChannelAttributeDisable(unsigned long ulChannelNum, + unsigned long ulAttr); +extern unsigned long uDMAChannelAttributeGet(unsigned long ulChannelNum); +extern void uDMAChannelControlSet(unsigned long ulChannelStructIndex, + unsigned long ulControl); +extern void uDMAChannelTransferSet(unsigned long ulChannelStructIndex, + unsigned long ulMode, void *pvSrcAddr, + void *pvDstAddr, + unsigned long ulTransferSize); +extern void uDMAChannelScatterGatherSet(unsigned long ulChannelNum, + unsigned ulTaskCount, void *pvTaskList, + unsigned long ulIsPeriphSG); +extern unsigned long uDMAChannelSizeGet(unsigned long ulChannelStructIndex); +extern unsigned long uDMAChannelModeGet(unsigned long ulChannelStructIndex); +extern void uDMAIntRegister(unsigned long ulIntChannel, + void (*pfnHandler)(void)); +extern void uDMAIntUnregister(unsigned long ulIntChannel); +extern void uDMAChannelSelectDefault(unsigned long ulDefPeriphs); +extern void uDMAChannelSelectSecondary(unsigned long ulSecPeriphs); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __UDMA_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.c new file mode 100644 index 00000000..e8511711 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.c @@ -0,0 +1,3871 @@ +//***************************************************************************** +// +// usb.c - Driver for the USB Interface. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup usb_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "inc/hw_usb.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/udma.h" +#include "driverlib/usb.h" + +//***************************************************************************** +// +// Amount to shift the RX interrupt sources by in the flags used in the +// interrupt calls. +// +//***************************************************************************** +#ifndef DEPRECATED +#define USB_INT_RX_SHIFT 8 +#endif +#define USB_INTEP_RX_SHIFT 16 + +//***************************************************************************** +// +// Amount to shift the status interrupt sources by in the flags used in the +// interrupt calls. +// +//***************************************************************************** +#ifndef DEPRECATED +#define USB_INT_STATUS_SHIFT 24 +#endif + +//***************************************************************************** +// +// Amount to shift the RX endpoint status sources by in the flags used in the +// calls. +// +//***************************************************************************** +#define USB_RX_EPSTATUS_SHIFT 16 + +//***************************************************************************** +// +// Converts from an endpoint specifier to the offset of the endpoint's +// control/status registers. +// +//***************************************************************************** +#define EP_OFFSET(Endpoint) (Endpoint - 0x10) + +//***************************************************************************** +// +// Sets one of the indexed registers. +// +// \param ulBase specifies the USB module base address. +// \param ulEndpoint is the endpoint index to target for this write. +// \param ulIndexedReg is the indexed register to write to. +// \param ucValue is the value to write to the register. +// +// This function is used to access the indexed registers for each endpoint. +// The only registers that are indexed are the FIFO configuration registers +// which are not used after configuration. +// +// \return None. +// +//***************************************************************************** +static void +USBIndexWrite(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulIndexedReg, unsigned long ulValue, + unsigned long ulSize) +{ + unsigned long ulIndex; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == 0) || (ulEndpoint == 1) || (ulEndpoint == 2) || + (ulEndpoint == 3)); + ASSERT((ulSize == 1) || (ulSize == 2)); + + // + // Save the old index in case it was in use. + // + ulIndex = HWREGB(ulBase + USB_O_EPIDX); + + // + // Set the index. + // + HWREGB(ulBase + USB_O_EPIDX) = ulEndpoint; + + // + // Determine the size of the register value. + // + if(ulSize == 1) + { + // + // Set the value. + // + HWREGB(ulBase + ulIndexedReg) = ulValue; + } + else + { + // + // Set the value. + // + HWREGH(ulBase + ulIndexedReg) = ulValue; + } + + // + // Restore the old index in case it was in use. + // + HWREGB(ulBase + USB_O_EPIDX) = ulIndex; +} + +//***************************************************************************** +// +// Reads one of the indexed registers. +// +// \param ulBase specifies the USB module base address. +// \param ulEndpoint is the endpoint index to target for this write. +// \param ulIndexedReg is the indexed register to write to. +// +// This function is used internally to access the indexed registers for each +// endpoint. The only registers that are indexed are the FIFO configuration +// registers which are not used after configuration. +// +// \return The value in the register requested. +// +//***************************************************************************** +static unsigned long +USBIndexRead(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulIndexedReg, unsigned long ulSize) +{ + unsigned char ulIndex; + unsigned char ulValue; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == 0) || (ulEndpoint == 1) || (ulEndpoint == 2) || + (ulEndpoint == 3)); + ASSERT((ulSize == 1) || (ulSize == 2)); + + // + // Save the old index in case it was in use. + // + ulIndex = HWREGB(ulBase + USB_O_EPIDX); + + // + // Set the index. + // + HWREGB(ulBase + USB_O_EPIDX) = ulEndpoint; + + // + // Determine the size of the register value. + // + if(ulSize == 1) + { + // + // Get the value. + // + ulValue = HWREGB(ulBase + ulIndexedReg); + } + else + { + // + // Get the value. + // + ulValue = HWREGH(ulBase + ulIndexedReg); + } + + // + // Restore the old index in case it was in use. + // + HWREGB(ulBase + USB_O_EPIDX) = ulIndex; + + // + // Return the register's value. + // + return(ulValue); +} + +//***************************************************************************** +// +//! Puts the USB bus in a suspended state. +//! +//! \param ulBase specifies the USB module base address. +//! +//! When used in host mode, this function will put the USB bus in the suspended +//! state. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostSuspend(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send the suspend signaling to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_SUSPEND; +} + +//***************************************************************************** +// +//! Handles the USB bus reset condition. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies whether to start or stop signaling reset on the USB +//! bus. +//! +//! When this function is called with the \e bStart parameter set to \b true, +//! this function will cause the start of a reset condition on the USB bus. +//! The caller should then delay at least 20ms before calling this function +//! again with the \e bStart parameter set to \b false. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostReset(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send a reset signal to the bus. + // + if(bStart) + { + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_RESET; + } + else + { + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_RESET; + } +} + +//***************************************************************************** +// +//! Handles the USB bus resume condition. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies if the USB controller is entering or leaving the +//! resume signaling state. +//! +//! When in device mode this function will bring the USB controller out of the +//! suspend state. This call should first be made with the \e bStart parameter +//! set to \b true to start resume signaling. The device application should +//! then delay at least 10ms but not more than 15ms before calling this +//! function with the \e bStart parameter set to \b false. +//! +//! When in host mode this function will signal devices to leave the suspend +//! state. This call should first be made with the \e bStart parameter set to +//! \b true to start resume signaling. The host application should then delay +//! at least 20ms before calling this function with the \e bStart parameter set +//! to \b false. This will cause the controller to complete the resume +//! signaling on the USB bus. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostResume(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Send a resume signal to the bus. + // + if(bStart) + { + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_RESUME; + } + else + { + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_RESUME; + } +} + +//***************************************************************************** +// +//! Returns the current speed of the USB device connected. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will return the current speed of the USB bus. +//! +//! \note This function should only be called in host mode. +//! +//! \return Returns either \b USB_LOW_SPEED, \b USB_FULL_SPEED, or +//! \b USB_UNDEF_SPEED. +// +//***************************************************************************** +unsigned long +USBHostSpeedGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // If the Full Speed device bit is set, then this is a full speed device. + // + if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_FSDEV) + { + return(USB_FULL_SPEED); + } + + // + // If the Low Speed device bit is set, then this is a low speed device. + // + if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_LSDEV) + { + return(USB_LOW_SPEED); + } + + // + // The device speed is not known. + // + return(USB_UNDEF_SPEED); +} + +//***************************************************************************** +// +//! Returns the status of the USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read the source of the interrupt for the USB controller. +//! There are three groups of interrupt sources, IN Endpoints, OUT Endpoints, +//! and general status changes. This call will return the current status for +//! all of these interrupts. The bit values returned should be compared +//! against the \b USB_HOST_IN, \b USB_HOST_OUT, \b USB_HOST_EP0, +//! \b USB_DEV_IN, \b USB_DEV_OUT, and \b USB_DEV_EP0 values. +//! +//! \note This call will clear the source of all of the general status +//! interrupts. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntStatusControl() or USBIntStatusEndpoint() should be +//! used instead. +//! +//! \return Returns the status of the sources for the USB controller's +//! interrupt. +// +//***************************************************************************** +#ifndef DEPRECATED +unsigned long +USBIntStatus(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the transmit interrupt status. + // + ulStatus = (HWREGB(ulBase + USB_O_TXIS)); + + // + // Get the receive interrupt status, these bits go into the second byte of + // the returned value. + // + ulStatus |= (HWREGB(ulBase + USB_O_RXIS) << USB_INT_RX_SHIFT); + + // + // Get the general interrupt status, these bits go into the upper 8 bits + // of the returned value. + // + ulStatus |= (HWREGB(ulBase + USB_O_IS) << USB_INT_STATUS_SHIFT); + + // + // Add the power fault status. + // + if(HWREG(ulBase + USB_O_EPCISC) & USB_EPCISC_PF) + { + // + // Indicate a power fault was detected. + // + ulStatus |= USB_INT_POWER_FAULT; + + // + // Clear the power fault interrupt. + // + HWREGB(ulBase + USB_O_EPCISC) |= USB_EPCISC_PF; + } + + if(HWREG(USB0_BASE + USB_O_IDVISC) & USB_IDVRIS_ID) + { + // + // Indicate a id detection was detected. + // + ulStatus |= USB_INT_MODE_DETECT; + + // + // Clear the id detection interrupt. + // + HWREG(USB0_BASE + USB_O_IDVISC) |= USB_IDVRIS_ID; + } + + // + // Return the combined interrupt status. + // + return(ulStatus); +} +#endif + +//***************************************************************************** +// +//! Disables the sources for USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which interrupts to disable. +//! +//! This function will disable the USB controller from generating the +//! interrupts indicated by the \e ulFlags parameter. There are three groups +//! of interrupt sources, IN Endpoints, OUT Endpoints, and general status +//! changes, specified by \b USB_INT_HOST_IN, \b USB_INT_HOST_OUT, +//! \b USB_INT_DEV_IN, \b USB_INT_DEV_OUT, and \b USB_INT_STATUS. If +//! \b USB_INT_ALL is specified then all interrupts will be disabled. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntDisableControl() or USBIntDisableEndpoint() should be +//! used instead. +//! +//! \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +USBIntDisable(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_INT_ALL)) == 0); + + // + // If any transmit interrupts were disabled then write the transmit + // interrupt settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)) + { + HWREGH(ulBase + USB_O_TXIE) &= + ~(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)); + } + + // + // If any receive interrupts were disabled then write the receive interrupt + // settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) + { + HWREGH(ulBase + USB_O_RXIE) &= + ~((ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) >> + USB_INT_RX_SHIFT); + } + + // + // If any general interrupts were disabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INT_STATUS) + { + HWREGB(ulBase + USB_O_IE) &= + ~((ulFlags & USB_INT_STATUS) >> USB_INT_STATUS_SHIFT); + } + + // + // Disable the power fault interrupt. + // + if(ulFlags & USB_INT_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = 0; + } + + // + // Disable the ID pin detect interrupt. + // + if(ulFlags & USB_INT_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = 0; + } +} +#endif + +//***************************************************************************** +// +//! Enables the sources for USB interrupts. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which interrupts to enable. +//! +//! This function will enable the USB controller's ability to generate the +//! interrupts indicated by the \e ulFlags parameter. There are three +//! groups of interrupt sources, IN Endpoints, OUT Endpoints, and +//! general status changes, specified by \b USB_INT_HOST_IN, +//! \b USB_INT_HOST_OUT, \b USB_INT_DEV_IN, \b USB_INT_DEV_OUT, and +//! \b USB_STATUS. If \b USB_INT_ALL is specified then all interrupts will be +//! enabled. +//! +//! \note A call must be made to enable the interrupt in the main interrupt +//! controller to receive interrupts. The USBIntRegister() API performs this +//! controller level interrupt enable. However if static interrupt handlers +//! are used then then a call to IntEnable() must be made in order to allow any +//! USB interrupts to occur. +//! +//! \note WARNING: This API cannot be used on endpoint numbers greater than +//! endpoint 3 so USBIntEnableControl() or USBIntEnableEndpoint() should be +//! used instead. +//! +//! \return None. +// +//***************************************************************************** +#ifndef DEPRECATED +void +USBIntEnable(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & (~USB_INT_ALL)) == 0); + + // + // If any transmit interrupts were enabled then write the transmit + // interrupt settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0)) + { + HWREGH(ulBase + USB_O_TXIE) |= + ulFlags & (USB_INT_HOST_OUT | USB_INT_DEV_IN | USB_INT_EP0); + } + + // + // If any receive interrupts were enabled then write the receive interrupt + // settings out to the hardware. + // + if(ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) + { + HWREGH(ulBase + USB_O_RXIE) |= + ((ulFlags & (USB_INT_HOST_IN | USB_INT_DEV_OUT)) >> + USB_INT_RX_SHIFT); + } + + // + // If any general interrupts were enabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INT_STATUS) + { + HWREGB(ulBase + USB_O_IE) |= + (ulFlags & USB_INT_STATUS) >> USB_INT_STATUS_SHIFT; + } + + // + // Enable the power fault interrupt. + // + if(ulFlags & USB_INT_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = USB_EPCIM_PF; + } + + // + // Enable the ID pin detect interrupt. + // + if(ulFlags & USB_INT_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = USB_IDVIM_ID; + } +} +#endif + +//***************************************************************************** +// +//! Disable control interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which control interrupts to disable. +//! +//! This function will disable the control interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which control interrupts to disable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTCTRL_* and +//! not any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntDisableControl(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_INTCTRL_ALL)) == 0); + + // + // If any general interrupts were disabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INTCTRL_STATUS) + { + HWREGB(ulBase + USB_O_IE) &= ~(ulFlags & USB_INTCTRL_STATUS); + } + + // + // Disable the power fault interrupt. + // + if(ulFlags & USB_INTCTRL_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = 0; + } + + // + // Disable the ID pin detect interrupt. + // + if(ulFlags & USB_INTCTRL_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = 0; + } +} + +//***************************************************************************** +// +//! Enable control interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which control interrupts to enable. +//! +//! This function will enable the control interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which control interrupts to enable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTCTRL_* and +//! not any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntEnableControl(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & (~USB_INTCTRL_ALL)) == 0); + + // + // If any general interrupts were enabled then write the general interrupt + // settings out to the hardware. + // + if(ulFlags & USB_INTCTRL_STATUS) + { + HWREGB(ulBase + USB_O_IE) |= ulFlags; + } + + // + // Enable the power fault interrupt. + // + if(ulFlags & USB_INTCTRL_POWER_FAULT) + { + HWREG(ulBase + USB_O_EPCIM) = USB_EPCIM_PF; + } + + // + // Enable the ID pin detect interrupt. + // + if(ulFlags & USB_INTCTRL_MODE_DETECT) + { + HWREG(USB0_BASE + USB_O_IDVIM) = USB_IDVIM_ID; + } +} + +//***************************************************************************** +// +//! Returns the control interrupt status on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read control interrupt status for a USB controller. +//! This call will return the current status for control interrupts only, the +//! endpoint interrupt status is retrieved by calling USBIntStatusEndpoint(). +//! The bit values returned should be compared against the \b USB_INTCTRL_* +//! values. +//! +//! The following are the meanings of all \b USB_INCTRL_ flags and the modes +//! for which they are valid. These values apply to any calls to +//! USBIntStatusControl(), USBIntEnableControl(), and USBIntDisableConrol(). +//! Some of these flags are only valid in the following modes as indicated in +//! the parenthesis: Host, Device, and OTG. +//! +//! - \b USB_INTCTRL_ALL - A full mask of all control interrupt sources. +//! - \b USB_INTCTRL_VBUS_ERR - A VBUS error has occurred (Host Only). +//! - \b USB_INTCTRL_SESSION - Session Start Detected on A-side of cable +//! (OTG Only). +//! - \b USB_INTCTRL_SESSION_END - Session End Detected (Device Only) +//! - \b USB_INTCTRL_DISCONNECT - Device Disconnect Detected (Host Only) +//! - \b USB_INTCTRL_CONNECT - Device Connect Detected (Host Only) +//! - \b USB_INTCTRL_SOF - Start of Frame Detected. +//! - \b USB_INTCTRL_BABBLE - USB controller detected a device signaling past +//! the end of a frame. (Host Only) +//! - \b USB_INTCTRL_RESET - Reset signaling detected by device. (Device Only) +//! - \b USB_INTCTRL_RESUME - Resume signaling detected. +//! - \b USB_INTCTRL_SUSPEND - Suspend signaling detected by device (Device +//! Only) +//! - \b USB_INTCTRL_MODE_DETECT - OTG cable mode detection has completed +//! (OTG Only) +//! - \b USB_INTCTRL_POWER_FAULT - Power Fault detected. (Host Only) +//! +//! \note This call will clear the source of all of the control status +//! interrupts. +//! +//! \return Returns the status of the control interrupts for a USB controller. +// +//***************************************************************************** +unsigned long +USBIntStatusControl(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the general interrupt status, these bits go into the upper 8 bits + // of the returned value. + // + ulStatus = HWREGB(ulBase + USB_O_IS); + + // + // Add the power fault status. + // + if(HWREG(ulBase + USB_O_EPCISC) & USB_EPCISC_PF) + { + // + // Indicate a power fault was detected. + // + ulStatus |= USB_INTCTRL_POWER_FAULT; + + // + // Clear the power fault interrupt. + // + HWREGB(ulBase + USB_O_EPCISC) |= USB_EPCISC_PF; + } + + if(HWREG(USB0_BASE + USB_O_IDVISC) & USB_IDVRIS_ID) + { + // + // Indicate a id detection was detected. + // + ulStatus |= USB_INTCTRL_MODE_DETECT; + + // + // Clear the id detection interrupt. + // + HWREG(USB0_BASE + USB_O_IDVISC) |= USB_IDVRIS_ID; + } + + // + // Return the combined interrupt status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Disable endpoint interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which endpoint interrupts to disable. +//! +//! This function will disable endpoint interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which endpoint interrupts to disable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTEP_* and not +//! any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntDisableEndpoint(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // If any transmit interrupts were disabled then write the transmit + // interrupt settings out to the hardware. + // + HWREGH(ulBase + USB_O_TXIE) &= + ~(ulFlags & (USB_INTEP_HOST_OUT | USB_INTEP_DEV_IN | USB_INTEP_0)); + + // + // If any receive interrupts were disabled then write the receive interrupt + // settings out to the hardware. + // + HWREGH(ulBase + USB_O_RXIE) &= + ~((ulFlags & (USB_INTEP_HOST_IN | USB_INTEP_DEV_OUT)) >> + USB_INTEP_RX_SHIFT); +} + +//***************************************************************************** +// +//! Enable endpoint interrupts on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies which endpoint interrupts to enable. +//! +//! This function will enable endpoint interrupts for the USB controller +//! specified by the \e ulBase parameter. The \e ulFlags parameter specifies +//! which endpoint interrupts to enable. The flags passed in the \e ulFlags +//! parameters should be the definitions that start with \b USB_INTEP_* and not +//! any other \b USB_INT flags. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntEnableEndpoint(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable any transmit endpoint interrupts. + // + HWREGH(ulBase + USB_O_TXIE) |= + ulFlags & (USB_INTEP_HOST_OUT | USB_INTEP_DEV_IN | USB_INTEP_0); + + // + // Enable any receive endpoint interrupts. + // + HWREGH(ulBase + USB_O_RXIE) |= + ((ulFlags & (USB_INTEP_HOST_IN | USB_INTEP_DEV_OUT)) >> + USB_INTEP_RX_SHIFT); +} + +//***************************************************************************** +// +//! Returns the endpoint interrupt status on a given USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will read endpoint interrupt status for a USB controller. +//! This call will return the current status for endpoint interrupts only, the +//! control interrupt status is retrieved by calling USBIntStatusControl(). +//! The bit values returned should be compared against the \b USB_INTEP_* +//! values. These are grouped into classes for \b USB_INTEP_HOST_* and +//! \b USB_INTEP_DEV_* values to handle both host and device modes with all +//! endpoints. +//! +//! \note This call will clear the source of all of the endpoint interrupts. +//! +//! \return Returns the status of the endpoint interrupts for a USB controller. +// +//***************************************************************************** +unsigned long +USBIntStatusEndpoint(unsigned long ulBase) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Get the transmit interrupt status. + // + ulStatus = HWREGH(ulBase + USB_O_TXIS); + + ulStatus |= (HWREGH(ulBase + USB_O_RXIS) << USB_INTEP_RX_SHIFT); + + // + // Return the combined interrupt status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for the USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! \param pfnHandler is a pointer to the function to be called when a USB +//! interrupt occurs. +//! +//! This sets the handler to be called when a USB interrupt occurs. This will +//! also enable the global USB interrupt in the interrupt controller. The +//! specific desired USB interrupts must be enabled via a separate call to +//! USBIntEnable(). It is the interrupt handler's responsibility to clear the +//! interrupt sources via a calls to USBIntStatusControl() and +//! USBIntStatusEndpoint(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntRegister(unsigned long ulBase, void(*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Register the interrupt handler. + // + IntRegister(INT_USB0, pfnHandler); + + // + // Enable the USB interrupt. + // + IntEnable(INT_USB0); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the USB controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function unregister the interrupt handler. This function will also +//! disable the USB interrupt in the interrupt controller. +//! +//! \sa IntRegister() for important information about registering or +//! unregistering interrupt handlers. +//! +//! \return None. +// +//***************************************************************************** +void +USBIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_USB0); + + // + // Disable the CAN interrupt. + // + IntDisable(INT_USB0); +} + +//***************************************************************************** +// +//! Returns the current status of an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will return the status of a given endpoint. If any of these +//! status bits need to be cleared, then these these values must be cleared by +//! calling the USBDevEndpointStatusClear() or USBHostEndpointStatusClear() +//! functions. +//! +//! The following are the status flags for host mode: +//! +//! - \b USB_HOST_IN_PID_ERROR - PID error on the given endpoint. +//! - \b USB_HOST_IN_NOT_COMP - The device failed to respond to an IN request. +//! - \b USB_HOST_IN_STALL - A stall was received on an IN endpoint. +//! - \b USB_HOST_IN_DATA_ERROR - There was a CRC or bit-stuff error on an IN +//! endpoint in Isochronous mode. +//! - \b USB_HOST_IN_NAK_TO - NAKs received on this IN endpoint for more than +//! the specified timeout period. +//! - \b USB_HOST_IN_ERROR - Failed to communicate with a device using this IN +//! endpoint. +//! - \b USB_HOST_IN_FIFO_FULL - This IN endpoint's FIFO is full. +//! - \b USB_HOST_IN_PKTRDY - Data packet ready on this IN endpoint. +//! - \b USB_HOST_OUT_NAK_TO - NAKs received on this OUT endpoint for more than +//! the specified timeout period. +//! - \b USB_HOST_OUT_NOT_COMP - The device failed to respond to an OUT +//! request. +//! - \b USB_HOST_OUT_STALL - A stall was received on this OUT endpoint. +//! - \b USB_HOST_OUT_ERROR - Failed to communicate with a device using this +//! OUT endpoint. +//! - \b USB_HOST_OUT_FIFO_NE - This endpoint's OUT FIFO is not empty. +//! - \b USB_HOST_OUT_PKTPEND - The data transfer on this OUT endpoint has not +//! completed. +//! - \b USB_HOST_EP0_NAK_TO - NAKs received on endpoint zero for more than the +//! specified timeout period. +//! - \b USB_HOST_EP0_ERROR - The device failed to respond to a request on +//! endpoint zero. +//! - \b USB_HOST_EP0_IN_STALL - A stall was received on endpoint zero for an +//! IN transaction. +//! - \b USB_HOST_EP0_IN_PKTRDY - Data packet ready on endpoint zero for an IN +//! transaction. +//! +//! The following are the status flags for device mode: +//! +//! - \b USB_DEV_OUT_SENT_STALL - A stall was sent on this OUT endpoint. +//! - \b USB_DEV_OUT_DATA_ERROR - There was a CRC or bit-stuff error on an OUT +//! endpoint. +//! - \b USB_DEV_OUT_OVERRUN - An OUT packet was not loaded due to a full FIFO. +//! - \b USB_DEV_OUT_FIFO_FULL - The OUT endpoint's FIFO is full. +//! - \b USB_DEV_OUT_PKTRDY - There is a data packet ready in the OUT +//! endpoint's FIFO. +//! - \b USB_DEV_IN_NOT_COMP - A larger packet was split up, more data to come. +//! - \b USB_DEV_IN_SENT_STALL - A stall was sent on this IN endpoint. +//! - \b USB_DEV_IN_UNDERRUN - Data was requested on the IN endpoint and no +//! data was ready. +//! - \b USB_DEV_IN_FIFO_NE - The IN endpoint's FIFO is not empty. +//! - \b USB_DEV_IN_PKTPEND - The data transfer on this IN endpoint has not +//! completed. +//! - \b USB_DEV_EP0_SETUP_END - A control transaction ended before Data End +//! condition was sent. +//! - \b USB_DEV_EP0_SENT_STALL - A stall was sent on endpoint zero. +//! - \b USB_DEV_EP0_IN_PKTPEND - The data transfer on endpoint zero has not +//! completed. +//! - \b USB_DEV_EP0_OUT_PKTRDY - There is a data packet ready in endpoint +//! zero's OUT FIFO. +//! +//! \return The current status flags for the endpoint depending on mode. +// +//***************************************************************************** +unsigned long +USBEndpointStatus(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulStatus; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the TX portion of the endpoint status. + // + ulStatus = HWREGH(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRL1); + + // + // Get the RX portion of the endpoint status. + // + ulStatus |= ((HWREGH(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRL1)) << + USB_RX_EPSTATUS_SHIFT); + + // + // Return the endpoint status. + // + return(ulStatus); +} + +//***************************************************************************** +// +//! Clears the status bits in this endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags are the status bits that will be cleared. +//! +//! This function will clear the status of any bits that are passed in the +//! \e ulFlags parameter. The \e ulFlags parameter can take the value returned +//! from the USBEndpointStatus() call. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointStatusClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Clear the specified flags for the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~ulFlags; + } + else + { + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= ~ulFlags; + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(ulFlags >> USB_RX_EPSTATUS_SHIFT); + } +} + +//***************************************************************************** +// +//! Clears the status bits in this endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags are the status bits that will be cleared. +//! +//! This function will clear the status of any bits that are passed in the +//! \e ulFlags parameter. The \e ulFlags parameter can take the value returned +//! from the USBEndpointStatus() call. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStatusClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // If this is endpoint 0 then the bits have different meaning and map into + // the TX memory location. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the Serviced RxPktRdy bit to clear the RxPktRdy. + // + if(ulFlags & USB_DEV_EP0_OUT_PKTRDY) + { + HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_RXRDYC; + } + + // + // Set the serviced Setup End bit to clear the SetupEnd status. + // + if(ulFlags & USB_DEV_EP0_SETUP_END) + { + HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_SETENDC; + } + + // + // Clear the Sent Stall status flag. + // + if(ulFlags & USB_DEV_EP0_SENT_STALL) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~(USB_DEV_EP0_SENT_STALL); + } + } + else + { + // + // Clear out any TX flags that were passed in. Only + // USB_DEV_TX_SENT_STALL and USB_DEV_TX_UNDERRUN should be cleared. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(ulFlags & (USB_DEV_TX_SENT_STALL | USB_DEV_TX_UNDERRUN)); + + // + // Clear out valid RX flags that were passed in. Only + // USB_DEV_RX_SENT_STALL, USB_DEV_RX_DATA_ERROR, and USB_DEV_RX_OVERRUN + // should be cleared. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~((ulFlags & (USB_DEV_RX_SENT_STALL | USB_DEV_RX_DATA_ERROR | + USB_DEV_RX_OVERRUN)) >> USB_RX_EPSTATUS_SHIFT); + } +} + +//***************************************************************************** +// +//! Sets the value data toggle on an endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to reset the data toggle. +//! \param bDataToggle specifies whether to set the state to DATA0 or DATA1. +//! \param ulFlags specifies whether to set the IN or OUT endpoint. +//! +//! This function is used to force the state of the data toggle in host mode. +//! If the value passed in the \e bDataToggle parameter is \b false, then the +//! data toggle will be set to the DATA0 state, and if it is \b true it will be +//! set to the DATA1 state. The \e ulFlags parameter can be \b USB_EP_HOST_IN +//! or \b USB_EP_HOST_OUT to access the desired portion of this endpoint. The +//! \e ulFlags parameter is ignored for endpoint zero. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointDataToggle(unsigned long ulBase, unsigned long ulEndpoint, + tBoolean bDataToggle, unsigned long ulFlags) +{ + unsigned long ulDataToggle; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // The data toggle defaults to DATA0. + // + ulDataToggle = 0; + + // + // See if the data toggle should be set to DATA1. + // + if(bDataToggle) + { + // + // Select the data toggle bit based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulDataToggle = USB_CSRH0_DT; + } + else if(ulFlags == USB_EP_HOST_IN) + { + ulDataToggle = USB_RXCSRH1_DT; + } + else + { + ulDataToggle = USB_TXCSRH1_DT; + } + } + + // + // Set the data toggle based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the write enable and the bit value for endpoint zero. + // + HWREGB(ulBase + USB_O_CSRH0) = + ((HWREGB(ulBase + USB_O_CSRH0) & + ~(USB_CSRH0_DTWE | USB_CSRH0_DT)) | + (ulDataToggle | USB_CSRH0_DTWE)); + } + else if(ulFlags == USB_EP_HOST_IN) + { + // + // Set the Write enable and the bit value for an IN endpoint. + // + HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) = + ((HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) & + ~(USB_RXCSRH1_DTWE | USB_RXCSRH1_DT)) | + (ulDataToggle | USB_RXCSRH1_DTWE)); + } + else + { + // + // Set the Write enable and the bit value for an OUT endpoint. + // + HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) = + ((HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) & + ~(USB_TXCSRH1_DTWE | USB_TXCSRH1_DT)) | + (ulDataToggle | USB_TXCSRH1_DTWE)); + } +} + +//***************************************************************************** +// +//! Sets the Data toggle on an endpoint to zero. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to reset the data toggle. +//! \param ulFlags specifies whether to access the IN or OUT endpoint. +//! +//! This function will cause the controller to clear the data toggle for an +//! endpoint. This call is not valid for endpoint zero and can be made with +//! host or device controllers. +//! +//! The \e ulFlags parameter should be one of \b USB_EP_HOST_OUT, +//! \b USB_EP_HOST_IN, \b USB_EP_DEV_OUT, or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDataToggleClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive data toggle should be cleared. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_CLRDT; + } + else + { + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Stalls the specified endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies the endpoint to stall. +//! \param ulFlags specifies whether to stall the IN or OUT endpoint. +//! +//! This function will cause to endpoint number passed in to go into a stall +//! condition. If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall +//! will be issued on the IN portion of this endpoint. If the \e ulFlags +//! parameter is \b USB_EP_DEV_OUT then the stall will be issued on the OUT +//! portion of this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStall(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0) + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Determine how to stall this endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Perform a stall on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) |= + (USB_CSRL0_STALL | USB_CSRL0_RXRDYC); + } + else if(ulFlags == USB_EP_DEV_IN) + { + // + // Perform a stall on an IN endpoint. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_STALL; + } + else + { + // + // Perform a stall on an OUT endpoint. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_STALL; + } +} + +//***************************************************************************** +// +//! Clears the stall condition on the specified endpoint in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint to remove the stall condition. +//! \param ulFlags specifies whether to remove the stall condition from the IN +//! or the OUT portion of this endpoint. +//! +//! This function will cause the endpoint number passed in to exit the stall +//! condition. If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall +//! will be cleared on the IN portion of this endpoint. If the \e ulFlags +//! parameter is \b USB_EP_DEV_OUT then the stall will be cleared on the OUT +//! portion of this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointStallClear(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0) + + // + // Determine how to clear the stall on this endpoint. + // + if(ulEndpoint == USB_EP_0) + { + // + // Clear the stall on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) &= ~USB_CSRL0_STALLED; + } + else if(ulFlags == USB_EP_DEV_IN) + { + // + // Clear the stall on an IN endpoint. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_TXCSRL1_STALL | USB_TXCSRL1_STALLED); + + // + // Reset the data toggle. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_CLRDT; + } + else + { + // + // Clear the stall on an OUT endpoint. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_STALL | USB_RXCSRL1_STALLED); + + // + // Reset the data toggle. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Connects the USB controller to the bus in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will cause the soft connect feature of the USB controller to +//! be enabled. Call USBDisconnect() to remove the USB device from the bus. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevConnect(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable connection to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_SOFTCONN; +} + +//***************************************************************************** +// +//! Removes the USB controller from the bus in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will cause the soft connect feature of the USB controller to +//! remove the device from the USB bus. A call to USBDevConnect() is needed to +//! reconnect to the bus. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevDisconnect(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Disable connection to the USB bus. + // + HWREGB(ulBase + USB_O_POWER) &= (~USB_POWER_SOFTCONN); +} + +//***************************************************************************** +// +//! Sets the address in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulAddress is the address to use for a device. +//! +//! This function will set the device address on the USB bus. This address was +//! likely received via a SET ADDRESS command from the host controller. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevAddrSet(unsigned long ulBase, unsigned long ulAddress) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the function address in the correct location. + // + HWREGB(ulBase + USB_O_FADDR) = (unsigned char)ulAddress; +} + +//***************************************************************************** +// +//! Returns the current device address in device mode. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will return the current device address. This address was set +//! by a call to USBDevAddrSet(). +//! +//! \note This function should only be called in device mode. +//! +//! \return The current device address. +// +//***************************************************************************** +unsigned long +USBDevAddrGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Return the function address. + // + return(HWREGB(ulBase + USB_O_FADDR)); +} + +//***************************************************************************** +// +//! Sets the base configuration for a host endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulMaxPayload is the maximum payload for this endpoint. +//! \param ulNAKPollInterval is the either the NAK timeout limit or the polling +//! interval depending on the type of endpoint. +//! \param ulTargetEndpoint is the endpoint that the host endpoint is +//! targeting. +//! \param ulFlags are used to configure other endpoint settings. +//! +//! This function will set the basic configuration for the transmit or receive +//! portion of an endpoint in host mode. The \e ulFlags parameter determines +//! some of the configuration while the other parameters provide the rest. The +//! \e ulFlags parameter determines whether this is an IN endpoint +//! (USB_EP_HOST_IN or USB_EP_DEV_IN) or an OUT endpoint (USB_EP_HOST_OUT or +//! USB_EP_DEV_OUT), whether this is a Full speed endpoint (USB_EP_SPEED_FULL) +//! or a Low speed endpoint (USB_EP_SPEED_LOW). +//! +//! The \b USB_EP_MODE_ flags control the type of the endpoint. +//! - \b USB_EP_MODE_CTRL is a control endpoint. +//! - \b USB_EP_MODE_ISOC is an isochronous endpoint. +//! - \b USB_EP_MODE_BULK is a bulk endpoint. +//! - \b USB_EP_MODE_INT is an interrupt endpoint. +//! +//! The \e ulNAKPollInterval parameter has different meanings based on the +//! \b USB_EP_MODE value and whether or not this call is being made for +//! endpoint zero or another endpoint. For endpoint zero or any Bulk +//! endpoints, this value always indicates the number of frames to allow a +//! device to NAK before considering it a timeout. If this endpoint is an +//! isochronous or interrupt endpoint, this value is the polling interval for +//! this endpoint. +//! +//! For interrupt endpoints the polling interval is simply the number of +//! frames between polling an interrupt endpoint. For isochronous endpoints +//! this value represents a polling interval of 2 ^ (\e ulNAKPollInterval - 1) +//! frames. When used as a NAK timeout, the \e ulNAKPollInterval value +//! specifies 2 ^ (\e ulNAKPollInterval - 1) frames before issuing a time out. +//! There are two special time out values that can be specified when setting +//! the \e ulNAKPollInterval value. The first is \b MAX_NAK_LIMIT which is the +//! maximum value that can be passed in this variable. The other is +//! \b DISABLE_NAK_LIMIT which indicates that there should be no limit on the +//! number of NAKs. +//! +//! The \b USB_EP_DMA_MODE_ flags enables the type of DMA used to access the +//! endpoint's data FIFOs. The choice of the DMA mode depends on how the DMA +//! controller is configured and how it is being used. See the ``Using USB +//! with the uDMA Controller'' section for more information on DMA +//! configuration. +//! +//! When configuring the OUT portion of an endpoint, the \b USB_EP_AUTO_SET bit +//! is specified to cause the transmission of data on the USB bus to start +//! as soon as the number of bytes specified by \e ulMaxPayload have been +//! written into the OUT FIFO for this endpoint. +//! +//! When configuring the IN portion of an endpoint, the \b USB_EP_AUTO_REQUEST +//! bit can be specified to trigger the request for more data once the FIFO has +//! been drained enough to fit \e ulMaxPayload bytes. The \b USB_EP_AUTO_CLEAR +//! bit can be used to clear the data packet ready flag automatically once the +//! data has been read from the FIFO. If this is not used, this flag must be +//! manually cleared via a call to USBDevEndpointStatusClear() or +//! USBHostEndpointStatusClear(). +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointConfig(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulMaxPayload, + unsigned long ulNAKPollInterval, + unsigned long ulTargetEndpoint, unsigned long ulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + ASSERT(ulNAKPollInterval <= MAX_NAK_LIMIT); + + // + // Endpoint zero is configured differently than the other endpoints, so see + // if this is endpoint zero. + // + if(ulEndpoint == USB_EP_0) + { + // + // Set the NAK timeout. + // + HWREGB(ulBase + USB_O_NAKLMT) = ulNAKPollInterval; + + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TYPE0) = + ((ulFlags & USB_EP_SPEED_FULL) ? USB_TYPE0_SPEED_FULL : + USB_TYPE0_SPEED_LOW); + } + else + { + // + // Start with the target endpoint. + // + ulRegister = ulTargetEndpoint; + + // + // Set the speed for the device using this endpoint. + // + if(ulFlags & USB_EP_SPEED_FULL) + { + ulRegister |= USB_TXTYPE1_SPEED_FULL; + } + else + { + ulRegister |= USB_TXTYPE1_SPEED_LOW; + } + + // + // Set the protocol for the device using this endpoint. + // + switch(ulFlags & USB_EP_MODE_MASK) + { + // + // The bulk protocol is being used. + // + case USB_EP_MODE_BULK: + { + ulRegister |= USB_TXTYPE1_PROTO_BULK; + break; + } + + // + // The isochronous protocol is being used. + // + case USB_EP_MODE_ISOC: + { + ulRegister |= USB_TXTYPE1_PROTO_ISOC; + break; + } + + // + // The interrupt protocol is being used. + // + case USB_EP_MODE_INT: + { + ulRegister |= USB_TXTYPE1_PROTO_INT; + break; + } + + // + // The control protocol is being used. + // + case USB_EP_MODE_CTRL: + { + ulRegister |= USB_TXTYPE1_PROTO_CTRL; + break; + } + } + + // + // See if the transmit or receive endpoint is being configured. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXTYPE1) = + ulRegister; + + // + // Set the NAK timeout or polling interval. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXINTERVAL1) = + ulNAKPollInterval; + + // + // Set the Maximum Payload per transaction. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXMAXP1) = + ulMaxPayload; + + // + // Set the transmit control value to zero. + // + ulRegister = 0; + + // + // Allow auto setting of TxPktRdy when max packet size has been + // loaded into the FIFO. + // + if(ulFlags & USB_EP_AUTO_SET) + { + ulRegister |= USB_TXCSRH1_AUTOSET; + } + + // + // Configure the DMA Mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_TXCSRH1_DMAEN | USB_TXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_TXCSRH1_DMAEN; + } + + // + // Write out the transmit control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) = + (unsigned char)ulRegister; + } + else + { + // + // Set the transfer type information. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXTYPE1) = + ulRegister; + + // + // Set the NAK timeout or polling interval. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXINTERVAL1) = + ulNAKPollInterval; + + // + // Set the receive control value to zero. + // + ulRegister = 0; + + // + // Allow auto clearing of RxPktRdy when packet of size max packet + // has been unloaded from the FIFO. + // + if(ulFlags & USB_EP_AUTO_CLEAR) + { + ulRegister |= USB_RXCSRH1_AUTOCL; + } + + // + // Configure the DMA Mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_RXCSRH1_DMAEN | USB_RXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_RXCSRH1_DMAEN; + } + + // + // Write out the receive control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) = + (unsigned char)ulRegister; + } + } +} + +//***************************************************************************** +// +//! Sets the configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulMaxPacketSize is the maximum packet size for this endpoint. +//! \param ulFlags are used to configure other endpoint settings. +//! +//! This function will set the basic configuration for an endpoint in device +//! mode. Endpoint zero does not have a dynamic configuration, so this +//! function should not be called for endpoint zero. The \e ulFlags parameter +//! determines some of the configuration while the other parameters provide the +//! rest. +//! +//! The \b USB_EP_MODE_ flags define what the type is for the given endpoint. +//! +//! - \b USB_EP_MODE_CTRL is a control endpoint. +//! - \b USB_EP_MODE_ISOC is an isochronous endpoint. +//! - \b USB_EP_MODE_BULK is a bulk endpoint. +//! - \b USB_EP_MODE_INT is an interrupt endpoint. +//! +//! The \b USB_EP_DMA_MODE_ flags determines the type of DMA access to the +//! endpoint data FIFOs. The choice of the DMA mode depends on how the DMA +//! controller is configured and how it is being used. See the ``Using USB +//! with the uDMA Controller'' section for more information on DMA +//! configuration. +//! +//! When configuring an IN endpoint, the \b USB_EP_AUTO_SET bit can be +//! specified to cause the automatic transmission of data on the USB bus as +//! soon as \e ulMaxPacketSize bytes of data are written into the FIFO for +//! this endpoint. This is commonly used with DMA as no interaction is +//! required to start the transmission of data. +//! +//! When configuring an OUT endpoint, the \b USB_EP_AUTO_REQUEST bit is +//! specified to trigger the request for more data once the FIFO has been +//! drained enough to receive \e ulMaxPacketSize more bytes of data. Also for +//! OUT endpoints, the \b USB_EP_AUTO_CLEAR bit can be used to clear the data +//! packet ready flag automatically once the data has been read from the FIFO. +//! If this is not used, this flag must be manually cleared via a call to +//! USBDevEndpointStatusClear(). Both of these settings can be used to remove +//! the need for extra calls when using the controller in DMA mode. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, unsigned long ulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // Determine if a transmit or receive endpoint is being configured. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Set the maximum packet size. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXMAXP1) = + ulMaxPacketSize; + + // + // The transmit control value is zero unless options are enabled. + // + ulRegister = 0; + + // + // Allow auto setting of TxPktRdy when max packet size has been loaded + // into the FIFO. + // + if(ulFlags & USB_EP_AUTO_SET) + { + ulRegister |= USB_TXCSRH1_AUTOSET; + } + + // + // Configure the DMA mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_TXCSRH1_DMAEN | USB_TXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_TXCSRH1_DMAEN; + } + + // + // Enable isochronous mode if requested. + // + if((ulFlags & USB_EP_MODE_MASK) == USB_EP_MODE_ISOC) + { + ulRegister |= USB_TXCSRH1_ISO; + } + + // + // Write the transmit control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) = + (unsigned char)ulRegister; + + // + // Reset the Data toggle to zero. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRL1) = + USB_TXCSRL1_CLRDT; + } + else + { + // + // Set the MaxPacketSize. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXMAXP1) = + ulMaxPacketSize; + + // + // The receive control value is zero unless options are enabled. + // + ulRegister = 0; + + // + // Allow auto clearing of RxPktRdy when packet of size max packet + // has been unloaded from the FIFO. + // + if(ulFlags & USB_EP_AUTO_CLEAR) + { + ulRegister = USB_RXCSRH1_AUTOCL; + } + + // + // Configure the DMA mode. + // + if(ulFlags & USB_EP_DMA_MODE_1) + { + ulRegister |= USB_RXCSRH1_DMAEN | USB_RXCSRH1_DMAMOD; + } + else if(ulFlags & USB_EP_DMA_MODE_0) + { + ulRegister |= USB_RXCSRH1_DMAEN; + } + + // + // Enable isochronous mode if requested. + // + if((ulFlags & USB_EP_MODE_MASK) == USB_EP_MODE_ISOC) + { + ulRegister |= USB_RXCSRH1_ISO; + } + + // + // Write the receive control value. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) = + (unsigned char)ulRegister; + + // + // Reset the Data toggle to zero. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRL1) = + USB_RXCSRL1_CLRDT; + } +} + +//***************************************************************************** +// +//! Gets the current configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pulMaxPacketSize is a pointer which will be written with the +//! maximum packet size for this endpoint. +//! \param pulFlags is a pointer which will be written with the current +//! endpoint settings. On entry to the function, this pointer must contain +//! either \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT to indicate whether the IN or +//! OUT endpoint is to be queried. +//! +//! This function will return the basic configuration for an endpoint in device +//! mode. The values returned in \e *pulMaxPacketSize and \e *pulFlags are +//! equivalent to the \e ulMaxPacketSize and \e ulFlags previously passed to +//! USBDevEndpointConfigSet() for this endpoint. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulMaxPacketSize, + unsigned long *pulFlags) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT(pulMaxPacketSize && pulFlags); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // Determine if a transmit or receive endpoint is being queried. + // + if(*pulFlags & USB_EP_DEV_IN) + { + // + // Clear the flags other than the direction bit. + // + *pulFlags = USB_EP_DEV_IN; + + // + // Get the maximum packet size. + // + *pulMaxPacketSize = (unsigned long)HWREGB(ulBase + + EP_OFFSET(ulEndpoint) + + USB_O_TXMAXP1); + + // + // Get the current transmit control register value. + // + ulRegister = (unsigned long)HWREGB(ulBase + EP_OFFSET(ulEndpoint) + + USB_O_TXCSRH1); + + // + // Are we allowing auto setting of TxPktRdy when max packet size has + // been loaded into the FIFO? + // + if(ulRegister & USB_TXCSRH1_AUTOSET) + { + *pulFlags |= USB_EP_AUTO_SET; + } + + // + // Get the DMA mode. + // + if(ulRegister & USB_TXCSRH1_DMAEN) + { + if(ulRegister & USB_TXCSRH1_DMAMOD) + { + *pulFlags |= USB_EP_DMA_MODE_1; + } + else + { + *pulFlags |= USB_EP_DMA_MODE_0; + } + } + + // + // Are we in isochronous mode? + // + if(ulRegister & USB_TXCSRH1_ISO) + { + *pulFlags |= USB_EP_MODE_ISOC; + } + else + { + // + // The hardware doesn't differentiate between bulk, interrupt + // and control mode for the endpoint so we just set something + // that isn't isochronous. This ensures that anyone modifying + // the returned flags in preparation for a call to + // USBDevEndpointConfigSet will not see an unexpected mode change. + // If they decode the returned mode, however, they may be in for + // a surprise. + // + *pulFlags |= USB_EP_MODE_BULK; + } + } + else + { + // + // Clear the flags other than the direction bit. + // + *pulFlags = USB_EP_DEV_OUT; + + // + // Get the MaxPacketSize. + // + *pulMaxPacketSize = (unsigned long)HWREGB(ulBase + + EP_OFFSET(ulEndpoint) + + USB_O_RXMAXP1); + + // + // Get the current receive control register value. + // + ulRegister = (unsigned long)HWREGB(ulBase + EP_OFFSET(ulEndpoint) + + USB_O_RXCSRH1); + + // + // Are we allowing auto clearing of RxPktRdy when packet of size max + // packet has been unloaded from the FIFO? + // + if(ulRegister & USB_RXCSRH1_AUTOCL) + { + *pulFlags |= USB_EP_AUTO_CLEAR; + } + + // + // Get the DMA mode. + // + if(ulRegister & USB_RXCSRH1_DMAEN) + { + if(ulRegister & USB_RXCSRH1_DMAMOD) + { + *pulFlags |= USB_EP_DMA_MODE_1; + } + else + { + *pulFlags |= USB_EP_DMA_MODE_0; + } + } + + // + // Are we in isochronous mode? + // + if(ulRegister & USB_RXCSRH1_ISO) + { + *pulFlags |= USB_EP_MODE_ISOC; + } + else + { + // + // The hardware doesn't differentiate between bulk, interrupt + // and control mode for the endpoint so we just set something + // that isn't isochronous. This ensures that anyone modifying + // the returned flags in preparation for a call to + // USBDevEndpointConfigSet will not see an unexpected mode change. + // If they decode the returned mode, however, they may be in for + // a surprise. + // + *pulFlags |= USB_EP_MODE_BULK; + } + } +} + +//***************************************************************************** +// +//! Sets the FIFO configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFIFOAddress is the starting address for the FIFO. +//! \param ulFIFOSize is the size of the FIFO in bytes. +//! \param ulFlags specifies what information to set in the FIFO configuration. +//! +//! This function will set the starting FIFO RAM address and size of the FIFO +//! for a given endpoint. Endpoint zero does not have a dynamically +//! configurable FIFO so this function should not be called for endpoint zero. +//! The \e ulFIFOSize parameter should be one of the values in the +//! \b USB_FIFO_SZ_ values. If the endpoint is going to use double buffering +//! it should use the values with the \b _DB at the end of the value. For +//! example, use \b USB_FIFO_SZ_16_DB to configure an endpoint to have a 16 +//! byte double buffered FIFO. If a double buffered FIFO is used, then the +//! actual size of the FIFO will be twice the size indicated by the +//! \e ulFIFOSize parameter. This means that the \b USB_FIFO_SZ_16_DB value +//! will use 32 bytes of the USB controller's FIFO memory. +//! +//! The \e ulFIFOAddress value should be a multiple of 8 bytes and directly +//! indicates the starting address in the USB controller's FIFO RAM. For +//! example, a value of 64 indicates that the FIFO should start 64 bytes into +//! the USB controller's FIFO memory. The \e ulFlags value specifies whether +//! the endpoint's OUT or IN FIFO should be configured. If in host mode, use +//! \b USB_EP_HOST_OUT or \b USB_EP_HOST_IN, and if in device mode use +//! \b USB_EP_DEV_OUT or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFIFOAddress, unsigned long ulFIFOSize, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive FIFO is being configured. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Set the transmit FIFO location and size for this endpoint. + // + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_TXFIFOSZ, ulFIFOSize, 1); + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_TXFIFOADD, + ulFIFOAddress >> 3, 2); + } + else + { + // + // Set the receive FIFO location and size for this endpoint. + // + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_RXFIFOSZ, ulFIFOSize, 1); + USBIndexWrite(ulBase, ulEndpoint >> 4, USB_O_RXFIFOADD, + ulFIFOAddress >> 3, 2); + } +} + +//***************************************************************************** +// +//! Returns the FIFO configuration for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pulFIFOAddress is the starting address for the FIFO. +//! \param pulFIFOSize is the size of the FIFO in bytes. +//! \param ulFlags specifies what information to retrieve from the FIFO +//! configuration. +//! +//! This function will return the starting address and size of the FIFO for a +//! given endpoint. Endpoint zero does not have a dynamically configurable +//! FIFO so this function should not be called for endpoint zero. The +//! \e ulFlags parameter specifies whether the endpoint's OUT or IN FIFO should +//! be read. If in host mode, the \e ulFlags parameter should be +//! \b USB_EP_HOST_OUT or \b USB_EP_HOST_IN, and if in device mode the +//! \e ulFlags parameter should be either \b USB_EP_DEV_OUT or +//! \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulFIFOAddress, unsigned long *pulFIFOSize, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive FIFO is being configured. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Get the transmit FIFO location and size for this endpoint. + // + *pulFIFOAddress = (USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_TXFIFOADD, + 2)) << 3; + *pulFIFOSize = USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_TXFIFOSZ, 1); + + } + else + { + // + // Get the receive FIFO location and size for this endpoint. + // + *pulFIFOAddress = (USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_RXFIFOADD, + 2)) << 3; + *pulFIFOSize = USBIndexRead(ulBase, ulEndpoint >> 4, + (unsigned long)USB_O_RXFIFOSZ, 1); + } +} + +//***************************************************************************** +// +//! Enable DMA on a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies which direction and what mode to use when enabling +//! DMA. +//! +//! This function will enable DMA on a given endpoint and set the mode according +//! to the values in the \e ulFlags parameter. The \e ulFlags parameter should +//! have \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT set. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDMAEnable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // See if the transmit DMA is being enabled. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Enable DMA on the transmit end point. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) |= + USB_TXCSRH1_DMAEN; + } + else + { + // + // Enable DMA on the receive end point. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) |= + USB_RXCSRH1_DMAEN; + } +} + +//***************************************************************************** +// +//! Disable DMA on a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies which direction to disable. +//! +//! This function will disable DMA on a given end point to allow non-DMA +//! USB transactions to generate interrupts normally. The ulFlags should be +//! \b USB_EP_DEV_IN or \b USB_EP_DEV_OUT all other bits are ignored. +//! +//! \return None. +// +//***************************************************************************** +void +USBEndpointDMADisable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // If this was a request to disable DMA on the IN portion of the end point + // then handle it. + // + if(ulFlags & USB_EP_DEV_IN) + { + // + // Just disable DMA leave the mode setting. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRH1) &= + ~USB_TXCSRH1_DMAEN; + } + else + { + // + // Just disable DMA leave the mode setting. + // + HWREGB(ulBase + EP_OFFSET(ulEndpoint) + USB_O_RXCSRH1) &= + ~USB_RXCSRH1_DMAEN; + } +} + +//***************************************************************************** +// +//! Determine the number of bytes of data available in a given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will return the number of bytes of data currently available +//! in the FIFO for the given receive (OUT) endpoint. It may be used prior to +//! calling USBEndpointDataGet() to determine the size of buffer required to +//! hold the newly-received packet. +//! +//! \return This call will return the number of bytes available in a given +//! endpoint FIFO. +// +//***************************************************************************** +unsigned long +USBEndpointDataAvail(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the address of the receive status register to use, based on the + // endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Is there a packet ready in the FIFO? + // + if((HWREGH(ulBase + ulRegister) & USB_CSRL0_RXRDY) == 0) + { + return(0); + } + + // + // Return the byte count in the FIFO. + // + return(HWREGH(ulBase + USB_O_COUNT0 + ulEndpoint)); +} + +//***************************************************************************** +// +//! Retrieves data from the given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pucData is a pointer to the data area used to return the data from +//! the FIFO. +//! \param pulSize is initially the size of the buffer passed into this call +//! via the \e pucData parameter. It will be set to the amount of data +//! returned in the buffer. +//! +//! This function will return the data from the FIFO for the given endpoint. +//! The \e pulSize parameter should indicate the size of the buffer passed in +//! the \e pulData parameter. The data in the \e pulSize parameter will be +//! changed to match the amount of data returned in the \e pucData parameter. +//! If a zero byte packet was received this call will not return a error but +//! will instead just return a zero in the \e pulSize parameter. The only +//! error case occurs when there is no data packet available. +//! +//! \return This call will return 0, or -1 if no packet was received. +// +//***************************************************************************** +long +USBEndpointDataGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long *pulSize) +{ + unsigned long ulRegister, ulByteCount, ulFIFO; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the address of the receive status register to use, based on the + // endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Don't allow reading of data if the RxPktRdy bit is not set. + // + if((HWREGH(ulBase + ulRegister) & USB_CSRL0_RXRDY) == 0) + { + // + // Can't read the data because none is available. + // + *pulSize = 0; + + // + // Return a failure since there is no data to read. + // + return(-1); + } + + // + // Get the byte count in the FIFO. + // + ulByteCount = HWREGH(ulBase + USB_O_COUNT0 + ulEndpoint); + + // + // Determine how many bytes we will actually copy. + // + ulByteCount = (ulByteCount < *pulSize) ? ulByteCount : *pulSize; + + // + // Return the number of bytes we are going to read. + // + *pulSize = ulByteCount; + + // + // Calculate the FIFO address. + // + ulFIFO = ulBase + USB_O_FIFO0 + (ulEndpoint >> 2); + + // + // Read the data out of the FIFO. + // + for(; ulByteCount > 0; ulByteCount--) + { + // + // Read a byte at a time from the FIFO. + // + *pucData++ = HWREGB(ulFIFO); + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Acknowledge that data was read from the given endpoint's FIFO in device +//! mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param bIsLastPacket indicates if this is the last packet. +//! +//! This function acknowledges that the data was read from the endpoint's FIFO. +//! The \e bIsLastPacket parameter is set to a \b true value if this is the +//! last in a series of data packets on endpoint zero. The \e bIsLastPacket +//! parameter is not used for endpoints other than endpoint zero. This call +//! can be used if processing is required between reading the data and +//! acknowledging that the data has been read. +//! +//! \note This function should only be called in device mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevEndpointDataAck(unsigned long ulBase, unsigned long ulEndpoint, + tBoolean bIsLastPacket) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Determine which endpoint is being acked. + // + if(ulEndpoint == USB_EP_0) + { + // + // Clear RxPktRdy, and optionally DataEnd, on endpoint zero. + // + HWREGB(ulBase + USB_O_CSRL0) = + USB_CSRL0_RXRDYC | (bIsLastPacket ? USB_CSRL0_DATAEND : 0); + } + else + { + // + // Clear RxPktRdy on all other endpoints. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_RXRDY); + } +} + +//***************************************************************************** +// +//! Acknowledge that data was read from the given endpoint's FIFO in host +//! mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function acknowledges that the data was read from the endpoint's FIFO. +//! This call is used if processing is required between reading the data and +//! acknowledging that the data has been read. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostEndpointDataAck(unsigned long ulBase, unsigned long ulEndpoint) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Clear RxPktRdy. + // + if(ulEndpoint == USB_EP_0) + { + HWREGB(ulBase + USB_O_CSRL0) &= ~USB_CSRL0_RXRDY; + } + else + { + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &= + ~(USB_RXCSRL1_RXRDY); + } +} + +//***************************************************************************** +// +//! Puts data into the given endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param pucData is a pointer to the data area used as the source for the +//! data to put into the FIFO. +//! \param ulSize is the amount of data to put into the FIFO. +//! +//! This function will put the data from the \e pucData parameter into the FIFO +//! for this endpoint. If a packet is already pending for transmission then +//! this call will not put any of the data into the FIFO and will return -1. +//! Care should be taken to not write more data than can fit into the FIFO +//! allocated by the call to USBFIFOConfig(). +//! +//! \return This call will return 0 on success, or -1 to indicate that the FIFO +//! is in use and cannot be written. +// +//***************************************************************************** +long +USBEndpointDataPut(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long ulSize) +{ + unsigned long ulFIFO; + unsigned char ucTxPktRdy; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the bit position of TxPktRdy based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ucTxPktRdy = USB_CSRL0_TXRDY; + } + else + { + ucTxPktRdy = USB_TXCSRL1_TXRDY; + } + + // + // Don't allow transmit of data if the TxPktRdy bit is already set. + // + if(HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) & ucTxPktRdy) + { + return(-1); + } + + // + // Calculate the FIFO address. + // + ulFIFO = ulBase + USB_O_FIFO0 + (ulEndpoint >> 2); + + // + // Write the data to the FIFO. + // + for(; ulSize > 0; ulSize--) + { + HWREGB(ulFIFO) = *pucData++; + } + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Starts the transfer of data from an endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulTransType is set to indicate what type of data is being sent. +//! +//! This function will start the transfer of data from the FIFO for a given +//! endpoint. This is necessary if the \b USB_EP_AUTO_SET bit was not enabled +//! for the endpoint. Setting the \e ulTransType parameter will allow the +//! appropriate signaling on the USB bus for the type of transaction being +//! requested. The \e ulTransType parameter should be one of the following: +//! +//! - USB_TRANS_OUT for OUT transaction on any endpoint in host mode. +//! - USB_TRANS_IN for IN transaction on any endpoint in device mode. +//! - USB_TRANS_IN_LAST for the last IN transactions on endpoint zero in a +//! sequence of IN transactions. +//! - USB_TRANS_SETUP for setup transactions on endpoint zero. +//! - USB_TRANS_STATUS for status results on endpoint zero. +//! +//! \return This call will return 0 on success, or -1 if a transmission is +//! already in progress. +// +//***************************************************************************** +long +USBEndpointDataSend(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulTransType) +{ + unsigned long ulTxPktRdy; + + // + // CHeck the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Get the bit position of TxPktRdy based on the endpoint. + // + if(ulEndpoint == USB_EP_0) + { + ulTxPktRdy = ulTransType & 0xff; + } + else + { + ulTxPktRdy = (ulTransType >> 8) & 0xff; + } + + // + // Don't allow transmit of data if the TxPktRdy bit is already set. + // + if(HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) & USB_CSRL0_TXRDY) + { + return(-1); + } + + // + // Set TxPktRdy in order to send the data. + // + HWREGB(ulBase + USB_O_CSRL0 + ulEndpoint) = ulTxPktRdy; + + // + // Success. + // + return(0); +} + +//***************************************************************************** +// +//! Forces a flush of an endpoint's FIFO. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags specifies if the IN or OUT endpoint should be accessed. +//! +//! This function will force the controller to flush out the data in the FIFO. +//! The function can be called with either host or device controllers and +//! requires the \e ulFlags parameter be one of \b USB_EP_HOST_OUT, +//! \b USB_EP_HOST_IN, \b USB_EP_DEV_OUT, or \b USB_EP_DEV_IN. +//! +//! \return None. +// +//***************************************************************************** +void +USBFIFOFlush(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Endpoint zero has a different register set for FIFO flushing. + // + if(ulEndpoint == USB_EP_0) + { + // + // Nothing in the FIFO if neither of these bits are set. + // + if((HWREGB(ulBase + USB_O_CSRL0) & + (USB_CSRL0_RXRDY | USB_CSRL0_TXRDY)) != 0) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_CSRH0) = USB_CSRH0_FLUSH; + } + } + else + { + // + // Only reset the IN or OUT FIFO. + // + if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN)) + { + // + // Make sure the FIFO is not empty. + // + if(HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) & + USB_TXCSRL1_TXRDY) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_TXCSRL1_FLUSH; + } + } + else + { + // + // Make sure that the FIFO is not empty. + // + if(HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) & + USB_RXCSRL1_RXRDY) + { + // + // Hit the Flush FIFO bit. + // + HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |= + USB_RXCSRL1_FLUSH; + } + } + } +} + +//***************************************************************************** +// +//! Schedules a request for an IN transaction on an endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! +//! This function will schedule a request for an IN transaction. When the USB +//! device being communicated with responds the data, the data can be retrieved +//! by calling USBEndpointDataGet() or via a DMA transfer. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostRequestIN(unsigned long ulBase, unsigned long ulEndpoint) +{ + unsigned long ulRegister; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // Endpoint zero uses a different offset than the other endpoints. + // + if(ulEndpoint == USB_EP_0) + { + ulRegister = USB_O_CSRL0; + } + else + { + ulRegister = USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint); + } + + // + // Set the request for an IN transaction. + // + HWREGB(ulBase + ulRegister) = USB_RXCSRL1_REQPKT; +} + +//***************************************************************************** +// +//! Issues a request for a status IN transaction on endpoint zero. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function is used to cause a request for an status IN transaction from +//! a device on endpoint zero. This function can only be used with endpoint +//! zero as that is the only control endpoint that supports this ability. This +//! is used to complete the last phase of a control transaction to a device and +//! an interrupt will be signaled when the status packet has been received. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostRequestStatus(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the request for a status IN transaction. + // + HWREGB(ulBase + USB_O_CSRL0) = USB_CSRL0_REQPKT | USB_CSRL0_STATUS; +} + +//***************************************************************************** +// +//! Sets the functional address for the device that is connected to an +//! endpoint in host mode. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulAddr is the functional address for the controller to use for this +//! endpoint. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will set the functional address for a device that is using +//! this endpoint for communication. This \e ulAddr parameter is the address +//! of the target device that this endpoint will be used to communicate with. +//! The \e ulFlags parameter indicates if the IN or OUT endpoint should be set. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive address should be set. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the transmit address. + // + HWREGB(ulBase + USB_O_TXFUNCADDR0 + (ulEndpoint >> 1)) = ulAddr; + } + else + { + // + // Set the receive address. + // + HWREGB(ulBase + USB_O_TXFUNCADDR0 + 4 + (ulEndpoint >> 1)) = ulAddr; + } +} + +//***************************************************************************** +// +//! Gets the current functional device address for an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function returns the current functional address that an endpoint is +//! using to communicate with a device. The \e ulFlags parameter determines if +//! the IN or OUT endpoint's device address is returned. +//! +//! \note This function should only be called in host mode. +//! +//! \return Returns the current function address being used by an endpoint. +// +//***************************************************************************** +unsigned long +USBHostAddrGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the transmit or receive address should be returned. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Return this endpoint's transmit address. + // + return(HWREGB(ulBase + USB_O_TXFUNCADDR0 + (ulEndpoint >> 1))); + } + else + { + // + // Return this endpoint's receive address. + // + return(HWREGB(ulBase + USB_O_TXFUNCADDR0 + 4 + (ulEndpoint >> 1))); + } +} + +//***************************************************************************** +// +//! Set the hub address for the device that is connected to an endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulAddr is the hub address for the device using this endpoint. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will set the hub address for a device that is using this +//! endpoint for communication. The \e ulFlags parameter determines if the +//! device address for the IN or the OUT endpoint is set by this call. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostHubAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the hub transmit or receive address is being set. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Set the hub transmit address for this endpoint. + // + HWREGB(ulBase + USB_O_TXHUBADDR0 + (ulEndpoint >> 1)) = ulAddr; + } + else + { + // + // Set the hub receive address for this endpoint. + // + HWREGB(ulBase + USB_O_TXHUBADDR0 + 4 + (ulEndpoint >> 1)) = ulAddr; + } +} + +//***************************************************************************** +// +//! Get the current device hub address for this endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint is the endpoint to access. +//! \param ulFlags determines if this is an IN or an OUT endpoint. +//! +//! This function will return the current hub address that an endpoint is using +//! to communicate with a device. The \e ulFlags parameter determines if the +//! device address for the IN or OUT endpoint is returned. +//! +//! \note This function should only be called in host mode. +//! +//! \return This function returns the current hub address being used by an +//! endpoint. +// +//***************************************************************************** +unsigned long +USBHostHubAddrGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) || + (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3) || + (ulEndpoint == USB_EP_4) || (ulEndpoint == USB_EP_5) || + (ulEndpoint == USB_EP_6) || (ulEndpoint == USB_EP_7) || + (ulEndpoint == USB_EP_8) || (ulEndpoint == USB_EP_9) || + (ulEndpoint == USB_EP_10) || (ulEndpoint == USB_EP_11) || + (ulEndpoint == USB_EP_12) || (ulEndpoint == USB_EP_13) || + (ulEndpoint == USB_EP_14) || (ulEndpoint == USB_EP_15)); + + // + // See if the hub transmit or receive address should be returned. + // + if(ulFlags & USB_EP_HOST_OUT) + { + // + // Return the hub transmit address for this endpoint. + // + return(HWREGB(ulBase + USB_O_TXHUBADDR0 + (ulEndpoint >> 1))); + } + else + { + // + // Return the hub receive address for this endpoint. + // + return(HWREGB(ulBase + USB_O_TXHUBADDR0 + 4 + (ulEndpoint >> 1))); + } +} + +//***************************************************************************** +// +//! Sets the configuration for USB power fault. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulFlags specifies the configuration of the power fault. +//! +//! This function controls how the USB controller uses its external power +//! control pins(USBnPFTL and USBnEPEN). The flags specify the power +//! fault level sensitivity, the power fault action, and the power enable level +//! and source. +//! +//! One of the following can be selected as the power fault level +//! sensitivity: +//! +//! - \b USB_HOST_PWRFLT_LOW - An external power fault is indicated by the pin +//! being driven low. +//! - \b USB_HOST_PWRFLT_HIGH - An external power fault is indicated by the pin +//! being driven high. +//! +//! One of the following can be selected as the power fault action: +//! +//! - \b USB_HOST_PWRFLT_EP_NONE - No automatic action when power fault +//! detected. +//! - \b USB_HOST_PWRFLT_EP_TRI - Automatically Tri-state the USBnEPEN pin on a +//! power fault. +//! - \b USB_HOST_PWRFLT_EP_LOW - Automatically drive USBnEPEN pin low on a +//! power fault. +//! - \b USB_HOST_PWRFLT_EP_HIGH - Automatically drive USBnEPEN pin high on a +//! power fault. +//! +//! One of the following can be selected as the power enable level and source: +//! +//! - \b USB_HOST_PWREN_MAN_LOW - USBEPEN is driven low by the USB controller +//! when USBHostPwrEnable() is called. +//! - \b USB_HOST_PWREN_MAN_HIGH - USBEPEN is driven high by the USB controller +//! when USBHostPwrEnable() is called. +//! - \b USB_HOST_PWREN_AUTOLOW - USBEPEN is driven low by the USB controller +//! automatically if USBOTGSessionRequest() has +//! enabled a session. +//! - \b USB_HOST_PWREN_AUTOHIGH - USBEPEN is driven high by the USB controller +//! automatically if USBOTGSessionRequest() has +//! enabled a session. +//! +//! On devices that support the VBUS glitch filter, the +//! \b USB_HOST_PWREN_FILTER can be added to ignore small short drops in VBUS +//! level caused by high power consumption. This is mainly used to avoid +//! causing VBUS errors caused by devices with high in-rush current. +//! +//! \note The following values have been deprecated and should no longer be +//! used. +//! - \b USB_HOST_PWREN_LOW - Automatically drive USBnEPEN low when power is +//! enabled. +//! - \b USB_HOST_PWREN_HIGH - Automatically drive USBnEPEN high when power is +//! enabled. +//! - \b USB_HOST_PWREN_VBLOW - Automatically drive USBnEPEN low when power is +//! enabled. +//! - \b USB_HOST_PWREN_VBHIGH - Automatically drive USBnEPEN high when power is +//! enabled. +//! +//! \note This function should only be called on microcontrollers that support +//! host mode or OTG operation. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrConfig(unsigned long ulBase, unsigned long ulFlags) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulFlags & ~(USB_HOST_PWREN_FILTER | USB_EPC_PFLTACT_M | + USB_EPC_PFLTAEN | USB_EPC_PFLTSEN_HIGH | + USB_EPC_EPEN_M)) == 0); + + // + // If requested, enable VBUS droop detection on parts that support this + // feature. + // + HWREG(ulBase + USB_O_VDC) = ulFlags >> 16; + + // + // Set the power fault configuration as specified. This will not change + // whether fault detection is enabled or not. + // + HWREGH(ulBase + USB_O_EPC) = + (ulFlags | (HWREGH(ulBase + USB_O_EPC) & + ~(USB_EPC_PFLTACT_M | USB_EPC_PFLTAEN | + USB_EPC_PFLTSEN_HIGH | USB_EPC_EPEN_M))); +} + +//***************************************************************************** +// +//! Enables power fault detection. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function enables power fault detection in the USB controller. If the +//! USBPFLT pin is not in use this function should not be used. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrFaultEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable power fault input. + // + HWREGH(ulBase + USB_O_EPC) |= USB_EPC_PFLTEN; +} + +//***************************************************************************** +// +//! Disables power fault detection. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function disables power fault detection in the USB controller. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrFaultDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable power fault input. + // + HWREGH(ulBase + USB_O_EPC) &= ~USB_EPC_PFLTEN; +} + +//***************************************************************************** +// +//! Enables the external power pin. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function enables the USBEPEN signal to enable an external power supply +//! in host mode operation. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Enable the external power supply enable signal. + // + HWREGH(ulBase + USB_O_EPC) |= USB_EPC_EPENDE; +} + +//***************************************************************************** +// +//! Disables the external power pin. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function disables the USBEPEN signal to disable an external power +//! supply in host mode operation. +//! +//! \note This function should only be called in host mode. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostPwrDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Disable the external power supply enable signal. + // + HWREGH(ulBase + USB_O_EPC) &= ~USB_EPC_EPENDE; +} + +//***************************************************************************** +// +//! Get the current frame number. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function returns the last frame number received. +//! +//! \return The last frame number received. +// +//***************************************************************************** +unsigned long +USBFrameNumberGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Return the most recent frame number. + // + return(HWREGH(ulBase + USB_O_FRAME)); +} + +//***************************************************************************** +// +//! Starts or ends a session. +//! +//! \param ulBase specifies the USB module base address. +//! \param bStart specifies if this call starts or ends a session. +//! +//! This function is used in OTG mode to start a session request or end a +//! session. If the \e bStart parameter is set to \b true, then this function +//! start a session and if it is \b false it will end a session. +//! +//! \return None. +// +//***************************************************************************** +void +USBOTGSessionRequest(unsigned long ulBase, tBoolean bStart) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Start or end the session as directed. + // + if(bStart) + { + HWREGB(ulBase + USB_O_DEVCTL) |= USB_DEVCTL_SESSION; + } + else + { + HWREGB(ulBase + USB_O_DEVCTL) &= ~USB_DEVCTL_SESSION; + } +} + +//***************************************************************************** +// +//! Returns the absolute FIFO address for a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint's FIFO address to return. +//! +//! This function returns the actual physical address of the FIFO. This is +//! needed when the USB is going to be used with the uDMA controller and the +//! source or destination address needs to be set to the physical FIFO address +//! for a given endpoint. +//! +//! \return None. +// +//***************************************************************************** +unsigned long +USBFIFOAddrGet(unsigned long ulBase, unsigned long ulEndpoint) +{ + // + // Return the FIFO address for this endpoint. + // + return(ulBase + USB_O_FIFO0 + (ulEndpoint >> 2)); +} + +//***************************************************************************** +// +//! Returns the current operating mode of the controller. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function returns the current operating mode on USB controllers with +//! OTG or Dual mode functionality. +//! +//! For OTG controllers: +//! +//! The function will return on of the following values on OTG controllers: +//! \b USB_OTG_MODE_ASIDE_HOST, \b USB_OTG_MODE_ASIDE_DEV, +//! \b USB_OTG_MODE_BSIDE_HOST, \b USB_OTG_MODE_BSIDE_DEV, +//! \b USB_OTG_MODE_NONE. +//! +//! \b USB_OTG_MODE_ASIDE_HOST indicates that the controller is in host mode +//! on the A-side of the cable. +//! +//! \b USB_OTG_MODE_ASIDE_DEV indicates that the controller is in device mode +//! on the A-side of the cable. +//! +//! \b USB_OTG_MODE_BSIDE_HOST indicates that the controller is in host mode +//! on the B-side of the cable. +//! +//! \b USB_OTG_MODE_BSIDE_DEV indicates that the controller is in device mode +//! on the B-side of the cable. If and OTG session request is started with no +//! cable in place this is the default mode for the controller. +//! +//! \b USB_OTG_MODE_NONE indicates that the controller is not attempting to +//! determine its role in the system. +//! +//! For Dual Mode controllers: +//! +//! The function will return on of the following values: +//! \b USB_DUAL_MODE_HOST, \b USB_DUAL_MODE_DEVICE, or +//! \b USB_DUAL_MODE_NONE. +//! +//! \b USB_DUAL_MODE_HOST indicates that the controller is acting as a host. +//! +//! \b USB_DUAL_MODE_DEVICE indicates that the controller acting as a device. +//! +//! \b USB_DUAL_MODE_NONE indicates that the controller is not active as +//! either a host or device. +//! +//! \return Returns \b USB_OTG_MODE_ASIDE_HOST, \b USB_OTG_MODE_ASIDE_DEV, +//! \b USB_OTG_MODE_BSIDE_HOST, \b USB_OTG_MODE_BSIDE_DEV, +//! \b USB_OTG_MODE_NONE, \b USB_DUAL_MODE_HOST, \b USB_DUAL_MODE_DEVICE, or +//! \b USB_DUAL_MODE_NONE. +// +//***************************************************************************** +unsigned long +USBModeGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Checks the current mode in the USB_O_DEVCTL and returns the current + // mode. + // + // USB_OTG_MODE_ASIDE_HOST: USB_DEVCTL_HOST | USB_DEVCTL_SESSION + // USB_OTG_MODE_ASIDE_DEV: USB_DEVCTL_SESSION + // USB_OTG_MODE_BSIDE_HOST: USB_DEVCTL_DEV | USB_DEVCTL_SESSION | + // USB_DEVCTL_HOST + // USB_OTG_MODE_BSIDE_DEV: USB_DEVCTL_DEV | USB_DEVCTL_SESSION + // USB_OTG_MODE_NONE: USB_DEVCTL_DEV + // + return(HWREGB(ulBase + USB_O_DEVCTL) & + (USB_DEVCTL_DEV | USB_DEVCTL_HOST | USB_DEVCTL_SESSION | + USB_DEVCTL_VBUS_M)); +} + +//***************************************************************************** +// +//! Sets the DMA channel to use for a given endpoint. +//! +//! \param ulBase specifies the USB module base address. +//! \param ulEndpoint specifies which endpoint's FIFO address to return. +//! \param ulChannel specifies which DMA channel to use for which endpoint. +//! +//! This function is used to configure which DMA channel to use with a given +//! endpoint. Receive DMA channels can only be used with receive endpoints +//! and transmit DMA channels can only be used with transmit endpoints. This +//! allows the 3 receive and 3 transmit DMA channels to be mapped to any +//! endpoint other than 0. The values that should be passed into the \e +//! ulChannel value are the UDMA_CHANNEL_USBEP* values defined in udma.h. +//! +//! \note This function only has an effect on microcontrollers that have the +//! ability to change the DMA channel for an endpoint. Calling this function +//! on other devices will have no effect. +//! +//! \return None. +//! +//***************************************************************************** +void +USBEndpointDMAChannel(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulChannel) +{ + unsigned long ulMask; + + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + ASSERT((ulEndpoint == USB_EP_1) || (ulEndpoint == USB_EP_2) || + (ulEndpoint == USB_EP_3) || (ulEndpoint == USB_EP_4) || + (ulEndpoint == USB_EP_5) || (ulEndpoint == USB_EP_6) || + (ulEndpoint == USB_EP_7) || (ulEndpoint == USB_EP_8) || + (ulEndpoint == USB_EP_9) || (ulEndpoint == USB_EP_10) || + (ulEndpoint == USB_EP_11) || (ulEndpoint == USB_EP_12) || + (ulEndpoint == USB_EP_13) || (ulEndpoint == USB_EP_14) || + (ulEndpoint == USB_EP_15)); + ASSERT(ulChannel <= UDMA_CHANNEL_USBEP3TX); + + // + // The input select mask needs to be shifted into the correct position + // based on the channel. + // + ulMask = 0xf << (ulChannel * 4); + + // + // Clear out the current selection for the channel. + // + ulMask = HWREG(ulBase + USB_O_DMASEL) & (~ulMask); + + // + // The input select is now shifted into the correct position based on the + // channel. + // + ulMask |= (USB_EP_TO_INDEX(ulEndpoint)) << (ulChannel * 4); + + // + // Write the value out to the register. + // + HWREG(ulBase + USB_O_DMASEL) = ulMask; +} + +//***************************************************************************** +// +//! Change the mode of the USB controller to host. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function changes the mode of the USB controller to host mode. This +//! is only valid on microcontrollers that have the host and device +//! capabilities and not the OTG capabilities. +//! +//! \return None. +// +//***************************************************************************** +void +USBHostMode(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Force mode in OTG parts that support forcing USB controller mode. + // This bit is not writable in USB controllers that do not support + // forcing the mode. Not setting the USB_GPCS_DEVMOD bit makes this a + // force of host mode. + // + HWREGB(ulBase + USB_O_GPCS) = USB_GPCS_DEVMODOTG; +} + +//***************************************************************************** +// +//! Change the mode of the USB controller to device. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function changes the mode of the USB controller to device mode. This +//! is only valid on microcontrollers that have the host and device +//! capabilities and not the OTG capabilities. +//! +//! \return None. +// +//***************************************************************************** +void +USBDevMode(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT(ulBase == USB0_BASE); + + // + // Set the USB controller mode to device. + // + HWREGB(ulBase + USB_O_GPCS) = USB_GPCS_DEVMODOTG | USB_GPCS_DEVMOD; +} + +//***************************************************************************** +// +//! Powers off the USB PHY. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will power off the USB PHY, reducing the current consuption +//! of the device. While in the powered off state, the USB controller will be +//! unable to operate. +//! +//! \return None. +// +//***************************************************************************** +void +USBPHYPowerOff(unsigned long ulBase) +{ + // + // Set the PWRDNPHY bit in the PHY, putting it into its low power mode. + // + HWREGB(ulBase + USB_O_POWER) |= USB_POWER_PWRDNPHY; +} + +//***************************************************************************** +// +//! Powers on the USB PHY. +//! +//! \param ulBase specifies the USB module base address. +//! +//! This function will power on the USB PHY, enabling it return to normal +//! operation. By default, the PHY is powered on, so this function only needs +//! to be called if USBPHYPowerOff() has previously been called. +//! +//! \return None. +// +//***************************************************************************** +void +USBPHYPowerOn(unsigned long ulBase) +{ + // + // Clear the PWRDNPHY bit in the PHY, putting it into normal operating + // mode. + // + HWREGB(ulBase + USB_O_POWER) &= ~USB_POWER_PWRDNPHY; +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.h new file mode 100644 index 00000000..c5b3b7f2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/usb.h @@ -0,0 +1,567 @@ +//***************************************************************************** +// +// usb.h - Prototypes for the USB Interface Driver. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __USB_H__ +#define __USB_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnableControl() and +// USBIntDisableControl() as the ulFlags parameter, and are returned from +// USBIntStatusControl(). +// +//***************************************************************************** +#define USB_INTCTRL_ALL 0x000003FF // All control interrupt sources +#define USB_INTCTRL_STATUS 0x000000FF // Status Interrupts +#define USB_INTCTRL_VBUS_ERR 0x00000080 // VBUS Error +#define USB_INTCTRL_SESSION 0x00000040 // Session Start Detected +#define USB_INTCTRL_SESSION_END 0x00000040 // Session End Detected +#define USB_INTCTRL_DISCONNECT 0x00000020 // Disconnect Detected +#define USB_INTCTRL_CONNECT 0x00000010 // Device Connect Detected +#define USB_INTCTRL_SOF 0x00000008 // Start of Frame Detected +#define USB_INTCTRL_BABBLE 0x00000004 // Babble signaled +#define USB_INTCTRL_RESET 0x00000004 // Reset signaled +#define USB_INTCTRL_RESUME 0x00000002 // Resume detected +#define USB_INTCTRL_SUSPEND 0x00000001 // Suspend detected +#define USB_INTCTRL_MODE_DETECT 0x00000200 // Mode value valid +#define USB_INTCTRL_POWER_FAULT 0x00000100 // Power Fault detected + +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnableEndpoint() and +// USBIntDisableEndpoint() as the ulFlags parameter, and are returned from +// USBIntStatusEndpoint(). +// +//***************************************************************************** +#define USB_INTEP_ALL 0xFFFFFFFF // Host IN Interrupts +#define USB_INTEP_HOST_IN 0xFFFE0000 // Host IN Interrupts +#define USB_INTEP_HOST_IN_15 0x80000000 // Endpoint 15 Host IN Interrupt +#define USB_INTEP_HOST_IN_14 0x40000000 // Endpoint 14 Host IN Interrupt +#define USB_INTEP_HOST_IN_13 0x20000000 // Endpoint 13 Host IN Interrupt +#define USB_INTEP_HOST_IN_12 0x10000000 // Endpoint 12 Host IN Interrupt +#define USB_INTEP_HOST_IN_11 0x08000000 // Endpoint 11 Host IN Interrupt +#define USB_INTEP_HOST_IN_10 0x04000000 // Endpoint 10 Host IN Interrupt +#define USB_INTEP_HOST_IN_9 0x02000000 // Endpoint 9 Host IN Interrupt +#define USB_INTEP_HOST_IN_8 0x01000000 // Endpoint 8 Host IN Interrupt +#define USB_INTEP_HOST_IN_7 0x00800000 // Endpoint 7 Host IN Interrupt +#define USB_INTEP_HOST_IN_6 0x00400000 // Endpoint 6 Host IN Interrupt +#define USB_INTEP_HOST_IN_5 0x00200000 // Endpoint 5 Host IN Interrupt +#define USB_INTEP_HOST_IN_4 0x00100000 // Endpoint 4 Host IN Interrupt +#define USB_INTEP_HOST_IN_3 0x00080000 // Endpoint 3 Host IN Interrupt +#define USB_INTEP_HOST_IN_2 0x00040000 // Endpoint 2 Host IN Interrupt +#define USB_INTEP_HOST_IN_1 0x00020000 // Endpoint 1 Host IN Interrupt + +#define USB_INTEP_DEV_OUT 0xFFFE0000 // Device OUT Interrupts +#define USB_INTEP_DEV_OUT_15 0x80000000 // Endpoint 15 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_14 0x40000000 // Endpoint 14 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_13 0x20000000 // Endpoint 13 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_12 0x10000000 // Endpoint 12 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_11 0x08000000 // Endpoint 11 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_10 0x04000000 // Endpoint 10 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_9 0x02000000 // Endpoint 9 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_8 0x01000000 // Endpoint 8 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_7 0x00800000 // Endpoint 7 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_6 0x00400000 // Endpoint 6 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_5 0x00200000 // Endpoint 5 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_4 0x00100000 // Endpoint 4 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_3 0x00080000 // Endpoint 3 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_2 0x00040000 // Endpoint 2 Device OUT Interrupt +#define USB_INTEP_DEV_OUT_1 0x00020000 // Endpoint 1 Device OUT Interrupt + +#define USB_INTEP_HOST_OUT 0x0000FFFE // Host OUT Interrupts +#define USB_INTEP_HOST_OUT_15 0x00008000 // Endpoint 15 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_14 0x00004000 // Endpoint 14 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_13 0x00002000 // Endpoint 13 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_12 0x00001000 // Endpoint 12 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_11 0x00000800 // Endpoint 11 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_10 0x00000400 // Endpoint 10 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_9 0x00000200 // Endpoint 9 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_8 0x00000100 // Endpoint 8 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_7 0x00000080 // Endpoint 7 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_6 0x00000040 // Endpoint 6 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_5 0x00000020 // Endpoint 5 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_4 0x00000010 // Endpoint 4 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_3 0x00000008 // Endpoint 3 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_2 0x00000004 // Endpoint 2 Host OUT Interrupt +#define USB_INTEP_HOST_OUT_1 0x00000002 // Endpoint 1 Host OUT Interrupt + +#define USB_INTEP_DEV_IN 0x0000FFFE // Device IN Interrupts +#define USB_INTEP_DEV_IN_15 0x00008000 // Endpoint 15 Device IN Interrupt +#define USB_INTEP_DEV_IN_14 0x00004000 // Endpoint 14 Device IN Interrupt +#define USB_INTEP_DEV_IN_13 0x00002000 // Endpoint 13 Device IN Interrupt +#define USB_INTEP_DEV_IN_12 0x00001000 // Endpoint 12 Device IN Interrupt +#define USB_INTEP_DEV_IN_11 0x00000800 // Endpoint 11 Device IN Interrupt +#define USB_INTEP_DEV_IN_10 0x00000400 // Endpoint 10 Device IN Interrupt +#define USB_INTEP_DEV_IN_9 0x00000200 // Endpoint 9 Device IN Interrupt +#define USB_INTEP_DEV_IN_8 0x00000100 // Endpoint 8 Device IN Interrupt +#define USB_INTEP_DEV_IN_7 0x00000080 // Endpoint 7 Device IN Interrupt +#define USB_INTEP_DEV_IN_6 0x00000040 // Endpoint 6 Device IN Interrupt +#define USB_INTEP_DEV_IN_5 0x00000020 // Endpoint 5 Device IN Interrupt +#define USB_INTEP_DEV_IN_4 0x00000010 // Endpoint 4 Device IN Interrupt +#define USB_INTEP_DEV_IN_3 0x00000008 // Endpoint 3 Device IN Interrupt +#define USB_INTEP_DEV_IN_2 0x00000004 // Endpoint 2 Device IN Interrupt +#define USB_INTEP_DEV_IN_1 0x00000002 // Endpoint 1 Device IN Interrupt + +#define USB_INTEP_0 0x00000001 // Endpoint 0 Interrupt + +//***************************************************************************** +// +// The following are values that are returned from USBSpeedGet(). +// +//***************************************************************************** +#define USB_UNDEF_SPEED 0x80000000 // Current speed is undefined +#define USB_FULL_SPEED 0x00000001 // Current speed is Full Speed +#define USB_LOW_SPEED 0x00000000 // Current speed is Low Speed + +//***************************************************************************** +// +// The following are values that are returned from USBEndpointStatus(). The +// USB_HOST_* values are used when the USB controller is in host mode and the +// USB_DEV_* values are used when the USB controller is in device mode. +// +//***************************************************************************** +#define USB_HOST_IN_PID_ERROR 0x01000000 // Stall on this endpoint received +#define USB_HOST_IN_NOT_COMP 0x00100000 // Device failed to respond +#define USB_HOST_IN_STALL 0x00400000 // Stall on this endpoint received +#define USB_HOST_IN_DATA_ERROR 0x00080000 // CRC or bit-stuff error + // (ISOC Mode) +#define USB_HOST_IN_NAK_TO 0x00080000 // NAK received for more than the + // specified timeout period +#define USB_HOST_IN_ERROR 0x00040000 // Failed to communicate with a + // device +#define USB_HOST_IN_FIFO_FULL 0x00020000 // RX FIFO full +#define USB_HOST_IN_PKTRDY 0x00010000 // Data packet ready +#define USB_HOST_OUT_NAK_TO 0x00000080 // NAK received for more than the + // specified timeout period +#define USB_HOST_OUT_NOT_COMP 0x00000080 // No response from device + // (ISOC mode) +#define USB_HOST_OUT_STALL 0x00000020 // Stall on this endpoint received +#define USB_HOST_OUT_ERROR 0x00000004 // Failed to communicate with a + // device +#define USB_HOST_OUT_FIFO_NE 0x00000002 // TX FIFO is not empty +#define USB_HOST_OUT_PKTPEND 0x00000001 // Transmit still being transmitted +#define USB_HOST_EP0_NAK_TO 0x00000080 // NAK received for more than the + // specified timeout period +#define USB_HOST_EP0_STATUS 0x00000040 // This was a status packet +#define USB_HOST_EP0_ERROR 0x00000010 // Failed to communicate with a + // device +#define USB_HOST_EP0_RX_STALL 0x00000004 // Stall on this endpoint received +#define USB_HOST_EP0_RXPKTRDY 0x00000001 // Receive data packet ready +#define USB_DEV_RX_SENT_STALL 0x00400000 // Stall was sent on this endpoint +#define USB_DEV_RX_DATA_ERROR 0x00080000 // CRC error on the data +#define USB_DEV_RX_OVERRUN 0x00040000 // OUT packet was not loaded due to + // a full FIFO +#define USB_DEV_RX_FIFO_FULL 0x00020000 // RX FIFO full +#define USB_DEV_RX_PKT_RDY 0x00010000 // Data packet ready +#define USB_DEV_TX_NOT_COMP 0x00000080 // Large packet split up, more data + // to come +#define USB_DEV_TX_SENT_STALL 0x00000020 // Stall was sent on this endpoint +#define USB_DEV_TX_UNDERRUN 0x00000004 // IN received with no data ready +#define USB_DEV_TX_FIFO_NE 0x00000002 // The TX FIFO is not empty +#define USB_DEV_TX_TXPKTRDY 0x00000001 // Transmit still being transmitted +#define USB_DEV_EP0_SETUP_END 0x00000010 // Control transaction ended before + // Data End seen +#define USB_DEV_EP0_SENT_STALL 0x00000004 // Stall was sent on this endpoint +#define USB_DEV_EP0_IN_PKTPEND 0x00000002 // Transmit data packet pending +#define USB_DEV_EP0_OUT_PKTRDY 0x00000001 // Receive data packet ready + +//***************************************************************************** +// +// The following are values that can be passed to USBHostEndpointConfig() and +// USBDevEndpointConfigSet() as the ulFlags parameter. +// +//***************************************************************************** +#define USB_EP_AUTO_SET 0x00000001 // Auto set feature enabled +#define USB_EP_AUTO_REQUEST 0x00000002 // Auto request feature enabled +#define USB_EP_AUTO_CLEAR 0x00000004 // Auto clear feature enabled +#define USB_EP_DMA_MODE_0 0x00000008 // Enable DMA access using mode 0 +#define USB_EP_DMA_MODE_1 0x00000010 // Enable DMA access using mode 1 +#define USB_EP_MODE_ISOC 0x00000000 // Isochronous endpoint +#define USB_EP_MODE_BULK 0x00000100 // Bulk endpoint +#define USB_EP_MODE_INT 0x00000200 // Interrupt endpoint +#define USB_EP_MODE_CTRL 0x00000300 // Control endpoint +#define USB_EP_MODE_MASK 0x00000300 // Mode Mask +#define USB_EP_SPEED_LOW 0x00000000 // Low Speed +#define USB_EP_SPEED_FULL 0x00001000 // Full Speed +#define USB_EP_HOST_IN 0x00000000 // Host IN endpoint +#define USB_EP_HOST_OUT 0x00002000 // Host OUT endpoint +#define USB_EP_DEV_IN 0x00002000 // Device IN endpoint +#define USB_EP_DEV_OUT 0x00000000 // Device OUT endpoint + +//***************************************************************************** +// +// The following are values that can be passed to USBHostPwrConfig() as +// the ulFlags parameter. +// +//***************************************************************************** +#define USB_HOST_PWRFLT_LOW 0x00000010 +#define USB_HOST_PWRFLT_HIGH 0x00000030 +#define USB_HOST_PWRFLT_EP_NONE 0x00000000 +#define USB_HOST_PWRFLT_EP_TRI 0x00000140 +#define USB_HOST_PWRFLT_EP_LOW 0x00000240 +#define USB_HOST_PWRFLT_EP_HIGH 0x00000340 +#ifndef DEPRECATED +#define USB_HOST_PWREN_LOW 0x00000002 +#define USB_HOST_PWREN_HIGH 0x00000003 +#define USB_HOST_PWREN_VBLOW 0x00000002 +#define USB_HOST_PWREN_VBHIGH 0x00000003 +#endif +#define USB_HOST_PWREN_MAN_LOW 0x00000000 +#define USB_HOST_PWREN_MAN_HIGH 0x00000001 +#define USB_HOST_PWREN_AUTOLOW 0x00000002 +#define USB_HOST_PWREN_AUTOHIGH 0x00000003 +#define USB_HOST_PWREN_FILTER 0x00010000 + +//***************************************************************************** +// +// The following are special values that can be passed to +// USBHostEndpointConfig() as the ulNAKPollInterval parameter. +// +//***************************************************************************** +#define MAX_NAK_LIMIT 31 // Maximum NAK interval +#define DISABLE_NAK_LIMIT 0 // No NAK timeouts + +//***************************************************************************** +// +// This value specifies the maximum size of transfers on endpoint 0 as 64 +// bytes. This value is fixed in hardware as the FIFO size for endpoint 0. +// +//***************************************************************************** +#define MAX_PACKET_SIZE_EP0 64 + +//***************************************************************************** +// +// These values are used to indicate which endpoint to access. +// +//***************************************************************************** +#define USB_EP_0 0x00000000 // Endpoint 0 +#define USB_EP_1 0x00000010 // Endpoint 1 +#define USB_EP_2 0x00000020 // Endpoint 2 +#define USB_EP_3 0x00000030 // Endpoint 3 +#define USB_EP_4 0x00000040 // Endpoint 4 +#define USB_EP_5 0x00000050 // Endpoint 5 +#define USB_EP_6 0x00000060 // Endpoint 6 +#define USB_EP_7 0x00000070 // Endpoint 7 +#define USB_EP_8 0x00000080 // Endpoint 8 +#define USB_EP_9 0x00000090 // Endpoint 9 +#define USB_EP_10 0x000000A0 // Endpoint 10 +#define USB_EP_11 0x000000B0 // Endpoint 11 +#define USB_EP_12 0x000000C0 // Endpoint 12 +#define USB_EP_13 0x000000D0 // Endpoint 13 +#define USB_EP_14 0x000000E0 // Endpoint 14 +#define USB_EP_15 0x000000F0 // Endpoint 15 +#define NUM_USB_EP 16 // Number of supported endpoints + +//***************************************************************************** +// +// These macros allow conversion between 0-based endpoint indices and the +// USB_EP_x values required when calling various USB APIs. +// +//***************************************************************************** +#define INDEX_TO_USB_EP(x) ((x) << 4) +#define USB_EP_TO_INDEX(x) ((x) >> 4) + +//***************************************************************************** +// +// The following are values that can be passed to USBFIFOConfigSet() as the +// ulFIFOSize parameter. +// +//***************************************************************************** +#define USB_FIFO_SZ_8 0x00000000 // 8 byte FIFO +#define USB_FIFO_SZ_16 0x00000001 // 16 byte FIFO +#define USB_FIFO_SZ_32 0x00000002 // 32 byte FIFO +#define USB_FIFO_SZ_64 0x00000003 // 64 byte FIFO +#define USB_FIFO_SZ_128 0x00000004 // 128 byte FIFO +#define USB_FIFO_SZ_256 0x00000005 // 256 byte FIFO +#define USB_FIFO_SZ_512 0x00000006 // 512 byte FIFO +#define USB_FIFO_SZ_1024 0x00000007 // 1024 byte FIFO +#define USB_FIFO_SZ_2048 0x00000008 // 2048 byte FIFO +#define USB_FIFO_SZ_4096 0x00000009 // 4096 byte FIFO +#define USB_FIFO_SZ_8_DB 0x00000010 // 8 byte double buffered FIFO + // (occupying 16 bytes) +#define USB_FIFO_SZ_16_DB 0x00000011 // 16 byte double buffered FIFO + // (occupying 32 bytes) +#define USB_FIFO_SZ_32_DB 0x00000012 // 32 byte double buffered FIFO + // (occupying 64 bytes) +#define USB_FIFO_SZ_64_DB 0x00000013 // 64 byte double buffered FIFO + // (occupying 128 bytes) +#define USB_FIFO_SZ_128_DB 0x00000014 // 128 byte double buffered FIFO + // (occupying 256 bytes) +#define USB_FIFO_SZ_256_DB 0x00000015 // 256 byte double buffered FIFO + // (occupying 512 bytes) +#define USB_FIFO_SZ_512_DB 0x00000016 // 512 byte double buffered FIFO + // (occupying 1024 bytes) +#define USB_FIFO_SZ_1024_DB 0x00000017 // 1024 byte double buffered FIFO + // (occupying 2048 bytes) +#define USB_FIFO_SZ_2048_DB 0x00000018 // 2048 byte double buffered FIFO + // (occupying 4096 bytes) + +//***************************************************************************** +// +// This macro allow conversion from a FIFO size label as defined above to +// a number of bytes +// +//***************************************************************************** +#define USB_FIFO_SIZE_DB_FLAG 0x00000010 +#define USB_FIFO_SZ_TO_BYTES(x) ((8 << ((x) & ~ USB_FIFO_SIZE_DB_FLAG)) * \ + (((x) & USB_FIFO_SIZE_DB_FLAG) ? 2 : 1)) + +//***************************************************************************** +// +// The following are values that can be passed to USBEndpointDataSend() as the +// ulTransType parameter. +// +//***************************************************************************** +#define USB_TRANS_OUT 0x00000102 // Normal OUT transaction +#define USB_TRANS_IN 0x00000102 // Normal IN transaction +#define USB_TRANS_IN_LAST 0x0000010a // Final IN transaction (for + // endpoint 0 in device mode) +#define USB_TRANS_SETUP 0x0000110a // Setup transaction (for endpoint + // 0) +#define USB_TRANS_STATUS 0x00000142 // Status transaction (for endpoint + // 0) + +//***************************************************************************** +// +// The following are values are returned by the USBModeGet function. +// +//***************************************************************************** +#define USB_DUAL_MODE_HOST 0x00000001 // Dual mode controller is in Host + // mode. +#define USB_DUAL_MODE_DEVICE 0x00000081 // Dual mode controller is in + // Device mode. +#define USB_DUAL_MODE_NONE 0x00000080 // Dual mode controller mode is not + // set. +#define USB_OTG_MODE_ASIDE_HOST 0x0000001d // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_ASIDE_NPWR 0x00000001 // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_ASIDE_SESS 0x00000009 // OTG controller on the A side of + // the cable Session Valid. +#define USB_OTG_MODE_ASIDE_AVAL 0x00000011 // OTG controller on the A side of + // the cable A valid. +#define USB_OTG_MODE_ASIDE_DEV 0x00000019 // OTG controller on the A side of + // the cable. +#define USB_OTG_MODE_BSIDE_HOST 0x0000009d // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_BSIDE_DEV 0x00000099 // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_BSIDE_NPWR 0x00000081 // OTG controller on the B side of + // the cable. +#define USB_OTG_MODE_NONE 0x00000080 // OTG controller mode is not set. + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern unsigned long USBDevAddrGet(unsigned long ulBase); +extern void USBDevAddrSet(unsigned long ulBase, unsigned long ulAddress); +extern void USBDevConnect(unsigned long ulBase); +extern void USBDevDisconnect(unsigned long ulBase); +extern void USBDevEndpointConfigSet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, + unsigned long ulFlags); +extern void USBDevEndpointConfigGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long *pulMaxPacketSize, + unsigned long *pulFlags); +extern void USBDevEndpointDataAck(unsigned long ulBase, + unsigned long ulEndpoint, + tBoolean bIsLastPacket); +extern void USBDevEndpointStall(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBDevEndpointStallClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBDevEndpointStatusClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBEndpointDataAvail(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBEndpointDMAEnable(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBEndpointDMADisable(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern long USBEndpointDataGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long *pulSize); +extern long USBEndpointDataPut(unsigned long ulBase, unsigned long ulEndpoint, + unsigned char *pucData, unsigned long ulSize); +extern long USBEndpointDataSend(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulTransType); +extern void USBEndpointDataToggleClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBEndpointStatus(unsigned long ulBase, + unsigned long ulEndpoint); +extern unsigned long USBFIFOAddrGet(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBFIFOConfigGet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long *pulFIFOAddress, + unsigned long *pulFIFOSize, + unsigned long ulFlags); +extern void USBFIFOConfigSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFIFOAddress, + unsigned long ulFIFOSize, unsigned long ulFlags); +extern void USBFIFOFlush(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBFrameNumberGet(unsigned long ulBase); +extern unsigned long USBHostAddrGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBHostAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags); +extern void USBHostEndpointConfig(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulMaxPacketSize, + unsigned long ulNAKPollInterval, + unsigned long ulTargetEndpoint, + unsigned long ulFlags); +extern void USBHostEndpointDataAck(unsigned long ulBase, + unsigned long ulEndpoint); +extern void USBHostEndpointDataToggle(unsigned long ulBase, + unsigned long ulEndpoint, + tBoolean bDataToggle, + unsigned long ulFlags); +extern void USBHostEndpointStatusClear(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern unsigned long USBHostHubAddrGet(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulFlags); +extern void USBHostHubAddrSet(unsigned long ulBase, unsigned long ulEndpoint, + unsigned long ulAddr, unsigned long ulFlags); +extern void USBHostPwrDisable(unsigned long ulBase); +extern void USBHostPwrEnable(unsigned long ulBase); +extern void USBHostPwrConfig(unsigned long ulBase, unsigned long ulFlags); +#ifndef DEPRECATED +#define USBHostPwrFaultConfig USBHostPwrConfig +#endif +extern void USBHostPwrFaultDisable(unsigned long ulBase); +extern void USBHostPwrFaultEnable(unsigned long ulBase); +extern void USBHostRequestIN(unsigned long ulBase, unsigned long ulEndpoint); +extern void USBHostRequestStatus(unsigned long ulBase); +extern void USBHostReset(unsigned long ulBase, tBoolean bStart); +extern void USBHostResume(unsigned long ulBase, tBoolean bStart); +extern unsigned long USBHostSpeedGet(unsigned long ulBase); +extern void USBHostSuspend(unsigned long ulBase); +extern void USBIntDisableControl(unsigned long ulBase, + unsigned long ulIntFlags); +extern void USBIntEnableControl(unsigned long ulBase, + unsigned long ulIntFlags); +extern unsigned long USBIntStatusControl(unsigned long ulBase); +extern void USBIntDisableEndpoint(unsigned long ulBase, + unsigned long ulIntFlags); +extern void USBIntEnableEndpoint(unsigned long ulBase, + unsigned long ulIntFlags); +extern unsigned long USBIntStatusEndpoint(unsigned long ulBase); +extern void USBIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void USBIntUnregister(unsigned long ulBase); +extern void USBOTGSessionRequest(unsigned long ulBase, tBoolean bStart); +extern unsigned long USBModeGet(unsigned long ulBase); +extern void USBEndpointDMAChannel(unsigned long ulBase, + unsigned long ulEndpoint, + unsigned long ulChannel); +extern void USBHostMode(unsigned long ulBase); +extern void USBHostMode(unsigned long ulBase); +extern void USBDevMode(unsigned long ulBase); +extern void USBPHYPowerOff(unsigned long ulBase); +extern void USBPHYPowerOn(unsigned long ulBase); + +//***************************************************************************** +// +// Several USB APIs have been renamed, with the original function name being +// deprecated. These defines and function protypes provide backward +// compatibility. +// +//***************************************************************************** +#ifndef DEPRECATED +//***************************************************************************** +// +// The following are values that can be passed to USBIntEnable() and +// USBIntDisable() as the ulIntFlags parameter, and are returned from +// USBIntStatus(). +// +//***************************************************************************** +#define USB_INT_ALL 0xFF030E0F // All Interrupt sources +#define USB_INT_STATUS 0xFF000000 // Status Interrupts +#define USB_INT_VBUS_ERR 0x80000000 // VBUS Error +#define USB_INT_SESSION_START 0x40000000 // Session Start Detected +#define USB_INT_SESSION_END 0x20000000 // Session End Detected +#define USB_INT_DISCONNECT 0x20000000 // Disconnect Detected +#define USB_INT_CONNECT 0x10000000 // Device Connect Detected +#define USB_INT_SOF 0x08000000 // Start of Frame Detected +#define USB_INT_BABBLE 0x04000000 // Babble signaled +#define USB_INT_RESET 0x04000000 // Reset signaled +#define USB_INT_RESUME 0x02000000 // Resume detected +#define USB_INT_SUSPEND 0x01000000 // Suspend detected +#define USB_INT_MODE_DETECT 0x00020000 // Mode value valid +#define USB_INT_POWER_FAULT 0x00010000 // Power Fault detected +#define USB_INT_HOST_IN 0x00000E00 // Host IN Interrupts +#define USB_INT_DEV_OUT 0x00000E00 // Device OUT Interrupts +#define USB_INT_HOST_IN_EP3 0x00000800 // Endpoint 3 Host IN Interrupt +#define USB_INT_HOST_IN_EP2 0x00000400 // Endpoint 2 Host IN Interrupt +#define USB_INT_HOST_IN_EP1 0x00000200 // Endpoint 1 Host IN Interrupt +#define USB_INT_DEV_OUT_EP3 0x00000800 // Endpoint 3 Device OUT Interrupt +#define USB_INT_DEV_OUT_EP2 0x00000400 // Endpoint 2 Device OUT Interrupt +#define USB_INT_DEV_OUT_EP1 0x00000200 // Endpoint 1 Device OUT Interrupt +#define USB_INT_HOST_OUT 0x0000000E // Host OUT Interrupts +#define USB_INT_DEV_IN 0x0000000E // Device IN Interrupts +#define USB_INT_HOST_OUT_EP3 0x00000008 // Endpoint 3 HOST_OUT Interrupt +#define USB_INT_HOST_OUT_EP2 0x00000004 // Endpoint 2 HOST_OUT Interrupt +#define USB_INT_HOST_OUT_EP1 0x00000002 // Endpoint 1 HOST_OUT Interrupt +#define USB_INT_DEV_IN_EP3 0x00000008 // Endpoint 3 DEV_IN Interrupt +#define USB_INT_DEV_IN_EP2 0x00000004 // Endpoint 2 DEV_IN Interrupt +#define USB_INT_DEV_IN_EP1 0x00000002 // Endpoint 1 DEV_IN Interrupt +#define USB_INT_EP0 0x00000001 // Endpoint 0 Interrupt + +#define USBDevEndpointConfig USBDevEndpointConfigSet +extern void USBIntDisable(unsigned long ulBase, unsigned long ulIntFlags); +extern void USBIntEnable(unsigned long ulBase, unsigned long ulIntFlags); +extern unsigned long USBIntStatus(unsigned long ulBase); +#endif + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __USB_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.c new file mode 100644 index 00000000..e9d66c9d --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.c @@ -0,0 +1,564 @@ +//***************************************************************************** +// +// watchdog.c - Driver for the Watchdog Timer Module. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +//***************************************************************************** +// +//! \addtogroup watchdog_api +//! @{ +// +//***************************************************************************** + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "inc/hw_watchdog.h" +#include "driverlib/debug.h" +#include "driverlib/interrupt.h" +#include "driverlib/watchdog.h" + +//***************************************************************************** +// +//! Determines if the watchdog timer is enabled. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This will check to see if the watchdog timer is enabled. +//! +//! \return Returns \b true if the watchdog timer is enabled, and \b false +//! if it is not. +// +//***************************************************************************** +tBoolean +WatchdogRunning(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // See if the watchdog timer module is enabled, and return. + // + return(HWREG(ulBase + WDT_O_CTL) & WDT_CTL_INTEN); +} + +//***************************************************************************** +// +//! Enables the watchdog timer. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This will enable the watchdog timer counter and interrupt. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog timer module. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_INTEN; +} + +//***************************************************************************** +// +//! Enables the watchdog timer reset. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables the capability of the watchdog timer to issue a reset to the +//! processor upon a second timeout condition. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogResetEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog reset. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_RESEN; +} + +//***************************************************************************** +// +//! Disables the watchdog timer reset. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Disables the capability of the watchdog timer to issue a reset to the +//! processor upon a second timeout condition. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogResetDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable the watchdog reset. + // + HWREG(ulBase + WDT_O_CTL) &= ~(WDT_CTL_RESEN); +} + +//***************************************************************************** +// +//! Enables the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Locks out write access to the watchdog timer configuration registers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogLock(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Lock out watchdog register writes. Writing anything to the WDT_O_LOCK + // register causes the lock to go into effect. + // + HWREG(ulBase + WDT_O_LOCK) = WDT_LOCK_LOCKED; +} + +//***************************************************************************** +// +//! Disables the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables write access to the watchdog timer configuration registers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogUnlock(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Unlock watchdog register writes. + // + HWREG(ulBase + WDT_O_LOCK) = WDT_LOCK_UNLOCK; +} + +//***************************************************************************** +// +//! Gets the state of the watchdog timer lock mechanism. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Returns the lock state of the watchdog timer registers. +//! +//! \return Returns \b true if the watchdog timer registers are locked, and +//! \b false if they are not locked. +// +//***************************************************************************** +tBoolean +WatchdogLockState(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the lock state. + // + return((HWREG(ulBase + WDT_O_LOCK) == WDT_LOCK_LOCKED) ? true : false); +} + +//***************************************************************************** +// +//! Sets the watchdog timer reload value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param ulLoadVal is the load value for the watchdog timer. +//! +//! This function sets the value to load into the watchdog timer when the count +//! reaches zero for the first time; if the watchdog timer is running when this +//! function is called, then the value will be immediately loaded into the +//! watchdog timer counter. If the \e ulLoadVal parameter is 0, then an +//! interrupt is immediately generated. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock(), WatchdogReloadGet() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogReloadSet(unsigned long ulBase, unsigned long ulLoadVal) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Set the load register. + // + HWREG(ulBase + WDT_O_LOAD) = ulLoadVal; +} + +//***************************************************************************** +// +//! Gets the watchdog timer reload value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function gets the value that is loaded into the watchdog timer when +//! the count reaches zero for the first time. +//! +//! \sa WatchdogReloadSet() +//! +//! \return None. +// +//***************************************************************************** +unsigned long +WatchdogReloadGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the load register. + // + return(HWREG(ulBase + WDT_O_LOAD)); +} + +//***************************************************************************** +// +//! Gets the current watchdog timer value. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function reads the current value of the watchdog timer. +//! +//! \return Returns the current value of the watchdog timer. +// +//***************************************************************************** +unsigned long +WatchdogValueGet(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Get the current watchdog timer register value. + // + return(HWREG(ulBase + WDT_O_VALUE)); +} + +//***************************************************************************** +// +//! Registers an interrupt handler for watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param pfnHandler is a pointer to the function to be called when the +//! watchdog timer interrupt occurs. +//! +//! This function does the actual registering of the interrupt handler. This +//! will enable the global interrupt in the interrupt controller; the watchdog +//! timer interrupt must be enabled via WatchdogEnable(). It is the interrupt +//! handler's responsibility to clear the interrupt source via +//! WatchdogIntClear(). +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Register the interrupt handler. + // + IntRegister(INT_WATCHDOG, pfnHandler); + + // + // Enable the watchdog timer interrupt. + // + IntEnable(INT_WATCHDOG); +} + +//***************************************************************************** +// +//! Unregisters an interrupt handler for the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function does the actual unregistering of the interrupt handler. This +//! function will clear the handler to be called when a watchdog timer +//! interrupt occurs. This will also mask off the interrupt in the interrupt +//! controller so that the interrupt handler no longer is called. +//! +//! \sa IntRegister() for important information about registering interrupt +//! handlers. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntUnregister(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable the interrupt. + // + IntDisable(INT_WATCHDOG); + + // + // Unregister the interrupt handler. + // + IntUnregister(INT_WATCHDOG); +} + +//***************************************************************************** +// +//! Enables the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! Enables the watchdog timer interrupt. +//! +//! \note This function will have no effect if the watchdog timer has +//! been locked. +//! +//! \sa WatchdogLock(), WatchdogUnlock(), WatchdogEnable() +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable the watchdog interrupt. + // + HWREG(ulBase + WDT_O_CTL) |= WDT_CTL_INTEN; +} + +//***************************************************************************** +// +//! Gets the current watchdog timer interrupt status. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! \param bMasked is \b false if the raw interrupt status is required and +//! \b true if the masked interrupt status is required. +//! +//! This returns the interrupt status for the watchdog timer module. Either +//! the raw interrupt status or the status of interrupt that is allowed to +//! reflect to the processor can be returned. +//! +//! \return Returns the current interrupt status, where a 1 indicates that the +//! watchdog interrupt is active, and a 0 indicates that it is not active. +// +//***************************************************************************** +unsigned long +WatchdogIntStatus(unsigned long ulBase, tBoolean bMasked) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Return either the interrupt status or the raw interrupt status as + // requested. + // + if(bMasked) + { + return(HWREG(ulBase + WDT_O_MIS)); + } + else + { + return(HWREG(ulBase + WDT_O_RIS)); + } +} + +//***************************************************************************** +// +//! Clears the watchdog timer interrupt. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! The watchdog timer interrupt source is cleared, so that it no longer +//! asserts. +//! +//! \note Because there is a write buffer in the Cortex-M3 processor, it may +//! take several clock cycles before the interrupt source is actually cleared. +//! Therefore, it is recommended that the interrupt source be cleared early in +//! the interrupt handler (as opposed to the very last action) to avoid +//! returning from the interrupt handler before the interrupt source is +//! actually cleared. Failure to do so may result in the interrupt handler +//! being immediately reentered (because the interrupt controller still sees +//! the interrupt source asserted). +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogIntClear(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Clear the interrupt source. + // + HWREG(ulBase + WDT_O_ICR) = WDT_INT_TIMEOUT; +} + +//***************************************************************************** +// +//! Enables stalling of the watchdog timer during debug events. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function allows the watchdog timer to stop counting when the processor +//! is stopped by the debugger. By doing so, the watchdog is prevented from +//! expiring (typically almost immediately from a human time perspective) and +//! resetting the system (if reset is enabled). The watchdog will instead +//! expired after the appropriate number of processor cycles have been executed +//! while debugging (or at the appropriate time after the processor has been +//! restarted). +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogStallEnable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Enable timer stalling. + // + HWREG(ulBase + WDT_O_TEST) |= WDT_TEST_STALL; +} + +//***************************************************************************** +// +//! Disables stalling of the watchdog timer during debug events. +//! +//! \param ulBase is the base address of the watchdog timer module. +//! +//! This function disables the debug mode stall of the watchdog timer. By +//! doing so, the watchdog timer continues to count regardless of the processor +//! debug state. +//! +//! \return None. +// +//***************************************************************************** +void +WatchdogStallDisable(unsigned long ulBase) +{ + // + // Check the arguments. + // + ASSERT((ulBase == WATCHDOG0_BASE) || (ulBase == WATCHDOG1_BASE)); + + // + // Disable timer stalling. + // + HWREG(ulBase + WDT_O_TEST) &= ~(WDT_TEST_STALL); +} + +//***************************************************************************** +// +// Close the Doxygen group. +//! @} +// +//***************************************************************************** diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.h new file mode 100644 index 00000000..93b38879 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/driverlib/watchdog.h @@ -0,0 +1,71 @@ +//***************************************************************************** +// +// watchdog.h - Prototypes for the Watchdog Timer API +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Peripheral Driver Library. +// +//***************************************************************************** + +#ifndef __WATCHDOG_H__ +#define __WATCHDOG_H__ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** +#ifdef __cplusplus +extern "C" +{ +#endif + +//***************************************************************************** +// +// Prototypes for the APIs. +// +//***************************************************************************** +extern tBoolean WatchdogRunning(unsigned long ulBase); +extern void WatchdogEnable(unsigned long ulBase); +extern void WatchdogResetEnable(unsigned long ulBase); +extern void WatchdogResetDisable(unsigned long ulBase); +extern void WatchdogLock(unsigned long ulBase); +extern void WatchdogUnlock(unsigned long ulBase); +extern tBoolean WatchdogLockState(unsigned long ulBase); +extern void WatchdogReloadSet(unsigned long ulBase, unsigned long ulLoadVal); +extern unsigned long WatchdogReloadGet(unsigned long ulBase); +extern unsigned long WatchdogValueGet(unsigned long ulBase); +extern void WatchdogIntRegister(unsigned long ulBase, void(*pfnHandler)(void)); +extern void WatchdogIntUnregister(unsigned long ulBase); +extern void WatchdogIntEnable(unsigned long ulBase); +extern unsigned long WatchdogIntStatus(unsigned long ulBase, tBoolean bMasked); +extern void WatchdogIntClear(unsigned long ulBase); +extern void WatchdogStallEnable(unsigned long ulBase); +extern void WatchdogStallDisable(unsigned long ulBase); + +//***************************************************************************** +// +// Mark the end of the C bindings section for C++ compilers. +// +//***************************************************************************** +#ifdef __cplusplus +} +#endif + +#endif // __WATCHDOG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/asmdefs.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/asmdefs.h new file mode 100644 index 00000000..6a134fd1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/asmdefs.h @@ -0,0 +1,212 @@ +//***************************************************************************** +// +// asmdefs.h - Macros to allow assembly code be portable among toolchains. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __ASMDEFS_H__ +#define __ASMDEFS_H__ + +//***************************************************************************** +// +// The defines required for code_red. +// +//***************************************************************************** +#ifdef codered + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // codered + +//***************************************************************************** +// +// The defines required for EW-ARM. +// +//***************************************************************************** +#ifdef ewarm + +// +// Section headers. +// +#define __LIBRARY__ module +#define __TEXT__ rseg CODE:CODE(2) +#define __DATA__ rseg DATA:DATA(2) +#define __BSS__ rseg DATA:DATA(2) +#define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) + +// +// Assembler nmenonics. +// +#define __ALIGN__ alignrom 2 +#define __END__ end +#define __EXPORT__ export +#define __IMPORT__ import +#define __LABEL__ +#define __STR__ dcb +#define __THUMB_LABEL__ thumb +#define __WORD__ dcd +#define __INLINE_DATA__ data + +#endif // ewarm + +//***************************************************************************** +// +// The defines required for GCC. +// +//***************************************************************************** +#if defined(gcc) + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // gcc + +//***************************************************************************** +// +// The defines required for RV-MDK. +// +//***************************************************************************** +#ifdef rvmdk + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + thumb + require8 + preserve8 + +// +// Section headers. +// +#define __LIBRARY__ ; +#define __TEXT__ area ||.text||, code, readonly, align=2 +#define __DATA__ area ||.data||, data, align=2 +#define __BSS__ area ||.bss||, noinit, align=2 +#define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 + +// +// Assembler nmenonics. +// +#define __ALIGN__ align 4 +#define __END__ end +#define __EXPORT__ export +#define __IMPORT__ import +#define __LABEL__ +#define __STR__ dcb +#define __THUMB_LABEL__ +#define __WORD__ dcd +#define __INLINE_DATA__ + +#endif // rvmdk + +//***************************************************************************** +// +// The defines required for Sourcery G++. +// +//***************************************************************************** +#if defined(sourcerygxx) + +// +// The assembly code preamble required to put the assembler into the correct +// configuration. +// + .syntax unified + .thumb + +// +// Section headers. +// +#define __LIBRARY__ @ +#define __TEXT__ .text +#define __DATA__ .data +#define __BSS__ .bss +#define __TEXT_NOROOT__ .text + +// +// Assembler nmenonics. +// +#define __ALIGN__ .balign 4 +#define __END__ .end +#define __EXPORT__ .globl +#define __IMPORT__ .extern +#define __LABEL__ : +#define __STR__ .ascii +#define __THUMB_LABEL__ .thumb_func +#define __WORD__ .word +#define __INLINE_DATA__ + +#endif // sourcerygxx + +#endif // __ASMDEF_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_adc.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_adc.h new file mode 100644 index 00000000..872ad6f5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_adc.h @@ -0,0 +1,1193 @@ +//***************************************************************************** +// +// hw_adc.h - Macros used when accessing the ADC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_ADC_H__ +#define __HW_ADC_H__ + +//***************************************************************************** +// +// The following are defines for the ADC register offsets. +// +//***************************************************************************** +#define ADC_O_ACTSS 0x00000000 // ADC Active Sample Sequencer +#define ADC_O_RIS 0x00000004 // ADC Raw Interrupt Status +#define ADC_O_IM 0x00000008 // ADC Interrupt Mask +#define ADC_O_ISC 0x0000000C // ADC Interrupt Status and Clear +#define ADC_O_OSTAT 0x00000010 // ADC Overflow Status +#define ADC_O_EMUX 0x00000014 // ADC Event Multiplexer Select +#define ADC_O_USTAT 0x00000018 // ADC Underflow Status +#define ADC_O_SSPRI 0x00000020 // ADC Sample Sequencer Priority +#define ADC_O_SPC 0x00000024 // ADC Sample Phase Control +#define ADC_O_PSSI 0x00000028 // ADC Processor Sample Sequence + // Initiate +#define ADC_O_SAC 0x00000030 // ADC Sample Averaging Control +#define ADC_O_DCISC 0x00000034 // ADC Digital Comparator Interrupt + // Status and Clear +#define ADC_O_CTL 0x00000038 // ADC Control +#define ADC_O_SSMUX0 0x00000040 // ADC Sample Sequence Input + // Multiplexer Select 0 +#define ADC_O_SSCTL0 0x00000044 // ADC Sample Sequence Control 0 +#define ADC_O_SSFIFO0 0x00000048 // ADC Sample Sequence Result FIFO + // 0 +#define ADC_O_SSFSTAT0 0x0000004C // ADC Sample Sequence FIFO 0 + // Status +#define ADC_O_SSOP0 0x00000050 // ADC Sample Sequence 0 Operation +#define ADC_O_SSDC0 0x00000054 // ADC Sample Sequence 0 Digital + // Comparator Select +#define ADC_O_SSMUX1 0x00000060 // ADC Sample Sequence Input + // Multiplexer Select 1 +#define ADC_O_SSCTL1 0x00000064 // ADC Sample Sequence Control 1 +#define ADC_O_SSFIFO1 0x00000068 // ADC Sample Sequence Result FIFO + // 1 +#define ADC_O_SSFSTAT1 0x0000006C // ADC Sample Sequence FIFO 1 + // Status +#define ADC_O_SSOP1 0x00000070 // ADC Sample Sequence 1 Operation +#define ADC_O_SSDC1 0x00000074 // ADC Sample Sequence 1 Digital + // Comparator Select +#define ADC_O_SSMUX2 0x00000080 // ADC Sample Sequence Input + // Multiplexer Select 2 +#define ADC_O_SSCTL2 0x00000084 // ADC Sample Sequence Control 2 +#define ADC_O_SSFIFO2 0x00000088 // ADC Sample Sequence Result FIFO + // 2 +#define ADC_O_SSFSTAT2 0x0000008C // ADC Sample Sequence FIFO 2 + // Status +#define ADC_O_SSOP2 0x00000090 // ADC Sample Sequence 2 Operation +#define ADC_O_SSDC2 0x00000094 // ADC Sample Sequence 2 Digital + // Comparator Select +#define ADC_O_SSMUX3 0x000000A0 // ADC Sample Sequence Input + // Multiplexer Select 3 +#define ADC_O_SSCTL3 0x000000A4 // ADC Sample Sequence Control 3 +#define ADC_O_SSFIFO3 0x000000A8 // ADC Sample Sequence Result FIFO + // 3 +#define ADC_O_SSFSTAT3 0x000000AC // ADC Sample Sequence FIFO 3 + // Status +#define ADC_O_SSOP3 0x000000B0 // ADC Sample Sequence 3 Operation +#define ADC_O_SSDC3 0x000000B4 // ADC Sample Sequence 3 Digital + // Comparator Select +#define ADC_O_TMLB 0x00000100 // ADC Test Mode Loopback +#define ADC_O_DCRIC 0x00000D00 // ADC Digital Comparator Reset + // Initial Conditions +#define ADC_O_DCCTL0 0x00000E00 // ADC Digital Comparator Control 0 +#define ADC_O_DCCTL1 0x00000E04 // ADC Digital Comparator Control 1 +#define ADC_O_DCCTL2 0x00000E08 // ADC Digital Comparator Control 2 +#define ADC_O_DCCTL3 0x00000E0C // ADC Digital Comparator Control 3 +#define ADC_O_DCCTL4 0x00000E10 // ADC Digital Comparator Control 4 +#define ADC_O_DCCTL5 0x00000E14 // ADC Digital Comparator Control 5 +#define ADC_O_DCCTL6 0x00000E18 // ADC Digital Comparator Control 6 +#define ADC_O_DCCTL7 0x00000E1C // ADC Digital Comparator Control 7 +#define ADC_O_DCCMP0 0x00000E40 // ADC Digital Comparator Range 0 +#define ADC_O_DCCMP1 0x00000E44 // ADC Digital Comparator Range 1 +#define ADC_O_DCCMP2 0x00000E48 // ADC Digital Comparator Range 2 +#define ADC_O_DCCMP3 0x00000E4C // ADC Digital Comparator Range 3 +#define ADC_O_DCCMP4 0x00000E50 // ADC Digital Comparator Range 4 +#define ADC_O_DCCMP5 0x00000E54 // ADC Digital Comparator Range 5 +#define ADC_O_DCCMP6 0x00000E58 // ADC Digital Comparator Range 6 +#define ADC_O_DCCMP7 0x00000E5C // ADC Digital Comparator Range 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ACTSS register. +// +//***************************************************************************** +#define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable +#define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable +#define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable +#define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_RIS register. +// +//***************************************************************************** +#define ADC_RIS_INRDC 0x00010000 // Digital Comparator Raw Interrupt + // Status +#define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status +#define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status +#define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status +#define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_IM register. +// +//***************************************************************************** +#define ADC_IM_DCONSS3 0x00080000 // Digital Comparator Interrupt on + // SS3 +#define ADC_IM_DCONSS2 0x00040000 // Digital Comparator Interrupt on + // SS2 +#define ADC_IM_DCONSS1 0x00020000 // Digital Comparator Interrupt on + // SS1 +#define ADC_IM_DCONSS0 0x00010000 // Digital Comparator Interrupt on + // SS0 +#define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask +#define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask +#define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask +#define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ISC register. +// +//***************************************************************************** +#define ADC_ISC_DCINSS3 0x00080000 // Digital Comparator Interrupt + // Status on SS3 +#define ADC_ISC_DCINSS2 0x00040000 // Digital Comparator Interrupt + // Status on SS2 +#define ADC_ISC_DCINSS1 0x00020000 // Digital Comparator Interrupt + // Status on SS1 +#define ADC_ISC_DCINSS0 0x00010000 // Digital Comparator Interrupt + // Status on SS0 +#define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear +#define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear +#define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear +#define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_OSTAT register. +// +//***************************************************************************** +#define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow +#define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow +#define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow +#define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_EMUX register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select +#define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0 +#define ADC_EMUX_EM3_COMP1 0x00002000 // Analog Comparator 1 +#define ADC_EMUX_EM3_COMP2 0x00003000 // Analog Comparator 2 +#define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO PB4) +#define ADC_EMUX_EM3_TIMER 0x00005000 // Timer +#define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0 +#define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1 +#define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2 +#define ADC_EMUX_EM3_PWM3 0x00009000 // PWM3 +#define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample) +#define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select +#define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0 +#define ADC_EMUX_EM2_COMP1 0x00000200 // Analog Comparator 1 +#define ADC_EMUX_EM2_COMP2 0x00000300 // Analog Comparator 2 +#define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO PB4) +#define ADC_EMUX_EM2_TIMER 0x00000500 // Timer +#define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0 +#define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1 +#define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2 +#define ADC_EMUX_EM2_PWM3 0x00000900 // PWM3 +#define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample) +#define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select +#define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0 +#define ADC_EMUX_EM1_COMP1 0x00000020 // Analog Comparator 1 +#define ADC_EMUX_EM1_COMP2 0x00000030 // Analog Comparator 2 +#define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO PB4) +#define ADC_EMUX_EM1_TIMER 0x00000050 // Timer +#define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0 +#define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1 +#define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2 +#define ADC_EMUX_EM1_PWM3 0x00000090 // PWM3 +#define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample) +#define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select +#define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0 +#define ADC_EMUX_EM0_COMP1 0x00000002 // Analog Comparator 1 +#define ADC_EMUX_EM0_COMP2 0x00000003 // Analog Comparator 2 +#define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO PB4) +#define ADC_EMUX_EM0_TIMER 0x00000005 // Timer +#define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0 +#define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1 +#define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2 +#define ADC_EMUX_EM0_PWM3 0x00000009 // PWM3 +#define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample) + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_USTAT register. +// +//***************************************************************************** +#define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow +#define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow +#define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow +#define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSPRI register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority +#define ADC_SSPRI_SS3_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority +#define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority +#define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority +#define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority +#define ADC_SSPRI_SS2_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority +#define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority +#define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority +#define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority +#define ADC_SSPRI_SS1_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority +#define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority +#define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority +#define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority +#define ADC_SSPRI_SS0_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority +#define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority +#define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SPC register. +// +//***************************************************************************** +#define ADC_SPC_PHASE_M 0x0000000F // Phase Difference +#define ADC_SPC_PHASE_0 0x00000000 // ADC sample lags by 0.0 +#define ADC_SPC_PHASE_22_5 0x00000001 // ADC sample lags by 22.5 +#define ADC_SPC_PHASE_45 0x00000002 // ADC sample lags by 45.0 +#define ADC_SPC_PHASE_67_5 0x00000003 // ADC sample lags by 67.5 +#define ADC_SPC_PHASE_90 0x00000004 // ADC sample lags by 90.0 +#define ADC_SPC_PHASE_112_5 0x00000005 // ADC sample lags by 112.5 +#define ADC_SPC_PHASE_135 0x00000006 // ADC sample lags by 135.0 +#define ADC_SPC_PHASE_157_5 0x00000007 // ADC sample lags by 157.5 +#define ADC_SPC_PHASE_180 0x00000008 // ADC sample lags by 180.0 +#define ADC_SPC_PHASE_202_5 0x00000009 // ADC sample lags by 202.5 +#define ADC_SPC_PHASE_225 0x0000000A // ADC sample lags by 225.0 +#define ADC_SPC_PHASE_247_5 0x0000000B // ADC sample lags by 247.5 +#define ADC_SPC_PHASE_270 0x0000000C // ADC sample lags by 270.0 +#define ADC_SPC_PHASE_292_5 0x0000000D // ADC sample lags by 292.5 +#define ADC_SPC_PHASE_315 0x0000000E // ADC sample lags by 315.0 +#define ADC_SPC_PHASE_337_5 0x0000000F // ADC sample lags by 337.5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_PSSI register. +// +//***************************************************************************** +#define ADC_PSSI_GSYNC 0x80000000 // Global Synchronize +#define ADC_PSSI_SYNCWAIT 0x08000000 // Synchronize Wait +#define ADC_PSSI_SS3 0x00000008 // SS3 Initiate +#define ADC_PSSI_SS2 0x00000004 // SS2 Initiate +#define ADC_PSSI_SS1 0x00000002 // SS1 Initiate +#define ADC_PSSI_SS0 0x00000001 // SS0 Initiate + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SAC register. +// +//***************************************************************************** +#define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control +#define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling +#define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling +#define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling +#define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling +#define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling +#define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling +#define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCISC register. +// +//***************************************************************************** +#define ADC_DCISC_DCINT7 0x00000080 // Digital Comparator 7 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT6 0x00000040 // Digital Comparator 6 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT5 0x00000020 // Digital Comparator 5 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT4 0x00000010 // Digital Comparator 4 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT3 0x00000008 // Digital Comparator 3 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT2 0x00000004 // Digital Comparator 2 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT1 0x00000002 // Digital Comparator 1 Interrupt + // Status and Clear +#define ADC_DCISC_DCINT0 0x00000001 // Digital Comparator 0 Interrupt + // Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_CTL register. +// +//***************************************************************************** +#define ADC_CTL_VREF 0x00000001 // Voltage Reference Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX0 register. +// +//***************************************************************************** +#define ADC_SSMUX0_MUX7_M 0xF0000000 // 8th Sample Input Select +#define ADC_SSMUX0_MUX6_M 0x0F000000 // 7th Sample Input Select +#define ADC_SSMUX0_MUX5_M 0x00F00000 // 6th Sample Input Select +#define ADC_SSMUX0_MUX4_M 0x000F0000 // 5th Sample Input Select +#define ADC_SSMUX0_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX0_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX0_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX0_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX0_MUX7_S 28 +#define ADC_SSMUX0_MUX6_S 24 +#define ADC_SSMUX0_MUX5_S 20 +#define ADC_SSMUX0_MUX4_S 16 +#define ADC_SSMUX0_MUX3_S 12 +#define ADC_SSMUX0_MUX2_S 8 +#define ADC_SSMUX0_MUX1_S 4 +#define ADC_SSMUX0_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL0 register. +// +//***************************************************************************** +#define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select +#define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable +#define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence +#define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select +#define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select +#define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable +#define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence +#define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select +#define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select +#define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable +#define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence +#define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select +#define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select +#define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable +#define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence +#define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select +#define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO0 register. +// +//***************************************************************************** +#define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT0 register. +// +//***************************************************************************** +#define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT0_HPTR_S 4 +#define ADC_SSFSTAT0_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP0 register. +// +//***************************************************************************** +#define ADC_SSOP0_S7DCOP 0x10000000 // Sample 7 Digital Comparator + // Operation +#define ADC_SSOP0_S6DCOP 0x01000000 // Sample 6 Digital Comparator + // Operation +#define ADC_SSOP0_S5DCOP 0x00100000 // Sample 5 Digital Comparator + // Operation +#define ADC_SSOP0_S4DCOP 0x00010000 // Sample 4 Digital Comparator + // Operation +#define ADC_SSOP0_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP0_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP0_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP0_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC0 register. +// +//***************************************************************************** +#define ADC_SSDC0_S7DCSEL_M 0xF0000000 // Sample 7 Digital Comparator + // Select +#define ADC_SSDC0_S6DCSEL_M 0x0F000000 // Sample 6 Digital Comparator + // Select +#define ADC_SSDC0_S5DCSEL_M 0x00F00000 // Sample 5 Digital Comparator + // Select +#define ADC_SSDC0_S4DCSEL_M 0x000F0000 // Sample 4 Digital Comparator + // Select +#define ADC_SSDC0_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC0_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC0_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC0_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC0_S6DCSEL_S 24 +#define ADC_SSDC0_S5DCSEL_S 20 +#define ADC_SSDC0_S4DCSEL_S 16 +#define ADC_SSDC0_S3DCSEL_S 12 +#define ADC_SSDC0_S2DCSEL_S 8 +#define ADC_SSDC0_S1DCSEL_S 4 +#define ADC_SSDC0_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX1 register. +// +//***************************************************************************** +#define ADC_SSMUX1_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX1_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX1_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX1_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX1_MUX3_S 12 +#define ADC_SSMUX1_MUX2_S 8 +#define ADC_SSMUX1_MUX1_S 4 +#define ADC_SSMUX1_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL1 register. +// +//***************************************************************************** +#define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO1 register. +// +//***************************************************************************** +#define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT1 register. +// +//***************************************************************************** +#define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT1_HPTR_S 4 +#define ADC_SSFSTAT1_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP1 register. +// +//***************************************************************************** +#define ADC_SSOP1_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP1_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP1_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP1_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC1 register. +// +//***************************************************************************** +#define ADC_SSDC1_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC1_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC1_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC1_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC1_S2DCSEL_S 8 +#define ADC_SSDC1_S1DCSEL_S 4 +#define ADC_SSDC1_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX2 register. +// +//***************************************************************************** +#define ADC_SSMUX2_MUX3_M 0x0000F000 // 4th Sample Input Select +#define ADC_SSMUX2_MUX2_M 0x00000F00 // 3rd Sample Input Select +#define ADC_SSMUX2_MUX1_M 0x000000F0 // 2nd Sample Input Select +#define ADC_SSMUX2_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX2_MUX3_S 12 +#define ADC_SSMUX2_MUX2_S 8 +#define ADC_SSMUX2_MUX1_S 4 +#define ADC_SSMUX2_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL2 register. +// +//***************************************************************************** +#define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO2 register. +// +//***************************************************************************** +#define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT2 register. +// +//***************************************************************************** +#define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT2_HPTR_S 4 +#define ADC_SSFSTAT2_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP2 register. +// +//***************************************************************************** +#define ADC_SSOP2_S3DCOP 0x00001000 // Sample 3 Digital Comparator + // Operation +#define ADC_SSOP2_S2DCOP 0x00000100 // Sample 2 Digital Comparator + // Operation +#define ADC_SSOP2_S1DCOP 0x00000010 // Sample 1 Digital Comparator + // Operation +#define ADC_SSOP2_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC2 register. +// +//***************************************************************************** +#define ADC_SSDC2_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator + // Select +#define ADC_SSDC2_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator + // Select +#define ADC_SSDC2_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator + // Select +#define ADC_SSDC2_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select +#define ADC_SSDC2_S2DCSEL_S 8 +#define ADC_SSDC2_S1DCSEL_S 4 +#define ADC_SSDC2_S0DCSEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX3 register. +// +//***************************************************************************** +#define ADC_SSMUX3_MUX0_M 0x0000000F // 1st Sample Input Select +#define ADC_SSMUX3_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL3 register. +// +//***************************************************************************** +#define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO3 register. +// +//***************************************************************************** +#define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT3 register. +// +//***************************************************************************** +#define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT3_HPTR_S 4 +#define ADC_SSFSTAT3_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSOP3 register. +// +//***************************************************************************** +#define ADC_SSOP3_S0DCOP 0x00000001 // Sample 0 Digital Comparator + // Operation + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSDC3 register. +// +//***************************************************************************** +#define ADC_SSDC3_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator + // Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_TMLB register. +// +//***************************************************************************** +#define ADC_TMLB_LB 0x00000001 // Loopback Mode Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCRIC register. +// +//***************************************************************************** +#define ADC_DCRIC_DCTRIG7 0x00800000 // Digital Comparator Trigger 7 +#define ADC_DCRIC_DCTRIG6 0x00400000 // Digital Comparator Trigger 6 +#define ADC_DCRIC_DCTRIG5 0x00200000 // Digital Comparator Trigger 5 +#define ADC_DCRIC_DCTRIG4 0x00100000 // Digital Comparator Trigger 4 +#define ADC_DCRIC_DCTRIG3 0x00080000 // Digital Comparator Trigger 3 +#define ADC_DCRIC_DCTRIG2 0x00040000 // Digital Comparator Trigger 2 +#define ADC_DCRIC_DCTRIG1 0x00020000 // Digital Comparator Trigger 1 +#define ADC_DCRIC_DCTRIG0 0x00010000 // Digital Comparator Trigger 0 +#define ADC_DCRIC_DCINT7 0x00000080 // Digital Comparator Interrupt 7 +#define ADC_DCRIC_DCINT6 0x00000040 // Digital Comparator Interrupt 6 +#define ADC_DCRIC_DCINT5 0x00000020 // Digital Comparator Interrupt 5 +#define ADC_DCRIC_DCINT4 0x00000010 // Digital Comparator Interrupt 4 +#define ADC_DCRIC_DCINT3 0x00000008 // Digital Comparator Interrupt 3 +#define ADC_DCRIC_DCINT2 0x00000004 // Digital Comparator Interrupt 2 +#define ADC_DCRIC_DCINT1 0x00000002 // Digital Comparator Interrupt 1 +#define ADC_DCRIC_DCINT0 0x00000001 // Digital Comparator Interrupt 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL0 register. +// +//***************************************************************************** +#define ADC_DCCTL0_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL0_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL0_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL0_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL0_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL0_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL0_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL0_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL0_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL0_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL0_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL0_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL0_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL0_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL0_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL0_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL0_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL0_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL0_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL0_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL1 register. +// +//***************************************************************************** +#define ADC_DCCTL1_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL1_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL1_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL1_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL1_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL1_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL1_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL1_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL1_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL1_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL1_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL1_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL1_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL1_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL1_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL1_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL1_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL1_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL1_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL1_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL2 register. +// +//***************************************************************************** +#define ADC_DCCTL2_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL2_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL2_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL2_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL2_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL2_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL2_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL2_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL2_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL2_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL2_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL2_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL2_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL2_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL2_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL2_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL2_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL2_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL2_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL2_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL3 register. +// +//***************************************************************************** +#define ADC_DCCTL3_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL3_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL3_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL3_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL3_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL3_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL3_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL3_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL3_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL3_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL3_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL3_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL3_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL3_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL3_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL3_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL3_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL3_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL3_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL3_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL4 register. +// +//***************************************************************************** +#define ADC_DCCTL4_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL4_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL4_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL4_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL4_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL4_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL4_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL4_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL4_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL4_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL4_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL4_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL4_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL4_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL4_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL4_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL4_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL4_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL4_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL4_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL5 register. +// +//***************************************************************************** +#define ADC_DCCTL5_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL5_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL5_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL5_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL5_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL5_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL5_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL5_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL5_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL5_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL5_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL5_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL5_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL5_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL5_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL5_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL5_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL5_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL5_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL5_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL6 register. +// +//***************************************************************************** +#define ADC_DCCTL6_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL6_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL6_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL6_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL6_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL6_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL6_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL6_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL6_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL6_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL6_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL6_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL6_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL6_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL6_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL6_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL6_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL6_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL6_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL6_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCTL7 register. +// +//***************************************************************************** +#define ADC_DCCTL7_CTE 0x00001000 // Comparison Trigger Enable +#define ADC_DCCTL7_CTC_M 0x00000C00 // Comparison Trigger Condition +#define ADC_DCCTL7_CTC_LOW 0x00000000 // Low Band +#define ADC_DCCTL7_CTC_MID 0x00000400 // Mid Band +#define ADC_DCCTL7_CTC_HIGH 0x00000C00 // High Band +#define ADC_DCCTL7_CTM_M 0x00000300 // Comparison Trigger Mode +#define ADC_DCCTL7_CTM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL7_CTM_ONCE 0x00000100 // Once +#define ADC_DCCTL7_CTM_HALWAYS 0x00000200 // Hysteresis Always +#define ADC_DCCTL7_CTM_HONCE 0x00000300 // Hysteresis Once +#define ADC_DCCTL7_CIE 0x00000010 // Comparison Interrupt Enable +#define ADC_DCCTL7_CIC_M 0x0000000C // Comparison Interrupt Condition +#define ADC_DCCTL7_CIC_LOW 0x00000000 // Low Band +#define ADC_DCCTL7_CIC_MID 0x00000004 // Mid Band +#define ADC_DCCTL7_CIC_HIGH 0x0000000C // High Band +#define ADC_DCCTL7_CIM_M 0x00000003 // Comparison Interrupt Mode +#define ADC_DCCTL7_CIM_ALWAYS 0x00000000 // Always +#define ADC_DCCTL7_CIM_ONCE 0x00000001 // Once +#define ADC_DCCTL7_CIM_HALWAYS 0x00000002 // Hysteresis Always +#define ADC_DCCTL7_CIM_HONCE 0x00000003 // Hysteresis Once + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP0 register. +// +//***************************************************************************** +#define ADC_DCCMP0_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP0_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP0_COMP1_S 16 +#define ADC_DCCMP0_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP1 register. +// +//***************************************************************************** +#define ADC_DCCMP1_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP1_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP1_COMP1_S 16 +#define ADC_DCCMP1_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP2 register. +// +//***************************************************************************** +#define ADC_DCCMP2_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP2_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP2_COMP1_S 16 +#define ADC_DCCMP2_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP3 register. +// +//***************************************************************************** +#define ADC_DCCMP3_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP3_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP3_COMP1_S 16 +#define ADC_DCCMP3_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP4 register. +// +//***************************************************************************** +#define ADC_DCCMP4_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP4_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP4_COMP1_S 16 +#define ADC_DCCMP4_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP5 register. +// +//***************************************************************************** +#define ADC_DCCMP5_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP5_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP5_COMP1_S 16 +#define ADC_DCCMP5_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP6 register. +// +//***************************************************************************** +#define ADC_DCCMP6_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP6_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP6_COMP1_S 16 +#define ADC_DCCMP6_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_DCCMP7 register. +// +//***************************************************************************** +#define ADC_DCCMP7_COMP1_M 0x03FF0000 // Compare 1 +#define ADC_DCCMP7_COMP0_M 0x000003FF // Compare 0 +#define ADC_DCCMP7_COMP1_S 16 +#define ADC_DCCMP7_COMP0_S 0 + +//***************************************************************************** +// +// The following are defines for the the interpretation of the data in the +// SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift +#define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_O_EMUX +// register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_MASK 0x0000F000 // Event mux 3 mask +#define ADC_EMUX_EM2_MASK 0x00000F00 // Event mux 2 mask +#define ADC_EMUX_EM1_MASK 0x000000F0 // Event mux 1 mask +#define ADC_EMUX_EM0_MASK 0x0000000F // Event mux 0 mask +#define ADC_EMUX_EM3_SHIFT 12 // The shift for the fourth event +#define ADC_EMUX_EM2_SHIFT 8 // The shift for the third event +#define ADC_EMUX_EM1_SHIFT 4 // The shift for the second event +#define ADC_EMUX_EM0_SHIFT 0 // The shift for the first event + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_O_SSPRI +// register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_MASK 0x00003000 // Sequencer 3 priority mask +#define ADC_SSPRI_SS2_MASK 0x00000300 // Sequencer 2 priority mask +#define ADC_SSPRI_SS1_MASK 0x00000030 // Sequencer 1 priority mask +#define ADC_SSPRI_SS0_MASK 0x00000003 // Sequencer 0 priority mask + +//***************************************************************************** +// +// The following are deprecated defines for the ADC sequence register offsets.. +// +//***************************************************************************** +#define ADC_O_SEQ 0x00000040 // Offset to the first sequence +#define ADC_O_SEQ_STEP 0x00000020 // Increment to the next sequence +#define ADC_O_X_SSFSTAT 0x0000000C // FIFO status register +#define ADC_O_X_SSFIFO 0x00000008 // Result FIFO register +#define ADC_O_X_SSCTL 0x00000004 // Sample sequence control register +#define ADC_O_X_SSMUX 0x00000000 // Multiplexer select register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSMUX0, +// ADC_SSMUX1, ADC_SSMUX2, and ADC_SSMUX3 registers. Not all fields are present +// in all registers.. +// +//***************************************************************************** +#define ADC_SSMUX_MUX7_MASK 0x70000000 // 8th mux select mask +#define ADC_SSMUX_MUX6_MASK 0x07000000 // 7th mux select mask +#define ADC_SSMUX_MUX5_MASK 0x00700000 // 6th mux select mask +#define ADC_SSMUX_MUX4_MASK 0x00070000 // 5th mux select mask +#define ADC_SSMUX_MUX3_MASK 0x00007000 // 4th mux select mask +#define ADC_SSMUX_MUX2_MASK 0x00000700 // 3rd mux select mask +#define ADC_SSMUX_MUX1_MASK 0x00000070 // 2nd mux select mask +#define ADC_SSMUX_MUX0_MASK 0x00000007 // 1st mux select mask +#define ADC_SSMUX_MUX7_SHIFT 28 +#define ADC_SSMUX_MUX6_SHIFT 24 +#define ADC_SSMUX_MUX5_SHIFT 20 +#define ADC_SSMUX_MUX4_SHIFT 16 +#define ADC_SSMUX_MUX3_SHIFT 12 +#define ADC_SSMUX_MUX2_SHIFT 8 +#define ADC_SSMUX_MUX1_SHIFT 4 +#define ADC_SSMUX_MUX0_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSCTL0, +// ADC_SSCTL1, ADC_SSCTL2, and ADC_SSCTL3 registers. Not all fields are present +// in all registers. +// +//***************************************************************************** +#define ADC_SSCTL_TS7 0x80000000 // 8th temperature sensor select +#define ADC_SSCTL_IE7 0x40000000 // 8th interrupt enable +#define ADC_SSCTL_END7 0x20000000 // 8th sequence end select +#define ADC_SSCTL_D7 0x10000000 // 8th differential select +#define ADC_SSCTL_TS6 0x08000000 // 7th temperature sensor select +#define ADC_SSCTL_IE6 0x04000000 // 7th interrupt enable +#define ADC_SSCTL_END6 0x02000000 // 7th sequence end select +#define ADC_SSCTL_D6 0x01000000 // 7th differential select +#define ADC_SSCTL_TS5 0x00800000 // 6th temperature sensor select +#define ADC_SSCTL_IE5 0x00400000 // 6th interrupt enable +#define ADC_SSCTL_END5 0x00200000 // 6th sequence end select +#define ADC_SSCTL_D5 0x00100000 // 6th differential select +#define ADC_SSCTL_TS4 0x00080000 // 5th temperature sensor select +#define ADC_SSCTL_IE4 0x00040000 // 5th interrupt enable +#define ADC_SSCTL_END4 0x00020000 // 5th sequence end select +#define ADC_SSCTL_D4 0x00010000 // 5th differential select +#define ADC_SSCTL_TS3 0x00008000 // 4th temperature sensor select +#define ADC_SSCTL_IE3 0x00004000 // 4th interrupt enable +#define ADC_SSCTL_END3 0x00002000 // 4th sequence end select +#define ADC_SSCTL_D3 0x00001000 // 4th differential select +#define ADC_SSCTL_TS2 0x00000800 // 3rd temperature sensor select +#define ADC_SSCTL_IE2 0x00000400 // 3rd interrupt enable +#define ADC_SSCTL_END2 0x00000200 // 3rd sequence end select +#define ADC_SSCTL_D2 0x00000100 // 3rd differential select +#define ADC_SSCTL_TS1 0x00000080 // 2nd temperature sensor select +#define ADC_SSCTL_IE1 0x00000040 // 2nd interrupt enable +#define ADC_SSCTL_END1 0x00000020 // 2nd sequence end select +#define ADC_SSCTL_D1 0x00000010 // 2nd differential select +#define ADC_SSCTL_TS0 0x00000008 // 1st temperature sensor select +#define ADC_SSCTL_IE0 0x00000004 // 1st interrupt enable +#define ADC_SSCTL_END0 0x00000002 // 1st sequence end select +#define ADC_SSCTL_D0 0x00000001 // 1st differential select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSFIFO0, +// ADC_SSFIFO1, ADC_SSFIFO2, and ADC_SSFIFO3 registers. +// +//***************************************************************************** +#define ADC_SSFIFO_DATA_MASK 0x000003FF // Sample data +#define ADC_SSFIFO_DATA_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the ADC_SSFSTAT0, +// ADC_SSFSTAT1, ADC_SSFSTAT2, and ADC_SSFSTAT3 registers. +// +//***************************************************************************** +#define ADC_SSFSTAT_FULL 0x00001000 // FIFO is full +#define ADC_SSFSTAT_EMPTY 0x00000100 // FIFO is empty +#define ADC_SSFSTAT_HPTR 0x000000F0 // FIFO head pointer +#define ADC_SSFSTAT_TPTR 0x0000000F // FIFO tail pointer + +//***************************************************************************** +// +// The following are deprecated defines for the the interpretation of the data +// in the SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_TMLB_CNT_S 6 // Sample counter shift +#define ADC_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the loopback ADC +// data. +// +//***************************************************************************** +#define ADC_LB_CNT_MASK 0x000003C0 // Sample counter mask +#define ADC_LB_CONT 0x00000020 // Continuation sample +#define ADC_LB_DIFF 0x00000010 // Differential sample +#define ADC_LB_TS 0x00000008 // Temperature sensor sample +#define ADC_LB_MUX_MASK 0x00000007 // Input channel number mask +#define ADC_LB_CNT_SHIFT 6 // Sample counter shift +#define ADC_LB_MUX_SHIFT 0 // Input channel number shift + +#endif + +#endif // __HW_ADC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_can.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_can.h new file mode 100644 index 00000000..f8ee925c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_can.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_can.h - Defines and macros used when accessing the CAN controllers. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_CAN_H__ +#define __HW_CAN_H__ + +//***************************************************************************** +// +// The following are defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_CTL 0x00000000 // CAN Control +#define CAN_O_STS 0x00000004 // CAN Status +#define CAN_O_ERR 0x00000008 // CAN Error Counter +#define CAN_O_BIT 0x0000000C // CAN Bit Timing +#define CAN_O_INT 0x00000010 // CAN Interrupt +#define CAN_O_TST 0x00000014 // CAN Test +#define CAN_O_BRPE 0x00000018 // CAN Baud Rate Prescaler + // Extension +#define CAN_O_IF1CRQ 0x00000020 // CAN IF1 Command Request +#define CAN_O_IF1CMSK 0x00000024 // CAN IF1 Command Mask +#define CAN_O_IF1MSK1 0x00000028 // CAN IF1 Mask 1 +#define CAN_O_IF1MSK2 0x0000002C // CAN IF1 Mask 2 +#define CAN_O_IF1ARB1 0x00000030 // CAN IF1 Arbitration 1 +#define CAN_O_IF1ARB2 0x00000034 // CAN IF1 Arbitration 2 +#define CAN_O_IF1MCTL 0x00000038 // CAN IF1 Message Control +#define CAN_O_IF1DA1 0x0000003C // CAN IF1 Data A1 +#define CAN_O_IF1DA2 0x00000040 // CAN IF1 Data A2 +#define CAN_O_IF1DB1 0x00000044 // CAN IF1 Data B1 +#define CAN_O_IF1DB2 0x00000048 // CAN IF1 Data B2 +#define CAN_O_IF2CRQ 0x00000080 // CAN IF2 Command Request +#define CAN_O_IF2CMSK 0x00000084 // CAN IF2 Command Mask +#define CAN_O_IF2MSK1 0x00000088 // CAN IF2 Mask 1 +#define CAN_O_IF2MSK2 0x0000008C // CAN IF2 Mask 2 +#define CAN_O_IF2ARB1 0x00000090 // CAN IF2 Arbitration 1 +#define CAN_O_IF2ARB2 0x00000094 // CAN IF2 Arbitration 2 +#define CAN_O_IF2MCTL 0x00000098 // CAN IF2 Message Control +#define CAN_O_IF2DA1 0x0000009C // CAN IF2 Data A1 +#define CAN_O_IF2DA2 0x000000A0 // CAN IF2 Data A2 +#define CAN_O_IF2DB1 0x000000A4 // CAN IF2 Data B1 +#define CAN_O_IF2DB2 0x000000A8 // CAN IF2 Data B2 +#define CAN_O_TXRQ1 0x00000100 // CAN Transmission Request 1 +#define CAN_O_TXRQ2 0x00000104 // CAN Transmission Request 2 +#define CAN_O_NWDA1 0x00000120 // CAN New Data 1 +#define CAN_O_NWDA2 0x00000124 // CAN New Data 2 +#define CAN_O_MSG1INT 0x00000140 // CAN Message 1 Interrupt Pending +#define CAN_O_MSG2INT 0x00000144 // CAN Message 2 Interrupt Pending +#define CAN_O_MSG1VAL 0x00000160 // CAN Message 1 Valid +#define CAN_O_MSG2VAL 0x00000164 // CAN Message 2 Valid + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_CTL register. +// +//***************************************************************************** +#define CAN_CTL_TEST 0x00000080 // Test Mode Enable +#define CAN_CTL_CCE 0x00000040 // Configuration Change Enable +#define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission +#define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable +#define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable +#define CAN_CTL_IE 0x00000002 // CAN Interrupt Enable +#define CAN_CTL_INIT 0x00000001 // Initialization + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_STS register. +// +//***************************************************************************** +#define CAN_STS_BOFF 0x00000080 // Bus-Off Status +#define CAN_STS_EWARN 0x00000040 // Warning Status +#define CAN_STS_EPASS 0x00000020 // Error Passive +#define CAN_STS_RXOK 0x00000010 // Received a Message Successfully +#define CAN_STS_TXOK 0x00000008 // Transmitted a Message + // Successfully +#define CAN_STS_LEC_M 0x00000007 // Last Error Code +#define CAN_STS_LEC_NONE 0x00000000 // No Error +#define CAN_STS_LEC_STUFF 0x00000001 // Stuff Error +#define CAN_STS_LEC_FORM 0x00000002 // Format Error +#define CAN_STS_LEC_ACK 0x00000003 // ACK Error +#define CAN_STS_LEC_BIT1 0x00000004 // Bit 1 Error +#define CAN_STS_LEC_BIT0 0x00000005 // Bit 0 Error +#define CAN_STS_LEC_CRC 0x00000006 // CRC Error +#define CAN_STS_LEC_NOEVENT 0x00000007 // No Event + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_ERR register. +// +//***************************************************************************** +#define CAN_ERR_RP 0x00008000 // Received Error Passive +#define CAN_ERR_REC_M 0x00007F00 // Receive Error Counter +#define CAN_ERR_TEC_M 0x000000FF // Transmit Error Counter +#define CAN_ERR_REC_S 8 +#define CAN_ERR_TEC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BIT register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2_M 0x00007000 // Time Segment after Sample Point +#define CAN_BIT_TSEG1_M 0x00000F00 // Time Segment Before Sample Point +#define CAN_BIT_SJW_M 0x000000C0 // (Re)Synchronization Jump Width +#define CAN_BIT_BRP_M 0x0000003F // Baud Rate Prescaler +#define CAN_BIT_TSEG2_S 12 +#define CAN_BIT_TSEG1_S 8 +#define CAN_BIT_SJW_S 6 +#define CAN_BIT_BRP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_INT register. +// +//***************************************************************************** +#define CAN_INT_INTID_M 0x0000FFFF // Interrupt Identifier +#define CAN_INT_INTID_NONE 0x00000000 // No interrupt pending +#define CAN_INT_INTID_STATUS 0x00008000 // Status Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TST register. +// +//***************************************************************************** +#define CAN_TST_RX 0x00000080 // Receive Observation +#define CAN_TST_TX_M 0x00000060 // Transmit Control +#define CAN_TST_TX_CANCTL 0x00000000 // CAN Module Control +#define CAN_TST_TX_SAMPLE 0x00000020 // Sample Point +#define CAN_TST_TX_DOMINANT 0x00000040 // Driven Low +#define CAN_TST_TX_RECESSIVE 0x00000060 // Driven High +#define CAN_TST_LBACK 0x00000010 // Loopback Mode +#define CAN_TST_SILENT 0x00000008 // Silent Mode +#define CAN_TST_BASIC 0x00000004 // Basic Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_BRPE register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE_M 0x0000000F // Baud Rate Prescaler Extension +#define CAN_BRPE_BRPE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CRQ register. +// +//***************************************************************************** +#define CAN_IF1CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF1CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF1CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF1CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1CMSK register. +// +//***************************************************************************** +#define CAN_IF1CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF1CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF1CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF1CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF1CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF1CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF1CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF1CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF1CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK1 register. +// +//***************************************************************************** +#define CAN_IF1MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF1MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MSK2 register. +// +//***************************************************************************** +#define CAN_IF1MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF1MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF1MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF1MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB1 register. +// +//***************************************************************************** +#define CAN_IF1ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF1ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1ARB2 register. +// +//***************************************************************************** +#define CAN_IF1ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF1ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF1ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF1ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF1ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1MCTL register. +// +//***************************************************************************** +#define CAN_IF1MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF1MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF1MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF1MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF1MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF1MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF1MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF1MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF1MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF1MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF1MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA1 register. +// +//***************************************************************************** +#define CAN_IF1DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DA2 register. +// +//***************************************************************************** +#define CAN_IF1DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB1 register. +// +//***************************************************************************** +#define CAN_IF1DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF1DB2 register. +// +//***************************************************************************** +#define CAN_IF1DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF1DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CRQ register. +// +//***************************************************************************** +#define CAN_IF2CRQ_BUSY 0x00008000 // Busy Flag +#define CAN_IF2CRQ_MNUM_M 0x0000003F // Message Number +#define CAN_IF2CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number; + // it is interpreted as 0x20, or + // object 32 +#define CAN_IF2CRQ_MNUM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2CMSK register. +// +//***************************************************************************** +#define CAN_IF2CMSK_WRNRD 0x00000080 // Write, Not Read +#define CAN_IF2CMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IF2CMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IF2CMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IF2CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit +#define CAN_IF2CMSK_NEWDAT 0x00000004 // Access New Data +#define CAN_IF2CMSK_TXRQST 0x00000004 // Access Transmission Request +#define CAN_IF2CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3 +#define CAN_IF2CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK1 register. +// +//***************************************************************************** +#define CAN_IF2MSK1_IDMSK_M 0x0000FFFF // Identifier Mask +#define CAN_IF2MSK1_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MSK2 register. +// +//***************************************************************************** +#define CAN_IF2MSK2_MXTD 0x00008000 // Mask Extended Identifier +#define CAN_IF2MSK2_MDIR 0x00004000 // Mask Message Direction +#define CAN_IF2MSK2_IDMSK_M 0x00001FFF // Identifier Mask +#define CAN_IF2MSK2_IDMSK_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB1 register. +// +//***************************************************************************** +#define CAN_IF2ARB1_ID_M 0x0000FFFF // Message Identifier +#define CAN_IF2ARB1_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2ARB2 register. +// +//***************************************************************************** +#define CAN_IF2ARB2_MSGVAL 0x00008000 // Message Valid +#define CAN_IF2ARB2_XTD 0x00004000 // Extended Identifier +#define CAN_IF2ARB2_DIR 0x00002000 // Message Direction +#define CAN_IF2ARB2_ID_M 0x00001FFF // Message Identifier +#define CAN_IF2ARB2_ID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2MCTL register. +// +//***************************************************************************** +#define CAN_IF2MCTL_NEWDAT 0x00008000 // New Data +#define CAN_IF2MCTL_MSGLST 0x00004000 // Message Lost +#define CAN_IF2MCTL_INTPND 0x00002000 // Interrupt Pending +#define CAN_IF2MCTL_UMASK 0x00001000 // Use Acceptance Mask +#define CAN_IF2MCTL_TXIE 0x00000800 // Transmit Interrupt Enable +#define CAN_IF2MCTL_RXIE 0x00000400 // Receive Interrupt Enable +#define CAN_IF2MCTL_RMTEN 0x00000200 // Remote Enable +#define CAN_IF2MCTL_TXRQST 0x00000100 // Transmit Request +#define CAN_IF2MCTL_EOB 0x00000080 // End of Buffer +#define CAN_IF2MCTL_DLC_M 0x0000000F // Data Length Code +#define CAN_IF2MCTL_DLC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA1 register. +// +//***************************************************************************** +#define CAN_IF2DA1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DA2 register. +// +//***************************************************************************** +#define CAN_IF2DA2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DA2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB1 register. +// +//***************************************************************************** +#define CAN_IF2DB1_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_IF2DB2 register. +// +//***************************************************************************** +#define CAN_IF2DB2_DATA_M 0x0000FFFF // Data +#define CAN_IF2DB2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ1 register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ1_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_TXRQ2 register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST_M 0x0000FFFF // Transmission Request Bits +#define CAN_TXRQ2_TXRQST_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA1 register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA1_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_NWDA2 register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDAT_M 0x0000FFFF // New Data Bits +#define CAN_NWDA2_NEWDAT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1INT register. +// +//***************************************************************************** +#define CAN_MSG1INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG1INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2INT register. +// +//***************************************************************************** +#define CAN_MSG2INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits +#define CAN_MSG2INT_INTPND_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG1VAL register. +// +//***************************************************************************** +#define CAN_MSG1VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG1VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the CAN_O_MSG2VAL register. +// +//***************************************************************************** +#define CAN_MSG2VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits +#define CAN_MSG2VAL_MSGVAL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the CAN register offsets. +// +//***************************************************************************** +#define CAN_O_MSGINT1 0x00000140 // Intr. Pending in Msg Obj 1 reg +#define CAN_O_MSGINT2 0x00000144 // Intr. Pending in Msg Obj 2 reg +#define CAN_O_MSGVAL1 0x00000160 // Message Valid in Msg Obj 1 reg +#define CAN_O_MSGVAL2 0x00000164 // Message Valid in Msg Obj 2 reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_STS +// register. +// +//***************************************************************************** +#define CAN_STS_LEC_MSK 0x00000007 // Last Error Code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_ERR +// register. +// +//***************************************************************************** +#define CAN_ERR_REC_MASK 0x00007F00 // Receive error counter status +#define CAN_ERR_TEC_MASK 0x000000FF // Transmit error counter status +#define CAN_ERR_REC_SHIFT 8 // Receive error counter bit pos +#define CAN_ERR_TEC_SHIFT 0 // Transmit error counter bit pos + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BIT +// register. +// +//***************************************************************************** +#define CAN_BIT_TSEG2 0x00007000 // Time segment after sample point +#define CAN_BIT_TSEG1 0x00000F00 // Time segment before sample point +#define CAN_BIT_SJW 0x000000C0 // (Re)Synchronization jump width +#define CAN_BIT_BRP 0x0000003F // Baud rate prescaler + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_INT +// register. +// +//***************************************************************************** +#define CAN_INT_INTID_MSK 0x0000FFFF // Interrupt Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TST +// register. +// +//***************************************************************************** +#define CAN_TST_TX_MSK 0x00000060 // Overide control of CAN_TX pin + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_BRPE +// register. +// +//***************************************************************************** +#define CAN_BRPE_BRPE 0x0000000F // Baud rate prescaler extension + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ1 +// register. +// +//***************************************************************************** +#define CAN_TXRQ1_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_TXRQ2 +// register. +// +//***************************************************************************** +#define CAN_TXRQ2_TXRQST 0x0000FFFF // Transmission Request Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA1 +// register. +// +//***************************************************************************** +#define CAN_NWDA1_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_NWDA2 +// register. +// +//***************************************************************************** +#define CAN_NWDA2_NEWDATA 0x0000FFFF // New Data Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT1 +// register. +// +//***************************************************************************** +#define CAN_MSGINT1_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGINT2 +// register. +// +//***************************************************************************** +#define CAN_MSGINT2_INTPND 0x0000FFFF // Interrupt Pending Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL1 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL1_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_O_MSGVAL2 +// register. +// +//***************************************************************************** +#define CAN_MSGVAL2_MSGVAL 0x0000FFFF // Message Valid Bits + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the can +// registers. +// +//***************************************************************************** +#define CAN_RV_IF1MSK2 0x0000FFFF +#define CAN_RV_IF1MSK1 0x0000FFFF +#define CAN_RV_IF2MSK1 0x0000FFFF +#define CAN_RV_IF2MSK2 0x0000FFFF +#define CAN_RV_BIT 0x00002301 +#define CAN_RV_CTL 0x00000001 +#define CAN_RV_IF1CRQ 0x00000001 +#define CAN_RV_IF2CRQ 0x00000001 +#define CAN_RV_TXRQ2 0x00000000 +#define CAN_RV_IF2DB1 0x00000000 +#define CAN_RV_INT 0x00000000 +#define CAN_RV_IF1DB2 0x00000000 +#define CAN_RV_BRPE 0x00000000 +#define CAN_RV_IF2DA2 0x00000000 +#define CAN_RV_MSGVAL2 0x00000000 +#define CAN_RV_TXRQ1 0x00000000 +#define CAN_RV_IF1MCTL 0x00000000 +#define CAN_RV_IF1DB1 0x00000000 +#define CAN_RV_STS 0x00000000 +#define CAN_RV_MSGINT1 0x00000000 +#define CAN_RV_IF1DA2 0x00000000 +#define CAN_RV_TST 0x00000000 +#define CAN_RV_IF1ARB1 0x00000000 +#define CAN_RV_IF1ARB2 0x00000000 +#define CAN_RV_NWDA2 0x00000000 +#define CAN_RV_IF2CMSK 0x00000000 +#define CAN_RV_NWDA1 0x00000000 +#define CAN_RV_IF1DA1 0x00000000 +#define CAN_RV_IF2DA1 0x00000000 +#define CAN_RV_IF2MCTL 0x00000000 +#define CAN_RV_MSGVAL1 0x00000000 +#define CAN_RV_IF1CMSK 0x00000000 +#define CAN_RV_ERR 0x00000000 +#define CAN_RV_IF2ARB2 0x00000000 +#define CAN_RV_MSGINT2 0x00000000 +#define CAN_RV_IF2ARB1 0x00000000 +#define CAN_RV_IF2DB2 0x00000000 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CRQ +// and CAN_IF1CRQ registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCRQ_BUSY 0x00008000 // Busy flag status +#define CAN_IFCRQ_MNUM_MSK 0x0000003F // Message Number + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1CMSK +// and CAN_IF2CMSK registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFCMSK_WRNRD 0x00000080 // Write, not Read +#define CAN_IFCMSK_MASK 0x00000040 // Access Mask Bits +#define CAN_IFCMSK_ARB 0x00000020 // Access Arbitration Bits +#define CAN_IFCMSK_CONTROL 0x00000010 // Access Control Bits +#define CAN_IFCMSK_CLRINTPND 0x00000008 // Clear interrupt pending Bit +#define CAN_IFCMSK_TXRQST 0x00000004 // Access Tx request bit (WRNRD=1) +#define CAN_IFCMSK_NEWDAT 0x00000004 // Access New Data bit (WRNRD=0) +#define CAN_IFCMSK_DATAA 0x00000002 // DataA access - bytes 0 to 3 +#define CAN_IFCMSK_DATAB 0x00000001 // DataB access - bytes 4 to 7 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK1 +// and CAN_IF2MSK1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK1_MSK 0x0000FFFF // Identifier Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MSK2 +// and CAN_IF2MSK2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMSK2_MXTD 0x00008000 // Mask extended identifier +#define CAN_IFMSK2_MDIR 0x00004000 // Mask message direction +#define CAN_IFMSK2_MSK 0x00001FFF // Mask identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB1 +// and CAN_IF2ARB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB1_ID 0x0000FFFF // Identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1ARB2 +// and CAN_IF2ARB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFARB2_MSGVAL 0x00008000 // Message valid +#define CAN_IFARB2_XTD 0x00004000 // Extended identifier +#define CAN_IFARB2_DIR 0x00002000 // Message direction +#define CAN_IFARB2_ID 0x00001FFF // Message identifier + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1MCTL +// and CAN_IF2MCTL registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFMCTL_NEWDAT 0x00008000 // New Data +#define CAN_IFMCTL_MSGLST 0x00004000 // Message lost +#define CAN_IFMCTL_INTPND 0x00002000 // Interrupt pending +#define CAN_IFMCTL_UMASK 0x00001000 // Use acceptance mask +#define CAN_IFMCTL_TXIE 0x00000800 // Transmit interrupt enable +#define CAN_IFMCTL_RXIE 0x00000400 // Receive interrupt enable +#define CAN_IFMCTL_RMTEN 0x00000200 // Remote enable +#define CAN_IFMCTL_TXRQST 0x00000100 // Transmit request +#define CAN_IFMCTL_EOB 0x00000080 // End of buffer +#define CAN_IFMCTL_DLC 0x0000000F // Data length code + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA1 +// and CAN_IF2DA1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA1_DATA 0x0000FFFF // Data - bytes 1 and 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DA2 +// and CAN_IF2DA2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDA2_DATA 0x0000FFFF // Data - bytes 3 and 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB1 +// and CAN_IF2DB1 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB1_DATA 0x0000FFFF // Data - bytes 5 and 4 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the CAN_IF1DB2 +// and CAN_IF2DB2 registers. +// Note: All bits may not be available in all registers. +// +//***************************************************************************** +#define CAN_IFDB2_DATA 0x0000FFFF // Data - bytes 7 and 6 + +#endif + +#endif // __HW_CAN_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_comp.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_comp.h new file mode 100644 index 00000000..4b58bbf5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_comp.h @@ -0,0 +1,277 @@ +//***************************************************************************** +// +// hw_comp.h - Macros used when accessing the comparator hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_COMP_H__ +#define __HW_COMP_H__ + +//***************************************************************************** +// +// The following are defines for the Comparator register offsets. +// +//***************************************************************************** +#define COMP_O_ACMIS 0x00000000 // Analog Comparator Masked + // Interrupt Status +#define COMP_O_ACRIS 0x00000004 // Analog Comparator Raw Interrupt + // Status +#define COMP_O_ACINTEN 0x00000008 // Analog Comparator Interrupt + // Enable +#define COMP_O_ACREFCTL 0x00000010 // Analog Comparator Reference + // Voltage Control +#define COMP_O_ACSTAT0 0x00000020 // Analog Comparator Status 0 +#define COMP_O_ACCTL0 0x00000024 // Analog Comparator Control 0 +#define COMP_O_ACSTAT1 0x00000040 // Analog Comparator Status 1 +#define COMP_O_ACCTL1 0x00000044 // Analog Comparator Control 1 +#define COMP_O_ACSTAT2 0x00000060 // Analog Comparator Status 2 +#define COMP_O_ACCTL2 0x00000064 // Analog Comparator Control 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACMIS register. +// +//***************************************************************************** +#define COMP_ACMIS_IN2 0x00000004 // Comparator 2 Masked Interrupt + // Status +#define COMP_ACMIS_IN1 0x00000002 // Comparator 1 Masked Interrupt + // Status +#define COMP_ACMIS_IN0 0x00000001 // Comparator 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACRIS register. +// +//***************************************************************************** +#define COMP_ACRIS_IN2 0x00000004 // Comparator 2 Interrupt Status +#define COMP_ACRIS_IN1 0x00000002 // Comparator 1 Interrupt Status +#define COMP_ACRIS_IN0 0x00000001 // Comparator 0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACINTEN register. +// +//***************************************************************************** +#define COMP_ACINTEN_IN2 0x00000004 // Comparator 2 Interrupt Enable +#define COMP_ACINTEN_IN1 0x00000002 // Comparator 1 Interrupt Enable +#define COMP_ACINTEN_IN0 0x00000001 // Comparator 0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACREFCTL +// register. +// +//***************************************************************************** +#define COMP_ACREFCTL_EN 0x00000200 // Resistor Ladder Enable +#define COMP_ACREFCTL_RNG 0x00000100 // Resistor Ladder Range +#define COMP_ACREFCTL_VREF_M 0x0000000F // Resistor Ladder Voltage Ref +#define COMP_ACREFCTL_VREF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT0 register. +// +//***************************************************************************** +#define COMP_ACSTAT0_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL0 register. +// +//***************************************************************************** +#define COMP_ACCTL0_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL0_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL0_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL0_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL0_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL0_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL0_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL0_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL0_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL0_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL0_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL0_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL0_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL0_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL0_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL0_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL0_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL0_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT1 register. +// +//***************************************************************************** +#define COMP_ACSTAT1_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL1 register. +// +//***************************************************************************** +#define COMP_ACCTL1_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL1_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL1_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL1_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL1_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL1_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL1_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL1_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL1_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL1_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL1_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL1_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL1_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL1_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL1_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL1_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL1_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL1_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT2 register. +// +//***************************************************************************** +#define COMP_ACSTAT2_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL2 register. +// +//***************************************************************************** +#define COMP_ACCTL2_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL2_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL2_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL2_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL2_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL2_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL2_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL2_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL2_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL2_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL2_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL2_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL2_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL2_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL2_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL2_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL2_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL2_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Comparator register offsets. +// +//***************************************************************************** +#define COMP_O_MIS 0x00000000 // Interrupt status register +#define COMP_O_RIS 0x00000004 // Raw interrupt status register +#define COMP_O_INTEN 0x00000008 // Interrupt enable register +#define COMP_O_REFCTL 0x00000010 // Reference voltage control reg + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_O_REFCTL +// register. +// +//***************************************************************************** +#define COMP_REFCTL_EN 0x00000200 // Reference voltage enable +#define COMP_REFCTL_RNG 0x00000100 // Reference voltage range +#define COMP_REFCTL_VREF_MASK 0x0000000F // Reference voltage select mask +#define COMP_REFCTL_VREF_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_MIS, +// COMP_RIS, and COMP_INTEN registers. +// +//***************************************************************************** +#define COMP_INT_2 0x00000004 // Comp2 interrupt +#define COMP_INT_1 0x00000002 // Comp1 interrupt +#define COMP_INT_0 0x00000001 // Comp0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_ACSTAT0, +// COMP_ACSTAT1, and COMP_ACSTAT2 registers. +// +//***************************************************************************** +#define COMP_ACSTAT_OVAL 0x00000002 // Comparator output value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the COMP_ACCTL0, +// COMP_ACCTL1, and COMP_ACCTL2 registers. +// +//***************************************************************************** +#define COMP_ACCTL_TMASK 0x00000800 // Trigger enable +#define COMP_ACCTL_ASRCP_MASK 0x00000600 // Vin+ source select mask +#define COMP_ACCTL_ASRCP_PIN 0x00000000 // Dedicated Comp+ pin +#define COMP_ACCTL_ASRCP_PIN0 0x00000200 // Comp0+ pin +#define COMP_ACCTL_ASRCP_REF 0x00000400 // Internal voltage reference +#define COMP_ACCTL_ASRCP_RES 0x00000600 // Reserved +#define COMP_ACCTL_OEN 0x00000100 // Comparator output enable +#define COMP_ACCTL_TSVAL 0x00000080 // Trigger polarity select +#define COMP_ACCTL_TSEN_MASK 0x00000060 // Trigger sense mask +#define COMP_ACCTL_TSEN_LEVEL 0x00000000 // Trigger is level sense +#define COMP_ACCTL_TSEN_FALL 0x00000020 // Trigger is falling edge +#define COMP_ACCTL_TSEN_RISE 0x00000040 // Trigger is rising edge +#define COMP_ACCTL_TSEN_BOTH 0x00000060 // Trigger is both edges +#define COMP_ACCTL_ISLVAL 0x00000010 // Interrupt polarity select +#define COMP_ACCTL_ISEN_MASK 0x0000000C // Interrupt sense mask +#define COMP_ACCTL_ISEN_LEVEL 0x00000000 // Interrupt is level sense +#define COMP_ACCTL_ISEN_FALL 0x00000004 // Interrupt is falling edge +#define COMP_ACCTL_ISEN_RISE 0x00000008 // Interrupt is rising edge +#define COMP_ACCTL_ISEN_BOTH 0x0000000C // Interrupt is both edges +#define COMP_ACCTL_CINV 0x00000002 // Comparator output invert + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the comparator +// registers. +// +//***************************************************************************** +#define COMP_RV_ACCTL1 0x00000000 // Comp1 control register +#define COMP_RV_ACSTAT2 0x00000000 // Comp2 status register +#define COMP_RV_ACSTAT0 0x00000000 // Comp0 status register +#define COMP_RV_RIS 0x00000000 // Raw interrupt status register +#define COMP_RV_INTEN 0x00000000 // Interrupt enable register +#define COMP_RV_ACCTL2 0x00000000 // Comp2 control register +#define COMP_RV_MIS 0x00000000 // Interrupt status register +#define COMP_RV_ACCTL0 0x00000000 // Comp0 control register +#define COMP_RV_ACSTAT1 0x00000000 // Comp1 status register +#define COMP_RV_REFCTL 0x00000000 // Reference voltage control reg + +#endif + +#endif // __HW_COMP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_epi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_epi.h new file mode 100644 index 00000000..8ed9d165 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_epi.h @@ -0,0 +1,499 @@ +//***************************************************************************** +// +// hw_epi.h - Macros for use in accessing the EPI registers. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_EPI_H__ +#define __HW_EPI_H__ + +//***************************************************************************** +// +// The following are defines for the External Peripheral Interface register +// offsets. +// +//***************************************************************************** +#define EPI_O_CFG 0x00000000 // EPI Configuration +#define EPI_O_BAUD 0x00000004 // EPI Main Baud Rate +#define EPI_O_HB16CFG 0x00000010 // EPI Host-Bus 16 Configuration +#define EPI_O_GPCFG 0x00000010 // EPI General-Purpose + // Configuration +#define EPI_O_SDRAMCFG 0x00000010 // EPI SDRAM Configuration +#define EPI_O_HB8CFG 0x00000010 // EPI Host-Bus 8 Configuration +#define EPI_O_HB8CFG2 0x00000014 // EPI Host-Bus 8 Configuration 2 +#define EPI_O_HB16CFG2 0x00000014 // EPI Host-Bus 16 Configuration 2 +#define EPI_O_GPCFG2 0x00000014 // EPI General-Purpose + // Configuration 2 +#define EPI_O_ADDRMAP 0x0000001C // EPI Address Map +#define EPI_O_RSIZE0 0x00000020 // EPI Read Size 0 +#define EPI_O_RADDR0 0x00000024 // EPI Read Address 0 +#define EPI_O_RPSTD0 0x00000028 // EPI Non-Blocking Read Data 0 +#define EPI_O_RSIZE1 0x00000030 // EPI Read Size 1 +#define EPI_O_RADDR1 0x00000034 // EPI Read Address 1 +#define EPI_O_RPSTD1 0x00000038 // EPI Non-Blocking Read Data 1 +#define EPI_O_STAT 0x00000060 // EPI Status +#define EPI_O_RFIFOCNT 0x0000006C // EPI Read FIFO Count +#define EPI_O_READFIFO 0x00000070 // EPI Read FIFO +#define EPI_O_READFIFO1 0x00000074 // EPI Read FIFO Alias 1 +#define EPI_O_READFIFO2 0x00000078 // EPI Read FIFO Alias 2 +#define EPI_O_READFIFO3 0x0000007C // EPI Read FIFO Alias 3 +#define EPI_O_READFIFO4 0x00000080 // EPI Read FIFO Alias 4 +#define EPI_O_READFIFO5 0x00000084 // EPI Read FIFO Alias 5 +#define EPI_O_READFIFO6 0x00000088 // EPI Read FIFO Alias 6 +#define EPI_O_READFIFO7 0x0000008C // EPI Read FIFO Alias 7 +#define EPI_O_FIFOLVL 0x00000200 // EPI FIFO Level Selects +#define EPI_O_WFIFOCNT 0x00000204 // EPI Write FIFO Count +#define EPI_O_IM 0x00000210 // EPI Interrupt Mask +#define EPI_O_RIS 0x00000214 // EPI Raw Interrupt Status +#define EPI_O_MIS 0x00000218 // EPI Masked Interrupt Status +#define EPI_O_EISC 0x0000021C // EPI Error Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_CFG register. +// +//***************************************************************************** +#define EPI_CFG_BLKEN 0x00000010 // Block Enable +#define EPI_CFG_MODE_M 0x0000000F // Mode Select +#define EPI_CFG_MODE_NONE 0x00000000 // General Purpose +#define EPI_CFG_MODE_SDRAM 0x00000001 // SDRAM +#define EPI_CFG_MODE_HB8 0x00000002 // 8-Bit Host-Bus (HB8) +#define EPI_CFG_MODE_HB16 0x00000003 // 16-Bit Host-Bus (HB16) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_BAUD register. +// +//***************************************************************************** +#define EPI_BAUD_COUNT1_M 0xFFFF0000 // Baud Rate Counter 1 +#define EPI_BAUD_COUNT0_M 0x0000FFFF // Baud Rate Counter 0 +#define EPI_BAUD_COUNT1_S 16 +#define EPI_BAUD_COUNT0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB16CFG register. +// +//***************************************************************************** +#define EPI_HB16CFG_XFFEN 0x00800000 // External FIFO FULL Enable +#define EPI_HB16CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable +#define EPI_HB16CFG_WRHIGH 0x00200000 // WRITE Strobe Polarity +#define EPI_HB16CFG_RDHIGH 0x00100000 // READ Strobe Polarity +#define EPI_HB16CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_HB16CFG_WRWS_M 0x000000C0 // CS0n Write Wait States +#define EPI_HB16CFG_WRWS_0 0x00000000 // No wait states +#define EPI_HB16CFG_WRWS_1 0x00000040 // 1 wait state +#define EPI_HB16CFG_WRWS_2 0x00000080 // 2 wait states +#define EPI_HB16CFG_WRWS_3 0x000000C0 // 3 wait states +#define EPI_HB16CFG_RDWS_M 0x00000030 // CS0n Read Wait States +#define EPI_HB16CFG_RDWS_0 0x00000000 // No wait states +#define EPI_HB16CFG_RDWS_1 0x00000010 // 1 wait state +#define EPI_HB16CFG_RDWS_2 0x00000020 // 2 wait states +#define EPI_HB16CFG_RDWS_3 0x00000030 // 3 wait states +#define EPI_HB16CFG_BSEL 0x00000004 // Byte Select Configuration +#define EPI_HB16CFG_MODE_M 0x00000003 // Host Bus Sub-Mode +#define EPI_HB16CFG_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0] +#define EPI_HB16CFG_MODE_ADNMUX 0x00000001 // ADNONMUX - D[15:0] +#define EPI_HB16CFG_MODE_SRAM 0x00000002 // Continuous Read - D[15:0] +#define EPI_HB16CFG_MODE_XFIFO 0x00000003 // XFIFO - D[15:0] +#define EPI_HB16CFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_GPCFG register. +// +//***************************************************************************** +#define EPI_GPCFG_CLKPIN 0x80000000 // Clock Pin +#define EPI_GPCFG_CLKGATE 0x40000000 // Clock Gated +#define EPI_GPCFG_RDYEN 0x10000000 // Ready Enable +#define EPI_GPCFG_FRMPIN 0x08000000 // Framing Pin +#define EPI_GPCFG_FRM50 0x04000000 // 50/50 Frame +#define EPI_GPCFG_FRMCNT_M 0x03C00000 // Frame Count +#define EPI_GPCFG_RW 0x00200000 // Read and Write +#define EPI_GPCFG_WR2CYC 0x00080000 // 2-Cycle Writes +#define EPI_GPCFG_RD2CYC 0x00040000 // 2-Cycle Reads +#define EPI_GPCFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_GPCFG_ASIZE_M 0x00000030 // Address Bus Size +#define EPI_GPCFG_ASIZE_NONE 0x00000000 // No address +#define EPI_GPCFG_ASIZE_4BIT 0x00000010 // Up to 4 bits wide +#define EPI_GPCFG_ASIZE_12BIT 0x00000020 // Up to 12 bits wide. This size + // cannot be used with 24-bit data +#define EPI_GPCFG_ASIZE_20BIT 0x00000030 // Up to 20 bits wide. This size + // cannot be used with data sizes + // other than 8 +#define EPI_GPCFG_DSIZE_M 0x00000003 // Size of Data Bus +#define EPI_GPCFG_DSIZE_4BIT 0x00000000 // 8 Bits Wide (EPI0S0 to EPI0S7) +#define EPI_GPCFG_DSIZE_16BIT 0x00000001 // 16 Bits Wide (EPI0S0 to EPI0S15) +#define EPI_GPCFG_DSIZE_24BIT 0x00000002 // 24 Bits Wide (EPI0S0 to EPI0S23) +#define EPI_GPCFG_DSIZE_32BIT 0x00000003 // 32 Bits Wide (EPI0S0 to EPI0S31) +#define EPI_GPCFG_FRMCNT_S 22 +#define EPI_GPCFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_SDRAMCFG register. +// +//***************************************************************************** +#define EPI_SDRAMCFG_FREQ_M 0xC0000000 // Frequency Range +#define EPI_SDRAMCFG_FREQ_NONE 0x00000000 // 0 - 15 MHz +#define EPI_SDRAMCFG_FREQ_15MHZ 0x40000000 // 15 - 30 MHz +#define EPI_SDRAMCFG_FREQ_30MHZ 0x80000000 // 30 - 50 MHz +#define EPI_SDRAMCFG_FREQ_50MHZ 0xC0000000 // 50 - 100 MHz +#define EPI_SDRAMCFG_RFSH_M 0x07FF0000 // Refresh Counter +#define EPI_SDRAMCFG_SLEEP 0x00000200 // Sleep Mode +#define EPI_SDRAMCFG_SIZE_M 0x00000003 // Size of SDRAM +#define EPI_SDRAMCFG_SIZE_8MB 0x00000000 // 64 megabits (8MB) +#define EPI_SDRAMCFG_SIZE_16MB 0x00000001 // 128 megabits (16MB) +#define EPI_SDRAMCFG_SIZE_32MB 0x00000002 // 256 megabits (32MB) +#define EPI_SDRAMCFG_SIZE_64MB 0x00000003 // 512 megabits (64MB) +#define EPI_SDRAMCFG_RFSH_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB8CFG register. +// +//***************************************************************************** +#define EPI_HB8CFG_XFFEN 0x00800000 // External FIFO FULL Enable +#define EPI_HB8CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable +#define EPI_HB8CFG_WRHIGH 0x00200000 // CS0n WRITE Strobe Polarity +#define EPI_HB8CFG_RDHIGH 0x00100000 // CS0n READ Strobe Polarity +#define EPI_HB8CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait +#define EPI_HB8CFG_WRWS_M 0x000000C0 // Write Wait States +#define EPI_HB8CFG_WRWS_0 0x00000000 // No wait states +#define EPI_HB8CFG_WRWS_1 0x00000040 // 1 wait state +#define EPI_HB8CFG_WRWS_2 0x00000080 // 2 wait states +#define EPI_HB8CFG_WRWS_3 0x000000C0 // 3 wait states +#define EPI_HB8CFG_RDWS_M 0x00000030 // Read Wait States +#define EPI_HB8CFG_RDWS_0 0x00000000 // No wait states +#define EPI_HB8CFG_RDWS_1 0x00000010 // 1 wait state +#define EPI_HB8CFG_RDWS_2 0x00000020 // 2 wait states +#define EPI_HB8CFG_RDWS_3 0x00000030 // 3 wait states +#define EPI_HB8CFG_MODE_M 0x00000003 // Host Bus Sub-Mode +#define EPI_HB8CFG_MODE_MUX 0x00000000 // ADMUX - AD[7:0] +#define EPI_HB8CFG_MODE_NMUX 0x00000001 // ADNONMUX - D[7:0] +#define EPI_HB8CFG_MODE_SRAM 0x00000002 // Continuous Read - D[7:0] +#define EPI_HB8CFG_MODE_FIFO 0x00000003 // XFIFO - D[7:0] +#define EPI_HB8CFG_MAXWAIT_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB8CFG2 register. +// +//***************************************************************************** +#define EPI_HB8CFG2_WORD 0x80000000 // Word Access Mode +#define EPI_HB8CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate +#define EPI_HB8CFG2_CSCFG_M 0x03000000 // Chip Select Configuration +#define EPI_HB8CFG2_CSCFG_ALE 0x00000000 // ALE Configuration +#define EPI_HB8CFG2_CSCFG_CS 0x01000000 // CSn Configuration +#define EPI_HB8CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration +#define EPI_HB8CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_HB16CFG2 register. +// +//***************************************************************************** +#define EPI_HB16CFG2_WORD 0x80000000 // Word Access Mode +#define EPI_HB16CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate +#define EPI_HB16CFG2_CSCFG_M 0x03000000 // Chip Select Configuration +#define EPI_HB16CFG2_CSCFG_ALE 0x00000000 // ALE Configuration +#define EPI_HB16CFG2_CSCFG_CS 0x01000000 // CSn Configuration +#define EPI_HB16CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration +#define EPI_HB16CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_GPCFG2 register. +// +//***************************************************************************** +#define EPI_GPCFG2_WORD 0x80000000 // Word Access Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_ADDRMAP register. +// +//***************************************************************************** +#define EPI_ADDRMAP_EPSZ_M 0x000000C0 // External Peripheral Size +#define EPI_ADDRMAP_EPSZ_256B 0x00000000 // 256 bytes; lower address range: + // 0x00 to 0xFF +#define EPI_ADDRMAP_EPSZ_64KB 0x00000040 // 64 KB; lower address range: + // 0x0000 to 0xFFFF +#define EPI_ADDRMAP_EPSZ_16MB 0x00000080 // 16 MB; lower address range: + // 0x00.0000 to 0xFF.FFFF +#define EPI_ADDRMAP_EPSZ_256MB 0x000000C0 // 256 MB; lower address range: + // 0x000.0000 to 0xFFF.FFFF +#define EPI_ADDRMAP_EPADR_M 0x00000030 // External Peripheral Address +#define EPI_ADDRMAP_EPADR_NONE 0x00000000 // Not mapped +#define EPI_ADDRMAP_EPADR_A000 0x00000010 // At 0xA000.0000 +#define EPI_ADDRMAP_EPADR_C000 0x00000020 // At 0xC000.0000 +#define EPI_ADDRMAP_ERSZ_M 0x0000000C // External RAM Size +#define EPI_ADDRMAP_ERSZ_256B 0x00000000 // 256 bytes; lower address range: + // 0x00 to 0xFF +#define EPI_ADDRMAP_ERSZ_64KB 0x00000004 // 64 KB; lower address range: + // 0x0000 to 0xFFFF +#define EPI_ADDRMAP_ERSZ_16MB 0x00000008 // 16 MB; lower address range: + // 0x00.0000 to 0xFF.FFFF +#define EPI_ADDRMAP_ERSZ_256MB 0x0000000C // 256 MB; lower address range: + // 0x000.0000 to 0xFFF.FFFF +#define EPI_ADDRMAP_ERADR_M 0x00000003 // External RAM Address +#define EPI_ADDRMAP_ERADR_NONE 0x00000000 // Not mapped +#define EPI_ADDRMAP_ERADR_6000 0x00000001 // At 0x6000.0000 +#define EPI_ADDRMAP_ERADR_8000 0x00000002 // At 0x8000.0000 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RSIZE0 register. +// +//***************************************************************************** +#define EPI_RSIZE0_SIZE_M 0x00000003 // Current Size +#define EPI_RSIZE0_SIZE_8BIT 0x00000001 // Byte (8 bits) +#define EPI_RSIZE0_SIZE_16BIT 0x00000002 // Half-word (16 bits) +#define EPI_RSIZE0_SIZE_32BIT 0x00000003 // Word (32 bits) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RADDR0 register. +// +//***************************************************************************** +#define EPI_RADDR0_ADDR_M 0x1FFFFFFF // Current Address +#define EPI_RADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RPSTD0 register. +// +//***************************************************************************** +#define EPI_RPSTD0_POSTCNT_M 0x00001FFF // Post Count +#define EPI_RPSTD0_POSTCNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RSIZE1 register. +// +//***************************************************************************** +#define EPI_RSIZE1_SIZE_M 0x00000003 // Current Size +#define EPI_RSIZE1_SIZE_8BIT 0x00000001 // Byte (8 bits) +#define EPI_RSIZE1_SIZE_16BIT 0x00000002 // Half-word (16 bits) +#define EPI_RSIZE1_SIZE_32BIT 0x00000003 // Word (32 bits) + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RADDR1 register. +// +//***************************************************************************** +#define EPI_RADDR1_ADDR_M 0x1FFFFFFF // Current Address +#define EPI_RADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RPSTD1 register. +// +//***************************************************************************** +#define EPI_RPSTD1_POSTCNT_M 0x00001FFF // Post Count +#define EPI_RPSTD1_POSTCNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_STAT register. +// +//***************************************************************************** +#define EPI_STAT_CELOW 0x00000200 // Clock Enable Low +#define EPI_STAT_XFFULL 0x00000100 // External FIFO Full +#define EPI_STAT_XFEMPTY 0x00000080 // External FIFO Empty +#define EPI_STAT_INITSEQ 0x00000040 // Initialization Sequence +#define EPI_STAT_WBUSY 0x00000020 // Write Busy +#define EPI_STAT_NBRBUSY 0x00000010 // Non-Blocking Read Busy +#define EPI_STAT_ACTIVE 0x00000001 // Register Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RFIFOCNT register. +// +//***************************************************************************** +#define EPI_RFIFOCNT_COUNT_M 0x00000007 // FIFO Count +#define EPI_RFIFOCNT_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO register. +// +//***************************************************************************** +#define EPI_READFIFO_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO1 +// register. +// +//***************************************************************************** +#define EPI_READFIFO1_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO2 +// register. +// +//***************************************************************************** +#define EPI_READFIFO2_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO3 +// register. +// +//***************************************************************************** +#define EPI_READFIFO3_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO4 +// register. +// +//***************************************************************************** +#define EPI_READFIFO4_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO4_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO5 +// register. +// +//***************************************************************************** +#define EPI_READFIFO5_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO5_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO6 +// register. +// +//***************************************************************************** +#define EPI_READFIFO6_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO6_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_READFIFO7 +// register. +// +//***************************************************************************** +#define EPI_READFIFO7_DATA_M 0xFFFFFFFF // Reads Data +#define EPI_READFIFO7_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_FIFOLVL register. +// +//***************************************************************************** +#define EPI_FIFOLVL_WFERR 0x00020000 // Write Full Error +#define EPI_FIFOLVL_RSERR 0x00010000 // Read Stall Error +#define EPI_FIFOLVL_WRFIFO_M 0x00000070 // Write FIFO +#define EPI_FIFOLVL_WRFIFO_EMPT 0x00000000 // Trigger when there are 1 to 4 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_1_4 0x00000020 // Trigger when there are 1 to 3 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_1_2 0x00000030 // Trigger when there are 1 to 2 + // spaces available in the WFIFO +#define EPI_FIFOLVL_WRFIFO_3_4 0x00000040 // Trigger when there is 1 space + // available in the WFIFO +#define EPI_FIFOLVL_RDFIFO_M 0x00000007 // Read FIFO +#define EPI_FIFOLVL_RDFIFO_EMPT 0x00000000 // Empty +#define EPI_FIFOLVL_RDFIFO_1_8 0x00000001 // Trigger when there are 1 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_1_4 0x00000002 // Trigger when there are 2 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_1_2 0x00000003 // Trigger when there are 4 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_3_4 0x00000004 // Trigger when there are 6 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_7_8 0x00000005 // Trigger when there are 7 or more + // entries in the NBRFIFO +#define EPI_FIFOLVL_RDFIFO_FULL 0x00000006 // Trigger when there are 8 entries + // in the NBRFIFO + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_WFIFOCNT register. +// +//***************************************************************************** +#define EPI_WFIFOCNT_WTAV_M 0x00000007 // Available Write Transactions +#define EPI_WFIFOCNT_WTAV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_IM register. +// +//***************************************************************************** +#define EPI_IM_WRIM 0x00000004 // Write Interrupt Mask +#define EPI_IM_RDIM 0x00000002 // Read Interrupt Mask +#define EPI_IM_ERRIM 0x00000001 // Error Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_RIS register. +// +//***************************************************************************** +#define EPI_RIS_WRRIS 0x00000004 // Write Raw Interrupt Status +#define EPI_RIS_RDRIS 0x00000002 // Read Raw Interrupt Status +#define EPI_RIS_ERRRIS 0x00000001 // Error Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_MIS register. +// +//***************************************************************************** +#define EPI_MIS_WRMIS 0x00000004 // Write Masked Interrupt Status +#define EPI_MIS_RDMIS 0x00000002 // Read Masked Interrupt Status +#define EPI_MIS_ERRMIS 0x00000001 // Error Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the EPI_O_EISC register. +// +//***************************************************************************** +#define EPI_EISC_WTFULL 0x00000004 // Write FIFO Full Error +#define EPI_EISC_RSTALL 0x00000002 // Read Stalled Error +#define EPI_EISC_TOUT 0x00000001 // Timeout Error + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the EPI_O_BAUD +// register. +// +//***************************************************************************** +#define EPI_BAUD_COUNT_M 0x0000FFFF // Baud Rate Counter +#define EPI_BAUD_COUNT_S 0 + +#endif + +#endif // __HW_EPI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ethernet.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ethernet.h new file mode 100644 index 00000000..742db3ff --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ethernet.h @@ -0,0 +1,679 @@ +//***************************************************************************** +// +// hw_ethernet.h - Macros used when accessing the Ethernet hardware. +// +// Copyright (c) 2006-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_ETHERNET_H__ +#define __HW_ETHERNET_H__ + +//***************************************************************************** +// +// The following are defines for the Ethernet MAC register offsets. +// +//***************************************************************************** +#define MAC_O_RIS 0x00000000 // Ethernet MAC Raw Interrupt + // Status/Acknowledge +#define MAC_O_IACK 0x00000000 // Ethernet MAC Raw Interrupt + // Status/Acknowledge +#define MAC_O_IM 0x00000004 // Ethernet MAC Interrupt Mask +#define MAC_O_RCTL 0x00000008 // Ethernet MAC Receive Control +#define MAC_O_TCTL 0x0000000C // Ethernet MAC Transmit Control +#define MAC_O_DATA 0x00000010 // Ethernet MAC Data +#define MAC_O_IA0 0x00000014 // Ethernet MAC Individual Address + // 0 +#define MAC_O_IA1 0x00000018 // Ethernet MAC Individual Address + // 1 +#define MAC_O_THR 0x0000001C // Ethernet MAC Threshold +#define MAC_O_MCTL 0x00000020 // Ethernet MAC Management Control +#define MAC_O_MDV 0x00000024 // Ethernet MAC Management Divider +#define MAC_O_MTXD 0x0000002C // Ethernet MAC Management Transmit + // Data +#define MAC_O_MRXD 0x00000030 // Ethernet MAC Management Receive + // Data +#define MAC_O_NP 0x00000034 // Ethernet MAC Number of Packets +#define MAC_O_TR 0x00000038 // Ethernet MAC Transmission + // Request +#define MAC_O_TS 0x0000003C // Ethernet MAC Timer Support +#define MAC_O_LED 0x00000040 // Ethernet MAC LED Encoding +#define MAC_O_MDIX 0x00000044 // Ethernet PHY MDIX + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RIS register. +// +//***************************************************************************** +#define MAC_RIS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_RIS_MDINT 0x00000020 // MII Transaction Complete +#define MAC_RIS_RXER 0x00000010 // Receive Error +#define MAC_RIS_FOV 0x00000008 // FIFO Overrun +#define MAC_RIS_TXEMP 0x00000004 // Transmit FIFO Empty +#define MAC_RIS_TXER 0x00000002 // Transmit Error +#define MAC_RIS_RXINT 0x00000001 // Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IACK register. +// +//***************************************************************************** +#define MAC_IACK_PHYINT 0x00000040 // Clear PHY Interrupt +#define MAC_IACK_MDINT 0x00000020 // Clear MII Transaction Complete +#define MAC_IACK_RXER 0x00000010 // Clear Receive Error +#define MAC_IACK_FOV 0x00000008 // Clear FIFO Overrun +#define MAC_IACK_TXEMP 0x00000004 // Clear Transmit FIFO Empty +#define MAC_IACK_TXER 0x00000002 // Clear Transmit Error +#define MAC_IACK_RXINT 0x00000001 // Clear Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IM register. +// +//***************************************************************************** +#define MAC_IM_PHYINTM 0x00000040 // Mask PHY Interrupt +#define MAC_IM_MDINTM 0x00000020 // Mask MII Transaction Complete +#define MAC_IM_RXERM 0x00000010 // Mask Receive Error +#define MAC_IM_FOVM 0x00000008 // Mask FIFO Overrun +#define MAC_IM_TXEMPM 0x00000004 // Mask Transmit FIFO Empty +#define MAC_IM_TXERM 0x00000002 // Mask Transmit Error +#define MAC_IM_RXINTM 0x00000001 // Mask Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RCTL register. +// +//***************************************************************************** +#define MAC_RCTL_RSTFIFO 0x00000010 // Clear Receive FIFO +#define MAC_RCTL_BADCRC 0x00000008 // Enable Reject Bad CRC +#define MAC_RCTL_PRMS 0x00000004 // Enable Promiscuous Mode +#define MAC_RCTL_AMUL 0x00000002 // Enable Multicast Frames +#define MAC_RCTL_RXEN 0x00000001 // Enable Receiver + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TCTL register. +// +//***************************************************************************** +#define MAC_TCTL_DUPLEX 0x00000010 // Enable Duplex Mode +#define MAC_TCTL_CRC 0x00000004 // Enable CRC Generation +#define MAC_TCTL_PADEN 0x00000002 // Enable Packet Padding +#define MAC_TCTL_TXEN 0x00000001 // Enable Transmitter + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_DATA register. +// +//***************************************************************************** +#define MAC_DATA_TXDATA_M 0xFFFFFFFF // Transmit FIFO Data +#define MAC_DATA_RXDATA_M 0xFFFFFFFF // Receive FIFO Data +#define MAC_DATA_RXDATA_S 0 +#define MAC_DATA_TXDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA0 register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4_M 0xFF000000 // MAC Address Octet 4 +#define MAC_IA0_MACOCT3_M 0x00FF0000 // MAC Address Octet 3 +#define MAC_IA0_MACOCT2_M 0x0000FF00 // MAC Address Octet 2 +#define MAC_IA0_MACOCT1_M 0x000000FF // MAC Address Octet 1 +#define MAC_IA0_MACOCT4_S 24 +#define MAC_IA0_MACOCT3_S 16 +#define MAC_IA0_MACOCT2_S 8 +#define MAC_IA0_MACOCT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA1 register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6_M 0x0000FF00 // MAC Address Octet 6 +#define MAC_IA1_MACOCT5_M 0x000000FF // MAC Address Octet 5 +#define MAC_IA1_MACOCT6_S 8 +#define MAC_IA1_MACOCT5_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_THR register. +// +//***************************************************************************** +#define MAC_THR_THRESH_M 0x0000003F // Threshold Value +#define MAC_THR_THRESH_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MCTL register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR_M 0x000000F8 // MII Register Address +#define MAC_MCTL_WRITE 0x00000002 // MII Register Transaction Type +#define MAC_MCTL_START 0x00000001 // MII Register Transaction Enable +#define MAC_MCTL_REGADR_S 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDV register. +// +//***************************************************************************** +#define MAC_MDV_DIV_M 0x000000FF // Clock Divider +#define MAC_MDV_DIV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MTXD register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX_M 0x0000FFFF // MII Register Transmit Data +#define MAC_MTXD_MDTX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MRXD register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX_M 0x0000FFFF // MII Register Receive Data +#define MAC_MRXD_MDRX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_NP register. +// +//***************************************************************************** +#define MAC_NP_NPR_M 0x0000003F // Number of Packets in Receive + // FIFO +#define MAC_NP_NPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TR register. +// +//***************************************************************************** +#define MAC_TR_NEWTX 0x00000001 // New Transmission + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TS register. +// +//***************************************************************************** +#define MAC_TS_TSEN 0x00000001 // Time Stamp Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_LED register. +// +//***************************************************************************** +#define MAC_LED_LED1_M 0x00000F00 // LED1 Source +#define MAC_LED_LED1_LINK 0x00000000 // Link OK +#define MAC_LED_LED1_RXTX 0x00000100 // RX or TX Activity (Default LED1) +#define MAC_LED_LED1_100 0x00000500 // 100BASE-TX mode +#define MAC_LED_LED1_10 0x00000600 // 10BASE-T mode +#define MAC_LED_LED1_DUPLEX 0x00000700 // Full-Duplex +#define MAC_LED_LED1_LINKACT 0x00000800 // Link OK & Blink=RX or TX + // Activity +#define MAC_LED_LED0_M 0x0000000F // LED0 Source +#define MAC_LED_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define MAC_LED_LED0_RXTX 0x00000001 // RX or TX Activity +#define MAC_LED_LED0_100 0x00000005 // 100BASE-TX mode +#define MAC_LED_LED0_10 0x00000006 // 10BASE-T mode +#define MAC_LED_LED0_DUPLEX 0x00000007 // Full-Duplex +#define MAC_LED_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDIX register. +// +//***************************************************************************** +#define MAC_MDIX_EN 0x00000001 // MDI/MDI-X Enable + +//***************************************************************************** +// +// The following are defines for the Ethernet Controller PHY registers. +// +//***************************************************************************** +#define PHY_MR0 0x00000000 // Ethernet PHY Management Register + // 0 - Control +#define PHY_MR1 0x00000001 // Ethernet PHY Management Register + // 1 - Status +#define PHY_MR2 0x00000002 // Ethernet PHY Management Register + // 2 - PHY Identifier 1 +#define PHY_MR3 0x00000003 // Ethernet PHY Management Register + // 3 - PHY Identifier 2 +#define PHY_MR4 0x00000004 // Ethernet PHY Management Register + // 4 - Auto-Negotiation + // Advertisement +#define PHY_MR5 0x00000005 // Ethernet PHY Management Register + // 5 - Auto-Negotiation Link + // Partner Base Page Ability +#define PHY_MR6 0x00000006 // Ethernet PHY Management Register + // 6 - Auto-Negotiation Expansion +#define PHY_MR16 0x00000010 // Ethernet PHY Management Register + // 16 - Vendor-Specific +#define PHY_MR17 0x00000011 // Ethernet PHY Management Register + // 17 - Mode Control/Status +#define PHY_MR18 0x00000012 // Ethernet PHY Management Register + // 18 - Diagnostic +#define PHY_MR19 0x00000013 // Ethernet PHY Management Register + // 19 - Transceiver Control +#define PHY_MR23 0x00000017 // Ethernet PHY Management Register + // 23 - LED Configuration +#define PHY_MR24 0x00000018 // Ethernet PHY Management Register + // 24 -MDI/MDIX Control +#define PHY_MR27 0x0000001B // Ethernet PHY Management Register + // 27 - Special Control/Status +#define PHY_MR29 0x0000001D // Ethernet PHY Management Register + // 29 - Interrupt Status +#define PHY_MR30 0x0000001E // Ethernet PHY Management Register + // 30 - Interrupt Mask +#define PHY_MR31 0x0000001F // Ethernet PHY Management Register + // 31 - PHY Special Control/Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR0 register. +// +//***************************************************************************** +#define PHY_MR0_RESET 0x00008000 // Reset Registers +#define PHY_MR0_LOOPBK 0x00004000 // Loopback Mode +#define PHY_MR0_SPEEDSL 0x00002000 // Speed Select +#define PHY_MR0_ANEGEN 0x00001000 // Auto-Negotiation Enable +#define PHY_MR0_PWRDN 0x00000800 // Power Down +#define PHY_MR0_ISO 0x00000400 // Isolate +#define PHY_MR0_RANEG 0x00000200 // Restart Auto-Negotiation +#define PHY_MR0_DUPLEX 0x00000100 // Set Duplex Mode +#define PHY_MR0_COLT 0x00000080 // Collision Test + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR1 register. +// +//***************************************************************************** +#define PHY_MR1_100X_F 0x00004000 // 100BASE-TX Full-Duplex Mode +#define PHY_MR1_100X_H 0x00002000 // 100BASE-TX Half-Duplex Mode +#define PHY_MR1_10T_F 0x00001000 // 10BASE-T Full-Duplex Mode +#define PHY_MR1_10T_H 0x00000800 // 10BASE-T Half-Duplex Mode +#define PHY_MR1_MFPS 0x00000040 // Management Frames with Preamble + // Suppressed +#define PHY_MR1_ANEGC 0x00000020 // Auto-Negotiation Complete +#define PHY_MR1_RFAULT 0x00000010 // Remote Fault +#define PHY_MR1_ANEGA 0x00000008 // Auto-Negotiation +#define PHY_MR1_LINK 0x00000004 // Link Made +#define PHY_MR1_JAB 0x00000002 // Jabber Condition +#define PHY_MR1_EXTD 0x00000001 // Extended Capabilities + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR2 register. +// +//***************************************************************************** +#define PHY_MR2_OUI_M 0x0000FFFF // Organizationally Unique + // Identifier[21:6] +#define PHY_MR2_OUI_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR3 register. +// +//***************************************************************************** +#define PHY_MR3_OUI_M 0x0000FC00 // Organizationally Unique + // Identifier[5:0] +#define PHY_MR3_MN_M 0x000003F0 // Model Number +#define PHY_MR3_RN_M 0x0000000F // Revision Number +#define PHY_MR3_OUI_S 10 +#define PHY_MR3_MN_S 4 +#define PHY_MR3_RN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR4 register. +// +//***************************************************************************** +#define PHY_MR4_NP 0x00008000 // Next Page +#define PHY_MR4_RF 0x00002000 // Remote Fault +#define PHY_MR4_A3 0x00000100 // Technology Ability Field [3] +#define PHY_MR4_A2 0x00000080 // Technology Ability Field [2] +#define PHY_MR4_A1 0x00000040 // Technology Ability Field [1] +#define PHY_MR4_A0 0x00000020 // Technology Ability Field [0] +#define PHY_MR4_S_M 0x0000001F // Selector Field +#define PHY_MR4_S_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR5 register. +// +//***************************************************************************** +#define PHY_MR5_NP 0x00008000 // Next Page +#define PHY_MR5_ACK 0x00004000 // Acknowledge +#define PHY_MR5_RF 0x00002000 // Remote Fault +#define PHY_MR5_A_M 0x00001FE0 // Technology Ability Field +#define PHY_MR5_S_M 0x0000001F // Selector Field +#define PHY_MR5_S_8023 0x00000001 // IEEE Std 802.3 +#define PHY_MR5_S_8029 0x00000002 // IEEE Std 802.9 ISLAN-16T +#define PHY_MR5_S_8025 0x00000003 // IEEE Std 802.5 +#define PHY_MR5_S_1394 0x00000004 // IEEE Std 1394 +#define PHY_MR5_A_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR6 register. +// +//***************************************************************************** +#define PHY_MR6_PDF 0x00000010 // Parallel Detection Fault +#define PHY_MR6_LPNPA 0x00000008 // Link Partner is Next Page Able +#define PHY_MR6_PRX 0x00000002 // New Page Received +#define PHY_MR6_LPANEGA 0x00000001 // Link Partner is Auto-Negotiation + // Able + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR16 register. +// +//***************************************************************************** +#define PHY_MR16_RPTR 0x00008000 // Repeater Mode +#define PHY_MR16_INPOL 0x00004000 // Interrupt Polarity +#define PHY_MR16_TXHIM 0x00001000 // Transmit High Impedance Mode +#define PHY_MR16_SQEI 0x00000800 // SQE Inhibit Testing +#define PHY_MR16_NL10 0x00000400 // Natural Loopback Mode +#define PHY_MR16_SR_M 0x000003C0 // Silicon Revision Identifier +#define PHY_MR16_APOL 0x00000020 // Auto-Polarity Disable +#define PHY_MR16_RVSPOL 0x00000010 // Receive Data Polarity +#define PHY_MR16_PCSBP 0x00000002 // PCS Bypass +#define PHY_MR16_RXCC 0x00000001 // Receive Clock Control +#define PHY_MR16_SR_S 6 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR17 register. +// +//***************************************************************************** +#define PHY_MR17_JABBER_IE 0x00008000 // Jabber Interrupt Enable +#define PHY_MR17_FASTRIP 0x00004000 // 10-BASE-T Fast Mode Enable +#define PHY_MR17_RXER_IE 0x00004000 // Receive Error Interrupt Enable +#define PHY_MR17_EDPD 0x00002000 // Enable Energy Detect Power Down +#define PHY_MR17_PRX_IE 0x00002000 // Page Received Interrupt Enable +#define PHY_MR17_PDF_IE 0x00001000 // Parallel Detection Fault + // Interrupt Enable +#define PHY_MR17_LSQE 0x00000800 // Low Squelch Enable +#define PHY_MR17_LPACK_IE 0x00000800 // LP Acknowledge Interrupt Enable +#define PHY_MR17_LSCHG_IE 0x00000400 // Link Status Change Interrupt + // Enable +#define PHY_MR17_RFAULT_IE 0x00000200 // Remote Fault Interrupt Enable +#define PHY_MR17_ANEGCOMP_IE 0x00000100 // Auto-Negotiation Complete + // Interrupt Enable +#define PHY_MR17_FASTEST 0x00000100 // Auto-Negotiation Test Mode +#define PHY_MR17_JABBER_INT 0x00000080 // Jabber Event Interrupt +#define PHY_MR17_RXER_INT 0x00000040 // Receive Error Interrupt +#define PHY_MR17_PRX_INT 0x00000020 // Page Receive Interrupt +#define PHY_MR17_PDF_INT 0x00000010 // Parallel Detection Fault + // Interrupt +#define PHY_MR17_LPACK_INT 0x00000008 // LP Acknowledge Interrupt +#define PHY_MR17_LSCHG_INT 0x00000004 // Link Status Change Interrupt +#define PHY_MR17_FGLS 0x00000004 // Force Good Link Status +#define PHY_MR17_RFAULT_INT 0x00000002 // Remote Fault Interrupt +#define PHY_MR17_ENON 0x00000002 // Energy On +#define PHY_MR17_ANEGCOMP_INT 0x00000001 // Auto-Negotiation Complete + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR18 register. +// +//***************************************************************************** +#define PHY_MR18_ANEGF 0x00001000 // Auto-Negotiation Failure +#define PHY_MR18_DPLX 0x00000800 // Duplex Mode +#define PHY_MR18_RATE 0x00000400 // Rate +#define PHY_MR18_RXSD 0x00000200 // Receive Detection +#define PHY_MR18_RX_LOCK 0x00000100 // Receive PLL Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR19 register. +// +//***************************************************************************** +#define PHY_MR19_TXO_M 0x0000C000 // Transmit Amplitude Selection +#define PHY_MR19_TXO_00DB 0x00000000 // Gain set for 0.0dB of insertion + // loss +#define PHY_MR19_TXO_04DB 0x00004000 // Gain set for 0.4dB of insertion + // loss +#define PHY_MR19_TXO_08DB 0x00008000 // Gain set for 0.8dB of insertion + // loss +#define PHY_MR19_TXO_12DB 0x0000C000 // Gain set for 1.2dB of insertion + // loss + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR23 register. +// +//***************************************************************************** +#define PHY_MR23_LED1_M 0x000000F0 // LED1 Source +#define PHY_MR23_LED1_LINK 0x00000000 // Link OK +#define PHY_MR23_LED1_RXTX 0x00000010 // RX or TX Activity (Default LED1) +#define PHY_MR23_LED1_100 0x00000050 // 100BASE-TX mode +#define PHY_MR23_LED1_10 0x00000060 // 10BASE-T mode +#define PHY_MR23_LED1_DUPLEX 0x00000070 // Full-Duplex +#define PHY_MR23_LED1_LINKACT 0x00000080 // Link OK & Blink=RX or TX + // Activity +#define PHY_MR23_LED0_M 0x0000000F // LED0 Source +#define PHY_MR23_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define PHY_MR23_LED0_RXTX 0x00000001 // RX or TX Activity +#define PHY_MR23_LED0_100 0x00000005 // 100BASE-TX mode +#define PHY_MR23_LED0_10 0x00000006 // 10BASE-T mode +#define PHY_MR23_LED0_DUPLEX 0x00000007 // Full-Duplex +#define PHY_MR23_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR24 register. +// +//***************************************************************************** +#define PHY_MR24_PD_MODE 0x00000080 // Parallel Detection Mode +#define PHY_MR24_AUTO_SW 0x00000040 // Auto-Switching Enable +#define PHY_MR24_MDIX 0x00000020 // Auto-Switching Configuration +#define PHY_MR24_MDIX_CM 0x00000010 // Auto-Switching Complete +#define PHY_MR24_MDIX_SD_M 0x0000000F // Auto-Switching Seed +#define PHY_MR24_MDIX_SD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR27 register. +// +//***************************************************************************** +#define PHY_MR27_XPOL 0x00000010 // Polarity State of 10 BASE-T + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR29 register. +// +//***************************************************************************** +#define PHY_MR29_EONIS 0x00000080 // ENERGYON Interrupt +#define PHY_MR29_ANCOMPIS 0x00000040 // Auto-Negotiation Complete + // Interrupt +#define PHY_MR29_RFLTIS 0x00000020 // Remote Fault Interrupt +#define PHY_MR29_LDIS 0x00000010 // Link Down Interrupt +#define PHY_MR29_LPACKIS 0x00000008 // Auto-Negotiation LP Acknowledge +#define PHY_MR29_PDFIS 0x00000004 // Parallel Detection Fault +#define PHY_MR29_PRXIS 0x00000002 // Auto Negotiation Page Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR30 register. +// +//***************************************************************************** +#define PHY_MR30_EONIM 0x00000080 // ENERGYON Interrupt Enabled +#define PHY_MR30_ANCOMPIM 0x00000040 // Auto-Negotiation Complete + // Interrupt Enabled +#define PHY_MR30_RFLTIM 0x00000020 // Remote Fault Interrupt Enabled +#define PHY_MR30_LDIM 0x00000010 // Link Down Interrupt Enabled +#define PHY_MR30_LPACKIM 0x00000008 // Auto-Negotiation LP Acknowledge + // Enabled +#define PHY_MR30_PDFIM 0x00000004 // Parallel Detection Fault Enabled +#define PHY_MR30_PRXIM 0x00000002 // Auto Negotiation Page Received + // Enabled + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR31 register. +// +//***************************************************************************** +#define PHY_MR31_AUTODONE 0x00001000 // Auto Negotiation Done +#define PHY_MR31_SPEED_M 0x0000001C // HCD Speed Value +#define PHY_MR31_SPEED_10HD 0x00000004 // 10BASE-T half duplex +#define PHY_MR31_SPEED_100HD 0x00000008 // 100BASE-T half duplex +#define PHY_MR31_SPEED_10FD 0x00000014 // 10BASE-T full duplex +#define PHY_MR31_SPEED_100FD 0x00000018 // 100BASE-T full duplex +#define PHY_MR31_SCRDIS 0x00000001 // Scramble Disable + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Ethernet MAC register offsets. +// +//***************************************************************************** +#define MAC_O_IS 0x00000000 // Interrupt Status Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IS +// register. +// +//***************************************************************************** +#define MAC_IS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_IS_MDINT 0x00000020 // MDI Transaction Complete +#define MAC_IS_RXER 0x00000010 // RX Error +#define MAC_IS_FOV 0x00000008 // RX FIFO Overrun +#define MAC_IS_TXEMP 0x00000004 // TX FIFO Empy +#define MAC_IS_TXER 0x00000002 // TX Error +#define MAC_IS_RXINT 0x00000001 // RX Packet Available + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IA0 +// register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4 0xFF000000 // 4th Octet of MAC address +#define MAC_IA0_MACOCT3 0x00FF0000 // 3rd Octet of MAC address +#define MAC_IA0_MACOCT2 0x0000FF00 // 2nd Octet of MAC address +#define MAC_IA0_MACOCT1 0x000000FF // 1st Octet of MAC address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_IA1 +// register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6 0x0000FF00 // 6th Octet of MAC address +#define MAC_IA1_MACOCT5 0x000000FF // 5th Octet of MAC address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_THR +// register. +// +//***************************************************************************** +#define MAC_THR_THRESH 0x0000003F // Transmit Threshold Value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MCTL +// register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR 0x000000F8 // Address for Next MII Transaction + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MDV +// register. +// +//***************************************************************************** +#define MAC_MDV_DIV 0x000000FF // Clock Divider for MDC for TX + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MTXD +// register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX 0x0000FFFF // Data for Next MII Transaction + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_MRXD +// register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX 0x0000FFFF // Data Read from Last MII Trans + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the MAC_O_NP +// register. +// +//***************************************************************************** +#define MAC_NP_NPR 0x0000003F // Number of RX Frames in FIFO + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PHY_MR23 +// register. +// +//***************************************************************************** +#define PHY_MR23_LED1_TX 0x00000020 // TX Activity +#define PHY_MR23_LED1_RX 0x00000030 // RX Activity +#define PHY_MR23_LED1_COL 0x00000040 // Collision +#define PHY_MR23_LED0_TX 0x00000002 // TX Activity +#define PHY_MR23_LED0_RX 0x00000003 // RX Activity +#define PHY_MR23_LED0_COL 0x00000004 // Collision + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the MAC +// registers. +// +//***************************************************************************** +#define MAC_RV_MDV 0x00000080 +#define MAC_RV_IM 0x0000007F +#define MAC_RV_THR 0x0000003F +#define MAC_RV_RCTL 0x00000008 +#define MAC_RV_IA0 0x00000000 +#define MAC_RV_TCTL 0x00000000 +#define MAC_RV_DATA 0x00000000 +#define MAC_RV_MRXD 0x00000000 +#define MAC_RV_TR 0x00000000 +#define MAC_RV_IS 0x00000000 +#define MAC_RV_NP 0x00000000 +#define MAC_RV_MCTL 0x00000000 +#define MAC_RV_MTXD 0x00000000 +#define MAC_RV_IA1 0x00000000 +#define MAC_RV_IACK 0x00000000 +#define MAC_RV_MADD 0x00000000 + +#endif + +#endif // __HW_ETHERNET_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_flash.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_flash.h new file mode 100644 index 00000000..13a013e5 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_flash.h @@ -0,0 +1,381 @@ +//***************************************************************************** +// +// hw_flash.h - Macros used when accessing the flash controller. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_FLASH_H__ +#define __HW_FLASH_H__ + +//***************************************************************************** +// +// The following are defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_FMA 0x400FD000 // Flash Memory Address +#define FLASH_FMD 0x400FD004 // Flash Memory Data +#define FLASH_FMC 0x400FD008 // Flash Memory Control +#define FLASH_FCRIS 0x400FD00C // Flash Controller Raw Interrupt + // Status +#define FLASH_FCIM 0x400FD010 // Flash Controller Interrupt Mask +#define FLASH_FCMISC 0x400FD014 // Flash Controller Masked + // Interrupt Status and Clear +#define FLASH_FMC2 0x400FD020 // Flash Memory Control 2 +#define FLASH_FWBVAL 0x400FD030 // Flash Write Buffer Valid +#define FLASH_FCTL 0x400FD0F8 // Flash Control +#define FLASH_FWBN 0x400FD100 // Flash Write Buffer n +#define FLASH_RMCTL 0x400FE0F0 // ROM Control +#define FLASH_FMPRE 0x400FE130 // Flash Memory Protection Read + // Enable +#define FLASH_FMPPE 0x400FE134 // Flash Memory Protection Program + // Enable +#define FLASH_USECRL 0x400FE140 // USec Reload +#define FLASH_USERDBG 0x400FE1D0 // User Debug +#define FLASH_BOOTCFG 0x400FE1D0 // Boot Configuration +#define FLASH_USERREG0 0x400FE1E0 // User Register 0 +#define FLASH_USERREG1 0x400FE1E4 // User Register 1 +#define FLASH_USERREG2 0x400FE1E8 // User Register 2 +#define FLASH_USERREG3 0x400FE1EC // User Register 3 +#define FLASH_FMPRE0 0x400FE200 // Flash Memory Protection Read + // Enable 0 +#define FLASH_FMPRE1 0x400FE204 // Flash Memory Protection Read + // Enable 1 +#define FLASH_FMPRE2 0x400FE208 // Flash Memory Protection Read + // Enable 2 +#define FLASH_FMPRE3 0x400FE20C // Flash Memory Protection Read + // Enable 3 +#define FLASH_FMPPE0 0x400FE400 // Flash Memory Protection Program + // Enable 0 +#define FLASH_FMPPE1 0x400FE404 // Flash Memory Protection Program + // Enable 1 +#define FLASH_FMPPE2 0x400FE408 // Flash Memory Protection Program + // Enable 2 +#define FLASH_FMPPE3 0x400FE40C // Flash Memory Protection Program + // Enable 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC2 register. +// +//***************************************************************************** +#define FLASH_FMC2_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC2_WRBUF 0x00000001 // Buffered Flash Memory Write + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBVAL register. +// +//***************************************************************************** +#define FLASH_FWBVAL_FWB_M 0xFFFFFFFF // Flash Memory Write Buffer + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCTL register. +// +//***************************************************************************** +#define FLASH_FCTL_USDACK 0x00000002 // User Shut Down Acknowledge +#define FLASH_FCTL_USDREQ 0x00000001 // User Shut Down Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FWBN register. +// +//***************************************************************************** +#define FLASH_FWBN_DATA_M 0xFFFFFFFF // Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_RMCTL register. +// +//***************************************************************************** +#define FLASH_RMCTL_BA 0x00000001 // Boot Alias + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_BOOTCFG register. +// +//***************************************************************************** +#define FLASH_BOOTCFG_NW 0x80000000 // Not Written +#define FLASH_BOOTCFG_PORT_M 0x0000E000 // Boot GPIO Port +#define FLASH_BOOTCFG_PORT_A 0x00000000 // Port A +#define FLASH_BOOTCFG_PORT_B 0x00002000 // Port B +#define FLASH_BOOTCFG_PORT_C 0x00004000 // Port C +#define FLASH_BOOTCFG_PORT_D 0x00006000 // Port D +#define FLASH_BOOTCFG_PORT_E 0x00008000 // Port E +#define FLASH_BOOTCFG_PORT_F 0x0000A000 // Port F +#define FLASH_BOOTCFG_PORT_G 0x0000C000 // Port G +#define FLASH_BOOTCFG_PORT_H 0x0000E000 // Port H +#define FLASH_BOOTCFG_PIN_M 0x00001C00 // Boot GPIO Pin +#define FLASH_BOOTCFG_PIN_0 0x00000000 // Pin 0 +#define FLASH_BOOTCFG_PIN_1 0x00000400 // Pin 1 +#define FLASH_BOOTCFG_PIN_2 0x00000800 // Pin 2 +#define FLASH_BOOTCFG_PIN_3 0x00000C00 // Pin 3 +#define FLASH_BOOTCFG_PIN_4 0x00001000 // Pin 4 +#define FLASH_BOOTCFG_PIN_5 0x00001400 // Pin 5 +#define FLASH_BOOTCFG_PIN_6 0x00001800 // Pin 6 +#define FLASH_BOOTCFG_PIN_7 0x00001C00 // Pin 7 +#define FLASH_BOOTCFG_POL 0x00000200 // Boot GPIO Polarity +#define FLASH_BOOTCFG_EN 0x00000100 // Boot GPIO Enable +#define FLASH_BOOTCFG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_BOOTCFG_DBG0 0x00000001 // Debug Control 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG2 register. +// +//***************************************************************************** +#define FLASH_USERREG2_NW 0x80000000 // Not Written +#define FLASH_USERREG2_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG3 register. +// +//***************************************************************************** +#define FLASH_USERREG3_NW 0x80000000 // Not Written +#define FLASH_USERREG3_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMPRE and +// FLASH_FMPPE registers. +// +//***************************************************************************** +#define FLASH_FMP_BLOCK_31 0x80000000 // Enable for block 31 +#define FLASH_FMP_BLOCK_30 0x40000000 // Enable for block 30 +#define FLASH_FMP_BLOCK_29 0x20000000 // Enable for block 29 +#define FLASH_FMP_BLOCK_28 0x10000000 // Enable for block 28 +#define FLASH_FMP_BLOCK_27 0x08000000 // Enable for block 27 +#define FLASH_FMP_BLOCK_26 0x04000000 // Enable for block 26 +#define FLASH_FMP_BLOCK_25 0x02000000 // Enable for block 25 +#define FLASH_FMP_BLOCK_24 0x01000000 // Enable for block 24 +#define FLASH_FMP_BLOCK_23 0x00800000 // Enable for block 23 +#define FLASH_FMP_BLOCK_22 0x00400000 // Enable for block 22 +#define FLASH_FMP_BLOCK_21 0x00200000 // Enable for block 21 +#define FLASH_FMP_BLOCK_20 0x00100000 // Enable for block 20 +#define FLASH_FMP_BLOCK_19 0x00080000 // Enable for block 19 +#define FLASH_FMP_BLOCK_18 0x00040000 // Enable for block 18 +#define FLASH_FMP_BLOCK_17 0x00020000 // Enable for block 17 +#define FLASH_FMP_BLOCK_16 0x00010000 // Enable for block 16 +#define FLASH_FMP_BLOCK_15 0x00008000 // Enable for block 15 +#define FLASH_FMP_BLOCK_14 0x00004000 // Enable for block 14 +#define FLASH_FMP_BLOCK_13 0x00002000 // Enable for block 13 +#define FLASH_FMP_BLOCK_12 0x00001000 // Enable for block 12 +#define FLASH_FMP_BLOCK_11 0x00000800 // Enable for block 11 +#define FLASH_FMP_BLOCK_10 0x00000400 // Enable for block 10 +#define FLASH_FMP_BLOCK_9 0x00000200 // Enable for block 9 +#define FLASH_FMP_BLOCK_8 0x00000100 // Enable for block 8 +#define FLASH_FMP_BLOCK_7 0x00000080 // Enable for block 7 +#define FLASH_FMP_BLOCK_6 0x00000040 // Enable for block 6 +#define FLASH_FMP_BLOCK_5 0x00000020 // Enable for block 5 +#define FLASH_FMP_BLOCK_4 0x00000010 // Enable for block 4 +#define FLASH_FMP_BLOCK_3 0x00000008 // Enable for block 3 +#define FLASH_FMP_BLOCK_2 0x00000004 // Enable for block 2 +#define FLASH_FMP_BLOCK_1 0x00000002 // Enable for block 1 +#define FLASH_FMP_BLOCK_0 0x00000001 // Enable for block 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the FLASH register offsets. +// +//***************************************************************************** +#define FLASH_RMVER 0x400FE0F4 // ROM Version Register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FMC +// register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_MASK 0xFFFF0000 // FLASH write key mask +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCRIS +// register. +// +//***************************************************************************** +#define FLASH_FCRIS_PROGRAM 0x00000002 // Programming status +#define FLASH_FCRIS_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCIM +// register. +// +//***************************************************************************** +#define FLASH_FCIM_PROGRAM 0x00000002 // Programming mask +#define FLASH_FCIM_ACCESS 0x00000001 // Invalid access mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_FCMISC +// register. +// +//***************************************************************************** +#define FLASH_FCMISC_PROGRAM 0x00000002 // Programming status +#define FLASH_FCMISC_ACCESS 0x00000001 // Invalid access status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_RMVER +// register. +// +//***************************************************************************** +#define FLASH_RMVER_CONT_M 0xFF000000 // ROM Contents +#define FLASH_RMVER_CONT_LM 0x00000000 // Stellaris Boot Loader & + // DriverLib +#define FLASH_RMVER_CONT_LM_AES 0x02000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_CONT_LM_AES_SAFERTOS \ + 0x03000000 // Stellaris Boot Loader & + // DriverLib with AES and SAFERTOS +#define FLASH_RMVER_CONT_LM_AES2 \ + 0x05000000 // Stellaris Boot Loader & + // DriverLib with AES +#define FLASH_RMVER_VER_M 0x0000FF00 // ROM Version +#define FLASH_RMVER_REV_M 0x000000FF // ROM Revision +#define FLASH_RMVER_VER_S 8 +#define FLASH_RMVER_REV_S 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the FLASH_USECRL +// register. +// +//***************************************************************************** +#define FLASH_USECRL_MASK 0x000000FF // Clock per uSec +#define FLASH_USECRL_SHIFT 0 + +#endif + +#endif // __HW_FLASH_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_gpio.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_gpio.h new file mode 100644 index 00000000..acdb2984 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_gpio.h @@ -0,0 +1,592 @@ +//***************************************************************************** +// +// hw_gpio.h - Defines and Macros for GPIO hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_GPIO_H__ +#define __HW_GPIO_H__ + +//***************************************************************************** +// +// The following are defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_DATA 0x00000000 // GPIO Data +#define GPIO_O_DIR 0x00000400 // GPIO Direction +#define GPIO_O_IS 0x00000404 // GPIO Interrupt Sense +#define GPIO_O_IBE 0x00000408 // GPIO Interrupt Both Edges +#define GPIO_O_IEV 0x0000040C // GPIO Interrupt Event +#define GPIO_O_IM 0x00000410 // GPIO Interrupt Mask +#define GPIO_O_RIS 0x00000414 // GPIO Raw Interrupt Status +#define GPIO_O_MIS 0x00000418 // GPIO Masked Interrupt Status +#define GPIO_O_ICR 0x0000041C // GPIO Interrupt Clear +#define GPIO_O_AFSEL 0x00000420 // GPIO Alternate Function Select +#define GPIO_O_DR2R 0x00000500 // GPIO 2-mA Drive Select +#define GPIO_O_DR4R 0x00000504 // GPIO 4-mA Drive Select +#define GPIO_O_DR8R 0x00000508 // GPIO 8-mA Drive Select +#define GPIO_O_ODR 0x0000050C // GPIO Open Drain Select +#define GPIO_O_PUR 0x00000510 // GPIO Pull-Up Select +#define GPIO_O_PDR 0x00000514 // GPIO Pull-Down Select +#define GPIO_O_SLR 0x00000518 // GPIO Slew Rate Control Select +#define GPIO_O_DEN 0x0000051C // GPIO Digital Enable +#define GPIO_O_LOCK 0x00000520 // GPIO Lock +#define GPIO_O_CR 0x00000524 // GPIO Commit +#define GPIO_O_AMSEL 0x00000528 // GPIO Analog Mode Select +#define GPIO_O_PCTL 0x0000052C // GPIO Port Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register +#define GPIO_LOCK_KEY_DD 0x4C4F434B // Unlocks the GPIO_CR register on + // DustDevil-class devices and + // later + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port A. +// +//***************************************************************************** +#define GPIO_PCTL_PA0_M 0x0000000F // PA0 mask +#define GPIO_PCTL_PA0_U0RX 0x00000001 // U0RX on PA0 +#define GPIO_PCTL_PA0_I2C1SCL 0x00000008 // I2C1SCL on PA0 +#define GPIO_PCTL_PA0_U1RX 0x00000009 // U1RX on PA0 +#define GPIO_PCTL_PA1_M 0x000000F0 // PA1 mask +#define GPIO_PCTL_PA1_U0TX 0x00000010 // U0TX on PA1 +#define GPIO_PCTL_PA1_I2C1SDA 0x00000080 // I2C1SDA on PA1 +#define GPIO_PCTL_PA1_U1TX 0x00000090 // U1TX on PA1 +#define GPIO_PCTL_PA2_M 0x00000F00 // PA2 mask +#define GPIO_PCTL_PA2_SSI0CLK 0x00000100 // SSI0CLK on PA2 +#define GPIO_PCTL_PA2_PWM4 0x00000400 // PWM4 on PA2 +#define GPIO_PCTL_PA2_I2S0RXSD 0x00000900 // I2S0RXSD on PA2 +#define GPIO_PCTL_PA3_M 0x0000F000 // PA3 mask +#define GPIO_PCTL_PA3_SSI0FSS 0x00001000 // SSI0FSS on PA3 +#define GPIO_PCTL_PA3_PWM5 0x00004000 // PWM5 on PA3 +#define GPIO_PCTL_PA3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PA3 +#define GPIO_PCTL_PA4_M 0x000F0000 // PA4 mask +#define GPIO_PCTL_PA4_SSI0RX 0x00010000 // SSI0RX on PA4 +#define GPIO_PCTL_PA4_PWM6 0x00040000 // PWM6 on PA4 +#define GPIO_PCTL_PA4_CAN0RX 0x00050000 // CAN0RX on PA4 +#define GPIO_PCTL_PA4_I2S0TXSCK 0x00090000 // I2S0TXSCK on PA4 +#define GPIO_PCTL_PA5_M 0x00F00000 // PA5 mask +#define GPIO_PCTL_PA5_SSI0TX 0x00100000 // SSI0TX on PA5 +#define GPIO_PCTL_PA5_PWM7 0x00400000 // PWM7 on PA5 +#define GPIO_PCTL_PA5_CAN0TX 0x00500000 // CAN0TX on PA5 +#define GPIO_PCTL_PA5_I2S0TXWS 0x00900000 // I2S0TXWS on PA5 +#define GPIO_PCTL_PA6_M 0x0F000000 // PA6 mask +#define GPIO_PCTL_PA6_I2C1SCL 0x01000000 // I2C1SCL on PA6 +#define GPIO_PCTL_PA6_CCP1 0x02000000 // CCP1 on PA6 +#define GPIO_PCTL_PA6_PWM0 0x04000000 // PWM0 on PA6 +#define GPIO_PCTL_PA6_PWM4 0x05000000 // PWM4 on PA6 +#define GPIO_PCTL_PA6_CAN0RX 0x06000000 // CAN0RX on PA6 +#define GPIO_PCTL_PA6_USB0EPEN 0x08000000 // USB0EPEN on PA6 +#define GPIO_PCTL_PA6_U1CTS 0x09000000 // U1CTS on PA6 +#define GPIO_PCTL_PA7_M 0xF0000000 // PA7 mask +#define GPIO_PCTL_PA7_I2C1SDA 0x10000000 // I2C1SDA on PA7 +#define GPIO_PCTL_PA7_CCP4 0x20000000 // CCP4 on PA7 +#define GPIO_PCTL_PA7_PWM1 0x40000000 // PWM1 on PA7 +#define GPIO_PCTL_PA7_PWM5 0x50000000 // PWM5 on PA7 +#define GPIO_PCTL_PA7_CAN0TX 0x60000000 // CAN0TX on PA7 +#define GPIO_PCTL_PA7_CCP3 0x70000000 // CCP3 on PA7 +#define GPIO_PCTL_PA7_USB0PFLT 0x80000000 // USB0PFLT on PA7 +#define GPIO_PCTL_PA7_U1DCD 0x90000000 // U1DCD on PA7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port B. +// +//***************************************************************************** +#define GPIO_PCTL_PB0_M 0x0000000F // PB0 mask +#define GPIO_PCTL_PB0_CCP0 0x00000001 // CCP0 on PB0 +#define GPIO_PCTL_PB0_PWM2 0x00000002 // PWM2 on PB0 +#define GPIO_PCTL_PB0_U1RX 0x00000005 // U1RX on PB0 +#define GPIO_PCTL_PB1_M 0x000000F0 // PB1 mask +#define GPIO_PCTL_PB1_CCP2 0x00000010 // CCP2 on PB1 +#define GPIO_PCTL_PB1_PWM3 0x00000020 // PWM3 on PB1 +#define GPIO_PCTL_PB1_CCP1 0x00000040 // CCP1 on PB1 +#define GPIO_PCTL_PB1_U1TX 0x00000050 // U1TX on PB1 +#define GPIO_PCTL_PB2_M 0x00000F00 // PB2 mask +#define GPIO_PCTL_PB2_I2C0SCL 0x00000100 // I2C0SCL on PB2 +#define GPIO_PCTL_PB2_IDX0 0x00000200 // IDX0 on PB2 +#define GPIO_PCTL_PB2_CCP3 0x00000400 // CCP3 on PB2 +#define GPIO_PCTL_PB2_CCP0 0x00000500 // CCP0 on PB2 +#define GPIO_PCTL_PB2_USB0EPEN 0x00000800 // USB0EPEN on PB2 +#define GPIO_PCTL_PB3_M 0x0000F000 // PB3 mask +#define GPIO_PCTL_PB3_I2C0SDA 0x00001000 // I2C0SDA on PB3 +#define GPIO_PCTL_PB3_FAULT0 0x00002000 // FAULT0 on PB3 +#define GPIO_PCTL_PB3_FAULT3 0x00004000 // FAULT3 on PB3 +#define GPIO_PCTL_PB3_USB0PFLT 0x00008000 // USB0PFLT on PB3 +#define GPIO_PCTL_PB4_M 0x000F0000 // PB4 mask +#define GPIO_PCTL_PB4_U2RX 0x00040000 // U2RX on PB4 +#define GPIO_PCTL_PB4_CAN0RX 0x00050000 // CAN0RX on PB4 +#define GPIO_PCTL_PB4_IDX0 0x00060000 // IDX0 on PB4 +#define GPIO_PCTL_PB4_U1RX 0x00070000 // U1RX on PB4 +#define GPIO_PCTL_PB4_EPI0S23 0x00080000 // EPI0S23 on PB4 +#define GPIO_PCTL_PB5_M 0x00F00000 // PB5 mask +#define GPIO_PCTL_PB5_C0O 0x00100000 // C0O on PB5 +#define GPIO_PCTL_PB5_CCP5 0x00200000 // CCP5 on PB5 +#define GPIO_PCTL_PB5_CCP6 0x00300000 // CCP6 on PB5 +#define GPIO_PCTL_PB5_CCP0 0x00400000 // CCP0 on PB5 +#define GPIO_PCTL_PB5_CAN0TX 0x00500000 // CAN0TX on PB5 +#define GPIO_PCTL_PB5_CCP2 0x00600000 // CCP2 on PB5 +#define GPIO_PCTL_PB5_U1TX 0x00700000 // U1TX on PB5 +#define GPIO_PCTL_PB5_EPI0S22 0x00800000 // EPI0S22 on PB5 +#define GPIO_PCTL_PB6_M 0x0F000000 // PB6 mask +#define GPIO_PCTL_PB6_CCP1 0x01000000 // CCP1 on PB6 +#define GPIO_PCTL_PB6_CCP7 0x02000000 // CCP7 on PB6 +#define GPIO_PCTL_PB6_C0O 0x03000000 // C0O on PB6 +#define GPIO_PCTL_PB6_FAULT1 0x04000000 // FAULT1 on PB6 +#define GPIO_PCTL_PB6_IDX0 0x05000000 // IDX0 on PB6 +#define GPIO_PCTL_PB6_CCP5 0x06000000 // CCP5 on PB6 +#define GPIO_PCTL_PB6_I2S0TXSCK 0x09000000 // I2S0TXSCK on PB6 +#define GPIO_PCTL_PB7_M 0xF0000000 // PB7 mask +#define GPIO_PCTL_PB7_NMI 0x40000000 // NMI on PB7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port C. +// +//***************************************************************************** +#define GPIO_PCTL_PC0_M 0x0000000F // PC0 mask +#define GPIO_PCTL_PC0_TCK 0x00000003 // TCK on PC0 +#define GPIO_PCTL_PC1_M 0x000000F0 // PC1 mask +#define GPIO_PCTL_PC1_TMS 0x00000030 // TMS on PC1 +#define GPIO_PCTL_PC2_M 0x00000F00 // PC2 mask +#define GPIO_PCTL_PC2_TDI 0x00000300 // TDI on PC2 +#define GPIO_PCTL_PC3_M 0x0000F000 // PC3 mask +#define GPIO_PCTL_PC3_TDO 0x00003000 // TDO on PC3 +#define GPIO_PCTL_PC4_M 0x000F0000 // PC4 mask +#define GPIO_PCTL_PC4_CCP5 0x00010000 // CCP5 on PC4 +#define GPIO_PCTL_PC4_PHA0 0x00020000 // PHA0 on PC4 +#define GPIO_PCTL_PC4_PWM6 0x00040000 // PWM6 on PC4 +#define GPIO_PCTL_PC4_CCP2 0x00050000 // CCP2 on PC4 +#define GPIO_PCTL_PC4_CCP4 0x00060000 // CCP4 on PC4 +#define GPIO_PCTL_PC4_EPI0S2 0x00080000 // EPI0S2 on PC4 +#define GPIO_PCTL_PC4_CCP1 0x00090000 // CCP1 on PC4 +#define GPIO_PCTL_PC5_M 0x00F00000 // PC5 mask +#define GPIO_PCTL_PC5_CCP1 0x00100000 // CCP1 on PC5 +#define GPIO_PCTL_PC5_C1O 0x00200000 // C1O on PC5 +#define GPIO_PCTL_PC5_C0O 0x00300000 // C0O on PC5 +#define GPIO_PCTL_PC5_FAULT2 0x00400000 // FAULT2 on PC5 +#define GPIO_PCTL_PC5_CCP3 0x00500000 // CCP3 on PC5 +#define GPIO_PCTL_PC5_USB0EPEN 0x00600000 // USB0EPEN on PC5 +#define GPIO_PCTL_PC5_EPI0S3 0x00800000 // EPI0S3 on PC5 +#define GPIO_PCTL_PC6_M 0x0F000000 // PC6 mask +#define GPIO_PCTL_PC6_CCP3 0x01000000 // CCP3 on PC6 +#define GPIO_PCTL_PC6_PHB0 0x02000000 // PHB0 on PC6 +#define GPIO_PCTL_PC6_C2O 0x03000000 // C2O on PC6 +#define GPIO_PCTL_PC6_PWM7 0x04000000 // PWM7 on PC6 +#define GPIO_PCTL_PC6_U1RX 0x05000000 // U1RX on PC6 +#define GPIO_PCTL_PC6_CCP0 0x06000000 // CCP0 on PC6 +#define GPIO_PCTL_PC6_USB0PFLT 0x07000000 // USB0PFLT on PC6 +#define GPIO_PCTL_PC6_EPI0S4 0x08000000 // EPI0S4 on PC6 +#define GPIO_PCTL_PC7_M 0xF0000000 // PC7 mask +#define GPIO_PCTL_PC7_CCP4 0x10000000 // CCP4 on PC7 +#define GPIO_PCTL_PC7_PHB0 0x20000000 // PHB0 on PC7 +#define GPIO_PCTL_PC7_CCP0 0x40000000 // CCP0 on PC7 +#define GPIO_PCTL_PC7_U1TX 0x50000000 // U1TX on PC7 +#define GPIO_PCTL_PC7_USB0PFLT 0x60000000 // USB0PFLT on PC7 +#define GPIO_PCTL_PC7_C1O 0x70000000 // C1O on PC7 +#define GPIO_PCTL_PC7_EPI0S5 0x80000000 // EPI0S5 on PC7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port D. +// +//***************************************************************************** +#define GPIO_PCTL_PD0_M 0x0000000F // PD0 mask +#define GPIO_PCTL_PD0_PWM0 0x00000001 // PWM0 on PD0 +#define GPIO_PCTL_PD0_CAN0RX 0x00000002 // CAN0RX on PD0 +#define GPIO_PCTL_PD0_IDX0 0x00000003 // IDX0 on PD0 +#define GPIO_PCTL_PD0_U2RX 0x00000004 // U2RX on PD0 +#define GPIO_PCTL_PD0_U1RX 0x00000005 // U1RX on PD0 +#define GPIO_PCTL_PD0_CCP6 0x00000006 // CCP6 on PD0 +#define GPIO_PCTL_PD0_I2S0RXSCK 0x00000008 // I2S0RXSCK on PD0 +#define GPIO_PCTL_PD0_U1CTS 0x00000009 // U1CTS on PD0 +#define GPIO_PCTL_PD1_M 0x000000F0 // PD1 mask +#define GPIO_PCTL_PD1_PWM1 0x00000010 // PWM1 on PD1 +#define GPIO_PCTL_PD1_CAN0TX 0x00000020 // CAN0TX on PD1 +#define GPIO_PCTL_PD1_PHA0 0x00000030 // PHA0 on PD1 +#define GPIO_PCTL_PD1_U2TX 0x00000040 // U2TX on PD1 +#define GPIO_PCTL_PD1_U1TX 0x00000050 // U1TX on PD1 +#define GPIO_PCTL_PD1_CCP7 0x00000060 // CCP7 on PD1 +#define GPIO_PCTL_PD1_I2S0RXWS 0x00000080 // I2S0RXWS on PD1 +#define GPIO_PCTL_PD1_U1DCD 0x00000090 // U1DCD on PD1 +#define GPIO_PCTL_PD1_CCP2 0x000000A0 // CCP2 on PD1 +#define GPIO_PCTL_PD1_PHB1 0x000000B0 // PHB1 on PD1 +#define GPIO_PCTL_PD2_M 0x00000F00 // PD2 mask +#define GPIO_PCTL_PD2_U1RX 0x00000100 // U1RX on PD2 +#define GPIO_PCTL_PD2_CCP6 0x00000200 // CCP6 on PD2 +#define GPIO_PCTL_PD2_PWM2 0x00000300 // PWM2 on PD2 +#define GPIO_PCTL_PD2_CCP5 0x00000400 // CCP5 on PD2 +#define GPIO_PCTL_PD2_EPI0S20 0x00000800 // EPI0S20 on PD2 +#define GPIO_PCTL_PD3_M 0x0000F000 // PD3 mask +#define GPIO_PCTL_PD3_U1TX 0x00001000 // U1TX on PD3 +#define GPIO_PCTL_PD3_CCP7 0x00002000 // CCP7 on PD3 +#define GPIO_PCTL_PD3_PWM3 0x00003000 // PWM3 on PD3 +#define GPIO_PCTL_PD3_CCP0 0x00004000 // CCP0 on PD3 +#define GPIO_PCTL_PD3_EPI0S21 0x00008000 // EPI0S21 on PD3 +#define GPIO_PCTL_PD4_M 0x000F0000 // PD4 mask +#define GPIO_PCTL_PD4_CCP0 0x00010000 // CCP0 on PD4 +#define GPIO_PCTL_PD4_CCP3 0x00020000 // CCP3 on PD4 +#define GPIO_PCTL_PD4_I2S0RXSD 0x00080000 // I2S0RXSD on PD4 +#define GPIO_PCTL_PD4_U1RI 0x00090000 // U1RI on PD4 +#define GPIO_PCTL_PD4_EPI0S19 0x000A0000 // EPI0S19 on PD4 +#define GPIO_PCTL_PD5_M 0x00F00000 // PD5 mask +#define GPIO_PCTL_PD5_CCP2 0x00100000 // CCP2 on PD5 +#define GPIO_PCTL_PD5_CCP4 0x00200000 // CCP4 on PD5 +#define GPIO_PCTL_PD5_I2S0RXMCLK \ + 0x00800000 // I2S0RXMCLK on PD5 +#define GPIO_PCTL_PD5_U2RX 0x00900000 // U2RX on PD5 +#define GPIO_PCTL_PD5_EPI0S28 0x00A00000 // EPI0S28 on PD5 +#define GPIO_PCTL_PD6_M 0x0F000000 // PD6 mask +#define GPIO_PCTL_PD6_FAULT0 0x01000000 // FAULT0 on PD6 +#define GPIO_PCTL_PD6_I2S0TXSCK 0x08000000 // I2S0TXSCK on PD6 +#define GPIO_PCTL_PD6_U2TX 0x09000000 // U2TX on PD6 +#define GPIO_PCTL_PD6_EPI0S29 0x0A000000 // EPI0S29 on PD6 +#define GPIO_PCTL_PD7_M 0xF0000000 // PD7 mask +#define GPIO_PCTL_PD7_IDX0 0x10000000 // IDX0 on PD7 +#define GPIO_PCTL_PD7_C0O 0x20000000 // C0O on PD7 +#define GPIO_PCTL_PD7_CCP1 0x30000000 // CCP1 on PD7 +#define GPIO_PCTL_PD7_I2S0TXWS 0x80000000 // I2S0TXWS on PD7 +#define GPIO_PCTL_PD7_U1DTR 0x90000000 // U1DTR on PD7 +#define GPIO_PCTL_PD7_EPI0S30 0xA0000000 // EPI0S30 on PD7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port E. +// +//***************************************************************************** +#define GPIO_PCTL_PE0_M 0x0000000F // PE0 mask +#define GPIO_PCTL_PE0_PWM4 0x00000001 // PWM4 on PE0 +#define GPIO_PCTL_PE0_SSI1CLK 0x00000002 // SSI1CLK on PE0 +#define GPIO_PCTL_PE0_CCP3 0x00000003 // CCP3 on PE0 +#define GPIO_PCTL_PE0_EPI0S8 0x00000008 // EPI0S8 on PE0 +#define GPIO_PCTL_PE0_USB0PFLT 0x00000009 // USB0PFLT on PE0 +#define GPIO_PCTL_PE1_M 0x000000F0 // PE1 mask +#define GPIO_PCTL_PE1_PWM5 0x00000010 // PWM5 on PE1 +#define GPIO_PCTL_PE1_SSI1FSS 0x00000020 // SSI1FSS on PE1 +#define GPIO_PCTL_PE1_FAULT0 0x00000030 // FAULT0 on PE1 +#define GPIO_PCTL_PE1_CCP2 0x00000040 // CCP2 on PE1 +#define GPIO_PCTL_PE1_CCP6 0x00000050 // CCP6 on PE1 +#define GPIO_PCTL_PE1_EPI0S9 0x00000080 // EPI0S9 on PE1 +#define GPIO_PCTL_PE2_M 0x00000F00 // PE2 mask +#define GPIO_PCTL_PE2_CCP4 0x00000100 // CCP4 on PE2 +#define GPIO_PCTL_PE2_SSI1RX 0x00000200 // SSI1RX on PE2 +#define GPIO_PCTL_PE2_PHB1 0x00000300 // PHB1 on PE2 +#define GPIO_PCTL_PE2_PHA0 0x00000400 // PHA0 on PE2 +#define GPIO_PCTL_PE2_CCP2 0x00000500 // CCP2 on PE2 +#define GPIO_PCTL_PE2_EPI0S24 0x00000800 // EPI0S24 on PE2 +#define GPIO_PCTL_PE3_M 0x0000F000 // PE3 mask +#define GPIO_PCTL_PE3_CCP1 0x00001000 // CCP1 on PE3 +#define GPIO_PCTL_PE3_SSI1TX 0x00002000 // SSI1TX on PE3 +#define GPIO_PCTL_PE3_PHA1 0x00003000 // PHA1 on PE3 +#define GPIO_PCTL_PE3_PHB0 0x00004000 // PHB0 on PE3 +#define GPIO_PCTL_PE3_CCP7 0x00005000 // CCP7 on PE3 +#define GPIO_PCTL_PE3_EPI0S25 0x00008000 // EPI0S25 on PE3 +#define GPIO_PCTL_PE4_M 0x000F0000 // PE4 mask +#define GPIO_PCTL_PE4_CCP3 0x00010000 // CCP3 on PE4 +#define GPIO_PCTL_PE4_FAULT0 0x00040000 // FAULT0 on PE4 +#define GPIO_PCTL_PE4_U2TX 0x00050000 // U2TX on PE4 +#define GPIO_PCTL_PE4_CCP2 0x00060000 // CCP2 on PE4 +#define GPIO_PCTL_PE4_I2S0TXWS 0x00090000 // I2S0TXWS on PE4 +#define GPIO_PCTL_PE5_M 0x00F00000 // PE5 mask +#define GPIO_PCTL_PE5_CCP5 0x00100000 // CCP5 on PE5 +#define GPIO_PCTL_PE5_I2S0TXSD 0x00900000 // I2S0TXSD on PE5 +#define GPIO_PCTL_PE6_M 0x0F000000 // PE6 mask +#define GPIO_PCTL_PE6_PWM4 0x01000000 // PWM4 on PE6 +#define GPIO_PCTL_PE6_C1O 0x02000000 // C1O on PE6 +#define GPIO_PCTL_PE6_U1CTS 0x09000000 // U1CTS on PE6 +#define GPIO_PCTL_PE7_M 0xF0000000 // PE7 mask +#define GPIO_PCTL_PE7_PWM5 0x10000000 // PWM5 on PE7 +#define GPIO_PCTL_PE7_C2O 0x20000000 // C2O on PE7 +#define GPIO_PCTL_PE7_U1DCD 0x90000000 // U1DCD on PE7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port F. +// +//***************************************************************************** +#define GPIO_PCTL_PF0_M 0x0000000F // PF0 mask +#define GPIO_PCTL_PF0_CAN1RX 0x00000001 // CAN1RX on PF0 +#define GPIO_PCTL_PF0_PHB0 0x00000002 // PHB0 on PF0 +#define GPIO_PCTL_PF0_PWM0 0x00000003 // PWM0 on PF0 +#define GPIO_PCTL_PF0_I2S0TXSD 0x00000008 // I2S0TXSD on PF0 +#define GPIO_PCTL_PF0_U1DSR 0x00000009 // U1DSR on PF0 +#define GPIO_PCTL_PF1_M 0x000000F0 // PF1 mask +#define GPIO_PCTL_PF1_CAN1TX 0x00000010 // CAN1TX on PF1 +#define GPIO_PCTL_PF1_IDX1 0x00000020 // IDX1 on PF1 +#define GPIO_PCTL_PF1_PWM1 0x00000030 // PWM1 on PF1 +#define GPIO_PCTL_PF1_I2S0TXMCLK \ + 0x00000080 // I2S0TXMCLK on PF1 +#define GPIO_PCTL_PF1_U1RTS 0x00000090 // U1RTS on PF1 +#define GPIO_PCTL_PF1_CCP3 0x000000A0 // CCP3 on PF1 +#define GPIO_PCTL_PF2_M 0x00000F00 // PF2 mask +#define GPIO_PCTL_PF2_LED1 0x00000100 // LED1 on PF2 +#define GPIO_PCTL_PF2_PWM4 0x00000200 // PWM4 on PF2 +#define GPIO_PCTL_PF2_PWM2 0x00000400 // PWM2 on PF2 +#define GPIO_PCTL_PF2_SSI1CLK 0x00000900 // SSI1CLK on PF2 +#define GPIO_PCTL_PF3_M 0x0000F000 // PF3 mask +#define GPIO_PCTL_PF3_LED0 0x00001000 // LED0 on PF3 +#define GPIO_PCTL_PF3_PWM5 0x00002000 // PWM5 on PF3 +#define GPIO_PCTL_PF3_PWM3 0x00004000 // PWM3 on PF3 +#define GPIO_PCTL_PF3_SSI1FSS 0x00009000 // SSI1FSS on PF3 +#define GPIO_PCTL_PF4_M 0x000F0000 // PF4 mask +#define GPIO_PCTL_PF4_CCP0 0x00010000 // CCP0 on PF4 +#define GPIO_PCTL_PF4_C0O 0x00020000 // C0O on PF4 +#define GPIO_PCTL_PF4_FAULT0 0x00040000 // FAULT0 on PF4 +#define GPIO_PCTL_PF4_EPI0S12 0x00080000 // EPI0S12 on PF4 +#define GPIO_PCTL_PF4_SSI1RX 0x00090000 // SSI1RX on PF4 +#define GPIO_PCTL_PF5_M 0x00F00000 // PF5 mask +#define GPIO_PCTL_PF5_CCP2 0x00100000 // CCP2 on PF5 +#define GPIO_PCTL_PF5_C1O 0x00200000 // C1O on PF5 +#define GPIO_PCTL_PF5_EPI0S15 0x00800000 // EPI0S15 on PF5 +#define GPIO_PCTL_PF5_SSI1TX 0x00900000 // SSI1TX on PF5 +#define GPIO_PCTL_PF6_M 0x0F000000 // PF6 mask +#define GPIO_PCTL_PF6_CCP1 0x01000000 // CCP1 on PF6 +#define GPIO_PCTL_PF6_C2O 0x02000000 // C2O on PF6 +#define GPIO_PCTL_PF6_PHA0 0x04000000 // PHA0 on PF6 +#define GPIO_PCTL_PF6_I2S0TXMCLK \ + 0x09000000 // I2S0TXMCLK on PF6 +#define GPIO_PCTL_PF6_U1RTS 0x0A000000 // U1RTS on PF6 +#define GPIO_PCTL_PF7_M 0xF0000000 // PF7 mask +#define GPIO_PCTL_PF7_CCP4 0x10000000 // CCP4 on PF7 +#define GPIO_PCTL_PF7_PHB0 0x40000000 // PHB0 on PF7 +#define GPIO_PCTL_PF7_EPI0S12 0x80000000 // EPI0S12 on PF7 +#define GPIO_PCTL_PF7_FAULT1 0x90000000 // FAULT1 on PF7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port G. +// +//***************************************************************************** +#define GPIO_PCTL_PG0_M 0x0000000F // PG0 mask +#define GPIO_PCTL_PG0_U2RX 0x00000001 // U2RX on PG0 +#define GPIO_PCTL_PG0_PWM0 0x00000002 // PWM0 on PG0 +#define GPIO_PCTL_PG0_I2C1SCL 0x00000003 // I2C1SCL on PG0 +#define GPIO_PCTL_PG0_PWM4 0x00000004 // PWM4 on PG0 +#define GPIO_PCTL_PG0_USB0EPEN 0x00000007 // USB0EPEN on PG0 +#define GPIO_PCTL_PG0_EPI0S13 0x00000008 // EPI0S13 on PG0 +#define GPIO_PCTL_PG1_M 0x000000F0 // PG1 mask +#define GPIO_PCTL_PG1_U2TX 0x00000010 // U2TX on PG1 +#define GPIO_PCTL_PG1_PWM1 0x00000020 // PWM1 on PG1 +#define GPIO_PCTL_PG1_I2C1SDA 0x00000030 // I2C1SDA on PG1 +#define GPIO_PCTL_PG1_PWM5 0x00000040 // PWM5 on PG1 +#define GPIO_PCTL_PG1_EPI0S14 0x00000080 // EPI0S14 on PG1 +#define GPIO_PCTL_PG2_M 0x00000F00 // PG2 mask +#define GPIO_PCTL_PG2_PWM0 0x00000100 // PWM0 on PG2 +#define GPIO_PCTL_PG2_FAULT0 0x00000400 // FAULT0 on PG2 +#define GPIO_PCTL_PG2_IDX1 0x00000800 // IDX1 on PG2 +#define GPIO_PCTL_PG2_I2S0RXSD 0x00000900 // I2S0RXSD on PG2 +#define GPIO_PCTL_PG3_M 0x0000F000 // PG3 mask +#define GPIO_PCTL_PG3_PWM1 0x00001000 // PWM1 on PG3 +#define GPIO_PCTL_PG3_FAULT2 0x00004000 // FAULT2 on PG3 +#define GPIO_PCTL_PG3_FAULT0 0x00008000 // FAULT0 on PG3 +#define GPIO_PCTL_PG3_I2S0RXMCLK \ + 0x00009000 // I2S0RXMCLK on PG3 +#define GPIO_PCTL_PG4_M 0x000F0000 // PG4 mask +#define GPIO_PCTL_PG4_CCP3 0x00010000 // CCP3 on PG4 +#define GPIO_PCTL_PG4_FAULT1 0x00040000 // FAULT1 on PG4 +#define GPIO_PCTL_PG4_EPI0S15 0x00080000 // EPI0S15 on PG4 +#define GPIO_PCTL_PG4_PWM6 0x00090000 // PWM6 on PG4 +#define GPIO_PCTL_PG4_U1RI 0x000A0000 // U1RI on PG4 +#define GPIO_PCTL_PG5_M 0x00F00000 // PG5 mask +#define GPIO_PCTL_PG5_CCP5 0x00100000 // CCP5 on PG5 +#define GPIO_PCTL_PG5_IDX0 0x00400000 // IDX0 on PG5 +#define GPIO_PCTL_PG5_FAULT1 0x00500000 // FAULT1 on PG5 +#define GPIO_PCTL_PG5_PWM7 0x00800000 // PWM7 on PG5 +#define GPIO_PCTL_PG5_I2S0RXSCK 0x00900000 // I2S0RXSCK on PG5 +#define GPIO_PCTL_PG5_U1DTR 0x00A00000 // U1DTR on PG5 +#define GPIO_PCTL_PG6_M 0x0F000000 // PG6 mask +#define GPIO_PCTL_PG6_PHA1 0x01000000 // PHA1 on PG6 +#define GPIO_PCTL_PG6_PWM6 0x04000000 // PWM6 on PG6 +#define GPIO_PCTL_PG6_FAULT1 0x08000000 // FAULT1 on PG6 +#define GPIO_PCTL_PG6_I2S0RXWS 0x09000000 // I2S0RXWS on PG6 +#define GPIO_PCTL_PG6_U1RI 0x0A000000 // U1RI on PG6 +#define GPIO_PCTL_PG7_M 0xF0000000 // PG7 mask +#define GPIO_PCTL_PG7_PHB1 0x10000000 // PHB1 on PG7 +#define GPIO_PCTL_PG7_PWM7 0x40000000 // PWM7 on PG7 +#define GPIO_PCTL_PG7_CCP5 0x80000000 // CCP5 on PG7 +#define GPIO_PCTL_PG7_EPI0S31 0x90000000 // EPI0S31 on PG7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port H. +// +//***************************************************************************** +#define GPIO_PCTL_PH0_M 0x0000000F // PH0 mask +#define GPIO_PCTL_PH0_CCP6 0x00000001 // CCP6 on PH0 +#define GPIO_PCTL_PH0_PWM2 0x00000002 // PWM2 on PH0 +#define GPIO_PCTL_PH0_EPI0S6 0x00000008 // EPI0S6 on PH0 +#define GPIO_PCTL_PH0_PWM4 0x00000009 // PWM4 on PH0 +#define GPIO_PCTL_PH1_M 0x000000F0 // PH1 mask +#define GPIO_PCTL_PH1_CCP7 0x00000010 // CCP7 on PH1 +#define GPIO_PCTL_PH1_PWM3 0x00000020 // PWM3 on PH1 +#define GPIO_PCTL_PH1_EPI0S7 0x00000080 // EPI0S7 on PH1 +#define GPIO_PCTL_PH1_PWM5 0x00000090 // PWM5 on PH1 +#define GPIO_PCTL_PH2_M 0x00000F00 // PH2 mask +#define GPIO_PCTL_PH2_IDX1 0x00000100 // IDX1 on PH2 +#define GPIO_PCTL_PH2_C1O 0x00000200 // C1O on PH2 +#define GPIO_PCTL_PH2_FAULT3 0x00000400 // FAULT3 on PH2 +#define GPIO_PCTL_PH2_EPI0S1 0x00000800 // EPI0S1 on PH2 +#define GPIO_PCTL_PH3_M 0x0000F000 // PH3 mask +#define GPIO_PCTL_PH3_PHB0 0x00001000 // PHB0 on PH3 +#define GPIO_PCTL_PH3_FAULT0 0x00002000 // FAULT0 on PH3 +#define GPIO_PCTL_PH3_USB0EPEN 0x00004000 // USB0EPEN on PH3 +#define GPIO_PCTL_PH3_EPI0S0 0x00008000 // EPI0S0 on PH3 +#define GPIO_PCTL_PH4_M 0x000F0000 // PH4 mask +#define GPIO_PCTL_PH4_USB0PFLT 0x00040000 // USB0PFLT on PH4 +#define GPIO_PCTL_PH4_EPI0S10 0x00080000 // EPI0S10 on PH4 +#define GPIO_PCTL_PH4_SSI1CLK 0x000B0000 // SSI1CLK on PH4 +#define GPIO_PCTL_PH5_M 0x00F00000 // PH5 mask +#define GPIO_PCTL_PH5_EPI0S11 0x00800000 // EPI0S11 on PH5 +#define GPIO_PCTL_PH5_FAULT2 0x00A00000 // FAULT2 on PH5 +#define GPIO_PCTL_PH5_SSI1FSS 0x00B00000 // SSI1FSS on PH5 +#define GPIO_PCTL_PH6_M 0x0F000000 // PH6 mask +#define GPIO_PCTL_PH6_EPI0S26 0x08000000 // EPI0S26 on PH6 +#define GPIO_PCTL_PH6_PWM4 0x0A000000 // PWM4 on PH6 +#define GPIO_PCTL_PH6_SSI1RX 0x0B000000 // SSI1RX on PH6 +#define GPIO_PCTL_PH7_M 0xF0000000 // PH7 mask +#define GPIO_PCTL_PH7_EPI0S27 0x80000000 // EPI0S27 on PH7 +#define GPIO_PCTL_PH7_PWM5 0xA0000000 // PWM5 on PH7 +#define GPIO_PCTL_PH7_SSI1TX 0xB0000000 // SSI1TX on PH7 + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_PCTL register for +// port J. +// +//***************************************************************************** +#define GPIO_PCTL_PJ0_M 0x0000000F // PJ0 mask +#define GPIO_PCTL_PJ0_EPI0S16 0x00000008 // EPI0S16 on PJ0 +#define GPIO_PCTL_PJ0_PWM0 0x0000000A // PWM0 on PJ0 +#define GPIO_PCTL_PJ0_I2C1SCL 0x0000000B // I2C1SCL on PJ0 +#define GPIO_PCTL_PJ1_M 0x000000F0 // PJ1 mask +#define GPIO_PCTL_PJ1_EPI0S17 0x00000080 // EPI0S17 on PJ1 +#define GPIO_PCTL_PJ1_USB0PFLT 0x00000090 // USB0PFLT on PJ1 +#define GPIO_PCTL_PJ1_PWM1 0x000000A0 // PWM1 on PJ1 +#define GPIO_PCTL_PJ1_I2C1SDA 0x000000B0 // I2C1SDA on PJ1 +#define GPIO_PCTL_PJ2_M 0x00000F00 // PJ2 mask +#define GPIO_PCTL_PJ2_EPI0S18 0x00000800 // EPI0S18 on PJ2 +#define GPIO_PCTL_PJ2_CCP0 0x00000900 // CCP0 on PJ2 +#define GPIO_PCTL_PJ2_FAULT0 0x00000A00 // FAULT0 on PJ2 +#define GPIO_PCTL_PJ3_M 0x0000F000 // PJ3 mask +#define GPIO_PCTL_PJ3_EPI0S19 0x00008000 // EPI0S19 on PJ3 +#define GPIO_PCTL_PJ3_U1CTS 0x00009000 // U1CTS on PJ3 +#define GPIO_PCTL_PJ3_CCP6 0x0000A000 // CCP6 on PJ3 +#define GPIO_PCTL_PJ4_M 0x000F0000 // PJ4 mask +#define GPIO_PCTL_PJ4_EPI0S28 0x00080000 // EPI0S28 on PJ4 +#define GPIO_PCTL_PJ4_U1DCD 0x00090000 // U1DCD on PJ4 +#define GPIO_PCTL_PJ4_CCP4 0x000A0000 // CCP4 on PJ4 +#define GPIO_PCTL_PJ5_M 0x00F00000 // PJ5 mask +#define GPIO_PCTL_PJ5_EPI0S29 0x00800000 // EPI0S29 on PJ5 +#define GPIO_PCTL_PJ5_U1DSR 0x00900000 // U1DSR on PJ5 +#define GPIO_PCTL_PJ5_CCP2 0x00A00000 // CCP2 on PJ5 +#define GPIO_PCTL_PJ6_M 0x0F000000 // PJ6 mask +#define GPIO_PCTL_PJ6_EPI0S30 0x08000000 // EPI0S30 on PJ6 +#define GPIO_PCTL_PJ6_U1RTS 0x09000000 // U1RTS on PJ6 +#define GPIO_PCTL_PJ6_CCP1 0x0A000000 // CCP1 on PJ6 +#define GPIO_PCTL_PJ7_M 0xF0000000 // PJ7 mask +#define GPIO_PCTL_PJ7_U1DTR 0x90000000 // U1DTR on PJ7 +#define GPIO_PCTL_PJ7_CCP0 0xA0000000 // CCP0 on PJ7 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO register offsets. +// +//***************************************************************************** +#define GPIO_O_PeriphID4 0x00000FD0 +#define GPIO_O_PeriphID5 0x00000FD4 +#define GPIO_O_PeriphID6 0x00000FD8 +#define GPIO_O_PeriphID7 0x00000FDC +#define GPIO_O_PeriphID0 0x00000FE0 +#define GPIO_O_PeriphID1 0x00000FE4 +#define GPIO_O_PeriphID2 0x00000FE8 +#define GPIO_O_PeriphID3 0x00000FEC +#define GPIO_O_PCellID0 0x00000FF0 +#define GPIO_O_PCellID1 0x00000FF4 +#define GPIO_O_PCellID2 0x00000FF8 +#define GPIO_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the GPIO Register reset values. +// +//***************************************************************************** +#define GPIO_RV_DEN 0x000000FF // Digital input enable reg RV +#define GPIO_RV_PUR 0x000000FF // Pull up select reg RV +#define GPIO_RV_DR2R 0x000000FF // 2ma drive select reg RV +#define GPIO_RV_PCellID1 0x000000F0 +#define GPIO_RV_PCellID3 0x000000B1 +#define GPIO_RV_PeriphID0 0x00000061 +#define GPIO_RV_PeriphID1 0x00000010 +#define GPIO_RV_PCellID0 0x0000000D +#define GPIO_RV_PCellID2 0x00000005 +#define GPIO_RV_PeriphID2 0x00000004 +#define GPIO_RV_LOCK 0x00000001 // Lock register RV +#define GPIO_RV_PeriphID7 0x00000000 +#define GPIO_RV_PDR 0x00000000 // Pull down select reg RV +#define GPIO_RV_IC 0x00000000 // Interrupt clear reg RV +#define GPIO_RV_SLR 0x00000000 // Slew rate control enable reg RV +#define GPIO_RV_ODR 0x00000000 // Open drain select reg RV +#define GPIO_RV_IBE 0x00000000 // Interrupt both edges reg RV +#define GPIO_RV_AFSEL 0x00000000 // Mode control select reg RV +#define GPIO_RV_IS 0x00000000 // Interrupt sense reg RV +#define GPIO_RV_IM 0x00000000 // Interrupt mask reg RV +#define GPIO_RV_PeriphID4 0x00000000 +#define GPIO_RV_PeriphID5 0x00000000 +#define GPIO_RV_DR8R 0x00000000 // 8ma drive select reg RV +#define GPIO_RV_RIS 0x00000000 // Raw interrupt status reg RV +#define GPIO_RV_DR4R 0x00000000 // 4ma drive select reg RV +#define GPIO_RV_IEV 0x00000000 // Intterupt event reg RV +#define GPIO_RV_DIR 0x00000000 // Data direction reg RV +#define GPIO_RV_PeriphID6 0x00000000 +#define GPIO_RV_PeriphID3 0x00000000 +#define GPIO_RV_DATA 0x00000000 // Data register reset value +#define GPIO_RV_MIS 0x00000000 // Masked interrupt status reg RV + +#endif + +#endif // __HW_GPIO_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_hibernate.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_hibernate.h new file mode 100644 index 00000000..5c286da2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_hibernate.h @@ -0,0 +1,242 @@ +//***************************************************************************** +// +// hw_hibernate.h - Defines and Macros for the Hibernation module. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_HIBERNATE_H__ +#define __HW_HIBERNATE_H__ + +//***************************************************************************** +// +// The following are defines for the Hibernation module register addresses. +// +//***************************************************************************** +#define HIB_RTCC 0x400FC000 // Hibernation RTC Counter +#define HIB_RTCM0 0x400FC004 // Hibernation RTC Match 0 +#define HIB_RTCM1 0x400FC008 // Hibernation RTC Match 1 +#define HIB_RTCLD 0x400FC00C // Hibernation RTC Load +#define HIB_CTL 0x400FC010 // Hibernation Control +#define HIB_IM 0x400FC014 // Hibernation Interrupt Mask +#define HIB_RIS 0x400FC018 // Hibernation Raw Interrupt Status +#define HIB_MIS 0x400FC01C // Hibernation Masked Interrupt + // Status +#define HIB_IC 0x400FC020 // Hibernation Interrupt Clear +#define HIB_RTCT 0x400FC024 // Hibernation RTC Trim +#define HIB_DATA 0x400FC030 // Hibernation Data + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCC register. +// +//***************************************************************************** +#define HIB_RTCC_M 0xFFFFFFFF // RTC Counter +#define HIB_RTCC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM0 register. +// +//***************************************************************************** +#define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0 +#define HIB_RTCM0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM1 register. +// +//***************************************************************************** +#define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1 +#define HIB_RTCM1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCLD register. +// +//***************************************************************************** +#define HIB_RTCLD_M 0xFFFFFFFF // RTC Load +#define HIB_RTCLD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_CTL register. +// +//***************************************************************************** +#define HIB_CTL_WRC 0x80000000 // Write Complete/Capable +#define HIB_CTL_VDD3ON 0x00000100 // VDD Powered +#define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable +#define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable +#define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable +#define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable +#define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable +#define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select +#define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request +#define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IM register. +// +//***************************************************************************** +#define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask +#define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt + // Mask +#define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask +#define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RIS register. +// +//***************************************************************************** +#define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt + // Status +#define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw + // Interrupt Status +#define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status +#define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_MIS register. +// +//***************************************************************************** +#define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Status +#define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Status +#define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt + // Status +#define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IC register. +// +//***************************************************************************** +#define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Clear +#define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Clear +#define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt + // Clear +#define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCT register. +// +//***************************************************************************** +#define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value +#define HIB_RTCT_TRIM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_DATA register. +// +//***************************************************************************** +#define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data +#define HIB_DATA_RTD_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Hibernation module register +// addresses. +// +//***************************************************************************** +#define HIB_DATA_END 0x400FC130 // end of data area, exclusive + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCC +// register. +// +//***************************************************************************** +#define HIB_RTCC_MASK 0xFFFFFFFF // RTC counter mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCM0 +// register. +// +//***************************************************************************** +#define HIB_RTCM0_MASK 0xFFFFFFFF // RTC match 0 mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCM1 +// register. +// +//***************************************************************************** +#define HIB_RTCM1_MASK 0xFFFFFFFF // RTC match 1 mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCLD +// register. +// +//***************************************************************************** +#define HIB_RTCLD_MASK 0xFFFFFFFF // RTC load mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RIS +// register. +// +//***************************************************************************** +#define HIB_RID_RTCALT0 0x00000001 // RTC match 0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_MIS +// register. +// +//***************************************************************************** +#define HIB_MID_RTCALT0 0x00000001 // RTC match 0 interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_RTCT +// register. +// +//***************************************************************************** +#define HIB_RTCT_MASK 0x0000FFFF // RTC trim mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the HIB_DATA +// register. +// +//***************************************************************************** +#define HIB_DATA_MASK 0xFFFFFFFF // NV memory data mask + +#endif + +#endif // __HW_HIBERNATE_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2c.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2c.h new file mode 100644 index 00000000..e956d376 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2c.h @@ -0,0 +1,407 @@ +//***************************************************************************** +// +// hw_i2c.h - Macros used when accessing the I2C master and slave hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_I2C_H__ +#define __HW_I2C_H__ + +//***************************************************************************** +// +// The following are defines for the I2C register offsets. +// +//***************************************************************************** +#define I2C_O_MSA 0x00000000 // I2C Master Slave Address +#define I2C_O_SOAR 0x00000000 // I2C Slave Own Address +#define I2C_O_SCSR 0x00000004 // I2C Slave Control/Status +#define I2C_O_MCS 0x00000004 // I2C Master Control/Status +#define I2C_O_SDR 0x00000008 // I2C Slave Data +#define I2C_O_MDR 0x00000008 // I2C Master Data +#define I2C_O_MTPR 0x0000000C // I2C Master Timer Period +#define I2C_O_SIMR 0x0000000C // I2C Slave Interrupt Mask +#define I2C_O_SRIS 0x00000010 // I2C Slave Raw Interrupt Status +#define I2C_O_MIMR 0x00000010 // I2C Master Interrupt Mask +#define I2C_O_MRIS 0x00000014 // I2C Master Raw Interrupt Status +#define I2C_O_SMIS 0x00000014 // I2C Slave Masked Interrupt + // Status +#define I2C_O_SICR 0x00000018 // I2C Slave Interrupt Clear +#define I2C_O_MMIS 0x00000018 // I2C Master Masked Interrupt + // Status +#define I2C_O_MICR 0x0000001C // I2C Master Interrupt Clear +#define I2C_O_MCR 0x00000020 // I2C Master Configuration + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MSA register. +// +//***************************************************************************** +#define I2C_MSA_SA_M 0x000000FE // I2C Slave Address +#define I2C_MSA_RS 0x00000001 // Receive not send +#define I2C_MSA_SA_S 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SOAR register. +// +//***************************************************************************** +#define I2C_SOAR_OAR_M 0x0000007F // I2C Slave Own Address +#define I2C_SOAR_OAR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SCSR register. +// +//***************************************************************************** +#define I2C_SCSR_FBR 0x00000004 // First Byte Received +#define I2C_SCSR_TREQ 0x00000002 // Transmit Request +#define I2C_SCSR_DA 0x00000001 // Device Active +#define I2C_SCSR_RREQ 0x00000001 // Receive Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCS register. +// +//***************************************************************************** +#define I2C_MCS_BUSBSY 0x00000040 // Bus Busy +#define I2C_MCS_IDLE 0x00000020 // I2C Idle +#define I2C_MCS_ARBLST 0x00000010 // Arbitration Lost +#define I2C_MCS_ACK 0x00000008 // Data Acknowledge Enable +#define I2C_MCS_DATACK 0x00000008 // Acknowledge Data +#define I2C_MCS_ADRACK 0x00000004 // Acknowledge Address +#define I2C_MCS_STOP 0x00000004 // Generate STOP +#define I2C_MCS_START 0x00000002 // Generate START +#define I2C_MCS_ERROR 0x00000002 // Error +#define I2C_MCS_RUN 0x00000001 // I2C Master Enable +#define I2C_MCS_BUSY 0x00000001 // I2C Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SDR register. +// +//***************************************************************************** +#define I2C_SDR_DATA_M 0x000000FF // Data for Transfer +#define I2C_SDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MDR register. +// +//***************************************************************************** +#define I2C_MDR_DATA_M 0x000000FF // Data Transferred +#define I2C_MDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MTPR register. +// +//***************************************************************************** +#define I2C_MTPR_TPR_M 0x0000007F // SCL Clock Period +#define I2C_MTPR_TPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_STOPIM 0x00000004 // Stop Condition Interrupt Mask +#define I2C_SIMR_STARTIM 0x00000002 // Start Condition Interrupt Mask +#define I2C_SIMR_DATAIM 0x00000001 // Data Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_STOPRIS 0x00000004 // Stop Condition Raw Interrupt + // Status +#define I2C_SRIS_STARTRIS 0x00000002 // Start Condition Raw Interrupt + // Status +#define I2C_SRIS_DATARIS 0x00000001 // Data Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MIMR register. +// +//***************************************************************************** +#define I2C_MIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MRIS register. +// +//***************************************************************************** +#define I2C_MRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_STOPMIS 0x00000004 // Stop Condition Masked Interrupt + // Status +#define I2C_SMIS_STARTMIS 0x00000002 // Start Condition Masked Interrupt + // Status +#define I2C_SMIS_DATAMIS 0x00000001 // Data Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_STOPIC 0x00000004 // Stop Condition Interrupt Clear +#define I2C_SICR_STARTIC 0x00000002 // Start Condition Interrupt Clear +#define I2C_SICR_DATAIC 0x00000001 // Data Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MMIS register. +// +//***************************************************************************** +#define I2C_MMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MICR register. +// +//***************************************************************************** +#define I2C_MICR_IC 0x00000001 // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCR register. +// +//***************************************************************************** +#define I2C_MCR_SFE 0x00000020 // I2C Slave Function Enable +#define I2C_MCR_MFE 0x00000010 // I2C Master Function Enable +#define I2C_MCR_LPBK 0x00000001 // I2C Loopback + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the I2C register offsets. +// +//***************************************************************************** +#define I2C_O_SLAVE 0x00000800 // Offset from master to slave + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SIMR +// register. +// +//***************************************************************************** +#define I2C_SIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SRIS +// register. +// +//***************************************************************************** +#define I2C_SRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SMIS +// register. +// +//***************************************************************************** +#define I2C_SMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C_O_SICR +// register. +// +//***************************************************************************** +#define I2C_SICR_IC 0x00000001 // Clear Interrupt + +//***************************************************************************** +// +// The following are deprecated defines for the I2C master register offsets. +// +//***************************************************************************** +#define I2C_MASTER_O_SA 0x00000000 // Slave address register +#define I2C_MASTER_O_CS 0x00000004 // Control and Status register +#define I2C_MASTER_O_DR 0x00000008 // Data register +#define I2C_MASTER_O_TPR 0x0000000C // Timer period register +#define I2C_MASTER_O_IMR 0x00000010 // Interrupt mask register +#define I2C_MASTER_O_RIS 0x00000014 // Raw interrupt status register +#define I2C_MASTER_O_MIS 0x00000018 // Masked interrupt status reg +#define I2C_MASTER_O_MICR 0x0000001C // Interrupt clear register +#define I2C_MASTER_O_CR 0x00000020 // Configuration register + +//***************************************************************************** +// +// The following are deprecated defines for the I2C slave register offsets. +// +//***************************************************************************** +#define I2C_SLAVE_O_SICR 0x00000018 // Interrupt clear register +#define I2C_SLAVE_O_MIS 0x00000014 // Masked interrupt status reg +#define I2C_SLAVE_O_RIS 0x00000010 // Raw interrupt status register +#define I2C_SLAVE_O_IM 0x0000000C // Interrupt mask register +#define I2C_SLAVE_O_DR 0x00000008 // Data register +#define I2C_SLAVE_O_CSR 0x00000004 // Control/Status register +#define I2C_SLAVE_O_OAR 0x00000000 // Own address register + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C master +// slave address register. +// +//***************************************************************************** +#define I2C_MASTER_SA_SA_MASK 0x000000FE // Slave address +#define I2C_MASTER_SA_RS 0x00000001 // Receive/send +#define I2C_MASTER_SA_SA_SHIFT 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Control and Status register. +// +//***************************************************************************** +#define I2C_MASTER_CS_BUS_BUSY 0x00000040 // Bus busy +#define I2C_MASTER_CS_IDLE 0x00000020 // Idle +#define I2C_MASTER_CS_ERR_MASK 0x0000001C +#define I2C_MASTER_CS_BUSY 0x00000001 // Controller is TX/RX data +#define I2C_MASTER_CS_ERROR 0x00000002 // Error occurred +#define I2C_MASTER_CS_ADDR_ACK 0x00000004 // Address byte not acknowledged +#define I2C_MASTER_CS_DATA_ACK 0x00000008 // Data byte not acknowledged +#define I2C_MASTER_CS_ARB_LOST 0x00000010 // Lost arbitration +#define I2C_MASTER_CS_ACK 0x00000008 // Acknowlegde +#define I2C_MASTER_CS_STOP 0x00000004 // Stop +#define I2C_MASTER_CS_START 0x00000002 // Start +#define I2C_MASTER_CS_RUN 0x00000001 // Run + +//***************************************************************************** +// +// The following are deprecated defines for the values used in determining the +// contents of the I2C Master Timer Period register. +// +//***************************************************************************** +#define I2C_SCL_FAST 400000 // SCL fast frequency +#define I2C_SCL_STANDARD 100000 // SCL standard frequency +#define I2C_MASTER_TPR_SCL_LP 0x00000006 // SCL low period +#define I2C_MASTER_TPR_SCL_HP 0x00000004 // SCL high period +#define I2C_MASTER_TPR_SCL (I2C_MASTER_TPR_SCL_HP + I2C_MASTER_TPR_SCL_LP) + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Interrupt Mask register. +// +//***************************************************************************** +#define I2C_MASTER_IMR_IM 0x00000001 // Master interrupt mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Raw Interrupt Status register. +// +//***************************************************************************** +#define I2C_MASTER_RIS_RIS 0x00000001 // Master raw interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Masked Interrupt Status register. +// +//***************************************************************************** +#define I2C_MASTER_MIS_MIS 0x00000001 // Master masked interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Interrupt Clear register. +// +//***************************************************************************** +#define I2C_MASTER_MICR_IC 0x00000001 // Master interrupt clear + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Master +// Configuration register. +// +//***************************************************************************** +#define I2C_MASTER_CR_SFE 0x00000020 // Slave function enable +#define I2C_MASTER_CR_MFE 0x00000010 // Master function enable +#define I2C_MASTER_CR_LPBK 0x00000001 // Loopback enable + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave Own +// Address register. +// +//***************************************************************************** +#define I2C_SLAVE_SOAR_OAR_MASK 0x0000007F // Slave address + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Control/Status register. +// +//***************************************************************************** +#define I2C_SLAVE_CSR_FBR 0x00000004 // First byte received from master +#define I2C_SLAVE_CSR_TREQ 0x00000002 // Transmit request received +#define I2C_SLAVE_CSR_DA 0x00000001 // Enable the device +#define I2C_SLAVE_CSR_RREQ 0x00000001 // Receive data from I2C master + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Interrupt Mask register. +// +//***************************************************************************** +#define I2C_SLAVE_IMR_IM 0x00000001 // Slave interrupt mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave Raw +// Interrupt Status register. +// +//***************************************************************************** +#define I2C_SLAVE_RIS_RIS 0x00000001 // Slave raw interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Masked Interrupt Status register. +// +//***************************************************************************** +#define I2C_SLAVE_MIS_MIS 0x00000001 // Slave masked interrupt status + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the I2C Slave +// Interrupt Clear register. +// +//***************************************************************************** +#define I2C_SLAVE_SICR_IC 0x00000001 // Slave interrupt clear + +#endif + +#endif // __HW_I2C_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2s.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2s.h new file mode 100644 index 00000000..f02ce94c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_i2s.h @@ -0,0 +1,224 @@ +//***************************************************************************** +// +// hw_i2s.h - Macros for use in accessing the I2S registers. +// +// Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_I2S_H__ +#define __HW_I2S_H__ + +//***************************************************************************** +// +// The following are defines for the Inter-Integrated Circuit Sound register +// offsets. +// +//***************************************************************************** +#define I2S_O_TXFIFO 0x00000000 // I2S Transmit FIFO Data +#define I2S_O_TXFIFOCFG 0x00000004 // I2S Transmit FIFO Configuration +#define I2S_O_TXCFG 0x00000008 // I2S Transmit Module + // Configuration +#define I2S_O_TXLIMIT 0x0000000C // I2S Transmit FIFO Limit +#define I2S_O_TXISM 0x00000010 // I2S Transmit Interrupt Status + // and Mask +#define I2S_O_TXLEV 0x00000018 // I2S Transmit FIFO Level +#define I2S_O_RXFIFO 0x00000800 // I2S Receive FIFO Data +#define I2S_O_RXFIFOCFG 0x00000804 // I2S Receive FIFO Configuration +#define I2S_O_RXCFG 0x00000808 // I2S Receive Module Configuration +#define I2S_O_RXLIMIT 0x0000080C // I2S Receive FIFO Limit +#define I2S_O_RXISM 0x00000810 // I2S Receive Interrupt Status and + // Mask +#define I2S_O_RXLEV 0x00000818 // I2S Receive FIFO Level +#define I2S_O_CFG 0x00000C00 // I2S Module Configuration +#define I2S_O_IM 0x00000C10 // I2S Interrupt Mask +#define I2S_O_RIS 0x00000C14 // I2S Raw Interrupt Status +#define I2S_O_MIS 0x00000C18 // I2S Masked Interrupt Status +#define I2S_O_IC 0x00000C1C // I2S Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXFIFO register. +// +//***************************************************************************** +#define I2S_TXFIFO_M 0xFFFFFFFF // TX Data +#define I2S_TXFIFO_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXFIFOCFG +// register. +// +//***************************************************************************** +#define I2S_TXFIFOCFG_CSS 0x00000002 // Compact Stereo Sample Size +#define I2S_TXFIFOCFG_LRS 0x00000001 // Left-Right Sample Indicator + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXCFG register. +// +//***************************************************************************** +#define I2S_TXCFG_JST 0x20000000 // Justification of Output Data +#define I2S_TXCFG_DLY 0x10000000 // Data Delay +#define I2S_TXCFG_SCP 0x08000000 // SCLK Polarity +#define I2S_TXCFG_LRP 0x04000000 // Left/Right Clock Polarity +#define I2S_TXCFG_WM_M 0x03000000 // Write Mode +#define I2S_TXCFG_WM_DUAL 0x00000000 // Stereo mode +#define I2S_TXCFG_WM_COMPACT 0x01000000 // Compact Stereo mode +#define I2S_TXCFG_WM_MONO 0x02000000 // Mono mode +#define I2S_TXCFG_FMT 0x00800000 // FIFO Empty +#define I2S_TXCFG_MSL 0x00400000 // SCLK Master/Slave +#define I2S_TXCFG_SSZ_M 0x0000FC00 // Sample Size +#define I2S_TXCFG_SDSZ_M 0x000003F0 // System Data Size +#define I2S_TXCFG_SSZ_S 10 +#define I2S_TXCFG_SDSZ_S 4 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXLIMIT register. +// +//***************************************************************************** +#define I2S_TXLIMIT_LIMIT_M 0x0000001F // FIFO Limit +#define I2S_TXLIMIT_LIMIT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXISM register. +// +//***************************************************************************** +#define I2S_TXISM_FFI 0x00010000 // Transmit FIFO Service Request + // Interrupt +#define I2S_TXISM_FFM 0x00000001 // FIFO Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_TXLEV register. +// +//***************************************************************************** +#define I2S_TXLEV_LEVEL_M 0x0000001F // Number of Audio Samples +#define I2S_TXLEV_LEVEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXFIFO register. +// +//***************************************************************************** +#define I2S_RXFIFO_M 0xFFFFFFFF // RX Data +#define I2S_RXFIFO_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXFIFOCFG +// register. +// +//***************************************************************************** +#define I2S_RXFIFOCFG_FMM 0x00000004 // FIFO Mono Mode +#define I2S_RXFIFOCFG_CSS 0x00000002 // Compact Stereo Sample Size +#define I2S_RXFIFOCFG_LRS 0x00000001 // Left-Right Sample Indicator + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXCFG register. +// +//***************************************************************************** +#define I2S_RXCFG_JST 0x20000000 // Justification of Input Data +#define I2S_RXCFG_DLY 0x10000000 // Data Delay +#define I2S_RXCFG_SCP 0x08000000 // SCLK Polarity +#define I2S_RXCFG_LRP 0x04000000 // Left/Right Clock Polarity +#define I2S_RXCFG_RM 0x01000000 // Read Mode +#define I2S_RXCFG_MSL 0x00400000 // SCLK Master/Slave +#define I2S_RXCFG_SSZ_M 0x0000FC00 // Sample Size +#define I2S_RXCFG_SDSZ_M 0x000003F0 // System Data Size +#define I2S_RXCFG_SSZ_S 10 +#define I2S_RXCFG_SDSZ_S 4 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXLIMIT register. +// +//***************************************************************************** +#define I2S_RXLIMIT_LIMIT_M 0x0000001F // FIFO Limit +#define I2S_RXLIMIT_LIMIT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXISM register. +// +//***************************************************************************** +#define I2S_RXISM_FFI 0x00010000 // Receive FIFO Service Request + // Interrupt +#define I2S_RXISM_FFM 0x00000001 // FIFO Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RXLEV register. +// +//***************************************************************************** +#define I2S_RXLEV_LEVEL_M 0x0000001F // Number of Audio Samples +#define I2S_RXLEV_LEVEL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_CFG register. +// +//***************************************************************************** +#define I2S_CFG_RXSLV 0x00000020 // Use External I2S0RXMCLK +#define I2S_CFG_TXSLV 0x00000010 // Use External I2S0TXMCLK +#define I2S_CFG_RXEN 0x00000002 // Serial Receive Engine Enable +#define I2S_CFG_TXEN 0x00000001 // Serial Transmit Engine Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_IM register. +// +//***************************************************************************** +#define I2S_IM_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_IM_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_IM_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_IM_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_RIS register. +// +//***************************************************************************** +#define I2S_RIS_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_RIS_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_RIS_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_RIS_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_MIS register. +// +//***************************************************************************** +#define I2S_MIS_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_MIS_RXFSR 0x00000010 // Receive FIFO Service Request +#define I2S_MIS_TXWE 0x00000002 // Transmit FIFO Write Error +#define I2S_MIS_TXFSR 0x00000001 // Transmit FIFO Service Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2S_O_IC register. +// +//***************************************************************************** +#define I2S_IC_RXRE 0x00000020 // Receive FIFO Read Error +#define I2S_IC_TXWE 0x00000002 // Transmit FIFO Write Error + +#endif // __HW_I2S_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ints.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ints.h new file mode 100644 index 00000000..1eb1e34e --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ints.h @@ -0,0 +1,141 @@ +//***************************************************************************** +// +// hw_ints.h - Macros that define the interrupt assignment on Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_INTS_H__ +#define __HW_INTS_H__ + +//***************************************************************************** +// +// The following are defines for the fault assignments. +// +//***************************************************************************** +#define FAULT_NMI 2 // NMI fault +#define FAULT_HARD 3 // Hard fault +#define FAULT_MPU 4 // MPU fault +#define FAULT_BUS 5 // Bus fault +#define FAULT_USAGE 6 // Usage fault +#define FAULT_SVCALL 11 // SVCall +#define FAULT_DEBUG 12 // Debug monitor +#define FAULT_PENDSV 14 // PendSV +#define FAULT_SYSTICK 15 // System Tick + +//***************************************************************************** +// +// The following are defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_GPIOA 16 // GPIO Port A +#define INT_GPIOB 17 // GPIO Port B +#define INT_GPIOC 18 // GPIO Port C +#define INT_GPIOD 19 // GPIO Port D +#define INT_GPIOE 20 // GPIO Port E +#define INT_UART0 21 // UART0 Rx and Tx +#define INT_UART1 22 // UART1 Rx and Tx +#define INT_SSI0 23 // SSI0 Rx and Tx +#define INT_I2C0 24 // I2C0 Master and Slave +#define INT_PWM_FAULT 25 // PWM Fault +#define INT_PWM0 26 // PWM Generator 0 +#define INT_PWM1 27 // PWM Generator 1 +#define INT_PWM2 28 // PWM Generator 2 +#define INT_QEI0 29 // Quadrature Encoder 0 +#define INT_ADC0SS0 30 // ADC0 Sequence 0 +#define INT_ADC0SS1 31 // ADC0 Sequence 1 +#define INT_ADC0SS2 32 // ADC0 Sequence 2 +#define INT_ADC0SS3 33 // ADC0 Sequence 3 +#define INT_WATCHDOG 34 // Watchdog timer +#define INT_TIMER0A 35 // Timer 0 subtimer A +#define INT_TIMER0B 36 // Timer 0 subtimer B +#define INT_TIMER1A 37 // Timer 1 subtimer A +#define INT_TIMER1B 38 // Timer 1 subtimer B +#define INT_TIMER2A 39 // Timer 2 subtimer A +#define INT_TIMER2B 40 // Timer 2 subtimer B +#define INT_COMP0 41 // Analog Comparator 0 +#define INT_COMP1 42 // Analog Comparator 1 +#define INT_COMP2 43 // Analog Comparator 2 +#define INT_SYSCTL 44 // System Control (PLL, OSC, BO) +#define INT_FLASH 45 // FLASH Control +#define INT_GPIOF 46 // GPIO Port F +#define INT_GPIOG 47 // GPIO Port G +#define INT_GPIOH 48 // GPIO Port H +#define INT_UART2 49 // UART2 Rx and Tx +#define INT_SSI1 50 // SSI1 Rx and Tx +#define INT_TIMER3A 51 // Timer 3 subtimer A +#define INT_TIMER3B 52 // Timer 3 subtimer B +#define INT_I2C1 53 // I2C1 Master and Slave +#define INT_QEI1 54 // Quadrature Encoder 1 +#define INT_CAN0 55 // CAN0 +#define INT_CAN1 56 // CAN1 +#define INT_CAN2 57 // CAN2 +#define INT_ETH 58 // Ethernet +#define INT_HIBERNATE 59 // Hibernation module +#define INT_USB0 60 // USB 0 Controller +#define INT_PWM3 61 // PWM Generator 3 +#define INT_UDMA 62 // uDMA controller +#define INT_UDMAERR 63 // uDMA Error +#define INT_ADC1SS0 64 // ADC1 Sequence 0 +#define INT_ADC1SS1 65 // ADC1 Sequence 1 +#define INT_ADC1SS2 66 // ADC1 Sequence 2 +#define INT_ADC1SS3 67 // ADC1 Sequence 3 +#define INT_I2S0 68 // I2S0 +#define INT_EPI0 69 // EPI0 +#define INT_GPIOJ 70 // GPIO Port J + +//***************************************************************************** +// +// The following are defines for the total number of interrupts. +// +//***************************************************************************** +#define NUM_INTERRUPTS 71 + +//***************************************************************************** +// +// The following are defines for the total number of priority levels. +// +//***************************************************************************** +#define NUM_PRIORITY 8 +#define NUM_PRIORITY_BITS 3 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the interrupt assignments. +// +//***************************************************************************** +#define INT_SSI 23 // SSI Rx and Tx +#define INT_I2C 24 // I2C Master and Slave +#define INT_QEI 29 // Quadrature Encoder +#define INT_ADC0 30 // ADC Sequence 0 +#define INT_ADC1 31 // ADC Sequence 1 +#define INT_ADC2 32 // ADC Sequence 2 +#define INT_ADC3 33 // ADC Sequence 3 + +#endif + +#endif // __HW_INTS_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_memmap.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_memmap.h new file mode 100644 index 00000000..144f9d25 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_memmap.h @@ -0,0 +1,115 @@ +//***************************************************************************** +// +// hw_memmap.h - Macros defining the memory map of Stellaris. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_MEMMAP_H__ +#define __HW_MEMMAP_H__ + +//***************************************************************************** +// +// The following are defines for the base address of the memories and +// peripherals. +// +//***************************************************************************** +#define FLASH_BASE 0x00000000 // FLASH memory +#define SRAM_BASE 0x20000000 // SRAM memory +#define WATCHDOG0_BASE 0x40000000 // Watchdog0 +#define WATCHDOG1_BASE 0x40001000 // Watchdog1 +#define GPIO_PORTA_BASE 0x40004000 // GPIO Port A +#define GPIO_PORTB_BASE 0x40005000 // GPIO Port B +#define GPIO_PORTC_BASE 0x40006000 // GPIO Port C +#define GPIO_PORTD_BASE 0x40007000 // GPIO Port D +#define SSI0_BASE 0x40008000 // SSI0 +#define SSI1_BASE 0x40009000 // SSI1 +#define UART0_BASE 0x4000C000 // UART0 +#define UART1_BASE 0x4000D000 // UART1 +#define UART2_BASE 0x4000E000 // UART2 +#define I2C0_MASTER_BASE 0x40020000 // I2C0 Master +#define I2C0_SLAVE_BASE 0x40020800 // I2C0 Slave +#define I2C1_MASTER_BASE 0x40021000 // I2C1 Master +#define I2C1_SLAVE_BASE 0x40021800 // I2C1 Slave +#define GPIO_PORTE_BASE 0x40024000 // GPIO Port E +#define GPIO_PORTF_BASE 0x40025000 // GPIO Port F +#define GPIO_PORTG_BASE 0x40026000 // GPIO Port G +#define GPIO_PORTH_BASE 0x40027000 // GPIO Port H +#define PWM_BASE 0x40028000 // PWM +#define QEI0_BASE 0x4002C000 // QEI0 +#define QEI1_BASE 0x4002D000 // QEI1 +#define TIMER0_BASE 0x40030000 // Timer0 +#define TIMER1_BASE 0x40031000 // Timer1 +#define TIMER2_BASE 0x40032000 // Timer2 +#define TIMER3_BASE 0x40033000 // Timer3 +#define ADC0_BASE 0x40038000 // ADC0 +#define ADC1_BASE 0x40039000 // ADC1 +#define COMP_BASE 0x4003C000 // Analog comparators +#define GPIO_PORTJ_BASE 0x4003D000 // GPIO Port J +#define CAN0_BASE 0x40040000 // CAN0 +#define CAN1_BASE 0x40041000 // CAN1 +#define CAN2_BASE 0x40042000 // CAN2 +#define ETH_BASE 0x40048000 // Ethernet +#define MAC_BASE 0x40048000 // Ethernet +#define USB0_BASE 0x40050000 // USB 0 Controller +#define I2S0_BASE 0x40054000 // I2S0 +#define GPIO_PORTA_AHB_BASE 0x40058000 // GPIO Port A (high speed) +#define GPIO_PORTB_AHB_BASE 0x40059000 // GPIO Port B (high speed) +#define GPIO_PORTC_AHB_BASE 0x4005A000 // GPIO Port C (high speed) +#define GPIO_PORTD_AHB_BASE 0x4005B000 // GPIO Port D (high speed) +#define GPIO_PORTE_AHB_BASE 0x4005C000 // GPIO Port E (high speed) +#define GPIO_PORTF_AHB_BASE 0x4005D000 // GPIO Port F (high speed) +#define GPIO_PORTG_AHB_BASE 0x4005E000 // GPIO Port G (high speed) +#define GPIO_PORTH_AHB_BASE 0x4005F000 // GPIO Port H (high speed) +#define GPIO_PORTJ_AHB_BASE 0x40060000 // GPIO Port J (high speed) +#define EPI0_BASE 0x400D0000 // EPI0 +#define HIB_BASE 0x400FC000 // Hibernation Module +#define FLASH_CTRL_BASE 0x400FD000 // FLASH Controller +#define SYSCTL_BASE 0x400FE000 // System Control +#define UDMA_BASE 0x400FF000 // uDMA Controller +#define ITM_BASE 0xE0000000 // Instrumentation Trace Macrocell +#define DWT_BASE 0xE0001000 // Data Watchpoint and Trace +#define FPB_BASE 0xE0002000 // FLASH Patch and Breakpoint +#define NVIC_BASE 0xE000E000 // Nested Vectored Interrupt Ctrl +#define TPIU_BASE 0xE0040000 // Trace Port Interface Unit + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the base address of the memories +// and peripherals. +// +//***************************************************************************** +#define WATCHDOG_BASE 0x40000000 // Watchdog +#define SSI_BASE 0x40008000 // SSI +#define I2C_MASTER_BASE 0x40020000 // I2C Master +#define I2C_SLAVE_BASE 0x40020800 // I2C Slave +#define QEI_BASE 0x4002C000 // QEI +#define ADC_BASE 0x40038000 // ADC + +#endif + +#endif // __HW_MEMMAP_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_nvic.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_nvic.h new file mode 100644 index 00000000..5ac7bafb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_nvic.h @@ -0,0 +1,1189 @@ +//***************************************************************************** +// +// hw_nvic.h - Macros used when accessing the NVIC hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_NVIC_H__ +#define __HW_NVIC_H__ + +//***************************************************************************** +// +// The following are defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg +#define NVIC_ACTLR 0xE000E008 // Auxiliary Control +#define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status + // Register +#define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register +#define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register +#define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg +#define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable +#define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable +#define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable +#define NVIC_DIS1 0xE000E184 // Interrupt 32-54 Clear Enable +#define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending +#define NVIC_PEND1 0xE000E204 // Interrupt 32-54 Set Pending +#define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending +#define NVIC_UNPEND1 0xE000E284 // Interrupt 32-54 Clear Pending +#define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit +#define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-54 Active Bit +#define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority +#define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority +#define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority +#define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority +#define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority +#define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority +#define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority +#define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority +#define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority +#define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority +#define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority +#define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority +#define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority +#define NVIC_PRI13 0xE000E434 // Interrupt 52-53 Priority +#define NVIC_CPUID 0xE000ED00 // CPU ID Base +#define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State +#define NVIC_VTABLE 0xE000ED08 // Vector Table Offset +#define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset + // Control +#define NVIC_SYS_CTRL 0xE000ED10 // System Control +#define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control +#define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 +#define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2 +#define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3 +#define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State +#define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status +#define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status +#define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register +#define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address +#define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address +#define NVIC_MPU_TYPE 0xE000ED90 // MPU Type +#define NVIC_MPU_CTRL 0xE000ED94 // MPU Control +#define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number +#define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address +#define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size +#define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 +#define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size + // Alias 1 +#define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 +#define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size + // Alias 2 +#define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 +#define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size + // Alias 3 +#define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg +#define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select +#define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data +#define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control +#define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTLR register. +// +//***************************************************************************** +#define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding +#define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer +#define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple + // Cycle Instructions + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x007FFFFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable +#define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable +#define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable +#define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable +#define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable +#define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable +#define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable +#define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00FFFFFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00FFFFFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00FFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00FFFFFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI11 register. +// +//***************************************************************************** +#define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask +#define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask +#define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask +#define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask +#define NVIC_PRI11_INT47_S 29 +#define NVIC_PRI11_INT46_S 21 +#define NVIC_PRI11_INT45_S 13 +#define NVIC_PRI11_INT44_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI12 register. +// +//***************************************************************************** +#define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask +#define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask +#define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask +#define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask +#define NVIC_PRI12_INT51_S 29 +#define NVIC_PRI12_INT50_S 21 +#define NVIC_PRI12_INT49_S 13 +#define NVIC_PRI12_INT48_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI13 register. +// +//***************************************************************************** +#define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask +#define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask +#define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask +#define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask +#define NVIC_PRI13_INT55_S 29 +#define NVIC_PRI13_INT54_S 21 +#define NVIC_PRI13_INT53_S 13 +#define NVIC_PRI13_INT52_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0007F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_S 12 +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFE00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 9 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +#endif // __HW_NVIC_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_pwm.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_pwm.h new file mode 100644 index 00000000..a59f3edb --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_pwm.h @@ -0,0 +1,756 @@ +//***************************************************************************** +// +// hw_pwm.h - Defines and Macros for Pulse Width Modulation (PWM) ports. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_PWM_H__ +#define __HW_PWM_H__ + +//***************************************************************************** +// +// The following are defines for the PWM register offsets. +// +//***************************************************************************** +#define PWM_O_CTL 0x00000000 // PWM Master Control +#define PWM_O_SYNC 0x00000004 // PWM Time Base Sync +#define PWM_O_ENABLE 0x00000008 // PWM Output Enable +#define PWM_O_INVERT 0x0000000C // PWM Output Inversion +#define PWM_O_FAULT 0x00000010 // PWM Output Fault +#define PWM_O_INTEN 0x00000014 // PWM Interrupt Enable +#define PWM_O_RIS 0x00000018 // PWM Raw Interrupt Status +#define PWM_O_ISC 0x0000001C // PWM Interrupt Status and Clear +#define PWM_O_STATUS 0x00000020 // PWM Status +#define PWM_O_FAULTVAL 0x00000024 // PWM Fault Condition Value +#define PWM_O_ENUPD 0x00000028 // PWM Enable Update +#define PWM_O_0_CTL 0x00000040 // PWM0 Control +#define PWM_O_0_INTEN 0x00000044 // PWM0 Interrupt and Trigger + // Enable +#define PWM_O_0_RIS 0x00000048 // PWM0 Raw Interrupt Status +#define PWM_O_0_ISC 0x0000004C // PWM0 Interrupt Status and Clear +#define PWM_O_0_LOAD 0x00000050 // PWM0 Load +#define PWM_O_0_COUNT 0x00000054 // PWM0 Counter +#define PWM_O_0_CMPA 0x00000058 // PWM0 Compare A +#define PWM_O_0_CMPB 0x0000005C // PWM0 Compare B +#define PWM_O_0_GENA 0x00000060 // PWM0 Generator A Control +#define PWM_O_0_GENB 0x00000064 // PWM0 Generator B Control +#define PWM_O_0_DBCTL 0x00000068 // PWM0 Dead-Band Control +#define PWM_O_0_DBRISE 0x0000006C // PWM0 Dead-Band Rising-Edge Delay +#define PWM_O_0_DBFALL 0x00000070 // PWM0 Dead-Band + // Falling-Edge-Delay +#define PWM_O_0_FLTSRC0 0x00000074 // PWM0 Fault Source 0 +#define PWM_O_0_FLTSRC1 0x00000078 // PWM0 Fault Source 1 +#define PWM_O_0_MINFLTPER 0x0000007C // PWM0 Minimum Fault Period +#define PWM_O_1_CTL 0x00000080 // PWM1 Control +#define PWM_O_1_INTEN 0x00000084 // PWM1 Interrupt and Trigger + // Enable +#define PWM_O_1_RIS 0x00000088 // PWM1 Raw Interrupt Status +#define PWM_O_1_ISC 0x0000008C // PWM1 Interrupt Status and Clear +#define PWM_O_1_LOAD 0x00000090 // PWM1 Load +#define PWM_O_1_COUNT 0x00000094 // PWM1 Counter +#define PWM_O_1_CMPA 0x00000098 // PWM1 Compare A +#define PWM_O_1_CMPB 0x0000009C // PWM1 Compare B +#define PWM_O_1_GENA 0x000000A0 // PWM1 Generator A Control +#define PWM_O_1_GENB 0x000000A4 // PWM1 Generator B Control +#define PWM_O_1_DBCTL 0x000000A8 // PWM1 Dead-Band Control +#define PWM_O_1_DBRISE 0x000000AC // PWM1 Dead-Band Rising-Edge Delay +#define PWM_O_1_DBFALL 0x000000B0 // PWM1 Dead-Band + // Falling-Edge-Delay +#define PWM_O_1_FLTSRC0 0x000000B4 // PWM1 Fault Source 0 +#define PWM_O_1_FLTSRC1 0x000000B8 // PWM1 Fault Source 1 +#define PWM_O_1_MINFLTPER 0x000000BC // PWM1 Minimum Fault Period +#define PWM_O_2_CTL 0x000000C0 // PWM2 Control +#define PWM_O_2_INTEN 0x000000C4 // PWM2 Interrupt and Trigger + // Enable +#define PWM_O_2_RIS 0x000000C8 // PWM2 Raw Interrupt Status +#define PWM_O_2_ISC 0x000000CC // PWM2 Interrupt Status and Clear +#define PWM_O_2_LOAD 0x000000D0 // PWM2 Load +#define PWM_O_2_COUNT 0x000000D4 // PWM2 Counter +#define PWM_O_2_CMPA 0x000000D8 // PWM2 Compare A +#define PWM_O_2_CMPB 0x000000DC // PWM2 Compare B +#define PWM_O_2_GENA 0x000000E0 // PWM2 Generator A Control +#define PWM_O_2_GENB 0x000000E4 // PWM2 Generator B Control +#define PWM_O_2_DBCTL 0x000000E8 // PWM2 Dead-Band Control +#define PWM_O_2_DBRISE 0x000000EC // PWM2 Dead-Band Rising-Edge Delay +#define PWM_O_2_DBFALL 0x000000F0 // PWM2 Dead-Band + // Falling-Edge-Delay +#define PWM_O_2_FLTSRC0 0x000000F4 // PWM2 Fault Source 0 +#define PWM_O_2_FLTSRC1 0x000000F8 // PWM2 Fault Source 1 +#define PWM_O_2_MINFLTPER 0x000000FC // PWM2 Minimum Fault Period +#define PWM_O_3_CTL 0x00000100 // PWM3 Control +#define PWM_O_3_INTEN 0x00000104 // PWM3 Interrupt and Trigger + // Enable +#define PWM_O_3_RIS 0x00000108 // PWM3 Raw Interrupt Status +#define PWM_O_3_ISC 0x0000010C // PWM3 Interrupt Status and Clear +#define PWM_O_3_LOAD 0x00000110 // PWM3 Load +#define PWM_O_3_COUNT 0x00000114 // PWM3 Counter +#define PWM_O_3_CMPA 0x00000118 // PWM3 Compare A +#define PWM_O_3_CMPB 0x0000011C // PWM3 Compare B +#define PWM_O_3_GENA 0x00000120 // PWM3 Generator A Control +#define PWM_O_3_GENB 0x00000124 // PWM3 Generator B Control +#define PWM_O_3_DBCTL 0x00000128 // PWM3 Dead-Band Control +#define PWM_O_3_DBRISE 0x0000012C // PWM3 Dead-Band Rising-Edge Delay +#define PWM_O_3_DBFALL 0x00000130 // PWM3 Dead-Band + // Falling-Edge-Delay +#define PWM_O_3_FLTSRC0 0x00000134 // PWM3 Fault Source 0 +#define PWM_O_3_FLTSRC1 0x00000138 // PWM3 Fault Source 1 +#define PWM_O_3_MINFLTPER 0x0000013C // PWM3 Minimum Fault Period +#define PWM_O_0_FLTSEN 0x00000800 // PWM0 Fault Pin Logic Sense +#define PWM_O_0_FLTSTAT0 0x00000804 // PWM0 Fault Status 0 +#define PWM_O_0_FLTSTAT1 0x00000808 // PWM0 Fault Status 1 +#define PWM_O_1_FLTSEN 0x00000880 // PWM1 Fault Pin Logic Sense +#define PWM_O_1_FLTSTAT0 0x00000884 // PWM1 Fault Status 0 +#define PWM_O_1_FLTSTAT1 0x00000888 // PWM1 Fault Status 1 +#define PWM_O_2_FLTSEN 0x00000900 // PWM2 Fault Pin Logic Sense +#define PWM_O_2_FLTSTAT0 0x00000904 // PWM2 Fault Status 0 +#define PWM_O_2_FLTSTAT1 0x00000908 // PWM2 Fault Status 1 +#define PWM_O_3_FLTSEN 0x00000980 // PWM3 Fault Pin Logic Sense +#define PWM_O_3_FLTSTAT0 0x00000984 // PWM3 Fault Status 0 +#define PWM_O_3_FLTSTAT1 0x00000988 // PWM3 Fault Status 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_CTL register. +// +//***************************************************************************** +#define PWM_CTL_GLOBALSYNC3 0x00000008 // Update PWM Generator 3 +#define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2 +#define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1 +#define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_SYNC register. +// +//***************************************************************************** +#define PWM_SYNC_SYNC3 0x00000008 // Reset Generator 3 Counter +#define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter +#define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter +#define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENABLE register. +// +//***************************************************************************** +#define PWM_ENABLE_PWM7EN 0x00000080 // PWM7 Output Enable +#define PWM_ENABLE_PWM6EN 0x00000040 // PWM6 Output Enable +#define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable +#define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable +#define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable +#define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable +#define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable +#define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INVERT register. +// +//***************************************************************************** +#define PWM_INVERT_PWM7INV 0x00000080 // Invert PWM7 Signal +#define PWM_INVERT_PWM6INV 0x00000040 // Invert PWM6 Signal +#define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal +#define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal +#define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal +#define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal +#define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal +#define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULT register. +// +//***************************************************************************** +#define PWM_FAULT_FAULT7 0x00000080 // PWM7 Fault +#define PWM_FAULT_FAULT6 0x00000040 // PWM6 Fault +#define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault +#define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault +#define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault +#define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault +#define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault +#define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INTEN register. +// +//***************************************************************************** +#define PWM_INTEN_INTFAULT3 0x00080000 // Interrupt Fault 3 +#define PWM_INTEN_INTFAULT2 0x00040000 // Interrupt Fault 2 +#define PWM_INTEN_INTFAULT1 0x00020000 // Interrupt Fault 1 +#define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable +#define PWM_INTEN_INTFAULT0 0x00010000 // Interrupt Fault 0 +#define PWM_INTEN_INTPWM3 0x00000008 // PWM3 Interrupt Enable +#define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable +#define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable +#define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_RIS register. +// +//***************************************************************************** +#define PWM_RIS_INTFAULT3 0x00080000 // Interrupt Fault PWM 3 +#define PWM_RIS_INTFAULT2 0x00040000 // Interrupt Fault PWM 2 +#define PWM_RIS_INTFAULT1 0x00020000 // Interrupt Fault PWM 1 +#define PWM_RIS_INTFAULT0 0x00010000 // Interrupt Fault PWM 0 +#define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_RIS_INTPWM3 0x00000008 // PWM3 Interrupt Asserted +#define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted +#define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted +#define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ISC register. +// +//***************************************************************************** +#define PWM_ISC_INTFAULT3 0x00080000 // FAULT3 Interrupt Asserted +#define PWM_ISC_INTFAULT2 0x00040000 // FAULT2 Interrupt Asserted +#define PWM_ISC_INTFAULT1 0x00020000 // FAULT1 Interrupt Asserted +#define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_ISC_INTFAULT0 0x00010000 // FAULT0 Interrupt Asserted +#define PWM_ISC_INTPWM3 0x00000008 // PWM3 Interrupt Status +#define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status +#define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status +#define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_STATUS register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT3 0x00000008 // Generator 3 Fault Status +#define PWM_STATUS_FAULT2 0x00000004 // Generator 2 Fault Status +#define PWM_STATUS_FAULT1 0x00000002 // Generator 1 Fault Status +#define PWM_STATUS_FAULT0 0x00000001 // Generator 0 Fault Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULTVAL register. +// +//***************************************************************************** +#define PWM_FAULTVAL_PWM7 0x00000080 // PWM7 Fault Value +#define PWM_FAULTVAL_PWM6 0x00000040 // PWM6 Fault Value +#define PWM_FAULTVAL_PWM5 0x00000020 // PWM5 Fault Value +#define PWM_FAULTVAL_PWM4 0x00000010 // PWM4 Fault Value +#define PWM_FAULTVAL_PWM3 0x00000008 // PWM3 Fault Value +#define PWM_FAULTVAL_PWM2 0x00000004 // PWM2 Fault Value +#define PWM_FAULTVAL_PWM1 0x00000002 // PWM1 Fault Value +#define PWM_FAULTVAL_PWM0 0x00000001 // PWM0 Fault Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENUPD register. +// +//***************************************************************************** +#define PWM_ENUPD_ENUPD7_M 0x0000C000 // PWM7 Enable Update Mode +#define PWM_ENUPD_ENUPD7_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD7_LSYNC 0x00008000 // Locally Synchronized +#define PWM_ENUPD_ENUPD7_GSYNC 0x0000C000 // Globally Synchronized +#define PWM_ENUPD_ENUPD6_M 0x00003000 // PWM6 Enable Update Mode +#define PWM_ENUPD_ENUPD6_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD6_LSYNC 0x00002000 // Locally Synchronized +#define PWM_ENUPD_ENUPD6_GSYNC 0x00003000 // Globally Synchronized +#define PWM_ENUPD_ENUPD5_M 0x00000C00 // PWM5 Enable Update Mode +#define PWM_ENUPD_ENUPD5_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD5_LSYNC 0x00000800 // Locally Synchronized +#define PWM_ENUPD_ENUPD5_GSYNC 0x00000C00 // Globally Synchronized +#define PWM_ENUPD_ENUPD4_M 0x00000300 // PWM4 Enable Update Mode +#define PWM_ENUPD_ENUPD4_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD4_LSYNC 0x00000200 // Locally Synchronized +#define PWM_ENUPD_ENUPD4_GSYNC 0x00000300 // Globally Synchronized +#define PWM_ENUPD_ENUPD3_M 0x000000C0 // PWM3 Enable Update Mode +#define PWM_ENUPD_ENUPD3_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD3_LSYNC 0x00000080 // Locally Synchronized +#define PWM_ENUPD_ENUPD3_GSYNC 0x000000C0 // Globally Synchronized +#define PWM_ENUPD_ENUPD2_M 0x00000030 // PWM2 Enable Update Mode +#define PWM_ENUPD_ENUPD2_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD2_LSYNC 0x00000020 // Locally Synchronized +#define PWM_ENUPD_ENUPD2_GSYNC 0x00000030 // Globally Synchronized +#define PWM_ENUPD_ENUPD1_M 0x0000000C // PWM1 Enable Update Mode +#define PWM_ENUPD_ENUPD1_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD1_LSYNC 0x00000008 // Locally Synchronized +#define PWM_ENUPD_ENUPD1_GSYNC 0x0000000C // Globally Synchronized +#define PWM_ENUPD_ENUPD0_M 0x00000003 // PWM0 Enable Update Mode +#define PWM_ENUPD_ENUPD0_IMM 0x00000000 // Immediate +#define PWM_ENUPD_ENUPD0_LSYNC 0x00000002 // Locally Synchronized +#define PWM_ENUPD_ENUPD0_GSYNC 0x00000003 // Globally Synchronized + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CTL register. +// +//***************************************************************************** +#define PWM_X_CTL_LATCH 0x00040000 // Latch Fault Input +#define PWM_X_CTL_MINFLTPER 0x00020000 // Minimum Fault Period +#define PWM_X_CTL_FLTSRC 0x00010000 // Fault Condition Source +#define PWM_X_CTL_DBFALLUPD_M 0x0000C000 // PWMnDBFALL Update Mode +#define PWM_X_CTL_DBFALLUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBFALLUPD_LS 0x00008000 // Locally Synchronized +#define PWM_X_CTL_DBFALLUPD_GS 0x0000C000 // Globally Synchronized +#define PWM_X_CTL_DBRISEUPD_M 0x00003000 // PWMnDBRISE Update Mode +#define PWM_X_CTL_DBRISEUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBRISEUPD_LS 0x00002000 // Locally Synchronized +#define PWM_X_CTL_DBRISEUPD_GS 0x00003000 // Globally Synchronized +#define PWM_X_CTL_DBCTLUPD_M 0x00000C00 // PWMnDBCTL Update Mode +#define PWM_X_CTL_DBCTLUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_DBCTLUPD_LS 0x00000800 // Locally Synchronized +#define PWM_X_CTL_DBCTLUPD_GS 0x00000C00 // Globally Synchronized +#define PWM_X_CTL_GENBUPD_M 0x00000300 // PWMnGENB Update Mode +#define PWM_X_CTL_GENBUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_GENBUPD_LS 0x00000200 // Locally Synchronized +#define PWM_X_CTL_GENBUPD_GS 0x00000300 // Globally Synchronized +#define PWM_X_CTL_GENAUPD_M 0x000000C0 // PWMnGENA Update Mode +#define PWM_X_CTL_GENAUPD_I 0x00000000 // Immediate +#define PWM_X_CTL_GENAUPD_LS 0x00000080 // Locally Synchronized +#define PWM_X_CTL_GENAUPD_GS 0x000000C0 // Globally Synchronized +#define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode +#define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode +#define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode +#define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode +#define PWM_X_CTL_MODE 0x00000002 // Counter Mode +#define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_INTEN register. +// +//***************************************************************************** +#define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up +#define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up +#define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD +#define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0 +#define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB + // Up +#define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA + // Up +#define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD +#define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_RIS register. +// +//***************************************************************************** +#define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt + // Status +#define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status +#define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt + // Status +#define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status +#define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status +#define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_ISC register. +// +//***************************************************************************** +#define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt +#define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt +#define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt +#define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt +#define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt +#define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_LOAD register. +// +//***************************************************************************** +#define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value +#define PWM_X_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_COUNT register. +// +//***************************************************************************** +#define PWM_X_COUNT_M 0x0000FFFF // Counter Value +#define PWM_X_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPA register. +// +//***************************************************************************** +#define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value +#define PWM_X_CMPA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPB register. +// +//***************************************************************************** +#define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value +#define PWM_X_CMPB_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENA register. +// +//***************************************************************************** +#define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENA_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA +#define PWM_X_GENA_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High +#define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENA_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA +#define PWM_X_GENA_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENA_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA +#define PWM_X_GENA_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENA_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA +#define PWM_X_GENA_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High +#define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA +#define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low +#define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High +#define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA +#define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low +#define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENB register. +// +//***************************************************************************** +#define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENB_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB +#define PWM_X_GENB_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High +#define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENB_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB +#define PWM_X_GENB_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENB_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB +#define PWM_X_GENB_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENB_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB +#define PWM_X_GENB_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High +#define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB +#define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low +#define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High +#define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB +#define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low +#define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBCTL register. +// +//***************************************************************************** +#define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBRISE register. +// +//***************************************************************************** +#define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay +#define PWM_X_DBRISE_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBFALL register. +// +//***************************************************************************** +#define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay +#define PWM_X_DBFALL_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSRC0 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSRC0_FAULT3 0x00000008 // Fault3 Input +#define PWM_X_FLTSRC0_FAULT2 0x00000004 // Fault2 Input +#define PWM_X_FLTSRC0_FAULT1 0x00000002 // Fault1 Input +#define PWM_X_FLTSRC0_FAULT0 0x00000001 // Fault0 Input + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSRC1 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSRC1_DCMP7 0x00000080 // Digital Comparator 7 +#define PWM_X_FLTSRC1_DCMP6 0x00000040 // Digital Comparator 6 +#define PWM_X_FLTSRC1_DCMP5 0x00000020 // Digital Comparator 5 +#define PWM_X_FLTSRC1_DCMP4 0x00000010 // Digital Comparator 4 +#define PWM_X_FLTSRC1_DCMP3 0x00000008 // Digital Comparator 3 +#define PWM_X_FLTSRC1_DCMP2 0x00000004 // Digital Comparator 2 +#define PWM_X_FLTSRC1_DCMP1 0x00000002 // Digital Comparator 1 +#define PWM_X_FLTSRC1_DCMP0 0x00000001 // Digital Comparator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_MINFLTPER +// register. +// +//***************************************************************************** +#define PWM_X_MINFLTPER_M 0x0000FFFF // Minimum Fault Period +#define PWM_X_MINFLTPER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSEN register. +// +//***************************************************************************** +#define PWM_X_FLTSEN_FAULT3 0x00000008 // Fault3 Sense +#define PWM_X_FLTSEN_FAULT2 0x00000004 // Fault2 Sense +#define PWM_X_FLTSEN_FAULT1 0x00000002 // Fault1 Sense +#define PWM_X_FLTSEN_FAULT0 0x00000001 // Fault0 Sense + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSTAT0 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSTAT0_FAULT3 0x00000008 // Fault Input 3 +#define PWM_X_FLTSTAT0_FAULT2 0x00000004 // Fault Input 2 +#define PWM_X_FLTSTAT0_FAULT1 0x00000002 // Fault Input 1 +#define PWM_X_FLTSTAT0_FAULT0 0x00000001 // Fault Input 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_FLTSTAT1 +// register. +// +//***************************************************************************** +#define PWM_X_FLTSTAT1_DCMP7 0x00000080 // Digital Comparator 7 Trigger +#define PWM_X_FLTSTAT1_DCMP6 0x00000040 // Digital Comparator 6 Trigger +#define PWM_X_FLTSTAT1_DCMP5 0x00000020 // Digital Comparator 5 Trigger +#define PWM_X_FLTSTAT1_DCMP4 0x00000010 // Digital Comparator 4 Trigger +#define PWM_X_FLTSTAT1_DCMP3 0x00000008 // Digital Comparator 3 Trigger +#define PWM_X_FLTSTAT1_DCMP2 0x00000004 // Digital Comparator 2 Trigger +#define PWM_X_FLTSTAT1_DCMP1 0x00000002 // Digital Comparator 1 Trigger +#define PWM_X_FLTSTAT1_DCMP0 0x00000001 // Digital Comparator 0 Trigger + +//***************************************************************************** +// +// The following are defines for the PWM Generator standard offsets. +// +//***************************************************************************** +#define PWM_O_X_CTL 0x00000000 // Gen Control Reg +#define PWM_O_X_INTEN 0x00000004 // Gen Int/Trig Enable Reg +#define PWM_O_X_RIS 0x00000008 // Gen Raw Int Status Reg +#define PWM_O_X_ISC 0x0000000C // Gen Int Status Reg +#define PWM_O_X_LOAD 0x00000010 // Gen Load Reg +#define PWM_O_X_COUNT 0x00000014 // Gen Counter Reg +#define PWM_O_X_CMPA 0x00000018 // Gen Compare A Reg +#define PWM_O_X_CMPB 0x0000001C // Gen Compare B Reg +#define PWM_O_X_GENA 0x00000020 // Gen Generator A Ctrl Reg +#define PWM_O_X_GENB 0x00000024 // Gen Generator B Ctrl Reg +#define PWM_O_X_DBCTL 0x00000028 // Gen Dead Band Ctrl Reg +#define PWM_O_X_DBRISE 0x0000002C // Gen DB Rising Edge Delay Reg +#define PWM_O_X_DBFALL 0x00000030 // Gen DB Falling Edge Delay Reg +#define PWM_O_X_FLTSRC0 0x00000034 // Fault pin, comparator condition +#define PWM_O_X_FLTSRC1 0x00000038 // Digital comparator condition +#define PWM_O_X_MINFLTPER 0x0000003C // Fault minimum period extension +#define PWM_GEN_0_OFFSET 0x00000040 // PWM0 base +#define PWM_GEN_1_OFFSET 0x00000080 // PWM1 base +#define PWM_GEN_2_OFFSET 0x000000C0 // PWM2 base +#define PWM_GEN_3_OFFSET 0x00000100 // PWM3 base + +//***************************************************************************** +// +// The following are defines for the PWM Generator extended offsets. +// +//***************************************************************************** +#define PWM_O_X_FLTSEN 0x00000000 // Fault logic sense +#define PWM_O_X_FLTSTAT0 0x00000004 // Pin and comparator status +#define PWM_O_X_FLTSTAT1 0x00000008 // Digital comparator status +#define PWM_EXT_0_OFFSET 0x00000800 // PWM0 extended base +#define PWM_EXT_1_OFFSET 0x00000880 // PWM1 extended base +#define PWM_EXT_2_OFFSET 0x00000900 // PWM2 extended base +#define PWM_EXT_3_OFFSET 0x00000980 // PWM3 extended base + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PWM_O_CTL +// register. +// +//***************************************************************************** +#define PWM_CTL_GLOBAL_SYNC2 0x00000004 // Global sync generator 2 +#define PWM_CTL_GLOBAL_SYNC1 0x00000002 // Global sync generator 1 +#define PWM_CTL_GLOBAL_SYNC0 0x00000001 // Global sync generator 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the PWM_O_STATUS +// register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status + +//***************************************************************************** +// +// The following are deprecated defines for the PWM Interrupt Register bit +// definitions. +// +//***************************************************************************** +#define PWM_INT_INTFAULT 0x00010000 // Fault interrupt pending + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Interrupt Status Register +// bit definitions. +// +//***************************************************************************** +#define PWM_X_INT_INTCMPBD 0x00000020 // PWM_X_COUNT = PWM_X_CMPB D rcvd +#define PWM_X_INT_INTCMPBU 0x00000010 // PWM_X_COUNT = PWM_X_CMPB U rcvd +#define PWM_X_INT_INTCMPAD 0x00000008 // PWM_X_COUNT = PWM_X_CMPA D rcvd +#define PWM_X_INT_INTCMPAU 0x00000004 // PWM_X_COUNT = PWM_X_CMPA U rcvd +#define PWM_X_INT_INTCNTLOAD 0x00000002 // PWM_X_COUNT = PWM_X_LOAD rcvd +#define PWM_X_INT_INTCNTZERO 0x00000001 // PWM_X_COUNT = 0 received + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Generator A/B Control +// Register bit definitions. +// +//***************************************************************************** +#define PWM_X_GEN_Y_ACTCMPBD 0x00000C00 // Act PWM_X_COUNT = PWM_X_CMPB D +#define PWM_X_GEN_Y_ACTCMPBU 0x00000300 // Act PWM_X_COUNT = PWM_X_CMPB U +#define PWM_X_GEN_Y_ACTCMPAD 0x000000C0 // Act PWM_X_COUNT = PWM_X_CMPA D +#define PWM_X_GEN_Y_ACTCMPAU 0x00000030 // Act PWM_X_COUNT = PWM_X_CMPA U +#define PWM_X_GEN_Y_ACTLOAD 0x0000000C // Act PWM_X_COUNT = PWM_X_LOAD +#define PWM_X_GEN_Y_ACTZERO 0x00000003 // Act PWM_X_COUNT = 0 + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Generator A/B Control +// Register action definitions. +// +//***************************************************************************** +#define PWM_GEN_ACT_ONE 0x00000003 // Set the output signal to one +#define PWM_GEN_ACT_ZERO 0x00000002 // Set the output signal to zero +#define PWM_GEN_ACT_INV 0x00000001 // Invert the output signal +#define PWM_GEN_ACT_NONE 0x00000000 // Do nothing +#define PWM_GEN_ACT_B_DN_SHIFT 10 // Shift amount for the B dn action +#define PWM_GEN_ACT_B_UP_SHIFT 8 // Shift amount for the B up action +#define PWM_GEN_ACT_A_DN_SHIFT 6 // Shift amount for the A dn action +#define PWM_GEN_ACT_A_UP_SHIFT 4 // Shift amount for the A up action +#define PWM_GEN_ACT_LOAD_SHIFT 2 // Shift amount for the load action +#define PWM_GEN_ACT_ZERO_SHIFT 0 // Shift amount for the zero action + +//***************************************************************************** +// +// The following are deprecated defines for the PWM_X Dead Band Control +// Register bit definitions. +// +//***************************************************************************** +#define PWM_DBCTL_ENABLE 0x00000001 // Enable dead band insertion + +//***************************************************************************** +// +// The following are deprecated defines for the PWM Register reset values. +// +//***************************************************************************** +#define PWM_RV_X_DBCTL 0x00000000 // Control the dead band generator +#define PWM_RV_STATUS 0x00000000 // Status +#define PWM_RV_X_ISC 0x00000000 // Interrupt status and clearing +#define PWM_RV_X_RIS 0x00000000 // Raw interrupt status +#define PWM_RV_X_CTL 0x00000000 // Master control of the PWM + // generator block +#define PWM_RV_SYNC 0x00000000 // Counter synch for PWM generators +#define PWM_RV_X_DBFALL 0x00000000 // The dead band falling edge delay + // count +#define PWM_RV_X_INTEN 0x00000000 // Interrupt and trigger enable +#define PWM_RV_X_LOAD 0x00000000 // The load value for the counter +#define PWM_RV_X_GENA 0x00000000 // Controls PWM generator A +#define PWM_RV_CTL 0x00000000 // Master control of the PWM module +#define PWM_RV_FAULT 0x00000000 // Fault handling for the PWM + // output pins +#define PWM_RV_RIS 0x00000000 // Raw interrupt status +#define PWM_RV_X_CMPA 0x00000000 // The comparator A value +#define PWM_RV_INVERT 0x00000000 // Inversion control for PWM output + // pins +#define PWM_RV_X_DBRISE 0x00000000 // The dead band rising edge delay + // count +#define PWM_RV_ENABLE 0x00000000 // Master enable for the PWM output + // pins +#define PWM_RV_X_GENB 0x00000000 // Controls PWM generator B +#define PWM_RV_X_CMPB 0x00000000 // The comparator B value +#define PWM_RV_ISC 0x00000000 // Interrupt status and clearing +#define PWM_RV_INTEN 0x00000000 // Interrupt enable +#define PWM_RV_X_COUNT 0x00000000 // The current counter value + +#endif + +#endif // __HW_PWM_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_qei.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_qei.h new file mode 100644 index 00000000..2b6dbd54 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_qei.h @@ -0,0 +1,201 @@ +//***************************************************************************** +// +// hw_qei.h - Macros used when accessing the QEI hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_QEI_H__ +#define __HW_QEI_H__ + +//***************************************************************************** +// +// The following are defines for the QEI register offsets. +// +//***************************************************************************** +#define QEI_O_CTL 0x00000000 // QEI Control +#define QEI_O_STAT 0x00000004 // QEI Status +#define QEI_O_POS 0x00000008 // QEI Position +#define QEI_O_MAXPOS 0x0000000C // QEI Maximum Position +#define QEI_O_LOAD 0x00000010 // QEI Timer Load +#define QEI_O_TIME 0x00000014 // QEI Timer +#define QEI_O_COUNT 0x00000018 // QEI Velocity Counter +#define QEI_O_SPEED 0x0000001C // QEI Velocity +#define QEI_O_INTEN 0x00000020 // QEI Interrupt Enable +#define QEI_O_RIS 0x00000024 // QEI Raw Interrupt Status +#define QEI_O_ISC 0x00000028 // QEI Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_CTL register. +// +//***************************************************************************** +#define QEI_CTL_FILTCNT_M 0x000F0000 // Input Filter Prescale Count +#define QEI_CTL_FILTEN 0x00002000 // Enable Input Filter +#define QEI_CTL_STALLEN 0x00001000 // Stall QEI +#define QEI_CTL_INVI 0x00000800 // Invert Index Pulse +#define QEI_CTL_INVB 0x00000400 // Invert PhB +#define QEI_CTL_INVA 0x00000200 // Invert PhA +#define QEI_CTL_VELDIV_M 0x000001C0 // Predivide Velocity +#define QEI_CTL_VELDIV_1 0x00000000 // QEI clock /1 +#define QEI_CTL_VELDIV_2 0x00000040 // QEI clock /2 +#define QEI_CTL_VELDIV_4 0x00000080 // QEI clock /4 +#define QEI_CTL_VELDIV_8 0x000000C0 // QEI clock /8 +#define QEI_CTL_VELDIV_16 0x00000100 // QEI clock /16 +#define QEI_CTL_VELDIV_32 0x00000140 // QEI clock /32 +#define QEI_CTL_VELDIV_64 0x00000180 // QEI clock /64 +#define QEI_CTL_VELDIV_128 0x000001C0 // QEI clock /128 +#define QEI_CTL_VELEN 0x00000020 // Capture Velocity +#define QEI_CTL_RESMODE 0x00000010 // Reset Mode +#define QEI_CTL_CAPMODE 0x00000008 // Capture Mode +#define QEI_CTL_SIGMODE 0x00000004 // Signal Mode +#define QEI_CTL_SWAP 0x00000002 // Swap Signals +#define QEI_CTL_ENABLE 0x00000001 // Enable QEI +#define QEI_CTL_FILTCNT_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_STAT register. +// +//***************************************************************************** +#define QEI_STAT_DIRECTION 0x00000002 // Direction of Rotation +#define QEI_STAT_ERROR 0x00000001 // Error Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_POS register. +// +//***************************************************************************** +#define QEI_POS_M 0xFFFFFFFF // Current Position Integrator + // Value +#define QEI_POS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_MAXPOS register. +// +//***************************************************************************** +#define QEI_MAXPOS_M 0xFFFFFFFF // Maximum Position Integrator + // Value +#define QEI_MAXPOS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_LOAD register. +// +//***************************************************************************** +#define QEI_LOAD_M 0xFFFFFFFF // Velocity Timer Load Value +#define QEI_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_TIME register. +// +//***************************************************************************** +#define QEI_TIME_M 0xFFFFFFFF // Velocity Timer Current Value +#define QEI_TIME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_COUNT register. +// +//***************************************************************************** +#define QEI_COUNT_M 0xFFFFFFFF // Velocity Pulse Count +#define QEI_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_SPEED register. +// +//***************************************************************************** +#define QEI_SPEED_M 0xFFFFFFFF // Velocity +#define QEI_SPEED_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_INTEN register. +// +//***************************************************************************** +#define QEI_INTEN_ERROR 0x00000008 // Phase Error Interrupt Enable +#define QEI_INTEN_DIR 0x00000004 // Direction Change Interrupt + // Enable +#define QEI_INTEN_TIMER 0x00000002 // Timer Expires Interrupt Enable +#define QEI_INTEN_INDEX 0x00000001 // Index Pulse Detected Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_RIS register. +// +//***************************************************************************** +#define QEI_RIS_ERROR 0x00000008 // Phase Error Detected +#define QEI_RIS_DIR 0x00000004 // Direction Change Detected +#define QEI_RIS_TIMER 0x00000002 // Velocity Timer Expired +#define QEI_RIS_INDEX 0x00000001 // Index Pulse Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_ISC register. +// +//***************************************************************************** +#define QEI_ISC_ERROR 0x00000008 // Phase Error Interrupt +#define QEI_ISC_DIR 0x00000004 // Direction Change Interrupt +#define QEI_ISC_TIMER 0x00000002 // Velocity Timer Expired Interrupt +#define QEI_ISC_INDEX 0x00000001 // Index Pulse Interrupt + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the QEI_ISC +// register. +// +//***************************************************************************** +#define QEI_INT_ERROR 0x00000008 // Phase error detected +#define QEI_INT_DIR 0x00000004 // Direction change +#define QEI_INT_TIMER 0x00000002 // Velocity timer expired +#define QEI_INT_INDEX 0x00000001 // Index pulse detected + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the QEI +// registers. +// +//***************************************************************************** +#define QEI_RV_POS 0x00000000 // Current position register +#define QEI_RV_LOAD 0x00000000 // Velocity timer load register +#define QEI_RV_CTL 0x00000000 // Configuration and control reg +#define QEI_RV_RIS 0x00000000 // Raw interrupt status register +#define QEI_RV_ISC 0x00000000 // Interrupt status register +#define QEI_RV_SPEED 0x00000000 // Velocity speed register +#define QEI_RV_INTEN 0x00000000 // Interrupt enable register +#define QEI_RV_STAT 0x00000000 // Status register +#define QEI_RV_COUNT 0x00000000 // Velocity pulse count register +#define QEI_RV_MAXPOS 0x00000000 // Maximum position register +#define QEI_RV_TIME 0x00000000 // Velocity timer register + +#endif + +#endif // __HW_QEI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ssi.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ssi.h new file mode 100644 index 00000000..22706961 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_ssi.h @@ -0,0 +1,217 @@ +//***************************************************************************** +// +// hw_ssi.h - Macros used when accessing the SSI hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SSI_H__ +#define __HW_SSI_H__ + +//***************************************************************************** +// +// The following are defines for the SSI register offsets. +// +//***************************************************************************** +#define SSI_O_CR0 0x00000000 // SSI Control 0 +#define SSI_O_CR1 0x00000004 // SSI Control 1 +#define SSI_O_DR 0x00000008 // SSI Data +#define SSI_O_SR 0x0000000C // SSI Status +#define SSI_O_CPSR 0x00000010 // SSI Clock Prescale +#define SSI_O_IM 0x00000014 // SSI Interrupt Mask +#define SSI_O_RIS 0x00000018 // SSI Raw Interrupt Status +#define SSI_O_MIS 0x0000001C // SSI Masked Interrupt Status +#define SSI_O_ICR 0x00000020 // SSI Interrupt Clear +#define SSI_O_DMACTL 0x00000024 // SSI DMA Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR0 register. +// +//***************************************************************************** +#define SSI_CR0_SCR_M 0x0000FF00 // SSI Serial Clock Rate +#define SSI_CR0_SPH 0x00000080 // SSI Serial Clock Phase +#define SSI_CR0_SPO 0x00000040 // SSI Serial Clock Polarity +#define SSI_CR0_FRF_M 0x00000030 // SSI Frame Format Select +#define SSI_CR0_FRF_MOTO 0x00000000 // Freescale SPI Frame Format +#define SSI_CR0_FRF_TI 0x00000010 // Texas Instruments Synchronous + // Serial Frame Format +#define SSI_CR0_FRF_NMW 0x00000020 // MICROWIRE Frame Format +#define SSI_CR0_DSS_M 0x0000000F // SSI Data Size Select +#define SSI_CR0_DSS_4 0x00000003 // 4-bit data +#define SSI_CR0_DSS_5 0x00000004 // 5-bit data +#define SSI_CR0_DSS_6 0x00000005 // 6-bit data +#define SSI_CR0_DSS_7 0x00000006 // 7-bit data +#define SSI_CR0_DSS_8 0x00000007 // 8-bit data +#define SSI_CR0_DSS_9 0x00000008 // 9-bit data +#define SSI_CR0_DSS_10 0x00000009 // 10-bit data +#define SSI_CR0_DSS_11 0x0000000A // 11-bit data +#define SSI_CR0_DSS_12 0x0000000B // 12-bit data +#define SSI_CR0_DSS_13 0x0000000C // 13-bit data +#define SSI_CR0_DSS_14 0x0000000D // 14-bit data +#define SSI_CR0_DSS_15 0x0000000E // 15-bit data +#define SSI_CR0_DSS_16 0x0000000F // 16-bit data +#define SSI_CR0_SCR_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR1 register. +// +//***************************************************************************** +#define SSI_CR1_EOT 0x00000010 // End of Transmission +#define SSI_CR1_SOD 0x00000008 // SSI Slave Mode Output Disable +#define SSI_CR1_MS 0x00000004 // SSI Master/Slave Select +#define SSI_CR1_SSE 0x00000002 // SSI Synchronous Serial Port + // Enable +#define SSI_CR1_LBM 0x00000001 // SSI Loopback Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DR register. +// +//***************************************************************************** +#define SSI_DR_DATA_M 0x0000FFFF // SSI Receive/Transmit Data +#define SSI_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_SR register. +// +//***************************************************************************** +#define SSI_SR_BSY 0x00000010 // SSI Busy Bit +#define SSI_SR_RFF 0x00000008 // SSI Receive FIFO Full +#define SSI_SR_RNE 0x00000004 // SSI Receive FIFO Not Empty +#define SSI_SR_TNF 0x00000002 // SSI Transmit FIFO Not Full +#define SSI_SR_TFE 0x00000001 // SSI Transmit FIFO Empty + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CPSR register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_M 0x000000FF // SSI Clock Prescale Divisor +#define SSI_CPSR_CPSDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_IM register. +// +//***************************************************************************** +#define SSI_IM_TXIM 0x00000008 // SSI Transmit FIFO Interrupt Mask +#define SSI_IM_RXIM 0x00000004 // SSI Receive FIFO Interrupt Mask +#define SSI_IM_RTIM 0x00000002 // SSI Receive Time-Out Interrupt + // Mask +#define SSI_IM_RORIM 0x00000001 // SSI Receive Overrun Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_RIS register. +// +//***************************************************************************** +#define SSI_RIS_TXRIS 0x00000008 // SSI Transmit FIFO Raw Interrupt + // Status +#define SSI_RIS_RXRIS 0x00000004 // SSI Receive FIFO Raw Interrupt + // Status +#define SSI_RIS_RTRIS 0x00000002 // SSI Receive Time-Out Raw + // Interrupt Status +#define SSI_RIS_RORRIS 0x00000001 // SSI Receive Overrun Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_MIS register. +// +//***************************************************************************** +#define SSI_MIS_TXMIS 0x00000008 // SSI Transmit FIFO Masked + // Interrupt Status +#define SSI_MIS_RXMIS 0x00000004 // SSI Receive FIFO Masked + // Interrupt Status +#define SSI_MIS_RTMIS 0x00000002 // SSI Receive Time-Out Masked + // Interrupt Status +#define SSI_MIS_RORMIS 0x00000001 // SSI Receive Overrun Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_ICR register. +// +//***************************************************************************** +#define SSI_ICR_RTIC 0x00000002 // SSI Receive Time-Out Interrupt + // Clear +#define SSI_ICR_RORIC 0x00000001 // SSI Receive Overrun Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DMACTL register. +// +//***************************************************************************** +#define SSI_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define SSI_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SSI_O_CR0 +// register. +// +//***************************************************************************** +#define SSI_CR0_SCR 0x0000FF00 // Serial clock rate +#define SSI_CR0_FRF_MASK 0x00000030 // Frame format mask +#define SSI_CR0_DSS 0x0000000F // Data size select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SSI_O_CPSR +// register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_MASK 0x000000FF // Clock prescale + +//***************************************************************************** +// +// The following are deprecated defines for the SSI controller's FIFO size. +// +//***************************************************************************** +#define TX_FIFO_SIZE (8) // Number of entries in the TX FIFO +#define RX_FIFO_SIZE (8) // Number of entries in the RX FIFO + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the interrupt +// mask set and clear, raw interrupt, masked interrupt, and interrupt clear +// registers. +// +//***************************************************************************** +#define SSI_INT_TXFF 0x00000008 // TX FIFO interrupt +#define SSI_INT_RXFF 0x00000004 // RX FIFO interrupt +#define SSI_INT_RXTO 0x00000002 // RX timeout interrupt +#define SSI_INT_RXOR 0x00000001 // RX overrun interrupt + +#endif + +#endif // __HW_SSI_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_sysctl.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_sysctl.h new file mode 100644 index 00000000..2bcd8c71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_sysctl.h @@ -0,0 +1,1687 @@ +//***************************************************************************** +// +// hw_sysctl.h - Macros used when accessing the system control hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_SYSCTL_H__ +#define __HW_SYSCTL_H__ + +//***************************************************************************** +// +// The following are defines for the System Control register addresses. +// +//***************************************************************************** +#define SYSCTL_DID0 0x400FE000 // Device Identification 0 +#define SYSCTL_DID1 0x400FE004 // Device Identification 1 +#define SYSCTL_DC0 0x400FE008 // Device Capabilities 0 +#define SYSCTL_DC1 0x400FE010 // Device Capabilities 1 +#define SYSCTL_DC2 0x400FE014 // Device Capabilities 2 +#define SYSCTL_DC3 0x400FE018 // Device Capabilities 3 +#define SYSCTL_DC4 0x400FE01C // Device Capabilities 4 +#define SYSCTL_DC5 0x400FE020 // Device Capabilities 5 +#define SYSCTL_DC6 0x400FE024 // Device Capabilities 6 +#define SYSCTL_DC7 0x400FE028 // Device Capabilities 7 +#define SYSCTL_DC8 0x400FE02C // Device Capabilities 8 ADC + // Channels +#define SYSCTL_PBORCTL 0x400FE030 // Brown-Out Reset Control +#define SYSCTL_LDOPCTL 0x400FE034 // LDO Power Control +#define SYSCTL_SRCR0 0x400FE040 // Software Reset Control 0 +#define SYSCTL_SRCR1 0x400FE044 // Software Reset Control 1 +#define SYSCTL_SRCR2 0x400FE048 // Software Reset Control 2 +#define SYSCTL_RIS 0x400FE050 // Raw Interrupt Status +#define SYSCTL_IMC 0x400FE054 // Interrupt Mask Control +#define SYSCTL_MISC 0x400FE058 // Masked Interrupt Status and + // Clear +#define SYSCTL_RESC 0x400FE05C // Reset Cause +#define SYSCTL_RCC 0x400FE060 // Run-Mode Clock Configuration +#define SYSCTL_PLLCFG 0x400FE064 // XTAL to PLL Translation +#define SYSCTL_GPIOHBCTL 0x400FE06C // GPIO High-Performance Bus + // Control +#define SYSCTL_RCC2 0x400FE070 // Run-Mode Clock Configuration 2 +#define SYSCTL_MOSCCTL 0x400FE07C // Main Oscillator Control +#define SYSCTL_RCGC0 0x400FE100 // Run Mode Clock Gating Control + // Register 0 +#define SYSCTL_RCGC1 0x400FE104 // Run Mode Clock Gating Control + // Register 1 +#define SYSCTL_RCGC2 0x400FE108 // Run Mode Clock Gating Control + // Register 2 +#define SYSCTL_SCGC0 0x400FE110 // Sleep Mode Clock Gating Control + // Register 0 +#define SYSCTL_SCGC1 0x400FE114 // Sleep Mode Clock Gating Control + // Register 1 +#define SYSCTL_SCGC2 0x400FE118 // Sleep Mode Clock Gating Control + // Register 2 +#define SYSCTL_DCGC0 0x400FE120 // Deep Sleep Mode Clock Gating + // Control Register 0 +#define SYSCTL_DCGC1 0x400FE124 // Deep-Sleep Mode Clock Gating + // Control Register 1 +#define SYSCTL_DCGC2 0x400FE128 // Deep Sleep Mode Clock Gating + // Control Register 2 +#define SYSCTL_DSLPCLKCFG 0x400FE144 // Deep Sleep Clock Configuration +#define SYSCTL_PIOSCCAL 0x400FE150 // Precision Internal Oscillator + // Calibration +#define SYSCTL_CLKVCLR 0x400FE150 // Clock Verification Clear +#define SYSCTL_PIOSCSTAT 0x400FE154 // Precision Internal Oscillator + // Statistics +#define SYSCTL_LDOARST 0x400FE160 // Allow Unregulated LDO to Reset + // the Part +#define SYSCTL_I2SMCLKCFG 0x400FE170 // I2S MCLK Configuration +#define SYSCTL_DC9 0x400FE190 // Device Capabilities 9 ADC + // Digital Comparators +#define SYSCTL_NVMSTAT 0x400FE1A0 // Non-Volatile Memory Information + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_0 0x00000000 // Initial DID0 register format + // definition for Stellaris(R) + // Sandstorm-class devices +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_SANDSTORM \ + 0x00000000 // Sandstorm-class Device +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_CLASS_DUSTDEVIL \ + 0x00030000 // Stellaris(R) DustDevil-class + // devices +#define SYSCTL_DID0_CLASS_TEMPEST \ + 0x00040000 // Stellaris(R) Tempest-class + // microcontrollers +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change +#define SYSCTL_DID0_MIN_3 0x00000003 // Minor revision 3 +#define SYSCTL_DID0_MIN_4 0x00000004 // Minor revision 4 +#define SYSCTL_DID0_MIN_5 0x00000005 // Minor revision 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_0 0x00000000 // Initial DID1 register format + // definition, indicating a + // Stellaris LM3Snnn device +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_101 0x00010000 // LM3S101 +#define SYSCTL_DID1_PRTNO_102 0x00020000 // LM3S102 +#define SYSCTL_DID1_PRTNO_300 0x00190000 // LM3S300 +#define SYSCTL_DID1_PRTNO_301 0x00110000 // LM3S301 +#define SYSCTL_DID1_PRTNO_308 0x001A0000 // LM3S308 +#define SYSCTL_DID1_PRTNO_310 0x00120000 // LM3S310 +#define SYSCTL_DID1_PRTNO_315 0x00130000 // LM3S315 +#define SYSCTL_DID1_PRTNO_316 0x00140000 // LM3S316 +#define SYSCTL_DID1_PRTNO_317 0x00170000 // LM3S317 +#define SYSCTL_DID1_PRTNO_328 0x00150000 // LM3S328 +#define SYSCTL_DID1_PRTNO_600 0x002A0000 // LM3S600 +#define SYSCTL_DID1_PRTNO_601 0x00210000 // LM3S601 +#define SYSCTL_DID1_PRTNO_608 0x002B0000 // LM3S608 +#define SYSCTL_DID1_PRTNO_610 0x00220000 // LM3S610 +#define SYSCTL_DID1_PRTNO_611 0x00230000 // LM3S611 +#define SYSCTL_DID1_PRTNO_612 0x00240000 // LM3S612 +#define SYSCTL_DID1_PRTNO_613 0x00250000 // LM3S613 +#define SYSCTL_DID1_PRTNO_615 0x00260000 // LM3S615 +#define SYSCTL_DID1_PRTNO_617 0x00280000 // LM3S617 +#define SYSCTL_DID1_PRTNO_618 0x00290000 // LM3S618 +#define SYSCTL_DID1_PRTNO_628 0x00270000 // LM3S628 +#define SYSCTL_DID1_PRTNO_800 0x00380000 // LM3S800 +#define SYSCTL_DID1_PRTNO_801 0x00310000 // LM3S801 +#define SYSCTL_DID1_PRTNO_808 0x00390000 // LM3S808 +#define SYSCTL_DID1_PRTNO_811 0x00320000 // LM3S811 +#define SYSCTL_DID1_PRTNO_812 0x00330000 // LM3S812 +#define SYSCTL_DID1_PRTNO_815 0x00340000 // LM3S815 +#define SYSCTL_DID1_PRTNO_817 0x00360000 // LM3S817 +#define SYSCTL_DID1_PRTNO_818 0x00370000 // LM3S818 +#define SYSCTL_DID1_PRTNO_828 0x00350000 // LM3S828 +#define SYSCTL_DID1_PRTNO_1110 0x00BF0000 // LM3S1110 +#define SYSCTL_DID1_PRTNO_1133 0x00C30000 // LM3S1133 +#define SYSCTL_DID1_PRTNO_1138 0x00C50000 // LM3S1138 +#define SYSCTL_DID1_PRTNO_1150 0x00C10000 // LM3S1150 +#define SYSCTL_DID1_PRTNO_1162 0x00C40000 // LM3S1162 +#define SYSCTL_DID1_PRTNO_1165 0x00C20000 // LM3S1165 +#define SYSCTL_DID1_PRTNO_1332 0x00C60000 // LM3S1332 +#define SYSCTL_DID1_PRTNO_1435 0x00BC0000 // LM3S1435 +#define SYSCTL_DID1_PRTNO_1439 0x00BA0000 // LM3S1439 +#define SYSCTL_DID1_PRTNO_1512 0x00BB0000 // LM3S1512 +#define SYSCTL_DID1_PRTNO_1538 0x00C70000 // LM3S1538 +#define SYSCTL_DID1_PRTNO_1601 0x00DB0000 // LM3S1601 +#define SYSCTL_DID1_PRTNO_1607 0x00060000 // LM3S1607 +#define SYSCTL_DID1_PRTNO_1608 0x00DA0000 // LM3S1608 +#define SYSCTL_DID1_PRTNO_1620 0x00C00000 // LM3S1620 +#define SYSCTL_DID1_PRTNO_1625 0x00030000 // LM3S1625 +#define SYSCTL_DID1_PRTNO_1626 0x00040000 // LM3S1626 +#define SYSCTL_DID1_PRTNO_1627 0x00050000 // LM3S1627 +#define SYSCTL_DID1_PRTNO_1635 0x00B30000 // LM3S1635 +#define SYSCTL_DID1_PRTNO_1637 0x00BD0000 // LM3S1637 +#define SYSCTL_DID1_PRTNO_1651 0x00B10000 // LM3S1651 +#define SYSCTL_DID1_PRTNO_1751 0x00B90000 // LM3S1751 +#define SYSCTL_DID1_PRTNO_1776 0x00100000 // LM3S1776 +#define SYSCTL_DID1_PRTNO_1811 0x00160000 // LM3S1811 +#define SYSCTL_DID1_PRTNO_1816 0x003D0000 // LM3S1816 +#define SYSCTL_DID1_PRTNO_1850 0x00B40000 // LM3S1850 +#define SYSCTL_DID1_PRTNO_1911 0x00DD0000 // LM3S1911 +#define SYSCTL_DID1_PRTNO_1918 0x00DC0000 // LM3S1918 +#define SYSCTL_DID1_PRTNO_1937 0x00B70000 // LM3S1937 +#define SYSCTL_DID1_PRTNO_1958 0x00BE0000 // LM3S1958 +#define SYSCTL_DID1_PRTNO_1960 0x00B50000 // LM3S1960 +#define SYSCTL_DID1_PRTNO_1968 0x00B80000 // LM3S1968 +#define SYSCTL_DID1_PRTNO_1J11 0x000F0000 // LM3S1J11 +#define SYSCTL_DID1_PRTNO_1J16 0x003C0000 // LM3S1J16 +#define SYSCTL_DID1_PRTNO_1N11 0x000E0000 // LM3S1N11 +#define SYSCTL_DID1_PRTNO_1N16 0x003B0000 // LM3S1N16 +#define SYSCTL_DID1_PRTNO_1P51 0x00B20000 // LM3S1P51 +#define SYSCTL_DID1_PRTNO_1R21 0x009E0000 // LM3S1R21 +#define SYSCTL_DID1_PRTNO_1W16 0x00300000 // LM3S1W16 +#define SYSCTL_DID1_PRTNO_1Z16 0x002F0000 // LM3S1Z16 +#define SYSCTL_DID1_PRTNO_2110 0x00510000 // LM3S2110 +#define SYSCTL_DID1_PRTNO_2139 0x00840000 // LM3S2139 +#define SYSCTL_DID1_PRTNO_2276 0x00390000 // LM3S2276 +#define SYSCTL_DID1_PRTNO_2410 0x00A20000 // LM3S2410 +#define SYSCTL_DID1_PRTNO_2412 0x00590000 // LM3S2412 +#define SYSCTL_DID1_PRTNO_2432 0x00560000 // LM3S2432 +#define SYSCTL_DID1_PRTNO_2533 0x005A0000 // LM3S2533 +#define SYSCTL_DID1_PRTNO_2601 0x00E10000 // LM3S2601 +#define SYSCTL_DID1_PRTNO_2608 0x00E00000 // LM3S2608 +#define SYSCTL_DID1_PRTNO_2616 0x00330000 // LM3S2616 +#define SYSCTL_DID1_PRTNO_2620 0x00570000 // LM3S2620 +#define SYSCTL_DID1_PRTNO_2637 0x00850000 // LM3S2637 +#define SYSCTL_DID1_PRTNO_2651 0x00530000 // LM3S2651 +#define SYSCTL_DID1_PRTNO_2671 0x00800000 // LM3S2671 +#define SYSCTL_DID1_PRTNO_2678 0x00500000 // LM3S2678 +#define SYSCTL_DID1_PRTNO_2730 0x00A40000 // LM3S2730 +#define SYSCTL_DID1_PRTNO_2739 0x00520000 // LM3S2739 +#define SYSCTL_DID1_PRTNO_2776 0x003A0000 // LM3S2776 +#define SYSCTL_DID1_PRTNO_2793 0x006D0000 // LM3S2793 +#define SYSCTL_DID1_PRTNO_2911 0x00E30000 // LM3S2911 +#define SYSCTL_DID1_PRTNO_2918 0x00E20000 // LM3S2918 +#define SYSCTL_DID1_PRTNO_2939 0x00540000 // LM3S2939 +#define SYSCTL_DID1_PRTNO_2948 0x008F0000 // LM3S2948 +#define SYSCTL_DID1_PRTNO_2950 0x00580000 // LM3S2950 +#define SYSCTL_DID1_PRTNO_2965 0x00550000 // LM3S2965 +#define SYSCTL_DID1_PRTNO_2B93 0x006C0000 // LM3S2B93 +#define SYSCTL_DID1_PRTNO_3634 0x00080000 // LM3S3634 +#define SYSCTL_DID1_PRTNO_3651 0x00430000 // LM3S3651 +#define SYSCTL_DID1_PRTNO_3739 0x00440000 // LM3S3739 +#define SYSCTL_DID1_PRTNO_3748 0x00490000 // LM3S3748 +#define SYSCTL_DID1_PRTNO_3749 0x00450000 // LM3S3749 +#define SYSCTL_DID1_PRTNO_3826 0x00420000 // LM3S3826 +#define SYSCTL_DID1_PRTNO_3J26 0x00410000 // LM3S3J26 +#define SYSCTL_DID1_PRTNO_3N26 0x00400000 // LM3S3N26 +#define SYSCTL_DID1_PRTNO_3W26 0x003F0000 // LM3S3W26 +#define SYSCTL_DID1_PRTNO_3Z26 0x003E0000 // LM3S3Z26 +#define SYSCTL_DID1_PRTNO_5632 0x00810000 // LM3S5632 +#define SYSCTL_DID1_PRTNO_5651 0x000C0000 // LM3S5651 +#define SYSCTL_DID1_PRTNO_5652 0x008A0000 // LM3S5652 +#define SYSCTL_DID1_PRTNO_5656 0x004D0000 // LM3S5656 +#define SYSCTL_DID1_PRTNO_5662 0x00910000 // LM3S5662 +#define SYSCTL_DID1_PRTNO_5732 0x00960000 // LM3S5732 +#define SYSCTL_DID1_PRTNO_5737 0x00970000 // LM3S5737 +#define SYSCTL_DID1_PRTNO_5739 0x00A00000 // LM3S5739 +#define SYSCTL_DID1_PRTNO_5747 0x00990000 // LM3S5747 +#define SYSCTL_DID1_PRTNO_5749 0x00A70000 // LM3S5749 +#define SYSCTL_DID1_PRTNO_5752 0x009A0000 // LM3S5752 +#define SYSCTL_DID1_PRTNO_5762 0x009C0000 // LM3S5762 +#define SYSCTL_DID1_PRTNO_5791 0x00690000 // LM3S5791 +#define SYSCTL_DID1_PRTNO_5951 0x000B0000 // LM3S5951 +#define SYSCTL_DID1_PRTNO_5956 0x004E0000 // LM3S5956 +#define SYSCTL_DID1_PRTNO_5B91 0x00680000 // LM3S5B91 +#define SYSCTL_DID1_PRTNO_5K31 0x00090000 // LM3S5K31 +#define SYSCTL_DID1_PRTNO_5K36 0x004A0000 // LM3S5K36 +#define SYSCTL_DID1_PRTNO_5P31 0x000A0000 // LM3S5P31 +#define SYSCTL_DID1_PRTNO_5P36 0x00480000 // LM3S5P36 +#define SYSCTL_DID1_PRTNO_5P51 0x000D0000 // LM3S5P51 +#define SYSCTL_DID1_PRTNO_5P56 0x004C0000 // LM3S5P56 +#define SYSCTL_DID1_PRTNO_5R31 0x00070000 // LM3S5R31 +#define SYSCTL_DID1_PRTNO_5R36 0x004B0000 // LM3S5R36 +#define SYSCTL_DID1_PRTNO_5T36 0x00470000 // LM3S5T36 +#define SYSCTL_DID1_PRTNO_5Y36 0x00460000 // LM3S5Y36 +#define SYSCTL_DID1_PRTNO_6100 0x00A10000 // LM3S6100 +#define SYSCTL_DID1_PRTNO_6110 0x00740000 // LM3S6110 +#define SYSCTL_DID1_PRTNO_6420 0x00A50000 // LM3S6420 +#define SYSCTL_DID1_PRTNO_6422 0x00820000 // LM3S6422 +#define SYSCTL_DID1_PRTNO_6432 0x00750000 // LM3S6432 +#define SYSCTL_DID1_PRTNO_6537 0x00760000 // LM3S6537 +#define SYSCTL_DID1_PRTNO_6610 0x00710000 // LM3S6610 +#define SYSCTL_DID1_PRTNO_6611 0x00E70000 // LM3S6611 +#define SYSCTL_DID1_PRTNO_6618 0x00E60000 // LM3S6618 +#define SYSCTL_DID1_PRTNO_6633 0x00830000 // LM3S6633 +#define SYSCTL_DID1_PRTNO_6637 0x008B0000 // LM3S6637 +#define SYSCTL_DID1_PRTNO_6730 0x00A30000 // LM3S6730 +#define SYSCTL_DID1_PRTNO_6753 0x00770000 // LM3S6753 +#define SYSCTL_DID1_PRTNO_6911 0x00E90000 // LM3S6911 +#define SYSCTL_DID1_PRTNO_6918 0x00E80000 // LM3S6918 +#define SYSCTL_DID1_PRTNO_6938 0x00890000 // LM3S6938 +#define SYSCTL_DID1_PRTNO_6950 0x00720000 // LM3S6950 +#define SYSCTL_DID1_PRTNO_6952 0x00780000 // LM3S6952 +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PRTNO_8530 0x00640000 // LM3S8530 +#define SYSCTL_DID1_PRTNO_8538 0x008E0000 // LM3S8538 +#define SYSCTL_DID1_PRTNO_8630 0x00610000 // LM3S8630 +#define SYSCTL_DID1_PRTNO_8730 0x00630000 // LM3S8730 +#define SYSCTL_DID1_PRTNO_8733 0x008D0000 // LM3S8733 +#define SYSCTL_DID1_PRTNO_8738 0x00860000 // LM3S8738 +#define SYSCTL_DID1_PRTNO_8930 0x00650000 // LM3S8930 +#define SYSCTL_DID1_PRTNO_8933 0x008C0000 // LM3S8933 +#define SYSCTL_DID1_PRTNO_8938 0x00880000 // LM3S8938 +#define SYSCTL_DID1_PRTNO_8962 0x00A60000 // LM3S8962 +#define SYSCTL_DID1_PRTNO_8970 0x00620000 // LM3S8970 +#define SYSCTL_DID1_PRTNO_8971 0x00D70000 // LM3S8971 +#define SYSCTL_DID1_PRTNO_9790 0x00670000 // LM3S9790 +#define SYSCTL_DID1_PRTNO_9792 0x006B0000 // LM3S9792 +#define SYSCTL_DID1_PRTNO_9997 0x00200000 // LM3S9997 +#define SYSCTL_DID1_PRTNO_9B90 0x00660000 // LM3S9B90 +#define SYSCTL_DID1_PRTNO_9B92 0x006A0000 // LM3S9B92 +#define SYSCTL_DID1_PRTNO_9B95 0x006E0000 // LM3S9B95 +#define SYSCTL_DID1_PRTNO_9B96 0x006F0000 // LM3S9B96 +#define SYSCTL_DID1_PRTNO_9L97 0x00180000 // LM3S9L97 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_28 0x00000000 // 28 pin package +#define SYSCTL_DID1_PINCNT_48 0x00002000 // 48-pin package +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_PINCNT_64 0x00006000 // 64-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_PKG_QFN 0x00000018 // QFN package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified +#define SYSCTL_DID1_PRTNO_S 16 // Part number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_2KB 0x00070000 // 2 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_4KB 0x000F0000 // 4 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_6KB 0x00170000 // 6 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_8KB 0x001F0000 // 8 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_12KB 0x002F0000 // 12 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_16KB 0x003F0000 // 16 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_20KB 0x004F0000 // 20 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_24KB 0x005F0000 // 24 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_32KB 0x007F0000 // 32 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_SRAMSZ_96KB 0x017F0000 // 96 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_8KB 0x00000003 // 8 KB of Flash +#define SYSCTL_DC0_FLASHSZ_16KB 0x00000007 // 16 KB of Flash +#define SYSCTL_DC0_FLASHSZ_32KB 0x0000000F // 32 KB of Flash +#define SYSCTL_DC0_FLASHSZ_64KB 0x0000001F // 64 KB of Flash +#define SYSCTL_DC0_FLASHSZ_96KB 0x0000002F // 96 KB of Flash +#define SYSCTL_DC0_FLASHSZ_128K 0x0000003F // 128 KB of Flash +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT1 0x10000000 // Watchdog Timer1 Present +#define SYSCTL_DC1_CAN2 0x04000000 // CAN Module 2 Present +#define SYSCTL_DC1_CAN1 0x02000000 // CAN Module 1 Present +#define SYSCTL_DC1_CAN0 0x01000000 // CAN Module 0 Present +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC1 0x00020000 // ADC Module 1 Present +#define SYSCTL_DC1_ADC0 0x00010000 // ADC Module 0 Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_100 \ + 0x00001000 // Divide VCO (400MHZ) by 5 minimum +#define SYSCTL_DC1_MINSYSDIV_66 0x00002000 // Divide VCO (400MHZ) by 2*2 + 2 = + // 6 minimum +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_MINSYSDIV_25 0x00007000 // Specifies a 25-MHz clock with a + // PLL divider of 8 +#define SYSCTL_DC1_MINSYSDIV_20 0x00009000 // Specifies a 20-MHz clock with a + // PLL divider of 10 +#define SYSCTL_DC1_ADCSPD_M 0x00000F00 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_DC1_ADCSPD_250K 0x00000100 // 250K samples/second +#define SYSCTL_DC1_ADCSPD_500K 0x00000200 // 500K samples/second +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_ADC1SPD_M 0x00000C00 // Max ADC1 Speed +#define SYSCTL_DC1_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_DC1_ADC0SPD_M 0x00000300 // Max ADC0 Speed +#define SYSCTL_DC1_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_EPI0 0x40000000 // EPI Module 0 Present +#define SYSCTL_DC2_I2S0 0x10000000 // I2S Module 0 Present +#define SYSCTL_DC2_COMP2 0x04000000 // Analog Comparator 2 Present +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI1 0x00000020 // SSI Module 1 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP5 0x20000000 // CCP5 Pin Present +#define SYSCTL_DC3_CCP4 0x10000000 // CCP4 Pin Present +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC0AIN7 0x00800000 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC3_ADC0AIN6 0x00400000 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC3_ADC0AIN5 0x00200000 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC3_ADC0AIN4 0x00100000 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC3_ADC0AIN3 0x00080000 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC3_ADC0AIN2 0x00040000 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC3_ADC0AIN1 0x00020000 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC3_ADC0AIN0 0x00010000 // ADC Module 0 AIN0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C2O 0x00004000 // C2o Pin Present +#define SYSCTL_DC3_C2PLUS 0x00002000 // C2+ Pin Present +#define SYSCTL_DC3_C2MINUS 0x00001000 // C2- Pin Present +#define SYSCTL_DC3_C1O 0x00000800 // C1o Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_ETH 0x50000000 // Ethernet present +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_E1588 0x01000000 // 1588 Capable +#define SYSCTL_DC4_PICAL 0x00040000 // PIOSC Calibrate +#define SYSCTL_DC4_CCP7 0x00008000 // CCP7 Pin Present +#define SYSCTL_DC4_CCP6 0x00004000 // CCP6 Pin Present +#define SYSCTL_DC4_UDMA 0x00002000 // Micro-DMA Module Present +#define SYSCTL_DC4_ROM 0x00001000 // Internal Code ROM Present +#define SYSCTL_DC4_GPIOJ 0x00000100 // GPIO Port J Present +#define SYSCTL_DC4_GPIOH 0x00000080 // GPIO Port H Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC5 register. +// +//***************************************************************************** +#define SYSCTL_DC5_PWMFAULT3 0x08000000 // PWM Fault 3 Pin Present +#define SYSCTL_DC5_PWMFAULT2 0x04000000 // PWM Fault 2 Pin Present +#define SYSCTL_DC5_PWMFAULT1 0x02000000 // PWM Fault 1 Pin Present +#define SYSCTL_DC5_PWMFAULT0 0x01000000 // PWM Fault 0 Pin Present +#define SYSCTL_DC5_PWMEFLT 0x00200000 // PWM Extended Fault Active +#define SYSCTL_DC5_PWMESYNC 0x00100000 // PWM Extended SYNC Active +#define SYSCTL_DC5_PWM7 0x00000080 // PWM7 Pin Present +#define SYSCTL_DC5_PWM6 0x00000040 // PWM6 Pin Present +#define SYSCTL_DC5_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC5_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC5_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC5_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC5_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC5_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC6 register. +// +//***************************************************************************** +#define SYSCTL_DC6_USB0PHY 0x00000010 // USB Module 0 PHY Present +#define SYSCTL_DC6_USB0_M 0x00000003 // USB Module 0 Present +#define SYSCTL_DC6_USB0_DEV 0x00000001 // USB0 is Device Only +#define SYSCTL_DC6_USB0_HOSTDEV 0x00000002 // USB is Device or Host +#define SYSCTL_DC6_USB0_OTG 0x00000003 // USB0 is OTG + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC7 register. +// +//***************************************************************************** +#define SYSCTL_DC7_SW 0x40000000 // Software transfer on uDMA Ch30 +#define SYSCTL_DC7_DMACH30 0x40000000 // SW +#define SYSCTL_DC7_DMACH29 0x20000000 // I2S0_TX / CAN1_TX +#define SYSCTL_DC7_DMACH28 0x10000000 // I2S0_RX / CAN1_RX +#define SYSCTL_DC7_DMACH27 0x08000000 // CAN1_TX / ADC1_SS3 +#define SYSCTL_DC7_DMACH26 0x04000000 // CAN1_RX / ADC1_SS2 +#define SYSCTL_DC7_DMACH25 0x02000000 // SSI1_TX / ADC1_SS1 +#define SYSCTL_DC7_SSI1_TX 0x02000000 // SSI1 TX on uDMA Ch25 +#define SYSCTL_DC7_SSI1_RX 0x01000000 // SSI1 RX on uDMA Ch24 +#define SYSCTL_DC7_DMACH24 0x01000000 // SSI1_RX / ADC1_SS0 +#define SYSCTL_DC7_UART1_TX 0x00800000 // UART1 TX on uDMA Ch23 +#define SYSCTL_DC7_DMACH23 0x00800000 // UART1_TX / CAN2_TX +#define SYSCTL_DC7_DMACH22 0x00400000 // UART1_RX / CAN2_RX +#define SYSCTL_DC7_UART1_RX 0x00400000 // UART1 RX on uDMA Ch22 +#define SYSCTL_DC7_DMACH21 0x00200000 // Timer1B / EPI0_WFIFO +#define SYSCTL_DC7_DMACH20 0x00100000 // Timer1A / EPI0_NBRFIFO +#define SYSCTL_DC7_DMACH19 0x00080000 // Timer0B / Timer1B +#define SYSCTL_DC7_DMACH18 0x00040000 // Timer0A / Timer1A +#define SYSCTL_DC7_DMACH17 0x00020000 // ADC0_SS3 +#define SYSCTL_DC7_DMACH16 0x00010000 // ADC0_SS2 +#define SYSCTL_DC7_DMACH15 0x00008000 // ADC0_SS1 / Timer2B +#define SYSCTL_DC7_DMACH14 0x00004000 // ADC0_SS0 / Timer2A +#define SYSCTL_DC7_DMACH13 0x00002000 // CAN0_TX / UART2_TX +#define SYSCTL_DC7_DMACH12 0x00001000 // CAN0_RX / UART2_RX +#define SYSCTL_DC7_SSI0_TX 0x00000800 // SSI0 TX on uDMA Ch11 +#define SYSCTL_DC7_DMACH11 0x00000800 // SSI0_TX / SSI1_TX +#define SYSCTL_DC7_SSI0_RX 0x00000400 // SSI0 RX on uDMA Ch10 +#define SYSCTL_DC7_DMACH10 0x00000400 // SSI0_RX / SSI1_RX +#define SYSCTL_DC7_UART0_TX 0x00000200 // UART0 TX on uDMA Ch9 +#define SYSCTL_DC7_DMACH9 0x00000200 // UART0_TX / UART1_TX +#define SYSCTL_DC7_DMACH8 0x00000100 // UART0_RX / UART1_RX +#define SYSCTL_DC7_UART0_RX 0x00000100 // UART0 RX on uDMA Ch8 +#define SYSCTL_DC7_DMACH7 0x00000080 // ETH_TX / Timer2B +#define SYSCTL_DC7_DMACH6 0x00000040 // ETH_RX / Timer2A +#define SYSCTL_DC7_DMACH5 0x00000020 // USB_EP3_TX / Timer2B +#define SYSCTL_DC7_USB_EP3_TX 0x00000020 // USB EP3 TX on uDMA Ch5 +#define SYSCTL_DC7_USB_EP3_RX 0x00000010 // USB EP3 RX on uDMA Ch4 +#define SYSCTL_DC7_DMACH4 0x00000010 // USB_EP3_RX / Timer2A +#define SYSCTL_DC7_USB_EP2_TX 0x00000008 // USB EP2 TX on uDMA Ch3 +#define SYSCTL_DC7_DMACH3 0x00000008 // USB_EP2_TX / Timer3B +#define SYSCTL_DC7_USB_EP2_RX 0x00000004 // USB EP2 RX on uDMA Ch2 +#define SYSCTL_DC7_DMACH2 0x00000004 // USB_EP2_RX / Timer3A +#define SYSCTL_DC7_USB_EP1_TX 0x00000002 // USB EP1 TX on uDMA Ch1 +#define SYSCTL_DC7_DMACH1 0x00000002 // USB_EP1_TX / UART2_TX +#define SYSCTL_DC7_DMACH0 0x00000001 // USB_EP1_RX / UART2_RX +#define SYSCTL_DC7_USB_EP1_RX 0x00000001 // USB EP1 RX on uDMA Ch0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC8 register. +// +//***************************************************************************** +#define SYSCTL_DC8_ADC1AIN15 0x80000000 // ADC Module 1 AIN15 Pin Present +#define SYSCTL_DC8_ADC1AIN14 0x40000000 // ADC Module 1 AIN14 Pin Present +#define SYSCTL_DC8_ADC1AIN13 0x20000000 // ADC Module 1 AIN13 Pin Present +#define SYSCTL_DC8_ADC1AIN12 0x10000000 // ADC Module 1 AIN12 Pin Present +#define SYSCTL_DC8_ADC1AIN11 0x08000000 // ADC Module 1 AIN11 Pin Present +#define SYSCTL_DC8_ADC1AIN10 0x04000000 // ADC Module 1 AIN10 Pin Present +#define SYSCTL_DC8_ADC1AIN9 0x02000000 // ADC Module 1 AIN9 Pin Present +#define SYSCTL_DC8_ADC1AIN8 0x01000000 // ADC Module 1 AIN8 Pin Present +#define SYSCTL_DC8_ADC1AIN7 0x00800000 // ADC Module 1 AIN7 Pin Present +#define SYSCTL_DC8_ADC1AIN6 0x00400000 // ADC Module 1 AIN6 Pin Present +#define SYSCTL_DC8_ADC1AIN5 0x00200000 // ADC Module 1 AIN5 Pin Present +#define SYSCTL_DC8_ADC1AIN4 0x00100000 // ADC Module 1 AIN4 Pin Present +#define SYSCTL_DC8_ADC1AIN3 0x00080000 // ADC Module 1 AIN3 Pin Present +#define SYSCTL_DC8_ADC1AIN2 0x00040000 // ADC Module 1 AIN2 Pin Present +#define SYSCTL_DC8_ADC1AIN1 0x00020000 // ADC Module 1 AIN1 Pin Present +#define SYSCTL_DC8_ADC1AIN0 0x00010000 // ADC Module 1 AIN0 Pin Present +#define SYSCTL_DC8_ADC0AIN15 0x00008000 // ADC Module 0 AIN15 Pin Present +#define SYSCTL_DC8_ADC0AIN14 0x00004000 // ADC Module 0 AIN14 Pin Present +#define SYSCTL_DC8_ADC0AIN13 0x00002000 // ADC Module 0 AIN13 Pin Present +#define SYSCTL_DC8_ADC0AIN12 0x00001000 // ADC Module 0 AIN12 Pin Present +#define SYSCTL_DC8_ADC0AIN11 0x00000800 // ADC Module 0 AIN11 Pin Present +#define SYSCTL_DC8_ADC0AIN10 0x00000400 // ADC Module 0 AIN10 Pin Present +#define SYSCTL_DC8_ADC0AIN9 0x00000200 // ADC Module 0 AIN9 Pin Present +#define SYSCTL_DC8_ADC0AIN8 0x00000100 // ADC Module 0 AIN8 Pin Present +#define SYSCTL_DC8_ADC0AIN7 0x00000080 // ADC Module 0 AIN7 Pin Present +#define SYSCTL_DC8_ADC0AIN6 0x00000040 // ADC Module 0 AIN6 Pin Present +#define SYSCTL_DC8_ADC0AIN5 0x00000020 // ADC Module 0 AIN5 Pin Present +#define SYSCTL_DC8_ADC0AIN4 0x00000010 // ADC Module 0 AIN4 Pin Present +#define SYSCTL_DC8_ADC0AIN3 0x00000008 // ADC Module 0 AIN3 Pin Present +#define SYSCTL_DC8_ADC0AIN2 0x00000004 // ADC Module 0 AIN2 Pin Present +#define SYSCTL_DC8_ADC0AIN1 0x00000002 // ADC Module 0 AIN1 Pin Present +#define SYSCTL_DC8_ADC0AIN0 0x00000001 // ADC Module 0 AIN0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORTIM_M 0x0000FFFC // BOR Time Delay +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset +#define SYSCTL_PBORCTL_BORWT 0x00000001 // BOR Wait and Check for Noise +#define SYSCTL_PBORCTL_BORTIM_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_WDT1 0x10000000 // WDT1 Reset Control +#define SYSCTL_SRCR0_CAN2 0x04000000 // CAN2 Reset Control +#define SYSCTL_SRCR0_CAN1 0x02000000 // CAN1 Reset Control +#define SYSCTL_SRCR0_CAN0 0x01000000 // CAN0 Reset Control +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC1 0x00020000 // ADC1 Reset Control +#define SYSCTL_SRCR0_ADC0 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT0 0x00000008 // WDT0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_EPI0 0x40000000 // EPI0 Reset Control +#define SYSCTL_SRCR1_I2S0 0x10000000 // I2S0 Reset Control +#define SYSCTL_SRCR1_COMP2 0x04000000 // Analog Comp 2 Reset Control +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI1 0x00000020 // SSI1 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_USB0 0x00010000 // USB0 Reset Control +#define SYSCTL_SRCR2_UDMA 0x00002000 // Micro-DMA Reset Control +#define SYSCTL_SRCR2_GPIOJ 0x00000100 // Port J Reset Control +#define SYSCTL_SRCR2_GPIOH 0x00000080 // Port H Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_MOSCPUPRIS 0x00000100 // MOSC Power Up Raw Interrupt + // Status +#define SYSCTL_RIS_USBPLLLRIS 0x00000080 // USB PLL Lock Raw Interrupt + // Status +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_CLRIS 0x00000020 // Current Limit Raw Interrupt + // Status +#define SYSCTL_RIS_IOFRIS 0x00000010 // Internal Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_MOFRIS 0x00000008 // Main Oscillator Fault Raw + // Interrupt Status +#define SYSCTL_RIS_LDORIS 0x00000004 // LDO Power Unregulated Raw + // Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status +#define SYSCTL_RIS_PLLFRIS 0x00000001 // PLL Fault Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_MOSCPUPIM 0x00000100 // MOSC Power Up Interrupt Mask +#define SYSCTL_IMC_USBPLLLIM 0x00000080 // USB PLL Lock Interrupt Mask +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_CLIM 0x00000020 // Current Limit Interrupt Mask +#define SYSCTL_IMC_IOFIM 0x00000010 // Internal Oscillator Fault + // Interrupt Mask +#define SYSCTL_IMC_MOFIM 0x00000008 // Main Oscillator Fault Interrupt + // Mask +#define SYSCTL_IMC_LDOIM 0x00000004 // LDO Power Unregulated Interrupt + // Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask +#define SYSCTL_IMC_PLLFIM 0x00000001 // PLL Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_MOSCPUPMIS 0x00000100 // MOSC Power Up Masked Interrupt + // Status +#define SYSCTL_MISC_USBPLLLMIS 0x00000080 // USB PLL Lock Masked Interrupt + // Status +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_CLMIS 0x00000020 // Current Limit Masked Interrupt + // Status +#define SYSCTL_MISC_IOFMIS 0x00000010 // Internal Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_MOFMIS 0x00000008 // Main Oscillator Fault Masked + // Interrupt Status +#define SYSCTL_MISC_LDOMIS 0x00000004 // LDO Power Unregulated Masked + // Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_MOSCFAIL 0x00010000 // MOSC Failure Reset +#define SYSCTL_RESC_LDO 0x00000020 // LDO Reset +#define SYSCTL_RESC_WDT1 0x00000020 // Watchdog Timer 1 Reset +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT0 0x00000008 // Watchdog Timer 0 Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_OEN 0x00001000 // PLL Output Enable +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000007C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_XTAL_10MHZ 0x00000400 // 10 MHz +#define SYSCTL_RCC_XTAL_12MHZ 0x00000440 // 12 MHz +#define SYSCTL_RCC_XTAL_12_2MHZ 0x00000480 // 12.288 MHz +#define SYSCTL_RCC_XTAL_13_5MHZ 0x000004C0 // 13.56 MHz +#define SYSCTL_RCC_XTAL_14_3MHZ 0x00000500 // 14.31818 MHz +#define SYSCTL_RCC_XTAL_16MHZ 0x00000540 // 16 MHz +#define SYSCTL_RCC_XTAL_16_3MHZ 0x00000580 // 16.384 MHz +#define SYSCTL_RCC_PLLVER 0x00000400 // PLL Verification +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCVER 0x00000008 // Internal Oscillator Verification + // Timer +#define SYSCTL_RCC_MOSCVER 0x00000004 // Main Oscillator Verification + // Timer +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 +#define SYSCTL_RCC_PWMDIV_S 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_S 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_S 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_M 0x0000C000 // PLL OD Value +#define SYSCTL_PLLCFG_OD_1 0x00000000 // Divide by 1 +#define SYSCTL_PLLCFG_OD_2 0x00004000 // Divide by 2 +#define SYSCTL_PLLCFG_OD_4 0x00008000 // Divide by 4 +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_GPIOHBCTL +// register. +// +//***************************************************************************** +#define SYSCTL_GPIOHBCTL_PORTJ 0x00000100 // Port J Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTH 0x00000080 // Port H Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTG 0x00000040 // Port G Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTF 0x00000020 // Port F Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTE 0x00000010 // Port E Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTD 0x00000008 // Port D Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTC 0x00000004 // Port C Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTB 0x00000002 // Port B Advanced High-Performance + // Bus +#define SYSCTL_GPIOHBCTL_PORTA 0x00000001 // Port A Advanced High-Performance + // Bus + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_DIV400 0x40000000 // Divide PLL as 400 MHz vs. 200 + // MHz +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_SYSDIV2LSB 0x00400000 // Additional LSB for SYSDIV2 +#define SYSCTL_RCC2_USBPWRDN 0x00004000 // Power-Down USB PLL +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_419 0x00000060 // 4.194304 MHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MOSCCTL register. +// +//***************************************************************************** +#define SYSCTL_MOSCCTL_CVAL 0x00000001 // Clock Validation for MOSC + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_RCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_RCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_RCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_RCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_RCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_RCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_RCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_RCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_RCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_RCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_RCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_RCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_RCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_RCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_SCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_SCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_SCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_SCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000F00 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_ADC1SPD_M 0x00000C00 // ADC1 Sample Speed +#define SYSCTL_SCGC0_ADC1SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC1SPD_250K \ + 0x00000400 // 250K samples/second +#define SYSCTL_SCGC0_ADC1SPD_500K \ + 0x00000800 // 500K samples/second +#define SYSCTL_SCGC0_ADC1SPD_1M 0x00000C00 // 1M samples/second +#define SYSCTL_SCGC0_ADC0SPD_M 0x00000300 // ADC0 Sample Speed +#define SYSCTL_SCGC0_ADC0SPD_125K \ + 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADC0SPD_250K \ + 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADC0SPD_500K \ + 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADC0SPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_SCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_SCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_SCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_SCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_SCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_WDT1 0x10000000 // WDT1 Clock Gating Control +#define SYSCTL_DCGC0_CAN2 0x04000000 // CAN2 Clock Gating Control +#define SYSCTL_DCGC0_CAN1 0x02000000 // CAN1 Clock Gating Control +#define SYSCTL_DCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC1 0x00020000 // ADC1 Clock Gating Control +#define SYSCTL_DCGC0_ADC0 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT0 0x00000008 // WDT0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_EPI0 0x40000000 // EPI0 Clock Gating +#define SYSCTL_DCGC1_I2S0 0x10000000 // I2S0 Clock Gating +#define SYSCTL_DCGC1_COMP2 0x04000000 // Analog Comparator 2 Clock Gating +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI1 0x00000020 // SSI1 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_USB0 0x00010000 // USB0 Clock Gating Control +#define SYSCTL_DCGC2_UDMA 0x00002000 // Micro-DMA Clock Gating Control +#define SYSCTL_DCGC2_GPIOJ 0x00000100 // Port J Clock Gating Control +#define SYSCTL_DCGC2_GPIOH 0x00000080 // Port H Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_IOSC 0x00000001 // IOSC Clock Source +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCCAL +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCCAL_UTEN 0x80000000 // Use User Trim Value +#define SYSCTL_PIOSCCAL_CAL 0x00000200 // Start Calibration +#define SYSCTL_PIOSCCAL_UPDATE 0x00000100 // Update Trim +#define SYSCTL_PIOSCCAL_UT_M 0x0000007F // User Trim Value +#define SYSCTL_PIOSCCAL_UT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_VERCLR 0x00000001 // Clock Verification Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PIOSCSTAT +// register. +// +//***************************************************************************** +#define SYSCTL_PIOSCSTAT_DT_M 0x007F0000 // Default Trim Value +#define SYSCTL_PIOSCSTAT_CR_M 0x00000300 // Calibration Result +#define SYSCTL_PIOSCSTAT_CRNONE 0x00000000 // Calibration has not been + // attempted +#define SYSCTL_PIOSCSTAT_CRPASS 0x00000100 // The last calibration operation + // completed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CRFAIL 0x00000200 // The last calibration operation + // failed to meet 1% accuracy +#define SYSCTL_PIOSCSTAT_CT_M 0x0000007F // Calibration Trim Value +#define SYSCTL_PIOSCSTAT_DT_S 16 +#define SYSCTL_PIOSCSTAT_CT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_LDOARST 0x00000001 // LDO Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_I2SMCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_I2SMCLKCFG_RXEN 0x80000000 // RX Clock Enable +#define SYSCTL_I2SMCLKCFG_RXI_M 0x3FF00000 // RX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_RXF_M 0x000F0000 // RX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_TXEN 0x00008000 // TX Clock Enable +#define SYSCTL_I2SMCLKCFG_TXI_M 0x00003FF0 // TX Clock Integer Input +#define SYSCTL_I2SMCLKCFG_TXF_M 0x0000000F // TX Clock Fractional Input +#define SYSCTL_I2SMCLKCFG_RXI_S 20 +#define SYSCTL_I2SMCLKCFG_RXF_S 16 +#define SYSCTL_I2SMCLKCFG_TXI_S 4 +#define SYSCTL_I2SMCLKCFG_TXF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC9 register. +// +//***************************************************************************** +#define SYSCTL_DC9_ADC1DC7 0x00800000 // ADC1 DC7 Present +#define SYSCTL_DC9_ADC1DC6 0x00400000 // ADC1 DC6 Present +#define SYSCTL_DC9_ADC1DC5 0x00200000 // ADC1 DC5 Present +#define SYSCTL_DC9_ADC1DC4 0x00100000 // ADC1 DC4 Present +#define SYSCTL_DC9_ADC1DC3 0x00080000 // ADC1 DC3 Present +#define SYSCTL_DC9_ADC1DC2 0x00040000 // ADC1 DC2 Present +#define SYSCTL_DC9_ADC1DC1 0x00020000 // ADC1 DC1 Present +#define SYSCTL_DC9_ADC1DC0 0x00010000 // ADC1 DC0 Present +#define SYSCTL_DC9_ADC0DC7 0x00000080 // ADC0 DC7 Present +#define SYSCTL_DC9_ADC0DC6 0x00000040 // ADC0 DC6 Present +#define SYSCTL_DC9_ADC0DC5 0x00000020 // ADC0 DC5 Present +#define SYSCTL_DC9_ADC0DC4 0x00000010 // ADC0 DC4 Present +#define SYSCTL_DC9_ADC0DC3 0x00000008 // ADC0 DC3 Present +#define SYSCTL_DC9_ADC0DC2 0x00000004 // ADC0 DC2 Present +#define SYSCTL_DC9_ADC0DC1 0x00000002 // ADC0 DC1 Present +#define SYSCTL_DC9_ADC0DC0 0x00000001 // ADC0 DC0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_NVMSTAT register. +// +//***************************************************************************** +#define SYSCTL_NVMSTAT_TPSW 0x00000010 // Third Party Software Present +#define SYSCTL_NVMSTAT_FWB 0x00000001 // 32 Word Flash Write Buffer + // Active + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the System Control register +// addresses. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL 0x400FE06C // GPIO High-Speed Control +#define SYSCTL_USER0 0x400FE1E0 // NV User Register 0 +#define SYSCTL_USER1 0x400FE1E4 // NV User Register 1 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID0 +// register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_MASK 0x70000000 // DID0 version mask +#define SYSCTL_DID0_CLASS_MASK 0x00FF0000 // Device Class +#define SYSCTL_DID0_MAJ_MASK 0x0000FF00 // Major revision mask +#define SYSCTL_DID0_MAJ_A 0x00000000 // Major revision A +#define SYSCTL_DID0_MAJ_B 0x00000100 // Major revision B +#define SYSCTL_DID0_MAJ_C 0x00000200 // Major revision C +#define SYSCTL_DID0_MIN_MASK 0x000000FF // Minor revision mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DID1 +// register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_MASK 0xF0000000 // Register version mask +#define SYSCTL_DID1_FAM_MASK 0x0F000000 // Family mask +#define SYSCTL_DID1_FAM_S 0x00000000 // Stellaris family +#define SYSCTL_DID1_PRTNO_MASK 0x00FF0000 // Part number mask +#define SYSCTL_DID1_PINCNT_MASK 0x0000E000 // Pin count +#define SYSCTL_DID1_TEMP_MASK 0x000000E0 // Temperature range mask +#define SYSCTL_DID1_PKG_MASK 0x00000018 // Package mask +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package +#define SYSCTL_DID1_QUAL_MASK 0x00000003 // Qualification status mask +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PRTNO_SHIFT 16 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_MASK 0xFFFF0000 // SRAM size mask +#define SYSCTL_DC0_FLASHSZ_MASK 0x0000FFFF // Flash size mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC1 +// register. +// +//***************************************************************************** +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_SYSDIV_MASK 0x0000F000 // Minimum system divider mask +#define SYSCTL_DC1_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_DC1_WDOG 0x00000008 // Watchdog present +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC2 +// register. +// +//***************************************************************************** +#define SYSCTL_DC2_I2C 0x00001000 // I2C present +#define SYSCTL_DC2_QEI 0x00000100 // QEI present +#define SYSCTL_DC2_SSI 0x00000010 // SSI present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DC3 +// register. +// +//***************************************************************************** +#define SYSCTL_DC3_ADC7 0x00800000 // ADC7 Pin Present +#define SYSCTL_DC3_ADC6 0x00400000 // ADC6 Pin Present +#define SYSCTL_DC3_ADC5 0x00200000 // ADC5 Pin Present +#define SYSCTL_DC3_ADC4 0x00100000 // ADC4 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_MC_FAULT0 0x00008000 // MC0 fault pin present + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BOR_MASK 0x0000FFFC // BOR wait timer +#define SYSCTL_PBORCTL_BOR_SH 2 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_MASK 0x0000003F // Voltage adjust mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0 +// register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RESC +// register. +// +//***************************************************************************** +#define SYSCTL_RESC_WDOG 0x00000008 // Watchdog reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC +// register. +// +//***************************************************************************** +#define SYSCTL_RCC_SYSDIV_MASK 0x07800000 // System clock divider +#define SYSCTL_RCC_USE_SYSDIV 0x00400000 // Use sytem clock divider +#define SYSCTL_RCC_USE_PWMDIV 0x00100000 // Use PWM clock divider +#define SYSCTL_RCC_PWMDIV_MASK 0x000E0000 // PWM clock divider +#define SYSCTL_RCC_OE 0x00001000 // PLL output enable +#define SYSCTL_RCC_XTAL_3_68MHz 0x00000140 // Using a 3.6864 MHz crystal +#define SYSCTL_RCC_XTAL_4MHz 0x00000180 // Using a 4 MHz crystal +#define SYSCTL_RCC_XTAL_MASK 0x000003C0 // Crystal attached to main osc +#define SYSCTL_RCC_OSCSRC_MASK 0x00000030 // Oscillator input select +#define SYSCTL_RCC_SYSDIV_SHIFT 23 // Shift to the SYSDIV field +#define SYSCTL_RCC_PWMDIV_SHIFT 17 // Shift to the PWMDIV field +#define SYSCTL_RCC_XTAL_SHIFT 6 // Shift to the XTAL field +#define SYSCTL_RCC_OSCSRC_SHIFT 4 // Shift to the OSCSRC field + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_PLLCFG +// register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_OD_MASK 0x0000C000 // Output divider +#define SYSCTL_PLLCFG_F_MASK 0x00003FE0 // PLL multiplier +#define SYSCTL_PLLCFG_R_MASK 0x0000001F // Input predivider +#define SYSCTL_PLLCFG_F_SHIFT 5 +#define SYSCTL_PLLCFG_R_SHIFT 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_GPIOHSCTL register. +// +//***************************************************************************** +#define SYSCTL_GPIOHSCTL_PORTA 0x00000001 // Port A High-Speed +#define SYSCTL_GPIOHSCTL_PORTB 0x00000002 // Port B High-Speed +#define SYSCTL_GPIOHSCTL_PORTC 0x00000004 // Port C High-Speed +#define SYSCTL_GPIOHSCTL_PORTD 0x00000008 // Port D High-Speed +#define SYSCTL_GPIOHSCTL_PORTE 0x00000010 // Port E High-Speed +#define SYSCTL_GPIOHSCTL_PORTF 0x00000020 // Port F High-Speed +#define SYSCTL_GPIOHSCTL_PORTG 0x00000040 // Port G High-Speed +#define SYSCTL_GPIOHSCTL_PORTH 0x00000080 // Port H High-Speed + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCC2 +// register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USEFRACT 0x40000000 // Use fractional divider +#define SYSCTL_RCC2_SYSDIV2_MSK 0x1F800000 // System clock divider +#define SYSCTL_RCC2_FRACT 0x00400000 // Fractional divide +#define SYSCTL_RCC2_OSCSRC2_MSK 0x00000070 // Oscillator input select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_DCGC0 +// register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_DSLPCLKCFG register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_MSK 0x1F800000 // Deep sleep system clock override +#define SYSCTL_DSLPCLKCFG_O_MSK 0x00000070 // Deep sleep oscillator override + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_CLKVCLR register. +// +//***************************************************************************** +#define SYSCTL_CLKVCLR_CLR 0x00000001 // Clear clock verification fault + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// SYSCTL_LDOARST register. +// +//***************************************************************************** +#define SYSCTL_LDOARST_ARST 0x00000001 // Allow LDO to reset device + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR0, +// SYSCTL_RCGC0, SYSCTL_SCGC0, and SYSCTL_DCGC0 registers. +// +//***************************************************************************** +#define SYSCTL_SET0_CAN2 0x04000000 // CAN 2 module +#define SYSCTL_SET0_CAN1 0x02000000 // CAN 1 module +#define SYSCTL_SET0_CAN0 0x01000000 // CAN 0 module +#define SYSCTL_SET0_PWM 0x00100000 // PWM module +#define SYSCTL_SET0_ADC 0x00010000 // ADC module +#define SYSCTL_SET0_ADCSPD_MASK 0x00000F00 // ADC speed mask +#define SYSCTL_SET0_ADCSPD_125K 0x00000000 // 125Ksps ADC +#define SYSCTL_SET0_ADCSPD_250K 0x00000100 // 250Ksps ADC +#define SYSCTL_SET0_ADCSPD_500K 0x00000200 // 500Ksps ADC +#define SYSCTL_SET0_ADCSPD_1M 0x00000300 // 1Msps ADC +#define SYSCTL_SET0_HIB 0x00000040 // Hibernation module +#define SYSCTL_SET0_WDOG 0x00000008 // Watchdog module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR1, +// SYSCTL_RCGC1, SYSCTL_SCGC1, and SYSCTL_DCGC1 registers. +// +//***************************************************************************** +#define SYSCTL_SET1_COMP2 0x04000000 // Analog comparator module 2 +#define SYSCTL_SET1_COMP1 0x02000000 // Analog comparator module 1 +#define SYSCTL_SET1_COMP0 0x01000000 // Analog comparator module 0 +#define SYSCTL_SET1_TIMER3 0x00080000 // Timer module 3 +#define SYSCTL_SET1_TIMER2 0x00040000 // Timer module 2 +#define SYSCTL_SET1_TIMER1 0x00020000 // Timer module 1 +#define SYSCTL_SET1_TIMER0 0x00010000 // Timer module 0 +#define SYSCTL_SET1_I2C1 0x00002000 // I2C module 1 +#define SYSCTL_SET1_I2C0 0x00001000 // I2C module 0 +#define SYSCTL_SET1_I2C 0x00001000 // I2C module +#define SYSCTL_SET1_QEI1 0x00000200 // QEI module 1 +#define SYSCTL_SET1_QEI 0x00000100 // QEI module +#define SYSCTL_SET1_QEI0 0x00000100 // QEI module 0 +#define SYSCTL_SET1_SSI1 0x00000020 // SSI module 1 +#define SYSCTL_SET1_SSI0 0x00000010 // SSI module 0 +#define SYSCTL_SET1_SSI 0x00000010 // SSI module +#define SYSCTL_SET1_UART2 0x00000004 // UART module 2 +#define SYSCTL_SET1_UART1 0x00000002 // UART module 1 +#define SYSCTL_SET1_UART0 0x00000001 // UART module 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_SRCR2, +// SYSCTL_RCGC2, SYSCTL_SCGC2, and SYSCTL_DCGC2 registers. +// +//***************************************************************************** +#define SYSCTL_SET2_ETH 0x50000000 // ETH module +#define SYSCTL_SET2_GPIOH 0x00000080 // GPIO H module +#define SYSCTL_SET2_GPIOG 0x00000040 // GPIO G module +#define SYSCTL_SET2_GPIOF 0x00000020 // GPIO F module +#define SYSCTL_SET2_GPIOE 0x00000010 // GPIO E module +#define SYSCTL_SET2_GPIOD 0x00000008 // GPIO D module +#define SYSCTL_SET2_GPIOC 0x00000004 // GPIO C module +#define SYSCTL_SET2_GPIOB 0x00000002 // GPIO B module +#define SYSCTL_SET2_GPIOA 0x00000001 // GIPO A module + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the SYSCTL_RIS, +// SYSCTL_IMC, and SYSCTL_IMS registers. +// +//***************************************************************************** +#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt +#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt +#define SYSCTL_INT_IOSC_FAIL 0x00000010 // Internal oscillator failure int +#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int +#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt +#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt +#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt + +#endif + +#endif // __HW_SYSCTL_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_timer.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_timer.h new file mode 100644 index 00000000..2a2cac71 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_timer.h @@ -0,0 +1,474 @@ +//***************************************************************************** +// +// hw_timer.h - Defines and macros used when accessing the timer. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TIMER_H__ +#define __HW_TIMER_H__ + +//***************************************************************************** +// +// The following are defines for the Timer register offsets. +// +//***************************************************************************** +#define TIMER_O_CFG 0x00000000 // GPTM Configuration +#define TIMER_O_TAMR 0x00000004 // GPTM Timer A Mode +#define TIMER_O_TBMR 0x00000008 // GPTM Timer B Mode +#define TIMER_O_CTL 0x0000000C // GPTM Control +#define TIMER_O_IMR 0x00000018 // GPTM Interrupt Mask +#define TIMER_O_RIS 0x0000001C // GPTM Raw Interrupt Status +#define TIMER_O_MIS 0x00000020 // GPTM Masked Interrupt Status +#define TIMER_O_ICR 0x00000024 // GPTM Interrupt Clear +#define TIMER_O_TAILR 0x00000028 // GPTM Timer A Interval Load +#define TIMER_O_TBILR 0x0000002C // GPTM Timer B Interval Load +#define TIMER_O_TAMATCHR 0x00000030 // GPTM Timer A Match +#define TIMER_O_TBMATCHR 0x00000034 // GPTM Timer B Match +#define TIMER_O_TAPR 0x00000038 // GPTM Timer A Prescale +#define TIMER_O_TBPR 0x0000003C // GPTM Timer B Prescale +#define TIMER_O_TAPMR 0x00000040 // GPTM TimerA Prescale Match +#define TIMER_O_TBPMR 0x00000044 // GPTM TimerB Prescale Match +#define TIMER_O_TAR 0x00000048 // GPTM Timer A +#define TIMER_O_TBR 0x0000004C // GPTM Timer B +#define TIMER_O_TAV 0x00000050 // GPTM Timer A Value +#define TIMER_O_TBV 0x00000054 // GPTM Timer B Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CFG register. +// +//***************************************************************************** +#define TIMER_CFG_M 0x00000007 // GPTM Configuration +#define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration +#define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC) + // counter configuration +#define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The + // function is controlled by bits + // 1:0 of GPTMTAMR and GPTMTBMR + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMR register. +// +//***************************************************************************** +#define TIMER_TAMR_TASNAPS 0x00000080 // GPTM Timer A Snap-Shot Mode +#define TIMER_TAMR_TAWOT 0x00000040 // GPTM Timer A Wait-on-Trigger +#define TIMER_TAMR_TAMIE 0x00000020 // GPTM Timer A Match Interrupt + // Enable +#define TIMER_TAMR_TACDIR 0x00000010 // GPTM Timer A Count Direction +#define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode + // Select +#define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode +#define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode +#define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMR register. +// +//***************************************************************************** +#define TIMER_TBMR_TBSNAPS 0x00000080 // GPTM Timer B Snap-Shot Mode +#define TIMER_TBMR_TBWOT 0x00000040 // GPTM Timer B Wait-on-Trigger +#define TIMER_TBMR_TBMIE 0x00000020 // GPTM Timer B Match Interrupt + // Enable +#define TIMER_TBMR_TBCDIR 0x00000010 // GPTM Timer B Count Direction +#define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode + // Select +#define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode +#define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode +#define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CTL register. +// +//***************************************************************************** +#define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level +#define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger + // Enable +#define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode +#define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge +#define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges +#define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable +#define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable +#define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level +#define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger + // Enable +#define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable +#define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode +#define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge +#define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges +#define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable +#define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_IMR register. +// +//***************************************************************************** +#define TIMER_IMR_TBMIM 0x00000800 // GPTM Timer B Mode Match + // Interrupt Mask +#define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt + // Mask +#define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt + // Mask +#define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt + // Mask +#define TIMER_IMR_TAMIM 0x00000010 // GPTM Timer A Mode Match + // Interrupt Mask +#define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask +#define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt + // Mask +#define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt + // Mask +#define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_RIS register. +// +//***************************************************************************** +#define TIMER_RIS_TBMRIS 0x00000800 // GPTM Timer B Mode Match Raw + // Interrupt +#define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw + // Interrupt +#define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw + // Interrupt +#define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw + // Interrupt +#define TIMER_RIS_TAMRIS 0x00000010 // GPTM Timer A Mode Match Raw + // Interrupt +#define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt +#define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw + // Interrupt +#define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw + // Interrupt +#define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_MIS register. +// +//***************************************************************************** +#define TIMER_MIS_TBMMIS 0x00000800 // GPTM Timer B Mode Match Masked + // Interrupt +#define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked + // Interrupt +#define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked + // Interrupt +#define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked + // Interrupt +#define TIMER_MIS_TAMMIS 0x00000010 // GPTM Timer A Mode Match Masked + // Interrupt +#define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt +#define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked + // Interrupt +#define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked + // Interrupt +#define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_ICR register. +// +//***************************************************************************** +#define TIMER_ICR_TBMCINT 0x00000800 // GPTM Timer B Mode Match + // Interrupt Clear +#define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt + // Clear +#define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt + // Clear +#define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt + // Clear +#define TIMER_ICR_TAMCINT 0x00000010 // GPTM Timer A Mode Match + // Interrupt Clear +#define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear +#define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt + // Clear +#define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt + // Clear +#define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAILR register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load + // Register High +#define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load + // Register Low +#define TIMER_TAILR_TAILRH_S 16 +#define TIMER_TAILR_TAILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBILR register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load + // Register +#define TIMER_TBILR_TBILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High +#define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low +#define TIMER_TAMATCHR_TAMRH_S 16 +#define TIMER_TAMATCHR_TAMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low +#define TIMER_TBMATCHR_TBMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPR register. +// +//***************************************************************************** +#define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale +#define TIMER_TAPR_TAPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPR register. +// +//***************************************************************************** +#define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale +#define TIMER_TBPR_TBPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPMR register. +// +//***************************************************************************** +#define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match +#define TIMER_TAPMR_TAPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPMR register. +// +//***************************************************************************** +#define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match +#define TIMER_TBPMR_TBPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAR register. +// +//***************************************************************************** +#define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High +#define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAR_TARH_S 16 +#define TIMER_TAR_TARL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBR register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL_M 0x00FFFFFF // GPTM Timer B +#define TIMER_TBR_TBRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAV register. +// +//***************************************************************************** +#define TIMER_TAV_TAVH_M 0xFFFF0000 // GPTM Timer A Value High +#define TIMER_TAV_TAVL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAV_TAVH_S 16 +#define TIMER_TAV_TAVL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBV register. +// +//***************************************************************************** +#define TIMER_TBV_TBVL_M 0x0000FFFF // GPTM Timer B Register +#define TIMER_TBV_TBVL_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_CFG +// register. +// +//***************************************************************************** +#define TIMER_CFG_CFG_MSK 0x00000007 // Configuration options mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_CTL +// register. +// +//***************************************************************************** +#define TIMER_CTL_TBEVENT_MSK 0x00000C00 // TimerB event mode mask +#define TIMER_CTL_TAEVENT_MSK 0x0000000C // TimerA event mode mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_RIS +// register. +// +//***************************************************************************** +#define TIMER_RIS_CBEMIS 0x00000400 // CaptureB event masked int status +#define TIMER_RIS_CBMMIS 0x00000200 // CaptureB match masked int status +#define TIMER_RIS_TBTOMIS 0x00000100 // TimerB time out masked int stat +#define TIMER_RIS_RTCMIS 0x00000008 // RTC masked int status +#define TIMER_RIS_CAEMIS 0x00000004 // CaptureA event masked int status +#define TIMER_RIS_CAMMIS 0x00000002 // CaptureA match masked int status +#define TIMER_RIS_TATOMIS 0x00000001 // TimerA time out masked int stat + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TAILR +// register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH 0xFFFF0000 // TimerB load val in 32 bit mode +#define TIMER_TAILR_TAILRL 0x0000FFFF // TimerA interval load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TBILR +// register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL 0x0000FFFF // TimerB interval load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// TIMER_O_TAMATCHR register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH 0xFFFF0000 // TimerB match val in 32 bit mode +#define TIMER_TAMATCHR_TAMRL 0x0000FFFF // TimerA match value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// TIMER_O_TBMATCHR register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL 0x0000FFFF // TimerB match load value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TAR +// register. +// +//***************************************************************************** +#define TIMER_TAR_TARH 0xFFFF0000 // TimerB val in 32 bit mode +#define TIMER_TAR_TARL 0x0000FFFF // TimerA value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_O_TBR +// register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL 0x0000FFFF // TimerB value + +//***************************************************************************** +// +// The following are deprecated defines for the reset values of the timer +// registers. +// +//***************************************************************************** +#define TIMER_RV_TAILR 0xFFFFFFFF // TimerA interval load reg RV +#define TIMER_RV_TAR 0xFFFFFFFF // TimerA register RV +#define TIMER_RV_TAMATCHR 0xFFFFFFFF // TimerA match register RV +#define TIMER_RV_TBILR 0x0000FFFF // TimerB interval load reg RV +#define TIMER_RV_TBMATCHR 0x0000FFFF // TimerB match register RV +#define TIMER_RV_TBR 0x0000FFFF // TimerB register RV +#define TIMER_RV_TAPR 0x00000000 // TimerA prescale register RV +#define TIMER_RV_CFG 0x00000000 // Configuration register RV +#define TIMER_RV_TBPMR 0x00000000 // TimerB prescale match regi RV +#define TIMER_RV_TAPMR 0x00000000 // TimerA prescale match reg RV +#define TIMER_RV_CTL 0x00000000 // Control register RV +#define TIMER_RV_ICR 0x00000000 // Interrupt clear register RV +#define TIMER_RV_TBMR 0x00000000 // TimerB mode register RV +#define TIMER_RV_MIS 0x00000000 // Masked interrupt status reg RV +#define TIMER_RV_RIS 0x00000000 // Interrupt status register RV +#define TIMER_RV_TBPR 0x00000000 // TimerB prescale register RV +#define TIMER_RV_IMR 0x00000000 // Interrupt mask register RV +#define TIMER_RV_TAMR 0x00000000 // TimerA mode register RV + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnMR +// register. +// +//***************************************************************************** +#define TIMER_TNMR_TNAMS 0x00000008 // Alternate mode select +#define TIMER_TNMR_TNCMR 0x00000004 // Capture mode - count or time +#define TIMER_TNMR_TNTMR_MSK 0x00000003 // Timer mode mask +#define TIMER_TNMR_TNTMR_1_SHOT 0x00000001 // Mode - one shot +#define TIMER_TNMR_TNTMR_PERIOD 0x00000002 // Mode - periodic +#define TIMER_TNMR_TNTMR_CAP 0x00000003 // Mode - capture + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnPR +// register. +// +//***************************************************************************** +#define TIMER_TNPR_TNPSR 0x000000FF // TimerN prescale value + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the TIMER_TnPMR +// register. +// +//***************************************************************************** +#define TIMER_TNPMR_TNPSMR 0x000000FF // TimerN prescale match value + +#endif + +#endif // __HW_TIMER_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_types.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_types.h new file mode 100644 index 00000000..c62428aa --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_types.h @@ -0,0 +1,185 @@ +//***************************************************************************** +// +// hw_types.h - Common types and macros. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_TYPES_H__ +#define __HW_TYPES_H__ + +//***************************************************************************** +// +// Define a boolean type, and values for true and false. +// +//***************************************************************************** +typedef unsigned char tBoolean; + +#ifndef true +#define true 1 +#endif + +#ifndef false +#define false 0 +#endif + +//***************************************************************************** +// +// Macros for hardware access, both direct and via the bit-band region. +// +//***************************************************************************** +#define HWREG(x) \ + (*((volatile unsigned long *)(x))) +#define HWREGH(x) \ + (*((volatile unsigned short *)(x))) +#define HWREGB(x) \ + (*((volatile unsigned char *)(x))) +#define HWREGBITW(x, b) \ + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITH(x, b) \ + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) +#define HWREGBITB(x, b) \ + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + +//***************************************************************************** +// +// Helper Macros for determining silicon revisions, etc. +// +// These macros will be used by Driverlib at "run-time" to create necessary +// conditional code blocks that will allow a single version of the Driverlib +// "binary" code to support multiple(all) Stellaris silicon revisions. +// +// It is expected that these macros will be used inside of a standard 'C' +// conditional block of code, e.g. +// +// if(CLASS_IS_SANDSTORM) +// { +// do some Sandstorm-class specific code here. +// } +// +// By default, these macros will be defined as run-time checks of the +// appropriate register(s) to allow creation of run-time conditional code +// blocks for a common DriverLib across the entire Stellaris family. +// +// However, if code-space optimization is required, these macros can be "hard- +// coded" for a specific version of Stellaris silicon. Many compilers will +// then detect the "hard-coded" conditionals, and appropriately optimize the +// code blocks, eliminating any "unreachable" code. This would result in +// a smaller Driverlib, thus producing a smaller final application size, but +// at the cost of limiting the Driverlib binary to a specific Stellaris +// silicon revision. +// +//***************************************************************************** +#ifndef CLASS_IS_SANDSTORM +#define CLASS_IS_SANDSTORM \ + (((HWREG(SYSCTL_DID0) & SYSCTL_DID0_VER_M) == SYSCTL_DID0_VER_0) || \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_SANDSTORM))) +#endif + +#ifndef CLASS_IS_FURY +#define CLASS_IS_FURY \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_FURY)) +#endif + +#ifndef CLASS_IS_DUSTDEVIL +#define CLASS_IS_DUSTDEVIL \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_DUSTDEVIL)) +#endif + +#ifndef CLASS_IS_TEMPEST +#define CLASS_IS_TEMPEST \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ + (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TEMPEST)) +#endif + +#ifndef REVISION_IS_A0 +#define REVISION_IS_A0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A1 +#define REVISION_IS_A1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_A2 +#define REVISION_IS_A2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_B0 +#define REVISION_IS_B0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_B1 +#define REVISION_IS_B1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C0 +#define REVISION_IS_C0 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_0)) +#endif + +#ifndef REVISION_IS_C1 +#define REVISION_IS_C1 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_1)) +#endif + +#ifndef REVISION_IS_C2 +#define REVISION_IS_C2 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_2)) +#endif + +#ifndef REVISION_IS_C3 +#define REVISION_IS_C3 \ + ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ + (SYSCTL_DID0_MAJ_REVC | SYSCTL_DID0_MIN_3)) +#endif + +//***************************************************************************** +// +// Deprecated silicon class and revision detection macros. +// +//***************************************************************************** +#ifndef DEPRECATED +#define DEVICE_IS_SANDSTORM CLASS_IS_SANDSTORM +#define DEVICE_IS_FURY CLASS_IS_FURY +#define DEVICE_IS_REVA2 REVISION_IS_A2 +#define DEVICE_IS_REVC1 REVISION_IS_C1 +#define DEVICE_IS_REVC2 REVISION_IS_C2 +#endif + +#endif // __HW_TYPES_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_uart.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_uart.h new file mode 100644 index 00000000..b6613861 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_uart.h @@ -0,0 +1,458 @@ +//***************************************************************************** +// +// hw_uart.h - Macros and defines used when accessing the UART hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UART_H__ +#define __HW_UART_H__ + +//***************************************************************************** +// +// The following are defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_DR 0x00000000 // UART Data +#define UART_O_RSR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_ECR 0x00000004 // UART Receive Status/Error Clear +#define UART_O_FR 0x00000018 // UART Flag +#define UART_O_ILPR 0x00000020 // UART IrDA Low-Power Register +#define UART_O_IBRD 0x00000024 // UART Integer Baud-Rate Divisor +#define UART_O_FBRD 0x00000028 // UART Fractional Baud-Rate + // Divisor +#define UART_O_LCRH 0x0000002C // UART Line Control +#define UART_O_CTL 0x00000030 // UART Control +#define UART_O_IFLS 0x00000034 // UART Interrupt FIFO Level Select +#define UART_O_IM 0x00000038 // UART Interrupt Mask +#define UART_O_RIS 0x0000003C // UART Raw Interrupt Status +#define UART_O_MIS 0x00000040 // UART Masked Interrupt Status +#define UART_O_ICR 0x00000044 // UART Interrupt Clear +#define UART_O_DMACTL 0x00000048 // UART DMA Control +#define UART_O_LCTL 0x00000090 // UART LIN Control +#define UART_O_LSS 0x00000094 // UART LIN Snap Shot +#define UART_O_LTIM 0x00000098 // UART LIN Timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_RI 0x00000100 // Ring Indicator +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy +#define UART_FR_DCD 0x00000004 // Data Carrier Detect +#define UART_FR_DSR 0x00000002 // Data Set Ready +#define UART_FR_CTS 0x00000001 // Clear To Send + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_CTSEN 0x00008000 // Enable Clear To Send +#define UART_CTL_RTSEN 0x00004000 // Enable Request to Send +#define UART_CTL_RTS 0x00000800 // Request to Send +#define UART_CTL_DTR 0x00000400 // Data Terminal Ready +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_LIN 0x00000040 // LIN Mode Enable +#define UART_CTL_HSE 0x00000020 // High-Speed Enable +#define UART_CTL_EOT 0x00000010 // End of Transmission +#define UART_CTL_SMART 0x00000008 // ISO 7816 Smart Card Support +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_LME5IM 0x00008000 // LIN Mode Edge 5 Interrupt Mask +#define UART_IM_LME1IM 0x00004000 // LIN Mode Edge 1 Interrupt Mask +#define UART_IM_LMSBIM 0x00002000 // LIN Mode Sync Break Interrupt + // Mask +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask +#define UART_IM_DSRMIM 0x00000008 // UART Data Set Ready Modem + // Interrupt Mask +#define UART_IM_DCDMIM 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Mask +#define UART_IM_CTSMIM 0x00000002 // UART Clear to Send Modem + // Interrupt Mask +#define UART_IM_RIMIM 0x00000001 // UART Ring Indicator Modem + // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_LME5RIS 0x00008000 // LIN Mode Edge 5 Raw Interrupt + // Status +#define UART_RIS_LME1RIS 0x00004000 // LIN Mode Edge 1 Raw Interrupt + // Status +#define UART_RIS_LMSBRIS 0x00002000 // LIN Mode Sync Break Raw + // Interrupt Status +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status +#define UART_RIS_DSRRIS 0x00000008 // UART Data Set Ready Modem Raw + // Interrupt Status +#define UART_RIS_DCDRIS 0x00000004 // UART Data Carrier Detect Modem + // Raw Interrupt Status +#define UART_RIS_CTSRIS 0x00000002 // UART Clear to Send Modem Raw + // Interrupt Status +#define UART_RIS_RIRIS 0x00000001 // UART Ring Indicator Modem Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_LME5MIS 0x00008000 // LIN Mode Edge 5 Masked Interrupt + // Status +#define UART_MIS_LME1MIS 0x00004000 // LIN Mode Edge 1 Masked Interrupt + // Status +#define UART_MIS_LMSBMIS 0x00002000 // LIN Mode Sync Break Masked + // Interrupt Status +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status +#define UART_MIS_DSRMIS 0x00000008 // UART Data Set Ready Modem Masked + // Interrupt Status +#define UART_MIS_DCDMIS 0x00000004 // UART Data Carrier Detect Modem + // Masked Interrupt Status +#define UART_MIS_CTSMIS 0x00000002 // UART Clear to Send Modem Masked + // Interrupt Status +#define UART_MIS_RIMIS 0x00000001 // UART Ring Indicator Modem Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_LME5MIC 0x00008000 // LIN Mode Edge 5 Interrupt Clear +#define UART_ICR_LME1MIC 0x00004000 // LIN Mode Edge 1 Interrupt Clear +#define UART_ICR_LMSBMIC 0x00002000 // LIN Mode Sync Break Interrupt + // Clear +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear +#define UART_ICR_DSRMIC 0x00000008 // UART Data Set Ready Modem + // Interrupt Clear +#define UART_ICR_DCDMIC 0x00000004 // UART Data Carrier Detect Modem + // Interrupt Clear +#define UART_ICR_CTSMIC 0x00000002 // UART Clear to Send Modem + // Interrupt Clear +#define UART_ICR_RIMIC 0x00000001 // UART Ring Indicator Modem + // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DMACTL register. +// +//***************************************************************************** +#define UART_DMACTL_DMAERR 0x00000004 // DMA on Error +#define UART_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable +#define UART_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCTL register. +// +//***************************************************************************** +#define UART_LCTL_BLEN_M 0x00000030 // Sync Break Length +#define UART_LCTL_BLEN_13T 0x00000000 // Sync break length is 13T bits + // (default) +#define UART_LCTL_BLEN_14T 0x00000010 // Sync break length is 14T bits +#define UART_LCTL_BLEN_15T 0x00000020 // Sync break length is 15T bits +#define UART_LCTL_BLEN_16T 0x00000030 // Sync break length is 16T bits +#define UART_LCTL_MASTER 0x00000001 // LIN Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LSS register. +// +//***************************************************************************** +#define UART_LSS_TSS_M 0x0000FFFF // Timer Snap Shot +#define UART_LSS_TSS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LTIM register. +// +//***************************************************************************** +#define UART_LTIM_TIMER_M 0x0000FFFF // Timer Value +#define UART_LTIM_TIMER_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the UART register offsets. +// +//***************************************************************************** +#define UART_O_LCR_H 0x0000002C // Line Control Register, HIGH byte +#define UART_O_PeriphID4 0x00000FD0 +#define UART_O_PeriphID5 0x00000FD4 +#define UART_O_PeriphID6 0x00000FD8 +#define UART_O_PeriphID7 0x00000FDC +#define UART_O_PeriphID0 0x00000FE0 +#define UART_O_PeriphID1 0x00000FE4 +#define UART_O_PeriphID2 0x00000FE8 +#define UART_O_PeriphID3 0x00000FEC +#define UART_O_PCellID0 0x00000FF0 +#define UART_O_PCellID1 0x00000FF4 +#define UART_O_PCellID2 0x00000FF8 +#define UART_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_DR +// register. +// +//***************************************************************************** +#define UART_DR_DATA_MASK 0x000000FF // UART data + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IBRD +// register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_MASK 0x0000FFFF // Integer baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_FBRD +// register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_MASK 0x0000003F // Fractional baud-rate divisor + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_LCR_H +// register. +// +//***************************************************************************** +#define UART_LCR_H_SPS 0x00000080 // Stick Parity Select +#define UART_LCR_H_WLEN 0x00000060 // Word length +#define UART_LCR_H_WLEN_5 0x00000000 // 5 bit data +#define UART_LCR_H_WLEN_6 0x00000020 // 6 bit data +#define UART_LCR_H_WLEN_7 0x00000040 // 7 bit data +#define UART_LCR_H_WLEN_8 0x00000060 // 8 bit data +#define UART_LCR_H_FEN 0x00000010 // Enable FIFO +#define UART_LCR_H_STP2 0x00000008 // Two Stop Bits Select +#define UART_LCR_H_EPS 0x00000004 // Even Parity Select +#define UART_LCR_H_PEN 0x00000002 // Parity Enable +#define UART_LCR_H_BRK 0x00000001 // Send Break + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_IFLS +// register. +// +//***************************************************************************** +#define UART_IFLS_RX_MASK 0x00000038 // RX FIFO level mask +#define UART_IFLS_TX_MASK 0x00000007 // TX FIFO level mask + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UART_O_ICR +// register. +// +//***************************************************************************** +#define UART_RSR_ANY (UART_RSR_OE | UART_RSR_BE | UART_RSR_PE | \ + UART_RSR_FE) + +//***************************************************************************** +// +// The following are deprecated defines for the Reset Values for UART +// Registers. +// +//***************************************************************************** +#define UART_RV_CTL 0x00000300 +#define UART_RV_PCellID1 0x000000F0 +#define UART_RV_PCellID3 0x000000B1 +#define UART_RV_FR 0x00000090 +#define UART_RV_PeriphID2 0x00000018 +#define UART_RV_IFLS 0x00000012 +#define UART_RV_PeriphID0 0x00000011 +#define UART_RV_PCellID0 0x0000000D +#define UART_RV_PCellID2 0x00000005 +#define UART_RV_PeriphID3 0x00000001 +#define UART_RV_PeriphID4 0x00000000 +#define UART_RV_LCR_H 0x00000000 +#define UART_RV_PeriphID6 0x00000000 +#define UART_RV_DR 0x00000000 +#define UART_RV_RSR 0x00000000 +#define UART_RV_ECR 0x00000000 +#define UART_RV_PeriphID5 0x00000000 +#define UART_RV_RIS 0x00000000 +#define UART_RV_FBRD 0x00000000 +#define UART_RV_IM 0x00000000 +#define UART_RV_MIS 0x00000000 +#define UART_RV_ICR 0x00000000 +#define UART_RV_PeriphID1 0x00000000 +#define UART_RV_PeriphID7 0x00000000 +#define UART_RV_IBRD 0x00000000 + +#endif + +#endif // __HW_UART_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_udma.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_udma.h new file mode 100644 index 00000000..6f6270b1 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_udma.h @@ -0,0 +1,331 @@ +//***************************************************************************** +// +// hw_udma.h - Macros for use in accessing the UDMA registers. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_UDMA_H__ +#define __HW_UDMA_H__ + +//***************************************************************************** +// +// The following are defines for the Micro Direct Memory Access register +// addresses. +// +//***************************************************************************** +#define UDMA_STAT 0x400FF000 // DMA Status +#define UDMA_CFG 0x400FF004 // DMA Configuration +#define UDMA_CTLBASE 0x400FF008 // DMA Channel Control Base Pointer +#define UDMA_ALTBASE 0x400FF00C // DMA Alternate Channel Control + // Base Pointer +#define UDMA_WAITSTAT 0x400FF010 // DMA Channel Wait-on-Request + // Status +#define UDMA_SWREQ 0x400FF014 // DMA Channel Software Request +#define UDMA_USEBURSTSET 0x400FF018 // DMA Channel Useburst Set +#define UDMA_USEBURSTCLR 0x400FF01C // DMA Channel Useburst Clear +#define UDMA_REQMASKSET 0x400FF020 // DMA Channel Request Mask Set +#define UDMA_REQMASKCLR 0x400FF024 // DMA Channel Request Mask Clear +#define UDMA_ENASET 0x400FF028 // DMA Channel Enable Set +#define UDMA_ENACLR 0x400FF02C // DMA Channel Enable Clear +#define UDMA_ALTSET 0x400FF030 // DMA Channel Primary Alternate + // Set +#define UDMA_ALTCLR 0x400FF034 // DMA Channel Primary Alternate + // Clear +#define UDMA_PRIOSET 0x400FF038 // DMA Channel Priority Set +#define UDMA_PRIOCLR 0x400FF03C // DMA Channel Priority Clear +#define UDMA_ERRCLR 0x400FF04C // DMA Bus Error Clear +#define UDMA_CHASGN 0x400FF500 // DMA Channel Assignment + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_STAT register. +// +//***************************************************************************** +#define UDMA_STAT_DMACHANS_M 0x001F0000 // Available uDMA Channels Minus 1 +#define UDMA_STAT_STATE_M 0x000000F0 // Control State Machine Status +#define UDMA_STAT_STATE_IDLE 0x00000000 // Idle +#define UDMA_STAT_STATE_RD_CTRL 0x00000010 // Reading channel controller data +#define UDMA_STAT_STATE_RD_SRCENDP \ + 0x00000020 // Reading source end pointer +#define UDMA_STAT_STATE_RD_DSTENDP \ + 0x00000030 // Reading destination end pointer +#define UDMA_STAT_STATE_RD_SRCDAT \ + 0x00000040 // Reading source data +#define UDMA_STAT_STATE_WR_DSTDAT \ + 0x00000050 // Writing destination data +#define UDMA_STAT_STATE_WAIT 0x00000060 // Waiting for uDMA request to + // clear +#define UDMA_STAT_STATE_WR_CTRL 0x00000070 // Writing channel controller data +#define UDMA_STAT_STATE_STALL 0x00000080 // Stalled +#define UDMA_STAT_STATE_DONE 0x00000090 // Done +#define UDMA_STAT_STATE_UNDEF 0x000000A0 // Undefined +#define UDMA_STAT_MASTEN 0x00000001 // Master Enable Status +#define UDMA_STAT_DMACHANS_S 16 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CFG register. +// +//***************************************************************************** +#define UDMA_CFG_MASTEN 0x00000001 // Controller Master Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CTLBASE register. +// +//***************************************************************************** +#define UDMA_CTLBASE_ADDR_M 0xFFFFFC00 // Channel Control Base Address +#define UDMA_CTLBASE_ADDR_S 10 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTBASE register. +// +//***************************************************************************** +#define UDMA_ALTBASE_ADDR_M 0xFFFFFFFF // Alternate Channel Address + // Pointer +#define UDMA_ALTBASE_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_WAITSTAT register. +// +//***************************************************************************** +#define UDMA_WAITSTAT_WAITREQ_M 0xFFFFFFFF // Channel [n] Wait Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_SWREQ register. +// +//***************************************************************************** +#define UDMA_SWREQ_M 0xFFFFFFFF // Channel [n] Software Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_USEBURSTSET +// register. +// +//***************************************************************************** +#define UDMA_USEBURSTSET_SET_M 0xFFFFFFFF // Channel [n] Useburst Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_USEBURSTCLR +// register. +// +//***************************************************************************** +#define UDMA_USEBURSTCLR_CLR_M 0xFFFFFFFF // Channel [n] Useburst Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_REQMASKSET +// register. +// +//***************************************************************************** +#define UDMA_REQMASKSET_SET_M 0xFFFFFFFF // Channel [n] Request Mask Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_REQMASKCLR +// register. +// +//***************************************************************************** +#define UDMA_REQMASKCLR_CLR_M 0xFFFFFFFF // Channel [n] Request Mask Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ENASET register. +// +//***************************************************************************** +#define UDMA_ENASET_SET_M 0xFFFFFFFF // Channel [n] Enable Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ENACLR register. +// +//***************************************************************************** +#define UDMA_ENACLR_CLR_M 0xFFFFFFFF // Clear Channel [n] Enable Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTSET register. +// +//***************************************************************************** +#define UDMA_ALTSET_SET_M 0xFFFFFFFF // Channel [n] Alternate Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ALTCLR register. +// +//***************************************************************************** +#define UDMA_ALTCLR_CLR_M 0xFFFFFFFF // Channel [n] Alternate Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_PRIOSET register. +// +//***************************************************************************** +#define UDMA_PRIOSET_SET_M 0xFFFFFFFF // Channel [n] Priority Set + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_PRIOCLR register. +// +//***************************************************************************** +#define UDMA_PRIOCLR_CLR_M 0xFFFFFFFF // Channel [n] Priority Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_ERRCLR register. +// +//***************************************************************************** +#define UDMA_ERRCLR_ERRCLR 0x00000001 // uDMA Bus Error Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_CHASGN register. +// +//***************************************************************************** +#define UDMA_CHASGN_M 0xFFFFFFFF // Channel [n] Assignment Select +#define UDMA_CHASGN_PRIMARY 0x00000000 // Use the primary channel + // assignment +#define UDMA_CHASGN_SECONDARY 0x00000001 // Use the secondary channel + // assignment + +//***************************************************************************** +// +// The following are defines for the Micro Direct Memory Access (uDMA) offsets. +// +//***************************************************************************** +#define UDMA_O_SRCENDP 0x00000000 // DMA Channel Source Address End + // Pointer +#define UDMA_O_DSTENDP 0x00000004 // DMA Channel Destination Address + // End Pointer +#define UDMA_O_CHCTL 0x00000008 // DMA Channel Control Word + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_SRCENDP register. +// +//***************************************************************************** +#define UDMA_SRCENDP_ADDR_M 0xFFFFFFFF // Source Address End Pointer +#define UDMA_SRCENDP_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_DSTENDP register. +// +//***************************************************************************** +#define UDMA_DSTENDP_ADDR_M 0xFFFFFFFF // Destination Address End Pointer +#define UDMA_DSTENDP_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UDMA_O_CHCTL register. +// +//***************************************************************************** +#define UDMA_CHCTL_DSTINC_M 0xC0000000 // Destination Address Increment +#define UDMA_CHCTL_DSTINC_8 0x00000000 // Byte +#define UDMA_CHCTL_DSTINC_16 0x40000000 // Half-word +#define UDMA_CHCTL_DSTINC_32 0x80000000 // Word +#define UDMA_CHCTL_DSTINC_NONE 0xC0000000 // No increment +#define UDMA_CHCTL_DSTSIZE_M 0x30000000 // Destination Data Size +#define UDMA_CHCTL_DSTSIZE_8 0x00000000 // Byte +#define UDMA_CHCTL_DSTSIZE_16 0x10000000 // Half-word +#define UDMA_CHCTL_DSTSIZE_32 0x20000000 // Word +#define UDMA_CHCTL_SRCINC_M 0x0C000000 // Source Address Increment +#define UDMA_CHCTL_SRCINC_8 0x00000000 // Byte +#define UDMA_CHCTL_SRCINC_16 0x04000000 // Half-word +#define UDMA_CHCTL_SRCINC_32 0x08000000 // Word +#define UDMA_CHCTL_SRCINC_NONE 0x0C000000 // No increment +#define UDMA_CHCTL_SRCSIZE_M 0x03000000 // Source Data Size +#define UDMA_CHCTL_SRCSIZE_8 0x00000000 // Byte +#define UDMA_CHCTL_SRCSIZE_16 0x01000000 // Half-word +#define UDMA_CHCTL_SRCSIZE_32 0x02000000 // Word +#define UDMA_CHCTL_ARBSIZE_M 0x0003C000 // Arbitration Size +#define UDMA_CHCTL_ARBSIZE_1 0x00000000 // 1 Transfer +#define UDMA_CHCTL_ARBSIZE_2 0x00004000 // 2 Transfers +#define UDMA_CHCTL_ARBSIZE_4 0x00008000 // 4 Transfers +#define UDMA_CHCTL_ARBSIZE_8 0x0000C000 // 8 Transfers +#define UDMA_CHCTL_ARBSIZE_16 0x00010000 // 16 Transfers +#define UDMA_CHCTL_ARBSIZE_32 0x00014000 // 32 Transfers +#define UDMA_CHCTL_ARBSIZE_64 0x00018000 // 64 Transfers +#define UDMA_CHCTL_ARBSIZE_128 0x0001C000 // 128 Transfers +#define UDMA_CHCTL_ARBSIZE_256 0x00020000 // 256 Transfers +#define UDMA_CHCTL_ARBSIZE_512 0x00024000 // 512 Transfers +#define UDMA_CHCTL_ARBSIZE_1024 0x00028000 // 1024 Transfers +#define UDMA_CHCTL_XFERSIZE_M 0x00003FF0 // Transfer Size (minus 1) +#define UDMA_CHCTL_NXTUSEBURST 0x00000008 // Next Useburst +#define UDMA_CHCTL_XFERMODE_M 0x00000007 // uDMA Transfer Mode +#define UDMA_CHCTL_XFERMODE_STOP \ + 0x00000000 // Stop +#define UDMA_CHCTL_XFERMODE_BASIC \ + 0x00000001 // Basic +#define UDMA_CHCTL_XFERMODE_AUTO \ + 0x00000002 // Auto-Request +#define UDMA_CHCTL_XFERMODE_PINGPONG \ + 0x00000003 // Ping-Pong +#define UDMA_CHCTL_XFERMODE_MEM_SG \ + 0x00000004 // Memory Scatter-Gather +#define UDMA_CHCTL_XFERMODE_MEM_SGA \ + 0x00000005 // Alternate Memory Scatter-Gather +#define UDMA_CHCTL_XFERMODE_PER_SG \ + 0x00000006 // Peripheral Scatter-Gather +#define UDMA_CHCTL_XFERMODE_PER_SGA \ + 0x00000007 // Alternate Peripheral + // Scatter-Gather +#define UDMA_CHCTL_XFERSIZE_S 4 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Micro Direct Memory Access +// register addresses. +// +//***************************************************************************** +#define UDMA_CHALT 0x400FF500 // DMA Channel Alternate Select + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UDMA_ENASET +// register. +// +//***************************************************************************** +#define UDMA_ENASET_CHENSET_M 0xFFFFFFFF // Channel [n] Enable Set + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the UDMA_CHALT +// register. +// +//***************************************************************************** +#define UDMA_CHALT_M 0xFFFFFFFF // Channel [n] Alternate Assignment + // Select + +#endif + +#endif // __HW_UDMA_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_usb.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_usb.h new file mode 100644 index 00000000..0dda4a4c --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_usb.h @@ -0,0 +1,4620 @@ +//***************************************************************************** +// +// hw_usb.h - Macros for use in accessing the USB registers. +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_USB_H__ +#define __HW_USB_H__ + +//***************************************************************************** +// +// The following are defines for the Univeral Serial Bus register offsets. +// +//***************************************************************************** +#define USB_O_FADDR 0x00000000 // USB Device Functional Address +#define USB_O_POWER 0x00000001 // USB Power +#define USB_O_TXIS 0x00000002 // USB Transmit Interrupt Status +#define USB_O_RXIS 0x00000004 // USB Receive Interrupt Status +#define USB_O_TXIE 0x00000006 // USB Transmit Interrupt Enable +#define USB_O_RXIE 0x00000008 // USB Receive Interrupt Enable +#define USB_O_IS 0x0000000A // USB General Interrupt Status +#define USB_O_IE 0x0000000B // USB Interrupt Enable +#define USB_O_FRAME 0x0000000C // USB Frame Value +#define USB_O_EPIDX 0x0000000E // USB Endpoint Index +#define USB_O_TEST 0x0000000F // USB Test Mode +#define USB_O_FIFO0 0x00000020 // USB FIFO Endpoint 0 +#define USB_O_FIFO1 0x00000024 // USB FIFO Endpoint 1 +#define USB_O_FIFO2 0x00000028 // USB FIFO Endpoint 2 +#define USB_O_FIFO3 0x0000002C // USB FIFO Endpoint 3 +#define USB_O_FIFO4 0x00000030 // USB FIFO Endpoint 4 +#define USB_O_FIFO5 0x00000034 // USB FIFO Endpoint 5 +#define USB_O_FIFO6 0x00000038 // USB FIFO Endpoint 6 +#define USB_O_FIFO7 0x0000003C // USB FIFO Endpoint 7 +#define USB_O_FIFO8 0x00000040 // USB FIFO Endpoint 8 +#define USB_O_FIFO9 0x00000044 // USB FIFO Endpoint 9 +#define USB_O_FIFO10 0x00000048 // USB FIFO Endpoint 10 +#define USB_O_FIFO11 0x0000004C // USB FIFO Endpoint 11 +#define USB_O_FIFO12 0x00000050 // USB FIFO Endpoint 12 +#define USB_O_FIFO13 0x00000054 // USB FIFO Endpoint 13 +#define USB_O_FIFO14 0x00000058 // USB FIFO Endpoint 14 +#define USB_O_FIFO15 0x0000005C // USB FIFO Endpoint 15 +#define USB_O_DEVCTL 0x00000060 // USB Device Control +#define USB_O_TXFIFOSZ 0x00000062 // USB Transmit Dynamic FIFO Sizing +#define USB_O_RXFIFOSZ 0x00000063 // USB Receive Dynamic FIFO Sizing +#define USB_O_TXFIFOADD 0x00000064 // USB Transmit FIFO Start Address +#define USB_O_RXFIFOADD 0x00000066 // USB Receive FIFO Start Address +#define USB_O_CONTIM 0x0000007A // USB Connect Timing +#define USB_O_VPLEN 0x0000007B // USB OTG VBUS Pulse Timing +#define USB_O_FSEOF 0x0000007D // USB Full-Speed Last Transaction + // to End of Frame Timing +#define USB_O_LSEOF 0x0000007E // USB Low-Speed Last Transaction + // to End of Frame Timing +#define USB_O_TXFUNCADDR0 0x00000080 // USB Transmit Functional Address + // Endpoint 0 +#define USB_O_TXHUBADDR0 0x00000082 // USB Transmit Hub Address + // Endpoint 0 +#define USB_O_TXHUBPORT0 0x00000083 // USB Transmit Hub Port Endpoint 0 +#define USB_O_TXFUNCADDR1 0x00000088 // USB Transmit Functional Address + // Endpoint 1 +#define USB_O_TXHUBADDR1 0x0000008A // USB Transmit Hub Address + // Endpoint 1 +#define USB_O_TXHUBPORT1 0x0000008B // USB Transmit Hub Port Endpoint 1 +#define USB_O_RXFUNCADDR1 0x0000008C // USB Receive Functional Address + // Endpoint 1 +#define USB_O_RXHUBADDR1 0x0000008E // USB Receive Hub Address Endpoint + // 1 +#define USB_O_RXHUBPORT1 0x0000008F // USB Receive Hub Port Endpoint 1 +#define USB_O_TXFUNCADDR2 0x00000090 // USB Transmit Functional Address + // Endpoint 2 +#define USB_O_TXHUBADDR2 0x00000092 // USB Transmit Hub Address + // Endpoint 2 +#define USB_O_TXHUBPORT2 0x00000093 // USB Transmit Hub Port Endpoint 2 +#define USB_O_RXFUNCADDR2 0x00000094 // USB Receive Functional Address + // Endpoint 2 +#define USB_O_RXHUBADDR2 0x00000096 // USB Receive Hub Address Endpoint + // 2 +#define USB_O_RXHUBPORT2 0x00000097 // USB Receive Hub Port Endpoint 2 +#define USB_O_TXFUNCADDR3 0x00000098 // USB Transmit Functional Address + // Endpoint 3 +#define USB_O_TXHUBADDR3 0x0000009A // USB Transmit Hub Address + // Endpoint 3 +#define USB_O_TXHUBPORT3 0x0000009B // USB Transmit Hub Port Endpoint 3 +#define USB_O_RXFUNCADDR3 0x0000009C // USB Receive Functional Address + // Endpoint 3 +#define USB_O_RXHUBADDR3 0x0000009E // USB Receive Hub Address Endpoint + // 3 +#define USB_O_RXHUBPORT3 0x0000009F // USB Receive Hub Port Endpoint 3 +#define USB_O_TXFUNCADDR4 0x000000A0 // USB Transmit Functional Address + // Endpoint 4 +#define USB_O_TXHUBADDR4 0x000000A2 // USB Transmit Hub Address + // Endpoint 4 +#define USB_O_TXHUBPORT4 0x000000A3 // USB Transmit Hub Port Endpoint 4 +#define USB_O_RXFUNCADDR4 0x000000A4 // USB Receive Functional Address + // Endpoint 4 +#define USB_O_RXHUBADDR4 0x000000A6 // USB Receive Hub Address Endpoint + // 4 +#define USB_O_RXHUBPORT4 0x000000A7 // USB Receive Hub Port Endpoint 4 +#define USB_O_TXFUNCADDR5 0x000000A8 // USB Transmit Functional Address + // Endpoint 5 +#define USB_O_TXHUBADDR5 0x000000AA // USB Transmit Hub Address + // Endpoint 5 +#define USB_O_TXHUBPORT5 0x000000AB // USB Transmit Hub Port Endpoint 5 +#define USB_O_RXFUNCADDR5 0x000000AC // USB Receive Functional Address + // Endpoint 5 +#define USB_O_RXHUBADDR5 0x000000AE // USB Receive Hub Address Endpoint + // 5 +#define USB_O_RXHUBPORT5 0x000000AF // USB Receive Hub Port Endpoint 5 +#define USB_O_TXFUNCADDR6 0x000000B0 // USB Transmit Functional Address + // Endpoint 6 +#define USB_O_TXHUBADDR6 0x000000B2 // USB Transmit Hub Address + // Endpoint 6 +#define USB_O_TXHUBPORT6 0x000000B3 // USB Transmit Hub Port Endpoint 6 +#define USB_O_RXFUNCADDR6 0x000000B4 // USB Receive Functional Address + // Endpoint 6 +#define USB_O_RXHUBADDR6 0x000000B6 // USB Receive Hub Address Endpoint + // 6 +#define USB_O_RXHUBPORT6 0x000000B7 // USB Receive Hub Port Endpoint 6 +#define USB_O_TXFUNCADDR7 0x000000B8 // USB Transmit Functional Address + // Endpoint 7 +#define USB_O_TXHUBADDR7 0x000000BA // USB Transmit Hub Address + // Endpoint 7 +#define USB_O_TXHUBPORT7 0x000000BB // USB Transmit Hub Port Endpoint 7 +#define USB_O_RXFUNCADDR7 0x000000BC // USB Receive Functional Address + // Endpoint 7 +#define USB_O_RXHUBADDR7 0x000000BE // USB Receive Hub Address Endpoint + // 7 +#define USB_O_RXHUBPORT7 0x000000BF // USB Receive Hub Port Endpoint 7 +#define USB_O_TXFUNCADDR8 0x000000C0 // USB Transmit Functional Address + // Endpoint 8 +#define USB_O_TXHUBADDR8 0x000000C2 // USB Transmit Hub Address + // Endpoint 8 +#define USB_O_TXHUBPORT8 0x000000C3 // USB Transmit Hub Port Endpoint 8 +#define USB_O_RXFUNCADDR8 0x000000C4 // USB Receive Functional Address + // Endpoint 8 +#define USB_O_RXHUBADDR8 0x000000C6 // USB Receive Hub Address Endpoint + // 8 +#define USB_O_RXHUBPORT8 0x000000C7 // USB Receive Hub Port Endpoint 8 +#define USB_O_TXFUNCADDR9 0x000000C8 // USB Transmit Functional Address + // Endpoint 9 +#define USB_O_TXHUBADDR9 0x000000CA // USB Transmit Hub Address + // Endpoint 9 +#define USB_O_TXHUBPORT9 0x000000CB // USB Transmit Hub Port Endpoint 9 +#define USB_O_RXFUNCADDR9 0x000000CC // USB Receive Functional Address + // Endpoint 9 +#define USB_O_RXHUBADDR9 0x000000CE // USB Receive Hub Address Endpoint + // 9 +#define USB_O_RXHUBPORT9 0x000000CF // USB Receive Hub Port Endpoint 9 +#define USB_O_TXFUNCADDR10 0x000000D0 // USB Transmit Functional Address + // Endpoint 10 +#define USB_O_TXHUBADDR10 0x000000D2 // USB Transmit Hub Address + // Endpoint 10 +#define USB_O_TXHUBPORT10 0x000000D3 // USB Transmit Hub Port Endpoint + // 10 +#define USB_O_RXFUNCADDR10 0x000000D4 // USB Receive Functional Address + // Endpoint 10 +#define USB_O_RXHUBADDR10 0x000000D6 // USB Receive Hub Address Endpoint + // 10 +#define USB_O_RXHUBPORT10 0x000000D7 // USB Receive Hub Port Endpoint 10 +#define USB_O_TXFUNCADDR11 0x000000D8 // USB Transmit Functional Address + // Endpoint 11 +#define USB_O_TXHUBADDR11 0x000000DA // USB Transmit Hub Address + // Endpoint 11 +#define USB_O_TXHUBPORT11 0x000000DB // USB Transmit Hub Port Endpoint + // 11 +#define USB_O_RXFUNCADDR11 0x000000DC // USB Receive Functional Address + // Endpoint 11 +#define USB_O_RXHUBADDR11 0x000000DE // USB Receive Hub Address Endpoint + // 11 +#define USB_O_RXHUBPORT11 0x000000DF // USB Receive Hub Port Endpoint 11 +#define USB_O_TXFUNCADDR12 0x000000E0 // USB Transmit Functional Address + // Endpoint 12 +#define USB_O_TXHUBADDR12 0x000000E2 // USB Transmit Hub Address + // Endpoint 12 +#define USB_O_TXHUBPORT12 0x000000E3 // USB Transmit Hub Port Endpoint + // 12 +#define USB_O_RXFUNCADDR12 0x000000E4 // USB Receive Functional Address + // Endpoint 12 +#define USB_O_RXHUBADDR12 0x000000E6 // USB Receive Hub Address Endpoint + // 12 +#define USB_O_RXHUBPORT12 0x000000E7 // USB Receive Hub Port Endpoint 12 +#define USB_O_TXFUNCADDR13 0x000000E8 // USB Transmit Functional Address + // Endpoint 13 +#define USB_O_TXHUBADDR13 0x000000EA // USB Transmit Hub Address + // Endpoint 13 +#define USB_O_TXHUBPORT13 0x000000EB // USB Transmit Hub Port Endpoint + // 13 +#define USB_O_RXFUNCADDR13 0x000000EC // USB Receive Functional Address + // Endpoint 13 +#define USB_O_RXHUBADDR13 0x000000EE // USB Receive Hub Address Endpoint + // 13 +#define USB_O_RXHUBPORT13 0x000000EF // USB Receive Hub Port Endpoint 13 +#define USB_O_TXFUNCADDR14 0x000000F0 // USB Transmit Functional Address + // Endpoint 14 +#define USB_O_TXHUBADDR14 0x000000F2 // USB Transmit Hub Address + // Endpoint 14 +#define USB_O_TXHUBPORT14 0x000000F3 // USB Transmit Hub Port Endpoint + // 14 +#define USB_O_RXFUNCADDR14 0x000000F4 // USB Receive Functional Address + // Endpoint 14 +#define USB_O_RXHUBADDR14 0x000000F6 // USB Receive Hub Address Endpoint + // 14 +#define USB_O_RXHUBPORT14 0x000000F7 // USB Receive Hub Port Endpoint 14 +#define USB_O_TXFUNCADDR15 0x000000F8 // USB Transmit Functional Address + // Endpoint 15 +#define USB_O_TXHUBADDR15 0x000000FA // USB Transmit Hub Address + // Endpoint 15 +#define USB_O_TXHUBPORT15 0x000000FB // USB Transmit Hub Port Endpoint + // 15 +#define USB_O_RXFUNCADDR15 0x000000FC // USB Receive Functional Address + // Endpoint 15 +#define USB_O_RXHUBADDR15 0x000000FE // USB Receive Hub Address Endpoint + // 15 +#define USB_O_RXHUBPORT15 0x000000FF // USB Receive Hub Port Endpoint 15 +#define USB_O_CSRL0 0x00000102 // USB Control and Status Endpoint + // 0 Low +#define USB_O_CSRH0 0x00000103 // USB Control and Status Endpoint + // 0 High +#define USB_O_COUNT0 0x00000108 // USB Receive Byte Count Endpoint + // 0 +#define USB_O_TYPE0 0x0000010A // USB Type Endpoint 0 +#define USB_O_NAKLMT 0x0000010B // USB NAK Limit +#define USB_O_TXMAXP1 0x00000110 // USB Maximum Transmit Data + // Endpoint 1 +#define USB_O_TXCSRL1 0x00000112 // USB Transmit Control and Status + // Endpoint 1 Low +#define USB_O_TXCSRH1 0x00000113 // USB Transmit Control and Status + // Endpoint 1 High +#define USB_O_RXMAXP1 0x00000114 // USB Maximum Receive Data + // Endpoint 1 +#define USB_O_RXCSRL1 0x00000116 // USB Receive Control and Status + // Endpoint 1 Low +#define USB_O_RXCSRH1 0x00000117 // USB Receive Control and Status + // Endpoint 1 High +#define USB_O_RXCOUNT1 0x00000118 // USB Receive Byte Count Endpoint + // 1 +#define USB_O_TXTYPE1 0x0000011A // USB Host Transmit Configure Type + // Endpoint 1 +#define USB_O_TXINTERVAL1 0x0000011B // USB Host Transmit Interval + // Endpoint 1 +#define USB_O_RXTYPE1 0x0000011C // USB Host Configure Receive Type + // Endpoint 1 +#define USB_O_RXINTERVAL1 0x0000011D // USB Host Receive Polling + // Interval Endpoint 1 +#define USB_O_TXMAXP2 0x00000120 // USB Maximum Transmit Data + // Endpoint 2 +#define USB_O_TXCSRL2 0x00000122 // USB Transmit Control and Status + // Endpoint 2 Low +#define USB_O_TXCSRH2 0x00000123 // USB Transmit Control and Status + // Endpoint 2 High +#define USB_O_RXMAXP2 0x00000124 // USB Maximum Receive Data + // Endpoint 2 +#define USB_O_RXCSRL2 0x00000126 // USB Receive Control and Status + // Endpoint 2 Low +#define USB_O_RXCSRH2 0x00000127 // USB Receive Control and Status + // Endpoint 2 High +#define USB_O_RXCOUNT2 0x00000128 // USB Receive Byte Count Endpoint + // 2 +#define USB_O_TXTYPE2 0x0000012A // USB Host Transmit Configure Type + // Endpoint 2 +#define USB_O_TXINTERVAL2 0x0000012B // USB Host Transmit Interval + // Endpoint 2 +#define USB_O_RXTYPE2 0x0000012C // USB Host Configure Receive Type + // Endpoint 2 +#define USB_O_RXINTERVAL2 0x0000012D // USB Host Receive Polling + // Interval Endpoint 2 +#define USB_O_TXMAXP3 0x00000130 // USB Maximum Transmit Data + // Endpoint 3 +#define USB_O_TXCSRL3 0x00000132 // USB Transmit Control and Status + // Endpoint 3 Low +#define USB_O_TXCSRH3 0x00000133 // USB Transmit Control and Status + // Endpoint 3 High +#define USB_O_RXMAXP3 0x00000134 // USB Maximum Receive Data + // Endpoint 3 +#define USB_O_RXCSRL3 0x00000136 // USB Receive Control and Status + // Endpoint 3 Low +#define USB_O_RXCSRH3 0x00000137 // USB Receive Control and Status + // Endpoint 3 High +#define USB_O_RXCOUNT3 0x00000138 // USB Receive Byte Count Endpoint + // 3 +#define USB_O_TXTYPE3 0x0000013A // USB Host Transmit Configure Type + // Endpoint 3 +#define USB_O_TXINTERVAL3 0x0000013B // USB Host Transmit Interval + // Endpoint 3 +#define USB_O_RXTYPE3 0x0000013C // USB Host Configure Receive Type + // Endpoint 3 +#define USB_O_RXINTERVAL3 0x0000013D // USB Host Receive Polling + // Interval Endpoint 3 +#define USB_O_TXMAXP4 0x00000140 // USB Maximum Transmit Data + // Endpoint 4 +#define USB_O_TXCSRL4 0x00000142 // USB Transmit Control and Status + // Endpoint 4 Low +#define USB_O_TXCSRH4 0x00000143 // USB Transmit Control and Status + // Endpoint 4 High +#define USB_O_RXMAXP4 0x00000144 // USB Maximum Receive Data + // Endpoint 4 +#define USB_O_RXCSRL4 0x00000146 // USB Receive Control and Status + // Endpoint 4 Low +#define USB_O_RXCSRH4 0x00000147 // USB Receive Control and Status + // Endpoint 4 High +#define USB_O_RXCOUNT4 0x00000148 // USB Receive Byte Count Endpoint + // 4 +#define USB_O_TXTYPE4 0x0000014A // USB Host Transmit Configure Type + // Endpoint 4 +#define USB_O_TXINTERVAL4 0x0000014B // USB Host Transmit Interval + // Endpoint 4 +#define USB_O_RXTYPE4 0x0000014C // USB Host Configure Receive Type + // Endpoint 4 +#define USB_O_RXINTERVAL4 0x0000014D // USB Host Receive Polling + // Interval Endpoint 4 +#define USB_O_TXMAXP5 0x00000150 // USB Maximum Transmit Data + // Endpoint 5 +#define USB_O_TXCSRL5 0x00000152 // USB Transmit Control and Status + // Endpoint 5 Low +#define USB_O_TXCSRH5 0x00000153 // USB Transmit Control and Status + // Endpoint 5 High +#define USB_O_RXMAXP5 0x00000154 // USB Maximum Receive Data + // Endpoint 5 +#define USB_O_RXCSRL5 0x00000156 // USB Receive Control and Status + // Endpoint 5 Low +#define USB_O_RXCSRH5 0x00000157 // USB Receive Control and Status + // Endpoint 5 High +#define USB_O_RXCOUNT5 0x00000158 // USB Receive Byte Count Endpoint + // 5 +#define USB_O_TXTYPE5 0x0000015A // USB Host Transmit Configure Type + // Endpoint 5 +#define USB_O_TXINTERVAL5 0x0000015B // USB Host Transmit Interval + // Endpoint 5 +#define USB_O_RXTYPE5 0x0000015C // USB Host Configure Receive Type + // Endpoint 5 +#define USB_O_RXINTERVAL5 0x0000015D // USB Host Receive Polling + // Interval Endpoint 5 +#define USB_O_TXMAXP6 0x00000160 // USB Maximum Transmit Data + // Endpoint 6 +#define USB_O_TXCSRL6 0x00000162 // USB Transmit Control and Status + // Endpoint 6 Low +#define USB_O_TXCSRH6 0x00000163 // USB Transmit Control and Status + // Endpoint 6 High +#define USB_O_RXMAXP6 0x00000164 // USB Maximum Receive Data + // Endpoint 6 +#define USB_O_RXCSRL6 0x00000166 // USB Receive Control and Status + // Endpoint 6 Low +#define USB_O_RXCSRH6 0x00000167 // USB Receive Control and Status + // Endpoint 6 High +#define USB_O_RXCOUNT6 0x00000168 // USB Receive Byte Count Endpoint + // 6 +#define USB_O_TXTYPE6 0x0000016A // USB Host Transmit Configure Type + // Endpoint 6 +#define USB_O_TXINTERVAL6 0x0000016B // USB Host Transmit Interval + // Endpoint 6 +#define USB_O_RXTYPE6 0x0000016C // USB Host Configure Receive Type + // Endpoint 6 +#define USB_O_RXINTERVAL6 0x0000016D // USB Host Receive Polling + // Interval Endpoint 6 +#define USB_O_TXMAXP7 0x00000170 // USB Maximum Transmit Data + // Endpoint 7 +#define USB_O_TXCSRL7 0x00000172 // USB Transmit Control and Status + // Endpoint 7 Low +#define USB_O_TXCSRH7 0x00000173 // USB Transmit Control and Status + // Endpoint 7 High +#define USB_O_RXMAXP7 0x00000174 // USB Maximum Receive Data + // Endpoint 7 +#define USB_O_RXCSRL7 0x00000176 // USB Receive Control and Status + // Endpoint 7 Low +#define USB_O_RXCSRH7 0x00000177 // USB Receive Control and Status + // Endpoint 7 High +#define USB_O_RXCOUNT7 0x00000178 // USB Receive Byte Count Endpoint + // 7 +#define USB_O_TXTYPE7 0x0000017A // USB Host Transmit Configure Type + // Endpoint 7 +#define USB_O_TXINTERVAL7 0x0000017B // USB Host Transmit Interval + // Endpoint 7 +#define USB_O_RXTYPE7 0x0000017C // USB Host Configure Receive Type + // Endpoint 7 +#define USB_O_RXINTERVAL7 0x0000017D // USB Host Receive Polling + // Interval Endpoint 7 +#define USB_O_TXMAXP8 0x00000180 // USB Maximum Transmit Data + // Endpoint 8 +#define USB_O_TXCSRL8 0x00000182 // USB Transmit Control and Status + // Endpoint 8 Low +#define USB_O_TXCSRH8 0x00000183 // USB Transmit Control and Status + // Endpoint 8 High +#define USB_O_RXMAXP8 0x00000184 // USB Maximum Receive Data + // Endpoint 8 +#define USB_O_RXCSRL8 0x00000186 // USB Receive Control and Status + // Endpoint 8 Low +#define USB_O_RXCSRH8 0x00000187 // USB Receive Control and Status + // Endpoint 8 High +#define USB_O_RXCOUNT8 0x00000188 // USB Receive Byte Count Endpoint + // 8 +#define USB_O_TXTYPE8 0x0000018A // USB Host Transmit Configure Type + // Endpoint 8 +#define USB_O_TXINTERVAL8 0x0000018B // USB Host Transmit Interval + // Endpoint 8 +#define USB_O_RXTYPE8 0x0000018C // USB Host Configure Receive Type + // Endpoint 8 +#define USB_O_RXINTERVAL8 0x0000018D // USB Host Receive Polling + // Interval Endpoint 8 +#define USB_O_TXMAXP9 0x00000190 // USB Maximum Transmit Data + // Endpoint 9 +#define USB_O_TXCSRL9 0x00000192 // USB Transmit Control and Status + // Endpoint 9 Low +#define USB_O_TXCSRH9 0x00000193 // USB Transmit Control and Status + // Endpoint 9 High +#define USB_O_RXMAXP9 0x00000194 // USB Maximum Receive Data + // Endpoint 9 +#define USB_O_RXCSRL9 0x00000196 // USB Receive Control and Status + // Endpoint 9 Low +#define USB_O_RXCSRH9 0x00000197 // USB Receive Control and Status + // Endpoint 9 High +#define USB_O_RXCOUNT9 0x00000198 // USB Receive Byte Count Endpoint + // 9 +#define USB_O_TXTYPE9 0x0000019A // USB Host Transmit Configure Type + // Endpoint 9 +#define USB_O_TXINTERVAL9 0x0000019B // USB Host Transmit Interval + // Endpoint 9 +#define USB_O_RXTYPE9 0x0000019C // USB Host Configure Receive Type + // Endpoint 9 +#define USB_O_RXINTERVAL9 0x0000019D // USB Host Receive Polling + // Interval Endpoint 9 +#define USB_O_TXMAXP10 0x000001A0 // USB Maximum Transmit Data + // Endpoint 10 +#define USB_O_TXCSRL10 0x000001A2 // USB Transmit Control and Status + // Endpoint 10 Low +#define USB_O_TXCSRH10 0x000001A3 // USB Transmit Control and Status + // Endpoint 10 High +#define USB_O_RXMAXP10 0x000001A4 // USB Maximum Receive Data + // Endpoint 10 +#define USB_O_RXCSRL10 0x000001A6 // USB Receive Control and Status + // Endpoint 10 Low +#define USB_O_RXCSRH10 0x000001A7 // USB Receive Control and Status + // Endpoint 10 High +#define USB_O_RXCOUNT10 0x000001A8 // USB Receive Byte Count Endpoint + // 10 +#define USB_O_TXTYPE10 0x000001AA // USB Host Transmit Configure Type + // Endpoint 10 +#define USB_O_TXINTERVAL10 0x000001AB // USB Host Transmit Interval + // Endpoint 10 +#define USB_O_RXTYPE10 0x000001AC // USB Host Configure Receive Type + // Endpoint 10 +#define USB_O_RXINTERVAL10 0x000001AD // USB Host Receive Polling + // Interval Endpoint 10 +#define USB_O_TXMAXP11 0x000001B0 // USB Maximum Transmit Data + // Endpoint 11 +#define USB_O_TXCSRL11 0x000001B2 // USB Transmit Control and Status + // Endpoint 11 Low +#define USB_O_TXCSRH11 0x000001B3 // USB Transmit Control and Status + // Endpoint 11 High +#define USB_O_RXMAXP11 0x000001B4 // USB Maximum Receive Data + // Endpoint 11 +#define USB_O_RXCSRL11 0x000001B6 // USB Receive Control and Status + // Endpoint 11 Low +#define USB_O_RXCSRH11 0x000001B7 // USB Receive Control and Status + // Endpoint 11 High +#define USB_O_RXCOUNT11 0x000001B8 // USB Receive Byte Count Endpoint + // 11 +#define USB_O_TXTYPE11 0x000001BA // USB Host Transmit Configure Type + // Endpoint 11 +#define USB_O_TXINTERVAL11 0x000001BB // USB Host Transmit Interval + // Endpoint 11 +#define USB_O_RXTYPE11 0x000001BC // USB Host Configure Receive Type + // Endpoint 11 +#define USB_O_RXINTERVAL11 0x000001BD // USB Host Receive Polling + // Interval Endpoint 11 +#define USB_O_TXMAXP12 0x000001C0 // USB Maximum Transmit Data + // Endpoint 12 +#define USB_O_TXCSRL12 0x000001C2 // USB Transmit Control and Status + // Endpoint 12 Low +#define USB_O_TXCSRH12 0x000001C3 // USB Transmit Control and Status + // Endpoint 12 High +#define USB_O_RXMAXP12 0x000001C4 // USB Maximum Receive Data + // Endpoint 12 +#define USB_O_RXCSRL12 0x000001C6 // USB Receive Control and Status + // Endpoint 12 Low +#define USB_O_RXCSRH12 0x000001C7 // USB Receive Control and Status + // Endpoint 12 High +#define USB_O_RXCOUNT12 0x000001C8 // USB Receive Byte Count Endpoint + // 12 +#define USB_O_TXTYPE12 0x000001CA // USB Host Transmit Configure Type + // Endpoint 12 +#define USB_O_TXINTERVAL12 0x000001CB // USB Host Transmit Interval + // Endpoint 12 +#define USB_O_RXTYPE12 0x000001CC // USB Host Configure Receive Type + // Endpoint 12 +#define USB_O_RXINTERVAL12 0x000001CD // USB Host Receive Polling + // Interval Endpoint 12 +#define USB_O_TXMAXP13 0x000001D0 // USB Maximum Transmit Data + // Endpoint 13 +#define USB_O_TXCSRL13 0x000001D2 // USB Transmit Control and Status + // Endpoint 13 Low +#define USB_O_TXCSRH13 0x000001D3 // USB Transmit Control and Status + // Endpoint 13 High +#define USB_O_RXMAXP13 0x000001D4 // USB Maximum Receive Data + // Endpoint 13 +#define USB_O_RXCSRL13 0x000001D6 // USB Receive Control and Status + // Endpoint 13 Low +#define USB_O_RXCSRH13 0x000001D7 // USB Receive Control and Status + // Endpoint 13 High +#define USB_O_RXCOUNT13 0x000001D8 // USB Receive Byte Count Endpoint + // 13 +#define USB_O_TXTYPE13 0x000001DA // USB Host Transmit Configure Type + // Endpoint 13 +#define USB_O_TXINTERVAL13 0x000001DB // USB Host Transmit Interval + // Endpoint 13 +#define USB_O_RXTYPE13 0x000001DC // USB Host Configure Receive Type + // Endpoint 13 +#define USB_O_RXINTERVAL13 0x000001DD // USB Host Receive Polling + // Interval Endpoint 13 +#define USB_O_TXMAXP14 0x000001E0 // USB Maximum Transmit Data + // Endpoint 14 +#define USB_O_TXCSRL14 0x000001E2 // USB Transmit Control and Status + // Endpoint 14 Low +#define USB_O_TXCSRH14 0x000001E3 // USB Transmit Control and Status + // Endpoint 14 High +#define USB_O_RXMAXP14 0x000001E4 // USB Maximum Receive Data + // Endpoint 14 +#define USB_O_RXCSRL14 0x000001E6 // USB Receive Control and Status + // Endpoint 14 Low +#define USB_O_RXCSRH14 0x000001E7 // USB Receive Control and Status + // Endpoint 14 High +#define USB_O_RXCOUNT14 0x000001E8 // USB Receive Byte Count Endpoint + // 14 +#define USB_O_TXTYPE14 0x000001EA // USB Host Transmit Configure Type + // Endpoint 14 +#define USB_O_TXINTERVAL14 0x000001EB // USB Host Transmit Interval + // Endpoint 14 +#define USB_O_RXTYPE14 0x000001EC // USB Host Configure Receive Type + // Endpoint 14 +#define USB_O_RXINTERVAL14 0x000001ED // USB Host Receive Polling + // Interval Endpoint 14 +#define USB_O_TXMAXP15 0x000001F0 // USB Maximum Transmit Data + // Endpoint 15 +#define USB_O_TXCSRL15 0x000001F2 // USB Transmit Control and Status + // Endpoint 15 Low +#define USB_O_TXCSRH15 0x000001F3 // USB Transmit Control and Status + // Endpoint 15 High +#define USB_O_RXMAXP15 0x000001F4 // USB Maximum Receive Data + // Endpoint 15 +#define USB_O_RXCSRL15 0x000001F6 // USB Receive Control and Status + // Endpoint 15 Low +#define USB_O_RXCSRH15 0x000001F7 // USB Receive Control and Status + // Endpoint 15 High +#define USB_O_RXCOUNT15 0x000001F8 // USB Receive Byte Count Endpoint + // 15 +#define USB_O_TXTYPE15 0x000001FA // USB Host Transmit Configure Type + // Endpoint 15 +#define USB_O_TXINTERVAL15 0x000001FB // USB Host Transmit Interval + // Endpoint 15 +#define USB_O_RXTYPE15 0x000001FC // USB Host Configure Receive Type + // Endpoint 15 +#define USB_O_RXINTERVAL15 0x000001FD // USB Host Receive Polling + // Interval Endpoint 15 +#define USB_O_RQPKTCOUNT1 0x00000304 // USB Request Packet Count in + // Block Transfer Endpoint 1 +#define USB_O_RQPKTCOUNT2 0x00000308 // USB Request Packet Count in + // Block Transfer Endpoint 2 +#define USB_O_RQPKTCOUNT3 0x0000030C // USB Request Packet Count in + // Block Transfer Endpoint 3 +#define USB_O_RQPKTCOUNT4 0x00000310 // USB Request Packet Count in + // Block Transfer Endpoint 4 +#define USB_O_RQPKTCOUNT5 0x00000314 // USB Request Packet Count in + // Block Transfer Endpoint 5 +#define USB_O_RQPKTCOUNT6 0x00000318 // USB Request Packet Count in + // Block Transfer Endpoint 6 +#define USB_O_RQPKTCOUNT7 0x0000031C // USB Request Packet Count in + // Block Transfer Endpoint 7 +#define USB_O_RQPKTCOUNT8 0x00000320 // USB Request Packet Count in + // Block Transfer Endpoint 8 +#define USB_O_RQPKTCOUNT9 0x00000324 // USB Request Packet Count in + // Block Transfer Endpoint 9 +#define USB_O_RQPKTCOUNT10 0x00000328 // USB Request Packet Count in + // Block Transfer Endpoint 10 +#define USB_O_RQPKTCOUNT11 0x0000032C // USB Request Packet Count in + // Block Transfer Endpoint 11 +#define USB_O_RQPKTCOUNT12 0x00000330 // USB Request Packet Count in + // Block Transfer Endpoint 12 +#define USB_O_RQPKTCOUNT13 0x00000334 // USB Request Packet Count in + // Block Transfer Endpoint 13 +#define USB_O_RQPKTCOUNT14 0x00000338 // USB Request Packet Count in + // Block Transfer Endpoint 14 +#define USB_O_RQPKTCOUNT15 0x0000033C // USB Request Packet Count in + // Block Transfer Endpoint 15 +#define USB_O_RXDPKTBUFDIS 0x00000340 // USB Receive Double Packet Buffer + // Disable +#define USB_O_TXDPKTBUFDIS 0x00000342 // USB Transmit Double Packet + // Buffer Disable +#define USB_O_EPC 0x00000400 // USB External Power Control +#define USB_O_EPCRIS 0x00000404 // USB External Power Control Raw + // Interrupt Status +#define USB_O_EPCIM 0x00000408 // USB External Power Control + // Interrupt Mask +#define USB_O_EPCISC 0x0000040C // USB External Power Control + // Interrupt Status and Clear +#define USB_O_DRRIS 0x00000410 // USB Device RESUME Raw Interrupt + // Status +#define USB_O_DRIM 0x00000414 // USB Device RESUME Interrupt Mask +#define USB_O_DRISC 0x00000418 // USB Device RESUME Interrupt + // Status and Clear +#define USB_O_GPCS 0x0000041C // USB General-Purpose Control and + // Status +#define USB_O_VDC 0x00000430 // USB VBUS Droop Control +#define USB_O_VDCRIS 0x00000434 // USB VBUS Droop Control Raw + // Interrupt Status +#define USB_O_VDCIM 0x00000438 // USB VBUS Droop Control Interrupt + // Mask +#define USB_O_VDCISC 0x0000043C // USB VBUS Droop Control Interrupt + // Status and Clear +#define USB_O_IDVRIS 0x00000444 // USB ID Valid Detect Raw + // Interrupt Status +#define USB_O_IDVIM 0x00000448 // USB ID Valid Detect Interrupt + // Mask +#define USB_O_IDVISC 0x0000044C // USB ID Valid Detect Interrupt + // Status and Clear +#define USB_O_DMASEL 0x00000450 // USB DMA Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FADDR register. +// +//***************************************************************************** +#define USB_FADDR_M 0x0000007F // Function Address +#define USB_FADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_POWER register. +// +//***************************************************************************** +#define USB_POWER_ISOUP 0x00000080 // Isochronous Update +#define USB_POWER_SOFTCONN 0x00000040 // Soft Connect/Disconnect +#define USB_POWER_RESET 0x00000008 // RESET Signaling +#define USB_POWER_RESUME 0x00000004 // RESUME Signaling +#define USB_POWER_SUSPEND 0x00000002 // SUSPEND Mode +#define USB_POWER_PWRDNPHY 0x00000001 // Power Down PHY + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXIS register. +// +//***************************************************************************** +#define USB_TXIS_EP15 0x00008000 // TX Endpoint 15 Interrupt +#define USB_TXIS_EP14 0x00004000 // TX Endpoint 14 Interrupt +#define USB_TXIS_EP13 0x00002000 // TX Endpoint 13 Interrupt +#define USB_TXIS_EP12 0x00001000 // TX Endpoint 12 Interrupt +#define USB_TXIS_EP11 0x00000800 // TX Endpoint 11 Interrupt +#define USB_TXIS_EP10 0x00000400 // TX Endpoint 10 Interrupt +#define USB_TXIS_EP9 0x00000200 // TX Endpoint 9 Interrupt +#define USB_TXIS_EP8 0x00000100 // TX Endpoint 8 Interrupt +#define USB_TXIS_EP7 0x00000080 // TX Endpoint 7 Interrupt +#define USB_TXIS_EP6 0x00000040 // TX Endpoint 6 Interrupt +#define USB_TXIS_EP5 0x00000020 // TX Endpoint 5 Interrupt +#define USB_TXIS_EP4 0x00000010 // TX Endpoint 4 Interrupt +#define USB_TXIS_EP3 0x00000008 // TX Endpoint 3 Interrupt +#define USB_TXIS_EP2 0x00000004 // TX Endpoint 2 Interrupt +#define USB_TXIS_EP1 0x00000002 // TX Endpoint 1 Interrupt +#define USB_TXIS_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXIS register. +// +//***************************************************************************** +#define USB_RXIS_EP15 0x00008000 // RX Endpoint 15 Interrupt +#define USB_RXIS_EP14 0x00004000 // RX Endpoint 14 Interrupt +#define USB_RXIS_EP13 0x00002000 // RX Endpoint 13 Interrupt +#define USB_RXIS_EP12 0x00001000 // RX Endpoint 12 Interrupt +#define USB_RXIS_EP11 0x00000800 // RX Endpoint 11 Interrupt +#define USB_RXIS_EP10 0x00000400 // RX Endpoint 10 Interrupt +#define USB_RXIS_EP9 0x00000200 // RX Endpoint 9 Interrupt +#define USB_RXIS_EP8 0x00000100 // RX Endpoint 8 Interrupt +#define USB_RXIS_EP7 0x00000080 // RX Endpoint 7 Interrupt +#define USB_RXIS_EP6 0x00000040 // RX Endpoint 6 Interrupt +#define USB_RXIS_EP5 0x00000020 // RX Endpoint 5 Interrupt +#define USB_RXIS_EP4 0x00000010 // RX Endpoint 4 Interrupt +#define USB_RXIS_EP3 0x00000008 // RX Endpoint 3 Interrupt +#define USB_RXIS_EP2 0x00000004 // RX Endpoint 2 Interrupt +#define USB_RXIS_EP1 0x00000002 // RX Endpoint 1 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXIE register. +// +//***************************************************************************** +#define USB_TXIE_EP15 0x00008000 // TX Endpoint 15 Interrupt Enable +#define USB_TXIE_EP14 0x00004000 // TX Endpoint 14 Interrupt Enable +#define USB_TXIE_EP13 0x00002000 // TX Endpoint 13 Interrupt Enable +#define USB_TXIE_EP12 0x00001000 // TX Endpoint 12 Interrupt Enable +#define USB_TXIE_EP11 0x00000800 // TX Endpoint 11 Interrupt Enable +#define USB_TXIE_EP10 0x00000400 // TX Endpoint 10 Interrupt Enable +#define USB_TXIE_EP9 0x00000200 // TX Endpoint 9 Interrupt Enable +#define USB_TXIE_EP8 0x00000100 // TX Endpoint 8 Interrupt Enable +#define USB_TXIE_EP7 0x00000080 // TX Endpoint 7 Interrupt Enable +#define USB_TXIE_EP6 0x00000040 // TX Endpoint 6 Interrupt Enable +#define USB_TXIE_EP5 0x00000020 // TX Endpoint 5 Interrupt Enable +#define USB_TXIE_EP4 0x00000010 // TX Endpoint 4 Interrupt Enable +#define USB_TXIE_EP3 0x00000008 // TX Endpoint 3 Interrupt Enable +#define USB_TXIE_EP2 0x00000004 // TX Endpoint 2 Interrupt Enable +#define USB_TXIE_EP1 0x00000002 // TX Endpoint 1 Interrupt Enable +#define USB_TXIE_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXIE register. +// +//***************************************************************************** +#define USB_RXIE_EP15 0x00008000 // RX Endpoint 15 Interrupt Enable +#define USB_RXIE_EP14 0x00004000 // RX Endpoint 14 Interrupt Enable +#define USB_RXIE_EP13 0x00002000 // RX Endpoint 13 Interrupt Enable +#define USB_RXIE_EP12 0x00001000 // RX Endpoint 12 Interrupt Enable +#define USB_RXIE_EP11 0x00000800 // RX Endpoint 11 Interrupt Enable +#define USB_RXIE_EP10 0x00000400 // RX Endpoint 10 Interrupt Enable +#define USB_RXIE_EP9 0x00000200 // RX Endpoint 9 Interrupt Enable +#define USB_RXIE_EP8 0x00000100 // RX Endpoint 8 Interrupt Enable +#define USB_RXIE_EP7 0x00000080 // RX Endpoint 7 Interrupt Enable +#define USB_RXIE_EP6 0x00000040 // RX Endpoint 6 Interrupt Enable +#define USB_RXIE_EP5 0x00000020 // RX Endpoint 5 Interrupt Enable +#define USB_RXIE_EP4 0x00000010 // RX Endpoint 4 Interrupt Enable +#define USB_RXIE_EP3 0x00000008 // RX Endpoint 3 Interrupt Enable +#define USB_RXIE_EP2 0x00000004 // RX Endpoint 2 Interrupt Enable +#define USB_RXIE_EP1 0x00000002 // RX Endpoint 1 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IS register. +// +//***************************************************************************** +#define USB_IS_VBUSERR 0x00000080 // VBUS Error +#define USB_IS_SESREQ 0x00000040 // SESSION REQUEST +#define USB_IS_DISCON 0x00000020 // Session Disconnect +#define USB_IS_CONN 0x00000010 // Session Connect +#define USB_IS_SOF 0x00000008 // Start of Frame +#define USB_IS_BABBLE 0x00000004 // Babble Detected +#define USB_IS_RESET 0x00000004 // RESET Signaling Detected +#define USB_IS_RESUME 0x00000002 // RESUME Signaling Detected +#define USB_IS_SUSPEND 0x00000001 // SUSPEND Signaling Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IE register. +// +//***************************************************************************** +#define USB_IE_VBUSERR 0x00000080 // Enable VBUS Error Interrupt +#define USB_IE_SESREQ 0x00000040 // Enable Session Request +#define USB_IE_DISCON 0x00000020 // Enable Disconnect Interrupt +#define USB_IE_CONN 0x00000010 // Enable Connect Interrupt +#define USB_IE_SOF 0x00000008 // Enable Start-of-Frame Interrupt +#define USB_IE_BABBLE 0x00000004 // Enable Babble Interrupt +#define USB_IE_RESET 0x00000004 // Enable RESET Interrupt +#define USB_IE_RESUME 0x00000002 // Enable RESUME Interrupt +#define USB_IE_SUSPND 0x00000001 // Enable SUSPEND Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FRAME register. +// +//***************************************************************************** +#define USB_FRAME_M 0x000007FF // Frame Number +#define USB_FRAME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPIDX register. +// +//***************************************************************************** +#define USB_EPIDX_EPIDX_M 0x0000000F // Endpoint Index +#define USB_EPIDX_EPIDX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TEST register. +// +//***************************************************************************** +#define USB_TEST_FORCEH 0x00000080 // Force Host Mode +#define USB_TEST_FIFOACC 0x00000040 // FIFO Access +#define USB_TEST_FORCEFS 0x00000020 // Force Full-Speed Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO0 register. +// +//***************************************************************************** +#define USB_FIFO0_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO0_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO1 register. +// +//***************************************************************************** +#define USB_FIFO1_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO1_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO2 register. +// +//***************************************************************************** +#define USB_FIFO2_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO2_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO3 register. +// +//***************************************************************************** +#define USB_FIFO3_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO3_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO4 register. +// +//***************************************************************************** +#define USB_FIFO4_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO4_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO5 register. +// +//***************************************************************************** +#define USB_FIFO5_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO5_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO6 register. +// +//***************************************************************************** +#define USB_FIFO6_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO6_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO7 register. +// +//***************************************************************************** +#define USB_FIFO7_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO7_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO8 register. +// +//***************************************************************************** +#define USB_FIFO8_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO8_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO9 register. +// +//***************************************************************************** +#define USB_FIFO9_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO9_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO10 register. +// +//***************************************************************************** +#define USB_FIFO10_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO10_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO11 register. +// +//***************************************************************************** +#define USB_FIFO11_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO11_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO12 register. +// +//***************************************************************************** +#define USB_FIFO12_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO12_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO13 register. +// +//***************************************************************************** +#define USB_FIFO13_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO13_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO14 register. +// +//***************************************************************************** +#define USB_FIFO14_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO14_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FIFO15 register. +// +//***************************************************************************** +#define USB_FIFO15_EPDATA_M 0xFFFFFFFF // Endpoint Data +#define USB_FIFO15_EPDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DEVCTL register. +// +//***************************************************************************** +#define USB_DEVCTL_DEV 0x00000080 // Device Mode +#define USB_DEVCTL_FSDEV 0x00000040 // Full-Speed Device Detected +#define USB_DEVCTL_LSDEV 0x00000020 // Low-Speed Device Detected +#define USB_DEVCTL_VBUS_M 0x00000018 // VBUS Level +#define USB_DEVCTL_VBUS_NONE 0x00000000 // Below SessionEnd +#define USB_DEVCTL_VBUS_SEND 0x00000008 // Above SessionEnd, below AValid +#define USB_DEVCTL_VBUS_AVALID 0x00000010 // Above AValid, below VBUSValid +#define USB_DEVCTL_VBUS_VALID 0x00000018 // Above VBUSValid +#define USB_DEVCTL_HOST 0x00000004 // Host Mode +#define USB_DEVCTL_HOSTREQ 0x00000002 // Host Request +#define USB_DEVCTL_SESSION 0x00000001 // Session Start/End + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFIFOSZ register. +// +//***************************************************************************** +#define USB_TXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support +#define USB_TXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size +#define USB_TXFIFOSZ_SIZE_8 0x00000000 // 8 +#define USB_TXFIFOSZ_SIZE_16 0x00000001 // 16 +#define USB_TXFIFOSZ_SIZE_32 0x00000002 // 32 +#define USB_TXFIFOSZ_SIZE_64 0x00000003 // 64 +#define USB_TXFIFOSZ_SIZE_128 0x00000004 // 128 +#define USB_TXFIFOSZ_SIZE_256 0x00000005 // 256 +#define USB_TXFIFOSZ_SIZE_512 0x00000006 // 512 +#define USB_TXFIFOSZ_SIZE_1024 0x00000007 // 1024 +#define USB_TXFIFOSZ_SIZE_2048 0x00000008 // 2048 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFIFOSZ register. +// +//***************************************************************************** +#define USB_RXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support +#define USB_RXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size +#define USB_RXFIFOSZ_SIZE_8 0x00000000 // 8 +#define USB_RXFIFOSZ_SIZE_16 0x00000001 // 16 +#define USB_RXFIFOSZ_SIZE_32 0x00000002 // 32 +#define USB_RXFIFOSZ_SIZE_64 0x00000003 // 64 +#define USB_RXFIFOSZ_SIZE_128 0x00000004 // 128 +#define USB_RXFIFOSZ_SIZE_256 0x00000005 // 256 +#define USB_RXFIFOSZ_SIZE_512 0x00000006 // 512 +#define USB_RXFIFOSZ_SIZE_1024 0x00000007 // 1024 +#define USB_RXFIFOSZ_SIZE_2048 0x00000008 // 2048 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFIFOADD +// register. +// +//***************************************************************************** +#define USB_TXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address +#define USB_TXFIFOADD_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFIFOADD +// register. +// +//***************************************************************************** +#define USB_RXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address +#define USB_RXFIFOADD_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CONTIM register. +// +//***************************************************************************** +#define USB_CONTIM_WTCON_M 0x000000F0 // Connect Wait +#define USB_CONTIM_WTID_M 0x0000000F // Wait ID +#define USB_CONTIM_WTCON_S 4 +#define USB_CONTIM_WTID_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VPLEN register. +// +//***************************************************************************** +#define USB_VPLEN_VPLEN_M 0x000000FF // VBUS Pulse Length +#define USB_VPLEN_VPLEN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_FSEOF register. +// +//***************************************************************************** +#define USB_FSEOF_FSEOFG_M 0x000000FF // Full-Speed End-of-Frame Gap +#define USB_FSEOF_FSEOFG_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_LSEOF register. +// +//***************************************************************************** +#define USB_LSEOF_LSEOFG_M 0x000000FF // Low-Speed End-of-Frame Gap +#define USB_LSEOF_LSEOFG_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR0 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR0_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR0 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR0_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR0_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR0_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT0 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT0_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT0_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR1 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR1_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR1 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR1_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT1 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT1_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT1_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR1 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR1_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR1 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR1_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR1_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT1 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT1_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT1_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR2 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR2_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR2 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR2_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT2 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT2_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT2_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR2 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR2_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR2 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR2_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR2_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT2 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT2_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT2_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR3 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR3_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR3 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR3_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT3 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT3_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT3_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR3 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR3_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR3 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR3_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR3_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT3 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT3_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT3_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR4 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR4_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR4 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR4_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR4_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT4 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT4_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT4_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR4 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR4_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR4 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR4_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR4_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR4_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT4 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT4_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT4_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR5 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR5_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR5 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR5_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR5_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT5 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT5_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT5_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR5 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR5_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR5 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR5_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR5_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR5_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT5 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT5_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT5_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR6 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR6_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR6 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR6_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR6_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT6 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT6_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT6_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR6 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR6_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR6 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR6_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR6_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR6_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT6 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT6_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT6_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR7 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR7_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR7 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR7_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR7_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT7 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT7_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT7_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR7 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR7_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR7 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR7_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR7_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR7_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT7 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT7_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT7_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR8 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR8_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR8 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR8_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR8_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT8 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT8_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT8_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR8 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR8_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR8 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR8_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR8_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR8_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT8 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT8_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT8_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR9 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR9_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR9 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR9_MULTTRAN 0x00000080 // Multiple Translators +#define USB_TXHUBADDR9_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT9 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT9_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT9_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR9 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR9_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR9 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR9_MULTTRAN 0x00000080 // Multiple Translators +#define USB_RXHUBADDR9_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR9_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT9 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT9_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT9_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR10 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR10_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR10 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR10_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR10_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT10 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT10_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT10_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR10 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR10_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR10 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR10_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR10_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR10_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT10 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT10_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT10_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR11 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR11_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR11 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR11_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR11_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT11 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT11_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT11_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR11 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR11_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR11 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR11_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR11_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR11_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT11 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT11_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT11_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR12 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR12_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR12 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR12_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR12_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT12 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT12_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT12_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR12 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR12_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR12 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR12_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR12_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR12_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT12 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT12_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT12_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR13 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR13_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR13 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR13_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR13_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT13 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT13_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT13_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR13 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR13_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR13 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR13_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR13_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR13_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT13 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT13_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT13_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR14 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR14_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR14 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR14_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR14_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT14 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT14_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT14_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR14 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR14_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR14 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR14_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR14_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR14_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT14 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT14_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT14_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXFUNCADDR15 +// register. +// +//***************************************************************************** +#define USB_TXFUNCADDR15_ADDR_M 0x0000007F // Device Address +#define USB_TXFUNCADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBADDR15 +// register. +// +//***************************************************************************** +#define USB_TXHUBADDR15_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_TXHUBADDR15_ADDR_M 0x0000007F // Hub Address +#define USB_TXHUBADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXHUBPORT15 +// register. +// +//***************************************************************************** +#define USB_TXHUBPORT15_PORT_M 0x0000007F // Hub Port +#define USB_TXHUBPORT15_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXFUNCADDR15 +// register. +// +//***************************************************************************** +#define USB_RXFUNCADDR15_ADDR_M 0x0000007F // Device Address +#define USB_RXFUNCADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBADDR15 +// register. +// +//***************************************************************************** +#define USB_RXHUBADDR15_MULTTRAN \ + 0x00000080 // Multiple Translators +#define USB_RXHUBADDR15_ADDR_M 0x0000007F // Hub Address +#define USB_RXHUBADDR15_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXHUBPORT15 +// register. +// +//***************************************************************************** +#define USB_RXHUBPORT15_PORT_M 0x0000007F // Hub Port +#define USB_RXHUBPORT15_PORT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CSRL0 register. +// +//***************************************************************************** +#define USB_CSRL0_NAKTO 0x00000080 // NAK Timeout +#define USB_CSRL0_SETENDC 0x00000080 // Setup End Clear +#define USB_CSRL0_STATUS 0x00000040 // STATUS Packet +#define USB_CSRL0_RXRDYC 0x00000040 // RXRDY Clear +#define USB_CSRL0_REQPKT 0x00000020 // Request Packet +#define USB_CSRL0_STALL 0x00000020 // Send Stall +#define USB_CSRL0_SETEND 0x00000010 // Setup End +#define USB_CSRL0_ERROR 0x00000010 // Error +#define USB_CSRL0_DATAEND 0x00000008 // Data End +#define USB_CSRL0_SETUP 0x00000008 // Setup Packet +#define USB_CSRL0_STALLED 0x00000004 // Endpoint Stalled +#define USB_CSRL0_TXRDY 0x00000002 // Transmit Packet Ready +#define USB_CSRL0_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_CSRH0 register. +// +//***************************************************************************** +#define USB_CSRH0_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_CSRH0_DT 0x00000002 // Data Toggle +#define USB_CSRH0_FLUSH 0x00000001 // Flush FIFO + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_COUNT0 register. +// +//***************************************************************************** +#define USB_COUNT0_COUNT_M 0x0000007F // FIFO Count +#define USB_COUNT0_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TYPE0 register. +// +//***************************************************************************** +#define USB_TYPE0_SPEED_M 0x000000C0 // Operating Speed +#define USB_TYPE0_SPEED_FULL 0x00000080 // Full +#define USB_TYPE0_SPEED_LOW 0x000000C0 // Low + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_NAKLMT register. +// +//***************************************************************************** +#define USB_NAKLMT_NAKLMT_M 0x0000001F // EP0 NAK Limit +#define USB_NAKLMT_NAKLMT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP1 register. +// +//***************************************************************************** +#define USB_TXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP1_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL1 register. +// +//***************************************************************************** +#define USB_TXCSRL1_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL1_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL1_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL1_STALL 0x00000010 // Send STALL +#define USB_TXCSRL1_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL1_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL1_ERROR 0x00000004 // Error +#define USB_TXCSRL1_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL1_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL1_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH1 register. +// +//***************************************************************************** +#define USB_TXCSRH1_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH1_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH1_MODE 0x00000020 // Mode +#define USB_TXCSRH1_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH1_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH1_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH1_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH1_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP1 register. +// +//***************************************************************************** +#define USB_RXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP1_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL1 register. +// +//***************************************************************************** +#define USB_RXCSRL1_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL1_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL1_STALL 0x00000020 // Send STALL +#define USB_RXCSRL1_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL1_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL1_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL1_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL1_OVER 0x00000004 // Overrun +#define USB_RXCSRL1_ERROR 0x00000004 // Error +#define USB_RXCSRL1_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL1_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH1 register. +// +//***************************************************************************** +#define USB_RXCSRH1_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH1_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH1_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH1_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH1_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH1_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH1_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH1_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH1_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT1 register. +// +//***************************************************************************** +#define USB_RXCOUNT1_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT1_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE1 register. +// +//***************************************************************************** +#define USB_TXTYPE1_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE1_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE1_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE1_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE1_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE1_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE1_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE1_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE1_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE1_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE1_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL1 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL1_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL1_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL1_TXPOLL_S \ + 0 +#define USB_TXINTERVAL1_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE1 register. +// +//***************************************************************************** +#define USB_RXTYPE1_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE1_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE1_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE1_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE1_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE1_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE1_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE1_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE1_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE1_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE1_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL1 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL1_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL1_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL1_TXPOLL_S \ + 0 +#define USB_RXINTERVAL1_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP2 register. +// +//***************************************************************************** +#define USB_TXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP2_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL2 register. +// +//***************************************************************************** +#define USB_TXCSRL2_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL2_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL2_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL2_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL2_STALL 0x00000010 // Send STALL +#define USB_TXCSRL2_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL2_ERROR 0x00000004 // Error +#define USB_TXCSRL2_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL2_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL2_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH2 register. +// +//***************************************************************************** +#define USB_TXCSRH2_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH2_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH2_MODE 0x00000020 // Mode +#define USB_TXCSRH2_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH2_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH2_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH2_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH2_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP2 register. +// +//***************************************************************************** +#define USB_RXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP2_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL2 register. +// +//***************************************************************************** +#define USB_RXCSRL2_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL2_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL2_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL2_STALL 0x00000020 // Send STALL +#define USB_RXCSRL2_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL2_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL2_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL2_ERROR 0x00000004 // Error +#define USB_RXCSRL2_OVER 0x00000004 // Overrun +#define USB_RXCSRL2_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL2_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH2 register. +// +//***************************************************************************** +#define USB_RXCSRH2_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH2_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH2_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH2_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH2_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH2_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH2_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH2_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH2_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT2 register. +// +//***************************************************************************** +#define USB_RXCOUNT2_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT2_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE2 register. +// +//***************************************************************************** +#define USB_TXTYPE2_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE2_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE2_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE2_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE2_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE2_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE2_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE2_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE2_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE2_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE2_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL2 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL2_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL2_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL2_NAKLMT_S \ + 0 +#define USB_TXINTERVAL2_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE2 register. +// +//***************************************************************************** +#define USB_RXTYPE2_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE2_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE2_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE2_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE2_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE2_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE2_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE2_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE2_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE2_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE2_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL2 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL2_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL2_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL2_TXPOLL_S \ + 0 +#define USB_RXINTERVAL2_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP3 register. +// +//***************************************************************************** +#define USB_TXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP3_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL3 register. +// +//***************************************************************************** +#define USB_TXCSRL3_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL3_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL3_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL3_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL3_STALL 0x00000010 // Send STALL +#define USB_TXCSRL3_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL3_ERROR 0x00000004 // Error +#define USB_TXCSRL3_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL3_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL3_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH3 register. +// +//***************************************************************************** +#define USB_TXCSRH3_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH3_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH3_MODE 0x00000020 // Mode +#define USB_TXCSRH3_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH3_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH3_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH3_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH3_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP3 register. +// +//***************************************************************************** +#define USB_RXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP3_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL3 register. +// +//***************************************************************************** +#define USB_RXCSRL3_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL3_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL3_STALL 0x00000020 // Send STALL +#define USB_RXCSRL3_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL3_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL3_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL3_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL3_ERROR 0x00000004 // Error +#define USB_RXCSRL3_OVER 0x00000004 // Overrun +#define USB_RXCSRL3_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL3_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH3 register. +// +//***************************************************************************** +#define USB_RXCSRH3_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH3_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH3_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH3_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH3_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH3_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH3_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH3_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH3_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT3 register. +// +//***************************************************************************** +#define USB_RXCOUNT3_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT3_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE3 register. +// +//***************************************************************************** +#define USB_TXTYPE3_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE3_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE3_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE3_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE3_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE3_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE3_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE3_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE3_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE3_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE3_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL3 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL3_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL3_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL3_TXPOLL_S \ + 0 +#define USB_TXINTERVAL3_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE3 register. +// +//***************************************************************************** +#define USB_RXTYPE3_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE3_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE3_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE3_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE3_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE3_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE3_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE3_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE3_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE3_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE3_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL3 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL3_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL3_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL3_TXPOLL_S \ + 0 +#define USB_RXINTERVAL3_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP4 register. +// +//***************************************************************************** +#define USB_TXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP4_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL4 register. +// +//***************************************************************************** +#define USB_TXCSRL4_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL4_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL4_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL4_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL4_STALL 0x00000010 // Send STALL +#define USB_TXCSRL4_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL4_ERROR 0x00000004 // Error +#define USB_TXCSRL4_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL4_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL4_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH4 register. +// +//***************************************************************************** +#define USB_TXCSRH4_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH4_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH4_MODE 0x00000020 // Mode +#define USB_TXCSRH4_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH4_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH4_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH4_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH4_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP4 register. +// +//***************************************************************************** +#define USB_RXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP4_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL4 register. +// +//***************************************************************************** +#define USB_RXCSRL4_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL4_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL4_STALL 0x00000020 // Send STALL +#define USB_RXCSRL4_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL4_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL4_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL4_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL4_OVER 0x00000004 // Overrun +#define USB_RXCSRL4_ERROR 0x00000004 // Error +#define USB_RXCSRL4_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL4_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH4 register. +// +//***************************************************************************** +#define USB_RXCSRH4_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH4_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH4_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH4_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH4_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH4_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH4_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH4_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH4_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT4 register. +// +//***************************************************************************** +#define USB_RXCOUNT4_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT4_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE4 register. +// +//***************************************************************************** +#define USB_TXTYPE4_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE4_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE4_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE4_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE4_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE4_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE4_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE4_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE4_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE4_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE4_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL4 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL4_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL4_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL4_NAKLMT_S \ + 0 +#define USB_TXINTERVAL4_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE4 register. +// +//***************************************************************************** +#define USB_RXTYPE4_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE4_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE4_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE4_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE4_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE4_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE4_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE4_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE4_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE4_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE4_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL4 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL4_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL4_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL4_NAKLMT_S \ + 0 +#define USB_RXINTERVAL4_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP5 register. +// +//***************************************************************************** +#define USB_TXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP5_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL5 register. +// +//***************************************************************************** +#define USB_TXCSRL5_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL5_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL5_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL5_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL5_STALL 0x00000010 // Send STALL +#define USB_TXCSRL5_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL5_ERROR 0x00000004 // Error +#define USB_TXCSRL5_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL5_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL5_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH5 register. +// +//***************************************************************************** +#define USB_TXCSRH5_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH5_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH5_MODE 0x00000020 // Mode +#define USB_TXCSRH5_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH5_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH5_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH5_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH5_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP5 register. +// +//***************************************************************************** +#define USB_RXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP5_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL5 register. +// +//***************************************************************************** +#define USB_RXCSRL5_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL5_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL5_STALL 0x00000020 // Send STALL +#define USB_RXCSRL5_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL5_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL5_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL5_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL5_ERROR 0x00000004 // Error +#define USB_RXCSRL5_OVER 0x00000004 // Overrun +#define USB_RXCSRL5_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL5_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH5 register. +// +//***************************************************************************** +#define USB_RXCSRH5_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH5_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH5_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH5_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH5_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH5_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH5_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH5_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH5_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT5 register. +// +//***************************************************************************** +#define USB_RXCOUNT5_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT5_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE5 register. +// +//***************************************************************************** +#define USB_TXTYPE5_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE5_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE5_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE5_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE5_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE5_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE5_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE5_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE5_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE5_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE5_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL5 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL5_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL5_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL5_NAKLMT_S \ + 0 +#define USB_TXINTERVAL5_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE5 register. +// +//***************************************************************************** +#define USB_RXTYPE5_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE5_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE5_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE5_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE5_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE5_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE5_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE5_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE5_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE5_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE5_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL5 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL5_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL5_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL5_TXPOLL_S \ + 0 +#define USB_RXINTERVAL5_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP6 register. +// +//***************************************************************************** +#define USB_TXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP6_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL6 register. +// +//***************************************************************************** +#define USB_TXCSRL6_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL6_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL6_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL6_STALL 0x00000010 // Send STALL +#define USB_TXCSRL6_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL6_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL6_ERROR 0x00000004 // Error +#define USB_TXCSRL6_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL6_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL6_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH6 register. +// +//***************************************************************************** +#define USB_TXCSRH6_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH6_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH6_MODE 0x00000020 // Mode +#define USB_TXCSRH6_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH6_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH6_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH6_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH6_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP6 register. +// +//***************************************************************************** +#define USB_RXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP6_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL6 register. +// +//***************************************************************************** +#define USB_RXCSRL6_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL6_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL6_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL6_STALL 0x00000020 // Send STALL +#define USB_RXCSRL6_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL6_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL6_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL6_ERROR 0x00000004 // Error +#define USB_RXCSRL6_OVER 0x00000004 // Overrun +#define USB_RXCSRL6_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL6_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH6 register. +// +//***************************************************************************** +#define USB_RXCSRH6_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH6_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH6_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH6_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH6_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH6_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH6_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH6_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH6_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT6 register. +// +//***************************************************************************** +#define USB_RXCOUNT6_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT6_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE6 register. +// +//***************************************************************************** +#define USB_TXTYPE6_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE6_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE6_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE6_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE6_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE6_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE6_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE6_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE6_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE6_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE6_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL6 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL6_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL6_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL6_TXPOLL_S \ + 0 +#define USB_TXINTERVAL6_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE6 register. +// +//***************************************************************************** +#define USB_RXTYPE6_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE6_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE6_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE6_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE6_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE6_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE6_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE6_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE6_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE6_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE6_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL6 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL6_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL6_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL6_NAKLMT_S \ + 0 +#define USB_RXINTERVAL6_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP7 register. +// +//***************************************************************************** +#define USB_TXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP7_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL7 register. +// +//***************************************************************************** +#define USB_TXCSRL7_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL7_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL7_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL7_STALL 0x00000010 // Send STALL +#define USB_TXCSRL7_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL7_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL7_ERROR 0x00000004 // Error +#define USB_TXCSRL7_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL7_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL7_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH7 register. +// +//***************************************************************************** +#define USB_TXCSRH7_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH7_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH7_MODE 0x00000020 // Mode +#define USB_TXCSRH7_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH7_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH7_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH7_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH7_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP7 register. +// +//***************************************************************************** +#define USB_RXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP7_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL7 register. +// +//***************************************************************************** +#define USB_RXCSRL7_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL7_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL7_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL7_STALL 0x00000020 // Send STALL +#define USB_RXCSRL7_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL7_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL7_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL7_ERROR 0x00000004 // Error +#define USB_RXCSRL7_OVER 0x00000004 // Overrun +#define USB_RXCSRL7_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL7_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH7 register. +// +//***************************************************************************** +#define USB_RXCSRH7_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH7_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH7_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH7_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH7_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH7_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH7_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH7_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH7_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT7 register. +// +//***************************************************************************** +#define USB_RXCOUNT7_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT7_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE7 register. +// +//***************************************************************************** +#define USB_TXTYPE7_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE7_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE7_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE7_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE7_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE7_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE7_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE7_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE7_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE7_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE7_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL7 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL7_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL7_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL7_NAKLMT_S \ + 0 +#define USB_TXINTERVAL7_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE7 register. +// +//***************************************************************************** +#define USB_RXTYPE7_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE7_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE7_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE7_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE7_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE7_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE7_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE7_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE7_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE7_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE7_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL7 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL7_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL7_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL7_NAKLMT_S \ + 0 +#define USB_RXINTERVAL7_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP8 register. +// +//***************************************************************************** +#define USB_TXMAXP8_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP8_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL8 register. +// +//***************************************************************************** +#define USB_TXCSRL8_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL8_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL8_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL8_STALL 0x00000010 // Send STALL +#define USB_TXCSRL8_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL8_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL8_ERROR 0x00000004 // Error +#define USB_TXCSRL8_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL8_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL8_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH8 register. +// +//***************************************************************************** +#define USB_TXCSRH8_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH8_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH8_MODE 0x00000020 // Mode +#define USB_TXCSRH8_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH8_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH8_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH8_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH8_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP8 register. +// +//***************************************************************************** +#define USB_RXMAXP8_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP8_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL8 register. +// +//***************************************************************************** +#define USB_RXCSRL8_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL8_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL8_STALL 0x00000020 // Send STALL +#define USB_RXCSRL8_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL8_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL8_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL8_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL8_OVER 0x00000004 // Overrun +#define USB_RXCSRL8_ERROR 0x00000004 // Error +#define USB_RXCSRL8_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL8_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH8 register. +// +//***************************************************************************** +#define USB_RXCSRH8_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH8_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH8_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH8_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH8_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH8_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH8_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH8_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH8_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT8 register. +// +//***************************************************************************** +#define USB_RXCOUNT8_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT8_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE8 register. +// +//***************************************************************************** +#define USB_TXTYPE8_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE8_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE8_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE8_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE8_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE8_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE8_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE8_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE8_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE8_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE8_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL8 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL8_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL8_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL8_NAKLMT_S \ + 0 +#define USB_TXINTERVAL8_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE8 register. +// +//***************************************************************************** +#define USB_RXTYPE8_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE8_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE8_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE8_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE8_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE8_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE8_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE8_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE8_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE8_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE8_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL8 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL8_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL8_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL8_NAKLMT_S \ + 0 +#define USB_RXINTERVAL8_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP9 register. +// +//***************************************************************************** +#define USB_TXMAXP9_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP9_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL9 register. +// +//***************************************************************************** +#define USB_TXCSRL9_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL9_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL9_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL9_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL9_STALL 0x00000010 // Send STALL +#define USB_TXCSRL9_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL9_ERROR 0x00000004 // Error +#define USB_TXCSRL9_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL9_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL9_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH9 register. +// +//***************************************************************************** +#define USB_TXCSRH9_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH9_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH9_MODE 0x00000020 // Mode +#define USB_TXCSRH9_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH9_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH9_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH9_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH9_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP9 register. +// +//***************************************************************************** +#define USB_RXMAXP9_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP9_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL9 register. +// +//***************************************************************************** +#define USB_RXCSRL9_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL9_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL9_STALL 0x00000020 // Send STALL +#define USB_RXCSRL9_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL9_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL9_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL9_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL9_ERROR 0x00000004 // Error +#define USB_RXCSRL9_OVER 0x00000004 // Overrun +#define USB_RXCSRL9_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL9_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH9 register. +// +//***************************************************************************** +#define USB_RXCSRH9_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH9_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH9_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH9_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH9_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH9_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH9_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH9_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH9_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT9 register. +// +//***************************************************************************** +#define USB_RXCOUNT9_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT9_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE9 register. +// +//***************************************************************************** +#define USB_TXTYPE9_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE9_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE9_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE9_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE9_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE9_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE9_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE9_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE9_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE9_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE9_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL9 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL9_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL9_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL9_TXPOLL_S \ + 0 +#define USB_TXINTERVAL9_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE9 register. +// +//***************************************************************************** +#define USB_RXTYPE9_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE9_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE9_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE9_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE9_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE9_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE9_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE9_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE9_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE9_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE9_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL9 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL9_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL9_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL9_NAKLMT_S \ + 0 +#define USB_RXINTERVAL9_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP10 register. +// +//***************************************************************************** +#define USB_TXMAXP10_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP10_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL10 register. +// +//***************************************************************************** +#define USB_TXCSRL10_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL10_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL10_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL10_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL10_STALL 0x00000010 // Send STALL +#define USB_TXCSRL10_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL10_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL10_ERROR 0x00000004 // Error +#define USB_TXCSRL10_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL10_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH10 register. +// +//***************************************************************************** +#define USB_TXCSRH10_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH10_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH10_MODE 0x00000020 // Mode +#define USB_TXCSRH10_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH10_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH10_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH10_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH10_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP10 register. +// +//***************************************************************************** +#define USB_RXMAXP10_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP10_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL10 register. +// +//***************************************************************************** +#define USB_RXCSRL10_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL10_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL10_STALL 0x00000020 // Send STALL +#define USB_RXCSRL10_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL10_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL10_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL10_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL10_OVER 0x00000004 // Overrun +#define USB_RXCSRL10_ERROR 0x00000004 // Error +#define USB_RXCSRL10_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL10_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH10 register. +// +//***************************************************************************** +#define USB_RXCSRH10_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH10_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH10_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH10_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH10_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH10_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH10_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH10_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH10_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT10 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT10_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT10_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE10 register. +// +//***************************************************************************** +#define USB_TXTYPE10_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE10_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE10_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE10_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE10_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE10_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE10_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE10_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE10_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE10_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE10_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL10 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL10_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL10_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL10_TXPOLL_S \ + 0 +#define USB_TXINTERVAL10_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE10 register. +// +//***************************************************************************** +#define USB_RXTYPE10_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE10_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE10_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE10_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE10_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE10_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE10_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE10_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE10_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE10_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE10_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL10 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL10_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL10_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL10_TXPOLL_S \ + 0 +#define USB_RXINTERVAL10_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP11 register. +// +//***************************************************************************** +#define USB_TXMAXP11_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP11_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL11 register. +// +//***************************************************************************** +#define USB_TXCSRL11_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL11_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL11_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL11_STALL 0x00000010 // Send STALL +#define USB_TXCSRL11_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL11_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL11_ERROR 0x00000004 // Error +#define USB_TXCSRL11_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL11_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL11_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH11 register. +// +//***************************************************************************** +#define USB_TXCSRH11_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH11_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH11_MODE 0x00000020 // Mode +#define USB_TXCSRH11_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH11_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH11_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH11_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH11_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP11 register. +// +//***************************************************************************** +#define USB_RXMAXP11_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP11_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL11 register. +// +//***************************************************************************** +#define USB_RXCSRL11_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL11_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL11_STALL 0x00000020 // Send STALL +#define USB_RXCSRL11_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL11_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL11_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL11_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL11_OVER 0x00000004 // Overrun +#define USB_RXCSRL11_ERROR 0x00000004 // Error +#define USB_RXCSRL11_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL11_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH11 register. +// +//***************************************************************************** +#define USB_RXCSRH11_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH11_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH11_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH11_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH11_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH11_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH11_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH11_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH11_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT11 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT11_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT11_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE11 register. +// +//***************************************************************************** +#define USB_TXTYPE11_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE11_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE11_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE11_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE11_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE11_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE11_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE11_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE11_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE11_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE11_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL11 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL11_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL11_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL11_NAKLMT_S \ + 0 +#define USB_TXINTERVAL11_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE11 register. +// +//***************************************************************************** +#define USB_RXTYPE11_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE11_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE11_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE11_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE11_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE11_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE11_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE11_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE11_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE11_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE11_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL11 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL11_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL11_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL11_TXPOLL_S \ + 0 +#define USB_RXINTERVAL11_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP12 register. +// +//***************************************************************************** +#define USB_TXMAXP12_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP12_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL12 register. +// +//***************************************************************************** +#define USB_TXCSRL12_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL12_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL12_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL12_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL12_STALL 0x00000010 // Send STALL +#define USB_TXCSRL12_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL12_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL12_ERROR 0x00000004 // Error +#define USB_TXCSRL12_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL12_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH12 register. +// +//***************************************************************************** +#define USB_TXCSRH12_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH12_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH12_MODE 0x00000020 // Mode +#define USB_TXCSRH12_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH12_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH12_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH12_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH12_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP12 register. +// +//***************************************************************************** +#define USB_RXMAXP12_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP12_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL12 register. +// +//***************************************************************************** +#define USB_RXCSRL12_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL12_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL12_STALL 0x00000020 // Send STALL +#define USB_RXCSRL12_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL12_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL12_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL12_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL12_ERROR 0x00000004 // Error +#define USB_RXCSRL12_OVER 0x00000004 // Overrun +#define USB_RXCSRL12_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL12_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH12 register. +// +//***************************************************************************** +#define USB_RXCSRH12_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH12_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH12_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH12_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH12_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH12_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH12_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH12_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH12_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT12 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT12_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT12_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE12 register. +// +//***************************************************************************** +#define USB_TXTYPE12_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE12_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE12_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE12_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE12_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE12_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE12_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE12_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE12_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE12_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE12_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL12 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL12_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL12_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL12_TXPOLL_S \ + 0 +#define USB_TXINTERVAL12_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE12 register. +// +//***************************************************************************** +#define USB_RXTYPE12_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE12_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE12_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE12_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE12_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE12_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE12_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE12_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE12_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE12_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE12_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL12 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL12_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL12_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL12_NAKLMT_S \ + 0 +#define USB_RXINTERVAL12_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP13 register. +// +//***************************************************************************** +#define USB_TXMAXP13_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP13_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL13 register. +// +//***************************************************************************** +#define USB_TXCSRL13_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL13_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL13_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL13_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL13_STALL 0x00000010 // Send STALL +#define USB_TXCSRL13_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL13_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL13_ERROR 0x00000004 // Error +#define USB_TXCSRL13_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL13_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH13 register. +// +//***************************************************************************** +#define USB_TXCSRH13_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH13_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH13_MODE 0x00000020 // Mode +#define USB_TXCSRH13_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH13_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH13_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH13_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH13_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP13 register. +// +//***************************************************************************** +#define USB_RXMAXP13_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP13_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL13 register. +// +//***************************************************************************** +#define USB_RXCSRL13_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL13_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL13_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL13_STALL 0x00000020 // Send STALL +#define USB_RXCSRL13_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL13_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL13_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL13_OVER 0x00000004 // Overrun +#define USB_RXCSRL13_ERROR 0x00000004 // Error +#define USB_RXCSRL13_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL13_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH13 register. +// +//***************************************************************************** +#define USB_RXCSRH13_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH13_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH13_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH13_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH13_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH13_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH13_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH13_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH13_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT13 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT13_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT13_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE13 register. +// +//***************************************************************************** +#define USB_TXTYPE13_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE13_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE13_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE13_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE13_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE13_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE13_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE13_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE13_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE13_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE13_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL13 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL13_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL13_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL13_TXPOLL_S \ + 0 +#define USB_TXINTERVAL13_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE13 register. +// +//***************************************************************************** +#define USB_RXTYPE13_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE13_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE13_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE13_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE13_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE13_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE13_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE13_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE13_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE13_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE13_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL13 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL13_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL13_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL13_TXPOLL_S \ + 0 +#define USB_RXINTERVAL13_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP14 register. +// +//***************************************************************************** +#define USB_TXMAXP14_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP14_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL14 register. +// +//***************************************************************************** +#define USB_TXCSRL14_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL14_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL14_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL14_STALL 0x00000010 // Send STALL +#define USB_TXCSRL14_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL14_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL14_ERROR 0x00000004 // Error +#define USB_TXCSRL14_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL14_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL14_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH14 register. +// +//***************************************************************************** +#define USB_TXCSRH14_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH14_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH14_MODE 0x00000020 // Mode +#define USB_TXCSRH14_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH14_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH14_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH14_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH14_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP14 register. +// +//***************************************************************************** +#define USB_RXMAXP14_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP14_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL14 register. +// +//***************************************************************************** +#define USB_RXCSRL14_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL14_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL14_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL14_STALL 0x00000020 // Send STALL +#define USB_RXCSRL14_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL14_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL14_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL14_OVER 0x00000004 // Overrun +#define USB_RXCSRL14_ERROR 0x00000004 // Error +#define USB_RXCSRL14_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL14_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH14 register. +// +//***************************************************************************** +#define USB_RXCSRH14_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH14_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH14_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH14_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH14_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH14_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH14_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH14_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH14_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT14 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT14_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT14_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE14 register. +// +//***************************************************************************** +#define USB_TXTYPE14_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE14_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE14_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE14_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE14_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE14_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE14_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE14_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE14_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE14_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE14_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL14 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL14_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL14_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL14_TXPOLL_S \ + 0 +#define USB_TXINTERVAL14_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE14 register. +// +//***************************************************************************** +#define USB_RXTYPE14_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE14_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE14_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE14_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE14_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE14_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE14_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE14_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE14_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE14_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE14_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL14 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL14_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL14_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL14_TXPOLL_S \ + 0 +#define USB_RXINTERVAL14_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXMAXP15 register. +// +//***************************************************************************** +#define USB_TXMAXP15_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_TXMAXP15_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRL15 register. +// +//***************************************************************************** +#define USB_TXCSRL15_NAKTO 0x00000080 // NAK Timeout +#define USB_TXCSRL15_CLRDT 0x00000040 // Clear Data Toggle +#define USB_TXCSRL15_STALLED 0x00000020 // Endpoint Stalled +#define USB_TXCSRL15_SETUP 0x00000010 // Setup Packet +#define USB_TXCSRL15_STALL 0x00000010 // Send STALL +#define USB_TXCSRL15_FLUSH 0x00000008 // Flush FIFO +#define USB_TXCSRL15_UNDRN 0x00000004 // Underrun +#define USB_TXCSRL15_ERROR 0x00000004 // Error +#define USB_TXCSRL15_FIFONE 0x00000002 // FIFO Not Empty +#define USB_TXCSRL15_TXRDY 0x00000001 // Transmit Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXCSRH15 register. +// +//***************************************************************************** +#define USB_TXCSRH15_AUTOSET 0x00000080 // Auto Set +#define USB_TXCSRH15_ISO 0x00000040 // Isochronous Transfers +#define USB_TXCSRH15_MODE 0x00000020 // Mode +#define USB_TXCSRH15_DMAEN 0x00000010 // DMA Request Enable +#define USB_TXCSRH15_FDT 0x00000008 // Force Data Toggle +#define USB_TXCSRH15_DMAMOD 0x00000004 // DMA Request Mode +#define USB_TXCSRH15_DTWE 0x00000002 // Data Toggle Write Enable +#define USB_TXCSRH15_DT 0x00000001 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXMAXP15 register. +// +//***************************************************************************** +#define USB_RXMAXP15_MAXLOAD_M 0x000007FF // Maximum Payload +#define USB_RXMAXP15_MAXLOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRL15 register. +// +//***************************************************************************** +#define USB_RXCSRL15_CLRDT 0x00000080 // Clear Data Toggle +#define USB_RXCSRL15_STALLED 0x00000040 // Endpoint Stalled +#define USB_RXCSRL15_STALL 0x00000020 // Send STALL +#define USB_RXCSRL15_REQPKT 0x00000020 // Request Packet +#define USB_RXCSRL15_FLUSH 0x00000010 // Flush FIFO +#define USB_RXCSRL15_DATAERR 0x00000008 // Data Error +#define USB_RXCSRL15_NAKTO 0x00000008 // NAK Timeout +#define USB_RXCSRL15_ERROR 0x00000004 // Error +#define USB_RXCSRL15_OVER 0x00000004 // Overrun +#define USB_RXCSRL15_FULL 0x00000002 // FIFO Full +#define USB_RXCSRL15_RXRDY 0x00000001 // Receive Packet Ready + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCSRH15 register. +// +//***************************************************************************** +#define USB_RXCSRH15_AUTOCL 0x00000080 // Auto Clear +#define USB_RXCSRH15_AUTORQ 0x00000040 // Auto Request +#define USB_RXCSRH15_ISO 0x00000040 // Isochronous Transfers +#define USB_RXCSRH15_DMAEN 0x00000020 // DMA Request Enable +#define USB_RXCSRH15_PIDERR 0x00000010 // PID Error +#define USB_RXCSRH15_DISNYET 0x00000010 // Disable NYET +#define USB_RXCSRH15_DMAMOD 0x00000008 // DMA Request Mode +#define USB_RXCSRH15_DTWE 0x00000004 // Data Toggle Write Enable +#define USB_RXCSRH15_DT 0x00000002 // Data Toggle + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXCOUNT15 +// register. +// +//***************************************************************************** +#define USB_RXCOUNT15_COUNT_M 0x00001FFF // Receive Packet Count +#define USB_RXCOUNT15_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXTYPE15 register. +// +//***************************************************************************** +#define USB_TXTYPE15_SPEED_M 0x000000C0 // Operating Speed +#define USB_TXTYPE15_SPEED_DFLT 0x00000000 // Default +#define USB_TXTYPE15_SPEED_FULL 0x00000080 // Full +#define USB_TXTYPE15_SPEED_LOW 0x000000C0 // Low +#define USB_TXTYPE15_PROTO_M 0x00000030 // Protocol +#define USB_TXTYPE15_PROTO_CTRL 0x00000000 // Control +#define USB_TXTYPE15_PROTO_ISOC 0x00000010 // Isochronous +#define USB_TXTYPE15_PROTO_BULK 0x00000020 // Bulk +#define USB_TXTYPE15_PROTO_INT 0x00000030 // Interrupt +#define USB_TXTYPE15_TEP_M 0x0000000F // Target Endpoint Number +#define USB_TXTYPE15_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXINTERVAL15 +// register. +// +//***************************************************************************** +#define USB_TXINTERVAL15_TXPOLL_M \ + 0x000000FF // TX Polling +#define USB_TXINTERVAL15_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_TXINTERVAL15_NAKLMT_S \ + 0 +#define USB_TXINTERVAL15_TXPOLL_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXTYPE15 register. +// +//***************************************************************************** +#define USB_RXTYPE15_SPEED_M 0x000000C0 // Operating Speed +#define USB_RXTYPE15_SPEED_DFLT 0x00000000 // Default +#define USB_RXTYPE15_SPEED_FULL 0x00000080 // Full +#define USB_RXTYPE15_SPEED_LOW 0x000000C0 // Low +#define USB_RXTYPE15_PROTO_M 0x00000030 // Protocol +#define USB_RXTYPE15_PROTO_CTRL 0x00000000 // Control +#define USB_RXTYPE15_PROTO_ISOC 0x00000010 // Isochronous +#define USB_RXTYPE15_PROTO_BULK 0x00000020 // Bulk +#define USB_RXTYPE15_PROTO_INT 0x00000030 // Interrupt +#define USB_RXTYPE15_TEP_M 0x0000000F // Target Endpoint Number +#define USB_RXTYPE15_TEP_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXINTERVAL15 +// register. +// +//***************************************************************************** +#define USB_RXINTERVAL15_TXPOLL_M \ + 0x000000FF // RX Polling +#define USB_RXINTERVAL15_NAKLMT_M \ + 0x000000FF // NAK Limit +#define USB_RXINTERVAL15_TXPOLL_S \ + 0 +#define USB_RXINTERVAL15_NAKLMT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT1 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT1_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT2 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT2_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT2_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT3 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT3_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT3_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT4 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT4_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT4_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT5 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT5_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT5_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT6 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT6_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT6_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT7 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT7_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT7_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT8 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT8_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT8_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT9 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT9_COUNT_M 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT9_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT10 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT10_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT10_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT11 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT11_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT11_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT12 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT12_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT12_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT13 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT13_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT13_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT14 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT14_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT14_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RQPKTCOUNT15 +// register. +// +//***************************************************************************** +#define USB_RQPKTCOUNT15_COUNT_M \ + 0x0000FFFF // Block Transfer Packet Count +#define USB_RQPKTCOUNT15_COUNT_S \ + 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_RXDPKTBUFDIS +// register. +// +//***************************************************************************** +#define USB_RXDPKTBUFDIS_EP15 0x00008000 // EP15 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP14 0x00004000 // EP14 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP13 0x00002000 // EP13 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP12 0x00001000 // EP12 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP11 0x00000800 // EP11 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP10 0x00000400 // EP10 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP9 0x00000200 // EP9 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP8 0x00000100 // EP8 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP7 0x00000080 // EP7 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP6 0x00000040 // EP6 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP5 0x00000020 // EP5 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP4 0x00000010 // EP4 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP3 0x00000008 // EP3 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP2 0x00000004 // EP2 RX Double-Packet Buffer + // Disable +#define USB_RXDPKTBUFDIS_EP1 0x00000002 // EP1 RX Double-Packet Buffer + // Disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_TXDPKTBUFDIS +// register. +// +//***************************************************************************** +#define USB_TXDPKTBUFDIS_EP15 0x00008000 // EP15 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP14 0x00004000 // EP14 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP13 0x00002000 // EP13 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP12 0x00001000 // EP12 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP11 0x00000800 // EP11 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP10 0x00000400 // EP10 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP9 0x00000200 // EP9 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP8 0x00000100 // EP8 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP7 0x00000080 // EP7 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP6 0x00000040 // EP6 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP5 0x00000020 // EP5 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP4 0x00000010 // EP4 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP3 0x00000008 // EP3 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP2 0x00000004 // EP2 TX Double-Packet Buffer + // Disable +#define USB_TXDPKTBUFDIS_EP1 0x00000002 // EP1 TX Double-Packet Buffer + // Disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPC register. +// +//***************************************************************************** +#define USB_EPC_PFLTACT_M 0x00000300 // Power Fault Action +#define USB_EPC_PFLTACT_UNCHG 0x00000000 // Unchanged +#define USB_EPC_PFLTACT_TRIS 0x00000100 // Tristate +#define USB_EPC_PFLTACT_LOW 0x00000200 // Low +#define USB_EPC_PFLTACT_HIGH 0x00000300 // High +#define USB_EPC_PFLTAEN 0x00000040 // Power Fault Action Enable +#define USB_EPC_PFLTSEN_HIGH 0x00000020 // Power Fault Sense +#define USB_EPC_PFLTEN 0x00000010 // Power Fault Input Enable +#define USB_EPC_EPENDE 0x00000004 // EPEN Drive Enable +#define USB_EPC_EPEN_M 0x00000003 // External Power Supply Enable + // Configuration +#define USB_EPC_EPEN_LOW 0x00000000 // Power Enable Active Low +#define USB_EPC_EPEN_HIGH 0x00000001 // Power Enable Active High +#define USB_EPC_EPEN_VBLOW 0x00000002 // Power Enable High if VBUS Low +#define USB_EPC_EPEN_VBHIGH 0x00000003 // Power Enable High if VBUS High + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCRIS register. +// +//***************************************************************************** +#define USB_EPCRIS_PF 0x00000001 // USB Power Fault Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCIM register. +// +//***************************************************************************** +#define USB_EPCIM_PF 0x00000001 // USB Power Fault Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_EPCISC register. +// +//***************************************************************************** +#define USB_EPCISC_PF 0x00000001 // USB Power Fault Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRRIS register. +// +//***************************************************************************** +#define USB_DRRIS_RESUME 0x00000001 // RESUME Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRIM register. +// +//***************************************************************************** +#define USB_DRIM_RESUME 0x00000001 // RESUME Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DRISC register. +// +//***************************************************************************** +#define USB_DRISC_RESUME 0x00000001 // RESUME Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_GPCS register. +// +//***************************************************************************** +#define USB_GPCS_DEVMODOTG 0x00000002 // Enable Device Mode +#define USB_GPCS_DEVMOD 0x00000001 // Device Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDC register. +// +//***************************************************************************** +#define USB_VDC_VBDEN 0x00000001 // VBUS Droop Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCRIS register. +// +//***************************************************************************** +#define USB_VDCRIS_VD 0x00000001 // VBUS Droop Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCIM register. +// +//***************************************************************************** +#define USB_VDCIM_VD 0x00000001 // VBUS Droop Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_VDCISC register. +// +//***************************************************************************** +#define USB_VDCISC_VD 0x00000001 // VBUS Droop Interrupt Status and + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVRIS register. +// +//***************************************************************************** +#define USB_IDVRIS_ID 0x00000001 // ID Valid Detect Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVIM register. +// +//***************************************************************************** +#define USB_IDVIM_ID 0x00000001 // ID Valid Detect Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_IDVISC register. +// +//***************************************************************************** +#define USB_IDVISC_ID 0x00000001 // ID Valid Detect Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the USB_O_DMASEL register. +// +//***************************************************************************** +#define USB_DMASEL_DMACTX_M 0x00F00000 // DMA C TX Select +#define USB_DMASEL_DMACRX_M 0x000F0000 // DMA C RX Select +#define USB_DMASEL_DMABTX_M 0x0000F000 // DMA B TX Select +#define USB_DMASEL_DMABRX_M 0x00000F00 // DMA B RX Select +#define USB_DMASEL_DMAATX_M 0x000000F0 // DMA A TX Select +#define USB_DMASEL_DMAARX_M 0x0000000F // DMA A RX Select +#define USB_DMASEL_DMABTX_S 12 +#define USB_DMASEL_DMABRX_S 8 +#define USB_DMASEL_DMAATX_S 4 +#define USB_DMASEL_DMAARX_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// USB_O_TXFIFOADD register. +// +//***************************************************************************** +#define USB_TXFIFOADD_ADDR_2048 0x00000009 // 2048 +#define USB_TXFIFOADD_ADDR_1024 0x00000008 // 1024 +#define USB_TXFIFOADD_ADDR_512 0x00000007 // 512 +#define USB_TXFIFOADD_ADDR_256 0x00000006 // 256 +#define USB_TXFIFOADD_ADDR_128 0x00000005 // 128 +#define USB_TXFIFOADD_ADDR_64 0x00000004 // 64 +#define USB_TXFIFOADD_ADDR_32 0x00000003 // 32 +#define USB_TXFIFOADD_ADDR_16 0x00000002 // 16 +#define USB_TXFIFOADD_ADDR_8 0x00000001 // 8 +#define USB_TXFIFOADD_ADDR_0 0x00000000 // 0 + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the +// USB_O_RXFIFOADD register. +// +//***************************************************************************** +#define USB_RXFIFOADD_ADDR_2048 0x00000009 // 2048 +#define USB_RXFIFOADD_ADDR_1024 0x00000008 // 1024 +#define USB_RXFIFOADD_ADDR_512 0x00000007 // 512 +#define USB_RXFIFOADD_ADDR_256 0x00000006 // 256 +#define USB_RXFIFOADD_ADDR_128 0x00000005 // 128 +#define USB_RXFIFOADD_ADDR_64 0x00000004 // 64 +#define USB_RXFIFOADD_ADDR_32 0x00000003 // 32 +#define USB_RXFIFOADD_ADDR_16 0x00000002 // 16 +#define USB_RXFIFOADD_ADDR_8 0x00000001 // 8 +#define USB_RXFIFOADD_ADDR_0 0x00000000 // 0 + +#endif + +#endif // __HW_USB_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_watchdog.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_watchdog.h new file mode 100644 index 00000000..b8aeb7a8 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/hw_watchdog.h @@ -0,0 +1,175 @@ +//***************************************************************************** +// +// hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware. +// +// Copyright (c) 2005-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __HW_WATCHDOG_H__ +#define __HW_WATCHDOG_H__ + +//***************************************************************************** +// +// The following are defines for the Watchdog Timer register offsets. +// +//***************************************************************************** +#define WDT_O_LOAD 0x00000000 // Watchdog Load +#define WDT_O_VALUE 0x00000004 // Watchdog Value +#define WDT_O_CTL 0x00000008 // Watchdog Control +#define WDT_O_ICR 0x0000000C // Watchdog Interrupt Clear +#define WDT_O_RIS 0x00000010 // Watchdog Raw Interrupt Status +#define WDT_O_MIS 0x00000014 // Watchdog Masked Interrupt Status +#define WDT_O_TEST 0x00000418 // Watchdog Test +#define WDT_O_LOCK 0x00000C00 // Watchdog Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOAD register. +// +//***************************************************************************** +#define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value +#define WDT_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_VALUE register. +// +//***************************************************************************** +#define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value +#define WDT_VALUE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_CTL register. +// +//***************************************************************************** +#define WDT_CTL_WRC 0x80000000 // Write Complete +#define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable +#define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_ICR register. +// +//***************************************************************************** +#define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear +#define WDT_ICR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_RIS register. +// +//***************************************************************************** +#define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_MIS register. +// +//***************************************************************************** +#define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_TEST register. +// +//***************************************************************************** +#define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOCK register. +// +//***************************************************************************** +#define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock +#define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked +#define WDT_LOCK_LOCKED 0x00000001 // Locked +#define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and +// WDT_MIS registers. +// +//***************************************************************************** +#define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// The following are deprecated defines for the Watchdog Timer register +// offsets. +// +//***************************************************************************** +#define WDT_O_PeriphID4 0x00000FD0 +#define WDT_O_PeriphID5 0x00000FD4 +#define WDT_O_PeriphID6 0x00000FD8 +#define WDT_O_PeriphID7 0x00000FDC +#define WDT_O_PeriphID0 0x00000FE0 +#define WDT_O_PeriphID1 0x00000FE4 +#define WDT_O_PeriphID2 0x00000FE8 +#define WDT_O_PeriphID3 0x00000FEC +#define WDT_O_PCellID0 0x00000FF0 +#define WDT_O_PCellID1 0x00000FF4 +#define WDT_O_PCellID2 0x00000FF8 +#define WDT_O_PCellID3 0x00000FFC + +//***************************************************************************** +// +// The following are deprecated defines for the bit fields in the WDT_O_TEST +// register. +// +//***************************************************************************** +#define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable + +//***************************************************************************** +// +// The following are deprecated defines for the reset values for the WDT +// registers. +// +//***************************************************************************** +#define WDT_RV_VALUE 0xFFFFFFFF // Current value register +#define WDT_RV_LOAD 0xFFFFFFFF // Load register +#define WDT_RV_PCellID1 0x000000F0 +#define WDT_RV_PCellID3 0x000000B1 +#define WDT_RV_PeriphID1 0x00000018 +#define WDT_RV_PeriphID2 0x00000018 +#define WDT_RV_PCellID0 0x0000000D +#define WDT_RV_PCellID2 0x00000005 +#define WDT_RV_PeriphID0 0x00000005 +#define WDT_RV_PeriphID3 0x00000001 +#define WDT_RV_PeriphID5 0x00000000 +#define WDT_RV_RIS 0x00000000 // Raw interrupt status register +#define WDT_RV_CTL 0x00000000 // Control register +#define WDT_RV_PeriphID4 0x00000000 +#define WDT_RV_PeriphID6 0x00000000 +#define WDT_RV_PeriphID7 0x00000000 +#define WDT_RV_LOCK 0x00000000 // Lock register +#define WDT_RV_MIS 0x00000000 // Masked interrupt status register + +#endif + +#endif // __HW_WATCHDOG_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/lm3s6965.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/lm3s6965.h new file mode 100644 index 00000000..b52248cd --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/lib/inc/lm3s6965.h @@ -0,0 +1,4795 @@ +//***************************************************************************** +// +// lm3s6965.h - LM3S6965 Register Definitions +// +// Copyright (c) 2007-2011 Texas Instruments Incorporated. All rights reserved. +// Software License Agreement +// +// Texas Instruments (TI) is supplying this software for use solely and +// exclusively on TI's microcontroller products. The software is owned by +// TI and/or its suppliers, and is protected under applicable copyright +// laws. You may not combine this software with "viral" open-source +// software in order to form a larger program. +// +// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. +// 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. TI SHALL NOT, UNDER ANY +// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +// DAMAGES, FOR ANY REASON WHATSOEVER. +// +// This is part of revision 6852 of the Stellaris Firmware Development Package. +// +//***************************************************************************** + +#ifndef __LM3S6965_H__ +#define __LM3S6965_H__ + +//***************************************************************************** +// +// Watchdog Timer registers (WATCHDOG0) +// +//***************************************************************************** +#define WATCHDOG0_LOAD_R (*((volatile unsigned long *)0x40000000)) +#define WATCHDOG0_VALUE_R (*((volatile unsigned long *)0x40000004)) +#define WATCHDOG0_CTL_R (*((volatile unsigned long *)0x40000008)) +#define WATCHDOG0_ICR_R (*((volatile unsigned long *)0x4000000C)) +#define WATCHDOG0_RIS_R (*((volatile unsigned long *)0x40000010)) +#define WATCHDOG0_MIS_R (*((volatile unsigned long *)0x40000014)) +#define WATCHDOG0_TEST_R (*((volatile unsigned long *)0x40000418)) +#define WATCHDOG0_LOCK_R (*((volatile unsigned long *)0x40000C00)) + +//***************************************************************************** +// +// GPIO registers (PORTA) +// +//***************************************************************************** +#define GPIO_PORTA_DATA_BITS_R ((volatile unsigned long *)0x40004000) +#define GPIO_PORTA_DATA_R (*((volatile unsigned long *)0x400043FC)) +#define GPIO_PORTA_DIR_R (*((volatile unsigned long *)0x40004400)) +#define GPIO_PORTA_IS_R (*((volatile unsigned long *)0x40004404)) +#define GPIO_PORTA_IBE_R (*((volatile unsigned long *)0x40004408)) +#define GPIO_PORTA_IEV_R (*((volatile unsigned long *)0x4000440C)) +#define GPIO_PORTA_IM_R (*((volatile unsigned long *)0x40004410)) +#define GPIO_PORTA_RIS_R (*((volatile unsigned long *)0x40004414)) +#define GPIO_PORTA_MIS_R (*((volatile unsigned long *)0x40004418)) +#define GPIO_PORTA_ICR_R (*((volatile unsigned long *)0x4000441C)) +#define GPIO_PORTA_AFSEL_R (*((volatile unsigned long *)0x40004420)) +#define GPIO_PORTA_DR2R_R (*((volatile unsigned long *)0x40004500)) +#define GPIO_PORTA_DR4R_R (*((volatile unsigned long *)0x40004504)) +#define GPIO_PORTA_DR8R_R (*((volatile unsigned long *)0x40004508)) +#define GPIO_PORTA_ODR_R (*((volatile unsigned long *)0x4000450C)) +#define GPIO_PORTA_PUR_R (*((volatile unsigned long *)0x40004510)) +#define GPIO_PORTA_PDR_R (*((volatile unsigned long *)0x40004514)) +#define GPIO_PORTA_SLR_R (*((volatile unsigned long *)0x40004518)) +#define GPIO_PORTA_DEN_R (*((volatile unsigned long *)0x4000451C)) +#define GPIO_PORTA_LOCK_R (*((volatile unsigned long *)0x40004520)) +#define GPIO_PORTA_CR_R (*((volatile unsigned long *)0x40004524)) + +//***************************************************************************** +// +// GPIO registers (PORTB) +// +//***************************************************************************** +#define GPIO_PORTB_DATA_BITS_R ((volatile unsigned long *)0x40005000) +#define GPIO_PORTB_DATA_R (*((volatile unsigned long *)0x400053FC)) +#define GPIO_PORTB_DIR_R (*((volatile unsigned long *)0x40005400)) +#define GPIO_PORTB_IS_R (*((volatile unsigned long *)0x40005404)) +#define GPIO_PORTB_IBE_R (*((volatile unsigned long *)0x40005408)) +#define GPIO_PORTB_IEV_R (*((volatile unsigned long *)0x4000540C)) +#define GPIO_PORTB_IM_R (*((volatile unsigned long *)0x40005410)) +#define GPIO_PORTB_RIS_R (*((volatile unsigned long *)0x40005414)) +#define GPIO_PORTB_MIS_R (*((volatile unsigned long *)0x40005418)) +#define GPIO_PORTB_ICR_R (*((volatile unsigned long *)0x4000541C)) +#define GPIO_PORTB_AFSEL_R (*((volatile unsigned long *)0x40005420)) +#define GPIO_PORTB_DR2R_R (*((volatile unsigned long *)0x40005500)) +#define GPIO_PORTB_DR4R_R (*((volatile unsigned long *)0x40005504)) +#define GPIO_PORTB_DR8R_R (*((volatile unsigned long *)0x40005508)) +#define GPIO_PORTB_ODR_R (*((volatile unsigned long *)0x4000550C)) +#define GPIO_PORTB_PUR_R (*((volatile unsigned long *)0x40005510)) +#define GPIO_PORTB_PDR_R (*((volatile unsigned long *)0x40005514)) +#define GPIO_PORTB_SLR_R (*((volatile unsigned long *)0x40005518)) +#define GPIO_PORTB_DEN_R (*((volatile unsigned long *)0x4000551C)) +#define GPIO_PORTB_LOCK_R (*((volatile unsigned long *)0x40005520)) +#define GPIO_PORTB_CR_R (*((volatile unsigned long *)0x40005524)) + +//***************************************************************************** +// +// GPIO registers (PORTC) +// +//***************************************************************************** +#define GPIO_PORTC_DATA_BITS_R ((volatile unsigned long *)0x40006000) +#define GPIO_PORTC_DATA_R (*((volatile unsigned long *)0x400063FC)) +#define GPIO_PORTC_DIR_R (*((volatile unsigned long *)0x40006400)) +#define GPIO_PORTC_IS_R (*((volatile unsigned long *)0x40006404)) +#define GPIO_PORTC_IBE_R (*((volatile unsigned long *)0x40006408)) +#define GPIO_PORTC_IEV_R (*((volatile unsigned long *)0x4000640C)) +#define GPIO_PORTC_IM_R (*((volatile unsigned long *)0x40006410)) +#define GPIO_PORTC_RIS_R (*((volatile unsigned long *)0x40006414)) +#define GPIO_PORTC_MIS_R (*((volatile unsigned long *)0x40006418)) +#define GPIO_PORTC_ICR_R (*((volatile unsigned long *)0x4000641C)) +#define GPIO_PORTC_AFSEL_R (*((volatile unsigned long *)0x40006420)) +#define GPIO_PORTC_DR2R_R (*((volatile unsigned long *)0x40006500)) +#define GPIO_PORTC_DR4R_R (*((volatile unsigned long *)0x40006504)) +#define GPIO_PORTC_DR8R_R (*((volatile unsigned long *)0x40006508)) +#define GPIO_PORTC_ODR_R (*((volatile unsigned long *)0x4000650C)) +#define GPIO_PORTC_PUR_R (*((volatile unsigned long *)0x40006510)) +#define GPIO_PORTC_PDR_R (*((volatile unsigned long *)0x40006514)) +#define GPIO_PORTC_SLR_R (*((volatile unsigned long *)0x40006518)) +#define GPIO_PORTC_DEN_R (*((volatile unsigned long *)0x4000651C)) +#define GPIO_PORTC_LOCK_R (*((volatile unsigned long *)0x40006520)) +#define GPIO_PORTC_CR_R (*((volatile unsigned long *)0x40006524)) + +//***************************************************************************** +// +// GPIO registers (PORTD) +// +//***************************************************************************** +#define GPIO_PORTD_DATA_BITS_R ((volatile unsigned long *)0x40007000) +#define GPIO_PORTD_DATA_R (*((volatile unsigned long *)0x400073FC)) +#define GPIO_PORTD_DIR_R (*((volatile unsigned long *)0x40007400)) +#define GPIO_PORTD_IS_R (*((volatile unsigned long *)0x40007404)) +#define GPIO_PORTD_IBE_R (*((volatile unsigned long *)0x40007408)) +#define GPIO_PORTD_IEV_R (*((volatile unsigned long *)0x4000740C)) +#define GPIO_PORTD_IM_R (*((volatile unsigned long *)0x40007410)) +#define GPIO_PORTD_RIS_R (*((volatile unsigned long *)0x40007414)) +#define GPIO_PORTD_MIS_R (*((volatile unsigned long *)0x40007418)) +#define GPIO_PORTD_ICR_R (*((volatile unsigned long *)0x4000741C)) +#define GPIO_PORTD_AFSEL_R (*((volatile unsigned long *)0x40007420)) +#define GPIO_PORTD_DR2R_R (*((volatile unsigned long *)0x40007500)) +#define GPIO_PORTD_DR4R_R (*((volatile unsigned long *)0x40007504)) +#define GPIO_PORTD_DR8R_R (*((volatile unsigned long *)0x40007508)) +#define GPIO_PORTD_ODR_R (*((volatile unsigned long *)0x4000750C)) +#define GPIO_PORTD_PUR_R (*((volatile unsigned long *)0x40007510)) +#define GPIO_PORTD_PDR_R (*((volatile unsigned long *)0x40007514)) +#define GPIO_PORTD_SLR_R (*((volatile unsigned long *)0x40007518)) +#define GPIO_PORTD_DEN_R (*((volatile unsigned long *)0x4000751C)) +#define GPIO_PORTD_LOCK_R (*((volatile unsigned long *)0x40007520)) +#define GPIO_PORTD_CR_R (*((volatile unsigned long *)0x40007524)) + +//***************************************************************************** +// +// SSI registers (SSI0) +// +//***************************************************************************** +#define SSI0_CR0_R (*((volatile unsigned long *)0x40008000)) +#define SSI0_CR1_R (*((volatile unsigned long *)0x40008004)) +#define SSI0_DR_R (*((volatile unsigned long *)0x40008008)) +#define SSI0_SR_R (*((volatile unsigned long *)0x4000800C)) +#define SSI0_CPSR_R (*((volatile unsigned long *)0x40008010)) +#define SSI0_IM_R (*((volatile unsigned long *)0x40008014)) +#define SSI0_RIS_R (*((volatile unsigned long *)0x40008018)) +#define SSI0_MIS_R (*((volatile unsigned long *)0x4000801C)) +#define SSI0_ICR_R (*((volatile unsigned long *)0x40008020)) + +//***************************************************************************** +// +// UART registers (UART0) +// +//***************************************************************************** +#define UART0_DR_R (*((volatile unsigned long *)0x4000C000)) +#define UART0_RSR_R (*((volatile unsigned long *)0x4000C004)) +#define UART0_ECR_R (*((volatile unsigned long *)0x4000C004)) +#define UART0_FR_R (*((volatile unsigned long *)0x4000C018)) +#define UART0_ILPR_R (*((volatile unsigned long *)0x4000C020)) +#define UART0_IBRD_R (*((volatile unsigned long *)0x4000C024)) +#define UART0_FBRD_R (*((volatile unsigned long *)0x4000C028)) +#define UART0_LCRH_R (*((volatile unsigned long *)0x4000C02C)) +#define UART0_CTL_R (*((volatile unsigned long *)0x4000C030)) +#define UART0_IFLS_R (*((volatile unsigned long *)0x4000C034)) +#define UART0_IM_R (*((volatile unsigned long *)0x4000C038)) +#define UART0_RIS_R (*((volatile unsigned long *)0x4000C03C)) +#define UART0_MIS_R (*((volatile unsigned long *)0x4000C040)) +#define UART0_ICR_R (*((volatile unsigned long *)0x4000C044)) + +//***************************************************************************** +// +// UART registers (UART1) +// +//***************************************************************************** +#define UART1_DR_R (*((volatile unsigned long *)0x4000D000)) +#define UART1_RSR_R (*((volatile unsigned long *)0x4000D004)) +#define UART1_ECR_R (*((volatile unsigned long *)0x4000D004)) +#define UART1_FR_R (*((volatile unsigned long *)0x4000D018)) +#define UART1_ILPR_R (*((volatile unsigned long *)0x4000D020)) +#define UART1_IBRD_R (*((volatile unsigned long *)0x4000D024)) +#define UART1_FBRD_R (*((volatile unsigned long *)0x4000D028)) +#define UART1_LCRH_R (*((volatile unsigned long *)0x4000D02C)) +#define UART1_CTL_R (*((volatile unsigned long *)0x4000D030)) +#define UART1_IFLS_R (*((volatile unsigned long *)0x4000D034)) +#define UART1_IM_R (*((volatile unsigned long *)0x4000D038)) +#define UART1_RIS_R (*((volatile unsigned long *)0x4000D03C)) +#define UART1_MIS_R (*((volatile unsigned long *)0x4000D040)) +#define UART1_ICR_R (*((volatile unsigned long *)0x4000D044)) + +//***************************************************************************** +// +// UART registers (UART2) +// +//***************************************************************************** +#define UART2_DR_R (*((volatile unsigned long *)0x4000E000)) +#define UART2_RSR_R (*((volatile unsigned long *)0x4000E004)) +#define UART2_ECR_R (*((volatile unsigned long *)0x4000E004)) +#define UART2_FR_R (*((volatile unsigned long *)0x4000E018)) +#define UART2_ILPR_R (*((volatile unsigned long *)0x4000E020)) +#define UART2_IBRD_R (*((volatile unsigned long *)0x4000E024)) +#define UART2_FBRD_R (*((volatile unsigned long *)0x4000E028)) +#define UART2_LCRH_R (*((volatile unsigned long *)0x4000E02C)) +#define UART2_CTL_R (*((volatile unsigned long *)0x4000E030)) +#define UART2_IFLS_R (*((volatile unsigned long *)0x4000E034)) +#define UART2_IM_R (*((volatile unsigned long *)0x4000E038)) +#define UART2_RIS_R (*((volatile unsigned long *)0x4000E03C)) +#define UART2_MIS_R (*((volatile unsigned long *)0x4000E040)) +#define UART2_ICR_R (*((volatile unsigned long *)0x4000E044)) + +//***************************************************************************** +// +// I2C registers (I2C0 MASTER) +// +//***************************************************************************** +#define I2C0_MASTER_MSA_R (*((volatile unsigned long *)0x40020000)) +#define I2C0_MASTER_MCS_R (*((volatile unsigned long *)0x40020004)) +#define I2C0_MASTER_MDR_R (*((volatile unsigned long *)0x40020008)) +#define I2C0_MASTER_MTPR_R (*((volatile unsigned long *)0x4002000C)) +#define I2C0_MASTER_MIMR_R (*((volatile unsigned long *)0x40020010)) +#define I2C0_MASTER_MRIS_R (*((volatile unsigned long *)0x40020014)) +#define I2C0_MASTER_MMIS_R (*((volatile unsigned long *)0x40020018)) +#define I2C0_MASTER_MICR_R (*((volatile unsigned long *)0x4002001C)) +#define I2C0_MASTER_MCR_R (*((volatile unsigned long *)0x40020020)) + +//***************************************************************************** +// +// I2C registers (I2C0 SLAVE) +// +//***************************************************************************** +#define I2C0_SLAVE_SOAR_R (*((volatile unsigned long *)0x40020800)) +#define I2C0_SLAVE_SCSR_R (*((volatile unsigned long *)0x40020804)) +#define I2C0_SLAVE_SDR_R (*((volatile unsigned long *)0x40020808)) +#define I2C0_SLAVE_SIMR_R (*((volatile unsigned long *)0x4002080C)) +#define I2C0_SLAVE_SRIS_R (*((volatile unsigned long *)0x40020810)) +#define I2C0_SLAVE_SMIS_R (*((volatile unsigned long *)0x40020814)) +#define I2C0_SLAVE_SICR_R (*((volatile unsigned long *)0x40020818)) + +//***************************************************************************** +// +// I2C registers (I2C1 MASTER) +// +//***************************************************************************** +#define I2C1_MASTER_MSA_R (*((volatile unsigned long *)0x40021000)) +#define I2C1_MASTER_MCS_R (*((volatile unsigned long *)0x40021004)) +#define I2C1_MASTER_MDR_R (*((volatile unsigned long *)0x40021008)) +#define I2C1_MASTER_MTPR_R (*((volatile unsigned long *)0x4002100C)) +#define I2C1_MASTER_MIMR_R (*((volatile unsigned long *)0x40021010)) +#define I2C1_MASTER_MRIS_R (*((volatile unsigned long *)0x40021014)) +#define I2C1_MASTER_MMIS_R (*((volatile unsigned long *)0x40021018)) +#define I2C1_MASTER_MICR_R (*((volatile unsigned long *)0x4002101C)) +#define I2C1_MASTER_MCR_R (*((volatile unsigned long *)0x40021020)) + +//***************************************************************************** +// +// I2C registers (I2C1 SLAVE) +// +//***************************************************************************** +#define I2C1_SLAVE_SOAR_R (*((volatile unsigned long *)0x40021800)) +#define I2C1_SLAVE_SCSR_R (*((volatile unsigned long *)0x40021804)) +#define I2C1_SLAVE_SDR_R (*((volatile unsigned long *)0x40021808)) +#define I2C1_SLAVE_SIMR_R (*((volatile unsigned long *)0x4002180C)) +#define I2C1_SLAVE_SRIS_R (*((volatile unsigned long *)0x40021810)) +#define I2C1_SLAVE_SMIS_R (*((volatile unsigned long *)0x40021814)) +#define I2C1_SLAVE_SICR_R (*((volatile unsigned long *)0x40021818)) + +//***************************************************************************** +// +// GPIO registers (PORTE) +// +//***************************************************************************** +#define GPIO_PORTE_DATA_BITS_R ((volatile unsigned long *)0x40024000) +#define GPIO_PORTE_DATA_R (*((volatile unsigned long *)0x400243FC)) +#define GPIO_PORTE_DIR_R (*((volatile unsigned long *)0x40024400)) +#define GPIO_PORTE_IS_R (*((volatile unsigned long *)0x40024404)) +#define GPIO_PORTE_IBE_R (*((volatile unsigned long *)0x40024408)) +#define GPIO_PORTE_IEV_R (*((volatile unsigned long *)0x4002440C)) +#define GPIO_PORTE_IM_R (*((volatile unsigned long *)0x40024410)) +#define GPIO_PORTE_RIS_R (*((volatile unsigned long *)0x40024414)) +#define GPIO_PORTE_MIS_R (*((volatile unsigned long *)0x40024418)) +#define GPIO_PORTE_ICR_R (*((volatile unsigned long *)0x4002441C)) +#define GPIO_PORTE_AFSEL_R (*((volatile unsigned long *)0x40024420)) +#define GPIO_PORTE_DR2R_R (*((volatile unsigned long *)0x40024500)) +#define GPIO_PORTE_DR4R_R (*((volatile unsigned long *)0x40024504)) +#define GPIO_PORTE_DR8R_R (*((volatile unsigned long *)0x40024508)) +#define GPIO_PORTE_ODR_R (*((volatile unsigned long *)0x4002450C)) +#define GPIO_PORTE_PUR_R (*((volatile unsigned long *)0x40024510)) +#define GPIO_PORTE_PDR_R (*((volatile unsigned long *)0x40024514)) +#define GPIO_PORTE_SLR_R (*((volatile unsigned long *)0x40024518)) +#define GPIO_PORTE_DEN_R (*((volatile unsigned long *)0x4002451C)) +#define GPIO_PORTE_LOCK_R (*((volatile unsigned long *)0x40024520)) +#define GPIO_PORTE_CR_R (*((volatile unsigned long *)0x40024524)) + +//***************************************************************************** +// +// GPIO registers (PORTF) +// +//***************************************************************************** +#define GPIO_PORTF_DATA_BITS_R ((volatile unsigned long *)0x40025000) +#define GPIO_PORTF_DATA_R (*((volatile unsigned long *)0x400253FC)) +#define GPIO_PORTF_DIR_R (*((volatile unsigned long *)0x40025400)) +#define GPIO_PORTF_IS_R (*((volatile unsigned long *)0x40025404)) +#define GPIO_PORTF_IBE_R (*((volatile unsigned long *)0x40025408)) +#define GPIO_PORTF_IEV_R (*((volatile unsigned long *)0x4002540C)) +#define GPIO_PORTF_IM_R (*((volatile unsigned long *)0x40025410)) +#define GPIO_PORTF_RIS_R (*((volatile unsigned long *)0x40025414)) +#define GPIO_PORTF_MIS_R (*((volatile unsigned long *)0x40025418)) +#define GPIO_PORTF_ICR_R (*((volatile unsigned long *)0x4002541C)) +#define GPIO_PORTF_AFSEL_R (*((volatile unsigned long *)0x40025420)) +#define GPIO_PORTF_DR2R_R (*((volatile unsigned long *)0x40025500)) +#define GPIO_PORTF_DR4R_R (*((volatile unsigned long *)0x40025504)) +#define GPIO_PORTF_DR8R_R (*((volatile unsigned long *)0x40025508)) +#define GPIO_PORTF_ODR_R (*((volatile unsigned long *)0x4002550C)) +#define GPIO_PORTF_PUR_R (*((volatile unsigned long *)0x40025510)) +#define GPIO_PORTF_PDR_R (*((volatile unsigned long *)0x40025514)) +#define GPIO_PORTF_SLR_R (*((volatile unsigned long *)0x40025518)) +#define GPIO_PORTF_DEN_R (*((volatile unsigned long *)0x4002551C)) +#define GPIO_PORTF_LOCK_R (*((volatile unsigned long *)0x40025520)) +#define GPIO_PORTF_CR_R (*((volatile unsigned long *)0x40025524)) + +//***************************************************************************** +// +// GPIO registers (PORTG) +// +//***************************************************************************** +#define GPIO_PORTG_DATA_BITS_R ((volatile unsigned long *)0x40026000) +#define GPIO_PORTG_DATA_R (*((volatile unsigned long *)0x400263FC)) +#define GPIO_PORTG_DIR_R (*((volatile unsigned long *)0x40026400)) +#define GPIO_PORTG_IS_R (*((volatile unsigned long *)0x40026404)) +#define GPIO_PORTG_IBE_R (*((volatile unsigned long *)0x40026408)) +#define GPIO_PORTG_IEV_R (*((volatile unsigned long *)0x4002640C)) +#define GPIO_PORTG_IM_R (*((volatile unsigned long *)0x40026410)) +#define GPIO_PORTG_RIS_R (*((volatile unsigned long *)0x40026414)) +#define GPIO_PORTG_MIS_R (*((volatile unsigned long *)0x40026418)) +#define GPIO_PORTG_ICR_R (*((volatile unsigned long *)0x4002641C)) +#define GPIO_PORTG_AFSEL_R (*((volatile unsigned long *)0x40026420)) +#define GPIO_PORTG_DR2R_R (*((volatile unsigned long *)0x40026500)) +#define GPIO_PORTG_DR4R_R (*((volatile unsigned long *)0x40026504)) +#define GPIO_PORTG_DR8R_R (*((volatile unsigned long *)0x40026508)) +#define GPIO_PORTG_ODR_R (*((volatile unsigned long *)0x4002650C)) +#define GPIO_PORTG_PUR_R (*((volatile unsigned long *)0x40026510)) +#define GPIO_PORTG_PDR_R (*((volatile unsigned long *)0x40026514)) +#define GPIO_PORTG_SLR_R (*((volatile unsigned long *)0x40026518)) +#define GPIO_PORTG_DEN_R (*((volatile unsigned long *)0x4002651C)) +#define GPIO_PORTG_LOCK_R (*((volatile unsigned long *)0x40026520)) +#define GPIO_PORTG_CR_R (*((volatile unsigned long *)0x40026524)) + +//***************************************************************************** +// +// PWM registers (PWM) +// +//***************************************************************************** +#define PWM_CTL_R (*((volatile unsigned long *)0x40028000)) +#define PWM_SYNC_R (*((volatile unsigned long *)0x40028004)) +#define PWM_ENABLE_R (*((volatile unsigned long *)0x40028008)) +#define PWM_INVERT_R (*((volatile unsigned long *)0x4002800C)) +#define PWM_FAULT_R (*((volatile unsigned long *)0x40028010)) +#define PWM_INTEN_R (*((volatile unsigned long *)0x40028014)) +#define PWM_RIS_R (*((volatile unsigned long *)0x40028018)) +#define PWM_ISC_R (*((volatile unsigned long *)0x4002801C)) +#define PWM_STATUS_R (*((volatile unsigned long *)0x40028020)) +#define PWM_0_CTL_R (*((volatile unsigned long *)0x40028040)) +#define PWM_0_INTEN_R (*((volatile unsigned long *)0x40028044)) +#define PWM_0_RIS_R (*((volatile unsigned long *)0x40028048)) +#define PWM_0_ISC_R (*((volatile unsigned long *)0x4002804C)) +#define PWM_0_LOAD_R (*((volatile unsigned long *)0x40028050)) +#define PWM_0_COUNT_R (*((volatile unsigned long *)0x40028054)) +#define PWM_0_CMPA_R (*((volatile unsigned long *)0x40028058)) +#define PWM_0_CMPB_R (*((volatile unsigned long *)0x4002805C)) +#define PWM_0_GENA_R (*((volatile unsigned long *)0x40028060)) +#define PWM_0_GENB_R (*((volatile unsigned long *)0x40028064)) +#define PWM_0_DBCTL_R (*((volatile unsigned long *)0x40028068)) +#define PWM_0_DBRISE_R (*((volatile unsigned long *)0x4002806C)) +#define PWM_0_DBFALL_R (*((volatile unsigned long *)0x40028070)) +#define PWM_1_CTL_R (*((volatile unsigned long *)0x40028080)) +#define PWM_1_INTEN_R (*((volatile unsigned long *)0x40028084)) +#define PWM_1_RIS_R (*((volatile unsigned long *)0x40028088)) +#define PWM_1_ISC_R (*((volatile unsigned long *)0x4002808C)) +#define PWM_1_LOAD_R (*((volatile unsigned long *)0x40028090)) +#define PWM_1_COUNT_R (*((volatile unsigned long *)0x40028094)) +#define PWM_1_CMPA_R (*((volatile unsigned long *)0x40028098)) +#define PWM_1_CMPB_R (*((volatile unsigned long *)0x4002809C)) +#define PWM_1_GENA_R (*((volatile unsigned long *)0x400280A0)) +#define PWM_1_GENB_R (*((volatile unsigned long *)0x400280A4)) +#define PWM_1_DBCTL_R (*((volatile unsigned long *)0x400280A8)) +#define PWM_1_DBRISE_R (*((volatile unsigned long *)0x400280AC)) +#define PWM_1_DBFALL_R (*((volatile unsigned long *)0x400280B0)) +#define PWM_2_CTL_R (*((volatile unsigned long *)0x400280C0)) +#define PWM_2_INTEN_R (*((volatile unsigned long *)0x400280C4)) +#define PWM_2_RIS_R (*((volatile unsigned long *)0x400280C8)) +#define PWM_2_ISC_R (*((volatile unsigned long *)0x400280CC)) +#define PWM_2_LOAD_R (*((volatile unsigned long *)0x400280D0)) +#define PWM_2_COUNT_R (*((volatile unsigned long *)0x400280D4)) +#define PWM_2_CMPA_R (*((volatile unsigned long *)0x400280D8)) +#define PWM_2_CMPB_R (*((volatile unsigned long *)0x400280DC)) +#define PWM_2_GENA_R (*((volatile unsigned long *)0x400280E0)) +#define PWM_2_GENB_R (*((volatile unsigned long *)0x400280E4)) +#define PWM_2_DBCTL_R (*((volatile unsigned long *)0x400280E8)) +#define PWM_2_DBRISE_R (*((volatile unsigned long *)0x400280EC)) +#define PWM_2_DBFALL_R (*((volatile unsigned long *)0x400280F0)) + +//***************************************************************************** +// +// QEI registers (QEI0) +// +//***************************************************************************** +#define QEI0_CTL_R (*((volatile unsigned long *)0x4002C000)) +#define QEI0_STAT_R (*((volatile unsigned long *)0x4002C004)) +#define QEI0_POS_R (*((volatile unsigned long *)0x4002C008)) +#define QEI0_MAXPOS_R (*((volatile unsigned long *)0x4002C00C)) +#define QEI0_LOAD_R (*((volatile unsigned long *)0x4002C010)) +#define QEI0_TIME_R (*((volatile unsigned long *)0x4002C014)) +#define QEI0_COUNT_R (*((volatile unsigned long *)0x4002C018)) +#define QEI0_SPEED_R (*((volatile unsigned long *)0x4002C01C)) +#define QEI0_INTEN_R (*((volatile unsigned long *)0x4002C020)) +#define QEI0_RIS_R (*((volatile unsigned long *)0x4002C024)) +#define QEI0_ISC_R (*((volatile unsigned long *)0x4002C028)) + +//***************************************************************************** +// +// QEI registers (QEI1) +// +//***************************************************************************** +#define QEI1_CTL_R (*((volatile unsigned long *)0x4002D000)) +#define QEI1_STAT_R (*((volatile unsigned long *)0x4002D004)) +#define QEI1_POS_R (*((volatile unsigned long *)0x4002D008)) +#define QEI1_MAXPOS_R (*((volatile unsigned long *)0x4002D00C)) +#define QEI1_LOAD_R (*((volatile unsigned long *)0x4002D010)) +#define QEI1_TIME_R (*((volatile unsigned long *)0x4002D014)) +#define QEI1_COUNT_R (*((volatile unsigned long *)0x4002D018)) +#define QEI1_SPEED_R (*((volatile unsigned long *)0x4002D01C)) +#define QEI1_INTEN_R (*((volatile unsigned long *)0x4002D020)) +#define QEI1_RIS_R (*((volatile unsigned long *)0x4002D024)) +#define QEI1_ISC_R (*((volatile unsigned long *)0x4002D028)) + +//***************************************************************************** +// +// Timer registers (TIMER0) +// +//***************************************************************************** +#define TIMER0_CFG_R (*((volatile unsigned long *)0x40030000)) +#define TIMER0_TAMR_R (*((volatile unsigned long *)0x40030004)) +#define TIMER0_TBMR_R (*((volatile unsigned long *)0x40030008)) +#define TIMER0_CTL_R (*((volatile unsigned long *)0x4003000C)) +#define TIMER0_IMR_R (*((volatile unsigned long *)0x40030018)) +#define TIMER0_RIS_R (*((volatile unsigned long *)0x4003001C)) +#define TIMER0_MIS_R (*((volatile unsigned long *)0x40030020)) +#define TIMER0_ICR_R (*((volatile unsigned long *)0x40030024)) +#define TIMER0_TAILR_R (*((volatile unsigned long *)0x40030028)) +#define TIMER0_TBILR_R (*((volatile unsigned long *)0x4003002C)) +#define TIMER0_TAMATCHR_R (*((volatile unsigned long *)0x40030030)) +#define TIMER0_TBMATCHR_R (*((volatile unsigned long *)0x40030034)) +#define TIMER0_TAPR_R (*((volatile unsigned long *)0x40030038)) +#define TIMER0_TBPR_R (*((volatile unsigned long *)0x4003003C)) +#define TIMER0_TAPMR_R (*((volatile unsigned long *)0x40030040)) +#define TIMER0_TBPMR_R (*((volatile unsigned long *)0x40030044)) +#define TIMER0_TAR_R (*((volatile unsigned long *)0x40030048)) +#define TIMER0_TBR_R (*((volatile unsigned long *)0x4003004C)) + +//***************************************************************************** +// +// Timer registers (TIMER1) +// +//***************************************************************************** +#define TIMER1_CFG_R (*((volatile unsigned long *)0x40031000)) +#define TIMER1_TAMR_R (*((volatile unsigned long *)0x40031004)) +#define TIMER1_TBMR_R (*((volatile unsigned long *)0x40031008)) +#define TIMER1_CTL_R (*((volatile unsigned long *)0x4003100C)) +#define TIMER1_IMR_R (*((volatile unsigned long *)0x40031018)) +#define TIMER1_RIS_R (*((volatile unsigned long *)0x4003101C)) +#define TIMER1_MIS_R (*((volatile unsigned long *)0x40031020)) +#define TIMER1_ICR_R (*((volatile unsigned long *)0x40031024)) +#define TIMER1_TAILR_R (*((volatile unsigned long *)0x40031028)) +#define TIMER1_TBILR_R (*((volatile unsigned long *)0x4003102C)) +#define TIMER1_TAMATCHR_R (*((volatile unsigned long *)0x40031030)) +#define TIMER1_TBMATCHR_R (*((volatile unsigned long *)0x40031034)) +#define TIMER1_TAPR_R (*((volatile unsigned long *)0x40031038)) +#define TIMER1_TBPR_R (*((volatile unsigned long *)0x4003103C)) +#define TIMER1_TAPMR_R (*((volatile unsigned long *)0x40031040)) +#define TIMER1_TBPMR_R (*((volatile unsigned long *)0x40031044)) +#define TIMER1_TAR_R (*((volatile unsigned long *)0x40031048)) +#define TIMER1_TBR_R (*((volatile unsigned long *)0x4003104C)) + +//***************************************************************************** +// +// Timer registers (TIMER2) +// +//***************************************************************************** +#define TIMER2_CFG_R (*((volatile unsigned long *)0x40032000)) +#define TIMER2_TAMR_R (*((volatile unsigned long *)0x40032004)) +#define TIMER2_TBMR_R (*((volatile unsigned long *)0x40032008)) +#define TIMER2_CTL_R (*((volatile unsigned long *)0x4003200C)) +#define TIMER2_IMR_R (*((volatile unsigned long *)0x40032018)) +#define TIMER2_RIS_R (*((volatile unsigned long *)0x4003201C)) +#define TIMER2_MIS_R (*((volatile unsigned long *)0x40032020)) +#define TIMER2_ICR_R (*((volatile unsigned long *)0x40032024)) +#define TIMER2_TAILR_R (*((volatile unsigned long *)0x40032028)) +#define TIMER2_TBILR_R (*((volatile unsigned long *)0x4003202C)) +#define TIMER2_TAMATCHR_R (*((volatile unsigned long *)0x40032030)) +#define TIMER2_TBMATCHR_R (*((volatile unsigned long *)0x40032034)) +#define TIMER2_TAPR_R (*((volatile unsigned long *)0x40032038)) +#define TIMER2_TBPR_R (*((volatile unsigned long *)0x4003203C)) +#define TIMER2_TAPMR_R (*((volatile unsigned long *)0x40032040)) +#define TIMER2_TBPMR_R (*((volatile unsigned long *)0x40032044)) +#define TIMER2_TAR_R (*((volatile unsigned long *)0x40032048)) +#define TIMER2_TBR_R (*((volatile unsigned long *)0x4003204C)) + +//***************************************************************************** +// +// Timer registers (TIMER3) +// +//***************************************************************************** +#define TIMER3_CFG_R (*((volatile unsigned long *)0x40033000)) +#define TIMER3_TAMR_R (*((volatile unsigned long *)0x40033004)) +#define TIMER3_TBMR_R (*((volatile unsigned long *)0x40033008)) +#define TIMER3_CTL_R (*((volatile unsigned long *)0x4003300C)) +#define TIMER3_IMR_R (*((volatile unsigned long *)0x40033018)) +#define TIMER3_RIS_R (*((volatile unsigned long *)0x4003301C)) +#define TIMER3_MIS_R (*((volatile unsigned long *)0x40033020)) +#define TIMER3_ICR_R (*((volatile unsigned long *)0x40033024)) +#define TIMER3_TAILR_R (*((volatile unsigned long *)0x40033028)) +#define TIMER3_TBILR_R (*((volatile unsigned long *)0x4003302C)) +#define TIMER3_TAMATCHR_R (*((volatile unsigned long *)0x40033030)) +#define TIMER3_TBMATCHR_R (*((volatile unsigned long *)0x40033034)) +#define TIMER3_TAPR_R (*((volatile unsigned long *)0x40033038)) +#define TIMER3_TBPR_R (*((volatile unsigned long *)0x4003303C)) +#define TIMER3_TAPMR_R (*((volatile unsigned long *)0x40033040)) +#define TIMER3_TBPMR_R (*((volatile unsigned long *)0x40033044)) +#define TIMER3_TAR_R (*((volatile unsigned long *)0x40033048)) +#define TIMER3_TBR_R (*((volatile unsigned long *)0x4003304C)) + +//***************************************************************************** +// +// ADC registers (ADC0) +// +//***************************************************************************** +#define ADC0_ACTSS_R (*((volatile unsigned long *)0x40038000)) +#define ADC0_RIS_R (*((volatile unsigned long *)0x40038004)) +#define ADC0_IM_R (*((volatile unsigned long *)0x40038008)) +#define ADC0_ISC_R (*((volatile unsigned long *)0x4003800C)) +#define ADC0_OSTAT_R (*((volatile unsigned long *)0x40038010)) +#define ADC0_EMUX_R (*((volatile unsigned long *)0x40038014)) +#define ADC0_USTAT_R (*((volatile unsigned long *)0x40038018)) +#define ADC0_SSPRI_R (*((volatile unsigned long *)0x40038020)) +#define ADC0_PSSI_R (*((volatile unsigned long *)0x40038028)) +#define ADC0_SAC_R (*((volatile unsigned long *)0x40038030)) +#define ADC0_SSMUX0_R (*((volatile unsigned long *)0x40038040)) +#define ADC0_SSCTL0_R (*((volatile unsigned long *)0x40038044)) +#define ADC0_SSFIFO0_R (*((volatile unsigned long *)0x40038048)) +#define ADC0_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C)) +#define ADC0_SSMUX1_R (*((volatile unsigned long *)0x40038060)) +#define ADC0_SSCTL1_R (*((volatile unsigned long *)0x40038064)) +#define ADC0_SSFIFO1_R (*((volatile unsigned long *)0x40038068)) +#define ADC0_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C)) +#define ADC0_SSMUX2_R (*((volatile unsigned long *)0x40038080)) +#define ADC0_SSCTL2_R (*((volatile unsigned long *)0x40038084)) +#define ADC0_SSFIFO2_R (*((volatile unsigned long *)0x40038088)) +#define ADC0_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C)) +#define ADC0_SSMUX3_R (*((volatile unsigned long *)0x400380A0)) +#define ADC0_SSCTL3_R (*((volatile unsigned long *)0x400380A4)) +#define ADC0_SSFIFO3_R (*((volatile unsigned long *)0x400380A8)) +#define ADC0_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC)) +#define ADC0_TMLB_R (*((volatile unsigned long *)0x40038100)) + +//***************************************************************************** +// +// Comparator registers (COMP) +// +//***************************************************************************** +#define COMP_ACMIS_R (*((volatile unsigned long *)0x4003C000)) +#define COMP_ACRIS_R (*((volatile unsigned long *)0x4003C004)) +#define COMP_ACINTEN_R (*((volatile unsigned long *)0x4003C008)) +#define COMP_ACREFCTL_R (*((volatile unsigned long *)0x4003C010)) +#define COMP_ACSTAT0_R (*((volatile unsigned long *)0x4003C020)) +#define COMP_ACCTL0_R (*((volatile unsigned long *)0x4003C024)) +#define COMP_ACSTAT1_R (*((volatile unsigned long *)0x4003C040)) +#define COMP_ACCTL1_R (*((volatile unsigned long *)0x4003C044)) + +//***************************************************************************** +// +// Ethernet MAC registers (MAC) +// +//***************************************************************************** +#define MAC_RIS_R (*((volatile unsigned long *)0x40048000)) +#define MAC_IACK_R (*((volatile unsigned long *)0x40048000)) +#define MAC_IM_R (*((volatile unsigned long *)0x40048004)) +#define MAC_RCTL_R (*((volatile unsigned long *)0x40048008)) +#define MAC_TCTL_R (*((volatile unsigned long *)0x4004800C)) +#define MAC_DATA_R (*((volatile unsigned long *)0x40048010)) +#define MAC_IA0_R (*((volatile unsigned long *)0x40048014)) +#define MAC_IA1_R (*((volatile unsigned long *)0x40048018)) +#define MAC_THR_R (*((volatile unsigned long *)0x4004801C)) +#define MAC_MCTL_R (*((volatile unsigned long *)0x40048020)) +#define MAC_MDV_R (*((volatile unsigned long *)0x40048024)) +#define MAC_MTXD_R (*((volatile unsigned long *)0x4004802C)) +#define MAC_MRXD_R (*((volatile unsigned long *)0x40048030)) +#define MAC_NP_R (*((volatile unsigned long *)0x40048034)) +#define MAC_TR_R (*((volatile unsigned long *)0x40048038)) + +//***************************************************************************** +// +// Ethernet Controller PHY registers (MAC) +// +//***************************************************************************** +#define PHY_MR0 0x00000000 // Ethernet PHY Management Register + // 0 - Control +#define PHY_MR1 0x00000001 // Ethernet PHY Management Register + // 1 - Status +#define PHY_MR2 0x00000002 // Ethernet PHY Management Register + // 2 - PHY Identifier 1 +#define PHY_MR3 0x00000003 // Ethernet PHY Management Register + // 3 - PHY Identifier 2 +#define PHY_MR4 0x00000004 // Ethernet PHY Management Register + // 4 - Auto-Negotiation + // Advertisement +#define PHY_MR5 0x00000005 // Ethernet PHY Management Register + // 5 - Auto-Negotiation Link + // Partner Base Page Ability +#define PHY_MR6 0x00000006 // Ethernet PHY Management Register + // 6 - Auto-Negotiation Expansion +#define PHY_MR16 0x00000010 // Ethernet PHY Management Register + // 16 - Vendor-Specific +#define PHY_MR17 0x00000011 // Ethernet PHY Management Register + // 17 - Mode Control/Status +#define PHY_MR18 0x00000012 // Ethernet PHY Management Register + // 18 - Diagnostic +#define PHY_MR19 0x00000013 // Ethernet PHY Management Register + // 19 - Transceiver Control +#define PHY_MR23 0x00000017 // Ethernet PHY Management Register + // 23 - LED Configuration +#define PHY_MR24 0x00000018 // Ethernet PHY Management Register + // 24 -MDI/MDIX Control + +//***************************************************************************** +// +// Hibernation module registers (HIB) +// +//***************************************************************************** +#define HIB_RTCC_R (*((volatile unsigned long *)0x400FC000)) +#define HIB_RTCM0_R (*((volatile unsigned long *)0x400FC004)) +#define HIB_RTCM1_R (*((volatile unsigned long *)0x400FC008)) +#define HIB_RTCLD_R (*((volatile unsigned long *)0x400FC00C)) +#define HIB_CTL_R (*((volatile unsigned long *)0x400FC010)) +#define HIB_IM_R (*((volatile unsigned long *)0x400FC014)) +#define HIB_RIS_R (*((volatile unsigned long *)0x400FC018)) +#define HIB_MIS_R (*((volatile unsigned long *)0x400FC01C)) +#define HIB_IC_R (*((volatile unsigned long *)0x400FC020)) +#define HIB_RTCT_R (*((volatile unsigned long *)0x400FC024)) +#define HIB_DATA_R (*((volatile unsigned long *)0x400FC030)) + +//***************************************************************************** +// +// FLASH registers (FLASH CTRL) +// +//***************************************************************************** +#define FLASH_FMA_R (*((volatile unsigned long *)0x400FD000)) +#define FLASH_FMD_R (*((volatile unsigned long *)0x400FD004)) +#define FLASH_FMC_R (*((volatile unsigned long *)0x400FD008)) +#define FLASH_FCRIS_R (*((volatile unsigned long *)0x400FD00C)) +#define FLASH_FCIM_R (*((volatile unsigned long *)0x400FD010)) +#define FLASH_FCMISC_R (*((volatile unsigned long *)0x400FD014)) +#define FLASH_USECRL_R (*((volatile unsigned long *)0x400FE140)) +#define FLASH_USERDBG_R (*((volatile unsigned long *)0x400FE1D0)) +#define FLASH_USERREG0_R (*((volatile unsigned long *)0x400FE1E0)) +#define FLASH_USERREG1_R (*((volatile unsigned long *)0x400FE1E4)) +#define FLASH_FMPRE0_R (*((volatile unsigned long *)0x400FE200)) +#define FLASH_FMPRE1_R (*((volatile unsigned long *)0x400FE204)) +#define FLASH_FMPRE2_R (*((volatile unsigned long *)0x400FE208)) +#define FLASH_FMPRE3_R (*((volatile unsigned long *)0x400FE20C)) +#define FLASH_FMPPE0_R (*((volatile unsigned long *)0x400FE400)) +#define FLASH_FMPPE1_R (*((volatile unsigned long *)0x400FE404)) +#define FLASH_FMPPE2_R (*((volatile unsigned long *)0x400FE408)) +#define FLASH_FMPPE3_R (*((volatile unsigned long *)0x400FE40C)) + +//***************************************************************************** +// +// System Control registers (SYSCTL) +// +//***************************************************************************** +#define SYSCTL_DID0_R (*((volatile unsigned long *)0x400FE000)) +#define SYSCTL_DID1_R (*((volatile unsigned long *)0x400FE004)) +#define SYSCTL_DC0_R (*((volatile unsigned long *)0x400FE008)) +#define SYSCTL_DC1_R (*((volatile unsigned long *)0x400FE010)) +#define SYSCTL_DC2_R (*((volatile unsigned long *)0x400FE014)) +#define SYSCTL_DC3_R (*((volatile unsigned long *)0x400FE018)) +#define SYSCTL_DC4_R (*((volatile unsigned long *)0x400FE01C)) +#define SYSCTL_PBORCTL_R (*((volatile unsigned long *)0x400FE030)) +#define SYSCTL_LDOPCTL_R (*((volatile unsigned long *)0x400FE034)) +#define SYSCTL_SRCR0_R (*((volatile unsigned long *)0x400FE040)) +#define SYSCTL_SRCR1_R (*((volatile unsigned long *)0x400FE044)) +#define SYSCTL_SRCR2_R (*((volatile unsigned long *)0x400FE048)) +#define SYSCTL_RIS_R (*((volatile unsigned long *)0x400FE050)) +#define SYSCTL_IMC_R (*((volatile unsigned long *)0x400FE054)) +#define SYSCTL_MISC_R (*((volatile unsigned long *)0x400FE058)) +#define SYSCTL_RESC_R (*((volatile unsigned long *)0x400FE05C)) +#define SYSCTL_RCC_R (*((volatile unsigned long *)0x400FE060)) +#define SYSCTL_PLLCFG_R (*((volatile unsigned long *)0x400FE064)) +#define SYSCTL_RCC2_R (*((volatile unsigned long *)0x400FE070)) +#define SYSCTL_RCGC0_R (*((volatile unsigned long *)0x400FE100)) +#define SYSCTL_RCGC1_R (*((volatile unsigned long *)0x400FE104)) +#define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x400FE108)) +#define SYSCTL_SCGC0_R (*((volatile unsigned long *)0x400FE110)) +#define SYSCTL_SCGC1_R (*((volatile unsigned long *)0x400FE114)) +#define SYSCTL_SCGC2_R (*((volatile unsigned long *)0x400FE118)) +#define SYSCTL_DCGC0_R (*((volatile unsigned long *)0x400FE120)) +#define SYSCTL_DCGC1_R (*((volatile unsigned long *)0x400FE124)) +#define SYSCTL_DCGC2_R (*((volatile unsigned long *)0x400FE128)) +#define SYSCTL_DSLPCLKCFG_R (*((volatile unsigned long *)0x400FE144)) + +//***************************************************************************** +// +// NVIC registers (NVIC) +// +//***************************************************************************** +#define NVIC_INT_TYPE_R (*((volatile unsigned long *)0xE000E004)) +#define NVIC_ST_CTRL_R (*((volatile unsigned long *)0xE000E010)) +#define NVIC_ST_RELOAD_R (*((volatile unsigned long *)0xE000E014)) +#define NVIC_ST_CURRENT_R (*((volatile unsigned long *)0xE000E018)) +#define NVIC_ST_CAL_R (*((volatile unsigned long *)0xE000E01C)) +#define NVIC_EN0_R (*((volatile unsigned long *)0xE000E100)) +#define NVIC_EN1_R (*((volatile unsigned long *)0xE000E104)) +#define NVIC_DIS0_R (*((volatile unsigned long *)0xE000E180)) +#define NVIC_DIS1_R (*((volatile unsigned long *)0xE000E184)) +#define NVIC_PEND0_R (*((volatile unsigned long *)0xE000E200)) +#define NVIC_PEND1_R (*((volatile unsigned long *)0xE000E204)) +#define NVIC_UNPEND0_R (*((volatile unsigned long *)0xE000E280)) +#define NVIC_UNPEND1_R (*((volatile unsigned long *)0xE000E284)) +#define NVIC_ACTIVE0_R (*((volatile unsigned long *)0xE000E300)) +#define NVIC_ACTIVE1_R (*((volatile unsigned long *)0xE000E304)) +#define NVIC_PRI0_R (*((volatile unsigned long *)0xE000E400)) +#define NVIC_PRI1_R (*((volatile unsigned long *)0xE000E404)) +#define NVIC_PRI2_R (*((volatile unsigned long *)0xE000E408)) +#define NVIC_PRI3_R (*((volatile unsigned long *)0xE000E40C)) +#define NVIC_PRI4_R (*((volatile unsigned long *)0xE000E410)) +#define NVIC_PRI5_R (*((volatile unsigned long *)0xE000E414)) +#define NVIC_PRI6_R (*((volatile unsigned long *)0xE000E418)) +#define NVIC_PRI7_R (*((volatile unsigned long *)0xE000E41C)) +#define NVIC_PRI8_R (*((volatile unsigned long *)0xE000E420)) +#define NVIC_PRI9_R (*((volatile unsigned long *)0xE000E424)) +#define NVIC_PRI10_R (*((volatile unsigned long *)0xE000E428)) +#define NVIC_CPUID_R (*((volatile unsigned long *)0xE000ED00)) +#define NVIC_INT_CTRL_R (*((volatile unsigned long *)0xE000ED04)) +#define NVIC_VTABLE_R (*((volatile unsigned long *)0xE000ED08)) +#define NVIC_APINT_R (*((volatile unsigned long *)0xE000ED0C)) +#define NVIC_SYS_CTRL_R (*((volatile unsigned long *)0xE000ED10)) +#define NVIC_CFG_CTRL_R (*((volatile unsigned long *)0xE000ED14)) +#define NVIC_SYS_PRI1_R (*((volatile unsigned long *)0xE000ED18)) +#define NVIC_SYS_PRI2_R (*((volatile unsigned long *)0xE000ED1C)) +#define NVIC_SYS_PRI3_R (*((volatile unsigned long *)0xE000ED20)) +#define NVIC_SYS_HND_CTRL_R (*((volatile unsigned long *)0xE000ED24)) +#define NVIC_FAULT_STAT_R (*((volatile unsigned long *)0xE000ED28)) +#define NVIC_HFAULT_STAT_R (*((volatile unsigned long *)0xE000ED2C)) +#define NVIC_DEBUG_STAT_R (*((volatile unsigned long *)0xE000ED30)) +#define NVIC_MM_ADDR_R (*((volatile unsigned long *)0xE000ED34)) +#define NVIC_FAULT_ADDR_R (*((volatile unsigned long *)0xE000ED38)) +#define NVIC_MPU_TYPE_R (*((volatile unsigned long *)0xE000ED90)) +#define NVIC_MPU_CTRL_R (*((volatile unsigned long *)0xE000ED94)) +#define NVIC_MPU_NUMBER_R (*((volatile unsigned long *)0xE000ED98)) +#define NVIC_MPU_BASE_R (*((volatile unsigned long *)0xE000ED9C)) +#define NVIC_MPU_ATTR_R (*((volatile unsigned long *)0xE000EDA0)) +#define NVIC_MPU_BASE1_R (*((volatile unsigned long *)0xE000EDA4)) +#define NVIC_MPU_ATTR1_R (*((volatile unsigned long *)0xE000EDA8)) +#define NVIC_MPU_BASE2_R (*((volatile unsigned long *)0xE000EDAC)) +#define NVIC_MPU_ATTR2_R (*((volatile unsigned long *)0xE000EDB0)) +#define NVIC_MPU_BASE3_R (*((volatile unsigned long *)0xE000EDB4)) +#define NVIC_MPU_ATTR3_R (*((volatile unsigned long *)0xE000EDB8)) +#define NVIC_DBG_CTRL_R (*((volatile unsigned long *)0xE000EDF0)) +#define NVIC_DBG_XFER_R (*((volatile unsigned long *)0xE000EDF4)) +#define NVIC_DBG_DATA_R (*((volatile unsigned long *)0xE000EDF8)) +#define NVIC_DBG_INT_R (*((volatile unsigned long *)0xE000EDFC)) +#define NVIC_SW_TRIG_R (*((volatile unsigned long *)0xE000EF00)) + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOAD register. +// +//***************************************************************************** +#define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value +#define WDT_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_VALUE register. +// +//***************************************************************************** +#define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value +#define WDT_VALUE_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_CTL register. +// +//***************************************************************************** +#define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable +#define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_ICR register. +// +//***************************************************************************** +#define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear +#define WDT_ICR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_RIS register. +// +//***************************************************************************** +#define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_MIS register. +// +//***************************************************************************** +#define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_TEST register. +// +//***************************************************************************** +#define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the WDT_O_LOCK register. +// +//***************************************************************************** +#define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock +#define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked +#define WDT_LOCK_LOCKED 0x00000001 // Locked +#define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer + +//***************************************************************************** +// +// The following are defines for the bit fields in the GPIO_O_LOCK register. +// +//***************************************************************************** +#define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock +#define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked + // and may be modified +#define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked + // and may not be modified +#define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR0 register. +// +//***************************************************************************** +#define SSI_CR0_SCR_M 0x0000FF00 // SSI Serial Clock Rate +#define SSI_CR0_SPH 0x00000080 // SSI Serial Clock Phase +#define SSI_CR0_SPO 0x00000040 // SSI Serial Clock Polarity +#define SSI_CR0_FRF_M 0x00000030 // SSI Frame Format Select +#define SSI_CR0_FRF_MOTO 0x00000000 // Freescale SPI Frame Format +#define SSI_CR0_FRF_TI 0x00000010 // Texas Instruments Synchronous + // Serial Frame Format +#define SSI_CR0_FRF_NMW 0x00000020 // MICROWIRE Frame Format +#define SSI_CR0_DSS_M 0x0000000F // SSI Data Size Select +#define SSI_CR0_DSS_4 0x00000003 // 4-bit data +#define SSI_CR0_DSS_5 0x00000004 // 5-bit data +#define SSI_CR0_DSS_6 0x00000005 // 6-bit data +#define SSI_CR0_DSS_7 0x00000006 // 7-bit data +#define SSI_CR0_DSS_8 0x00000007 // 8-bit data +#define SSI_CR0_DSS_9 0x00000008 // 9-bit data +#define SSI_CR0_DSS_10 0x00000009 // 10-bit data +#define SSI_CR0_DSS_11 0x0000000A // 11-bit data +#define SSI_CR0_DSS_12 0x0000000B // 12-bit data +#define SSI_CR0_DSS_13 0x0000000C // 13-bit data +#define SSI_CR0_DSS_14 0x0000000D // 14-bit data +#define SSI_CR0_DSS_15 0x0000000E // 15-bit data +#define SSI_CR0_DSS_16 0x0000000F // 16-bit data +#define SSI_CR0_SCR_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CR1 register. +// +//***************************************************************************** +#define SSI_CR1_SOD 0x00000008 // SSI Slave Mode Output Disable +#define SSI_CR1_MS 0x00000004 // SSI Master/Slave Select +#define SSI_CR1_SSE 0x00000002 // SSI Synchronous Serial Port + // Enable +#define SSI_CR1_LBM 0x00000001 // SSI Loopback Mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_DR register. +// +//***************************************************************************** +#define SSI_DR_DATA_M 0x0000FFFF // SSI Receive/Transmit Data +#define SSI_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_SR register. +// +//***************************************************************************** +#define SSI_SR_BSY 0x00000010 // SSI Busy Bit +#define SSI_SR_RFF 0x00000008 // SSI Receive FIFO Full +#define SSI_SR_RNE 0x00000004 // SSI Receive FIFO Not Empty +#define SSI_SR_TNF 0x00000002 // SSI Transmit FIFO Not Full +#define SSI_SR_TFE 0x00000001 // SSI Transmit FIFO Empty + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_CPSR register. +// +//***************************************************************************** +#define SSI_CPSR_CPSDVSR_M 0x000000FF // SSI Clock Prescale Divisor +#define SSI_CPSR_CPSDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_IM register. +// +//***************************************************************************** +#define SSI_IM_TXIM 0x00000008 // SSI Transmit FIFO Interrupt Mask +#define SSI_IM_RXIM 0x00000004 // SSI Receive FIFO Interrupt Mask +#define SSI_IM_RTIM 0x00000002 // SSI Receive Time-Out Interrupt + // Mask +#define SSI_IM_RORIM 0x00000001 // SSI Receive Overrun Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_RIS register. +// +//***************************************************************************** +#define SSI_RIS_TXRIS 0x00000008 // SSI Transmit FIFO Raw Interrupt + // Status +#define SSI_RIS_RXRIS 0x00000004 // SSI Receive FIFO Raw Interrupt + // Status +#define SSI_RIS_RTRIS 0x00000002 // SSI Receive Time-Out Raw + // Interrupt Status +#define SSI_RIS_RORRIS 0x00000001 // SSI Receive Overrun Raw + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_MIS register. +// +//***************************************************************************** +#define SSI_MIS_TXMIS 0x00000008 // SSI Transmit FIFO Masked + // Interrupt Status +#define SSI_MIS_RXMIS 0x00000004 // SSI Receive FIFO Masked + // Interrupt Status +#define SSI_MIS_RTMIS 0x00000002 // SSI Receive Time-Out Masked + // Interrupt Status +#define SSI_MIS_RORMIS 0x00000001 // SSI Receive Overrun Masked + // Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SSI_O_ICR register. +// +//***************************************************************************** +#define SSI_ICR_RTIC 0x00000002 // SSI Receive Time-Out Interrupt + // Clear +#define SSI_ICR_RORIC 0x00000001 // SSI Receive Overrun Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_DR register. +// +//***************************************************************************** +#define UART_DR_OE 0x00000800 // UART Overrun Error +#define UART_DR_BE 0x00000400 // UART Break Error +#define UART_DR_PE 0x00000200 // UART Parity Error +#define UART_DR_FE 0x00000100 // UART Framing Error +#define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received +#define UART_DR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RSR register. +// +//***************************************************************************** +#define UART_RSR_OE 0x00000008 // UART Overrun Error +#define UART_RSR_BE 0x00000004 // UART Break Error +#define UART_RSR_PE 0x00000002 // UART Parity Error +#define UART_RSR_FE 0x00000001 // UART Framing Error + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ECR register. +// +//***************************************************************************** +#define UART_ECR_DATA_M 0x000000FF // Error Clear +#define UART_ECR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FR register. +// +//***************************************************************************** +#define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty +#define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full +#define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full +#define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty +#define UART_FR_BUSY 0x00000008 // UART Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ILPR register. +// +//***************************************************************************** +#define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor +#define UART_ILPR_ILPDVSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IBRD register. +// +//***************************************************************************** +#define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor +#define UART_IBRD_DIVINT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_FBRD register. +// +//***************************************************************************** +#define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor +#define UART_FBRD_DIVFRAC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_LCRH register. +// +//***************************************************************************** +#define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select +#define UART_LCRH_WLEN_M 0x00000060 // UART Word Length +#define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default) +#define UART_LCRH_WLEN_6 0x00000020 // 6 bits +#define UART_LCRH_WLEN_7 0x00000040 // 7 bits +#define UART_LCRH_WLEN_8 0x00000060 // 8 bits +#define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs +#define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select +#define UART_LCRH_EPS 0x00000004 // UART Even Parity Select +#define UART_LCRH_PEN 0x00000002 // UART Parity Enable +#define UART_LCRH_BRK 0x00000001 // UART Send Break + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_CTL register. +// +//***************************************************************************** +#define UART_CTL_RXE 0x00000200 // UART Receive Enable +#define UART_CTL_TXE 0x00000100 // UART Transmit Enable +#define UART_CTL_LBE 0x00000080 // UART Loop Back Enable +#define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode +#define UART_CTL_SIREN 0x00000002 // UART SIR Enable +#define UART_CTL_UARTEN 0x00000001 // UART Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IFLS register. +// +//***************************************************************************** +#define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO + // Level Select +#define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full +#define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full +#define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default) +#define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full +#define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full +#define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO + // Level Select +#define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full +#define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full +#define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default) +#define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full +#define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_IM register. +// +//***************************************************************************** +#define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt + // Mask +#define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask +#define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask +#define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt + // Mask +#define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt + // Mask +#define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask +#define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_RIS register. +// +//***************************************************************************** +#define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt + // Status +#define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt + // Status +#define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt + // Status +#define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt + // Status +#define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw + // Interrupt Status +#define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt + // Status +#define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_MIS register. +// +//***************************************************************************** +#define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked + // Interrupt Status +#define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked + // Interrupt Status +#define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked + // Interrupt Status +#define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked + // Interrupt Status +#define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked + // Interrupt Status +#define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt + // Status +#define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the UART_O_ICR register. +// +//***************************************************************************** +#define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear +#define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear +#define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear +#define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear +#define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear +#define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear +#define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MSA register. +// +//***************************************************************************** +#define I2C_MSA_SA_M 0x000000FE // I2C Slave Address +#define I2C_MSA_RS 0x00000001 // Receive not send +#define I2C_MSA_SA_S 1 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SOAR register. +// +//***************************************************************************** +#define I2C_SOAR_OAR_M 0x0000007F // I2C Slave Own Address +#define I2C_SOAR_OAR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SCSR register. +// +//***************************************************************************** +#define I2C_SCSR_FBR 0x00000004 // First Byte Received +#define I2C_SCSR_TREQ 0x00000002 // Transmit Request +#define I2C_SCSR_DA 0x00000001 // Device Active +#define I2C_SCSR_RREQ 0x00000001 // Receive Request + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCS register. +// +//***************************************************************************** +#define I2C_MCS_BUSBSY 0x00000040 // Bus Busy +#define I2C_MCS_IDLE 0x00000020 // I2C Idle +#define I2C_MCS_ARBLST 0x00000010 // Arbitration Lost +#define I2C_MCS_ACK 0x00000008 // Data Acknowledge Enable +#define I2C_MCS_DATACK 0x00000008 // Acknowledge Data +#define I2C_MCS_ADRACK 0x00000004 // Acknowledge Address +#define I2C_MCS_STOP 0x00000004 // Generate STOP +#define I2C_MCS_START 0x00000002 // Generate START +#define I2C_MCS_ERROR 0x00000002 // Error +#define I2C_MCS_RUN 0x00000001 // I2C Master Enable +#define I2C_MCS_BUSY 0x00000001 // I2C Busy + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SDR register. +// +//***************************************************************************** +#define I2C_SDR_DATA_M 0x000000FF // Data for Transfer +#define I2C_SDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MDR register. +// +//***************************************************************************** +#define I2C_MDR_DATA_M 0x000000FF // Data Transferred +#define I2C_MDR_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MTPR register. +// +//***************************************************************************** +#define I2C_MTPR_TPR_M 0x0000007F // SCL Clock Period +#define I2C_MTPR_TPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_DATAIM 0x00000001 // Data Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_DATARIS 0x00000001 // Data Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MIMR register. +// +//***************************************************************************** +#define I2C_MIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MRIS register. +// +//***************************************************************************** +#define I2C_MRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_DATAMIS 0x00000001 // Data Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_DATAIC 0x00000001 // Data Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MMIS register. +// +//***************************************************************************** +#define I2C_MMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MICR register. +// +//***************************************************************************** +#define I2C_MICR_IC 0x00000001 // Interrupt Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the I2C_O_MCR register. +// +//***************************************************************************** +#define I2C_MCR_SFE 0x00000020 // I2C Slave Function Enable +#define I2C_MCR_MFE 0x00000010 // I2C Master Function Enable +#define I2C_MCR_LPBK 0x00000001 // I2C Loopback + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_CTL register. +// +//***************************************************************************** +#define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2 +#define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1 +#define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_SYNC register. +// +//***************************************************************************** +#define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter +#define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter +#define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ENABLE register. +// +//***************************************************************************** +#define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable +#define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable +#define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable +#define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable +#define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable +#define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INVERT register. +// +//***************************************************************************** +#define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal +#define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal +#define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal +#define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal +#define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal +#define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_FAULT register. +// +//***************************************************************************** +#define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault +#define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault +#define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault +#define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault +#define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault +#define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_INTEN register. +// +//***************************************************************************** +#define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable +#define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable +#define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable +#define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_RIS register. +// +//***************************************************************************** +#define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted +#define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted +#define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_ISC register. +// +//***************************************************************************** +#define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted +#define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status +#define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status +#define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_STATUS register. +// +//***************************************************************************** +#define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CTL register. +// +//***************************************************************************** +#define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode +#define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode +#define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode +#define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode +#define PWM_X_CTL_MODE 0x00000002 // Counter Mode +#define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_INTEN register. +// +//***************************************************************************** +#define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up +#define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up +#define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD +#define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0 +#define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB + // Down +#define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB + // Up +#define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA + // Down +#define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA + // Up +#define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD +#define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_RIS register. +// +//***************************************************************************** +#define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt + // Status +#define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status +#define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt + // Status +#define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status +#define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status +#define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_ISC register. +// +//***************************************************************************** +#define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt +#define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt +#define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt +#define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt +#define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt +#define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_LOAD register. +// +//***************************************************************************** +#define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value +#define PWM_X_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_COUNT register. +// +//***************************************************************************** +#define PWM_X_COUNT_M 0x0000FFFF // Counter Value +#define PWM_X_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPA register. +// +//***************************************************************************** +#define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value +#define PWM_X_CMPA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_CMPB register. +// +//***************************************************************************** +#define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value +#define PWM_X_CMPB_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENA register. +// +//***************************************************************************** +#define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENA_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA +#define PWM_X_GENA_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High +#define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENA_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA +#define PWM_X_GENA_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENA_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA +#define PWM_X_GENA_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High +#define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENA_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA +#define PWM_X_GENA_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmA Low +#define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High +#define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA +#define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low +#define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High +#define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA +#define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low +#define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_GENB register. +// +//***************************************************************************** +#define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down +#define PWM_X_GENB_ACTCMPBD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB +#define PWM_X_GENB_ACTCMPBD_ZERO \ + 0x00000800 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High +#define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up +#define PWM_X_GENB_ACTCMPBU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB +#define PWM_X_GENB_ACTCMPBU_ZERO \ + 0x00000200 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down +#define PWM_X_GENB_ACTCMPAD_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB +#define PWM_X_GENB_ACTCMPAD_ZERO \ + 0x00000080 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High +#define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up +#define PWM_X_GENB_ACTCMPAU_NONE \ + 0x00000000 // Do nothing +#define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB +#define PWM_X_GENB_ACTCMPAU_ZERO \ + 0x00000020 // Drive pwmB Low +#define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High +#define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD +#define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB +#define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low +#define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High +#define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0 +#define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing +#define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB +#define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low +#define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBCTL register. +// +//***************************************************************************** +#define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBRISE register. +// +//***************************************************************************** +#define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay +#define PWM_X_DBRISE_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PWM_O_X_DBFALL register. +// +//***************************************************************************** +#define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay +#define PWM_X_DBFALL_DELAY_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_CTL register. +// +//***************************************************************************** +#define QEI_CTL_STALLEN 0x00001000 // Stall QEI +#define QEI_CTL_INVI 0x00000800 // Invert Index Pulse +#define QEI_CTL_INVB 0x00000400 // Invert PhB +#define QEI_CTL_INVA 0x00000200 // Invert PhA +#define QEI_CTL_VELDIV_M 0x000001C0 // Predivide Velocity +#define QEI_CTL_VELDIV_1 0x00000000 // QEI clock /1 +#define QEI_CTL_VELDIV_2 0x00000040 // QEI clock /2 +#define QEI_CTL_VELDIV_4 0x00000080 // QEI clock /4 +#define QEI_CTL_VELDIV_8 0x000000C0 // QEI clock /8 +#define QEI_CTL_VELDIV_16 0x00000100 // QEI clock /16 +#define QEI_CTL_VELDIV_32 0x00000140 // QEI clock /32 +#define QEI_CTL_VELDIV_64 0x00000180 // QEI clock /64 +#define QEI_CTL_VELDIV_128 0x000001C0 // QEI clock /128 +#define QEI_CTL_VELEN 0x00000020 // Capture Velocity +#define QEI_CTL_RESMODE 0x00000010 // Reset Mode +#define QEI_CTL_CAPMODE 0x00000008 // Capture Mode +#define QEI_CTL_SIGMODE 0x00000004 // Signal Mode +#define QEI_CTL_SWAP 0x00000002 // Swap Signals +#define QEI_CTL_ENABLE 0x00000001 // Enable QEI + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_STAT register. +// +//***************************************************************************** +#define QEI_STAT_DIRECTION 0x00000002 // Direction of Rotation +#define QEI_STAT_ERROR 0x00000001 // Error Detected + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_POS register. +// +//***************************************************************************** +#define QEI_POS_M 0xFFFFFFFF // Current Position Integrator + // Value +#define QEI_POS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_MAXPOS register. +// +//***************************************************************************** +#define QEI_MAXPOS_M 0xFFFFFFFF // Maximum Position Integrator + // Value +#define QEI_MAXPOS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_LOAD register. +// +//***************************************************************************** +#define QEI_LOAD_M 0xFFFFFFFF // Velocity Timer Load Value +#define QEI_LOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_TIME register. +// +//***************************************************************************** +#define QEI_TIME_M 0xFFFFFFFF // Velocity Timer Current Value +#define QEI_TIME_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_COUNT register. +// +//***************************************************************************** +#define QEI_COUNT_M 0xFFFFFFFF // Velocity Pulse Count +#define QEI_COUNT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_SPEED register. +// +//***************************************************************************** +#define QEI_SPEED_M 0xFFFFFFFF // Velocity +#define QEI_SPEED_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_INTEN register. +// +//***************************************************************************** +#define QEI_INTEN_ERROR 0x00000008 // Phase Error Interrupt Enable +#define QEI_INTEN_DIR 0x00000004 // Direction Change Interrupt + // Enable +#define QEI_INTEN_TIMER 0x00000002 // Timer Expires Interrupt Enable +#define QEI_INTEN_INDEX 0x00000001 // Index Pulse Detected Interrupt + // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_RIS register. +// +//***************************************************************************** +#define QEI_RIS_ERROR 0x00000008 // Phase Error Detected +#define QEI_RIS_DIR 0x00000004 // Direction Change Detected +#define QEI_RIS_TIMER 0x00000002 // Velocity Timer Expired +#define QEI_RIS_INDEX 0x00000001 // Index Pulse Asserted + +//***************************************************************************** +// +// The following are defines for the bit fields in the QEI_O_ISC register. +// +//***************************************************************************** +#define QEI_ISC_ERROR 0x00000008 // Phase Error Interrupt +#define QEI_ISC_DIR 0x00000004 // Direction Change Interrupt +#define QEI_ISC_TIMER 0x00000002 // Velocity Timer Expired Interrupt +#define QEI_ISC_INDEX 0x00000001 // Index Pulse Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CFG register. +// +//***************************************************************************** +#define TIMER_CFG_M 0x00000007 // GPTM Configuration +#define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration +#define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC) + // counter configuration +#define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The + // function is controlled by bits + // 1:0 of GPTMTAMR and GPTMTBMR + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMR register. +// +//***************************************************************************** +#define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode + // Select +#define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode +#define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode +#define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMR register. +// +//***************************************************************************** +#define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode + // Select +#define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode +#define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode +#define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode +#define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode +#define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_CTL register. +// +//***************************************************************************** +#define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level +#define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger + // Enable +#define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode +#define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge +#define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges +#define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable +#define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable +#define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level +#define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger + // Enable +#define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable +#define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode +#define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge +#define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge +#define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges +#define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable +#define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_IMR register. +// +//***************************************************************************** +#define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt + // Mask +#define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt + // Mask +#define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt + // Mask +#define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask +#define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt + // Mask +#define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt + // Mask +#define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt + // Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_RIS register. +// +//***************************************************************************** +#define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw + // Interrupt +#define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw + // Interrupt +#define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw + // Interrupt +#define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt +#define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw + // Interrupt +#define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw + // Interrupt +#define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_MIS register. +// +//***************************************************************************** +#define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked + // Interrupt +#define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked + // Interrupt +#define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked + // Interrupt +#define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt +#define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked + // Interrupt +#define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked + // Interrupt +#define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_ICR register. +// +//***************************************************************************** +#define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt + // Clear +#define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt + // Clear +#define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt + // Clear +#define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear +#define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt + // Clear +#define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt + // Clear +#define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAILR register. +// +//***************************************************************************** +#define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load + // Register High +#define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load + // Register Low +#define TIMER_TAILR_TAILRH_S 16 +#define TIMER_TAILR_TAILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBILR register. +// +//***************************************************************************** +#define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load + // Register +#define TIMER_TBILR_TBILRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High +#define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low +#define TIMER_TAMATCHR_TAMRH_S 16 +#define TIMER_TAMATCHR_TAMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBMATCHR +// register. +// +//***************************************************************************** +#define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low +#define TIMER_TBMATCHR_TBMRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPR register. +// +//***************************************************************************** +#define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale +#define TIMER_TAPR_TAPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPR register. +// +//***************************************************************************** +#define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale +#define TIMER_TBPR_TBPSR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAPMR register. +// +//***************************************************************************** +#define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match +#define TIMER_TAPMR_TAPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBPMR register. +// +//***************************************************************************** +#define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match +#define TIMER_TBPMR_TBPSMR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TAR register. +// +//***************************************************************************** +#define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High +#define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low +#define TIMER_TAR_TARH_S 16 +#define TIMER_TAR_TARL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the TIMER_O_TBR register. +// +//***************************************************************************** +#define TIMER_TBR_TBRL_M 0x0000FFFF // GPTM Timer B +#define TIMER_TBR_TBRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ACTSS register. +// +//***************************************************************************** +#define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable +#define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable +#define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable +#define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_RIS register. +// +//***************************************************************************** +#define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status +#define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status +#define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status +#define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_IM register. +// +//***************************************************************************** +#define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask +#define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask +#define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask +#define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_ISC register. +// +//***************************************************************************** +#define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear +#define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear +#define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear +#define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_OSTAT register. +// +//***************************************************************************** +#define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow +#define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow +#define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow +#define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_EMUX register. +// +//***************************************************************************** +#define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select +#define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0 +#define ADC_EMUX_EM3_COMP1 0x00002000 // Analog Comparator 1 +#define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO PB4) +#define ADC_EMUX_EM3_TIMER 0x00005000 // Timer +#define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0 +#define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1 +#define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2 +#define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample) +#define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select +#define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0 +#define ADC_EMUX_EM2_COMP1 0x00000200 // Analog Comparator 1 +#define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO PB4) +#define ADC_EMUX_EM2_TIMER 0x00000500 // Timer +#define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0 +#define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1 +#define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2 +#define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample) +#define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select +#define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0 +#define ADC_EMUX_EM1_COMP1 0x00000020 // Analog Comparator 1 +#define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO PB4) +#define ADC_EMUX_EM1_TIMER 0x00000050 // Timer +#define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0 +#define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1 +#define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2 +#define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample) +#define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select +#define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default) +#define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0 +#define ADC_EMUX_EM0_COMP1 0x00000002 // Analog Comparator 1 +#define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO PB4) +#define ADC_EMUX_EM0_TIMER 0x00000005 // Timer +#define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0 +#define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1 +#define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2 +#define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample) + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_USTAT register. +// +//***************************************************************************** +#define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow +#define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow +#define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow +#define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSPRI register. +// +//***************************************************************************** +#define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority +#define ADC_SSPRI_SS3_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority +#define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority +#define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority +#define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority +#define ADC_SSPRI_SS2_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority +#define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority +#define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority +#define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority +#define ADC_SSPRI_SS1_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority +#define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority +#define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority +#define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority +#define ADC_SSPRI_SS0_1ST 0x00000000 // First priority +#define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority +#define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority +#define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_PSSI register. +// +//***************************************************************************** +#define ADC_PSSI_SS3 0x00000008 // SS3 Initiate +#define ADC_PSSI_SS2 0x00000004 // SS2 Initiate +#define ADC_PSSI_SS1 0x00000002 // SS1 Initiate +#define ADC_PSSI_SS0 0x00000001 // SS0 Initiate + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SAC register. +// +//***************************************************************************** +#define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control +#define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling +#define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling +#define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling +#define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling +#define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling +#define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling +#define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX0 register. +// +//***************************************************************************** +#define ADC_SSMUX0_MUX7_M 0x30000000 // 8th Sample Input Select +#define ADC_SSMUX0_MUX6_M 0x03000000 // 7th Sample Input Select +#define ADC_SSMUX0_MUX5_M 0x00300000 // 6th Sample Input Select +#define ADC_SSMUX0_MUX4_M 0x00030000 // 5th Sample Input Select +#define ADC_SSMUX0_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX0_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX0_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX0_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX0_MUX7_S 28 +#define ADC_SSMUX0_MUX6_S 24 +#define ADC_SSMUX0_MUX5_S 20 +#define ADC_SSMUX0_MUX4_S 16 +#define ADC_SSMUX0_MUX3_S 12 +#define ADC_SSMUX0_MUX2_S 8 +#define ADC_SSMUX0_MUX1_S 4 +#define ADC_SSMUX0_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL0 register. +// +//***************************************************************************** +#define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select +#define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable +#define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence +#define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select +#define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select +#define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable +#define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence +#define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select +#define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select +#define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable +#define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence +#define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select +#define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select +#define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable +#define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence +#define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select +#define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO0 register. +// +//***************************************************************************** +#define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT0 register. +// +//***************************************************************************** +#define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT0_HPTR_S 4 +#define ADC_SSFSTAT0_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX1 register. +// +//***************************************************************************** +#define ADC_SSMUX1_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX1_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX1_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX1_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX1_MUX3_S 12 +#define ADC_SSMUX1_MUX2_S 8 +#define ADC_SSMUX1_MUX1_S 4 +#define ADC_SSMUX1_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL1 register. +// +//***************************************************************************** +#define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO1 register. +// +//***************************************************************************** +#define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT1 register. +// +//***************************************************************************** +#define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT1_HPTR_S 4 +#define ADC_SSFSTAT1_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX2 register. +// +//***************************************************************************** +#define ADC_SSMUX2_MUX3_M 0x00003000 // 4th Sample Input Select +#define ADC_SSMUX2_MUX2_M 0x00000300 // 3rd Sample Input Select +#define ADC_SSMUX2_MUX1_M 0x00000030 // 2nd Sample Input Select +#define ADC_SSMUX2_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX2_MUX3_S 12 +#define ADC_SSMUX2_MUX2_S 8 +#define ADC_SSMUX2_MUX1_S 4 +#define ADC_SSMUX2_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL2 register. +// +//***************************************************************************** +#define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select +#define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable +#define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence +#define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select +#define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select +#define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable +#define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence +#define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select +#define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select +#define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable +#define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence +#define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select +#define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO2 register. +// +//***************************************************************************** +#define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO2_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT2 register. +// +//***************************************************************************** +#define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT2_HPTR_S 4 +#define ADC_SSFSTAT2_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSMUX3 register. +// +//***************************************************************************** +#define ADC_SSMUX3_MUX0_M 0x00000003 // 1st Sample Input Select +#define ADC_SSMUX3_MUX0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSCTL3 register. +// +//***************************************************************************** +#define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select +#define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable +#define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence +#define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFIFO3 register. +// +//***************************************************************************** +#define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data +#define ADC_SSFIFO3_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_SSFSTAT3 register. +// +//***************************************************************************** +#define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full +#define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty +#define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer +#define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer +#define ADC_SSFSTAT3_HPTR_S 4 +#define ADC_SSFSTAT3_TPTR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the ADC_O_TMLB register. +// +//***************************************************************************** +#define ADC_TMLB_LB 0x00000001 // Loopback Mode Enable + +//***************************************************************************** +// +// The following are defines for the the interpretation of the data in the +// SSFIFOx when the ADC TMLB is enabled. +// +//***************************************************************************** +#define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift +#define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACMIS register. +// +//***************************************************************************** +#define COMP_ACMIS_IN1 0x00000002 // Comparator 1 Masked Interrupt + // Status +#define COMP_ACMIS_IN0 0x00000001 // Comparator 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACRIS register. +// +//***************************************************************************** +#define COMP_ACRIS_IN1 0x00000002 // Comparator 1 Interrupt Status +#define COMP_ACRIS_IN0 0x00000001 // Comparator 0 Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACINTEN register. +// +//***************************************************************************** +#define COMP_ACINTEN_IN1 0x00000002 // Comparator 1 Interrupt Enable +#define COMP_ACINTEN_IN0 0x00000001 // Comparator 0 Interrupt Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACREFCTL +// register. +// +//***************************************************************************** +#define COMP_ACREFCTL_EN 0x00000200 // Resistor Ladder Enable +#define COMP_ACREFCTL_RNG 0x00000100 // Resistor Ladder Range +#define COMP_ACREFCTL_VREF_M 0x0000000F // Resistor Ladder Voltage Ref +#define COMP_ACREFCTL_VREF_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT0 register. +// +//***************************************************************************** +#define COMP_ACSTAT0_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL0 register. +// +//***************************************************************************** +#define COMP_ACCTL0_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL0_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL0_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL0_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL0_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL0_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL0_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL0_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL0_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL0_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL0_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL0_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL0_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL0_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL0_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL0_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL0_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL0_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACSTAT1 register. +// +//***************************************************************************** +#define COMP_ACSTAT1_OVAL 0x00000002 // Comparator Output Value + +//***************************************************************************** +// +// The following are defines for the bit fields in the COMP_O_ACCTL1 register. +// +//***************************************************************************** +#define COMP_ACCTL1_TOEN 0x00000800 // Trigger Output Enable +#define COMP_ACCTL1_ASRCP_M 0x00000600 // Analog Source Positive +#define COMP_ACCTL1_ASRCP_PIN 0x00000000 // Pin value of Cn+ +#define COMP_ACCTL1_ASRCP_PIN0 0x00000200 // Pin value of C0+ +#define COMP_ACCTL1_ASRCP_REF 0x00000400 // Internal voltage reference + // (VIREF) +#define COMP_ACCTL1_TSLVAL 0x00000080 // Trigger Sense Level Value +#define COMP_ACCTL1_TSEN_M 0x00000060 // Trigger Sense +#define COMP_ACCTL1_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL +#define COMP_ACCTL1_TSEN_FALL 0x00000020 // Falling edge +#define COMP_ACCTL1_TSEN_RISE 0x00000040 // Rising edge +#define COMP_ACCTL1_TSEN_BOTH 0x00000060 // Either edge +#define COMP_ACCTL1_ISLVAL 0x00000010 // Interrupt Sense Level Value +#define COMP_ACCTL1_ISEN_M 0x0000000C // Interrupt Sense +#define COMP_ACCTL1_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL +#define COMP_ACCTL1_ISEN_FALL 0x00000004 // Falling edge +#define COMP_ACCTL1_ISEN_RISE 0x00000008 // Rising edge +#define COMP_ACCTL1_ISEN_BOTH 0x0000000C // Either edge +#define COMP_ACCTL1_CINV 0x00000002 // Comparator Output Invert + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RIS register. +// +//***************************************************************************** +#define MAC_RIS_PHYINT 0x00000040 // PHY Interrupt +#define MAC_RIS_MDINT 0x00000020 // MII Transaction Complete +#define MAC_RIS_RXER 0x00000010 // Receive Error +#define MAC_RIS_FOV 0x00000008 // FIFO Overrun +#define MAC_RIS_TXEMP 0x00000004 // Transmit FIFO Empty +#define MAC_RIS_TXER 0x00000002 // Transmit Error +#define MAC_RIS_RXINT 0x00000001 // Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IACK register. +// +//***************************************************************************** +#define MAC_IACK_PHYINT 0x00000040 // Clear PHY Interrupt +#define MAC_IACK_MDINT 0x00000020 // Clear MII Transaction Complete +#define MAC_IACK_RXER 0x00000010 // Clear Receive Error +#define MAC_IACK_FOV 0x00000008 // Clear FIFO Overrun +#define MAC_IACK_TXEMP 0x00000004 // Clear Transmit FIFO Empty +#define MAC_IACK_TXER 0x00000002 // Clear Transmit Error +#define MAC_IACK_RXINT 0x00000001 // Clear Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IM register. +// +//***************************************************************************** +#define MAC_IM_PHYINTM 0x00000040 // Mask PHY Interrupt +#define MAC_IM_MDINTM 0x00000020 // Mask MII Transaction Complete +#define MAC_IM_RXERM 0x00000010 // Mask Receive Error +#define MAC_IM_FOVM 0x00000008 // Mask FIFO Overrun +#define MAC_IM_TXEMPM 0x00000004 // Mask Transmit FIFO Empty +#define MAC_IM_TXERM 0x00000002 // Mask Transmit Error +#define MAC_IM_RXINTM 0x00000001 // Mask Packet Received + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_RCTL register. +// +//***************************************************************************** +#define MAC_RCTL_RSTFIFO 0x00000010 // Clear Receive FIFO +#define MAC_RCTL_BADCRC 0x00000008 // Enable Reject Bad CRC +#define MAC_RCTL_PRMS 0x00000004 // Enable Promiscuous Mode +#define MAC_RCTL_AMUL 0x00000002 // Enable Multicast Frames +#define MAC_RCTL_RXEN 0x00000001 // Enable Receiver + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TCTL register. +// +//***************************************************************************** +#define MAC_TCTL_DUPLEX 0x00000010 // Enable Duplex Mode +#define MAC_TCTL_CRC 0x00000004 // Enable CRC Generation +#define MAC_TCTL_PADEN 0x00000002 // Enable Packet Padding +#define MAC_TCTL_TXEN 0x00000001 // Enable Transmitter + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_DATA register. +// +//***************************************************************************** +#define MAC_DATA_TXDATA_M 0xFFFFFFFF // Transmit FIFO Data +#define MAC_DATA_RXDATA_M 0xFFFFFFFF // Receive FIFO Data +#define MAC_DATA_RXDATA_S 0 +#define MAC_DATA_TXDATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA0 register. +// +//***************************************************************************** +#define MAC_IA0_MACOCT4_M 0xFF000000 // MAC Address Octet 4 +#define MAC_IA0_MACOCT3_M 0x00FF0000 // MAC Address Octet 3 +#define MAC_IA0_MACOCT2_M 0x0000FF00 // MAC Address Octet 2 +#define MAC_IA0_MACOCT1_M 0x000000FF // MAC Address Octet 1 +#define MAC_IA0_MACOCT4_S 24 +#define MAC_IA0_MACOCT3_S 16 +#define MAC_IA0_MACOCT2_S 8 +#define MAC_IA0_MACOCT1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_IA1 register. +// +//***************************************************************************** +#define MAC_IA1_MACOCT6_M 0x0000FF00 // MAC Address Octet 6 +#define MAC_IA1_MACOCT5_M 0x000000FF // MAC Address Octet 5 +#define MAC_IA1_MACOCT6_S 8 +#define MAC_IA1_MACOCT5_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_THR register. +// +//***************************************************************************** +#define MAC_THR_THRESH_M 0x0000003F // Threshold Value +#define MAC_THR_THRESH_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MCTL register. +// +//***************************************************************************** +#define MAC_MCTL_REGADR_M 0x000000F8 // MII Register Address +#define MAC_MCTL_WRITE 0x00000002 // MII Register Transaction Type +#define MAC_MCTL_START 0x00000001 // MII Register Transaction Enable +#define MAC_MCTL_REGADR_S 3 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MDV register. +// +//***************************************************************************** +#define MAC_MDV_DIV_M 0x000000FF // Clock Divider +#define MAC_MDV_DIV_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MTXD register. +// +//***************************************************************************** +#define MAC_MTXD_MDTX_M 0x0000FFFF // MII Register Transmit Data +#define MAC_MTXD_MDTX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_MRXD register. +// +//***************************************************************************** +#define MAC_MRXD_MDRX_M 0x0000FFFF // MII Register Receive Data +#define MAC_MRXD_MDRX_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_NP register. +// +//***************************************************************************** +#define MAC_NP_NPR_M 0x0000003F // Number of Packets in Receive + // FIFO +#define MAC_NP_NPR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the MAC_O_TR register. +// +//***************************************************************************** +#define MAC_TR_NEWTX 0x00000001 // New Transmission + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR0 register. +// +//***************************************************************************** +#define PHY_MR0_RESET 0x00008000 // Reset Registers +#define PHY_MR0_LOOPBK 0x00004000 // Loopback Mode +#define PHY_MR0_SPEEDSL 0x00002000 // Speed Select +#define PHY_MR0_ANEGEN 0x00001000 // Auto-Negotiation Enable +#define PHY_MR0_PWRDN 0x00000800 // Power Down +#define PHY_MR0_ISO 0x00000400 // Isolate +#define PHY_MR0_RANEG 0x00000200 // Restart Auto-Negotiation +#define PHY_MR0_DUPLEX 0x00000100 // Set Duplex Mode +#define PHY_MR0_COLT 0x00000080 // Collision Test + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR1 register. +// +//***************************************************************************** +#define PHY_MR1_100X_F 0x00004000 // 100BASE-TX Full-Duplex Mode +#define PHY_MR1_100X_H 0x00002000 // 100BASE-TX Half-Duplex Mode +#define PHY_MR1_10T_F 0x00001000 // 10BASE-T Full-Duplex Mode +#define PHY_MR1_10T_H 0x00000800 // 10BASE-T Half-Duplex Mode +#define PHY_MR1_MFPS 0x00000040 // Management Frames with Preamble + // Suppressed +#define PHY_MR1_ANEGC 0x00000020 // Auto-Negotiation Complete +#define PHY_MR1_RFAULT 0x00000010 // Remote Fault +#define PHY_MR1_ANEGA 0x00000008 // Auto-Negotiation +#define PHY_MR1_LINK 0x00000004 // Link Made +#define PHY_MR1_JAB 0x00000002 // Jabber Condition +#define PHY_MR1_EXTD 0x00000001 // Extended Capabilities + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR2 register. +// +//***************************************************************************** +#define PHY_MR2_OUI_M 0x0000FFFF // Organizationally Unique + // Identifier[21:6] +#define PHY_MR2_OUI_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR3 register. +// +//***************************************************************************** +#define PHY_MR3_OUI_M 0x0000FC00 // Organizationally Unique + // Identifier[5:0] +#define PHY_MR3_MN_M 0x000003F0 // Model Number +#define PHY_MR3_RN_M 0x0000000F // Revision Number +#define PHY_MR3_OUI_S 10 +#define PHY_MR3_MN_S 4 +#define PHY_MR3_RN_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR4 register. +// +//***************************************************************************** +#define PHY_MR4_NP 0x00008000 // Next Page +#define PHY_MR4_RF 0x00002000 // Remote Fault +#define PHY_MR4_A3 0x00000100 // Technology Ability Field [3] +#define PHY_MR4_A2 0x00000080 // Technology Ability Field [2] +#define PHY_MR4_A1 0x00000040 // Technology Ability Field [1] +#define PHY_MR4_A0 0x00000020 // Technology Ability Field [0] +#define PHY_MR4_S_M 0x0000001F // Selector Field +#define PHY_MR4_S_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR5 register. +// +//***************************************************************************** +#define PHY_MR5_NP 0x00008000 // Next Page +#define PHY_MR5_ACK 0x00004000 // Acknowledge +#define PHY_MR5_RF 0x00002000 // Remote Fault +#define PHY_MR5_A_M 0x00001FE0 // Technology Ability Field +#define PHY_MR5_S_M 0x0000001F // Selector Field +#define PHY_MR5_S_8023 0x00000001 // IEEE Std 802.3 +#define PHY_MR5_S_8029 0x00000002 // IEEE Std 802.9 ISLAN-16T +#define PHY_MR5_S_8025 0x00000003 // IEEE Std 802.5 +#define PHY_MR5_S_1394 0x00000004 // IEEE Std 1394 +#define PHY_MR5_A_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR6 register. +// +//***************************************************************************** +#define PHY_MR6_PDF 0x00000010 // Parallel Detection Fault +#define PHY_MR6_LPNPA 0x00000008 // Link Partner is Next Page Able +#define PHY_MR6_PRX 0x00000002 // New Page Received +#define PHY_MR6_LPANEGA 0x00000001 // Link Partner is Auto-Negotiation + // Able + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR16 register. +// +//***************************************************************************** +#define PHY_MR16_RPTR 0x00008000 // Repeater Mode +#define PHY_MR16_INPOL 0x00004000 // Interrupt Polarity +#define PHY_MR16_TXHIM 0x00001000 // Transmit High Impedance Mode +#define PHY_MR16_SQEI 0x00000800 // SQE Inhibit Testing +#define PHY_MR16_NL10 0x00000400 // Natural Loopback Mode +#define PHY_MR16_APOL 0x00000020 // Auto-Polarity Disable +#define PHY_MR16_RVSPOL 0x00000010 // Receive Data Polarity +#define PHY_MR16_PCSBP 0x00000002 // PCS Bypass +#define PHY_MR16_RXCC 0x00000001 // Receive Clock Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR17 register. +// +//***************************************************************************** +#define PHY_MR17_JABBER_IE 0x00008000 // Jabber Interrupt Enable +#define PHY_MR17_RXER_IE 0x00004000 // Receive Error Interrupt Enable +#define PHY_MR17_PRX_IE 0x00002000 // Page Received Interrupt Enable +#define PHY_MR17_PDF_IE 0x00001000 // Parallel Detection Fault + // Interrupt Enable +#define PHY_MR17_LPACK_IE 0x00000800 // LP Acknowledge Interrupt Enable +#define PHY_MR17_LSCHG_IE 0x00000400 // Link Status Change Interrupt + // Enable +#define PHY_MR17_RFAULT_IE 0x00000200 // Remote Fault Interrupt Enable +#define PHY_MR17_ANEGCOMP_IE 0x00000100 // Auto-Negotiation Complete + // Interrupt Enable +#define PHY_MR17_JABBER_INT 0x00000080 // Jabber Event Interrupt +#define PHY_MR17_RXER_INT 0x00000040 // Receive Error Interrupt +#define PHY_MR17_PRX_INT 0x00000020 // Page Receive Interrupt +#define PHY_MR17_PDF_INT 0x00000010 // Parallel Detection Fault + // Interrupt +#define PHY_MR17_LPACK_INT 0x00000008 // LP Acknowledge Interrupt +#define PHY_MR17_LSCHG_INT 0x00000004 // Link Status Change Interrupt +#define PHY_MR17_RFAULT_INT 0x00000002 // Remote Fault Interrupt +#define PHY_MR17_ANEGCOMP_INT 0x00000001 // Auto-Negotiation Complete + // Interrupt + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR18 register. +// +//***************************************************************************** +#define PHY_MR18_ANEGF 0x00001000 // Auto-Negotiation Failure +#define PHY_MR18_DPLX 0x00000800 // Duplex Mode +#define PHY_MR18_RATE 0x00000400 // Rate +#define PHY_MR18_RXSD 0x00000200 // Receive Detection +#define PHY_MR18_RX_LOCK 0x00000100 // Receive PLL Lock + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR19 register. +// +//***************************************************************************** +#define PHY_MR19_TXO_M 0x0000C000 // Transmit Amplitude Selection +#define PHY_MR19_TXO_00DB 0x00000000 // Gain set for 0.0dB of insertion + // loss +#define PHY_MR19_TXO_04DB 0x00004000 // Gain set for 0.4dB of insertion + // loss +#define PHY_MR19_TXO_08DB 0x00008000 // Gain set for 0.8dB of insertion + // loss +#define PHY_MR19_TXO_12DB 0x0000C000 // Gain set for 1.2dB of insertion + // loss + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR23 register. +// +//***************************************************************************** +#define PHY_MR23_LED1_M 0x000000F0 // LED1 Source +#define PHY_MR23_LED1_LINK 0x00000000 // Link OK +#define PHY_MR23_LED1_RXTX 0x00000010 // RX or TX Activity (Default LED1) +#define PHY_MR23_LED1_100 0x00000050 // 100BASE-TX mode +#define PHY_MR23_LED1_10 0x00000060 // 10BASE-T mode +#define PHY_MR23_LED1_DUPLEX 0x00000070 // Full-Duplex +#define PHY_MR23_LED1_LINKACT 0x00000080 // Link OK & Blink=RX or TX + // Activity +#define PHY_MR23_LED0_M 0x0000000F // LED0 Source +#define PHY_MR23_LED0_LINK 0x00000000 // Link OK (Default LED0) +#define PHY_MR23_LED0_RXTX 0x00000001 // RX or TX Activity +#define PHY_MR23_LED0_100 0x00000005 // 100BASE-TX mode +#define PHY_MR23_LED0_10 0x00000006 // 10BASE-T mode +#define PHY_MR23_LED0_DUPLEX 0x00000007 // Full-Duplex +#define PHY_MR23_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX + // Activity + +//***************************************************************************** +// +// The following are defines for the bit fields in the PHY_MR24 register. +// +//***************************************************************************** +#define PHY_MR24_PD_MODE 0x00000080 // Parallel Detection Mode +#define PHY_MR24_AUTO_SW 0x00000040 // Auto-Switching Enable +#define PHY_MR24_MDIX 0x00000020 // Auto-Switching Configuration +#define PHY_MR24_MDIX_CM 0x00000010 // Auto-Switching Complete +#define PHY_MR24_MDIX_SD_M 0x0000000F // Auto-Switching Seed +#define PHY_MR24_MDIX_SD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCC register. +// +//***************************************************************************** +#define HIB_RTCC_M 0xFFFFFFFF // RTC Counter +#define HIB_RTCC_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM0 register. +// +//***************************************************************************** +#define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0 +#define HIB_RTCM0_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCM1 register. +// +//***************************************************************************** +#define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1 +#define HIB_RTCM1_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCLD register. +// +//***************************************************************************** +#define HIB_RTCLD_M 0xFFFFFFFF // RTC Load +#define HIB_RTCLD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_CTL register. +// +//***************************************************************************** +#define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable +#define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable +#define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable +#define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable +#define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable +#define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select +#define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request +#define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IM register. +// +//***************************************************************************** +#define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask +#define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt + // Mask +#define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask +#define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RIS register. +// +//***************************************************************************** +#define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt + // Status +#define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw + // Interrupt Status +#define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status +#define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_MIS register. +// +//***************************************************************************** +#define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Status +#define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Status +#define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt + // Status +#define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_IC register. +// +//***************************************************************************** +#define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked + // Interrupt Clear +#define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked + // Interrupt Clear +#define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt + // Clear +#define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt + // Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_RTCT register. +// +//***************************************************************************** +#define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value +#define HIB_RTCT_TRIM_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the HIB_DATA register. +// +//***************************************************************************** +#define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data +#define HIB_DATA_RTD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMA register. +// +//***************************************************************************** +#define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset +#define FLASH_FMA_OFFSET_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMD register. +// +//***************************************************************************** +#define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value +#define FLASH_FMD_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key +#define FLASH_FMC_COMT 0x00000008 // Commit Register Value +#define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory +#define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory +#define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCRIS register. +// +//***************************************************************************** +#define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status +#define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCIM register. +// +//***************************************************************************** +#define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask +#define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_FCMISC register. +// +//***************************************************************************** +#define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt + // Status and Clear +#define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status + // and Clear + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USECRL register. +// +//***************************************************************************** +#define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value +#define FLASH_USECRL_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERDBG register. +// +//***************************************************************************** +#define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written +#define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data +#define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1 +#define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0 +#define FLASH_USERDBG_DATA_S 2 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG0 register. +// +//***************************************************************************** +#define FLASH_USERREG0_NW 0x80000000 // Not Written +#define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG0_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the FLASH_USERREG1 register. +// +//***************************************************************************** +#define FLASH_USERREG1_NW 0x80000000 // Not Written +#define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data +#define FLASH_USERREG1_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the erase size of the FLASH block that is +// erased by an erase operation, and the protect size is the size of the FLASH +// block that is protected by each protection register. +// +//***************************************************************************** +#define FLASH_PROTECT_SIZE 0x00000800 +#define FLASH_ERASE_SIZE 0x00000400 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID0 register. +// +//***************************************************************************** +#define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version +#define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0 + // register format +#define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class +#define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices +#define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision +#define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device) +#define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer + // revision) +#define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer + // revision) +#define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision +#define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major + // revision update +#define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change +#define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version +#define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1 + // register format +#define SYSCTL_DID1_FAM_M 0x0F000000 // Family +#define SYSCTL_DID1_FAM_STELLARIS \ + 0x00000000 // Stellaris family of + // microcontollers, that is, all + // devices with external part + // numbers starting with LM3S +#define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number +#define SYSCTL_DID1_PRTNO_6965 0x00730000 // LM3S6965 +#define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count +#define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package +#define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range +#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C + // to 70C) +#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range + // (-40C to 85C) +#define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C + // to 105C) +#define SYSCTL_DID1_PKG_M 0x00000018 // Package Type +#define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package +#define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package +#define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance +#define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status +#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified) +#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified) +#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC0 register. +// +//***************************************************************************** +#define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size +#define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM +#define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size +#define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash +#define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift +#define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present +#define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present +#define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider +#define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock + // with a PLL divider of 4 +#define SYSCTL_DC1_ADCSPD_M 0x00000300 // Max ADC Speed +#define SYSCTL_DC1_ADCSPD_1M 0x00000300 // 1M samples/second +#define SYSCTL_DC1_MPU 0x00000080 // MPU Present +#define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present +#define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present +#define SYSCTL_DC1_PLL 0x00000010 // PLL Present +#define SYSCTL_DC1_WDT0 0x00000008 // Watchdog Timer 0 Present +#define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present +#define SYSCTL_DC1_SWD 0x00000002 // SWD Present +#define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC2 register. +// +//***************************************************************************** +#define SYSCTL_DC2_COMP1 0x02000000 // Analog Comparator 1 Present +#define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present +#define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present +#define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present +#define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present +#define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present +#define SYSCTL_DC2_I2C1 0x00004000 // I2C Module 1 Present +#define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present +#define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present +#define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present +#define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present +#define SYSCTL_DC2_UART2 0x00000004 // UART Module 2 Present +#define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present +#define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC3 register. +// +//***************************************************************************** +#define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available +#define SYSCTL_DC3_CCP3 0x08000000 // CCP3 Pin Present +#define SYSCTL_DC3_CCP2 0x04000000 // CCP2 Pin Present +#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present +#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present +#define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present +#define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present +#define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present +#define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present +#define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present +#define SYSCTL_DC3_C1PLUS 0x00000400 // C1+ Pin Present +#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- Pin Present +#define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present +#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present +#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present +#define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present +#define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present +#define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present +#define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present +#define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present +#define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DC4 register. +// +//***************************************************************************** +#define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present +#define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present +#define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present +#define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present +#define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present +#define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present +#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present +#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present +#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PBORCTL register. +// +//***************************************************************************** +#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_LDOPCTL register. +// +//***************************************************************************** +#define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage +#define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50 +#define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45 +#define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40 +#define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35 +#define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30 +#define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25 +#define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75 +#define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70 +#define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65 +#define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60 +#define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR0 register. +// +//***************************************************************************** +#define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control +#define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control +#define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control +#define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR1 register. +// +//***************************************************************************** +#define SYSCTL_SRCR1_COMP1 0x02000000 // Analog Comp 1 Reset Control +#define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control +#define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control +#define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control +#define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control +#define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control +#define SYSCTL_SRCR1_I2C1 0x00004000 // I2C1 Reset Control +#define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control +#define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control +#define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control +#define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control +#define SYSCTL_SRCR1_UART2 0x00000004 // UART2 Reset Control +#define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control +#define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SRCR2 register. +// +//***************************************************************************** +#define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control +#define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control +#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control +#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control +#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control +#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control +#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control +#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control +#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RIS register. +// +//***************************************************************************** +#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status +#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt + // Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_IMC register. +// +//***************************************************************************** +#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask +#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_MISC register. +// +//***************************************************************************** +#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status +#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RESC register. +// +//***************************************************************************** +#define SYSCTL_RESC_SW 0x00000010 // Software Reset +#define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset +#define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset +#define SYSCTL_RESC_POR 0x00000002 // Power-On Reset +#define SYSCTL_RESC_EXT 0x00000001 // External Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC register. +// +//***************************************************************************** +#define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating +#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor +#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2 +#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3 +#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4 +#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5 +#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6 +#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7 +#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8 +#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9 +#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10 +#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11 +#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12 +#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13 +#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14 +#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15 +#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16 +#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider +#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor +#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor +#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2 +#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4 +#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8 +#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16 +#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32 +#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64 +#define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down +#define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass +#define SYSCTL_RCC_XTAL_M 0x000003C0 // Crystal Value +#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz +#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz +#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz +#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz +#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz +#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz +#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz +#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz +#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz +#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz +#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz +#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz +#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz +#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz +#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz +#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz +#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source +#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC +#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC +#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4 +#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz +#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable +#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable +#define SYSCTL_RCC_SYSDIV_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_PLLCFG register. +// +//***************************************************************************** +#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value +#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value +#define SYSCTL_PLLCFG_F_S 5 +#define SYSCTL_PLLCFG_R_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCC2 register. +// +//***************************************************************************** +#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2 +#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2 +#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2 +#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3 +#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4 +#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5 +#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6 +#define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7 +#define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8 +#define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9 +#define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10 +#define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11 +#define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12 +#define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13 +#define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14 +#define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15 +#define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16 +#define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17 +#define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18 +#define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19 +#define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20 +#define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21 +#define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22 +#define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23 +#define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24 +#define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25 +#define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26 +#define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27 +#define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28 +#define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29 +#define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30 +#define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31 +#define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32 +#define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33 +#define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34 +#define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35 +#define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36 +#define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37 +#define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38 +#define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39 +#define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40 +#define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41 +#define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42 +#define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43 +#define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44 +#define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45 +#define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46 +#define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47 +#define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48 +#define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49 +#define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50 +#define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51 +#define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52 +#define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53 +#define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54 +#define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55 +#define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56 +#define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57 +#define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58 +#define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59 +#define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60 +#define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61 +#define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62 +#define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63 +#define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64 +#define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2 +#define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2 +#define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2 +#define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC +#define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC +#define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4 +#define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz +#define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz +#define SYSCTL_RCC2_SYSDIV2_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC0 register. +// +//***************************************************************************** +#define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_RCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed +#define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_RCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC1 register. +// +//***************************************************************************** +#define SYSCTL_RCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_RCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_RCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_RCGC2 register. +// +//***************************************************************************** +#define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC0 register. +// +//***************************************************************************** +#define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_SCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed +#define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second +#define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second +#define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second +#define SYSCTL_SCGC0_ADCSPD1M 0x00000300 // 1M samples/second +#define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC1 register. +// +//***************************************************************************** +#define SYSCTL_SCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_SCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_SCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_SCGC2 register. +// +//***************************************************************************** +#define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC0 register. +// +//***************************************************************************** +#define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control +#define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control +#define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control +#define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC1 register. +// +//***************************************************************************** +#define SYSCTL_DCGC1_COMP1 0x02000000 // Analog Comparator 1 Clock Gating +#define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating +#define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control +#define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control +#define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control +#define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control +#define SYSCTL_DCGC1_I2C1 0x00004000 // I2C1 Clock Gating Control +#define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control +#define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control +#define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control +#define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control +#define SYSCTL_DCGC1_UART2 0x00000004 // UART2 Clock Gating Control +#define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control +#define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DCGC2 register. +// +//***************************************************************************** +#define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control +#define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control +#define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control +#define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control +#define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control +#define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control +#define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control +#define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control +#define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG +// register. +// +//***************************************************************************** +#define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override +#define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1 +#define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2 +#define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3 +#define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4 +#define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5 +#define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6 +#define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7 +#define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8 +#define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9 +#define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10 +#define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11 +#define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12 +#define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13 +#define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14 +#define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15 +#define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16 +#define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17 +#define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18 +#define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19 +#define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20 +#define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21 +#define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22 +#define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23 +#define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24 +#define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25 +#define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26 +#define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27 +#define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28 +#define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29 +#define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30 +#define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31 +#define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32 +#define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33 +#define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34 +#define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35 +#define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36 +#define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37 +#define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38 +#define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39 +#define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40 +#define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41 +#define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42 +#define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43 +#define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44 +#define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45 +#define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46 +#define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47 +#define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48 +#define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49 +#define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50 +#define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51 +#define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52 +#define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53 +#define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54 +#define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55 +#define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56 +#define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57 +#define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58 +#define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59 +#define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60 +#define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61 +#define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62 +#define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63 +#define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64 +#define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source +#define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC +#define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC +#define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz +#define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz +#define SYSCTL_DSLPCLKCFG_D_S 23 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_TYPE register. +// +//***************************************************************************** +#define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32) +#define NVIC_INT_TYPE_LINES_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CTRL register. +// +//***************************************************************************** +#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag +#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source +#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable +#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_RELOAD register. +// +//***************************************************************************** +#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value +#define NVIC_ST_RELOAD_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CURRENT +// register. +// +//***************************************************************************** +#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value +#define NVIC_ST_CURRENT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ST_CAL register. +// +//***************************************************************************** +#define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock +#define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew +#define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value +#define NVIC_ST_CAL_ONEMS_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN0 register. +// +//***************************************************************************** +#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable +#define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable +#define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable +#define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable +#define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable +#define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable +#define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable +#define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable +#define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable +#define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable +#define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable +#define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable +#define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable +#define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable +#define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable +#define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable +#define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable +#define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable +#define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable +#define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable +#define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable +#define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable +#define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable +#define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable +#define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable +#define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable +#define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable +#define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable +#define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable +#define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable +#define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable +#define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable +#define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_EN1 register. +// +//***************************************************************************** +#define NVIC_EN1_INT_M 0x00000FFF // Interrupt Enable +#define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable +#define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable +#define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable +#define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable +#define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable +#define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable +#define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable +#define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable +#define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable +#define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable +#define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable +#define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable +#define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable +#define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable +#define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable +#define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS0 register. +// +//***************************************************************************** +#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable +#define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable +#define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable +#define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable +#define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable +#define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable +#define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable +#define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable +#define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable +#define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable +#define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable +#define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable +#define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable +#define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable +#define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable +#define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable +#define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable +#define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable +#define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable +#define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable +#define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable +#define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable +#define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable +#define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable +#define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable +#define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable +#define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable +#define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable +#define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable +#define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable +#define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable +#define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable +#define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DIS1 register. +// +//***************************************************************************** +#define NVIC_DIS1_INT_M 0x00000FFF // Interrupt Disable +#define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable +#define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable +#define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable +#define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable +#define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable +#define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable +#define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable +#define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable +#define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable +#define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable +#define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable +#define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable +#define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable +#define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable +#define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable +#define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable +#define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable +#define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable +#define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable +#define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable +#define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable +#define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable +#define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable +#define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND0 register. +// +//***************************************************************************** +#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending +#define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend +#define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend +#define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend +#define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend +#define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend +#define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend +#define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend +#define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend +#define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend +#define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend +#define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend +#define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend +#define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend +#define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend +#define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend +#define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend +#define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend +#define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend +#define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend +#define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend +#define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend +#define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend +#define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend +#define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend +#define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend +#define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend +#define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend +#define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend +#define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend +#define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend +#define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend +#define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PEND1 register. +// +//***************************************************************************** +#define NVIC_PEND1_INT_M 0x00000FFF // Interrupt Set Pending +#define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend +#define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend +#define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend +#define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend +#define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend +#define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend +#define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend +#define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend +#define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend +#define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend +#define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend +#define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend +#define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend +#define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend +#define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend +#define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend +#define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend +#define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend +#define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend +#define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend +#define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend +#define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend +#define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend +#define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND0 register. +// +//***************************************************************************** +#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending +#define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend +#define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend +#define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend +#define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend +#define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend +#define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend +#define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend +#define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend +#define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend +#define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend +#define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend +#define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend +#define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend +#define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend +#define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend +#define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend +#define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend +#define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend +#define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend +#define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend +#define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend +#define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend +#define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend +#define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend +#define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend +#define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend +#define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend +#define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend +#define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend +#define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend +#define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend +#define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_UNPEND1 register. +// +//***************************************************************************** +#define NVIC_UNPEND1_INT_M 0x00000FFF // Interrupt Clear Pending +#define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend +#define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend +#define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend +#define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend +#define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend +#define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend +#define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend +#define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend +#define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend +#define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend +#define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend +#define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend +#define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend +#define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend +#define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend +#define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend +#define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend +#define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend +#define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend +#define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend +#define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend +#define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend +#define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend +#define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE0 register. +// +//***************************************************************************** +#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active +#define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active +#define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active +#define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active +#define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active +#define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active +#define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active +#define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active +#define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active +#define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active +#define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active +#define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active +#define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active +#define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active +#define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active +#define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active +#define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active +#define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active +#define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active +#define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active +#define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active +#define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active +#define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active +#define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active +#define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active +#define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active +#define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active +#define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active +#define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active +#define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active +#define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active +#define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active +#define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_ACTIVE1 register. +// +//***************************************************************************** +#define NVIC_ACTIVE1_INT_M 0x00000FFF // Interrupt Active +#define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active +#define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active +#define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active +#define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active +#define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active +#define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active +#define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active +#define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active +#define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active +#define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active +#define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active +#define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active +#define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active +#define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active +#define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active +#define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active +#define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active +#define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active +#define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active +#define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active +#define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active +#define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active +#define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active +#define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI0 register. +// +//***************************************************************************** +#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask +#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask +#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask +#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask +#define NVIC_PRI0_INT3_S 29 +#define NVIC_PRI0_INT2_S 21 +#define NVIC_PRI0_INT1_S 13 +#define NVIC_PRI0_INT0_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI1 register. +// +//***************************************************************************** +#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask +#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask +#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask +#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask +#define NVIC_PRI1_INT7_S 29 +#define NVIC_PRI1_INT6_S 21 +#define NVIC_PRI1_INT5_S 13 +#define NVIC_PRI1_INT4_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI2 register. +// +//***************************************************************************** +#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask +#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask +#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask +#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask +#define NVIC_PRI2_INT11_S 29 +#define NVIC_PRI2_INT10_S 21 +#define NVIC_PRI2_INT9_S 13 +#define NVIC_PRI2_INT8_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI3 register. +// +//***************************************************************************** +#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask +#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask +#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask +#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask +#define NVIC_PRI3_INT15_S 29 +#define NVIC_PRI3_INT14_S 21 +#define NVIC_PRI3_INT13_S 13 +#define NVIC_PRI3_INT12_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI4 register. +// +//***************************************************************************** +#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask +#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask +#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask +#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask +#define NVIC_PRI4_INT19_S 29 +#define NVIC_PRI4_INT18_S 21 +#define NVIC_PRI4_INT17_S 13 +#define NVIC_PRI4_INT16_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI5 register. +// +//***************************************************************************** +#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask +#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask +#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask +#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask +#define NVIC_PRI5_INT23_S 29 +#define NVIC_PRI5_INT22_S 21 +#define NVIC_PRI5_INT21_S 13 +#define NVIC_PRI5_INT20_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI6 register. +// +//***************************************************************************** +#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask +#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask +#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask +#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask +#define NVIC_PRI6_INT27_S 29 +#define NVIC_PRI6_INT26_S 21 +#define NVIC_PRI6_INT25_S 13 +#define NVIC_PRI6_INT24_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI7 register. +// +//***************************************************************************** +#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask +#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask +#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask +#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask +#define NVIC_PRI7_INT31_S 29 +#define NVIC_PRI7_INT30_S 21 +#define NVIC_PRI7_INT29_S 13 +#define NVIC_PRI7_INT28_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI8 register. +// +//***************************************************************************** +#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask +#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask +#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask +#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask +#define NVIC_PRI8_INT35_S 29 +#define NVIC_PRI8_INT34_S 21 +#define NVIC_PRI8_INT33_S 13 +#define NVIC_PRI8_INT32_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI9 register. +// +//***************************************************************************** +#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask +#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask +#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask +#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask +#define NVIC_PRI9_INT39_S 29 +#define NVIC_PRI9_INT38_S 21 +#define NVIC_PRI9_INT37_S 13 +#define NVIC_PRI9_INT36_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_PRI10 register. +// +//***************************************************************************** +#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask +#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask +#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask +#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask +#define NVIC_PRI10_INT43_S 29 +#define NVIC_PRI10_INT42_S 21 +#define NVIC_PRI10_INT41_S 13 +#define NVIC_PRI10_INT40_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CPUID register. +// +//***************************************************************************** +#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code +#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM +#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number +#define NVIC_CPUID_CON_M 0x000F0000 // Constant +#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number +#define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor +#define NVIC_CPUID_REV_M 0x0000000F // Revision Number + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_INT_CTRL register. +// +//***************************************************************************** +#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending +#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending +#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending +#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending +#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending +#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling +#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending +#define NVIC_INT_CTRL_VEC_PEN_M 0x0003F000 // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_PEN_NMI \ + 0x00002000 // NMI +#define NVIC_INT_CTRL_VEC_PEN_HARD \ + 0x00003000 // Hard fault +#define NVIC_INT_CTRL_VEC_PEN_MEM \ + 0x00004000 // Memory management fault +#define NVIC_INT_CTRL_VEC_PEN_BUS \ + 0x00005000 // Bus fault +#define NVIC_INT_CTRL_VEC_PEN_USG \ + 0x00006000 // Usage fault +#define NVIC_INT_CTRL_VEC_PEN_SVC \ + 0x0000B000 // SVCall +#define NVIC_INT_CTRL_VEC_PEN_PNDSV \ + 0x0000E000 // PendSV +#define NVIC_INT_CTRL_VEC_PEN_TICK \ + 0x0000F000 // SysTick +#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base +#define NVIC_INT_CTRL_VEC_ACT_M 0x0000003F // Interrupt Pending Vector Number +#define NVIC_INT_CTRL_VEC_ACT_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_VTABLE register. +// +//***************************************************************************** +#define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base +#define NVIC_VTABLE_OFFSET_M 0x1FFFFF00 // Vector Table Offset +#define NVIC_VTABLE_OFFSET_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_APINT register. +// +//***************************************************************************** +#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key +#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key +#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess +#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping +#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split +#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split +#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split +#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split +#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split +#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split +#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split +#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split +#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request +#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault +#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_CTRL register. +// +//***************************************************************************** +#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending +#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable +#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_CFG_CTRL register. +// +//***************************************************************************** +#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception + // Entry +#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and + // Fault +#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 +#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access +#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger +#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI1 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority +#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority +#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority +#define NVIC_SYS_PRI1_USAGE_S 21 +#define NVIC_SYS_PRI1_BUS_S 13 +#define NVIC_SYS_PRI1_MEM_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI2 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority +#define NVIC_SYS_PRI2_SVC_S 29 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_PRI3 register. +// +//***************************************************************************** +#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority +#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority +#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority +#define NVIC_SYS_PRI3_TICK_S 29 +#define NVIC_SYS_PRI3_PENDSV_S 21 +#define NVIC_SYS_PRI3_DEBUG_S 5 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL +// register. +// +//***************************************************************************** +#define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable +#define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable +#define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable +#define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending +#define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending +#define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending +#define NVIC_SYS_HND_CTRL_USAGEP \ + 0x00001000 // Usage Fault Pending +#define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active +#define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active +#define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active +#define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active +#define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active +#define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active +#define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault +#define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault +#define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault +#define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault +#define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault +#define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage + // Fault +#define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid +#define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault +#define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault +#define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error +#define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error +#define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error +#define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address + // Register Valid +#define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation +#define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation +#define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation +#define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_HFAULT_STAT +// register. +// +//***************************************************************************** +#define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event +#define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault +#define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DEBUG_STAT +// register. +// +//***************************************************************************** +#define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted +#define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch +#define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match +#define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction +#define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MM_ADDR register. +// +//***************************************************************************** +#define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_MM_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_FAULT_ADDR +// register. +// +//***************************************************************************** +#define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address +#define NVIC_FAULT_ADDR_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_TYPE register. +// +//***************************************************************************** +#define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions +#define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions +#define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU +#define NVIC_MPU_TYPE_IREGION_S 16 +#define NVIC_MPU_TYPE_DREGION_S 8 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_CTRL register. +// +//***************************************************************************** +#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region +#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults +#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_NUMBER +// register. +// +//***************************************************************************** +#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access +#define NVIC_MPU_NUMBER_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE register. +// +//***************************************************************************** +#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE_ADDR_S 5 +#define NVIC_MPU_BASE_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes +#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access +#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none +#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only +#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw +#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none +#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro +#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable +#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable +#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable +#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable +#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable +#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable +#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable +#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable +#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable +#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable +#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable +#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes +#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes +#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes +#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes +#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes +#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes +#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes +#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes +#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes +#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes +#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes +#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes +#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes +#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes +#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes +#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes +#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes +#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes +#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes +#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes +#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes +#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes +#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes +#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes +#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes +#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes +#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes +#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes +#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE1 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE1_ADDR_S 5 +#define NVIC_MPU_BASE1_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR1_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR1_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR1_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE2 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE2_ADDR_S 5 +#define NVIC_MPU_BASE2_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR2_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR2_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR2_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_BASE3 register. +// +//***************************************************************************** +#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask +#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid +#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number +#define NVIC_MPU_BASE3_ADDR_S 5 +#define NVIC_MPU_BASE3_REGION_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register. +// +//***************************************************************************** +#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable +#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege +#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask +#define NVIC_MPU_ATTR3_SHAREABLE \ + 0x00040000 // Shareable +#define NVIC_MPU_ATTR3_CACHEABLE \ + 0x00020000 // Cacheable +#define NVIC_MPU_ATTR3_BUFFRABLE \ + 0x00010000 // Bufferable +#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits +#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask +#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_CTRL register. +// +//***************************************************************************** +#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask +#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key +#define NVIC_DBG_CTRL_S_RESET_ST \ + 0x02000000 // Core has reset since last read +#define NVIC_DBG_CTRL_S_RETIRE_ST \ + 0x01000000 // Core has executed insruction + // since last read +#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up +#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping +#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt +#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available +#define NVIC_DBG_CTRL_C_SNAPSTALL \ + 0x00000020 // Breaks a stalled load/store +#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping +#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core +#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core +#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_XFER register. +// +//***************************************************************************** +#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read +#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register +#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0 +#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1 +#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2 +#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3 +#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4 +#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5 +#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6 +#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7 +#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8 +#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9 +#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10 +#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11 +#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12 +#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13 +#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14 +#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15 +#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register +#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP +#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP +#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP +#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_DATA register. +// +//***************************************************************************** +#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache +#define NVIC_DBG_DATA_S 0 + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_DBG_INT register. +// +//***************************************************************************** +#define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault +#define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors +#define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error +#define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state +#define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check +#define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error +#define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault +#define NVIC_DBG_INT_RESET 0x00000008 // Core reset status +#define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset +#define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending +#define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch + +//***************************************************************************** +// +// The following are defines for the bit fields in the NVIC_SW_TRIG register. +// +//***************************************************************************** +#define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID +#define NVIC_SW_TRIG_INTID_S 0 + +//***************************************************************************** +// +// The following definitions are deprecated. +// +//***************************************************************************** +#ifndef DEPRECATED + +//***************************************************************************** +// +// Deprecated defines for the Watchdog +// +//***************************************************************************** +#define WATCHDOG_LOAD_R (*((volatile unsigned long *)0x40000000)) +#define WATCHDOG_VALUE_R (*((volatile unsigned long *)0x40000004)) +#define WATCHDOG_CTL_R (*((volatile unsigned long *)0x40000008)) +#define WATCHDOG_ICR_R (*((volatile unsigned long *)0x4000000C)) +#define WATCHDOG_RIS_R (*((volatile unsigned long *)0x40000010)) +#define WATCHDOG_MIS_R (*((volatile unsigned long *)0x40000014)) +#define WATCHDOG_TEST_R (*((volatile unsigned long *)0x40000418)) +#define WATCHDOG_LOCK_R (*((volatile unsigned long *)0x40000C00)) + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SICR register. +// +//***************************************************************************** +#define I2C_SICR_IC 0x00000001 // Clear Interrupt + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SMIS register. +// +//***************************************************************************** +#define I2C_SMIS_MIS 0x00000001 // Masked Interrupt Status + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SRIS register. +// +//***************************************************************************** +#define I2C_SRIS_RIS 0x00000001 // Raw Interrupt Status + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the I2C_O_SIMR register. +// +//***************************************************************************** +#define I2C_SIMR_IM 0x00000001 // Interrupt Mask + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the the interpretation of the data +// in the SSFIFOx when the ADC TMLB is enabled. register. +// +//***************************************************************************** +#define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter +#define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator +#define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator +#define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator +#define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator +#define ADC_TMLB_CNT_S 6 // Sample counter shift +#define ADC_TMLB_MUX_S 0 // Input channel number shift + +//***************************************************************************** +// +// Deprecated defines for the ADC register offsets. +// +//***************************************************************************** +#define ADC_ACTSS_R (*((volatile unsigned long *)0x40038000)) +#define ADC_RIS_R (*((volatile unsigned long *)0x40038004)) +#define ADC_IM_R (*((volatile unsigned long *)0x40038008)) +#define ADC_ISC_R (*((volatile unsigned long *)0x4003800C)) +#define ADC_OSTAT_R (*((volatile unsigned long *)0x40038010)) +#define ADC_EMUX_R (*((volatile unsigned long *)0x40038014)) +#define ADC_USTAT_R (*((volatile unsigned long *)0x40038018)) +#define ADC_SSPRI_R (*((volatile unsigned long *)0x40038020)) +#define ADC_PSSI_R (*((volatile unsigned long *)0x40038028)) +#define ADC_SAC_R (*((volatile unsigned long *)0x40038030)) +#define ADC_SSMUX0_R (*((volatile unsigned long *)0x40038040)) +#define ADC_SSCTL0_R (*((volatile unsigned long *)0x40038044)) +#define ADC_SSFIFO0_R (*((volatile unsigned long *)0x40038048)) +#define ADC_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C)) +#define ADC_SSMUX1_R (*((volatile unsigned long *)0x40038060)) +#define ADC_SSCTL1_R (*((volatile unsigned long *)0x40038064)) +#define ADC_SSFIFO1_R (*((volatile unsigned long *)0x40038068)) +#define ADC_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C)) +#define ADC_SSMUX2_R (*((volatile unsigned long *)0x40038080)) +#define ADC_SSCTL2_R (*((volatile unsigned long *)0x40038084)) +#define ADC_SSFIFO2_R (*((volatile unsigned long *)0x40038088)) +#define ADC_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C)) +#define ADC_SSMUX3_R (*((volatile unsigned long *)0x400380A0)) +#define ADC_SSCTL3_R (*((volatile unsigned long *)0x400380A4)) +#define ADC_SSFIFO3_R (*((volatile unsigned long *)0x400380A8)) +#define ADC_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC)) +#define ADC_TMLB_R (*((volatile unsigned long *)0x40038100)) + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the FLASH_FMC register. +// +//***************************************************************************** +#define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key +#define FLASH_FMC_WRKEY_S 16 + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the SYSCTL_DC1 register. +// +//***************************************************************************** +#define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present + +//***************************************************************************** +// +// Deprecated defines for the bit fields in the SYSCTL_DID1 register. +// +//***************************************************************************** +#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package +#define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package + +//***************************************************************************** +// +// Deprecated defines for the NVIC register addresses. +// +//***************************************************************************** +#define NVIC_MPU_R (*((volatile unsigned long *)0xE000ED9C)) + +#endif + +#endif // __LM3S6965_H__ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/main.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/main.c new file mode 100644 index 00000000..9a090c26 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/main.c @@ -0,0 +1,117 @@ +/**************************************************************************************** +| Description: demo program application source file +| File Name: main.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +static void Init(void); + + +/**************************************************************************************** +** NAME: main +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: This is the entry point for the bootloader application and is called +** by the reset interrupt vector after the C-startup routines executed. +** +****************************************************************************************/ +void main(void) +{ + /* initialize the microcontroller */ + Init(); + /* initialize the bootloader interface */ + BootComInit(); + + /* start the infinite program loop */ + while (1) + { + /* toggle LED with a fixed frequency */ + LedToggle(); + /* check for bootloader activation request */ + BootComCheckActivationRequest(); + } +} /*** end of main ***/ + + +/**************************************************************************************** +** NAME: Init +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the microcontroller. +** +****************************************************************************************/ +static void Init(void) +{ + /* set the clocking to run at 50MHz from the PLL */ + SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); + /* init the led driver */ + LedInit(); + /* init the timer driver */ + TimeInit(); + /* enable IRQ's, because they were initially disabled by the bootloader */ + IrqInterruptEnable(); +} /*** end of Init ***/ + + +/**************************************************************************************** +** NAME: __error__ +** PARAMETER: pcFilename name of the source file where the assertion occurred. +** ulLine linenumber in the source file where the assertion occurred. +** RETURN VALUE: none +** DESCRIPTION: Called when a runtime assertion failed. It stores information about +** where the assertion occurred and halts the software program. +** +****************************************************************************************/ +#ifdef DEBUG +void __error__(char *pcFilename, unsigned long ulLine) +{ + static volatile char *assert_failure_file; + static volatile unsigned long assert_failure_line; + + /* store the file string and line number so that it can be read on a breakpoint*/ + assert_failure_file = pcFilename; + assert_failure_line = ulLine; + + /* hang the software so that it requires a hard reset */ + for(;;) + { + } +} /*** end of __error__ ***/ +#endif + + +/*********************************** end of main.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/memory.x b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/memory.x new file mode 100644 index 00000000..ac7969f9 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/memory.x @@ -0,0 +1,30 @@ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00002000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00002000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x800; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.c new file mode 100644 index 00000000..ef3e5bd2 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.c @@ -0,0 +1,118 @@ +/**************************************************************************************** +| Description: Timer driver source file +| File Name: time.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* Local data declarations +****************************************************************************************/ +static unsigned long millisecond_counter; + + +/**************************************************************************************** +** NAME: TimeInit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Initializes the timer. +** +****************************************************************************************/ +void TimeInit(void) +{ + /* configure the SysTick timer for 1 ms period */ + SysTickPeriodSet((unsigned long)SysCtlClockGet() / 1000); + SysTickEnable(); + SysTickIntEnable(); + /* reset the millisecond counter */ + TimeSet(0); +} /*** end of TimeInit ***/ + + +/**************************************************************************************** +** NAME: TimeDeinit +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Stops and disables the timer. +** +****************************************************************************************/ +void TimeDeinit(void) +{ + SysTickIntDisable(); + SysTickDisable(); +} /*** end of TimeDeinit ***/ + + +/**************************************************************************************** +** NAME: TimeSet +** PARAMETER: timer_value initialize value of the millisecond timer. +** RETURN VALUE: none +** DESCRIPTION: Sets the initial counter value of the millisecond timer. +** +****************************************************************************************/ +void TimeSet(unsigned long timer_value) +{ + /* set the millisecond counter */ + millisecond_counter = timer_value; +} /*** end of TimeSet ***/ + + +/**************************************************************************************** +** NAME: TimeGet +** PARAMETER: none +** RETURN VALUE: current value of the millisecond timer +** DESCRIPTION: Obtains the counter value of the millisecond timer. +** +****************************************************************************************/ +unsigned long TimeGet(void) +{ + /* read and return the millisecond counter value */ + return millisecond_counter; +} /*** end of TimeGet ***/ + + +/**************************************************************************************** +** NAME: TimeISRHandler +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Interrupt service routine of the timer. +** +****************************************************************************************/ +void TimeISRHandler(void) +{ + /* increment the millisecond counter */ + millisecond_counter++; +} /*** end of TimeISRHandler ***/ + + +/*********************************** end of time.c *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.h b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.h new file mode 100644 index 00000000..a01f7e58 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/time.h @@ -0,0 +1,44 @@ +/**************************************************************************************** +| Description: Timer driver header file +| File Name: time.h +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2012 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ +#ifndef TIME_H +#define TIME_H + +/**************************************************************************************** +* Function prototypes +****************************************************************************************/ +void TimeInit(void); +void TimeDeinit(void); +void TimeSet(unsigned long timer_value); +unsigned long TimeGet(void); +void TimeISRHandler(void); + +#endif /* TIME_H */ +/*********************************** end of time.h *************************************/ diff --git a/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/vectors.c b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/vectors.c new file mode 100644 index 00000000..81677fa9 --- /dev/null +++ b/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_IAR/Prog/vectors.c @@ -0,0 +1,142 @@ +/**************************************************************************************** +| Description: bootloader interrupt vector table source file +| File Name: vectors.c +| +|---------------------------------------------------------------------------------------- +| C O P Y R I G H T +|---------------------------------------------------------------------------------------- +| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved +| +|---------------------------------------------------------------------------------------- +| L I C E N S E +|---------------------------------------------------------------------------------------- +| This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or +| modify it under the terms of the GNU General Public License as published by the Free +| Software Foundation, either version 3 of the License, or (at your option) any later +| version. +| +| OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +| PURPOSE. See the GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License along with OpenBLT. +| If not, see . +| +| A special exception to the GPL is included to allow you to distribute a combined work +| that includes OpenBLT without being obliged to provide the source code for any +| proprietary components. The exception text is included at the bottom of the license +| file . +| +****************************************************************************************/ + +/**************************************************************************************** +* Include files +****************************************************************************************/ +#include "header.h" /* generic header */ + + +/**************************************************************************************** +* External functions +****************************************************************************************/ +extern void __iar_program_start( void ); + + +/**************************************************************************************** +* Type definitions +****************************************************************************************/ +typedef union +{ + void (*func)(void); /* for ISR function pointers */ + void *ptr; /* for stack pointer entry */ +}tIsrFunc; /* type for vector table entries */ + + +/**************************************************************************************** +** NAME: UnusedISR +** PARAMETER: none +** RETURN VALUE: none +** DESCRIPTION: Catch-all for unused interrrupt service routines. +** +****************************************************************************************/ +void UnusedISR(void) +{ + /* unexpected interrupt occured, so halt the system */ + while (1) { ; } +} /*** end of UnusedISR ***/ + + +/**************************************************************************************** +* I N T E R R U P T V E C T O R T A B L E +****************************************************************************************/ +#pragma language=extended /* enable IAR extensions */ +#pragma segment="CSTACK" + +__root const tIsrFunc __vector_table[] @ ".intvec" = +{ + { .ptr = __sfe( "CSTACK" ) }, /* the initial stack pointer */ + { &__iar_program_start }, /* the reset handler */ + { UnusedISR }, /* NMI Handler */ + { UnusedISR }, /* Hard Fault Handler */ + { UnusedISR }, /* MPU Fault Handler */ + { UnusedISR }, /* Bus Fault Handler */ + { UnusedISR }, /* Usage Fault Handler */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* SVCall Handler */ + { UnusedISR }, /* Debug Monitor Handler */ + { UnusedISR }, /* Reserved */ + { UnusedISR }, /* PendSV Handler */ + { TimeISRHandler }, /* SysTick Handler */ + { UnusedISR }, /* GPIO Port A */ + { UnusedISR }, /* GPIO Port B */ + { UnusedISR }, /* GPIO Port C */ + { UnusedISR }, /* GPIO Port D */ + { UnusedISR }, /* GPIO Port E */ + { UnusedISR }, /* UART0 Rx and Tx */ + { UnusedISR }, /* UART1 Rx and Tx */ + { UnusedISR }, /* SSI Rx and Tx */ + { UnusedISR }, /* I2C Master and Slave */ + { UnusedISR }, /* PWM Fault */ + { UnusedISR }, /* PWM Generator 0 */ + { UnusedISR }, /* PWM Generator 1 */ + { UnusedISR }, /* PWM Generator 2 */ + { UnusedISR }, /* Quadrature Encoder */ + { UnusedISR }, /* ADC Sequence 0 */ + { UnusedISR }, /* ADC Sequence 1 */ + { UnusedISR }, /* ADC Sequence 2 */ + { UnusedISR }, /* ADC Sequence 3 */ + { UnusedISR }, /* Watchdog timer */ + { UnusedISR }, /* Timer 0 subtimer A */ + { UnusedISR }, /* Timer 0 subtimer B */ + { UnusedISR }, /* Timer 1 subtimer A */ + { UnusedISR }, /* Timer 1 subtimer B */ + { UnusedISR }, /* Timer 2 subtimer A */ + { UnusedISR }, /* Timer 2 subtimer B */ + { UnusedISR }, /* Analog Comparator 0 */ + { UnusedISR }, /* Analog Comparator 1 */ + { UnusedISR }, /* Analog Comparator 2 */ + { UnusedISR }, /* System Control (PLL, OSC, BO) */ + { UnusedISR }, /* FLASH Control */ + { UnusedISR }, /* GPIO Port F */ + { UnusedISR }, /* GPIO Port G */ + { UnusedISR }, /* GPIO Port H */ + { UnusedISR }, /* UART2 Rx and Tx */ + { UnusedISR }, /* SSI1 Rx and Tx */ + { UnusedISR }, /* Timer 3 subtimer A */ + { UnusedISR }, /* Timer 3 subtimer B */ + { UnusedISR }, /* I2C1 Master and Slave */ + { UnusedISR }, /* Quadrature Encoder 1 */ + { UnusedISR }, /* CAN0 */ + { UnusedISR }, /* CAN1 */ + { UnusedISR }, /* CAN2 */ + { UnusedISR }, /* Ethernet */ + { UnusedISR }, /* Hibernate */ + { .ptr = (void*)0x55AA11EE } /* Reserved for OpenBLT checksum */ +}; + + +/************************************ end of vectors.c *********************************/ + + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.elf index 2a6b53da..e0a72bf3 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.map index c52875e9..a983fdfb 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.map @@ -314,7 +314,7 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Linker script and memory map - 0x08002a70 __do_debug_operation = __do_debug_operation_bkpt + 0x08002a7c __do_debug_operation = __do_debug_operation_bkpt 0x08000000 __FLASH_segment_start__ = 0x8000000 0x08004000 __FLASH_segment_end__ = 0x8004000 0x20000000 __RAM_segment_start__ = 0x20000000 @@ -363,7 +363,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .init is too large to fit in FLASH memory segment) 0x080002e8 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x080002e8 0x27a8 +.text 0x080002e8 0x27b4 0x080002e8 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs @@ -597,104 +597,104 @@ Linker script and memory map .text.FlashErase 0x08001e3c 0x144 THUMB Debug/../../obj/flash.o 0x08001e3c FlashErase - .text.FlashVerifyChecksum - 0x08001f80 0x68 THUMB Debug/../../obj/flash.o - 0x08001f80 FlashVerifyChecksum .text.FlashWriteChecksum - 0x08001fe8 0x50 THUMB Debug/../../obj/flash.o - 0x08001fe8 FlashWriteChecksum + 0x08001f80 0x5c THUMB Debug/../../obj/flash.o + 0x08001f80 FlashWriteChecksum + .text.FlashVerifyChecksum + 0x08001fdc 0x68 THUMB Debug/../../obj/flash.o + 0x08001fdc FlashVerifyChecksum .text.FlashDone - 0x08002038 0x58 THUMB Debug/../../obj/flash.o - 0x08002038 FlashDone + 0x08002044 0x58 THUMB Debug/../../obj/flash.o + 0x08002044 FlashDone .text.IntToUnicode - 0x08002090 0x3c THUMB Debug/../../obj/usb.o + 0x0800209c 0x3c THUMB Debug/../../obj/usb.o .text.UsbFifoMgrCreate - 0x080020cc 0x40 THUMB Debug/../../obj/usb.o + 0x080020d8 0x40 THUMB Debug/../../obj/usb.o .text.UsbFifoMgrWrite - 0x0800210c 0x84 THUMB Debug/../../obj/usb.o + 0x08002118 0x84 THUMB Debug/../../obj/usb.o .text.UsbTransmitByte - 0x08002190 0x18 THUMB Debug/../../obj/usb.o + 0x0800219c 0x18 THUMB Debug/../../obj/usb.o .text.UsbFifoMgrRead - 0x080021a8 0x80 THUMB Debug/../../obj/usb.o + 0x080021b4 0x80 THUMB Debug/../../obj/usb.o .text.UsbReceiveByte - 0x08002228 0x18 THUMB Debug/../../obj/usb.o - .text.UsbInit 0x08002240 0x74 THUMB Debug/../../obj/usb.o - 0x08002240 UsbInit - .text.UsbFree 0x080022b4 0x10 THUMB Debug/../../obj/usb.o - 0x080022b4 UsbFree + 0x08002234 0x18 THUMB Debug/../../obj/usb.o + .text.UsbInit 0x0800224c 0x74 THUMB Debug/../../obj/usb.o + 0x0800224c UsbInit + .text.UsbFree 0x080022c0 0x10 THUMB Debug/../../obj/usb.o + 0x080022c0 UsbFree .text.UsbTransmitPacket - 0x080022c4 0x70 THUMB Debug/../../obj/usb.o - 0x080022c4 UsbTransmitPacket + 0x080022d0 0x70 THUMB Debug/../../obj/usb.o + 0x080022d0 UsbTransmitPacket .text.UsbReceivePacket - 0x08002334 0xb4 THUMB Debug/../../obj/usb.o - 0x08002334 UsbReceivePacket + 0x08002340 0xb4 THUMB Debug/../../obj/usb.o + 0x08002340 UsbReceivePacket .text.UsbTransmitPipeBulkIN - 0x080023e8 0xbc THUMB Debug/../../obj/usb.o - 0x080023e8 UsbTransmitPipeBulkIN + 0x080023f4 0xbc THUMB Debug/../../obj/usb.o + 0x080023f4 UsbTransmitPipeBulkIN .text.UsbReceivePipeBulkOUT - 0x080024a4 0x60 THUMB Debug/../../obj/usb.o - 0x080024a4 UsbReceivePipeBulkOUT + 0x080024b0 0x60 THUMB Debug/../../obj/usb.o + 0x080024b0 UsbReceivePipeBulkOUT .text.UsbGetSerialNum - 0x08002504 0x44 THUMB Debug/../../obj/usb.o - 0x08002504 UsbGetSerialNum + 0x08002510 0x44 THUMB Debug/../../obj/usb.o + 0x08002510 UsbGetSerialNum .text.AssertFailure - 0x08002548 0x1c THUMB Debug/../../obj/assert.o - 0x08002548 AssertFailure + 0x08002554 0x1c THUMB Debug/../../obj/assert.o + 0x08002554 AssertFailure .text.BackDoorInit - 0x08002564 0x1c THUMB Debug/../../obj/backdoor.o - 0x08002564 BackDoorInit + 0x08002570 0x1c THUMB Debug/../../obj/backdoor.o + 0x08002570 BackDoorInit .text.BackDoorCheck - 0x08002580 0x4 THUMB Debug/../../obj/backdoor.o - 0x08002580 BackDoorCheck + 0x0800258c 0x4 THUMB Debug/../../obj/backdoor.o + 0x0800258c BackDoorCheck .text.BootInit - 0x08002584 0x18 THUMB Debug/../../obj/boot.o - 0x08002584 BootInit + 0x08002590 0x18 THUMB Debug/../../obj/boot.o + 0x08002590 BootInit .text.BootTask - 0x0800259c 0x14 THUMB Debug/../../obj/boot.o - 0x0800259c BootTask - .text.ComInit 0x080025b0 0x34 THUMB Debug/../../obj/com.o - 0x080025b0 ComInit - .text.ComTask 0x080025e4 0x24 THUMB Debug/../../obj/com.o - 0x080025e4 ComTask - .text.ComFree 0x08002608 0xc THUMB Debug/../../obj/com.o - 0x08002608 ComFree + 0x080025a8 0x14 THUMB Debug/../../obj/boot.o + 0x080025a8 BootTask + .text.ComInit 0x080025bc 0x34 THUMB Debug/../../obj/com.o + 0x080025bc ComInit + .text.ComTask 0x080025f0 0x24 THUMB Debug/../../obj/com.o + 0x080025f0 ComTask + .text.ComFree 0x08002614 0xc THUMB Debug/../../obj/com.o + 0x08002614 ComFree .text.ComTransmitPacket - 0x08002614 0x10 THUMB Debug/../../obj/com.o - 0x08002614 ComTransmitPacket + 0x08002620 0x10 THUMB Debug/../../obj/com.o + 0x08002620 ComTransmitPacket .text.ComSetConnectEntryState - 0x08002624 0x10 THUMB Debug/../../obj/com.o - 0x08002624 ComSetConnectEntryState + 0x08002630 0x10 THUMB Debug/../../obj/com.o + 0x08002630 ComSetConnectEntryState .text.ComIsConnectEntryState - 0x08002634 0xc THUMB Debug/../../obj/com.o - 0x08002634 ComIsConnectEntryState - .text.CopInit 0x08002640 0x4 THUMB Debug/../../obj/cop.o - 0x08002640 CopInit + 0x08002640 0xc THUMB Debug/../../obj/com.o + 0x08002640 ComIsConnectEntryState + .text.CopInit 0x0800264c 0x4 THUMB Debug/../../obj/cop.o + 0x0800264c CopInit .text.CopService - 0x08002644 0x4 THUMB Debug/../../obj/cop.o - 0x08002644 CopService + 0x08002650 0x4 THUMB Debug/../../obj/cop.o + 0x08002650 CopService .text.XcpProtectResources - 0x08002648 0x10 THUMB Debug/../../obj/xcp.o + 0x08002654 0x10 THUMB Debug/../../obj/xcp.o .text.XcpSetCtoError - 0x08002658 0x1c THUMB Debug/../../obj/xcp.o - .text.XcpInit 0x08002674 0x20 THUMB Debug/../../obj/xcp.o - 0x08002674 XcpInit + 0x08002664 0x1c THUMB Debug/../../obj/xcp.o + .text.XcpInit 0x08002680 0x20 THUMB Debug/../../obj/xcp.o + 0x08002680 XcpInit .text.XcpPacketTransmitted - 0x08002694 0x14 THUMB Debug/../../obj/xcp.o - 0x08002694 XcpPacketTransmitted + 0x080026a0 0x14 THUMB Debug/../../obj/xcp.o + 0x080026a0 XcpPacketTransmitted .text.XcpPacketReceived - 0x080026a8 0x3c8 THUMB Debug/../../obj/xcp.o - 0x080026a8 XcpPacketReceived + 0x080026b4 0x3c8 THUMB Debug/../../obj/xcp.o + 0x080026b4 XcpPacketReceived .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x08002a70 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x08002a70 __do_debug_operation_bkpt + 0x08002a7c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x08002a7c __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x08002a88 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08002a88 __debug_io_lock + 0x08002a94 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x08002a94 __debug_io_lock .text.libc.__debug_io_unlock - 0x08002a8c 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08002a8c __debug_io_unlock - 0x08002a90 __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x08002a90 __text_load_end__ = __text_end__ + 0x08002a98 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x08002a98 __debug_io_unlock + 0x08002a9c __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x08002a9c __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -702,83 +702,83 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .text is too large to fit in FLASH memory segment) - 0x08002a90 __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x08002a9c __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x08002a90 0x0 - 0x08002a90 __dtors_start__ = . +.dtors 0x08002a9c 0x0 + 0x08002a9c __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x08002a90 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x08002a90 __dtors_load_end__ = __dtors_end__ + 0x08002a9c __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x08002a9c __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .dtors is too large to fit in FLASH memory segment) - 0x08002a90 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x08002a9c __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x08002a90 0x0 - 0x08002a90 __ctors_start__ = . +.ctors 0x08002a9c 0x0 + 0x08002a9c __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x08002a90 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x08002a90 __ctors_load_end__ = __ctors_end__ + 0x08002a9c __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x08002a9c __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ctors is too large to fit in FLASH memory segment) - 0x08002a90 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x08002a9c __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x08002a90 0x2d8 - 0x08002a90 __rodata_start__ = . +.rodata 0x08002a9c 0x2d8 + 0x08002a9c __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) .rodata.str1.4 - 0x08002a90 0x67 THUMB Debug/../../obj/main.o + 0x08002a9c 0x67 THUMB Debug/../../obj/main.o 0x68 (size before relaxing) - *fill* 0x08002af7 0x1 00 + *fill* 0x08002b03 0x1 00 .rodata.Bulk_DeviceDescriptor - 0x08002af8 0x14 THUMB Debug/../../obj/usb_desc.o - 0x08002af8 Bulk_DeviceDescriptor + 0x08002b04 0x14 THUMB Debug/../../obj/usb_desc.o + 0x08002b04 Bulk_DeviceDescriptor .rodata.Bulk_StringLangID - 0x08002b0c 0x4 THUMB Debug/../../obj/usb_desc.o - 0x08002b0c Bulk_StringLangID + 0x08002b18 0x4 THUMB Debug/../../obj/usb_desc.o + 0x08002b18 Bulk_StringLangID .rodata.Bulk_StringProduct - 0x08002b10 0x28 THUMB Debug/../../obj/usb_desc.o - 0x08002b10 Bulk_StringProduct + 0x08002b1c 0x28 THUMB Debug/../../obj/usb_desc.o + 0x08002b1c Bulk_StringProduct .rodata.Bulk_ConfigDescriptor - 0x08002b38 0x20 THUMB Debug/../../obj/usb_desc.o - 0x08002b38 Bulk_ConfigDescriptor + 0x08002b44 0x20 THUMB Debug/../../obj/usb_desc.o + 0x08002b44 Bulk_ConfigDescriptor .rodata.Bulk_StringVendor - 0x08002b58 0x1c THUMB Debug/../../obj/usb_desc.o - 0x08002b58 Bulk_StringVendor + 0x08002b64 0x1c THUMB Debug/../../obj/usb_desc.o + 0x08002b64 Bulk_StringVendor .rodata.Bulk_StringInterface - 0x08002b74 0x2c THUMB Debug/../../obj/usb_desc.o - 0x08002b74 Bulk_StringInterface + 0x08002b80 0x2c THUMB Debug/../../obj/usb_desc.o + 0x08002b80 Bulk_StringInterface .rodata.str1.4 - 0x08002ba0 0x92 THUMB Debug/../../obj/vectors.o + 0x08002bac 0x92 THUMB Debug/../../obj/vectors.o 0x94 (size before relaxing) - *fill* 0x08002c32 0x2 00 + *fill* 0x08002c3e 0x2 00 .rodata.flashLayout - 0x08002c34 0xa8 THUMB Debug/../../obj/flash.o + 0x08002c40 0xa8 THUMB Debug/../../obj/flash.o .rodata.str1.4 - 0x08002cdc 0x84 THUMB Debug/../../obj/usb.o + 0x08002ce8 0x84 THUMB Debug/../../obj/usb.o .rodata.xcpStationId - 0x08002d60 0x8 THUMB Debug/../../obj/xcp.o - 0x08002d68 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x08002d68 __rodata_load_end__ = __rodata_end__ + 0x08002d6c 0x8 THUMB Debug/../../obj/xcp.o + 0x08002d74 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x08002d74 __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .rodata is too large to fit in FLASH memory segment) - 0x08002d68 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x08002d74 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x08002d68 0x0 - 0x08002d68 __ARM.exidx_start__ = . - 0x08002d68 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x08002d74 0x0 + 0x08002d74 __ARM.exidx_start__ = . + 0x08002d74 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x08002d68 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x08002d68 __exidx_end = __ARM.exidx_end__ - 0x08002d68 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x08002d74 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x08002d74 __exidx_end = __ARM.exidx_end__ + 0x08002d74 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x08002d68 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x08002d74 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x08002d68 +.fast 0x20000000 0x0 load address 0x08002d74 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x08002d68 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x08002d74 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x20000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -787,9 +787,9 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __RAM_segment_start__) && (__fast_run_end__ <= (__RAM_segment_start__ + 0x5000))), error: .fast_run is too large to fit in RAM memory segment) - 0x08002d68 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x08002d74 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0xec load address 0x08002d68 +.data 0x20000000 0xec load address 0x08002d74 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) .data.Bulk_StringSerial @@ -823,10 +823,10 @@ Linker script and memory map 0x200000e8 0x4 THUMB Debug/../../obj/usb_prop.o 0x200000e8 Device_Table 0x200000ec __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x08002e54 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x08002e60 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x20000))), error: .data is too large to fit in FLASH memory segment) -.data_run 0x20000000 0xec load address 0x08002d68 +.data_run 0x20000000 0xec load address 0x08002d74 0x20000000 __data_run_start__ = . 0x200000ec . = MAX ((__data_run_start__ + SIZEOF (.data)), .) *fill* 0x20000000 0xec 00 @@ -963,14 +963,14 @@ Linker script and memory map 0x200008e0 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) 0x200008e0 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __RAM_segment_start__) && (__tbss_end__ <= (__RAM_segment_start__ + 0x5000))), error: .tbss is too large to fit in RAM memory segment) - 0x08002e54 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x08002e60 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x200008e0 0x0 load address 0x08002e54 +.tdata 0x200008e0 0x0 load address 0x08002e60 0x200008e0 __tdata_start__ = . *(.tdata .tdata.*) 0x200008e0 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x08002e54 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x08002e54 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x08002e60 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x08002e60 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x20000))), error: .tdata is too large to fit in FLASH memory segment) .tdata_run 0x200008e0 0x0 @@ -1020,7 +1020,7 @@ LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib END GROUP OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/../bin/openbtl_olimex_stm32h103.elf elf32-littlearm) -.debug_frame 0x00000000 0x1428 +.debug_frame 0x00000000 0x1424 .debug_frame 0x00000000 0x60 THUMB Debug/../../obj/hooks.o .debug_frame 0x00000060 0x30 THUMB Debug/../../obj/main.o .debug_frame 0x00000090 0x170 THUMB Debug/../../obj/core_cm3.o @@ -1039,18 +1039,18 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_frame 0x00000bbc 0x68 THUMB Debug/../../obj/cpu.o .debug_frame 0x00000c24 0x9c THUMB Debug/../../obj/nvm.o .debug_frame 0x00000cc0 0x78 THUMB Debug/../../obj/timer.o - .debug_frame 0x00000d38 0x19c THUMB Debug/../../obj/flash.o - .debug_frame 0x00000ed4 0x1e4 THUMB Debug/../../obj/usb.o - .debug_frame 0x000010b8 0x2c THUMB Debug/../../obj/assert.o - .debug_frame 0x000010e4 0x3c THUMB Debug/../../obj/backdoor.o - .debug_frame 0x00001120 0x48 THUMB Debug/../../obj/boot.o - .debug_frame 0x00001168 0xd0 THUMB Debug/../../obj/com.o - .debug_frame 0x00001238 0x30 THUMB Debug/../../obj/cop.o - .debug_frame 0x00001268 0x80 THUMB Debug/../../obj/xcp.o - .debug_frame 0x000012e8 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .debug_frame 0x00001388 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_frame 0x00000d38 0x198 THUMB Debug/../../obj/flash.o + .debug_frame 0x00000ed0 0x1e4 THUMB Debug/../../obj/usb.o + .debug_frame 0x000010b4 0x2c THUMB Debug/../../obj/assert.o + .debug_frame 0x000010e0 0x3c THUMB Debug/../../obj/backdoor.o + .debug_frame 0x0000111c 0x48 THUMB Debug/../../obj/boot.o + .debug_frame 0x00001164 0xd0 THUMB Debug/../../obj/com.o + .debug_frame 0x00001234 0x30 THUMB Debug/../../obj/cop.o + .debug_frame 0x00001264 0x80 THUMB Debug/../../obj/xcp.o + .debug_frame 0x000012e4 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + .debug_frame 0x00001384 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_info 0x00000000 0x669e +.debug_info 0x00000000 0x668d .debug_info 0x00000000 0x27e THUMB Debug/../../obj/hooks.o .debug_info 0x0000027e 0x2ab THUMB Debug/../../obj/main.o .debug_info 0x00000529 0x53d THUMB Debug/../../obj/core_cm3.o @@ -1073,17 +1073,17 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_info 0x00004969 0x162 THUMB Debug/../../obj/nvm.o .debug_info 0x00004acb 0x148 THUMB Debug/../../obj/timer.o .debug_info 0x00004c13 0x5e THUMB Debug/../../obj/uart.o - .debug_info 0x00004c71 0x671 THUMB Debug/../../obj/flash.o - .debug_info 0x000052e2 0x89e THUMB Debug/../../obj/usb.o - .debug_info 0x00005b80 0xe8 THUMB Debug/../../obj/assert.o - .debug_info 0x00005c68 0x8b THUMB Debug/../../obj/backdoor.o - .debug_info 0x00005cf3 0x8c THUMB Debug/../../obj/boot.o - .debug_info 0x00005d7f 0x1b9 THUMB Debug/../../obj/com.o - .debug_info 0x00005f38 0x8a THUMB Debug/../../obj/cop.o - .debug_info 0x00005fc2 0x60f THUMB Debug/../../obj/xcp.o - .debug_info 0x000065d1 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_info 0x00004c71 0x670 THUMB Debug/../../obj/flash.o + .debug_info 0x000052e1 0x88e THUMB Debug/../../obj/usb.o + .debug_info 0x00005b6f 0xe8 THUMB Debug/../../obj/assert.o + .debug_info 0x00005c57 0x8b THUMB Debug/../../obj/backdoor.o + .debug_info 0x00005ce2 0x8c THUMB Debug/../../obj/boot.o + .debug_info 0x00005d6e 0x1b9 THUMB Debug/../../obj/com.o + .debug_info 0x00005f27 0x8a THUMB Debug/../../obj/cop.o + .debug_info 0x00005fb1 0x60f THUMB Debug/../../obj/xcp.o + .debug_info 0x000065c0 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_abbrev 0x00000000 0x1da0 +.debug_abbrev 0x00000000 0x1daf .debug_abbrev 0x00000000 0xea THUMB Debug/../../obj/hooks.o .debug_abbrev 0x000000ea 0x109 THUMB Debug/../../obj/main.o .debug_abbrev 0x000001f3 0xa9 THUMB Debug/../../obj/core_cm3.o @@ -1106,15 +1106,15 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_abbrev 0x000012c1 0xa5 THUMB Debug/../../obj/nvm.o .debug_abbrev 0x00001366 0xe1 THUMB Debug/../../obj/timer.o .debug_abbrev 0x00001447 0x2a THUMB Debug/../../obj/uart.o - .debug_abbrev 0x00001471 0x229 THUMB Debug/../../obj/flash.o - .debug_abbrev 0x0000169a 0x2d8 THUMB Debug/../../obj/usb.o - .debug_abbrev 0x00001972 0x7e THUMB Debug/../../obj/assert.o - .debug_abbrev 0x000019f0 0x56 THUMB Debug/../../obj/backdoor.o - .debug_abbrev 0x00001a46 0x41 THUMB Debug/../../obj/boot.o - .debug_abbrev 0x00001a87 0xf7 THUMB Debug/../../obj/com.o - .debug_abbrev 0x00001b7e 0x41 THUMB Debug/../../obj/cop.o - .debug_abbrev 0x00001bbf 0x1bc THUMB Debug/../../obj/xcp.o - .debug_abbrev 0x00001d7b 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_abbrev 0x00001471 0x238 THUMB Debug/../../obj/flash.o + .debug_abbrev 0x000016a9 0x2d8 THUMB Debug/../../obj/usb.o + .debug_abbrev 0x00001981 0x7e THUMB Debug/../../obj/assert.o + .debug_abbrev 0x000019ff 0x56 THUMB Debug/../../obj/backdoor.o + .debug_abbrev 0x00001a55 0x41 THUMB Debug/../../obj/boot.o + .debug_abbrev 0x00001a96 0xf7 THUMB Debug/../../obj/com.o + .debug_abbrev 0x00001b8d 0x41 THUMB Debug/../../obj/cop.o + .debug_abbrev 0x00001bce 0x1bc THUMB Debug/../../obj/xcp.o + .debug_abbrev 0x00001d8a 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .debug_aranges 0x00000000 0x928 .debug_aranges @@ -1203,7 +1203,7 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_ranges 0x000007a8 0x38 THUMB Debug/../../obj/xcp.o .debug_ranges 0x000007e0 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_line 0x00000000 0x388a +.debug_line 0x00000000 0x388c .debug_line 0x00000000 0x1fb THUMB Debug/../../obj/hooks.o .debug_line 0x000001fb 0x1d5 THUMB Debug/../../obj/main.o .debug_line 0x000003d0 0x295 THUMB Debug/../../obj/core_cm3.o @@ -1226,15 +1226,15 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_line 0x000028b4 0x133 THUMB Debug/../../obj/nvm.o .debug_line 0x000029e7 0x131 THUMB Debug/../../obj/timer.o .debug_line 0x00002b18 0x1d THUMB Debug/../../obj/uart.o - .debug_line 0x00002b35 0x2c8 THUMB Debug/../../obj/flash.o - .debug_line 0x00002dfd 0x3ca THUMB Debug/../../obj/usb.o - .debug_line 0x000031c7 0xdc THUMB Debug/../../obj/assert.o - .debug_line 0x000032a3 0xc8 THUMB Debug/../../obj/backdoor.o - .debug_line 0x0000336b 0xbf THUMB Debug/../../obj/boot.o - .debug_line 0x0000342a 0x15e THUMB Debug/../../obj/com.o - .debug_line 0x00003588 0xb7 THUMB Debug/../../obj/cop.o - .debug_line 0x0000363f 0x1d7 THUMB Debug/../../obj/xcp.o - .debug_line 0x00003816 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_line 0x00002b35 0x2ca THUMB Debug/../../obj/flash.o + .debug_line 0x00002dff 0x3ca THUMB Debug/../../obj/usb.o + .debug_line 0x000031c9 0xdc THUMB Debug/../../obj/assert.o + .debug_line 0x000032a5 0xc8 THUMB Debug/../../obj/backdoor.o + .debug_line 0x0000336d 0xbf THUMB Debug/../../obj/boot.o + .debug_line 0x0000342c 0x15e THUMB Debug/../../obj/com.o + .debug_line 0x0000358a 0xb7 THUMB Debug/../../obj/cop.o + .debug_line 0x00003641 0x1d7 THUMB Debug/../../obj/xcp.o + .debug_line 0x00003818 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) .debug_str 0x00000000 0x2b45 .debug_str 0x00000000 0x211 THUMB Debug/../../obj/hooks.o @@ -1398,7 +1398,7 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .ARM.attributes 0x000001f0 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_loc 0x00000000 0x2e03 +.debug_loc 0x00000000 0x2ddd .debug_loc 0x00000000 0x82 THUMB Debug/../../obj/main.o .debug_loc 0x00000082 0x2ae THUMB Debug/../../obj/core_cm3.o .debug_loc 0x00000330 0x165 THUMB Debug/../../obj/system_stm32f10x.o @@ -1416,10 +1416,10 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_ .debug_loc 0x00001c83 0x111 THUMB Debug/../../obj/cpu.o .debug_loc 0x00001d94 0xff THUMB Debug/../../obj/nvm.o .debug_loc 0x00001e93 0x40 THUMB Debug/../../obj/timer.o - .debug_loc 0x00001ed3 0x6c5 THUMB Debug/../../obj/flash.o - .debug_loc 0x00002598 0x54c THUMB Debug/../../obj/usb.o - .debug_loc 0x00002ae4 0x46 THUMB Debug/../../obj/assert.o - .debug_loc 0x00002b2a 0x20 THUMB Debug/../../obj/backdoor.o - .debug_loc 0x00002b4a 0x40 THUMB Debug/../../obj/boot.o - .debug_loc 0x00002b8a 0xd2 THUMB Debug/../../obj/com.o - .debug_loc 0x00002c5c 0x1a7 THUMB Debug/../../obj/xcp.o + .debug_loc 0x00001ed3 0x6b2 THUMB Debug/../../obj/flash.o + .debug_loc 0x00002585 0x539 THUMB Debug/../../obj/usb.o + .debug_loc 0x00002abe 0x46 THUMB Debug/../../obj/assert.o + .debug_loc 0x00002b04 0x20 THUMB Debug/../../obj/backdoor.o + .debug_loc 0x00002b24 0x40 THUMB Debug/../../obj/boot.o + .debug_loc 0x00002b64 0xd2 THUMB Debug/../../obj/com.o + .debug_loc 0x00002c36 0x1a7 THUMB Debug/../../obj/xcp.o diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.srec index 2062a7e0..8966290f 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/bin/openbtl_olimex_stm32h103.srec @@ -28,7 +28,7 @@ S315080001904E494F4A00F062F84E484F49002200F097 S315080001A068F84E484E49091A082903DB00220260FE S315080001B0043001603F484049884205D0026804304F S315080001C003B4904703BCF7E700208646EC4602F0E6 -S315080001D029FA00200021434A904772B62A498D46DB +S315080001D02FFA00200021434A904772B62A498D46D5 S315080001E02A482B492B4A00F039F82B482B492C4A28 S315080001F000F034F82B482C492C4A00F02FF82C48EC S315080002002C492D4A00F02AF82C482D492D4A00F091 @@ -39,12 +39,12 @@ S315080002400268043003B4904703BCF7E700208646EB S31508000250EC4600200021234A9047FEE7884207D053 S31508000260521A05D0037801300B700131013AF9D1E1 S315080002707047884202D002700130FAE770470000E2 -S3150800028008ED00E000000008E0080020682D0008DE +S3150800028008ED00E000000008E0080020742D0008D2 S3150800029000000020EC000020E8020008E802000840 -S315080002A0902A0008682D00080000002000000020A1 -S315080002B0902A0008902A0008902A0008902A000828 -S315080002C0902A0008902A0008902A0008902A000818 -S315080002D0682D0008EC000020600700206007002059 +S315080002A09C2A0008742D0008000000200000002089 +S315080002B09C2A00089C2A00089C2A00089C2A0008F8 +S315080002C09C2A00089C2A00089C2A00089C2A0008E8 +S315080002D0742D0008EC00002060070020600700204D S30D080002E0E0070020890300086D S315080002E8C0B240F2EC03C2F200031B78D3B94FF44C S315080002F88053C4F202039A6942F010029A614FF4D5 @@ -65,7 +65,7 @@ S315080003D880321A604FF48053C4F2020340F2DC52AA S315080003E8196801F400310191009901F101010091A0 S315080003F8019911B900999142F2D14FF48053C4F288 S3150800040802031B6813F4003F04D12E484FF06F010E -S3150800041802F096F84FF40053C4F202031A6842F041 +S3150800041802F09CF84FF40053C4F202031A6842F03B S3150800042810021A601A6822F003021A601A6842F063 S3150800043802021A604FF48053C4F202035A685A60DB S315080004485A6842F400525A605A6842F480625A60FE @@ -75,8 +75,8 @@ S315080004781A6812F0007FFBD04FF48053C4F20203C7 S315080004885A6822F003025A605A6842F002025A6011 S315080004984FF48053C4F202035A6802F00C02082A81 S315080004A8FAD14FF48053C4F202035A6822F4800240 -S315080004B85A60DA6942F40002DA6102F05FF802F07B -S315080004C869F8FCE7902A000800B580B248B940F2F6 +S315080004B85A60DA6942F40002DA6102F065F802F075 +S315080004C86FF8FCE79C2A000800B580B248B940F2E4 S315080004D82013C2F200031B684FF001021A835DF865 S315080004E804FB40F22413C2F200031B681B689847F2 S315080004F840F22013C2F20003186800F112005DF8F2 @@ -370,9 +370,9 @@ S315080016E84FF00000186040F22813C2F200034FF4C6 S315080016F806421A8045F64043C4F200031A6070474A S3150800170870B50E4600F07F052846FFF7C7FF044662 S315080017182846FFF771FF014630462246FFF75CFE6A -S31508001728204670BD00B500F05BFE5DF804FB00BFFF -S3150800173800B500F0B3FE5DF804FB00BF00B540F243 -S315080017483813C2F200031B68052B01D100F048FEC6 +S31508001728204670BD00B500F061FE5DF804FB00BFF9 +S3150800173800B500F0B9FE5DF804FB00BF00B540F23D +S315080017483813C2F200031B68052B01D100F04EFEC0 S315080017585DF804FB00B545F64443C4F200031A686D S3150800176892B240F23613C2F200031A801A8840F27F S315080017782813C2F200031B88134013F4007F11D004 @@ -402,7 +402,7 @@ S315080018E8FFF794F85DF804FB4FF000005DF804FB79 S315080018F800B580B240F25401C2F20001FFF786F83B S315080019085DF804FB00B580B240F2B801C2F20001E6 S31508001918FFF77CF85DF804FB10B540F22013C2F215 -S3150800192800031B684FF000049C7442F63832C0F670 +S3150800192800031B684FF000049C7442F64432C0F664 S315080019380002D2795A74DC742046FFF765FD204602 S315080019484FF40071FFF76AFD20464FF01001FFF7C4 S3150800195875FD20464FF04001FFF726FE20464FF05A @@ -415,31 +415,31 @@ S315080019B835FE4FF001004FF04001FFF743FE4FF0A8 S315080019C801004FF44051FFF757FD4FF001004FF063 S315080019D82001FFF733FD2046FFF7E6FA40F23813F1 S315080019E8C2F200034FF001021A6010BD10B500F0EC -S315080019F885FD40F22013C2F200031B684FF000046D +S315080019F88BFD40F22013C2F200031B684FF0000467 S31508001A089C7400F009F8FFF767FE40F23813C2F233 S31508001A1800031C6010BD00BF00B54FF00100FEF7BB S31508001A285FFC45F64043C4F200034FF001021A6012 S31508001A3840F22812C2F200024FF00000186045F67C S31508001A484441C4F2000108604FF4E051118019605E -S31508001A585DF804FB00B542F6A030C0F600004FF06A -S31508001A683C0100F06DFD5DF804FB00BF00B500F011 -S31508001A783FF870B100F0C4FD4EF60853CEF20003E5 +S31508001A585DF804FB00B542F6AC30C0F600004FF05E +S31508001A683C0100F073FD5DF804FB00BF00B500F00B +S31508001A783FF870B100F0CAFD4EF60853CEF20003DF S31508001A884FF480421A6044F20403C0F600031B6848 S31508001A9898475DF804FB00BF70B50E4692B272B15E S31508001AA8044600F1010002F1FF3292B2851816F8D1 -S31508001AB8013B04F8013B00F0C1FDAC42F7D170BD0B +S31508001AB8013B04F8013B00F0C7FDAC42F7D170BD05 S31508001AC800B5FEF786FB5DF804FB00BF00B500F01D S31508001AD877F95DF804FB00BF00B500F07FF95DF8FB S31508001AE804FB00BF00B500F0A5F95DF804FB00BFCC -S31508001AF800B500F041FA5DF804FB00BF00B500F038 -S31508001B086FFA18B100F094FA5DF804FB4FF000007C +S31508001AF800B500F06FFA5DF804FB00BF00B500F00A +S31508001B083BFA18B100F09AFA5DF804FB4FF00000AA S31508001B185DF804FB4FF40053C4F2020340F22312A3 S31508001B28C4F267525A6048F6AB12CCF6EF525A60BE S31508001B384FF03402DA6070474FF40053C4F20203D8 S31508001B481A6942F080021A61704700BF70B50646E6 -S31508001B5842F63445C0F600054FF0000400F06EFD65 +S31508001B5842F64045C0F600054FF0000400F074FD53 S31508001B682B68B3420DD869685B189E4209D242F6BB -S31508001B783443C0F6000304EB440203EB8203187AE5 +S31508001B784043C0F6000304EB440203EB8203187AD9 S31508001B8870BD04F1010405F10C050E2CE6D14FF0E1 S31508001B98FF0070BD2DE9F04107460068FFF7D6FF3C S31508001BA8FF2808BF002454D0FFF7B4FF4FF40053AA @@ -447,15 +447,15 @@ S31508001BB8C4F20203DB6813F0010F04D0FFF7BCFF79 S31508001BC84FF0000445E04FF40053C4F202031A69C3 S31508001BD842F001021A614FF000054FF40054C4F2AE S31508001BE802043B6805EB030805F10402BE58B2B2C5 -S31508001BF8EA52E36813F0010F05D000F01FFDE36809 +S31508001BF8EA52E36813F0010F05D000F025FDE36803 S31508001C0813F0010FF9D14FEA1643A8F80230E36832 -S31508001C1813F0010F05D000F011FDE36813F0010F6A +S31508001C1813F0010F05D000F017FDE36813F0010F64 S31508001C28F9D1D8F80030B34207D105F10405B5F55E S31508001C38007FD6D14FF0010401E04FF000044FF4BD S31508001C480053C4F202031A6922F001021A61FFF767 -S31508001C5873FF2046BDE8F08170B5C6B242F6344532 -S31508001C68C0F600054FF0000400F0E8FC2B7AB342F2 -S31508001C7808D142F63443C0F6000304EB440253F88D +S31508001C5873FF2046BDE8F08170B5C6B242F6404526 +S31508001C68C0F600054FF0000400F0EEFC2B7AB342EC +S31508001C7808D142F64043C0F6000304EB440253F881 S31508001C88220070BD04F1010405F10C050E2CEBD1F8 S31508001C984FF0FF3070BD00BF00B54FEAC1534FEA99 S31508001CA8D35363B903688B420DD040F8041B4FF42D @@ -471,7 +471,7 @@ S31508001D384FEA49290368B3F1FF3F04D14946FFF73B S31508001D48ABFF002830D02B684B4505D028464946B6 S31508001D58FFF7BEFF054658B32B68E41A04F10404D6 S31508001D682C1906F1010807F1FF37BFB2B84440F24B -S31508001D78FF1709F5007900F061FC05F10403E31A79 +S31508001D78FF1709F5007900F067FC05F10403E31A73 S31508001D88BB4207D928464946FFF7A2FF054698B138 S31508001D9800F1040416F8013B04F8013B4645EAD16C S31508001DA84FF00100BDE8F0834FF00000BDE8F0836E @@ -491,255 +491,256 @@ S31508001E7879D8FFF74FFE4FF40053C4F20203DB6824 S31508001E8813F0010F05D0FFF757FE4FF00000BDE825 S31508001E98F0814FF40053C4F202031A6942F00202B1 S31508001EA81A612846FFF7D8FE07462046FFF7D4FEEC -S31508001EB8804642F63445C0F600054FF0000400F0A7 -S31508001EC8BDFB2B7AB34209D142F63443C0F6000368 +S31508001EB8804642F64045C0F600054FF0000400F09B +S31508001EC8C3FB2B7AB34209D142F64043C0F6000356 S31508001ED804EB440203EB82035B6807E004F10104A0 S31508001EE805F10C050E2CEAD14FF00003C7EB0808DC S31508001EF84344C3F38F2303B303F1FF339EB206F1BA S31508001F0801064FEA86264FF000054FF40054C4F23E S31508001F180204EB196361236943F040032361E3680C -S31508001F2813F0010F05D000F089FBE36813F0010FE1 +S31508001F2813F0010F05D000F08FFBE36813F0010FDB S31508001F38F9D105F58065B542EBD14FF40053C4F2E3 S31508001F4802031A6922F002021A61FFF7F5FD4FF03B S31508001F580100BDE8F0814FF00000BDE8F0814FF0C0 S31508001F680000BDE8F0814FF00000BDE8F0814FF0B1 -S31508001F780000BDE8F08100BF44F20402C0F6000282 -S31508001F884FF48043C0F6000310681B68C01844F273 -S31508001F980803C0F600031B68C01844F20C03C0F611 -S31508001FA800031B68C01844F21003C0F600031B6838 -S31508001FB8C01844F21403C0F600031B68C01844F29C -S31508001FC81803C0F600031B68C01844F25013C0F67D -S31508001FD800031B68C018D0F1010038BF00207047FD -S31508001FE810B581B040F23C13C2F200039C685A68E7 -S31508001FF8A418DA68A4181A69A4185A69A4189A6950 -S31508002008A418DB69E418C4F100040094FFF7B4FFC8 -S31508002018844208BF012008D044F25010C0F60000D8 -S315080020284FF004016A46FFF7D9FE01B010BD00BF9C -S3150800203800B540F23C13C2F200031B68B3F1FF3F38 -S3150800204806D040F23C10C2F20000FFF7A3FD90B19B -S3150800205840F24033C2F200031B68B3F1FF3F0ED0CB -S3150800206840F24030C2F20000FFF794FD003018BF76 -S3150800207801205DF804FB4FF000005DF804FB4FF003 -S3150800208801005DF804FB00BF10B4D2B2BAB10B4622 -S3150800209801F1020102F1FF32D2B201EB42014FF01F -S315080020A800044FEA1072092A94BF303237321A7080 -S315080020B84FEA00105C7003F102038B42F1D110BCA1 -S315080020C8704700BF10B4C9B240F28453C2F2000385 -S315080020D81B6893B140F28452C2F200025C6914602C -S315080020E819749860D8604FF000025A74186001F1A4 -S315080020F8FF3140185860987C01E04FF0FF0010BC8B -S31508002108704700BF30B5C4B2CDB2012C07D942F624 -S31508002118DC40C0F600004FF4017100F011FA40F2F5 -S315080021288853C2F2000304EB440203EBC2035A7C49 -S315080021381B7C9A4222D040F28853C2F2000304EB71 -S31508002148440203EBC203DA681570597C01F10101F0 -S315080021585974DA6802F10102DA605B689A4210D9A2 -S3150800216840F28853C2F2000304EB44044FEAC4045D -S315080021781A191B59D3604FF0010030BD4FF0000003 -S3150800218830BD4FF0010030BD00B5C1B240F28063E2 -S31508002198C2F200031878FFF7B5FF5DF804FB00BF25 -S315080021A830B50D46C4B2012C07D942F6DC40C0F654 -S315080021B8000040F2272100F0C3F940F28853C2F222 -S315080021C8000304EB440203EBC2035B7C0BB340F247 -S315080021D88853C2F2000303EBC2039A6812782A707E -S315080021E8597C01F1FF3159749A6802F101029A6023 -S315080021F85B689A4210D940F28853C2F2000304EB8E -S3150800220844044FEAC4041A191B5993604FF0010095 -S3150800221830BD4FF0000030BD4FF0010030BD00BFA3 -S3150800222800B5014640F2B853C2F200031878FFF722 -S31508002238B7FF5DF804FB00BF30B540F28853C2F219 -S3150800224800034FF000029A7403F1180159614FF020 -S31508002258010183F82A10DA6240F28452C2F20002B7 -S31508002268136040F28064C2F2000460184FF040011F -S31508002278FFF728FF207040F2B855C2F2000505F1AD -S3150800228801004FF04001FFF71DFF28702378FF2B48 -S3150800229801D0FF2807D142F6DC40C0F600004FF00F -S315080022A8760100F04DF9FEF7EBFE30BD00B54FF0AC -S315080022B80000FEF715F85DF804FB00BF2DE9F041AC -S315080022C80546CCB23F2C07D942F6DC40C0F60000DA -S315080022D84FF0970100F034F92046FFF755FF01281B -S315080022E807D042F6DC40C0F600004FF09A0100F02D -S315080022F827F92646BCB14FF0000442F6DC47C0F67B -S3150800230800074FF0A20800F099F9285DFFF73CFF8F -S31508002318012803D03846414600F012F904F10104B1 -S31508002328A3B2B342EFD3BDE8F08100BF10B50446A7 -S31508002338FFF710FA40F2C463C2F200031B78B3B978 -S3150800234840F2FC50C2F20000FFF76AFF01283CD1B0 -S3150800235840F2C463C2F200034FF001021A7040F259 -S315080023683C63C2F200034FF00000187010BD40F23B -S31508002378FC53C2F2000340F23C62C2F20002107833 -S3150800238800F101001818FFF74BFF012820D140F289 -S315080023983C63C2F200031A7802F10102D2B21A703B -S315080023A840F2FC53C2F200031B78934213D120462D -S315080023B80A49FFF771FB40F2C463C2F200034FF003 -S315080023C800021A704FF0010010BD4FF0000010BD52 -S315080023D84FF0000010BD4FF0000010BDFD050020AD -S315080023E82DE9F04181B040F28063C2F200031C78FF -S315080023F8012C07D942F6DC40C0F600004FF41271EA -S3150800240800F09EF840F28853C2F2000304EB440435 -S3150800241803EBC4035B7C002B3DD0402B34BF9846A6 -S315080024284FF04008B8F1000F23D040F24063C2F2DB -S31508002438000303F1FF3408F1FF35EDB25D1940F2E8 -S315080024488066C2F2000642F6DC47C0F60007307816 -S315080024580DF10301FFF7A4FE012804D038464FF40E -S31508002468A67100F06DF89DF8033004F8013FAC42F8 -S31508002478EDD140F24060C2F200004FF48071424646 -S31508002488FEF78EFF4FF001004146FFF7C7F84FF0F9 -S315080024980100FFF70FF801B0BDE8F081F0B540F28A -S315080024A84451C2F200014FF00100FFF729F982B240 -S315080024B8FAB140F24453C2F2000303F1FF3402F1C1 -S315080024C8FF3295B25D1940F2B856C2F2000642F6D6 -S315080024D8DC47C0F60007307814F8011FFFF712FE2C -S315080024E8012804D0384640F2731100F029F8AC42A6 -S315080024F8F1D14FF00100FEF7F1FFF0BD30B54FF20C -S31508002508E873C1F6FF731B684FF2EC72C1F6FF72E7 -S3150800251814684FF2F072C1F6FF721068C0180CD032 -S31508002528064D29464FF00802FFF7AEFD05F11001E2 -S3150800253820464FF00402FFF7A7FD30BD0200002031 -S3150800254800B540F2C863C2F20003186040F2CC63D3 -S31508002558C2F20003196000F071F8FCE700B5FDF750 -S31508002568EDFEFDF701FF20B900F060F808B9FFF79E -S315080025787DFA5DF804FB00BF704700BF00B500F0A0 -S315080025885BF8FFF7EBFFFFF7A1FA00F00DF85DF827 -S3150800259804FB00BF00B500F051F800F01FF8FFF77C -S315080025A8EBFF5DF804FB00BF00B581B04FF0FF03F1 -S315080025B88DF800304FF000038DF8013000F056F81A -S315080025C8FFF73AFE40F2D063C2F200031B78012BEC -S315080025D802D1684600F064F801B000BD00B540F2C3 -S315080025E8D460C2F20000FFF7A1FE012805D140F227 -S315080025F8D460C2F2000000F053F85DF804FB00BF8F -S3150800260800B5FFF753FE5DF804FB00BF00B5C9B275 -S31508002618FFF754FE00F03AF85DF804FB40F2D06381 -S31508002628C2F200034FF001021A70704740F2D063F5 -S31508002638C2F2000318787047704700BF704700BF9A -S3150800264840F21473C2F200034FF000025A70704742 -S3150800265840F21473C2F200034FF0FE02DA701871E2 -S315080026684FF00202A3F84420704700BF40F21473E3 -S31508002678C2F200034FF000021A709A6483F84220E7 -S31508002688A3F844209A705A70704700BF40F2147332 -S31508002698C2F200034FF0000283F84220704700BFD9 -S315080026A830B504460278FF2A1DD1FFF7C9FF40F264 -S315080026B81473C2F200034FF001021A704FF0FF01BB -S315080026C8D9704FF0100119714FF0000159714FF088 -S315080026D83F009871D87119725A729A724FF00802A7 -S315080026E8A3F84420A4E140F21473C2F200031B784D -S315080026F8012B40F0B781A2F1C902352A00F294816C -S31508002708DFE812F0F800920192018D019201920118 -S315080027187F01190165014F01920192019201920107 -S3150800272892019201920192019201920192019201FB +S31508001F780000BDE8F08100BF00B581B040F23C130F +S31508001F88C2F200031B68B3F1FF3F08BF01201ED049 +S31508001F9840F23C13C2F2000399685A688918DA684D +S31508001FA889181A6989185A6989189A698918DA690B +S31508001FB88B18C3F1000301AA42F8043D44F25010F5 +S31508001FC8C0F600004FF004016A46FFF707FF01B0A4 +S31508001FD800BD00BF44F20402C0F600024FF4804375 +S31508001FE8C0F6000310681B68C01844F20803C0F658 +S31508001FF800031B68C01844F20C03C0F600031B68EC +S31508002008C01844F21003C0F600031B68C01844F24F +S315080020181403C0F600031B68C01844F21803C0F678 +S3150800202800031B68C01844F25013C0F600031B6867 +S31508002038C018D0F1010038BF0020704700B540F23B +S315080020483C13C2F200031B68B3F1FF3F06D040F207 +S315080020583C10C2F20000FFF79DFD90B140F24033F4 +S31508002068C2F200031B68B3F1FF3F0ED040F24030BE +S31508002078C2F20000FFF78EFD003018BF01205DF898 +S3150800208804FB4FF000005DF804FB4FF001005DF813 +S3150800209804FB00BF10B4D2B2BAB10B4601F1020173 +S315080020A802F1FF32D2B201EB42014FF000044FEAC7 +S315080020B81072092A94BF303237321A704FEA001064 +S315080020C85C7003F102038B42F1D110BC704700BF64 +S315080020D810B4C9B240F28453C2F200031B6893B124 +S315080020E840F28452C2F200025C691460197498605E +S315080020F8D8604FF000025A74186001F1FF31401891 +S315080021085860987C01E04FF0FF0010BC704700BF8C +S3150800211830B5C4B2CDB2012C07D942F6E840C0F6AC +S3150800212800004FF4017100F011FA40F28853C2F228 +S31508002138000304EB440203EBC2035A7C1B7C9A4255 +S3150800214822D040F28853C2F2000304EB440203EBA0 +S31508002158C203DA681570597C01F101015974DA6805 +S3150800216802F10102DA605B689A4210D940F2885394 +S31508002178C2F2000304EB44044FEAC4041A191B59B3 +S31508002188D3604FF0010030BD4FF0000030BD4FF06E +S31508002198010030BD00B5C1B240F28063C2F2000347 +S315080021A81878FFF7B5FF5DF804FB00BF30B50D4694 +S315080021B8C4B2012C07D942F6E840C0F6000040F23E +S315080021C8272100F0C3F940F28853C2F2000304EB52 +S315080021D8440203EBC2035B7C0BB340F28853C2F29A +S315080021E8000303EBC2039A6812782A70597C01F136 +S315080021F8FF3159749A6802F101029A605B689A423B +S3150800220810D940F28853C2F2000304EB44044FEA9B +S31508002218C4041A191B5993604FF0010030BD4FF0DA +S31508002228000030BD4FF0010030BD00BF00B50146C3 +S3150800223840F2B853C2F200031878FFF7B7FF5DF803 +S3150800224804FB00BF30B540F28853C2F200034FF0D2 +S3150800225800029A7403F1180159614FF0010183F8D5 +S315080022682A10DA6240F28452C2F20002136040F27F +S315080022788064C2F2000460184FF04001FFF728FF97 +S31508002288207040F2B855C2F2000505F101004FF07A +S315080022984001FFF71DFF28702378FF2B01D0FF2880 +S315080022A807D142F6E840C0F600004FF0760100F084 +S315080022B84DF9FEF7E5FE30BD00B54FF00000FEF714 +S315080022C80FF85DF804FB00BF2DE9F0410546CCB2CE +S315080022D83F2C07D942F6E840C0F600004FF09701B0 +S315080022E800F034F92046FFF755FF012807D042F6D3 +S315080022F8E840C0F600004FF09A0100F027F9264694 +S31508002308BCB14FF0000442F6E847C0F600074FF0A4 +S31508002318A20800F099F9285DFFF73CFF012803D0C9 +S315080023283846414600F012F904F10104A3B2B34253 +S31508002338EFD3BDE8F08100BF10B50446FFF70AFAE7 +S3150800234840F2C463C2F200031B78B3B940F2FC50EA +S31508002358C2F20000FFF76AFF01283CD140F2C463C5 +S31508002368C2F200034FF001021A7040F23C63C2F24F +S3150800237800034FF00000187010BD40F2FC53C2F27B +S31508002388000340F23C62C2F20002107800F1010034 +S315080023981818FFF74BFF012820D140F23C63C2F218 +S315080023A800031A7802F10102D2B21A7040F2FC53FD +S315080023B8C2F200031B78934213D120460A49FFF755 +S315080023C86BFB40F2C463C2F200034FF000021A70B6 +S315080023D84FF0010010BD4FF0000010BD4FF000008F +S315080023E810BD4FF0000010BDFD0500202DE9F04195 +S315080023F881B040F28063C2F200031C78012C07D929 +S3150800240842F6E840C0F600004FF4127100F09EF854 +S3150800241840F28853C2F2000304EB440403EBC403F6 +S315080024285B7C002B3DD0402B34BF98464FF04008C4 +S31508002438B8F1000F23D040F24063C2F2000303F15B +S31508002448FF3408F1FF35EDB25D1940F28066C2F235 +S31508002458000642F6E847C0F6000730780DF1030192 +S31508002468FFF7A4FE012804D038464FF4A67100F0F9 +S315080024786DF89DF8033004F8013FAC42EDD140F2FF +S315080024884060C2F200004FF480714246FEF788FFAA +S315080024984FF001004146FFF7C1F84FF00100FFF77A +S315080024A809F801B0BDE8F081F0B540F24451C2F22E +S315080024B800014FF00100FFF723F982B2FAB140F2A2 +S315080024C84453C2F2000303F1FF3402F1FF3295B216 +S315080024D85D1940F2B856C2F2000642F6E847C0F659 +S315080024E80007307814F8011FFFF712FE012804D0F8 +S315080024F8384640F2731100F029F8AC42F1D14FF092 +S315080025080100FEF7EBFFF0BD30B54FF2E873C1F6F0 +S31508002518FF731B684FF2EC72C1F6FF7214684FF22C +S31508002528F072C1F6FF721068C0180CD0064D29461D +S315080025384FF00802FFF7AEFD05F1100120464FF0EF +S315080025480402FFF7A7FD30BD0200002000B540F2DF +S31508002558C863C2F20003186040F2CC63C2F20003F3 +S31508002568196000F071F8FCE700B5FDF7E7FEFDF71E +S31508002578FBFE20B900F060F808B9FFF777FA5DF8AE +S3150800258804FB00BF704700BF00B500F05BF8FFF713 +S31508002598EBFFFFF79BFA00F00DF85DF804FB00BFA8 +S315080025A800B500F051F800F01FF8FFF7EBFF5DF8EB +S315080025B804FB00BF00B581B04FF0FF038DF800306B +S315080025C84FF000038DF8013000F056F8FFF73AFE91 +S315080025D840F2D063C2F200031B78012B02D1684689 +S315080025E800F064F801B000BD00B540F2D460C2F24C +S315080025F80000FFF7A1FE012805D140F2D460C2F217 +S31508002608000000F053F85DF804FB00BF00B5FFF7BB +S3150800261853FE5DF804FB00BF00B5C9B2FFF754FEC8 +S3150800262800F03AF85DF804FB40F2D063C2F2000302 +S315080026384FF001021A70704740F2D063C2F20003E5 +S3150800264818787047704700BF704700BF40F2147388 +S31508002658C2F200034FF000025A70704740F2147332 +S31508002668C2F200034FF0FE02DA7018714FF0020248 +S31508002678A3F84420704700BF40F21473C2F200035F +S315080026884FF000021A709A6483F84220A3F844208F +S315080026989A705A70704700BF40F21473C2F200036A +S315080026A84FF0000283F84220704700BF30B5044651 +S315080026B80278FF2A1DD1FFF7C9FF40F21473C2F248 +S315080026C800034FF001021A704FF0FF01D9704FF05E +S315080026D8100119714FF0000159714FF03F009871B8 +S315080026E8D87119725A729A724FF00802A3F84420E0 +S315080026F8A4E140F21473C2F200031B78012B40F0E0 +S31508002708B781A2F1C902352A00F29481DFE812F0EE +S31508002718F800920192018D01920192017F01190137 +S3150800272865014F019201920192019201920192016B S3150800273892019201920192019201920192019201EB S3150800274892019201920192019201920192019201DB -S315080027589201920192019201820054003600740097 -S31508002768920192019201B2009201CE00D300E700CD -S3150800277842783E2A04D94FF02200FFF769FF57E14D -S3150800278840F21475C2F2000505F10400A96CFFF7BA -S3150800279883F94FF0FF03EB706278AB6CD318AB6420 -S315080027A8637803F10103A5F8443041E143783E2BE9 -S315080027B804D94FF02200FFF74BFF39E1416840F290 -S315080027C81475C2F20005A96405F104006278FFF7DA -S315080027D863F94FF0FF03EB706278AB6CD318AB6400 -S315080027E8637803F10103A5F8443021E140F2147334 -S315080027F8C2F200034FF0FF02DA7042689A644FF09B -S315080028080102A3F8442013E140F21473C2F200034C -S315080028184FF0FF02DA70996C43684FF000023BB13B -S315080028284FF0000211F8010B1218D2B2013BF9D188 -S3150800283840F21473C2F200034FF00001DA714FEA4E -S315080028481220C0B218724FEA1240C0B258724FEA44 -S3150800285812629A724FF001021A71597199714FF002 -S315080028680802A3F84420E3E040F21473C2F2000316 -S315080028784FF0FF02DA7042F66052C0F600029A6418 -S315080028884FF000021A715A719A714FF00701D971FF -S315080028981A725A729A724FF00802A3F84420C7E0CF -S315080028A84FF00000FFF7D4FEC2E040F21473C2F2FC -S315080028B800034FF0FF02DA704FF000021A715978D8 -S315080028C859719A71DA711A724FF00602A3F8442000 -S315080028D8AEE040F21474C2F200044FF0000323700D -S315080028E8FFF7AEFE4FF0FF03E3704FF00103A4F8BD -S315080028F844309DE040F21473C2F20003986C04F168 -S3150800290801024FF03E01FFF7E7F820B94FF0310012 -S31508002918FFF79EFE8CE040F21473C2F200034FF0F4 -S31508002928FF02DA709A6C02F13E029A644FF00102CD -S31508002938A3F844207CE043783D2B04D94FF02200C5 -S31508002948FFF786FE74E040F21473C2F200034FF0F4 -S31508002958FF02DA704FF00102A3F84420417841B922 -S31508002968FFF7CCF8002863D14FF03100FFF770FE67 -S315080029785EE040F21473C2F20003986C04F1020296 -S31508002988FFF7AAF820B94FF03100FFF761FE4FE0CC -S3150800299840F21473C2F2000361789A6C8A189A6432 -S315080029A846E040F21473C2F200034FF0FF02DA70F1 -S315080029B84FF000021A715A714FF03F019971DA7196 -S315080029C81A725A724FF00702A3F8442030E040F210 -S315080029D81473C2F20003986C6168FFF783F820B98C -S315080029E84FF03100FFF734FE22E040F21473C2F2CA -S315080029F800034FF0FF02DA704FF00102A3F84420F3 -S31508002A0816E0FFF75DF840F21473C2F200034FF0C0 -S31508002A18FF02DA704FF00102A3F8442008E04FF0ED -S31508002A283100FFF715FE03E04FF02000FFF710FE10 -S31508002A3840F21473C2F2000393F84230012B03D113 -S31508002A484FF01000FFF704FE40F21473C2F20003B9 -S31508002A584FF0010283F8422003F10300B3F844104B -S31508002A68FFF7D4FD30BD00BF00B503B400F008F881 -S31508002A7803BC02B4694609BE00F004F801BC00BDEF -S30D08002A88704700BF704700BF4C -S31508002A90443A2F7573722F6665617365722F736F6B -S31508002AA06674776172652F4F70656E424C542F5469 -S31508002AB061726765742F44656D6F2F41524D434DA2 -S31508002AC0335F53544D33325F4F6C696D65785F538E -S31508002AD0544D3332483130335F43726F7373776FB7 -S31508002AE0726B732F426F6F742F6964652F2E2E2FAA -S31508002AF06D61696E2E63000012011001000000402E -S31508002B004501230000010102030100000403090432 -S31508002B102603570069006E00550053004200200046 -S31508002B20420075006C006B002000440065007600CA -S31508002B30690063006500000009022000010100C069 -S31508002B40320904000002FF00000407058102400064 -S31508002B5000070501024000001A034F0070006500D7 -S31508002B606E0042004C0054002000550073006500BA -S31508002B70720000002C03570069006E0055005300D0 -S31508002B8042002000420075006C006B0020004900DE -S31508002B906E007400650072006600610063006500DF -S31508002BA0443A2F7573722F6665617365722F736F5A -S31508002BB06674776172652F4F70656E424C542F5458 -S31508002BC061726765742F44656D6F2F41524D434D91 -S31508002BD0335F53544D33325F4F6C696D65785F537D -S31508002BE0544D3332483130335F43726F7373776FA6 -S31508002BF0726B732F426F6F742F6964652F2E2E2F99 -S31508002C002E2E2F2E2E2F2E2E2F536F757263652F75 -S31508002C1041524D434D335F53544D33322F43726FF8 -S31508002C207373776F726B732F766563746F72732E17 -S31508002C3063000000004000080020000002000000B9 -S31508002C400060000800200000030000000080000863 -S31508002C50002000000400000000A00008002000007A -S31508002C600500000000C00008002000000600000063 -S31508002C7000E000080020000007000000000001082E -S31508002C8000200000080000000020010800200000C5 -S31508002C900900000000400108002000000A000000AA -S31508002CA000600108002000000B00000000800108F9 -S31508002CB0002000000C00000000A001080020000011 -S31508002CC00D00000000C00108002000000E000000F2 -S31508002CD000E00108002000000F000000443A2F75AC -S31508002CE073722F6665617365722F736F6674776189 -S31508002CF072652F4F70656E424C542F54617267652A -S31508002D00742F44656D6F2F41524D434D335F5354B5 -S31508002D104D33325F4F6C696D65785F53544D33326E -S31508002D20483130335F43726F7373776F726B732FEB -S31508002D30426F6F742F6964652F2E2E2F2E2E2F2E1D -S31508002D402E2F2E2E2F536F757263652F41524D43CA -S31508002D504D335F53544D33322F7573622E63000023 -S30D08002D604F70656E424C5400E9 -S31508002D681C0353004500520031003200330034007A -S31508002D783500360037003800390030002D170008AE -S31508002D8885100008851000088510000885100008B9 -S31508002D9885100008851000083917000885100008EE -S31508002DA88510000885100008851000088510000899 -S31508002DB885100008382B000820000000F5190008BF -S31508002DC82119000835180008391800083D180008A0 -S31508002DD8951800089D1800080D190008F918000824 -S31508002DE8C918000800000000400000008510000807 -S31508002DF809180008851000088510000885100008BD -S31508002E088510000885100008851000082518000890 -S31508002E184A2B000809000000F82A000812000000DA -S31508002E280C2B000804000000582B00081A000000A4 -S31508002E38102B000826000000000000201C000000D7 -S31108002E48742B00082C0000000301000099 +S3150800275892019201920192019201920192019201CB +S315080027689201920182005400360074009201920187 +S315080027789201B2009201CE00D300E70042783E2AC1 +S3150800278804D94FF02200FFF769FF57E140F21475A4 +S31508002798C2F2000505F10400A96CFFF77DF94FF0B0 +S315080027A8FF03EB706278AB6CD318AB64637803F1FC +S315080027B80103A5F8443041E143783E2B04D94FF08C +S315080027C82200FFF74BFF39E1416840F21475C2F25F +S315080027D80005A96405F104006278FFF75DF94FF072 +S315080027E8FF03EB706278AB6CD318AB64637803F1BC +S315080027F80103A5F8443021E140F21473C2F200033C +S315080028084FF0FF02DA7042689A644FF00102A3F8A3 +S31508002818442013E140F21473C2F200034FF0FF029A +S31508002828DA70996C43684FF000023BB14FF000022A +S3150800283811F8010B1218D2B2013BF9D140F2147300 +S31508002848C2F200034FF00001DA714FEA1220C0B253 +S3150800285818724FEA1240C0B258724FEA12629A7258 +S315080028684FF001021A71597199714FF00802A3F8CD +S315080028784420E3E040F21473C2F200034FF0FF026B +S31508002888DA7042F66C52C0F600029A644FF00002FB +S315080028981A715A719A714FF00701D9711A725A72D8 +S315080028A89A724FF00802A3F84420C7E04FF00000D8 +S315080028B8FFF7D4FEC2E040F21473C2F200034FF0E9 +S315080028C8FF02DA704FF000021A71597859719A7135 +S315080028D8DA711A724FF00602A3F84420AEE040F205 +S315080028E81474C2F200044FF000032370FFF7AEFE1B +S315080028F84FF0FF03E3704FF00103A4F844309DE05E +S3150800290840F21473C2F20003986C04F101024FF006 +S315080029183E01FFF7E1F820B94FF03100FFF79EFEB8 +S315080029288CE040F21473C2F200034FF0FF02DA702B +S315080029389A6C02F13E029A644FF00102A3F8442009 +S315080029487CE043783D2B04D94FF02200FFF786FE3A +S3150800295874E040F21473C2F200034FF0FF02DA7013 +S315080029684FF00102A3F84420417841B9FFF7C6F8A9 +S31508002978002863D14FF03100FFF770FE5EE040F2A1 +S315080029881473C2F20003986C04F10202FFF7A4F864 +S3150800299820B94FF03100FFF761FE4FE040F214739B +S315080029A8C2F2000361789A6C8A189A6446E040F283 +S315080029B81473C2F200034FF0FF02DA704FF00002F8 +S315080029C81A715A714FF03F019971DA711A725A726F +S315080029D84FF00702A3F8442030E040F21473C2F21D +S315080029E80003986C6168FFF77DF820B94FF031004D +S315080029F8FFF734FE22E040F21473C2F200034FF0E8 +S31508002A08FF02DA704FF00102A3F8442016E0FFF738 +S31508002A1857F840F21473C2F200034FF0FF02DA7057 +S31508002A284FF00102A3F8442008E04FF03100FFF701 +S31508002A3815FE03E04FF02000FFF710FE40F214736E +S31508002A48C2F2000393F84230012B03D14FF010006D +S31508002A58FFF704FE40F21473C2F200034FF00102B6 +S31508002A6883F8422003F10300B3F84410FFF7D4FDB6 +S31508002A7830BD00BF00B503B400F008F803BC02B4C3 +S31508002A88694609BE00F004F801BC00BD704700BFDE +S30908002A98704700BFB6 +S31508002A9C443A2F7573722F6665617365722F736F5F +S31508002AAC6674776172652F4F70656E424C542F545D +S31508002ABC61726765742F44656D6F2F41524D434D96 +S31508002ACC335F53544D33325F4F6C696D65785F5382 +S31508002ADC544D3332483130335F43726F7373776FAB +S31508002AEC726B732F426F6F742F6964652F2E2E2F9E +S31508002AFC6D61696E2E630000120110010000004022 +S31508002B0C4501230000010102030100000403090426 +S31508002B1C2603570069006E0055005300420020003A +S31508002B2C420075006C006B002000440065007600BE +S31508002B3C690063006500000009022000010100C05D +S31508002B4C320904000002FF00000407058102400058 +S31508002B5C00070501024000001A034F0070006500CB +S31508002B6C6E0042004C0054002000550073006500AE +S31508002B7C720000002C03570069006E0055005300C4 +S31508002B8C42002000420075006C006B0020004900D2 +S31508002B9C6E007400650072006600610063006500D3 +S31508002BAC443A2F7573722F6665617365722F736F4E +S31508002BBC6674776172652F4F70656E424C542F544C +S31508002BCC61726765742F44656D6F2F41524D434D85 +S31508002BDC335F53544D33325F4F6C696D65785F5371 +S31508002BEC544D3332483130335F43726F7373776F9A +S31508002BFC726B732F426F6F742F6964652F2E2E2F8D +S31508002C0C2E2E2F2E2E2F2E2E2F536F757263652F69 +S31508002C1C41524D434D335F53544D33322F43726FEC +S31508002C2C7373776F726B732F766563746F72732E0B +S31508002C3C63000000004000080020000002000000AD +S31508002C4C0060000800200000030000000080000857 +S31508002C5C002000000400000000A00008002000006E +S31508002C6C0500000000C00008002000000600000057 +S31508002C7C00E0000800200000070000000000010822 +S31508002C8C00200000080000000020010800200000B9 +S31508002C9C0900000000400108002000000A0000009E +S31508002CAC00600108002000000B00000000800108ED +S31508002CBC002000000C00000000A001080020000005 +S31508002CCC0D00000000C00108002000000E000000E6 +S31508002CDC00E00108002000000F000000443A2F75A0 +S31508002CEC73722F6665617365722F736F667477617D +S31508002CFC72652F4F70656E424C542F54617267651E +S31508002D0C742F44656D6F2F41524D434D335F5354A9 +S31508002D1C4D33325F4F6C696D65785F53544D333262 +S31508002D2C483130335F43726F7373776F726B732FDF +S31508002D3C426F6F742F6964652F2E2E2F2E2E2F2E11 +S31508002D4C2E2F2E2E2F536F757263652F41524D43BE +S31508002D5C4D335F53544D33322F7573622E63000017 +S30D08002D6C4F70656E424C5400DD +S31508002D741C0353004500520031003200330034006E +S31508002D843500360037003800390030002D170008A2 +S31508002D9485100008851000088510000885100008AD +S31508002DA485100008851000083917000885100008E2 +S31508002DB4851000088510000885100008851000088D +S31508002DC485100008442B000820000000F5190008A7 +S31508002DD42119000835180008391800083D18000894 +S31508002DE4951800089D1800080D190008F918000818 +S31508002DF4C9180008000000004000000085100008FB +S31508002E0409180008851000088510000885100008B0 +S31508002E148510000885100008851000082518000884 +S31508002E24562B000809000000042B000812000000B5 +S31508002E34182B000804000000642B00081A00000080 +S31508002E441C2B000826000000000000201C000000BF +S31108002E54802B00082C0000000301000081 S705080001DB16 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzp b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzp index 92294694..c94836b7 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzp +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzs b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzs index b26a3793..51095e78 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Boot/ide/stm32f103_crossworks.hzs @@ -24,10 +24,9 @@ - - + @@ -47,8 +46,8 @@ - + @@ -63,7 +62,8 @@ - + + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzp b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzp index 8b5dd6b8..261835db 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzp +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzs b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzs index 7b555706..12bfa91f 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_Crossworks/Prog/ide/stm32f103_crossworks.hzs @@ -56,7 +56,7 @@ - + - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.elf index 1eaf9455..26988716 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.map index 3920de8a..52028381 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.map @@ -7,47 +7,47 @@ start address 0x08000000 Program Header: LOAD off 0x00008000 vaddr 0x08000000 paddr 0x08000000 align 2**15 - filesz 0x00003778 memsz 0x00003778 flags r-x - LOAD off 0x00010000 vaddr 0x20000000 paddr 0x08003778 align 2**15 - filesz 0x00000104 memsz 0x00000874 flags rw- + filesz 0x00002a8c memsz 0x00002a8c flags r-x + LOAD off 0x00010000 vaddr 0x20000000 paddr 0x08002a8c align 2**15 + filesz 0x000000ec memsz 0x00000858 flags rw- private flags = 5000002: [Version5 EABI] [has entry point] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 00003778 08000000 08000000 00008000 2**2 + 0 .text 00002a8c 08000000 08000000 00008000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000104 20000000 08003778 00010000 2**2 + 1 .data 000000ec 20000000 08002a8c 00010000 2**2 CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000770 20000104 0800387c 00010104 2**2 + 2 .bss 0000076c 200000ec 08002b78 000100ec 2**2 ALLOC - 3 .debug_abbrev 00001e7f 00000000 00000000 00010104 2**0 + 3 .debug_abbrev 00001e8e 00000000 00000000 000100ec 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 000065c3 00000000 00000000 00011f83 2**0 + 4 .debug_info 000065b2 00000000 00000000 00011f7a 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 00002abf 00000000 00000000 00018546 2**0 + 5 .debug_line 00002abf 00000000 00000000 0001852c 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_pubnames 000011a7 00000000 00000000 0001b005 2**0 + 6 .debug_pubnames 000011a7 00000000 00000000 0001afeb 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_pubtypes 00000bdc 00000000 00000000 0001c1ac 2**0 + 7 .debug_pubtypes 00000bdc 00000000 00000000 0001c192 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_aranges 000008d0 00000000 00000000 0001cd88 2**0 + 8 .debug_aranges 000008d0 00000000 00000000 0001cd6e 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_ranges 00000798 00000000 00000000 0001d658 2**0 + 9 .debug_ranges 00000798 00000000 00000000 0001d63e 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_str 00001fe9 00000000 00000000 0001ddf0 2**0 + 10 .debug_str 00001fe9 00000000 00000000 0001ddd6 2**0 CONTENTS, READONLY, DEBUGGING - 11 .comment 0000002a 00000000 00000000 0001fdd9 2**0 + 11 .comment 0000002a 00000000 00000000 0001fdbf 2**0 CONTENTS, READONLY - 12 .ARM.attributes 00000031 00000000 00000000 0001fe03 2**0 + 12 .ARM.attributes 00000031 00000000 00000000 0001fde9 2**0 CONTENTS, READONLY - 13 .debug_frame 00001318 00000000 00000000 0001fe34 2**2 + 13 .debug_frame 00001318 00000000 00000000 0001fe1c 2**2 CONTENTS, READONLY, DEBUGGING - 14 .debug_loc 00002ce7 00000000 00000000 0002114c 2**0 + 14 .debug_loc 00002cc1 00000000 00000000 00021134 2**0 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 08000000 l d .text 00000000 .text 20000000 l d .data 00000000 .data -20000104 l d .bss 00000000 .bss +200000ec l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -63,19 +63,16 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 vectors.c 00000000 l df *ABS* 00000000 cstart.c 0800019e l F .text 00000000 zero_loop2 -080035b0 l F .text 00000000 zero_loop +080028c4 l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 hooks.c -20000104 l O .bss 00000001 initialized.2222 +200000ec l O .bss 00000001 initialized.2222 00000000 l df *ABS* 00000000 main.c 00000000 l df *ABS* 00000000 usb_endp.c 00000000 l df *ABS* 00000000 usb_prop.c -00000000 l df *ABS* 00000000 usb_desc.c 00000000 l df *ABS* 00000000 usb_istr.c 00000000 l df *ABS* 00000000 usb_pwr.c -00000000 l df *ABS* 00000000 core_cm3.c -00000000 l df *ABS* 00000000 system_stm32f10x.c 00000000 l df *ABS* 00000000 usb_core.c -08000c58 l F .text 000000ee DataStageIn +08000824 l F .text 000000ee DataStageIn 00000000 l df *ABS* 00000000 usb_init.c 00000000 l df *ABS* 00000000 usb_int.c 00000000 l df *ABS* 00000000 usb_mem.c @@ -83,278 +80,192 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 usb_sil.c 00000000 l df *ABS* 00000000 boot.c 00000000 l df *ABS* 00000000 com.c -2000010d l O .bss 00000001 comEntryStateConnect -20000110 l O .bss 00000040 xcpCtoReqPacket.1377 +200000f5 l O .bss 00000001 comEntryStateConnect +200000f8 l O .bss 00000040 xcpCtoReqPacket.1377 00000000 l df *ABS* 00000000 xcp.c -080025b4 l F .text 00000010 XcpProtectResources -080025c4 l F .text 0000001a XcpSetCtoError -08003678 l O .text 00000008 xcpStationId -20000150 l O .bss 0000004c xcpInfo +080019a0 l F .text 00000010 XcpProtectResources +080019b0 l F .text 0000001a XcpSetCtoError +0800298c l O .text 00000008 xcpStationId +20000138 l O .bss 0000004c xcpInfo 00000000 l df *ABS* 00000000 backdoor.c 00000000 l df *ABS* 00000000 cop.c 00000000 l df *ABS* 00000000 assert.c -2000019c l O .bss 00000004 assert_failure_file -200001a0 l O .bss 00000004 assert_failure_line +20000184 l O .bss 00000004 assert_failure_file +20000188 l O .bss 00000004 assert_failure_line 00000000 l df *ABS* 00000000 cpu.c +00000000 l df *ABS* 00000000 usb.c +08001e44 l F .text 0000003c IntToUnicode +08001e80 l F .text 0000003c UsbFifoMgrCreate +08001ebc l F .text 00000084 UsbFifoMgrWrite +08001f40 l F .text 00000014 UsbTransmitByte +08001f54 l F .text 0000007e UsbFifoMgrRead +08001fd4 l F .text 00000014 UsbReceiveByte +2000018c l O .bss 00000001 xcpCtoRxInProgress.2703 +20000190 l O .bss 00000004 fifoCtrlFree +20000194 l O .bss 00000030 fifoCtrl +200001c4 l O .bss 00000041 fifoPipeBulkOUT +20000208 l O .bss 00000040 USB_Rx_Buffer.2733 +20000248 l O .bss 00000041 fifoPipeBulkIN +2000028c l O .bss 00000040 xcpCtoReqPacket.2701 +200002cc l O .bss 00000040 USB_Tx_Buffer.2722 +2000030c l O .bss 00000001 xcpCtoRxLength.2702 +00000000 l df *ABS* 00000000 nvm.c +00000000 l df *ABS* 00000000 flash.c +0800230c l F .text 00000024 FlashUnlock +08002330 l F .text 00000012 FlashLock +08002344 l F .text 0000004c FlashGetSector +08002390 l F .text 000000c2 FlashWriteBlock +08002454 l F .text 0000003e FlashGetSectorBaseAddr +08002494 l F .text 00000030 FlashInitBlock +080024c4 l F .text 00000050 FlashSwitchBlock +08002514 l F .text 0000009a FlashAddToBlock +080029b8 l O .text 000000a8 flashLayout +20000310 l O .bss 00000204 bootBlockInfo +20000514 l O .bss 00000204 blockInfo +00000000 l df *ABS* 00000000 usb_desc.c +00000000 l df *ABS* 00000000 core_cm3.c +00000000 l df *ABS* 00000000 system_stm32f10x.c 00000000 l df *ABS* 00000000 can.c 00000000 l df *ABS* 00000000 uart.c -00000000 l df *ABS* 00000000 usb.c -08002a6c l F .text 0000003c IntToUnicode -08002aa8 l F .text 0000003c UsbFifoMgrCreate -08002ae4 l F .text 00000084 UsbFifoMgrWrite -08002b68 l F .text 00000014 UsbTransmitByte -08002b7c l F .text 0000007e UsbFifoMgrRead -08002bfc l F .text 00000014 UsbReceiveByte -200001a4 l O .bss 00000001 xcpCtoRxInProgress.2703 -200001a8 l O .bss 00000004 fifoCtrlFree -200001ac l O .bss 00000030 fifoCtrl -200001dc l O .bss 00000041 fifoPipeBulkOUT -20000220 l O .bss 00000040 USB_Rx_Buffer.2733 -20000260 l O .bss 00000041 fifoPipeBulkIN -200002a4 l O .bss 00000040 xcpCtoReqPacket.2701 -200002e4 l O .bss 00000040 USB_Tx_Buffer.2722 -20000324 l O .bss 00000001 xcpCtoRxLength.2702 -00000000 l df *ABS* 00000000 nvm.c 00000000 l df *ABS* 00000000 timer.c -20000326 l O .bss 00000002 millisecond_counter -00000000 l df *ABS* 00000000 flash.c -08003000 l F .text 00000024 FlashUnlock -08003024 l F .text 00000012 FlashLock -08003038 l F .text 0000004c FlashGetSector -08003084 l F .text 000000c2 FlashWriteBlock -08003148 l F .text 0000003e FlashGetSectorBaseAddr -08003188 l F .text 00000030 FlashInitBlock -080031b8 l F .text 00000050 FlashSwitchBlock -08003208 l F .text 0000009a FlashAddToBlock -080036a4 l O .text 000000a8 flashLayout -20000328 l O .bss 00000204 bootBlockInfo -2000052c l O .bss 00000204 blockInfo -08002514 g F .text 00000034 ComInit -2000076e g O .bss 00000002 SaveRState -08001c98 g F .text 00000026 SetEPRxValid -080032c0 g F .text 00000058 FlashWrite -08000878 g F .text 00000006 __set_PRIMASK -08002058 g F .text 0000002a GetEPRxCount -08001ad4 g F .text 0000000c SetISTR -080029fc g F .text 0000001c AssertFailure -080003c8 g F .text 00000016 SOF_Callback -0800356c g F .text 00000054 reset_handler -08002f90 g F .text 00000022 TimerUpdate -08002614 g F .text 00000012 XcpPacketTransmitted -08000f34 g F .text 000000b2 Standard_SetEndPointFeature -08001690 g F .text 00000044 USB_Init -0800246c g F .text 0000000c ByteSwap -08002548 g F .text 00000020 ComTask -08001ae0 g F .text 0000000e GetISTR -08002580 g F .text 00000010 ComSetConnectEntryState -08001d74 g F .text 00000022 ClearEPDoubleBuff -08001f3c g F .text 00000020 GetEPTxAddr -08000880 g F .text 00000006 __get_FAULTMASK -080008a0 g F .text 00000004 __REV -080005b8 g F .text 0000002a Bulk_Init -080024f0 g F .text 00000014 BootInit -08001fa4 g F .text 00000034 SetEPCountRxReg -080029d8 g F .text 00000018 BackDoorInit -08001f80 g F .text 00000022 SetEPTxCount -2000073c g O .bss 00000002 SaveState -080008dc g F .text 00000006 __STREXW +08001918 g F .text 00000034 ComInit +20000752 g O .bss 00000002 SaveRState +080016bc g F .text 00000026 SetEPRxValid +080025cc g F .text 00000058 FlashWrite +08001870 g F .text 0000002a GetEPRxCount +08001dd4 g F .text 0000001c AssertFailure +080003c0 g F .text 00000016 SOF_Callback +08002880 g F .text 00000054 reset_handler +080019ec g F .text 00000012 XcpPacketTransmitted +08000b00 g F .text 000000b2 Standard_SetEndPointFeature +0800125c g F .text 00000044 USB_Init +0800189c g F .text 0000000c ByteSwap +0800194c g F .text 00000020 ComTask +08001984 g F .text 00000010 ComSetConnectEntryState +080017b4 g F .text 00000020 GetEPTxAddr +080005b0 g F .text 0000002a Bulk_Init +080018f4 g F .text 00000014 BootInit +08001db0 g F .text 00000018 BackDoorInit +080017f8 g F .text 00000022 SetEPTxCount +20000720 g O .bss 00000002 SaveState 20000064 g O .data 00000008 Device_Descriptor -080008c4 g F .text 00000006 __LDREXW -080029f8 g F .text 00000002 CopService -08003778 g .text 00000000 _etext -08000474 g F .text 00000012 Bulk_Get_Interface_Setting -08001ab8 g F .text 0000000c SetCNTR -08001b94 g F .text 0000003a SetEPTxStatus +08001dd0 g F .text 00000002 CopService +08002a8c g .text 00000000 _etext +0800046c g F .text 00000012 Bulk_Get_Interface_Setting +0800161c g F .text 0000003a SetEPTxStatus 200000d0 g O .data 0000001c pEpInt_OUT -0800238c g F .text 0000002a GetEPDblBuf1Count -08000fe8 g F .text 00000028 Standard_SetDeviceFeature -08001e0c g F .text 00000022 ToggleDTOG_RX -08001c0c g F .text 0000003a SetDouBleBuffEPStall -08002464 g F .text 00000006 ToWord -08002084 g F .text 0000004c SetEPDblBuffAddr -080003c0 g F .text 00000008 EP1_OUT_Callback -08002f80 g F .text 00000010 TimerReset -08000df8 g F .text 0000013a Standard_ClearFeature -080024cc g F .text 00000024 USB_SIL_Read -08002144 g F .text 00000022 GetEPDblBuf1Addr -0800040c g F .text 00000002 Bulk_Status_In -08000224 g F .text 00000002 UsbLeaveLowPowerModeHook -20000100 g O .data 00000004 SystemCoreClock -08002dac g F .text 00000016 UsbEnterLowPowerMode -080008ac g F .text 00000006 __RBIT -08002168 g F .text 00000100 SetEPDblBuffCount -080011c8 g F .text 000003f2 Setup0_Process -08002504 g F .text 00000010 BootTask -08001b0c g F .text 0000000e GetDADDR -080034b4 g F .text 00000054 FlashWriteChecksum -08001df0 g F .text 0000001a ClearEP_CTR_TX -08000888 g F .text 00000006 __set_FAULTMASK -08002570 g F .text 0000000e ComTransmitPacket -08002f08 g F .text 00000044 UsbGetSerialNum -08001ce4 g F .text 00000022 ClearEP_KIND -08003610 g O .text 00000020 Bulk_ConfigDescriptor -08000410 g F .text 00000002 Bulk_Status_Out -20000730 g O .bss 00000002 wIstr -20000740 g O .bss 00000004 pProperty -08000d48 g F .text 0000004c Standard_SetConfiguration -08001eac g F .text 00000026 SetEPAddress +08000bb4 g F .text 00000028 Standard_SetDeviceFeature +080003b8 g F .text 00000008 EP1_OUT_Callback +080009c4 g F .text 0000013a Standard_ClearFeature +080018d0 g F .text 00000024 USB_SIL_Read +08000404 g F .text 00000002 Bulk_Status_In +08000d94 g F .text 000003f2 Setup0_Process +08001908 g F .text 00000010 BootTask +08002758 g F .text 0000005c FlashWriteChecksum +08001974 g F .text 0000000e ComTransmitPacket +08002294 g F .text 00000044 UsbGetSerialNum +08002924 g O .text 00000020 Bulk_ConfigDescriptor +08000408 g F .text 00000002 Bulk_Status_Out +20000718 g O .bss 00000002 wIstr +20000724 g O .bss 00000004 pProperty +08000914 g F .text 0000004c Standard_SetConfiguration 200000b4 g O .data 0000001c pEpInt_IN -08000890 g F .text 00000006 __get_CONTROL -08002124 g F .text 00000020 GetEPDblBuf0Addr -20000744 g O .bss 00000001 EPindex +20000728 g O .bss 00000001 EPindex 20000008 g O .data 00000030 Device_Property -08003630 g O .text 0000001a Bulk_StringVendor -08002600 g F .text 00000012 XcpIsConnected -08000220 g F .text 00000002 UsbEnterLowPowerModeHook -080022e4 g F .text 0000007c SetEPDblBuf1Count -08000b5c g F .text 000000fc Standard_GetStatus -08002f4c g F .text 00000008 NvmInit -080035d0 g O .text 00000012 Bulk_DeviceDescriptor -080032a4 g F .text 0000001a FlashInit -080020f8 g F .text 0000002a SetEPDblBuf1Addr +08002944 g O .text 0000001a Bulk_StringVendor +08000728 g F .text 000000fc Standard_GetStatus +080022d8 g F .text 00000008 NvmInit +080028e4 g O .text 00000012 Bulk_DeviceDescriptor +080025b0 g F .text 0000001a FlashInit 2000006c g O .data 00000028 String_Descriptor -08001e54 g F .text 0000002a ClearDTOG_RX -08000840 g F .text 00000008 __get_PSP -20000772 g .bss 00000000 _ebss -0800168c g F .text 00000002 NOP_Process -08000848 g F .text 00000006 __set_PSP -08001ac4 g F .text 0000000e GetCNTR -08000d94 g F .text 00000064 Standard_SetInterface -08001fd8 g F .text 00000052 SetEPRxCount +08001708 g F .text 0000002a ClearDTOG_RX +20000756 g .bss 00000000 _ebss +08001258 g F .text 00000002 NOP_Process +08000960 g F .text 00000064 Standard_SetInterface +0800181c g F .text 00000052 SetEPRxCount 00000100 g *ABS* 00000000 __STACKSIZE__ -08003558 g F .text 00000014 UnusedISR -08000254 g F .text 00000016 BackDoorEntryHook -08002478 g F .text 00000028 USB_SIL_Init -08002568 g F .text 00000008 ComFree -08001b00 g F .text 0000000c SetDADDR -0800068c g F .text 0000003a PowerOn +0800286c g F .text 00000014 UnusedISR +0800024c g F .text 00000016 BackDoorEntryHook +080018a8 g F .text 00000028 USB_SIL_Init +0800196c g F .text 00000008 ComFree +08000684 g F .text 0000003a PowerOn 20000098 g O .data 0000001c Bulk_StringSerial -080016d4 g F .text 000002f2 CTR_LP -20000770 g O .bss 00000002 SaveTState -08001c48 g F .text 00000014 GetEPTxStatus -080008b4 g F .text 00000008 __LDREXB -08001b1c g F .text 00000014 SetBTABLE -08002ea8 g F .text 00000060 UsbReceivePipeBulkOUT -08002f5c g F .text 00000008 NvmErase +080012a0 g F .text 000002f2 CTR_LP +20000754 g O .bss 00000002 SaveTState +080015ec g F .text 00000014 SetBTABLE +08002234 g F .text 00000060 UsbReceivePipeBulkOUT +080022e8 g F .text 00000008 NvmErase 20000038 g O .data 00000024 User_Standard_Requests -200000ec g O .data 00000001 fSuspendEnabled -080004e4 g F .text 000000d4 Bulk_Reset -080006f8 g F .text 00000024 Suspend -20000748 g O .bss 0000001c Device_Info -08001af0 g F .text 0000000e GetFNR -20000104 g .bss 00000000 _bss -08000870 g F .text 00000006 __get_PRIMASK -080003fc g F .text 00000010 Bulk_SetDeviceAddress -08000af4 g F .text 00000034 Standard_GetConfiguration -08002628 g F .text 000003ae XcpPacketReceived -200000f0 g O .data 00000010 AHBPrescTable -20000764 g O .bss 00000004 pUser_Standard_Requests -080020d0 g F .text 00000028 SetEPDblBuf0Addr -080024a0 g F .text 0000002a USB_SIL_Write -08001dd4 g F .text 0000001a ClearEP_CTR_RX -0800202c g F .text 0000002a GetEPTxCount -08003508 g F .text 00000050 FlashDone -08002360 g F .text 0000002a GetEPDblBuf0Count -08002590 g F .text 00000010 ComSetDisconnectEntryState -080008a8 g F .text 00000004 __REVSH +080004dc g F .text 000000d4 Bulk_Reset +2000072c g O .bss 0000001c Device_Info +200000ec g .bss 00000000 _bss +080003f4 g F .text 00000010 Bulk_SetDeviceAddress +080006c0 g F .text 00000034 Standard_GetConfiguration +08001a00 g F .text 000003ae XcpPacketReceived +20000748 g O .bss 00000004 pUser_Standard_Requests +0800281c g F .text 00000050 FlashDone 08000150 g F .text 00000062 EntryFromProg -080015bc g F .text 0000004e SetDeviceAddress -08001a94 g F .text 00000022 PMAToUserBufferCopy -080025a0 g F .text 0000000c ComIsConnectEntryState -08001f10 g F .text 0000002a SetEPRxAddr -20000105 g O .bss 00000001 bIntPackSOF -08001ed4 g F .text 00000014 GetEPAddress -08002c90 g F .text 0000006e UsbTransmitPacket -08001db4 g F .text 0000001e GetRxStallStatus -08001b40 g F .text 00000010 SetENDPOINT -0800160c g F .text 00000080 In0_Process -0800071c g F .text 00000022 Resume_Init +08001188 g F .text 0000004e SetDeviceAddress +080015c8 g F .text 00000022 PMAToUserBufferCopy +08001994 g F .text 0000000c ComIsConnectEntryState +08001788 g F .text 0000002a SetEPRxAddr +200000ed g O .bss 00000001 bIntPackSOF +08002068 g F .text 0000006e UsbTransmitPacket +080011d8 g F .text 00000080 In0_Process 080001c8 g F .text 00000058 UsbConnectHook -08000414 g F .text 00000056 Bulk_Data_Setup -20000738 g O .bss 00000002 StatusInfo -20000768 g O .bss 00000004 pInformation -08001b64 g F .text 0000001c SetEPType -080025e0 g F .text 0000001e XcpInit -08001c5c g F .text 00000014 GetEPRxStatus -20000734 g O .bss 00000002 ResumeS -08002c10 g F .text 00000074 UsbInit -08002c84 g F .text 0000000c UsbFree -08003318 g F .text 00000134 FlashErase -0800026c g F .text 0000014c main -08001cc0 g F .text 00000022 SetEP_KIND -08000b28 g F .text 00000034 Standard_GetInterface -08000898 g F .text 00000006 __set_CONTROL -08002f6c g F .text 00000014 NvmDone -08002f64 g F .text 00000008 NvmVerifyChecksum -08002a40 g F .text 00000022 CpuMemCopy -08001b80 g F .text 00000014 GetEPType -08002fb4 g F .text 0000000c TimerSet -08001b30 g F .text 0000000e GetBTABLE -08000850 g F .text 00000008 __get_MSP +0800040c g F .text 00000056 Bulk_Data_Setup +2000071c g O .bss 00000002 StatusInfo +2000074c g O .bss 00000004 pInformation +08001600 g F .text 0000001c SetEPType +080019cc g F .text 0000001e XcpInit +08001fe8 g F .text 00000074 UsbInit +0800205c g F .text 0000000c UsbFree +08002624 g F .text 00000134 FlashErase +08000264 g F .text 0000014c main +080006f4 g F .text 00000034 Standard_GetInterface +080022f8 g F .text 00000014 NvmDone +080022f0 g F .text 00000008 NvmVerifyChecksum +08001e18 g F .text 00000022 CpuMemCopy 2000005c g O .data 00000008 Bulk_Descriptor -080008e4 g F .text 00000130 SystemInit -080019c8 g F .text 00000098 CTR_HP -0800046c g F .text 00000006 Bulk_NoData_Setup -08001e30 g F .text 00000022 ToggleDTOG_TX -080004d4 g F .text 00000010 Bulk_GetDeviceDescriptor -08002dc4 g F .text 00000032 UsbLeaveLowPowerMode -080008a4 g F .text 00000004 __REV16 -08001010 g F .text 0000001c Standard_GetDescriptorData -08001b50 g F .text 00000012 GetENDPOINT -080035e8 g O .text 00000026 Bulk_StringProduct -08001078 g F .text 00000150 Out0_Process +08000464 g F .text 00000006 Bulk_NoData_Setup +080004cc g F .text 00000010 Bulk_GetDeviceDescriptor +08000bdc g F .text 0000001c Standard_GetDescriptorData +080028fc g O .text 00000026 Bulk_StringProduct +08000c44 g F .text 00000150 Out0_Process 20000000 g .data 00000000 _data -08000858 g F .text 00000006 __set_MSP -080035e4 g O .text 00000004 Bulk_StringLangID -080029f4 g F .text 00000002 CopInit -08001d2c g F .text 00000022 Set_Status_Out -080003b8 g F .text 00000008 EP1_IN_Callback -08002a64 g F .text 00000008 CpuReset -08001c70 g F .text 00000026 SetEPTxValid -08000498 g F .text 0000002a Bulk_GetStringDescriptor -08002f54 g F .text 00000008 NvmWrite -08002a18 g F .text 00000028 CpuStartUserProgram -080023b8 g F .text 0000005e GetEPDblBufDir -20000874 g .bss 00000000 _estack -08002d00 g F .text 000000ac UsbReceivePacket -0800344c g F .text 00000068 FlashVerifyChecksum -08000868 g F .text 00000006 __set_BASEPRI -2000010c g O .bss 00000001 Data_Mul_MaxPacketSize -20000104 g .data 00000000 _edata -08000488 g F .text 00000010 Bulk_GetBulkDescriptor -0800102c g F .text 0000004c Post0_Process -080006c8 g F .text 0000002e PowerOff +080028f8 g O .text 00000004 Bulk_StringLangID +08001dcc g F .text 00000002 CopInit +080003b0 g F .text 00000008 EP1_IN_Callback +08001e3c g F .text 00000008 CpuReset +08001694 g F .text 00000026 SetEPTxValid +08000490 g F .text 0000002a Bulk_GetStringDescriptor +080022e0 g F .text 00000008 NvmWrite +08001df0 g F .text 00000028 CpuStartUserProgram +20000858 g .bss 00000000 _estack +080020d8 g F .text 000000ac UsbReceivePacket +080027b4 g F .text 00000068 FlashVerifyChecksum +200000f4 g O .bss 00000001 Data_Mul_MaxPacketSize +200000ec g .data 00000000 _edata +08000480 g F .text 00000010 Bulk_GetBulkDescriptor +08000bf8 g F .text 0000004c Post0_Process 08000000 g O .text 00000150 _vectab -080005e4 g F .text 000000a8 USB_Istr -08001bd0 g F .text 0000003a SetEPRxStatus -08002268 g F .text 0000007c SetEPDblBuf0Count -08002418 g F .text 0000004c FreeUserBuffer -080008d4 g F .text 00000006 __STREXH -08000a14 g F .text 000000e0 SystemCoreClockUpdate -08001e80 g F .text 0000002a ClearDTOG_TX -08001ee8 g F .text 00000028 SetEPTxAddr -080008bc g F .text 00000008 __LDREXH -080025ac g F .text 00000008 ComIsConnected +080005dc g F .text 000000a8 USB_Istr +08001658 g F .text 0000003a SetEPRxStatus +08001734 g F .text 0000002a ClearDTOG_TX +08001760 g F .text 00000028 SetEPTxAddr 20000000 g O .data 00000008 Config_Descriptor -08001d08 g F .text 00000022 Clear_Status_Out -08001a60 g F .text 00000032 UserToPMABufferCopy -08001d50 g F .text 00000022 SetEPDoubleBuff -08000860 g F .text 00000006 __get_BASEPRI -080029f0 g F .text 00000002 BackDoorCheck -20000772 g .bss 00000000 _stack -080003e0 g F .text 0000001c Bulk_SetConfiguration -20000108 g O .bss 00000004 bDeviceState -08002fec g F .text 00000012 TimerGet -08000740 g F .text 00000100 Resume +080016e4 g F .text 00000022 Clear_Status_Out +08001594 g F .text 00000032 UserToPMABufferCopy +08001dc8 g F .text 00000002 BackDoorCheck +20000756 g .bss 00000000 _stack +080003d8 g F .text 0000001c Bulk_SetConfiguration +200000f0 g O .bss 00000004 bDeviceState 20000094 g O .data 00000002 Device_Table -080008cc g F .text 00000006 __STREXB -08002df8 g F .text 000000b0 UsbTransmitPipeBulkIN -08000228 g F .text 0000002a BackDoorInitHook -080004c4 g F .text 00000010 Bulk_GetConfigDescriptor -0800364c g O .text 0000002c Bulk_StringInterface -08002fc0 g F .text 0000002a TimerInit -2000076c g O .bss 00000002 wInterrupt_Mask -08001f5c g F .text 00000022 GetEPRxAddr -08001d98 g F .text 0000001c GetTxStallStatus +08002184 g F .text 000000b0 UsbTransmitPipeBulkIN +08000220 g F .text 0000002a BackDoorInitHook +080004bc g F .text 00000010 Bulk_GetConfigDescriptor +08002960 g O .text 0000002c Bulk_StringInterface +20000750 g O .bss 00000002 wInterrupt_Mask +080017d4 g F .text 00000022 GetEPRxAddr diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.srec index a50f45b8..ff49f486 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/bin/openbtl_olimex_stm32h103.srec @@ -1,907 +1,698 @@ S024000062696E2F6F70656E62746C5F6F6C696D65785F73746D3332683130332E73726563A3 -S31508000000740800206D350008593500085935000870 -S31508000010593500085935000859350008593500087A -S31508000020593500085935000859350008593500086A -S31508000030593500085935000859350008593500085A -S31508000040593500085935000859350008593500084A -S31508000050593500085935000859350008593500083A -S31508000060593500085935000859350008593500082A -S31508000070593500085935000859350008593500081A -S31508000080593500085935000859350008593500080A -S3150800009059350008593500085935000859350008FA -S315080000A059350008593500085935000859350008EA -S315080000B059350008593500085935000859350008DA -S315080000C059350008593500085935000859350008CA -S315080000D059350008593500085935000859350008BA -S315080000E059350008593500085935000859350008AA -S315080000F0593500085935000859350008593500089A -S315080001005935000859350008593500085935000889 -S315080001105935000859350008593500085935000879 -S315080001205935000859350008593500085935000869 -S315080001305935000859350008593500085935000859 -S315080001405935000859350008593500085935000849 +S3150800000058080020812800086D2800086D28000877 +S315080000106D2800086D2800086D2800086D2800085E +S315080000206D2800086D2800086D2800086D2800084E +S315080000306D2800086D2800086D2800086D2800083E +S315080000406D2800086D2800086D2800086D2800082E +S315080000506D2800086D2800086D2800086D2800081E +S315080000606D2800086D2800086D2800086D2800080E +S315080000706D2800086D2800086D2800086D280008FE +S315080000806D2800086D2800086D2800086D280008EE +S315080000906D2800086D2800086D2800086D280008DE +S315080000A06D2800086D2800086D2800086D280008CE +S315080000B06D2800086D2800086D2800086D280008BE +S315080000C06D2800086D2800086D2800086D280008AE +S315080000D06D2800086D2800086D2800086D2800089E +S315080000E06D2800086D2800086D2800086D2800088E +S315080000F06D2800086D2800086D2800086D2800087E +S315080001006D2800086D2800086D2800086D2800086D +S315080001106D2800086D2800086D2800086D2800085D +S315080001206D2800086D2800086D2800086D2800084D +S315080001306D2800086D2800086D2800086D2800083D +S315080001406D2800086D2800086D2800086D2800082D S3150800015008B572B617481849016018498D4640F225 -S315080001600002C2F2000240F20413C2F200039A42ED -S3150800017011D243F27872C0F6000240F20003C2F2CE -S31508000180000340F20410C2F2000052F8041B43F8C0 +S315080001600002C2F2000240F2EC03C2F200039A4215 +S3150800017011D242F68C22C0F6000240F20003C2F207 +S31508000180000340F2EC00C2F2000052F8041B43F8E8 S31508000190041B8342F9D30A480A494FF000028842F1 -S315080001A0B8BF40F8042BFADB02F0EAF900F05EF873 -S315080001B008BD000008ED00E00000000874080020F3 -S315080001C0040100207207002040F20413C2F2000363 +S315080001A0B8BF40F8042BFADB01F0ECFB00F05AF874 +S315080001B008BD000008ED00E000000008580800200F +S315080001C0EC0000205607002040F2EC03C2F20003C0 S315080001D01B78D3B94FF48053C4F202039A6942F0EC S315080001E010029A614FF48053C4F201035A6822F44C -S315080001F070425A605A6842F4E0425A6040F2041368 +S315080001F070425A605A6842F4E0425A6040F2EC0390 S31508000200C2F200034FF001021A7001284FF480531E S31508000210C4F201034FF400620CBF5A611A617047B9 -S31508000220704700BF704700BF4FF48053C4F2020303 -S315080002309A6942F004029A614FF40063C4F201031A -S315080002401A6822F00F021A601A6842F004021A604D -S31508000250704700BF4FF40063C4F201039B6813F0B4 -S31508000260010F14BF00200120704700BF00B583B0FE -S315080002704FF00003019300934FF48053C4F2020336 -S315080002801A6842F001021A6059684FF00002CFF668 -S31508000290FF0201EA02025A601A6822F0847222F406 -S315080002A080321A601A6822F480221A605A6822F488 -S315080002B0FE025A604FF41F029A601A6842F48032AE -S315080002C01A604FF48053C4F2020340F2DC521968F4 -S315080002D001F400310091019901F1010101910099A0 -S315080002E011B901999142F2D14FF48053C4F2020335 -S315080002F01B6813F4003F07D143F2C850C0F600004C -S315080003004FF06F0102F07AFB4FF40053C4F2020378 -S315080003101A6842F010021A601A6822F003021A607C -S315080003201A6842F002021A604FF48053C4F20203BC -S315080003305A685A605A6842F400525A605A6842F437 -S3150800034080625A605A6822F47C125A605A6842F4EB -S31508000350E8125A601A6842F080721A604FF48053A5 -S31508000360C4F202031A6812F0007FFBD04FF48053E0 -S31508000370C4F202035A6822F003025A605A6842F02D -S3150800038002025A604FF48053C4F202035A6802F01C -S315080003900C02082AFAD14FF48053C4F202035A68B1 -S315080003A022F480025A60DA6942F40002DA6102F045 -S315080003B09FF802F0A7F8FCE708B502F01DFD08BD96 -S315080003C008B502F071FD08BD08B540F20813C2F27F -S315080003D000031B68052B01D102F00EFD08BD00BF06 -S315080003E040F24873C2F200039B7A33B140F2081315 -S315080003F0C2F200034FF005021A60704740F2081374 -S31508000400C2F200034FF004021A607047704700BF3B -S31508000410704700BF10B506281BD140F26873C2F2B8 -S3150800042000031B681A7802F07F02012A14D15A7950 -S31508000430AAB99A78212A15D140F28942C0F6000253 -S315080004409A614FF000045C82204600F01DF82046B1 -S3150800045010BD4FF0020010BD4FF0020010BD4FF066 -S31508000460020010BD4FF0020010BD00BF4FF00200A1 -S31508000470704700BF21B9002814BF0220002070472A -S315080004804FF00200704700BF08B540F25C01C2F2A7 -S31508000490000100F0BDFD08BD08B540F26873C2F260 -S315080004A000031B68DB78052B08D840F26C01C2F202 -S315080004B0000101EBC30100F0ABFD08BD4FF00000E1 -S315080004C008BD00BF08B540F20001C2F2000100F005 -S315080004D09FFD08BD08B540F26401C2F2000100F0B4 -S315080004E097FD08BD10B540F26873C2F200031B6899 -S315080004F04FF000049C7243F21062C0F60002D279F3 -S315080005005A72DC72204601F009FB20464FF400714E -S3150800051001F028FB20464FF0100101F03BFB204676 -S315080005204FF0400101F0F4FC20464FF0800101F045 -S31508000530DBFC204601F0E8FB40F20803C2F20003A8 -S31508000540204693F82C1001F047FD204601F0A4FB45 -S315080005504FF00100214601F005FB4FF001004FF472 -S31508000560807101F0C1FC4FF001004FF0C00101F0AD -S31508000570CFFC4FF001004FF0400101F001FD4FF0B4 -S3150800058001004FF0400101F027FD4FF001004FF444 -S31508000590405101F01DFB4FF001004FF0200101F022 -S315080005A0F9FA204601F00AF840F20813C2F20003ED -S315080005B04FF001021A6010BD10B502F0A5FC40F21A -S315080005C06873C2F200031B684FF000049C7200F0C7 -S315080005D05DF801F051FF40F20813C2F200031C60F7 -S315080005E010BD00BF08B545F64443C4F200031A68B7 -S315080005F092B240F23073C2F200031A801A8840F2AF -S315080006006C73C2F200031B88134013F4007F11D0E9 -S3150800061045F64443C4F200034FF6FF521A6040F20F -S315080006200513C2F200031A7802F10102D2B21A7057 -S31508000630FFF7CAFE40F23073C2F200031A8840F28E -S315080006406C73C2F200031B88134013F4004F01D0E9 -S3150800065001F040F840F23073C2F200031A8840F203 -S315080006606C73C2F200031B88134013F4806F0CD01E -S3150800067045F64443C4F200034FF6FF321A6040F2CF -S315080006800803C2F200035B68984708BD08B54FF037 -S315080006900100FFF799FD45F64043C4F200034FF009 -S315080006A001021A6040F26C72C2F200024FF00000BA -S315080006B0186045F64441C4F2000108604FF4E05161 -S315080006C01180196008BD00BF38B545F64045C4F22B -S315080006D000054FF001032B6045F64443C4F20003BE -S315080006E04FF000041C602046FFF76EFD4FF0030331 -S315080006F02B60204638BD00BF08B545F64043C4F216 -S3150800070000031A6892B242F008021A601A6892B296 -S3150800071042F004021A6002F049FB08BD10B545F61E -S315080007204044C4F2000422684FF6FB7302EA03034E -S31508000730236002F047FB4FF40643236010BD00BF59 -S3150800074008B507281EBF40F23473C2F200031870BA -S3150800075040F23473C2F200031B78052B68D8DFE831 -S3150800076003F0030D1722364AFFF7D8FF40F2347319 -S31508000770C2F200034FF006021A7008BDFFF7CEFF5B -S3150800078040F23473C2F200034FF004021A7008BD37 -S3150800079040F23473C2F200034FF002025A704FF06F -S315080007A003021A7008BD40F23473C2F200035A7885 -S315080007B002F1FF32D2B25A705B78002B3FD140F279 -S315080007C03473C2F200034FF004021A7008BD45F6EE -S315080007D04043C4F200031A6892B242F010021A604B -S315080007E040F23473C2F200034FF005021A704FF05C -S315080007F00A025A7008BD40F23473C2F200035A78EE -S3150800080002F1FF32D2B25A705B78C3B945F640435B -S31508000810C4F2000319684FF6EF7201EA02021A6081 -S3150800082040F23473C2F200034FF006021A7008BD94 -S3150800083040F23473C2F200034FF006021A7008BD84 -S31508000840EFF309800046704780F30988704700BFB8 -S31508000850EFF308800046704780F30888704700BFAA -S31508000860EFF31280704700BF80F31188704700BF0E -S31508000870EFF31080704700BF80F31088704700BF01 -S31508000880EFF31380704700BF80F31388704700BFEB -S31508000890EFF31480704700BF80F31488704700BFD9 -S315080008A000BA704740BA7047C0BA704790FAA0F0CD -S315080008B0704700BFD0E84F0FC0B27047D0E85F0F4F -S315080008C080B2704750E8000F704700BFC1E8400F7C -S315080008D0704700BFC1E8500F704700BF41E80000ED -S315080008E0704700BF82B04FF48053C4F202031A68FF -S315080008F042F001021A6059684FF00002CFF6FF0273 -S3150800090001EA02025A601A6822F0847222F48032DE -S315080009101A601A6822F480221A605A6822F4FE02C3 -S315080009205A604FF41F029A604FF00002019200923B -S315080009301A6842F480321A604FF48052C4F20202F6 -S31508000940136803F400330093019B03F10103019339 -S31508000950009B1BB9019BB3F5A06FF1D14FF48053EF -S31508000960C4F202031B6813F4003F14BF01230023DB -S315080009700093009B012B44D14FF40053C4F20203A9 -S315080009801A6842F010021A601A6822F003021A6006 -S315080009901A6842F002021A604FF48053C4F2020346 -S315080009A05A685A605A685A605A6842F480625A60AD -S315080009B05A6822F47C125A605A6842F4E8125A605D -S315080009C01A6842F080721A604FF48052C4F202022A -S315080009D0136813F0007FFBD04FF48053C4F2020370 -S315080009E05A6822F003025A605A6842F002025A60B4 -S315080009F04FF48052C4F20202536803F00C03082B2A -S31508000A00FAD14FF46D43CEF200034FF000629A60BC -S31508000A1002B070474FF48053C4F202035B6803F0D8 -S31508000A200C03042B0DD0082B15D0002B44D140F213 -S31508000A300013C2F200034FF49052C0F27A021A6011 -S31508000A4043E040F20013C2F200034FF49052C0F2A2 -S31508000A507A021A6039E04FF48053C4F202035A68E6 -S31508000A605B68C2F3834202F1020213F4803F0BD1A2 -S31508000A7040F20013C2F200034FF41061C0F23D01C8 -S31508000A8001FB02F21A6020E04FF48053C4F202031D -S31508000A905B6813F4003F40F20013C2F2000319BF6B -S31508000AA04FF41061C0F23D014FF49051C0F27A0143 -S31508000AB001FB02F21A6008E040F20013C2F20003DA -S31508000AC04FF49052C0F27A021A604FF48053C4F27F -S31508000AD002035A68C2F3031240F2F003C2F200039B -S31508000AE09A5C40F20013C2F20003196821FA02F276 -S31508000AF01A60704708B540B940F26873C2F200033D -S31508000B001B684FF001021A8208BD40F26473C2F2F4 -S31508000B1000031B681B68984740F26873C2F200031B -S31508000B20186800F10A0008BD08B540B940F26873B4 -S31508000B30C2F200031B684FF001021A8208BD40F298 -S31508000B406473C2F200031B689B68984740F2687397 -S31508000B50C2F20003186800F10C0008BD08B540B9D8 -S31508000B6040F26873C2F200031B684FF002021A8251 -S31508000B7008BD40F23873C2F200034FF000021A8033 -S31508000B8040F26873C2F200031A68137813F07F0301 -S31508000B901BD1537A13F0200F40F23872C2F20002CA -S31508000BA0117814BF41F0020121F00201117013F00F -S31508000BB0400F40F23873C2F200031A7814BF42F0AD -S31508000BC0010222F001021A7032E0012B3CD0022BFE -S31508000BD03FD1537903F00F0213F0800F13D04FEA79 -S31508000BE0820303F1804303F5B8431B6803F030031F -S31508000BF0102B1DD140F23873C2F200031A7842F066 -S31508000C0001021A7014E04FEA820303F1804303F5E8 -S31508000C10B8431B6803F44053B3F5805F01BF40F245 -S31508000C203873C2F200031A7842F0010208BF1A703C -S31508000C3040F26473C2F200031B681B69984740F2CE -S31508000C403870C2F2000008BD40F23870C2F20000E7 -S31508000C5008BD4FF0000008BDF8B540F26873C2F24F -S31508000C6000031C68238A227A042A14BF0022012260 -S31508000C70002B14BF002202F001027AB340F20C13D3 -S31508000C80C2F200031B78012B1ED145F65043C4F26D -S31508000C9000031A6892B243F20203C2F20003D318A1 -S31508000CA04FEA43034FF000021A6040F27073C2F233 -S31508000CB000034FF03001198040F20C13C2F2000312 -S31508000CC01A704FF0040637E040F27073C2F2000360 -S31508000CD04FF010021A804FF007062DE0A58AAB42A6 -S31508000CE08CBF022604269D4228BF1D46A3692846B6 -S31508000CF0984707464FF0000001F020F901463846AC -S31508000D002A4600F0ADFE4FF00000294601F038F9FA -S31508000D10238A5B1B2382638AED18658240F270730F -S31508000D20C2F200034FF03001198040F26E73C2F22E -S31508000D3000034FF440521A8040F26873C2F200036F -S31508000D401B681E72F8BD00BF08B540F26873C2F290 -S31508000D5000031A68D17840F29403C2F200035B7864 -S31508000D608B420ED393787BB9938883B9917240F2FC -S31508000D706473C2F200031B685B6898474FF0000073 -S31508000D8008BD4FF0020008BD4FF0020008BD4FF045 -S31508000D90020008BD10B540F26874C2F20004226869 -S31508000DA040F24073C2F200031B689B695079D17800 -S31508000DB0984723689A7A9AB1A8B91A79B2B99B78EA -S31508000DC0BBB940F26473C2F200031B68DB6898473C -S31508000DD023685A79DA72DA781A734FF0000010BD70 -S31508000DE04FF0020010BD4FF0020010BD4FF0020098 -S31508000DF010BD4FF0020010BD38B540F26873C2F25C -S31508000E0000031B681A7812F07F0206D15A7A22F07C -S31508000E1020025A724FF0000038BD022A7AD15A8849 -S31508000E20002A7AD11A79002A7AD1597921F08000D4 -S31508000E3011F0800F4FEA800202F1804202F5B842B3 -S31508000E40156814BF05F0300505F4405540F29402C4 -S31508000E50C2F200021478D5F1010238BF002284429A -S31508000E6098BF42F00102002A5DD19B7A002B5DD023 -S31508000E7011F0800F14D04FEA800303F1804303F585 -S31508000E80B8431B6803F03003102B39D1C4B220468F -S31508000E9000F0F6FF20464FF0300100F07BFE2FE011 -S31508000EA04FEA800404F1804404F5B844236803F447 -S31508000EB04053B3F5805F23D1A0B940F20803C2F2CC -S31508000EC0000393F82C1001F087F822684BF68F730D -S31508000ED002EA030383F4405343F4004343F08003D8 -S31508000EE023600DE000F0B6FF22684BF68F7302EA26 -S31508000EF0030383F4405343F4004343F08003236021 -S31508000F0040F26473C2F200031B685B6998474FF0AE -S31508000F10000038BD4FF0020038BD4FF0020038BD62 -S31508000F204FF0020038BD4FF0020038BD4FF0020006 -S31508000F3038BD00BF10B540F26873C2F200031868E6 -S31508000F40427922F0800112F0800F4FEA810303F103 -S31508000F50804303F5B8431C6814BF04F0300404F456 -S31508000F60405440F29403C2F200031B78994231D2EE -S31508000F704388D4F1010438BF0024002B18BF44F07D -S31508000F800104002C29D1837A002B29D012F0800F76 -S31508000F904FEA810101F1804101F5B8410A681DBF98 -S31508000FA048F6BF73134083F010034BF68F7304BFE4 -S31508000FB0134083F4805343F4004343F080030B60EB -S31508000FC040F26473C2F200031B689B6998474FF0AE -S31508000FD0000010BD4FF0020010BD4FF0020010BD1A -S31508000FE04FF0020010BD00BF08B540F26873C2F2A8 -S31508000FF000031B685A7A42F020025A7240F2647360 -S31508001000C2F200031B68DB6998474FF0000008BD71 -S3150800101040F26873C2F200031B685A8A18B98988B5 -S315080010208A1A1A82704708688018704708B540F20D -S315080010300803C2F200034FF0000093F82C1000F0EA -S31508001040CBFF40F26873C2F200031B68187A0828BF -S315080010500DD140F26E73C2F200034FF480521A802B -S3150800106040F27073C2F200034FF010021A8009288A -S3150800107014BF0020012008BD70B540F26873C2F2A3 -S3150800108000031C68237A042B14BF00220122022BBA -S3150800109008BF42F00102002A40F08B80052B14BFDE -S315080010A000220122032B08BF42F00102002A72D057 -S315080010B0228AA369111E18BF0121002B0CBF00212B -S315080010C001F00101A9B1A58A954228BF154628460F -S315080010D098470646238A5B1B2382638AEB1863823A -S315080010E04FF0000000F03AFF014630462A4600F06D -S315080010F0D1FC238A93B140F26E73C2F200034FF417 -S3150800110040521A804FF00000014600F039FF40F2C5 -S315080011107073C2F200034FF030021A80238AA28A43 -S315080011209A4208D840F26873C2F200031B684FF06F -S3150800113003021A7228E043B140F26873C2F2000350 -S315080011401B684FF005021A721EE040F26873C2F27D -S3150800115000031B684FF006021A7245F65043C4F2A4 -S3150800116000031A6892B243F20203C2F20003D318CC -S315080011704FEA43034FF000021A6040F27073C2F25E -S3150800118000034FF030021A8040F26873C2F200037F -S315080011901B681A7A0FE0072B18BF08220BD140F2FA -S315080011A04073C2F200031B68DB6898474FF00802D9 -S315080011B001E04FF0080240F26873C2F200031B68B0 -S315080011C01A72FFF733FF70BDF0B583B045F650438A -S315080011D0C4F200031A6892B243F20403C2F200038F -S315080011E0D3184FEA4303196840F26873C2F2000342 -S315080011F01B681A7A092A21D08AB202F1005202F52E -S3150800120040524FEA4202164616F8011B197040F280 -S315080012106874C2F20004236852785A702568B6F8D2 -S31508001220030001F023F968802568B6F8070001F085 -S315080012301DF9A8802368B6F80B70DF8040F2687342 -S31508001240C2F200031A684FF001031372D388002B09 -S315080012507ED15478137813F07F032ED1092C02D14E -S31508001260FFF772FD3BE0052C0FD192F90330002BF6 -S31508001270B8BF082265DB9378002B5AD19388002BD8 -S315080012805AD1937A002B3AD059E0032C07D1D37858 -S31508001290012B25D193881BBBFFF7A6FE1FE0012C67 -S315080012A01ED1D378012B1BD19388CBB9537A13F06F -S315080012B0200F15D0FFF7A0FD11E0012B04D10B2C50 -S315080012C00ED1FFF767FD0AE0022B09D1012C02D1E6 -S315080012D0FFF792FD03E0032C02D1FFF72BFE70B156 -S315080012E040F24073C2F200031B685B6920469847C8 -S315080012F0032808BF092224D04FF0080208BB45F688 -S315080013005043C4F200031A6892B243F20203C2F2CF -S315080013100003D3184FEA43034FF000021A6040F265 -S315080013207073C2F200034FF030021A804FF00602C3 -S3150800133007E04FF0080204E04FF0080201E04FF022 -S31508001340080240F26873C2F200031B681A7230E1A1 -S315080013505378062B21D1137813F07F0F40F0B7800E -S315080013609378012B06D140F24073C2F200031B6842 -S31508001370DB699FE0022B06D140F24073C2F20003FC -S315080013801B681B6A96E0032B40F0A18040F240736D -S31508001390C2F200031B685B6A8CE0002B54D15188AB -S315080013A0002951D1516821F47F41B1F5003F4BD155 -S315080013B0137813F07F0303D19388002B71D086E04E -S315080013C0012B14D140F24073C2F200031B689B69DB -S315080013D050794FF000019847002878D140F2687399 -S315080013E0C2F200031B689B7A002B5FD16FE0022BC9 -S315080013F06DD1537903F00F0203F0700013F0800FDC -S315080014004FEA820303F1804303F5B84319BF1C680A -S3150800141004F030041B6803F4405440F29403C2F20B -S3150800142000031978D0F1010338BF00238A422CBF84 -S31508001430002203F00102002A49D040F65D33C0F6C7 -S315080014400003002C36D142E0082B09D1137813F09B -S315080014507F0F04BF40F6F523C0F600032AD036E016 -S315080014600A2B34D1137803F07F03012B2FD1937AFB -S315080014706BB353885BBB536823F47F43B3F5803F54 -S3150800148025D140F24073C2F200031B689B6950796C -S315080014904FF00001984740F62933C0F6000348B1DB -S315080014A015E040F65D33C0F6000303E040F65D3311 -S315080014B0C0F600035BB140F26872C2F2000212681D -S315080014C04FF00004548293612046984718E040F292 -S315080014D04073C2F20003196840F26873C2F200034F -S315080014E01A680B69507898470446032808D140F2D1 -S315080014F06873C2F200031B684FF009021A7258E0BB -S3150800150040F26873C2F200031B681A8A4FF6FF712D -S315080015108A4204BF09221A724BD0022C00D01AB98B -S315080015204FF008021A7244E093F90010002936DADF -S31508001530D98801910198824202D9019A1A821EE03D -S315080015408A421CD240F24073C2F200031B6893F829 -S315080015502C309A4207D240F20C13C2F200034FF025 -S3150800156000021A700BE092FBF3F103FB112333B967 -S3150800157040F20C13C2F200034FF001021A7040F257 -S315080015806873C2F200031A6840F24073C2F200039D -S315080015901B6893F82C309382FFF75EFB09E04FF047 -S315080015A003021A7240F26E73C2F200034FF44052FD -S315080015B01A80FFF73BFD03B0F0BD00BF70B440F2E0 -S315080015C09403C2F200031D78B5B14FF0000340F64C -S315080015D00F76DAB24FEA820101F1804101F5B8418E -S315080015E00C6842F4004242F08002344022430A600A -S315080015F003F101039D42ECD840F0800045F64C43C8 -S31508001600C4F20003186070BC704700BF08B540F20A -S315080016106873C2F200031A68137A042B14BF0021F8 -S315080016200121022B08BF41F0010141B1FFF714FB6C -S3150800163040F26873C2F200031B681A7A1DE0062B93 -S3150800164018BF082219D15378052B0DD1137813F03A -S315080016507F0F09D1D078FFF7B1FF40F26473C2F269 -S3150800166000031B681B6A984740F24073C2F20003E6 -S315080016701B689B6898474FF0080240F26873C2F2ED -S3150800168000031B681A72FFF7D1FC08BD704700BF3C -S3150800169008B540F26872C2F2000240F24873C2F21C -S315080016A0000313604FF002021A7240F24072C2F24F -S315080016B0000240F20803C2F20003136040F26472AB -S315080016C0C2F2000240F23801C2F2000111601B6842 -S315080016D0984708BD70B582B04FF00003ADF80630E4 -S315080016E045F64446C4F2000640F23074C2F20004DD -S315080016F040F24475C2F200055BE1238803F00F034C -S315080017002B70002B40F01A814FF4B842C4F2000245 -S31508001710116889B240F26E73C2F200031980188804 -S3150800172000F0300040F27071C2F20001088019889A -S3150800173001F44051198011684BF6BF7301EA03039F -S3150800174083F4005383F0200343F4004343F08003FB -S315080017501360238813F0100F49D14FF4B844C4F22C -S315080017600004226848F60F7302EA03032360FFF7B2 -S315080017704DFF22684BF6BF7302EA030340F26E720E -S31508001780C2F20002128802F4805292B20AB183F4BD -S31508001790805340F26E72C2F20002128802F40052BE -S315080017A092B20AB183F4005340F27072C2F2000298 -S315080017B0128802F0100292B20AB183F0100340F2C6 -S315080017C07072C2F20002128802F0200292B20AB1C6 -S315080017D083F0200348F28002CFF6FF7243EA020242 -S315080017E092B24FF4B843C4F200031A60E9E04FF42A -S315080017F0B843C4F200031B689BB2ADF80630BDF8C7 -S31508001800063013F4006F49D04FF4B844C4F200040C -S31508001810226840F68F7302EA03032360FFF7D4FCBD -S3150800182022684BF6BF7302EA030340F26E72C2F2F5 -S315080018300002128802F4805292B20AB183F48053ED -S3150800184040F26E72C2F20002128802F4005292B29C -S315080018500AB183F4005340F27072C2F20002128891 -S3150800186002F0100292B20AB183F0100340F27072CD -S31508001870C2F20002128802F0200292B20AB183F084 -S31508001880200348F28002CFF6FF7243EA020292B2C0 -S315080018904FF4B843C4F200031A6092E0BDF806306C -S315080018A01BB2002B80F285804FF4B844C4F20004C2 -S315080018B0226840F68F7302EA03032360FFF7DCFB16 -S315080018C022684BF6BF7302EA030340F26E72C2F255 -S315080018D00002128802F4805292B20AB183F480534D -S315080018E040F26E72C2F20002128802F4005292B2FC -S315080018F00AB183F4005340F27072C2F200021288F1 -S3150800190002F0100292B20AB183F0100340F270722C -S31508001910C2F20002128802F0200292B20AB183F0E3 -S31508001920200348F28002CFF6FF7243EA020292B21F -S315080019304FF4B843C4F200031A6042E04FEA830347 -S3150800194003F1804303F5B8431A6892B2ADF806204E -S31508001950BDF8062012B2002A0FDA196840F68F720F -S3150800196001EA02021A6040F2D003C2F200032A78A2 -S3150800197002F1FF3253F822309847BDF8063013F0CB -S31508001980800F16D02A784FEA820202F1804202F5C9 -S31508001990B842116848F60F7301EA0303136040F270 -S315080019A0B403C2F200032A7802F1FF3253F8223058 -S315080019B0984733689BB2238023881BB2002BFFF617 -S315080019C09CAE02B070BD00BF70B545F64445C4F282 -S315080019D0000540F23074C2F2000440F24476C2F2C6 -S315080019E0000635E047F6FF732B60238803F00F03E4 -S315080019F033704FEA830303F1804303F5B8431A684B -S31508001A0092B212F4004F10D0196840F68F7201EAAC -S31508001A1002021A6040F2D003C2F20003327802F1E1 -S31508001A20FF3253F82230984712E012F0800F0FD099 -S31508001A30196848F60F7201EA02021A6040F2B40306 -S31508001A40C2F20003327802F1FF3253F82230984787 -S31508001A502B689BB2238023881BB2002BC2DB70BD88 -S31508001A6030B402F10102521011D001F1005101F512 -S31508001A7040514FEA41014FF00003457810F8024BF8 -S31508001A8044EA05245C5203F10403013AF5D130BC5B -S31508001A90704700BF02F1010253100BD001F100514B -S31508001AA001F540514FEA410151F8042B20F8022B69 -S31508001AB0013BF9D1704700BF45F64043C4F2000325 -S31508001AC01860704745F64043C4F20003186880B2B0 -S31508001AD0704700BF45F64443C4F2000318607047D8 -S31508001AE045F64443C4F20003186880B2704700BF45 -S31508001AF045F64843C4F20003186880B2704700BF31 -S31508001B0045F64C43C4F200031860704745F64C434B -S31508001B10C4F20003186880B2704700BF4FF6F87326 -S31508001B2000EA030345F65042C4F200021360704708 -S31508001B3045F65043C4F20003186880B2704700BFE8 -S31508001B404FEA800303F1804303F5B84319607047F1 -S31508001B504FEA800303F1804303F5B843186880B25F -S31508001B60704700BF4FEA800202F1804202F5B84290 -S31508001B70106848F68F1300EA03030B431360704797 -S31508001B804FEA800303F1804303F5B843186800F46D -S31508001B90C06070474FEA800202F1804202F5B842FF -S31508001BA0106848F6BF7300EA030301F0100080B21C -S31508001BB008B183F0100301F0200189B209B183F05E -S31508001BC0200343F4004343F080031360704700BFCB -S31508001BD04FEA800202F1804202F5B84210684BF6DD -S31508001BE08F7300EA030301F4805080B208B183F4CE -S31508001BF0805301F4005189B209B183F4005343F4C8 -S31508001C00004343F080031360704700BF38B50546AC -S31508001C100C46FFF79DFF012C09D14FEA850505F112 -S31508001C20804505F5B84520F48050286038BD022C5B -S31508001C3001BFAD0005F1804505F5B84520F0100057 -S31508001C4008BF286038BD00BF4FEA800303F1804310 -S31508001C5003F5B843186800F0300070474FEA800370 -S31508001C6003F1804303F5B843186800F44050704701 -S31508001C704FEA800202F1804202F5B842116848F63E -S31508001C80BF7301EA030383F0300343F4004343F0D0 -S31508001C9080031360704700BF4FEA800202F180425A -S31508001CA002F5B84211684BF68F7301EA030383F411 -S31508001CB0405343F4004343F080031360704700BF6A -S31508001CC04FEA800202F1804202F5B842116840F6F6 -S31508001CD00F6301EA030343F4004343F4C07313603C -S31508001CE0704700BF4FEA800202F1804202F5B8420F -S31508001CF0116840F60F6301EA030343F4004343F017 -S31508001D0080031360704700BF4FEA800202F18042E9 -S31508001D1002F5B842116840F60F6301EA030343F47B -S31508001D20004343F080031360704700BF4FEA800208 -S31508001D3002F1804202F5B842116840F60F6301EAE3 -S31508001D40030343F4004343F4C0731360704700BFB2 -S31508001D504FEA800202F1804202F5B842116840F665 -S31508001D600F6301EA030343F4004343F4C0731360AB -S31508001D70704700BF4FEA800202F1804202F5B8427E -S31508001D80116840F60F6301EA030343F4004343F086 -S31508001D9080031360704700BF4FEA800303F1804356 -S31508001DA003F5B843186800F03000102814BF002067 -S31508001DB0012070474FEA800303F1804303F5B843D7 -S31508001DC0186800F44050B0F5805F14BF0020012069 -S31508001DD0704700BF4FEA800202F1804202F5B8421E -S31508001DE0116840F68F7301EA03031360704700BF5A -S31508001DF04FEA800202F1804202F5B842116848F6BD -S31508001E000F7301EA03031360704700BF4FEA8002AD -S31508001E1002F1804202F5B842116840F60F7301EAF2 -S31508001E20030343F4404343F080031360704700BF45 -S31508001E304FEA800202F1804202F5B842116840F684 -S31508001E400F7301EA030343F4004343F0C00313602E -S31508001E50704700BF4FEA800303F1804303F5B84398 -S31508001E601A6812F4804F09D0196840F60F7201EA11 -S31508001E70020242F4404242F080021A60704700BFF4 -S31508001E804FEA800303F1804303F5B8431A6812F05A -S31508001E90400F09D0196840F60F7201EA020242F4AF -S31508001EA0004242F0C0021A60704700BF4FEA800342 -S31508001EB003F1804303F5B8431A6841F4004141F041 -S31508001EC0800140F60F7002EA000041EA000018603F -S31508001ED0704700BF4FEA800303F1804303F5B84318 -S31508001EE0186800F00F00704745F65043C4F2000327 -S31508001EF01B689BB203EBC00303F1005303F5405381 -S31508001F004FEA43034FF6FE7201EA02021A6070476F -S31508001F1045F65043C4F200031B689BB203EBC003AB -S31508001F2043F20402C2F200029A184FEA42024FF63E -S31508001F30FE7301EA03031360704700BF45F650437A -S31508001F40C4F200031B689BB203EBC00303F1005302 -S31508001F5003F540534FEA43031888704745F6504344 -S31508001F60C4F200031B689BB203EBC00343F20402EE -S31508001F70C2F200029A184FEA42021088704700BF60 -S31508001F8045F65043C4F200031B689BB203EBC0033B -S31508001F9043F20202C2F200029A184FEA42021160A4 -S31508001FA0704700BF3E290DD94FEA511311F01F0F94 -S31508001FB004BF03F1FF339BB24FEA832343F4004384 -S31508001FC0036070474FEA510311F0010F18BF013340 -S31508001FD04FEA83230360704745F65043C4F2000373 -S31508001FE01A6892B243F20603C2F20003D31803EB4F -S31508001FF0C0034FEA43033E290DD94FEA511211F0A7 -S315080020001F0F04BF02F1FF3292B24FEA822242F456 -S3150800201000421A6070474FEA510211F0010F18BFCB -S3150800202001324FEA82221A60704700BF45F65043D4 -S31508002030C4F200031B689BB203EBC00343F202021F -S31508002040C2F200029A184FEA420210684FEA80501C -S315080020504FEA9050704700BF45F65043C4F200035C -S315080020601B689BB203EBC00343F20602C2F20002EE -S315080020709A184FEA420210684FEA80504FEA905089 -S31508002080704700BF30B445F65043C4F200031C68DD -S315080020904FEAC000A5B2451905F1005505F54055AA -S315080020A04FEA45054FF6FE7401EA04042C601B68E6 -S315080020B09BB2C01843F20403C2F20003C3184FEAE6 -S315080020C043034FF6FE7102EA0101196030BC7047FE -S315080020D045F65043C4F200031B689BB203EBC003EA -S315080020E003F1005303F540534FEA43034FF6FE72DC -S315080020F001EA02021A60704745F65043C4F200032B -S315080021001B689BB203EBC00343F20402C2F200024F -S315080021109A184FEA42024FF6FE7301EA0303136068 -S31508002120704700BF45F65043C4F200031B689BB2D4 -S3150800213003EBC00303F1005303F540534FEA43038F -S315080021401888704745F65043C4F200031B689BB2D3 -S3150800215003EBC00343F20402C2F200029A184FEAE4 -S3150800216042021088704700BF10B401295CD145F6B9 -S315080021705043C4F2000319684FEAC00089B243F21B -S315080021800203C2F20003CB181B184FEA43033E2A88 -S3150800219028D94FEA521112F01F0F04BF01F1FF317F -S315080021A089B24FEA812141F40041196045F650434E -S315080021B0C4F20003196889B243F20603C2F20003A7 -S315080021C0CB1818184FEA40004FEA521112F01F0FA9 -S315080021D004BF01F1FF3189B24FEA812141F4004180 -S315080021E001603FE04FEA520112F0010F18BF0131BA -S315080021F04FEA8121196045F65043C4F20003196875 -S3150800220089B243F20603C2F20003CB1818184FEA44 -S3150800221040004FEA520112F0010F1CBF013189B28A -S315080022204FEA812101601DE002291BD145F6504184 -S31508002230C4F200010C68A4B24FEAC000041943F2C4 -S315080022400203C2F20003E3184FEA43031A600B685D -S315080022509BB2C01843F20603C2F20003C3184FEA42 -S3150800226043031A6010BC7047012928D145F650432C -S31508002270C4F20003196889B243F20203C2F20003EA -S31508002280CB1803EBC0034FEA43033E2A0DD94FEAA6 -S31508002290521112F01F0F04BF01F1FF3189B24FEA44 -S315080022A0812141F40041196070474FEA520112F04A -S315080022B0010F18BF01314FEA8121196070470229C1 -S315080022C00FD145F65043C4F200031B689BB203EBDB -S315080022D0C00043F20203C2F20003C3184FEA4303E5 -S315080022E01A607047012928D145F65043C4F2000305 -S315080022F0196889B243F20603C2F20003CB1803EB4E -S31508002300C0034FEA43033E2A0DD94FEA521112F091 -S315080023101F0F04BF01F1FF3189B24FEA812141F451 -S315080023200041196070474FEA520112F0010F18BFB9 -S3150800233001314FEA81211960704702290FD145F60C -S315080023405043C4F200031B689BB203EBC00043F280 -S315080023500603C2F20003C3184FEA43031A60704724 -S3150800236045F65043C4F200031B689BB203EBC00357 -S3150800237043F20202C2F200029A184FEA42021068B9 -S315080023804FEA80504FEA9050704700BF45F65043D9 -S31508002390C4F200031B689BB203EBC00343F20602B8 -S315080023A0C2F200029A184FEA420210684FEA8050B9 -S315080023B04FEA9050704700BF45F65043C4F20003F9 -S315080023C01B684FEAC0009BB2C31843F20602C2F26A -S315080023D000029A184FEA4202138813F47C4F17D169 -S315080023E045F65043C4F200031B689BB2C01843F27B -S315080023F00203C2F20003C3184FEA430318884FEAE0 -S3150800240080504FEA9050002814BF022000207047E1 -S315080024104FF00100704700BF012910D14FEA800034 -S3150800242000F1804000F5B840026840F60F7302EAF2 -S31508002430030343F4004343F0C003036070470229D3 -S315080024400FD14FEA800000F1804000F5B8400268DD -S3150800245040F60F7302EA030343F4404343F0800354 -S315080024600360704741EA0020704700BFC3B24FEAD5 -S31508002470102040EA0320704745F64443C4F200039F -S315080024804FF00000186040F26C73C2F200034FF47C -S3150800249006421A8045F64043C4F200031A607047A4 -S315080024A070B50E46144600F07F052846FFF746FD30 -S315080024B00146A4B230462246FFF7D2FA28462146FC -S315080024C0FFF75EFD4FF0000070BD00BF70B50E4609 -S315080024D000F07F052846FFF7BFFD04462846FFF7AC -S315080024E03DFD014630462246FFF7D4FA204670BD28 -S315080024F008B500F07FFA00F06FFA00F027FD00F04B -S3150800250009F808BD08B500F077FA00F01DF800F0E4 -S315080025106FFA08BD00B583B04FF0FF038DF804309D -S315080025204FF000038DF8053000F05AF800F070FB04 -S3150800253040F20D13C2F200031B78012B02D101A849 -S3150800254000F072F803B000BD08B540F21010C2F2F0 -S31508002550000000F0D5FB012805D140F21010C2F2A8 -S31508002560000000F061F808BD08B500F08BFB08BD57 -S3150800257008B5C9B200F08CFB00F04CF808BD00BFE6 -S3150800258040F20D13C2F200034FF001021A707047B1 -S3150800259040F20D13C2F200034FF000021A707047A2 -S315080025A040F20D13C2F200031878704708B500F020 -S315080025B027F808BD40F25013C2F200034FF000029C -S315080025C05A70704740F25013C2F200034FF0FE02F1 -S315080025D0DA7018714FF00202A3F84420704700BF62 -S315080025E040F25013C2F200034FF000021A709A64C8 -S315080025F083F84220A3F844209A705A70704700BFA7 -S3150800260040F25013C2F200031878003818BF0120B0 -S31508002610704700BF40F25013C2F200034FF00002A9 -S3150800262083F84220704700BF38B504460278FF2A6F -S315080026301DD1FFF7BFFF40F25013C2F200034FF05F -S3150800264001021A704FF0FF01D9704FF0100119718D -S315080026504FF0000159714FF03F009871D871197207 -S315080026605A729A724FF00802A3F8442098E140F291 -S315080026705013C2F200031B78012B40F0AB81A2F184 -S31508002680C902352A00F28881DFE812F0EC008601DB -S31508002690860181018601860173010D0159014301F5 -S315080026A086018601860186018601860186018601E4 -S315080026B086018601860186018601860186018601D4 -S315080026C086018601860186018601860186018601C4 -S315080026D086018601860186018601860186018601B4 -S315080026E08200540036007400860186018601A8001F -S315080026F08601C200C700DB0042783E2A04D94FF0A3 -S315080027002200FFF75FFF4BE140F25015C2F20005C9 -S3150800271005F10400A96C00F093F94FF0FF03EB7084 -S315080027206278AB6CD318AB64637803F10103A5F840 -S31508002730443035E143783E2B04D94FF02200FFF7A9 -S3150800274041FF2DE1416840F25015C2F20005A96427 -S3150800275005F10400627800F073F94FF0FF03EB709F -S315080027606278AB6CD318AB64637803F10103A5F800 -S31508002770443015E140F25013C2F200034FF0FF0255 -S31508002780DA7042689A644FF00102A3F8442007E120 -S3150800279040F25015C2F200054FF0FF03EB70A96C2A -S315080027A043684FF000023BB14FF0000211F8010BED -S315080027B01218D2B2013BF9D1C5F8072040F25013DE -S315080027C0C2F200034FF001021A714FF000025A716B -S315080027D09A714FF00802A3F84420E1E040F2501342 -S315080027E0C2F200034FF0FF02DA7043F27862C0F6D5 -S315080027F000029A644FF000021A715A719A714FF0EA -S315080028000702C3F807204FF00802A3F84420C7E0E0 -S315080028104FF00000FFF7D6FEC2E040F25013C2F2B6 -S3150800282000034FF0FF02DA704FF000021A71597870 -S3150800283059719A71DA711A724FF00602A3F8442098 -S31508002840AEE040F25014C2F200044FF000032370C9 -S31508002850FFF7B0FE4FF0FF03E3704FF00103A4F853 -S3150800286044309DE040F25013C2F20003986C4FF0DA -S315080028703E0104F1010200F06DFB20B94FF0310072 -S31508002880FFF7A0FE8CE040F25013C2F200034FF0AF -S31508002890FF02DA709A6C02F13E029A644FF0010266 -S315080028A0A3F844207CE043783D2B04D94FF022005E -S315080028B0FFF788FE74E040F25013C2F200034FF0AF -S315080028C0FF02DA704FF00102A3F84420417841B9BB -S315080028D000F04CFB002863D14FF03100FFF772FE81 -S315080028E05EE040F25013C2F20003986C04F1020253 -S315080028F000F030FB20B94FF03100FFF763FE4FE0E0 -S3150800290040F25013C2F2000361789A6C8A189A64EE -S3150800291046E040F25013C2F200034FF0FF02DA70AD -S315080029204FF000021A715A714FF03F019971DA712E -S315080029301A725A724FF00702A3F8442030E040F2A8 -S315080029405013C2F20003986C616800F007FB20B9C7 -S315080029504FF03100FFF736FE22E040F25013C2F284 -S3150800296000034FF0FF02DA704FF00102A3F844208B -S3150800297016E000F077F840F25013C2F200034FF069 -S31508002980FF02DA704FF00102A3F8442008E04FF086 -S315080029903100FFF717FE03E04FF02000FFF712FEA5 -S315080029A040F25013C2F2000393F84230012B03D1D0 -S315080029B04FF01000FFF706FE40F25013C2F2000374 -S315080029C04FF0010283F8422003F10300B3F84410E4 -S315080029D0FFF7CEFD38BD00BF08B5FDF725FCFDF7AE -S315080029E039FC20B9FFF7DCFD08B900F015F808BD79 -S315080029F0704700BF704700BF704700BF08B540F278 -S31508002A009C13C2F20003186040F2A013C2F200033E -S31508002A101960FFF7F1FFFCE708B500F0A3FA70B1FB -S31508002A20FFF7A2FD4EF60853CEF200034FF480429C -S31508002A301A6044F20403C0F600031B68984708BDF1 -S31508002A4070B50D4614465AB1064615F8013B06F808 -S31508002A50013BFFF7D1FF04F1FF34A4B2002CF4D1F7 -S31508002A6070BD00BF08B500F081FD08BD30B413463F -S31508002A70C2B10A4601F1020103F1FF33DBB201EBF1 -S31508002A8043014FF000054FEA1074092C94BF303407 -S31508002A9037341470557002F102028A4202D04FEAA6 -S31508002AA00010F0E730BC704710B440F2A813C2F229 -S31508002AB000031B6893B140F2A812C2F200025C69D7 -S31508002AC0146019749860D8604FF000025A74186040 -S31508002AD001F1FF3140185860987C01E04FF0FF0083 -S31508002AE010BC704738B504460D46012807D943F28D -S31508002AF08060C0F600004FF40171FFF77FFF40F2D7 -S31508002B00AC13C2F2000304EB440203EBC2035A7C83 -S31508002B101B7C9A4222D040F2AC13C2F2000304EBAB -S31508002B20440203EBC203DA681570597C01F101010E -S31508002B305974DA6802F10102DA605B689A4210D9C0 -S31508002B4040F2AC13C2F2000304EB440403EBC402E4 -S31508002B5053F83430D3604FF0010038BD4FF0000011 -S31508002B6038BD4FF0010038BD08B5014640F2602374 -S31508002B70C2F200031878FFF7B5FF08BD38B504465A -S31508002B800D46012807D943F28060C0F6000040F2DE -S31508002B902721FFF733FF40F2AC13C2F2000304EB20 -S31508002BA0440203EBC2035B7C0BB340F2AC13C2F2E4 -S31508002BB0000303EBC2039A6812782A70597C01F164 -S31508002BC0FF3159749A6802F101029A605B689A4269 -S31508002BD010D940F2AC13C2F2000304EB440403EB31 -S31508002BE0C40253F8343093604FF0010038BD4FF0FB -S31508002BF0000038BD4FF0010038BD00BF08B50146DA -S31508002C0040F2DC13C2F200031878FFF7B7FF08BDDD -S31508002C1038B540F2AC13C2F200034FF000029A74C2 -S31508002C2003F1180159614FF0010183F82A10DA629D -S31508002C3040F2A812C2F20002136040F26024C2F207 -S31508002C40000460184FF04001FFF72EFF207040F295 -S31508002C50DC15C2F2000505F101004FF04001FFF74F -S31508002C6023FF28702378FF2B01D0FF2807D143F2D2 -S31508002C708060C0F600004FF07601FFF7BFFEFEF752 -S31508002C8007FD38BD08B54FF00000FDF79DFA08BDF1 -S31508002C902DE9F04105460C463F2907D943F28060E5 -S31508002CA0C0F600004FF09701FFF7A8FE2046FFF791 -S31508002CB05BFF012807D043F28060C0F600004FF0A2 -S31508002CC09A01FFF79BFE2646BCB14FF0000443F27B -S31508002CD08067C0F600074FF0A208FFF78DFE285D53 -S31508002CE0FFF742FF012803D038464146FFF786FE24 -S31508002CF004F10104A3B2B342EFD3BDE8F08100BFEB -S31508002D0010B50446FDF76EFC40F2A413C2F20003A8 -S31508002D101B78B3B940F2A420C2F20000FFF76EFF99 -S31508002D20012837D140F2A413C2F200034FF0010282 -S31508002D301A7040F22433C2F200034FF000001870F4 -S31508002D4010BD40F22433C2F200031878164BC0189F -S31508002D50FFF754FF012820D140F22433C2F20003C2 -S31508002D601A7802F10102D2B21A7040F2A423C2F212 -S31508002D7000031B78934213D120460B49FFF760FEE8 -S31508002D8040F2A413C2F200034FF000021A704FF08B -S31508002D90010010BD4FF0000010BD4FF0000010BD3F -S31508002DA04FF0000010BD00BFA502002008B540F294 -S31508002DB00813C2F200034FF003021A60FDF730FA57 -S31508002DC008BD00BF08B5FDF72DFA40F24873C2F2F8 -S31508002DD000039B7A3BB140F20813C2F200034FF09E -S31508002DE005021A6008BD40F20813C2F200034FF04C -S31508002DF001021A6008BD00BF2DE9F04182B040F219 -S31508002E006023C2F200031C78012C07D943F28060C4 -S31508002E10C0F600004FF41271FFF7F0FD40F2AC1354 -S31508002E20C2F2000304EB440403EBC4035D7C002DEB -S31508002E3037D0402D28BF40250DB34FF0000440F28F -S31508002E406026C2F2000643F28068C0F6000840F227 -S31508002E50E427C2F2000730780DF10701FFF78EFE6E -S31508002E60012804D040464FF4A671FFF7C7FD9DF828 -S31508002E7007303B5504F10104E3B2AB42EBD340F211 -S31508002E80E420C2F200004FF480712A46FEF7E8FDFE -S31508002E904FF001002946FFF773F84FF00100FEF7DF -S31508002EA0E7FE02B0BDE8F0812DE9F0414FF00100E0 -S31508002EB040F22021C2F20001FFF708FB87B2EFB10A -S31508002EC04FF0000440F2DC15C2F2000540F220265D -S31508002ED0C2F2000643F28068C0F600082878315D21 -S31508002EE0FFF700FE012804D0404640F27311FFF7B1 -S31508002EF085FD04F10104A3B29F42EFD84FF001000B -S31508002F00FEF7CAFEBDE8F08138B54FF2E873C1F6A0 -S31508002F10FF731B684FF2EC72C1F6FF7214684FF22A -S31508002F20F072C1F6FF721068C0180CD0064D29461B -S31508002F304FF00802FFF79AFD204605F110014FF001 -S31508002F400402FFF793FD38BD9A00002008B500F08B -S31508002F50A9F908BD08B500F0B3F908BD08B500F031 -S31508002F60DBF908BD08B500F071FA08BD08B500F030 -S31508002F70A1FA10B100F0C8FA08BD4FF0000008BD6C -S31508002F804EF21003CEF200034FF000021A607047AB -S31508002F904EF21003CEF200031B6813F4803F1FBFE6 -S31508002FA040F22633C2F200031A88013218BF1A808B -S31508002FB0704700BF40F22633C2F2000318807047FC -S31508002FC008B5FFF7DDFF4EF21003CEF2000341F617 -S31508002FD03F12C0F201025A604FF0000098604FF0AD -S31508002FE005021A60FFF7E6FF08BD00BF08B5FFF740 -S31508002FF0CFFF40F22633C2F20003188808BD00BF8F -S315080030004FF40053C4F2020340F22312C4F267528B -S315080030105A6048F6AB12CCF6EF525A604FF03402BB -S31508003020DA6070474FF40053C4F202031A6942F09B -S3150800303080021A61704700BFF8B507464FF00004D2 -S31508003040254643F2A466C0F60006FFF7D5FC3359B9 -S31508003050BB420ED8311949685B189F4209D243F220 -S31508003060A463C0F6000305EB450203EB8203187A56 -S31508003070F8BD05F1010504F10C04A82CE5D14FF0C3 -S31508003080FF00F8BD2DE9F84380460068FFF7D4FF36 -S31508003090FF2808BF002453D0FFF7B2FF4FF40053B0 -S315080030A0C4F20203DB6813F0010F04D0FFF7BAFF7E -S315080030B04FF0000444E04FF40053C4F202031A69C7 -S315080030C042F001021A614FF0000508F104094FF4B5 -S315080030D00054C4F20204D8F80030EF1859F8056015 -S315080030E0B2B2EA52E36813F0010F05D0FFF784FC89 -S315080030F0E36813F0010FF9D14FEA16437B80E368C2 -S3150800310013F0010F05D0FFF777FCE36813F0010F02 -S31508003110F9D13B68B34207D105F10405B5F5007F3F -S31508003120D9D14FF0010401E04FF000044FF40053E9 -S31508003130C4F202031A6922F001021A61FFF772FF4C -S315080031402046BDE8F88300BF70B5064643F2A4657D -S31508003150C0F600054FF00004FFF74EFC2B7AB34289 -S3150800316008D143F2A463C0F6000304EB440253F803 -S31508003170220070BD04F1010405F10C050E2CEBD1FB -S315080031804FF0FF3070BD00BF08B54FEAC1534FEA94 -S31508003190D3535BB903688B420BD040F8041B4FF43A -S315080031A00072FFF74DFC4FF0010008BD4FF000001C -S315080031B008BD4FF0010008BD38B504460D4640F27B -S315080031C02833C2F20003984209D04FF48043C0F670 -S315080031D00003994208D0FFF755FF88B108E040F28E -S315080031E02C54C2F2000403E040F22834C2F2000470 -S315080031F020462946FFF7C8FF002808BF002401E03B -S315080032004FF00004204638BD2DE9F84305460C4624 -S3150800321017461E464FEA51294FEA49290368B3F172 -S31508003220FF3F03D14946FFF7AFFF50B32B684B4525 -S3150800323005D028464946FFF7BFFF054628B32B6841 -S31508003240E41A2C1904F1040440F2FF1809F5007970 -S31508003250FFF7D2FB05F10403E31A434507D92846CD -S315080032604946FFF7A9FF054698B100F1040417F887 -S31508003270013B237006F1FF36B6B276B104F10104BC -S31508003280E6E74FF00000BDE8F8834FF00000BDE820 -S31508003290F8834FF00000BDE8F8834FF00100BDE861 -S315080032A0F88300BF40F22C53C2F200034FF0FF32FE -S315080032B01A6040F22833C2F200031A60704700BF52 -S315080032C070B504460D461646FFF7B6FEFF281DD014 -S315080032D004F1FF304019FFF7AFFEFF2819D04FEA77 -S315080032E054224FF48043C0F60003B3EB422F07BFC6 -S315080032F040F22830C2F2000040F22C50C2F2000020 -S3150800330021463246ABB2FFF77FFF70BD4FF0000093 -S3150800331070BD4FF0000070BD2DE9F04105460E4620 -S31508003320FFF78AFE044605F1FF308019FFF784FE91 -S315080033300546FF2814BF00230123FF2C08BF43F0CE -S315080033400103002B7ED1844270D8012C72D90F2834 -S3150800335074D8FFF755FE4FF40053C4F20203DB6836 -S3150800336013F0010F05D0FFF75DFE4FF00000BDE832 -S31508003370F0814FF40053C4F202031A6942F00202C4 -S315080033801A612046FFF7E0FE07462846FFF7DCFEEF -S31508003390804643F2A466C0F600064FF00004FFF725 -S315080033A02BFB337AAB4209D143F2A463C0F6000380 -S315080033B004EB440203EB82035E6807E004F10104B0 -S315080033C006F10C060E2CEAD14FF00006C7EB0808EA -S315080033D04644C6F38F26DEB14FF000054FF400547D -S315080033E0C4F202046761236943F040032361E3687A -S315080033F013F0010F05D0FFF7FFFAE36813F0010F8A -S31508003400F9D105F10105ADB207F58067AE42E9D8F5 -S315080034104FF40053C4F202031A6922F002021A6139 -S31508003420FFF700FE4FF00100BDE8F0814FF0000005 -S31508003430BDE8F0814FF00000BDE8F0814FF00000D4 -S31508003440BDE8F0814FF00000BDE8F08144F20402C7 -S31508003450C0F600024FF48043C0F6000310681B68EC -S31508003460C01844F20803C0F600031B68C01844F2EB -S315080034700C03C0F600031B68C01844F21003C0F61C -S3150800348000031B68C01844F21403C0F600031B6847 -S31508003490C01844F21803C0F600031B68C01844F2AB -S315080034A05013C0F600031B68C018D0F1010038BFDE -S315080034B00020704710B582B040F22832C2F20002EE -S315080034C002F104039468D16864185268A418DA688B -S315080034D0A4181A69A4185A69A4189B69E418C4F1AF -S315080034E000040194FFF7B2FF844208BF012009D007 -S315080034F044F25010C0F600004FF004010DEB010233 -S31508003500FFF7DEFE02B010BD08B540F22833C2F25E -S3150800351000031B68B3F1FF3F06D040F22830C2F221 -S315080035200000FFF7AFFD88B140F22C53C2F200034A -S315080035301B68B3F1FF3F0CD040F22C50C2F20000DA -S31508003540FFF7A0FD003818BF012008BD4FF00000A6 -S3150800355008BD4FF0010008BD08B543F24C70C0F62F -S3150800356000004FF03601FFF749FA08BD08B572B6F4 -S3150800357040F20002C2F2000240F20413C2F2000353 -S315080035809A4211D243F27872C0F6000240F2000362 -S31508003590C2F2000340F20410C2F2000052F8041B03 -S315080035A043F8041B8342F9D3054806494FF0000245 -S315080035B08842B8BF40F8042BFADBFCF757FE08BD73 -S315080035C004010020720700206D61696E2E630000F9 -S315080035D0120110010000004045012300000101020C -S315080035E003010000040309042603570069006E005E -S315080035F05500530042002000420075006C006B0025 -S31508003600200044006500760069006300650000003C -S3150800361009022000010100C0320904000002FF006F -S31508003620000407058102400000070501024000006A -S315080036301A034F00700065006E0042004C005400EB -S315080036402000550073006500720000002C03570027 -S3150800365069006E00550053004200200042007500C4 -S315080036606C006B00200049006E0074006500720053 -S3150800367066006100630065004F70656E424C540039 -S315080036802E2E2F2E2E2F2E2E2F536F757263652FEB -S3150800369041524D434D335F53544D33322F75736248 -S315080036A02E63000000400008002000000200000011 -S315080036B000600008002000000300000000800008E9 -S315080036C0002000000400000000A000080020000000 -S315080036D00500000000C000080020000006000000E9 -S315080036E000E00008002000000700000000000108B4 -S315080036F0002000000800000000200108002000004B -S315080037000900000000400108002000000A0000002F -S3150800371000600108002000000B000000008001087E -S31508003720002000000C00000000A001080020000096 -S315080037300D00000000C00108002000000E00000077 -S3150800374000E00108002000000F0000002E2E2F2E9A -S315080037502E2F2E2E2F536F757263652F41524D43B0 -S315080037604D335F53544D33322F4743432F766563AA -S30D08003770746F72732E630000EA -S315080037781036000820000000B9050008E50400080E -S315080037880D04000811040008150400086D04000853 -S3150800379875040008D5040008C5040008990400083B -S315080037A800000000400000008D160008E10300082C -S315080037B88D1600088D1600088D1600088D16000847 -S315080037C88D1600088D160008FD0300082236000825 -S315080037D809000000D035000812000000E43500088A -S315080037E804000000303600081A000000E835000812 -S315080037F826000000980000201C0000004C3600082F -S315080038082C000000030100001C0353004500520069 -S3150800381831003200330034003500360037003800EE -S3150800382839003000B90300088D1600088D160008FF -S315080038388D1600088D1600088D1600088D160008C6 -S31508003848C10300088D1600088D1600088D16000895 -S315080038588D1600088D1600088D1600080100000050 -S31508003868000000000000000001020304060708091A -S3090800387800A24A044E +S315080002204FF48053C4F202039A6942F004029A61B9 +S315080002304FF40063C4F201031A6822F00F021A6031 +S315080002401A6842F004021A60704700BF4FF4006350 +S31508000250C4F201039B6813F0010F14BF00200120AC +S31508000260704700BF00B583B04FF0000301930093B9 +S315080002704FF48053C4F202031A6842F001021A606E +S3150800028059684FF00002CFF6FF0201EA02025A60EF +S315080002901A6822F0847222F480321A601A6822F4EC +S315080002A080221A605A6822F4FE025A604FF41F022E +S315080002B09A601A6842F480321A604FF48053C4F286 +S315080002C0020340F2DC52196801F4003100910199E9 +S315080002D001F101010191009911B901999142F2D1F7 +S315080002E04FF48053C4F202031B6813F4003F07D18E +S315080002F042F6DC00C0F600004FF06F0101F06AFD1F +S315080003004FF40053C4F202031A6842F010021A604E +S315080003101A6822F003021A601A6842F002021A608A +S315080003204FF48053C4F202035A685A605A6842F47A +S3150800033000525A605A6842F480625A605A6822F437 +S315080003407C125A605A6842F4E8125A601A6842F0F7 +S3150800035080721A604FF48053C4F202031A6812F0CE +S31508000360007FFBD04FF48053C4F202035A6822F090 +S3150800037003025A605A6842F002025A604FF48053E8 +S31508000380C4F202035A6802F00C02082AFAD14FF4A2 +S315080003908053C4F202035A6822F480025A60DA696A +S315080003A042F40002DA6101F0A5FA01F0ADFAFCE7C1 +S315080003B008B501F0E7FE08BD08B501F03BFF08BD2A +S315080003C008B540F2F003C2F200031B68052B01D101 +S315080003D001F0D8FE08BD00BF40F22C73C2F200033C +S315080003E09B7A33B140F2F003C2F200034FF00502E4 +S315080003F01A60704740F2F003C2F200034FF004029D +S315080004001A607047704700BF704700BF10B50628CE +S315080004101BD140F24C73C2F200031B681A7802F033 +S315080004207F02012A14D15A79AAB99A78212A15D1B4 +S3150800043040F28142C0F600029A614FF000045C82E5 +S31508000440204600F01DF8204610BD4FF0020010BDF2 +S315080004504FF0020010BD4FF0020010BD4FF0020031 +S3150800046010BD00BF4FF00200704700BF21B9002839 +S3150800047014BF0220002070474FF00200704700BFEB +S3150800048008B540F25C01C2F2000100F0A7FB08BD06 +S3150800049008B540F24C73C2F200031B68DB78052BE3 +S315080004A008D840F26C01C2F2000101EBC30100F06A +S315080004B095FB08BD4FF0000008BD00BF08B540F227 +S315080004C00001C2F2000100F089FB08BD08B540F240 +S315080004D06401C2F2000100F081FB08BD10B540F2CC +S315080004E04C73C2F200031B684FF000049C7242F67C +S315080004F02412C0F60002D2795A72DC72204601F044 +S3150800050075F820464FF4007101F07AF820464FF04E +S31508000510100101F083F820464FF0400101F034F94C +S3150800052020464FF0800101F01BF9204601F0DAF869 +S3150800053040F20803C2F20003204693F82C1001F09B +S315080005406DF9204601F0BAF84FF00100214601F096 +S3150800055057F84FF001004FF4807101F001F94FF0A0 +S3150800056001004FF0C00101F00FF94FF001004FF004 +S31508000570400101F041F94FF001004FF0400101F050 +S315080005804DF94FF001004FF4405101F065F84FF076 +S3150800059001004FF0200101F041F8204600F0F4FD7B +S315080005A040F2F003C2F200034FF001021A6010BDD8 +S315080005B010B501F06FFE40F24C73C2F200031B68DF +S315080005C04FF000049C7200F05DF801F06DF940F2FE +S315080005D0F003C2F200031C6010BD00BF08B545F663 +S315080005E04443C4F200031A6892B240F21873C2F286 +S315080005F000031A801A8840F25073C2F200031B885F +S31508000600134013F4007F11D045F64443C4F20003A7 +S315080006104FF6FF521A6040F2ED03C2F200031A7851 +S3150800062002F10102D2B21A70FFF7CAFE40F218733D +S31508000630C2F200031A8840F25073C2F200031B8804 +S31508000640134013F4004F01D000F02AFE40F218734D +S31508000650C2F200031A8840F25073C2F200031B88E4 +S31508000660134013F4806F0CD045F64443C4F20003DC +S315080006704FF6FF321A6040F20803C2F200035B68C5 +S31508000680984708BD08B54FF00100FFF79DFD45F6F0 +S315080006904043C4F200034FF001021A6040F2507260 +S315080006A0C2F200024FF00000186045F64441C4F259 +S315080006B0000108604FF4E0511180196008BD00BFC1 +S315080006C008B540B940F24C73C2F200031B684FF0FC +S315080006D001021A8208BD40F24873C2F200031B6881 +S315080006E01B68984740F24C73C2F20003186800F181 +S315080006F00A0008BD08B540B940F24C73C2F20003BF +S315080007001B684FF001021A8208BD40F24873C2F214 +S3150800071000031B689B68984740F24C73C2F20003BB +S31508000720186800F10C0008BD08B540B940F24C73D2 +S31508000730C2F200031B684FF002021A8208BD40F29B +S315080007401C73C2F200034FF000021A8040F24C7389 +S31508000750C2F200031A68137813F07F031BD1537A89 +S3150800076013F0200F40F21C72C2F20002117814BF77 +S3150800077041F0020121F00201117013F0400F40F21E +S315080007801C73C2F200031A7814BF42F0010222F069 +S3150800079001021A7032E0012B3CD0022B3FD153796B +S315080007A003F00F0213F0800F13D04FEA820303F110 +S315080007B0804303F5B8431B6803F03003102B1DD1A3 +S315080007C040F21C73C2F200031A7842F001021A7052 +S315080007D014E04FEA820303F1804303F5B8431B682C +S315080007E003F44053B3F5805F01BF40F21C73C2F2B5 +S315080007F000031A7842F0010208BF1A7040F24873E3 +S31508000800C2F200031B681B69984740F21C70C2F2CB +S31508000810000008BD40F21C70C2F2000008BD4FF08F +S31508000820000008BDF8B540F24C73C2F200031C681C +S31508000830238A227A042A14BF00220122002B14BF1D +S31508000840002202F001027AB340F2F403C2F2000376 +S315080008501B78012B1ED145F65043C4F200031A68D3 +S3150800086092B243F20203C2F20003D3184FEA4303DB +S315080008704FF000021A6040F25473C2F200034FF0C0 +S315080008803001198040F2F403C2F200031A704FF0E7 +S31508000890040637E040F25473C2F200034FF0100228 +S315080008A01A804FF007062DE0A58AAB428CBF0226B8 +S315080008B004269D4228BF1D46A36928469847074631 +S315080008C04FF0000000F076FF014638462A4600F051 +S315080008D061FE4FF00000294600F08EFF238A5B1B5D +S315080008E02382638AED18658240F25473C2F20003CC +S315080008F04FF03001198040F25273C2F200034FF4F0 +S3150800090040521A8040F24C73C2F200031B681E72F2 +S31508000910F8BD00BF08B540F24C73C2F200031A686E +S31508000920D17840F29403C2F200035B788B420ED36F +S3150800093093787BB9938883B9917240F24873C2F26F +S3150800094000031B685B6898474FF0000008BD4FF02E +S31508000950020008BD4FF0020008BD4FF0020008BDB6 +S3150800096010B540F24C74C2F20004226840F22473B7 +S31508000970C2F200031B689B695079D17898472368AF +S315080009809A7A9AB1A8B91A79B2B99B78BBB940F2E2 +S315080009904873C2F200031B68DB68984723685A79D4 +S315080009A0DA72DA781A734FF0000010BD4FF00200C1 +S315080009B010BD4FF0020010BD4FF0020010BD4FF001 +S315080009C0020010BD38B540F24C73C2F200031B6832 +S315080009D01A7812F07F0206D15A7A22F020025A7249 +S315080009E04FF0000038BD022A7AD15A88002A7AD1F7 +S315080009F01A79002A7AD1597921F0800011F0800FEE +S31508000A004FEA800202F1804202F5B842156814BF27 +S31508000A1005F0300505F4405540F29402C2F2000292 +S31508000A201478D5F1010238BF0022844298BF42F0FB +S31508000A300102002A5DD19B7A002B5DD011F0800F50 +S31508000A4014D04FEA800303F1804303F5B8431B68CB +S31508000A5003F03003102B39D1C4B2204600F06AFEE9 +S31508000A6020464FF0300100F0D9FD2FE04FEA800410 +S31508000A7004F1804404F5B844236803F44053B3F5FD +S31508000A80805F23D1A0B940F20803C2F2000393F8AD +S31508000A902C1000F0C3FE22684BF68F7302EA03039C +S31508000AA083F4405343F4004343F0800323600DE08E +S31508000AB000F02AFE22684BF68F7302EA030383F4DA +S31508000AC0405343F4004343F08003236040F24873E5 +S31508000AD0C2F200031B685B6998474FF0000038BDF7 +S31508000AE04FF0020038BD4FF0020038BD4FF002004B +S31508000AF038BD4FF0020038BD4FF0020038BD00BFC8 +S31508000B0010B540F24C73C2F200031868427922F01D +S31508000B10800112F0800F4FEA810303F1804303F549 +S31508000B20B8431C6814BF04F0300404F4405440F27F +S31508000B309403C2F200031B78994231D24388D4F158 +S31508000B40010438BF0024002B18BF44F00104002C10 +S31508000B5029D1837A002B29D012F0800F4FEA810120 +S31508000B6001F1804101F5B8410A681DBF48F6BF7317 +S31508000B70134083F010034BF68F7304BF134083F4BE +S31508000B80805343F4004343F080030B6040F24873FC +S31508000B90C2F200031B689B6998474FF0000010BD1E +S31508000BA04FF0020010BD4FF0020010BD4FF00200DA +S31508000BB010BD00BF08B540F24C73C2F200031B68B3 +S31508000BC05A7A42F020025A7240F24873C2F200037F +S31508000BD01B68DB6998474FF0000008BD40F24C736C +S31508000BE0C2F200031B685A8A18B989888A1A1A82B7 +S31508000BF0704708688018704708B540F20803C2F2C3 +S31508000C0000034FF0000093F82C1000F007FE40F2A6 +S31508000C104C73C2F200031B68187A08280DD140F2FB +S31508000C205273C2F200034FF480521A8040F2547392 +S31508000C30C2F200034FF010021A80092814BF0020E0 +S31508000C40012008BD70B540F24C73C2F200031C685F +S31508000C50237A042B14BF00220122022B08BF42F07C +S31508000C600102002A40F08B80052B14BF00220122C6 +S31508000C70032B08BF42F00102002A72D0228AA36918 +S31508000C80111E18BF0121002B0CBF002101F0010124 +S31508000C90A9B1A58A954228BF15462846984706460B +S31508000CA0238A5B1B2382638AEB1863824FF000005A +S31508000CB000F090FD014630462A4600F085FC238A5E +S31508000CC093B140F25273C2F200034FF440521A80B5 +S31508000CD04FF00000014600F08FFD40F25473C2F257 +S31508000CE000034FF030021A80238AA28A9A4208D853 +S31508000CF040F24C73C2F200031B684FF003021A72EB +S31508000D0028E043B140F24C73C2F200031B684FF06F +S31508000D1005021A721EE040F24C73C2F200031B6809 +S31508000D204FF006021A7245F65043C4F200031A68D9 +S31508000D3092B243F20203C2F20003D3184FEA430306 +S31508000D404FF000021A6040F25473C2F200034FF0EB +S31508000D5030021A8040F24C73C2F200031B681A7AFA +S31508000D600FE0072B18BF08220BD140F22473C2F2FA +S31508000D7000031B68DB6898474FF0080201E04FF054 +S31508000D80080240F24C73C2F200031B681A72FFF79E +S31508000D9033FF70BDF0B583B045F65043C4F2000387 +S31508000DA01A6892B243F20403C2F20003D3184FEA58 +S31508000DB04303196840F24C73C2F200031B681A7A9F +S31508000DC0092A21D08AB202F1005202F540524FEAAE +S31508000DD04202164616F8011B197040F24C74C2F20C +S31508000DE00004236852785A702568B6F8030000F0A4 +S31508000DF055FD68802568B6F8070000F04FFDA88005 +S31508000E002368B6F80B70DF8040F24C73C2F2000319 +S31508000E101A684FF001031372D388002B7ED15478D9 +S31508000E20137813F07F032ED1092C02D1FFF772FD38 +S31508000E303BE0052C0FD192F90330002BB8BF0822EE +S31508000E4065DB9378002B5AD19388002B5AD1937A75 +S31508000E50002B3AD059E0032C07D1D378012B25D1A2 +S31508000E6093881BBBFFF7A6FE1FE0012C1ED1D37883 +S31508000E70012B1BD19388CBB9537A13F0200F15D0C9 +S31508000E80FFF7A0FD11E0012B04D10B2C0ED1FFF7C3 +S31508000E9067FD0AE0022B09D1012C02D1FFF792FD6A +S31508000EA003E0032C02D1FFF72BFE70B140F2247346 +S31508000EB0C2F200031B685B6920469847032808BFEF +S31508000EC0092224D04FF0080208BB45F65043C4F265 +S31508000ED000031A6892B243F20203C2F20003D3185F +S31508000EE04FEA43034FF000021A6040F25473C2F20D +S31508000EF000034FF030021A804FF0060207E04FF069 +S31508000F00080204E04FF0080201E04FF0080240F240 +S31508000F104C73C2F200031B681A7230E15378062B31 +S31508000F2021D1137813F07F0F40F0B7809378012B07 +S31508000F3006D140F22473C2F200031B68DB699FE006 +S31508000F40022B06D140F22473C2F200031B681B6A07 +S31508000F5096E0032B40F0A18040F22473C2F200030E +S31508000F601B685B6A8CE0002B54D15188002951D14B +S31508000F70516821F47F41B1F5003F4BD1137813F046 +S31508000F807F0303D19388002B71D086E0012B14D1FF +S31508000F9040F22473C2F200031B689B6950794FF034 +S31508000FA000019847002878D140F24C73C2F200033A +S31508000FB01B689B7A002B5FD16FE0022B6DD15379AA +S31508000FC003F00F0203F0700013F0800F4FEA82035C +S31508000FD003F1804303F5B84319BF1C6804F03004D5 +S31508000FE01B6803F4405440F29403C2F200031978D4 +S31508000FF0D0F1010338BF00238A422CBF002203F038 +S315080010000102002A49D040F22973C0F60003002CD9 +S3150800101036D142E0082B09D1137813F07F0F04BFAD +S3150800102040F2C163C0F600032AD036E00A2B34D159 +S31508001030137803F07F03012B2FD1937A6BB3538870 +S315080010405BBB536823F47F43B3F5803F25D140F259 +S315080010502473C2F200031B689B6950794FF00001A4 +S31508001060984740F2F563C0F6000348B115E040F230 +S315080010702973C0F6000303E040F22973C0F60003A3 +S315080010805BB140F24C72C2F2000212684FF00004E3 +S31508001090548293612046984718E040F22473C2F2BE +S315080010A00003196840F24C73C2F200031A680B6910 +S315080010B0507898470446032808D140F24C73C2F288 +S315080010C000031B684FF009021A7258E040F24C738D +S315080010D0C2F200031B681A8A4FF6FF718A4204BFE0 +S315080010E009221A724BD0022C00D01AB94FF0080206 +S315080010F01A7244E093F90010002936DAD98801916A +S315080011000198824202D9019A1A821EE08A421CD2AA +S3150800111040F22473C2F200031B6893F82C309A42FB +S3150800112007D240F2F403C2F200034FF000021A702D +S315080011300BE092FBF3F103FB112333B940F2F403FE +S31508001140C2F200034FF001021A7040F24C73C2F269 +S3150800115000031A6840F22473C2F200031B6893F86E +S315080011602C309382FFF75EFB09E04FF003021A72F8 +S3150800117040F25273C2F200034FF440521A80FFF74E +S315080011803BFD03B0F0BD00BF70B440F29403C2F259 +S3150800119000031D78B5B14FF0000340F60F76DAB2BA +S315080011A04FEA820101F1804101F5B8410C6842F429 +S315080011B0004242F08002344022430A6003F10103F0 +S315080011C09D42ECD840F0800045F64C43C4F200033B +S315080011D0186070BC704700BF08B540F24C73C2F285 +S315080011E000031A68137A042B14BF00210121022B6D +S315080011F008BF41F0010141B1FFF714FB40F24C73FF +S31508001200C2F200031B681A7A1DE0062B18BF0822D3 +S3150800121019D15378052B0DD1137813F07F0F09D107 +S31508001220D078FFF7B1FF40F24873C2F200031B689B +S315080012301B6A984740F22473C2F200031B689B6836 +S3150800124098474FF0080240F24C73C2F200031B683D +S315080012501A72FFF7D1FC08BD704700BF08B540F207 +S315080012604C72C2F2000240F22C73C2F20003136001 +S315080012704FF002021A7240F22472C2F2000240F2E1 +S315080012800803C2F20003136040F24872C2F2000279 +S3150800129040F23801C2F2000111601B68984708BD88 +S315080012A070B582B04FF00003ADF8063045F64446F7 +S315080012B0C4F2000640F21874C2F2000440F228751F +S315080012C0C2F200055BE1238803F00F032B70002BA5 +S315080012D040F01A814FF4B842C4F20002116889B28C +S315080012E040F25273C2F200031980188800F03000E9 +S315080012F040F25471C2F200010880198801F4405185 +S31508001300198011684BF6BF7301EA030383F400538F +S3150800131083F0200343F4004343F0800313602388DB +S3150800132013F0100F49D14FF4B844C4F200042268F0 +S3150800133048F60F7302EA03032360FFF74DFF22689E +S315080013404BF6BF7302EA030340F25272C2F200027E +S31508001350128802F4805292B20AB183F4805340F2A2 +S315080013605272C2F20002128802F4005292B20AB114 +S3150800137083F4005340F25472C2F20002128802F05B +S31508001380100292B20AB183F0100340F25472C2F20C +S315080013900002128802F0200292B20AB183F02003FA +S315080013A048F28002CFF6FF7243EA020292B24FF485 +S315080013B0B843C4F200031A60E9E04FF4B843C4F234 +S315080013C000031B689BB2ADF80630BDF8063013F46F +S315080013D0006F49D04FF4B844C4F20004226840F6BE +S315080013E08F7302EA03032360FFF7D4FC22684BF6E7 +S315080013F0BF7302EA030340F25272C2F20002128875 +S3150800140002F4805292B20AB183F4805340F25272C7 +S31508001410C2F20002128802F4005292B20AB183F4B0 +S31508001420005340F25472C2F20002128802F010020F +S3150800143092B20AB183F0100340F25472C2F200026B +S31508001440128802F0200292B20AB183F0200348F211 +S315080014508002CFF6FF7243EA020292B24FF4B84313 +S31508001460C4F200031A6092E0BDF806301BB2002BE6 +S3150800147080F285804FF4B844C4F20004226840F62E +S315080014808F7302EA03032360FFF7DCFB22684BF63F +S31508001490BF7302EA030340F25272C2F200021288D4 +S315080014A002F4805292B20AB183F4805340F2527227 +S315080014B0C2F20002128802F4005292B20AB183F410 +S315080014C0005340F25472C2F20002128802F010026F +S315080014D092B20AB183F0100340F25472C2F20002CB +S315080014E0128802F0200292B20AB183F0200348F271 +S315080014F08002CFF6FF7243EA020292B24FF4B84373 +S31508001500C4F200031A6042E04FEA830303F1804302 +S3150800151003F5B8431A6892B2ADF80620BDF806205E +S3150800152012B2002A0FDA196840F68F7201EA02022F +S315080015301A6040F2D003C2F200032A7802F1FF32A1 +S3150800154053F822309847BDF8063013F0800F16D0AE +S315080015502A784FEA820202F1804202F5B8421168FF +S3150800156048F60F7301EA0303136040F2B403C2F2AC +S3150800157000032A7802F1FF3253F82230984733687D +S315080015809BB2238023881BB2002BFFF69CAE02B0C9 +S3150800159070BD00BF30B402F10102521011D001F142 +S315080015A0005101F540514FEA41014FF000034578DB +S315080015B010F8024B44EA05245C5203F10403013A8D +S315080015C0F5D130BC704700BF02F1010253100BD0B1 +S315080015D001F1005101F540514FEA410151F8042B40 +S315080015E020F8022B013BF9D1704700BF4FF6F8737C +S315080015F000EA030345F65042C4F20002136070473E +S315080016004FEA800202F1804202F5B842106848F6B5 +S315080016108F1300EA03030B43136070474FEA8002F7 +S3150800162002F1804202F5B842106848F6BF7300EA34 +S31508001630030301F0100080B208B183F0100301F033 +S31508001640200189B209B183F0200343F4004343F033 +S3150800165080031360704700BF4FEA800202F18042A0 +S3150800166002F5B84210684BF68F7300EA030301F4DB +S31508001670805080B208B183F4805301F4005189B2D6 +S3150800168009B183F4005343F4004343F08003136025 +S31508001690704700BF4FEA800202F1804202F5B84265 +S315080016A0116848F6BF7301EA030383F0300343F475 +S315080016B0004343F080031360704700BF4FEA80027F +S315080016C002F1804202F5B84211684BF68F7301EABF +S315080016D0030383F4405343F4004343F08003136049 +S315080016E0704700BF4FEA800202F1804202F5B84215 +S315080016F0116840F60F6301EA030343F4004343F01D +S3150800170080031360704700BF4FEA800303F18043EC +S3150800171003F5B8431A6812F4804F09D0196840F6E1 +S315080017200F7201EA020242F4404242F080021A6055 +S31508001730704700BF4FEA800303F1804303F5B843BF +S315080017401A6812F0400F09D0196840F60F7201EABC +S31508001750020242F4004242F0C0021A60704700BF1B +S3150800176045F65043C4F200031B689BB203EBC00363 +S3150800177003F1005303F540534FEA43034FF6FE7255 +S3150800178001EA02021A60704745F65043C4F20003A4 +S315080017901B689BB203EBC00343F20402C2F20002C9 +S315080017A09A184FEA42024FF6FE7301EA03031360E2 +S315080017B0704700BF45F65043C4F200031B689BB24E +S315080017C003EBC00303F1005303F540534FEA430309 +S315080017D01888704745F65043C4F200031B689BB24D +S315080017E003EBC00343F20402C2F200029A184FEA5E +S315080017F042021088704700BF45F65043C4F2000302 +S315080018001B689BB203EBC00343F20202C2F200025A +S315080018109A184FEA42021160704700BF45F65043D6 +S31508001820C4F200031A6892B243F20603C2F2000336 +S31508001830D31803EBC0034FEA43033E290DD94FEAF9 +S31508001840511211F01F0F04BF02F1FF3292B24FEA94 +S31508001850822242F400421A6070474FEA510211F0A0 +S31508001860010F18BF01324FEA82221A60704700BF83 +S3150800187045F65043C4F200031B689BB203EBC00352 +S3150800188043F20602C2F200029A184FEA42021068B0 +S315080018904FEA80504FEA9050704700BFC3B24FEAF4 +S315080018A0102040EA0320704745F64443C4F200037B +S315080018B04FF00000186040F25073C2F200034FF474 +S315080018C006421A8045F64043C4F200031A60704780 +S315080018D070B50E4600F07F052846FFF7C9FF044697 +S315080018E02846FFF777FF014630462246FFF76CFE8B +S315080018F0204670BD08B500F069FA00F059FA00F004 +S31508001900EBFC00F009F808BD08B500F061FA00F034 +S315080019101DF800F059FA08BD00B583B04FF0FF0373 +S315080019208DF804304FF000038DF8053000F04EF8BE +S3150800193000F05AFB40F2F503C2F200031B78012BB4 +S3150800194002D101A800F05CF803B000BD08B540F26A +S31508001950F800C2F2000000F0BFFB012805D140F2F2 +S31508001960F800C2F2000000F04BF808BD08B500F018 +S3150800197075FB08BD08B5C9B200F076FB00F036F86D +S3150800198008BD00BF40F2F503C2F200034FF00102A2 +S315080019901A70704740F2F503C2F2000318787047D0 +S315080019A040F23813C2F200034FF000025A70704733 +S315080019B040F23813C2F200034FF0FE02DA701871D3 +S315080019C04FF00202A3F84420704700BF40F23813D4 +S315080019D0C2F200034FF000021A709A6483F842209C +S315080019E0A3F844209A705A70704700BF40F2381323 +S315080019F0C2F200034FF0000283F84220704700BF8E +S31508001A0038B504460278FF2A1DD1FFF7C9FF40F210 +S31508001A103813C2F200034FF001021A704FF0FF01AB +S31508001A20D9704FF0100119714FF0000159714FF03C +S31508001A303F009871D87119725A729A724FF008025B +S31508001A40A3F8442098E140F23813C2F200031B7849 +S31508001A50012B40F0AB81A2F1C902352A00F2888138 +S31508001A60DFE812F0EC008601860181018601860115 +S31508001A7073010D015901430186018601860186011C +S31508001A808601860186018601860186018601860110 +S31508001A908601860186018601860186018601860100 +S31508001AA086018601860186018601860186018601F0 +S31508001AB0860186018601860182005400360074007C +S31508001AC0860186018601A8008601C200C700DB00E0 +S31508001AD042783E2A04D94FF02200FFF769FF4BE10E +S31508001AE040F23815C2F2000505F10400A96C00F0B1 +S31508001AF093F94FF0FF03EB706278AB6CD318AB64C5 +S31508001B00637803F10103A5F8443035E143783E2BA9 +S31508001B1004D94FF02200FFF74BFF2DE1416840F250 +S31508001B203815C2F20005A96405F10400627800F0D0 +S31508001B3073F94FF0FF03EB706278AB6CD318AB64A4 +S31508001B40637803F10103A5F8443015E140F2381330 +S31508001B50C2F200034FF0FF02DA7042689A644FF04F +S31508001B600102A3F8442007E140F23815C2F2000545 +S31508001B704FF0FF03EB70A96C43684FF000023BB1CE +S31508001B804FF0000211F8010B1218D2B2013BF9D13D +S31508001B90C5F8072040F23813C2F200034FF00102DD +S31508001BA01A714FF000025A719A714FF00802A3F8A1 +S31508001BB04420E1E040F23813C2F200034FF0FF027E +S31508001BC0DA7042F68C12C0F600029A644FF00002F0 +S31508001BD01A715A719A714FF00702C3F807204FF02D +S31508001BE00802A3F84420C7E04FF00000FFF7E0FE24 +S31508001BF0C2E040F23813C2F200034FF0FF02DA7077 +S31508001C004FF000021A71597859719A71DA711A727D +S31508001C104FF00602A3F84420AEE040F23814C2F2B0 +S31508001C2000044FF000032370FFF7BAFE4FF0FF03DE +S31508001C30E3704FF00103A4F844309DE040F23813F6 +S31508001C40C2F20003986C4FF03E0104F1010200F065 +S31508001C5047FB20B94FF03100FFF7AAFE8CE040F2AF +S31508001C603813C2F200034FF0FF02DA709A6C02F1E1 +S31508001C703E029A644FF00102A3F844207CE04378C0 +S31508001C803D2B04D94FF02200FFF792FE74E040F294 +S31508001C903813C2F200034FF0FF02DA704FF0010268 +S31508001CA0A3F84420417841B900F026FB002863D107 +S31508001CB04FF03100FFF77CFE5EE040F23813C2F2C7 +S31508001CC00003986C04F1020200F00AFB20B94FF0F9 +S31508001CD03100FFF76DFE4FE040F23813C2F2000301 +S31508001CE061789A6C8A189A6446E040F23813C2F210 +S31508001CF000034FF0FF02DA704FF000021A715A71B2 +S31508001D004FF03F019971DA711A725A724FF0070251 +S31508001D10A3F8442030E040F23813C2F20003986C6E +S31508001D20616800F0E1FA20B94FF03100FFF740FE94 +S31508001D3022E040F23813C2F200034FF0FF02DA70D5 +S31508001D404FF00102A3F8442016E000F077F840F2BD +S31508001D503813C2F200034FF0FF02DA704FF00102A7 +S31508001D60A3F8442008E04FF03100FFF721FE03E016 +S31508001D704FF02000FFF71CFE40F23813C2F20003B2 +S31508001D8093F84230012B03D14FF01000FFF710FEF5 +S31508001D9040F23813C2F200034FF0010283F84220E2 +S31508001DA003F10300B3F84410FFF7E4FD38BD00BFA4 +S31508001DB008B5FEF735FAFEF749FA20B9FFF7EAFD46 +S31508001DC008B900F015F808BD704700BF704700BF96 +S31508001DD0704700BF08B540F28413C2F200031860CA +S31508001DE040F28813C2F200031960FFF7F1FFFCE71F +S31508001DF008B500F07DFA70B1FFF7B8FD4EF6085346 +S31508001E00CEF200034FF480421A6044F20403C0F68F +S31508001E1000031B68984708BD70B50D4614465AB1AD +S31508001E20064615F8013B06F8013BFFF7D1FF04F11A +S31508001E30FF34A4B2002CF4D170BD00BF08B500F081 +S31508001E401FFD08BD30B41346C2B10A4601F10201AE +S31508001E5003F1FF33DBB201EB43014FF000054FEA14 +S31508001E601074092C94BF303437341470557002F14D +S31508001E7002028A4202D04FEA0010F0E730BC7047EF +S31508001E8010B440F29013C2F200031B6893B140F2FB +S31508001E909012C2F200025C69146019749860D860E6 +S31508001EA04FF000025A74186001F1FF31401858606B +S31508001EB0987C01E04FF0FF0010BC704738B5044627 +S31508001EC00D46012807D942F69410C0F600004FF4D3 +S31508001ED00171FFF77FFF40F29413C2F2000304EB8F +S31508001EE0440203EBC2035A7C1B7C9A4222D040F27E +S31508001EF09413C2F2000304EB440203EBC203DA684C +S31508001F001570597C01F101015974DA6802F1010270 +S31508001F10DA605B689A4210D940F29413C2F2000361 +S31508001F2004EB440403EBC40253F83430D3604FF097 +S31508001F30010038BD4FF0000038BD4FF0010038BD34 +S31508001F4008B5014640F24823C2F200031878FFF7A5 +S31508001F50B5FF08BD38B504460D46012807D942F62F +S31508001F609410C0F6000040F22721FFF733FF40F235 +S31508001F709413C2F2000304EB440203EBC2035B7C36 +S31508001F800BB340F29413C2F2000303EBC2039A6840 +S31508001F9012782A70597C01F1FF3159749A6802F156 +S31508001FA001029A605B689A4210D940F29413C2F211 +S31508001FB0000304EB440403EBC40253F83430936083 +S31508001FC04FF0010038BD4FF0000038BD4FF001005A +S31508001FD038BD00BF08B5014640F2C413C2F200037B +S31508001FE01878FFF7B7FF08BD38B540F29413C2F268 +S31508001FF000034FF000029A7403F1180159614FF07B +S31508002000010183F82A10DA6240F29012C2F2000245 +S31508002010136040F24824C2F2000460184FF04001F1 +S31508002020FFF72EFF207040F2C415C2F2000505F135 +S3150800203001004FF04001FFF723FF28702378FF2B9C +S3150800204001D0FF2807D142F69410C0F600004FF0E1 +S315080020507601FFF7BFFEFFF701F938BD08B54FF067 +S315080020600000FEF7B1F808BD2DE9F04105460C461B +S315080020703F2907D942F69410C0F600004FF09701A1 +S31508002080FFF7A8FE2046FFF75BFF012807D042F6B8 +S315080020909410C0F600004FF09A01FFF79BFE264603 +S315080020A0BCB14FF0000442F69417C0F600074FF093 +S315080020B0A208FFF78DFE285DFFF742FF012803D02F +S315080020C038464146FFF786FE04F10104A3B2B3423F +S315080020D0EFD3BDE8F08100BF10B50446FEF77EFADF +S315080020E040F28C13C2F200031B78B3B940F28C207D +S315080020F0C2F20000FFF76EFF012837D140F28C13B9 +S31508002100C2F200034FF001021A7040F20C33C2F219 +S3150800211000034FF00000187010BD40F20C33C2F2F5 +S3150800212000031878164BC018FFF754FF012820D172 +S3150800213040F20C33C2F200031A7802F10102D2B25D +S315080021401A7040F28C23C2F200031B78934213D113 +S3150800215020460B49FFF760FE40F28C13C2F20003DB +S315080021604FF000021A704FF0010010BD4FF000004A +S3150800217010BD4FF0000010BD4FF0000010BD00BFAD +S315080021808D0200202DE9F04182B040F24823C2F2C8 +S3150800219000031C78012C07D942F69410C0F60000FB +S315080021A04FF41271FFF716FE40F29413C2F20003C1 +S315080021B004EB440403EBC4035D7C002D37D0402DAB +S315080021C028BF40250DB34FF0000440F24826C2F25E +S315080021D0000642F69418C0F6000840F2CC27C2F270 +S315080021E0000730780DF10701FFF7B4FE012804D087 +S315080021F040464FF4A671FFF7EDFD9DF807303B55B5 +S3150800220004F10104E3B2AB42EBD340F2CC20C2F2B4 +S3150800221000004FF480712A46FFF7BCF94FF0010021 +S315080022202946FFF7E9FA4FF00100FFF733FA02B043 +S31508002230BDE8F0812DE9F0414FF0010040F2082198 +S31508002240C2F20001FFF744FB87B2EFB14FF000047A +S3150800225040F2C415C2F2000540F20826C2F2000692 +S3150800226042F69418C0F600082878315DFFF726FE76 +S31508002270012804D0404640F27311FFF7ABFD04F184 +S315080022800104A3B29F42EFD84FF00100FFF716FAF8 +S31508002290BDE8F08138B54FF2E873C1F6FF731B68E5 +S315080022A04FF2EC72C1F6FF7214684FF2F072C1F683 +S315080022B0FF721068C0180CD0064D29464FF0080268 +S315080022C0FFF7C0FD204605F110014FF00402FFF7A5 +S315080022D0B9FD38BD9A00002008B500F069F908BDB7 +S315080022E008B500F073F908BD08B500F09BF908BDFC +S315080022F008B500F05FFA08BD08B500F02DFA10B170 +S3150800230000F08CFA08BD4FF0000008BD4FF40053EA +S31508002310C4F2020340F22312C4F267525A6048F626 +S31508002320AB12CCF6EF525A604FF03402DA607047BF +S315080023304FF40053C4F202031A6942F080021A618C +S31508002340704700BFF8B507464FF00004254642F629 +S31508002350B816C0F60006FFF73BFD3359BB420ED848 +S31508002360311949685B189F4209D242F6B813C0F67C +S31508002370000305EB450203EB8203187AF8BD05F165 +S31508002380010504F10C04A82CE5D14FF0FF00F8BDB7 +S315080023902DE9F84380460068FFF7D4FFFF2808BFF9 +S315080023A0002453D0FFF7B2FF4FF40053C4F20203E0 +S315080023B0DB6813F0010F04D0FFF7BAFF4FF00004F3 +S315080023C044E04FF40053C4F202031A6942F00102D2 +S315080023D01A614FF0000508F104094FF40054C4F2DD +S315080023E00204D8F80030EF1859F80560B2B2EA527C +S315080023F0E36813F0010F05D0FFF7EAFCE36813F072 +S31508002400010FF9D14FEA16437B80E36813F0010FF9 +S3150800241005D0FFF7DDFCE36813F0010FF9D13B683F +S31508002420B34207D105F10405B5F5007FD9D14FF0C0 +S31508002430010401E04FF000044FF40053C4F2020314 +S315080024401A6922F001021A61FFF772FF2046BDE8F9 +S31508002450F88300BF70B5064642F6B815C0F6000503 +S315080024604FF00004FFF7B4FC2B7AB34208D142F6CA +S31508002470B813C0F6000304EB440253F8220070BDFB +S3150800248004F1010405F10C050E2CEBD14FF0FF30D9 +S3150800249070BD00BF08B54FEAC1534FEAD3535BB9C5 +S315080024A003688B420BD040F8041B4FF40072FFF709 +S315080024B0B3FC4FF0010008BD4FF0000008BD4FF017 +S315080024C0010008BD38B504460D4640F21033C2F285 +S315080024D00003984209D04FF48043C0F6000399429E +S315080024E008D0FFF755FF88B108E040F21454C2F24D +S315080024F0000403E040F21034C2F2000420462946E4 +S31508002500FFF7C8FF002808BF002401E04FF00004C9 +S31508002510204638BD2DE9F84305460C4617461E46A3 +S315080025204FEA51294FEA49290368B3F1FF3F03D11E +S315080025304946FFF7AFFF50B32B684B4505D02846F1 +S315080025404946FFF7BFFF054628B32B68E41A2C193E +S3150800255004F1040440F2FF1809F50079FFF738FC86 +S3150800256005F10403E31A434507D928464946FFF708 +S31508002570A9FF054698B100F1040417F8013B23703A +S3150800258006F1FF36B6B276B104F10104E6E74FF07C +S315080025900000BDE8F8834FF00000BDE8F8834FF06F +S315080025A00000BDE8F8834FF00100BDE8F88300BFDE +S315080025B040F21453C2F200034FF0FF321A6040F2A1 +S315080025C01033C2F200031A60704700BF70B50446A4 +S315080025D00D461646FFF7B6FEFF281DD004F1FF305C +S315080025E04019FFF7AFFEFF2819D04FEA54224FF4DF +S315080025F08043C0F60003B3EB422F07BF40F210300A +S31508002600C2F2000040F21450C2F2000021463246DF +S31508002610ABB2FFF77FFF70BD4FF0000070BD4FF003 +S31508002620000070BD2DE9F04105460E46FFF78AFE0B +S31508002630044605F1FF308019FFF784FE0546FF289A +S3150800264014BF00230123FF2C08BF43F00103002B0E +S315080026507ED1844270D8012C72D90F2874D8FFF71E +S3150800266055FE4FF40053C4F20203DB6813F0010F62 +S3150800267005D0FFF75DFE4FF00000BDE8F0814FF48E +S315080026800053C4F202031A6942F002021A61204694 +S31508002690FFF7E0FE07462846FFF7DCFE804642F6CF +S315080026A0B816C0F600064FF00004FFF791FB337A20 +S315080026B0AB4209D142F6B813C0F6000304EB440254 +S315080026C003EB82035E6807E004F1010406F10C06D9 +S315080026D00E2CEAD14FF00006C7EB08084644C6F3AD +S315080026E08F26DEB14FF000054FF40054C4F2020401 +S315080026F06761236943F040032361E36813F0010F20 +S3150800270005D0FFF765FBE36813F0010FF9D105F172 +S315080027100105ADB207F58067AE42E9D84FF400531C +S31508002720C4F202031A6922F002021A61FFF700FED8 +S315080027304FF00100BDE8F0814FF00000BDE8F081E0 +S315080027404FF00000BDE8F0814FF00000BDE8F081D1 +S315080027504FF00000BDE8F08100B583B040F21033B9 +S31508002760C2F200031B68B3F1FF3F08BF01201FD068 +S3150800277040F21032C2F2000202F104039068D168F6 +S31508002780411852688918DA6889181A6989185A69BD +S3150800279089189A698B18C3F1000302AA42F8043D06 +S315080027A044F25010C0F600004FF00401FFF70EFF88 +S315080027B003B000BD44F20402C0F600024FF48043A1 +S315080027C0C0F6000310681B68C01844F20803C0F678 +S315080027D000031B68C01844F20C03C0F600031B680C +S315080027E0C01844F21003C0F600031B68C01844F270 +S315080027F01403C0F600031B68C01844F21803C0F699 +S3150800280000031B68C01844F25013C0F600031B6887 +S31508002810C018D0F1010038BF0020704708B540F253 +S315080028201033C2F200031B68B3F1FF3F06D040F233 +S315080028301030C2F20000FFF7ABFD88B140F2145326 +S31508002840C2F200031B68B3F1FF3F0CD040F21450EC +S31508002850C2F20000FFF79CFD003818BF012008BD32 +S315080028604FF0000008BD4FF0010008BD08B542F65C +S315080028706020C0F600004FF03601FFF7ABFA08BD3E +S3150800288008B572B640F20002C2F2000240F2EC034A +S31508002890C2F200039A4211D242F68C22C0F6000216 +S315080028A040F20003C2F2000340F2EC00C2F200005C +S315080028B052F8041B43F8041B8342F9D3054806491A +S315080028C04FF000028842B8BF40F8042BFADBFDF748 +S315080028D0C9FC08BDEC000020560700206D61696E32 +S315080028E02E6300001201100100000040450123007C +S315080028F0000101020301000004030904260357002E +S3150800290069006E0055005300420020004200750021 +S315080029106C006B00200044006500760069006300C7 +S315080029206500000009022000010100C03209040008 +S315080029300002FF00000407058102400000070501A8 +S31508002940024000001A034F00700065006E00420046 +S315080029504C0054002000550073006500720000000A +S315080029602C03570069006E005500530042002000F2 +S31508002970420075006C006B00200049006E00740070 +S315080029806500720066006100630065004F70656E41 +S31508002990424C54002E2E2F2E2E2F2E2E2F536F756F +S315080029A07263652F41524D434D335F53544D333255 +S315080029B02F7573622E630000004000080020000097 +S315080029C0020000000060000800200000030000006C +S315080029D000800008002000000400000000A0000895 +S315080029E0002000000500000000C0000800200000CC +S315080029F00600000000E000080020000007000000B4 +S31508002A00000001080020000008000000002001085E +S31508002A100020000009000000004001080020000016 +S31508002A200A00000000600108002000000B000000FA +S31508002A3000800108002000000C00000000A001082A +S31508002A40002000000D00000000C001080020000062 +S31508002A500E00000000E00108002000000F00000042 +S31508002A602E2E2F2E2E2F2E2E2F536F757263652F17 +S31508002A7041524D434D335F53544D33322F474343F1 +S31108002A802F766563746F72732E63000076 +S31508002A8C2429000820000000B1050008DD04000810 +S31508002A9C05040008090400080D040008650400086C +S31508002AAC6D040008CD040008BD0400089104000854 +S31508002ABC000000004000000059120008D903000865 +S31508002ACC5912000859120008591200085912000820 +S31508002ADC5912000859120008F5030008362900088F +S31508002AEC09000000E428000812000000F828000875 +S31508002AFC04000000442900081A000000FC280008FD +S31508002B0C26000000980000201C0000006029000820 +S31508002B1C2C000000030100001C0353004500520062 +S31508002B2C31003200330034003500360037003800E7 +S31508002B3C39003000B1030008591200085912000870 +S31508002B4C591200085912000859120008591200089F +S31508002B5CB90300085912000859120008591200083E +S31108002B6C591200085912000859120008F6 S70508000000F2 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/makefile b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/makefile index 0d55ef59..2770fbd1 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/makefile +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Boot/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -141,7 +141,7 @@ CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) CFLAGS += -ffunction-sections -fdata-sections $(INC_PATH) -D STM32F10X_MD -D GCC_ARMCM3 CFLAGS += -Wa,-adhlns="$(OBJ_PATH)/$(subst .o,.lst,$@)" LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O srec ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.elf index 36f840af..29bf8fbf 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.map index 0a3c700a..5b25743a 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.map @@ -7,47 +7,44 @@ start address 0x08004000 Program Header: LOAD off 0x00000000 vaddr 0x08000000 paddr 0x08000000 align 2**15 - filesz 0x000095e0 memsz 0x000095e0 flags r-x - LOAD off 0x00010000 vaddr 0x20000000 paddr 0x080095e0 align 2**15 - filesz 0x00000028 memsz 0x00000138 flags rw- + filesz 0x00004540 memsz 0x00004540 flags r-x + LOAD off 0x00008000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x0000010c flags rw- private flags = 5000002: [Version5 EABI] [has entry point] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000055e0 08004000 08004000 00004000 2**2 + 0 .text 00000540 08004000 08004000 00004000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000028 20000000 080095e0 00010000 2**2 - CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000110 20000028 08009608 00010028 2**2 + 1 .bss 0000010c 20000000 20000000 00008000 2**2 ALLOC - 3 .debug_abbrev 00002d42 00000000 00000000 00010028 2**0 + 2 .debug_abbrev 00002d42 00000000 00000000 00004540 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 0000c720 00000000 00000000 00012d6a 2**0 + 3 .debug_info 0000c720 00000000 00000000 00007282 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 0000586d 00000000 00000000 0001f48a 2**0 + 4 .debug_line 0000586f 00000000 00000000 000139a2 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_loc 0000612a 00000000 00000000 00024cf7 2**0 + 5 .debug_loc 0000612a 00000000 00000000 00019211 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_pubnames 00002d4f 00000000 00000000 0002ae21 2**0 + 6 .debug_pubnames 00002d4f 00000000 00000000 0001f33b 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_pubtypes 00001033 00000000 00000000 0002db70 2**0 + 7 .debug_pubtypes 00001033 00000000 00000000 0002208a 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_aranges 000012c8 00000000 00000000 0002eba3 2**0 + 8 .debug_aranges 000012c8 00000000 00000000 000230bd 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_ranges 000010d8 00000000 00000000 0002fe6b 2**0 + 9 .debug_ranges 000010d8 00000000 00000000 00024385 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 000051cd 00000000 00000000 00030f43 2**0 + 10 .debug_str 000051cd 00000000 00000000 0002545d 2**0 CONTENTS, READONLY, DEBUGGING - 12 .comment 0000002a 00000000 00000000 00036110 2**0 + 11 .comment 0000002a 00000000 00000000 0002a62a 2**0 CONTENTS, READONLY - 13 .ARM.attributes 00000031 00000000 00000000 0003613a 2**0 + 12 .ARM.attributes 00000031 00000000 00000000 0002a654 2**0 CONTENTS, READONLY - 14 .debug_frame 0000252c 00000000 00000000 0003616c 2**2 + 13 .debug_frame 00002538 00000000 00000000 0002a688 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 08004000 l d .text 00000000 .text -20000000 l d .data 00000000 .data -20000028 l d .bss 00000000 .bss +20000000 l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -64,21 +61,21 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 cstart.c 0800419a l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 irq.c -080041b8 l F .text 00000004 __enable_irq -20000028 l O .bss 00000001 interruptNesting +080041bc l F .text 00000004 __enable_irq 00000000 l df *ABS* 00000000 led.c -2000002c l O .bss 00000004 timer_counter_last.3634 -20000030 l O .bss 00000001 led_toggle_state.3633 +20000000 l O .bss 00000004 timer_counter_last.3634 +20000004 l O .bss 00000001 led_toggle_state.3633 00000000 l df *ABS* 00000000 main.c 00000000 l df *ABS* 00000000 timer.c -20000034 l O .bss 00000004 millisecond_counter +20000008 l O .bss 00000004 millisecond_counter +00000000 l df *ABS* 00000000 stm32f10x_gpio.c +00000000 l df *ABS* 00000000 stm32f10x_rcc.c 00000000 l df *ABS* 00000000 core_cm3.c 00000000 l df *ABS* 00000000 system_stm32f10x.c 00000000 l df *ABS* 00000000 misc.c 00000000 l df *ABS* 00000000 stm32f10x_adc.c 00000000 l df *ABS* 00000000 stm32f10x_bkp.c 00000000 l df *ABS* 00000000 stm32f10x_can.c -08004d24 l F .text 0000000a CheckITStatus 00000000 l df *ABS* 00000000 stm32f10x_cec.c 00000000 l df *ABS* 00000000 stm32f10x_crc.c 00000000 l df *ABS* 00000000 stm32f10x_dac.c @@ -87,535 +84,37 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 stm32f10x_exti.c 00000000 l df *ABS* 00000000 stm32f10x_flash.c 00000000 l df *ABS* 00000000 stm32f10x_fsmc.c -00000000 l df *ABS* 00000000 stm32f10x_gpio.c 00000000 l df *ABS* 00000000 stm32f10x_i2c.c 00000000 l df *ABS* 00000000 stm32f10x_iwdg.c 00000000 l df *ABS* 00000000 stm32f10x_pwr.c -0800728c l F .text 00000004 __WFI -00000000 l df *ABS* 00000000 stm32f10x_rcc.c -20000014 l O .data 00000004 ADCPrescTable -20000018 l O .data 00000010 APBAHBPrescTable 00000000 l df *ABS* 00000000 stm32f10x_rtc.c 00000000 l df *ABS* 00000000 stm32f10x_sdio.c 00000000 l df *ABS* 00000000 stm32f10x_spi.c 00000000 l df *ABS* 00000000 stm32f10x_tim.c -08007f44 l F .text 000000b4 TI1_Config -08007ff8 l F .text 000000b6 TI2_Config 00000000 l df *ABS* 00000000 stm32f10x_usart.c 00000000 l df *ABS* 00000000 stm32f10x_wwdg.c -0800732c g F .text 00000030 PWR_EnterSTANDBYMode -08008700 g F .text 00000014 TIM_TimeBaseStructInit -0800691c g F .text 00000018 FSMC_GetECC -08005704 g F .text 0000001e CEC_Cmd -0800447c g F .text 00000006 __set_PRIMASK -080093a8 g F .text 00000012 USART_SetGuardTime -0800742c g F .text 0000000c RCC_HSICmd -08008924 g F .text 00000018 TIM_ForcedOC2Config -08005ea0 g F .text 0000001e FLASH_Unlock -08007450 g F .text 0000000c RCC_PLLCmd -08006ca4 g F .text 00000022 GPIO_EventOutputConfig -08008d3c g F .text 00000004 TIM_SetCompare2 -08005c84 g F .text 0000001a DMA_Cmd -08004c58 g F .text 0000001e BKP_RTCOutputConfig -08004154 g F .text 00000056 reset_handler -0800898c g F .text 00000020 TIM_SelectCOM -08005f18 g F .text 0000000c FLASH_GetWriteProtectionOptionByte -080077d0 g F .text 0000000c RCC_ClearITPendingBit -08007b34 g F .text 0000000c SDIO_StopSDIOReadWait -080070cc g F .text 00000020 I2C_TransmitPEC -080060cc g F .text 000000c0 FLASH_ReadOutProtection -08006c68 g F .text 0000000c GPIO_ReadOutputDataBit -0800658c g F .text 00000020 FSMC_PCCARDDeInit -08008bac g F .text 00000026 TIM_CCxCmd -08008e0c g F .text 0000001e TIM_SetIC4Prescaler -08005cf0 g F .text 0000001c DMA_GetITStatus -080089cc g F .text 00000020 TIM_CCPreloadControl -08007040 g F .text 00000006 I2C_ReceiveData -08007e18 g F .text 00000004 SPI_I2S_SendData -08007ba8 g F .text 0000000c SDIO_ClearFlag -080054f4 g F .text 00000114 CAN_GetITStatus -08005608 g F .text 000000bc CAN_ClearITPendingBit -0800630c g F .text 0000007e FLASH_ProgramWord -08004e68 g F .text 0000013e CAN_FilterInit -08007804 g F .text 00000014 RTC_EnterConfigMode -0800586c g F .text 0000000c CRC_GetIDRegister -080041bc g F .text 00000008 IrqInterruptEnable -080071a8 g F .text 00000010 I2C_GetLastEvent -080048dc g F .text 00000016 ADC_DMACmd -080059a8 g F .text 0000002c DAC_WaveGenerationCmd -080068b4 g F .text 0000002e FSMC_PCCARDCmd -08007914 g F .text 00000014 RTC_ClearFlag -08007b64 g F .text 0000000c SDIO_CommandCompletionCmd -080079e0 g F .text 0000001a SDIO_SetPowerState -08004484 g F .text 00000006 __get_FAULTMASK -08005824 g F .text 0000002e CRC_CalcBlockCRC -080089ec g F .text 00000016 TIM_OC1PreloadConfig -08004920 g F .text 0000000a ADC_StartCalibration -080044a4 g F .text 00000004 __REV -0800772c g F .text 0000000c RCC_MCOConfig -0800470c g F .text 00000084 NVIC_Init -08007130 g F .text 00000020 I2C_ARPCmd -08006fc8 g F .text 0000001a I2C_OwnAddress2Config -08004bfc g F .text 0000001c ADC_GetITStatus -08007e1c g F .text 00000006 SPI_I2S_ReceiveData -08007bd4 g F .text 00000074 SPI_I2S_DeInit -08005168 g F .text 00000092 CAN_TransmitStatus -08005944 g F .text 0000003c DAC_SoftwareTriggerCmd -08007ebc g F .text 00000006 SPI_GetCRCPolynomial -08008808 g F .text 00000014 TIM_ETRClockMode2Config -080074cc g F .text 00000024 RCC_ITConfig -080078a8 g F .text 00000018 RTC_GetDivider -08008b1c g F .text 00000016 TIM_OC1NPolarityConfig -0800890c g F .text 00000016 TIM_ForcedOC1Config -08005860 g F .text 0000000c CRC_SetIDRegister -080062d0 g F .text 0000003a FLASH_ProgramHalfWord -080087c0 g F .text 00000018 TIM_DMACmd -0800881c g F .text 0000001e TIM_ETRClockMode1Config -08007ec4 g F .text 0000001c SPI_BiDirectionalLineConfig -080044e0 g F .text 00000006 __STREXW -080057a4 g F .text 00000024 CEC_ClearFlag -08007834 g F .text 00000014 RTC_GetCounter -08008df0 g F .text 0000001c TIM_SetIC3Prescaler -080093d0 g F .text 00000020 USART_SmartCardCmd -080094ac g F .text 0000000c USART_GetFlagStatus -08008ad8 g F .text 00000016 TIM_ClearOC3Ref -080044c8 g F .text 00000006 __LDREXW -080095e0 g .text 00000000 _etext -08007a0c g F .text 00000024 SDIO_ITConfig -08004be8 g F .text 0000000c ADC_GetFlagStatus -0800745c g F .text 00000016 RCC_SYSCLKConfig -08004a34 g F .text 00000016 ADC_ExternalTrigConvCmd -080052e4 g F .text 00000016 CAN_FIFORelease -08005c28 g F .text 00000040 DMA_Init -0800647c g F .text 00000040 FLASH_ErasePage -08005d20 g F .text 00000020 EXTI_DeInit -0800776c g F .text 0000003a RCC_WaitForHSEStartUp -080092f0 g F .text 0000001c USART_SetAddress -08005cb8 g F .text 00000006 DMA_GetCurrDataCounter -08006cc8 g F .text 0000000c GPIO_EventOutputCmd -08007b4c g F .text 0000000c SDIO_SetSDIOOperation -080093bc g F .text 00000014 USART_SetPrescaler -08005e68 g F .text 0000001a FLASH_HalfCycleAccessCmd -0800442c g F .text 00000012 TimerISRHandler -08004a78 g F .text 00000016 ADC_InjectedDiscModeCmd -08007714 g F .text 0000000c RCC_BackupResetCmd -08009450 g F .text 00000020 USART_OneBitMethodCmd -0800684c g F .text 0000002e FSMC_NORSRAMCmd -08005814 g F .text 0000000e CRC_CalcCRC -0800724c g F .text 0000000c IWDG_SetReload -08008774 g F .text 00000028 TIM_CtrlPWMOutputs -08007024 g F .text 00000018 I2C_ITConfig -08004790 g F .text 00000016 NVIC_SetVectorTable -080048c4 g F .text 00000016 ADC_Cmd -08005f68 g F .text 00000028 FLASH_GetFlagStatus -08005a5c g F .text 00000010 DBGMCU_GetREVID -08004c98 g F .text 00000020 BKP_WriteBackupRegister -08004bb0 g F .text 0000000e ADC_AnalogWatchdogSingleChannelConfig -08006cd4 g F .text 0000007a GPIO_PinRemapConfig -08004954 g F .text 00000012 ADC_DiscModeChannelCountConfig -08005420 g F .text 00000008 CAN_GetLSBTransmitErrorCounter -08005754 g F .text 0000000e CEC_ReceiveDataByte -08005f34 g F .text 00000010 FLASH_GetPrefetchBufferStatus -080095d0 g F .text 00000010 WWDG_ClearFlag -08007720 g F .text 0000000c RCC_ClockSecuritySystemCmd -08004fd0 g F .text 0000003e CAN_SlaveStartBank -080077a8 g F .text 00000012 RCC_ClearFlag -08008754 g F .text 00000020 TIM_Cmd -08008a34 g F .text 00000018 TIM_OC4PreloadConfig -20000010 g O .data 00000004 SystemCoreClock -0800652c g F .text 0000003a FSMC_NORSRAMDeInit -08004c18 g F .text 00000008 ADC_ClearITPendingBit -08006440 g F .text 0000003c FLASH_EraseAllPages -08007b94 g F .text 00000014 SDIO_GetFlagStatus -080051fc g F .text 0000002a CAN_CancelTransmit -080044b0 g F .text 00000006 __RBIT -08009390 g F .text 0000000c USART_ReceiveData -080073c8 g F .text 0000004a RCC_HSEConfig -08005028 g F .text 0000005e CAN_TTComModeCmd -08009044 g F .text 0000000a TIM_ClearFlag -080069ec g F .text 00000036 FSMC_GetITStatus -08005730 g F .text 0000000c CEC_OwnAddressConfig -08007e8c g F .text 00000020 SPI_CalculateCRC -08009068 g F .text 0000000a TIM_ClearITPendingBit -0800448c g F .text 00000006 __set_FAULTMASK -08005cb4 g F .text 00000004 DMA_SetCurrDataCounter -08009028 g F .text 00000006 TIM_GetCounter -08007eec g F .text 0000000a SPI_I2S_ClearFlag -08007684 g F .text 00000024 RCC_APB2PeriphClockCmd -08007a7c g F .text 0000000e SDIO_GetCommandResponse -08006f28 g F .text 00000020 I2C_DMACmd -08009018 g F .text 00000006 TIM_GetCapture3 -080070ec g F .text 0000001c I2C_PECPositionConfig -08006b7c g F .text 000000c4 GPIO_Init -08007438 g F .text 00000018 RCC_PLLConfig -080074fc g F .text 00000016 RCC_ADCCLKConfig -08005418 g F .text 00000008 CAN_GetReceiveErrorCounter -0800490c g F .text 0000000a ADC_ResetCalibration -0800927c g F .text 00000020 USART_Cmd -08004b94 g F .text 00000012 ADC_AnalogWatchdogCmd -08006b60 g F .text 0000001a GPIO_AFIODeInit -08004cec g F .text 00000014 BKP_ClearFlag -08009008 g F .text 00000006 TIM_GetCapture1 -080057c8 g F .text 00000018 CEC_GetITStatus -0800948c g F .text 00000020 USART_IrDACmd -080047cc g F .text 0000001a SysTick_CLKSourceConfig -08006c90 g F .text 00000004 GPIO_Write -08005f08 g F .text 00000010 FLASH_GetUserOptionByte -08006c74 g F .text 00000006 GPIO_ReadOutputData -080085a4 g F .text 000000aa TIM_OC3Init -08007514 g F .text 0000003a RCC_LSEConfig -08007108 g F .text 00000020 I2C_CalculatePEC -08009518 g F .text 00000016 USART_ClearITPendingBit -08007570 g F .text 0000000c RCC_RTCCLKCmd -08004ad8 g F .text 0000006e ADC_InjectedChannelConfig -08005d0c g F .text 00000014 DMA_ClearITPendingBit -080080b0 g F .text 00000280 TIM_DeInit -080076a8 g F .text 00000024 RCC_APB1PeriphClockCmd -08006058 g F .text 00000074 FLASH_UserOptionByteConfig -0800543c g F .text 0000007c CAN_GetFlagStatus -080077bc g F .text 00000014 RCC_GetITStatus -080072dc g F .text 0000000c PWR_WakeUpPinCmd -0800680c g F .text 00000040 FSMC_PCCARDStructInit -08004494 g F .text 00000006 __get_CONTROL -08007ef8 g F .text 00000032 SPI_I2S_GetITStatus -08009038 g F .text 0000000c TIM_GetFlagStatus -08007ee0 g F .text 0000000c SPI_I2S_GetFlagStatus -08007660 g F .text 00000024 RCC_AHBPeriphClockCmd -08004980 g F .text 000000b4 ADC_RegularChannelConfig -08008a7c g F .text 00000016 TIM_OC3FastConfig -0800703c g F .text 00000004 I2C_SendData -080064f0 g F .text 0000003c FLASH_EraseAllBank1Pages -08004a4c g F .text 00000006 ADC_GetConversionValue -08004d30 g F .text 00000042 CAN_DeInit -080089ac g F .text 00000020 TIM_SelectCCDMA -08005774 g F .text 0000000c CEC_EndOfMessageCmd -08005f44 g F .text 00000024 FLASH_ITConfig -08009430 g F .text 00000020 USART_OverSampling8Cmd -08005980 g F .text 00000026 DAC_DualSoftwareTriggerCmd -08005c68 g F .text 0000001c DMA_StructInit -08008fec g F .text 0000001c TIM_SetClockDivision -08007db8 g F .text 00000020 I2S_Cmd -08007868 g F .text 00000020 RTC_SetPrescaler -080067d0 g F .text 0000003c FSMC_NANDStructInit -08007e44 g F .text 00000020 SPI_SSOutputCmd -08007e64 g F .text 0000001c SPI_DataSizeConfig -08005ee0 g F .text 00000012 FLASH_Lock -08007258 g F .text 00000010 IWDG_ReloadCounter -08006de4 g F .text 00000104 I2C_Init -08005cc0 g F .text 0000001c DMA_GetFlagStatus -08004ba8 g F .text 00000006 ADC_AnalogWatchdogThresholdsConfig -08005e44 g F .text 0000000c EXTI_ClearITPendingBit -08004c40 g F .text 0000000c BKP_TamperPinCmd -080072ac g F .text 0000000c PWR_BackupAccessCmd -08004444 g F .text 00000008 __get_PSP -0800492c g F .text 00000008 ADC_GetCalibrationStatus -20000038 g .bss 00000000 _ebss -080053c4 g F .text 0000001c CAN_Sleep -080094c4 g F .text 00000054 USART_GetITStatus -08007af0 g F .text 0000000c SDIO_GetDataCounter -0800444c g F .text 00000006 __set_PSP -0800638c g F .text 000000b4 FLASH_EraseOptionBytes -08007888 g F .text 00000020 RTC_SetAlarm -08008420 g F .text 000000d2 TIM_OC1Init -08004934 g F .text 00000016 ADC_SoftwareStartConvCmd -08008a1c g F .text 00000016 TIM_OC3PreloadConfig -08004918 g F .text 00000008 ADC_GetResetCalibrationStatus -08007b1c g F .text 0000000c SDIO_GetFIFOCount -08006c60 g F .text 00000006 GPIO_ReadInputData -08008d34 g F .text 00000004 TIM_SetAutoreload -08009348 g F .text 0000001c USART_LINBreakDetectLengthConfig -080078d4 g F .text 0000002a RTC_WaitForSynchro +08004154 g F .text 0000005c reset_handler +080041c0 g F .text 0000000e IrqInterruptEnable +08004540 g .text 00000000 _etext +08004438 g F .text 00000012 TimerISRHandler +0800451c g F .text 00000024 RCC_APB2PeriphClockCmd +08004450 g F .text 000000c4 GPIO_Init +2000000c g .bss 00000000 _ebss 00000100 g *ABS* 00000000 __STACKSIZE__ -08007738 g F .text 00000032 RCC_GetFlagStatus -08004440 g F .text 00000002 UnusedISR -080079d4 g F .text 0000000c SDIO_ClockCmd -08004c20 g F .text 00000014 BKP_DeInit -08004200 g F .text 0000003a LedInit -080064bc g F .text 00000032 FLASH_WaitForLastBank1Operation -08007b58 g F .text 0000000c SDIO_SendSDIOSuspendCmd -08005314 g F .text 000000ae CAN_OperatingModeRequest -08007b28 g F .text 0000000c SDIO_StartSDIOReadWait -08007aa8 g F .text 00000030 SDIO_DataConfig -08006c7c g F .text 00000004 GPIO_SetBits -08005e04 g F .text 00000014 EXTI_GetFlagStatus -08004a90 g F .text 0000000e ADC_ExternalTrigInjectedConvConfig -08007474 g F .text 00000010 RCC_GetSYSCLKSource -0800896c g F .text 00000020 TIM_ARRPreloadConfig -08006c84 g F .text 0000000a GPIO_WriteBit -08004d00 g F .text 0000000e BKP_GetITStatus -08004a60 g F .text 00000016 ADC_AutoInjectedConvCmd -08007848 g F .text 00000020 RTC_SetCounter -08004ab8 g F .text 00000016 ADC_SoftwareStartInjectedConvCmd -08007bb4 g F .text 00000014 SDIO_GetITStatus -08006f68 g F .text 00000020 I2C_GenerateSTART -08006ee8 g F .text 0000001e I2C_StructInit -08004d10 g F .text 00000014 BKP_ClearITPendingBit -080095a0 g F .text 00000010 WWDG_SetCounter -080044b8 g F .text 00000008 __LDREXB -08006d94 g F .text 0000000c GPIO_ETH_MediaInterfaceConfig -08009050 g F .text 00000018 TIM_GetITStatus -0800757c g F .text 000000e4 RCC_GetClocksFreq -08005e84 g F .text 0000001a FLASH_PrefetchBufferCmd -08008bfc g F .text 00000062 TIM_SelectOCxM -08007094 g F .text 0000001c I2C_NACKPositionConfig -080041e4 g F .text 0000001c IrqInterruptRestore -08005df0 g F .text 00000012 EXTI_GenerateSWInterrupt -08009134 g F .text 000000f0 USART_Init -0800687c g F .text 00000036 FSMC_NANDCmd -08006990 g F .text 0000002a FSMC_GetFlagStatus -08006934 g F .text 0000005a FSMC_ITConfig -08005228 g F .text 000000ba CAN_Receive -080054b8 g F .text 0000003c CAN_ClearFlag -08004d74 g F .text 000000f4 CAN_Init -20000028 g .bss 00000000 _bss -08004474 g F .text 00000006 __get_PRIMASK -08008a4c g F .text 00000016 TIM_OC1FastConfig -08005764 g F .text 00000010 CEC_StartOfMessage -08007234 g F .text 0000000c IWDG_WriteAccessCmd -08005f9c g F .text 00000044 FLASH_GetStatus -08004fa8 g F .text 00000028 CAN_StructInit -20000000 g O .data 00000010 AHBPrescTable -08009410 g F .text 00000020 USART_HalfDuplexCmd -08005e18 g F .text 0000000c EXTI_ClearFlag -08005a80 g F .text 00000024 DBGMCU_Config -080071b8 g F .text 00000040 I2C_GetFlagStatus -08005f90 g F .text 0000000c FLASH_ClearFlag -08006f48 g F .text 00000020 I2C_DMALastTransferCmd -08006024 g F .text 00000032 FLASH_WaitForLastOperation -08008a04 g F .text 00000018 TIM_OC2PreloadConfig -0800755c g F .text 00000012 RCC_RTCCLKConfig -0800885c g F .text 00000016 TIM_SelectInputTrigger -08007b40 g F .text 0000000c SDIO_SetSDIOReadWaitMode -0800879c g F .text 00000018 TIM_ITConfig -080070b0 g F .text 0000001c I2C_SMBusAlertConfig -080084f4 g F .text 000000ae TIM_OC2Init -08007268 g F .text 00000010 IWDG_Enable -0800929c g F .text 0000003a USART_ITConfig -08005a1c g F .text 00000018 DAC_SetDualChannelData -08005d40 g F .text 0000009c EXTI_Init -080044ac g F .text 00000004 __REVSH -08005854 g F .text 0000000c CRC_GetCRC -08005878 g F .text 0000001c DAC_DeInit -080059d4 g F .text 00000024 DAC_SetChannel1Data -08006a24 g F .text 0000002e FSMC_ClearITPendingBit -0800883c g F .text 00000006 TIM_PrescalerConfig -08007e24 g F .text 0000001e SPI_NSSInternalSoftwareConfig -08006da0 g F .text 00000042 I2C_DeInit -08007b70 g F .text 00000016 SDIO_CEATAITCmd -08006f08 g F .text 00000020 I2C_Cmd -08007928 g F .text 00000028 RTC_GetITStatus -08006c80 g F .text 00000004 GPIO_ResetBits -08008b94 g F .text 00000018 TIM_OC4PolarityConfig -08008cdc g F .text 0000001c TIM_SelectOutputTrigger -080071f8 g F .text 0000000a I2C_ClearFlag -08007b88 g F .text 0000000c SDIO_SendCEATACmd -08007e80 g F .text 0000000c SPI_TransmitCRC -08006274 g F .text 0000005a FLASH_ProgramOptionByteData -0800954c g F .text 00000016 WWDG_SetPrescaler -08009470 g F .text 0000001c USART_IrDAConfig -08008d40 g F .text 00000004 TIM_SetCompare3 -08005428 g F .text 00000014 CAN_ITConfig -08008650 g F .text 0000008c TIM_OC4Init -080079c0 g F .text 00000012 SDIO_StructInit -08007a3c g F .text 00000030 SDIO_SendCommand -0800494c g F .text 00000008 ADC_GetSoftwareStartConvStatus -080065ac g F .text 000000da FSMC_NORSRAMInit -08008ca0 g F .text 00000020 TIM_SelectHallSensor -08009590 g F .text 00000010 WWDG_EnableIT -080053e0 g F .text 0000002e CAN_WakeUp -08004a54 g F .text 0000000c ADC_GetDualModeConversionValue -08006d50 g F .text 00000042 GPIO_EXTILineConfig -080059f8 g F .text 00000024 DAC_SetChannel2Data -08007048 g F .text 00000010 I2C_Send7bitAddress -08007bc8 g F .text 0000000c SDIO_ClearITPendingBit -08008d4c g F .text 0000001c TIM_SetIC1Prescaler -08009074 g F .text 000000c0 USART_DeInit -08007d80 g F .text 00000016 I2S_StructInit -08009564 g F .text 0000002c WWDG_SetWindowValue -08007afc g F .text 0000000e SDIO_ReadData -08007170 g F .text 0000001c I2C_FastModeDutyCycleConfig -08005e24 g F .text 00000020 EXTI_GetITStatus -08008954 g F .text 00000018 TIM_ForcedOC4Config -080072e8 g F .text 00000044 PWR_EnterSTOPMode -08007a30 g F .text 0000000c SDIO_DMACmd -08005e50 g F .text 00000016 FLASH_SetLatency -08007414 g F .text 00000016 RCC_AdjustHSICalibrationValue -080042ac g F .text 0000012e main -08007f2c g F .text 00000016 SPI_I2S_ClearITPendingBit -08007a6c g F .text 00000010 SDIO_CmdStructInit -08009240 g F .text 0000002c USART_ClockInit -080088a8 g F .text 00000014 TIM_ITRxExternalClockConfig -08008b64 g F .text 00000018 TIM_OC3PolarityConfig -08006688 g F .text 00000068 FSMC_NANDInit -080095c0 g F .text 0000000e WWDG_GetFlagStatus -0800939c g F .text 0000000c USART_SendBreak -08007e00 g F .text 00000018 SPI_I2S_DMACmd -0800449c g F .text 00000006 __set_CONTROL -080087d8 g F .text 00000012 TIM_InternalClockConfig -08008b04 g F .text 00000016 TIM_OC1PolarityConfig -08008a64 g F .text 00000018 TIM_OC2FastConfig -0800749c g F .text 00000016 RCC_PCLK1Config -08005748 g F .text 0000000c CEC_SendDataByte -08005ddc g F .text 00000012 EXTI_StructInit -08007a8c g F .text 0000001c SDIO_GetResponse -08007278 g F .text 00000014 IWDG_GetFlagStatus -08008d30 g F .text 00000004 TIM_SetCounter -080074f0 g F .text 0000000c RCC_USBCLKConfig -080052fc g F .text 00000018 CAN_MessagePending -080043dc g F .text 0000000c TimerSet -080074b4 g F .text 00000016 RCC_PCLK2Config -08005780 g F .text 00000022 CEC_GetFlagStatus -08008d44 g F .text 00000006 TIM_SetCompare4 -08007004 g F .text 00000020 I2C_GeneralCallCmd -08009010 g F .text 00000006 TIM_GetCapture2 -08007d98 g F .text 00000020 SPI_Cmd -08004454 g F .text 00000008 __get_MSP -080094b8 g F .text 0000000a USART_ClearFlag -08009030 g F .text 00000006 TIM_GetPrescaler -08008ac4 g F .text 00000014 TIM_ClearOC2Ref -08007074 g F .text 00000020 I2C_SoftwareResetCmd -080044e8 g F .text 00000130 SystemInit -080068e4 g F .text 00000036 FSMC_NANDECCCmd -08008e2c g F .text 000001c0 TIM_ICInit -08006a54 g F .text 0000010c GPIO_DeInit -080058cc g F .text 0000000e DAC_StructInit -08004b48 g F .text 00000012 ADC_InjectedSequencerLengthConfig -08007384 g F .text 00000044 RCC_DeInit -08007290 g F .text 0000001c PWR_DeInit -0800872c g F .text 00000014 TIM_ICStructInit -08008d88 g F .text 00000066 TIM_PWMIConfig -08007ad8 g F .text 00000016 SDIO_DataStructInit -08005ef4 g F .text 00000012 FLASH_LockBank1 -080057e0 g F .text 00000024 CEC_ClearITPendingBit -08005a6c g F .text 00000014 DBGMCU_GetDEVID -080048ac g F .text 00000016 ADC_StructInit -080044a8 g F .text 00000004 __REV16 -080048f4 g F .text 00000016 ADC_ITConfig -08008b4c g F .text 00000018 TIM_OC2NPolarityConfig -080047a8 g F .text 00000024 NVIC_SystemLPConfig -08008aac g F .text 00000016 TIM_ClearOC1Ref -080066f0 g F .text 00000070 FSMC_PCCARDInit -08004cb8 g F .text 00000022 BKP_ReadBackupRegister -080076f0 g F .text 00000024 RCC_APB1PeriphResetCmd -08004bf4 g F .text 00000008 ADC_ClearFlag -20000000 g .data 00000000 _data -0800445c g F .text 00000006 __set_MSP -0800423c g F .text 00000070 LedToggle -08005ca0 g F .text 00000014 DMA_ITConfig -08004c78 g F .text 0000001e BKP_SetRTCCalibrationValue -08006568 g F .text 00000022 FSMC_NANDDeInit -08007204 g F .text 00000022 I2C_GetITStatus -08008c80 g F .text 00000020 TIM_UpdateRequestConfig -0800893c g F .text 00000016 TIM_ForcedOC3Config -08008874 g F .text 00000034 TIM_TIxExternalClockConfig -08007150 g F .text 00000020 I2C_StretchClockCmd -0800930c g F .text 0000001c USART_WakeUpConfig -08006c40 g F .text 00000014 GPIO_StructInit -080047e8 g F .text 00000074 ADC_DeInit -08008740 g F .text 00000014 TIM_BDTRStructInit -08008714 g F .text 00000016 TIM_OCStructInit -08005f24 g F .text 00000010 FLASH_GetReadOutProtectionStatus -08008b7c g F .text 00000018 TIM_OC3NPolarityConfig -08004aa0 g F .text 00000016 ADC_ExternalTrigInjectedConvCmd -0800485c g F .text 00000050 ADC_Init -08009384 g F .text 0000000c USART_SendData -20000138 g .bss 00000000 _estack -08008bd4 g F .text 00000026 TIM_CCxNCmd -080056c4 g F .text 0000001c CEC_DeInit -08004b5c g F .text 00000018 ADC_SetInjectedOffset -08005910 g F .text 00000034 DAC_DMACmd -080078c0 g F .text 00000012 RTC_WaitForLastTask -0800446c g F .text 00000006 __set_BASEPRI -08008d14 g F .text 0000001c TIM_SelectMasterSlaveMode -08007058 g F .text 0000001a I2C_ReadRegister -08004bc0 g F .text 00000026 ADC_TempSensorVrefintCmd -08007eac g F .text 0000000e SPI_GetCRC -20000028 g .data 00000000 _edata -08009328 g F .text 00000020 USART_ReceiverWakeUpCmd -08009020 g F .text 00000008 TIM_GetCapture4 -08005a34 g F .text 00000028 DAC_GetDataOutputValue -08009224 g F .text 0000001a USART_StructInit -080095b0 g F .text 00000010 WWDG_Enable -08005010 g F .text 00000016 CAN_DBGFreeze -08009530 g F .text 0000001c WWDG_DeInit -080058dc g F .text 00000034 DAC_Cmd -08004cdc g F .text 0000000e BKP_GetFlagStatus -08008330 g F .text 000000f0 TIM_TimeBaseInit +0800444c g F .text 00000002 UnusedISR +080041d0 g F .text 00000046 LedInit +08004514 g F .text 00000004 GPIO_SetBits +20000000 g .bss 00000000 _bss +08004518 g F .text 00000004 GPIO_ResetBits +0800429c g F .text 00000146 main +080043e4 g F .text 0000000c TimerSet +20000000 g .text 00000000 _data +08004218 g F .text 00000082 LedToggle +2000010c g .bss 00000000 _estack +20000000 g .text 00000000 _edata 08004000 g O .text 00000154 _vectab -08004b74 g F .text 0000001e ADC_GetInjectedConversionValue -0800735c g F .text 00000014 PWR_GetFlagStatus -080056e0 g F .text 00000024 CEC_Init -08005894 g F .text 00000036 DAC_Init -08007900 g F .text 00000014 RTC_GetFlagStatus -08005410 g F .text 00000008 CAN_GetLastErrorCode -080093f0 g F .text 00000020 USART_SmartCardNACKCmd -080072c4 g F .text 00000016 PWR_PVDLevelConfig -08007818 g F .text 0000001a RTC_ExitConfigMode -08007128 g F .text 00000008 I2C_GetPEC -080044d8 g F .text 00000006 __STREXH -08004618 g F .text 000000e0 SystemCoreClockUpdate -08006760 g F .text 00000070 FSMC_NORSRAMStructInit -08009364 g F .text 00000020 USART_LINCmd -08007950 g F .text 00000014 RTC_ClearITPendingBit -08004c34 g F .text 0000000c BKP_TamperPinLevelConfig -080087b8 g F .text 00000008 TIM_DMAConfig -08004968 g F .text 00000016 ADC_DiscModeCmd -08007dd8 g F .text 00000026 SPI_I2S_ITConfig -08005804 g F .text 00000010 CRC_ResetDR -080044c0 g F .text 00000008 __LDREXH -080041c4 g F .text 0000001e IrqInterruptDisable -080087b4 g F .text 00000004 TIM_GenerateEvent -08006fe4 g F .text 00000020 I2C_DualAddressCmd -080077dc g F .text 00000028 RTC_ITConfig -08005cdc g F .text 00000014 DMA_ClearFlag -0800798c g F .text 00000034 SDIO_Init -080086dc g F .text 00000024 TIM_BDTRConfig -08007240 g F .text 0000000c IWDG_SetPrescaler -0800618c g F .text 000000e8 FLASH_EnableWriteProtection -08007370 g F .text 00000012 PWR_ClearFlag -08006c94 g F .text 00000010 GPIO_PinLockConfig -08007550 g F .text 0000000c RCC_LSICmd -08006fa8 g F .text 00000020 I2C_AcknowledgeConfig -08008d68 g F .text 0000001e TIM_SetIC2Prescaler -080087ec g F .text 0000001a TIM_ETRConfig -08004464 g F .text 00000006 __get_BASEPRI -20000038 g .bss 00000000 _stack -0800926c g F .text 0000000e USART_ClockStructInit -0800718c g F .text 0000001a I2C_CheckEvent -080076cc g F .text 00000024 RCC_APB2PeriphResetCmd -08008cf8 g F .text 0000001c TIM_SelectSlaveMode -08006f88 g F .text 00000020 I2C_GenerateSTOP -08007d64 g F .text 0000001c SPI_StructInit -08007c48 g F .text 00000048 SPI_Init -080046f8 g F .text 00000014 NVIC_PriorityGroupConfig -08004420 g F .text 0000000c TimerGet -080079fc g F .text 00000010 SDIO_GetPowerState -08005aa4 g F .text 00000182 DMA_DeInit -08004c4c g F .text 0000000c BKP_ITConfig -0800573c g F .text 0000000c CEC_SetPrescaler -08008af0 g F .text 00000014 TIM_ClearOC4Ref -08008cc0 g F .text 0000001c TIM_SelectOnePulseMode -080044d0 g F .text 00000006 __STREXB -080088bc g F .text 0000004e TIM_EncoderInterfaceConfig -08004ad0 g F .text 00000008 ADC_GetSoftwareStartInjectedConvCmdStatus -08007228 g F .text 0000000a I2C_ClearITPendingBit -08008d38 g F .text 00000004 TIM_SetCompare1 -08008b34 g F .text 00000018 TIM_OC2PolarityConfig -08008c60 g F .text 00000020 TIM_UpdateDisableConfig -08006c54 g F .text 0000000c GPIO_ReadInputDataBit -08005fe0 g F .text 00000044 FLASH_GetBank1Status -080092d8 g F .text 00000018 USART_DMACmd -080043e8 g F .text 00000036 TimerInit -08008a94 g F .text 00000018 TIM_OC4FastConfig -08007b0c g F .text 0000000e SDIO_WriteData -08005088 g F .text 000000e0 CAN_Transmit -08005724 g F .text 0000000c CEC_ITConfig -08007c90 g F .text 000000d2 I2S_Init -080072b8 g F .text 0000000c PWR_PVDCmd -08007484 g F .text 00000016 RCC_HCLKConfig -08005ec0 g F .text 0000001e FLASH_UnlockBank1 -080069bc g F .text 0000002e FSMC_ClearFlag -08008844 g F .text 00000016 TIM_CounterModeConfig -08007964 g F .text 00000028 SDIO_DeInit +2000000c g .bss 00000000 _stack +0800442c g F .text 0000000c TimerGet +080043f0 g F .text 0000003c TimerInit diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.srec index f2e6f8d8..ec38ffcc 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/bin/demoprog_olimex_stm32h103.srec @@ -1,1379 +1,86 @@ S025000062696E2F64656D6F70726F675F6F6C696D65785F73746D3332683130332E7372656339 -S315080040003801002055410008414400084144000891 -S31508004010414400084144000841440008414400085E -S31508004020414400084144000841440008414400084E -S315080040304144000841440008414400082D44000852 -S31508004040414400084144000841440008414400082E -S31508004050414400084144000841440008414400081E -S31508004060414400084144000841440008414400080E -S3150800407041440008414400084144000841440008FE -S3150800408041440008414400084144000841440008EE -S3150800409041440008414400084144000841440008DE -S315080040A041440008414400084144000841440008CE -S315080040B041440008414400084144000841440008BE -S315080040C041440008414400084144000841440008AE -S315080040D0414400084144000841440008414400089E -S315080040E0414400084144000841440008414400088E -S315080040F0414400084144000841440008414400087E -S31508004100414400084144000841440008414400086D -S31508004110414400084144000841440008414400085D -S31508004120414400084144000841440008414400084D -S31508004130414400084144000841440008414400083D -S31508004140414400084144000841440008414400082D -S31508004150EE11AA5508B515498D4640F20002C2F27D -S31508004160000240F22803C2F200039A4211D249F231 -S31508004170E052C0F6000240F20003C2F2000340F229 -S315080041802800C2F2000052F8041B43F8041B8342BD -S31508004190F9D3074807494FF000028842B8BF40F8EC -S315080041A0042BFADB00F082F808BD00003801002075 -S315080041B0280000203800002062B6704708B5FFF7CF -S315080041C0FBFF08BD40F22803C2F200031A7802B9C1 -S315080041D072B640F22803C2F2000302F101021A7015 -S315080041E0704700BF08B540F22803C2F200031A78E8 -S315080041F002F1FF32D2B21A700AB9FFF7DDFF08BD25 -S3150800420000B583B04FF010004FF0010103F03AFA01 -S315080042104FF48053ADF804304FF003038DF80630A1 -S315080042204FF010038DF807304FF48050C4F20100A8 -S3150800423001A902F0A3FC03B000BD00BF10B500F051 -S31508004240EFF8044640F22C03C2F200031B68C31AB7 -S31508004250B3F5FA7F29D340F23003C2F200031B7884 -S315080042607BB940F23003C2F200034FF001021A7024 -S315080042704FF48050C4F201004FF4805102F000FD63 -S315080042800EE040F23003C2F200034FF000021A704B -S315080042904FF48050C4F201004FF4805102F0EEFC56 -S315080042A040F22C03C2F200031C6010BD00B583B0B7 -S315080042B04FF00003019300934FF48053C4F20203B6 -S315080042C01A6842F001021A6059684FF00002CFF6E8 -S315080042D0FF0201EA02025A601A6822F0847222F486 -S315080042E080321A601A6822F480221A605A6822F408 -S315080042F0FE025A604FF41F029A601A6842F480322E -S315080043001A604FF48053C4F2020340F2DC52196873 -S3150800431001F400310091019901F10101019100991F -S3150800432011B901999142F2D14FF48053C4F20203B4 -S315080043301B6813F4003F00D1FEE74FF40053C4F2A4 -S3150800434002031A6842F010021A601A6822F0030281 -S315080043501A601A6842F002021A604FF48053C4F2D7 -S3150800436002035A685A605A6842F400525A605A68F8 -S3150800437042F480625A605A6822F47C125A605A687B -S3150800438042F4E8125A601A6842F080721A604FF4D2 -S315080043908053C4F202031A6812F0007FFBD04FF470 -S315080043A08053C4F202035A6822F003025A605A681C -S315080043B042F002025A604FF48053C4F202035A686C -S315080043C002F00C02082AFAD1FFF71AFF00F00CF8DF -S315080043D0FFF7F4FEFFF732FFFCE700BF40F23403B5 -S315080043E0C2F200031860704708B54EF21003CEF209 -S315080043F0000341F63F12C0F201025A604FF46D42C3 -S31508004400CEF200024FF0F00182F823104FF00000C0 -S3150800441098604FF007021A60FFF7E0FF08BD00BF7B -S3150800442040F23403C2F200031868704740F23403BE -S31508004430C2F200031A6802F101021A60704700BF4F -S31508004440FEE700BFEFF309800046704780F309884E -S31508004450704700BFEFF308800046704780F308886E -S31508004460704700BFEFF31280704700BF80F31188D2 -S31508004470704700BFEFF31080704700BF80F31088C5 -S31508004480704700BFEFF31380704700BF80F31388AF -S31508004490704700BFEFF31480704700BF80F314889D -S315080044A0704700BF00BA704740BA7047C0BA704735 -S315080044B090FAA0F0704700BFD0E84F0FC0B270471F -S315080044C0D0E85F0F80B2704750E8000F704700BF12 -S315080044D0C1E8400F704700BFC1E8500F704700BFE2 -S315080044E041E80000704700BF82B04FF48053C4F221 -S315080044F002031A6842F001021A6059684FF0000276 -S31508004500CFF6FF0201EA02025A601A6822F08472A4 -S3150800451022F480321A601A6822F480221A605A68D5 -S3150800452022F4FE025A604FF41F029A604FF000020E -S31508004530019200921A6842F480321A604FF480524F -S31508004540C4F20202136803F400330093019B03F1DB -S3150800455001030193009B1BB9019BB3F5A06FF1D131 -S315080045604FF48053C4F202031B6813F4003F14BFD0 -S31508004570012300230093009B012B44D14FF40053E1 -S31508004580C4F202031A6842F010021A601A6822F08E -S3150800459003021A601A6842F002021A604FF4805346 -S315080045A0C4F202035A685A605A685A605A6842F452 -S315080045B080625A605A6822F47C125A605A6842F439 -S315080045C0E8125A601A6842F080721A604FF48052F4 -S315080045D0C4F20202136813F0007FFBD04FF4805335 -S315080045E0C4F202035A6822F003025A605A6842F07B -S315080045F002025A604FF48052C4F20202536803F072 -S315080046000C03082BFAD14FF46D43CEF200034FF09A -S3150800461000629A6002B070474FF48053C4F20203F6 -S315080046205B6803F00C03042B0DD0082B15D0002B68 -S3150800463044D140F21003C2F200034FF49052C0F284 -S315080046407A021A6043E040F21003C2F200034FF404 -S315080046509052C0F27A021A6039E04FF48053C4F2DD -S3150800466002035A685B68C2F3834202F1020213F43A -S31508004670803F0BD140F21003C2F200034FF41061E1 -S31508004680C0F23D0101FB02F21A6020E04FF48053AC -S31508004690C4F202035B6813F4003F40F21003C2F24F -S315080046A0000319BF4FF41061C0F23D014FF4905159 -S315080046B0C0F27A0101FB02F21A6008E040F2100328 -S315080046C0C2F200034FF49052C0F27A021A604FF415 -S315080046D08053C4F202035A68C2F3031240F200037D -S315080046E0C2F200039A5C40F21003C2F20003196892 -S315080046F021FA02F21A60704740F0BE6040F42020AA -S315080047004FF46D43CEF20003D860704710B4C378F7 -S315080047105BB34FF46D43CEF20003DB686FEA030325 -S31508004720C3F30223C3F10402417801FA02F24FF0FF -S315080047300F0121FA03F184782140114302784FEAE8 -S315080047400111C9B24FF46143CEF200039A1882F8F8 -S31508004750001302784FEA521102F01F024FF00100CF -S3150800476000FA02F243F8212010E003784FEA5312C8 -S3150800477003F01F034FF0010101FA03F14FF46143FF -S31508004780CEF2000302F1200243F8221010BC704753 -S3150800479021F0604121F07F0101434FF46D43CEF2D1 -S315080047A000039960704700BF39B14FF46D43CEF2EC -S315080047B000031A691043186170474FF46D43CEF22F -S315080047C000031A6922EA00001861704704284EF2AD -S315080047D01003CEF200031A680CBF42F0040222F05E -S315080047E004021A60704700BF08B54FF41053C4F2AC -S315080047F0010398420CD14FF400704FF0010102F00A -S3150800480065FF4FF400704FF0000102F05FFF08BD2E -S315080048104FF42053C4F2010398420CD14FF4806040 -S315080048204FF0010102F052FF4FF480604FF0000193 -S3150800483002F04CFF08BD4FF47053C4F201039842CE -S315080048400BD14FF400404FF0010102F03FFF4FF447 -S3150800485000404FF0000102F039FF08BD10B443686C -S3150800486023F4702323F480730A6813430A7943EA0E -S315080048700223436084688A68CB681A434FF2FD7343 -S31508004880CFF6F17304EA030342EA03034A7943EADB -S3150800489042038360C26A22F470020B7C03F1FF3381 -S315080048A0DBB242EA0353C36210BC70474FF0000301 -S315080048B00360037143718360C3604FF0010303749F -S315080048C0704700BF21B1836843F0010383607047D6 -S315080048D0836823F001038360704700BF21B18368B2 -S315080048E043F4807383607047836823F4807383601E -S315080048F0704700BFC9B21AB143681943416070478F -S31508004900436823EA01014160704700BF836843F0AA -S3150800491008038360704700BF8068C0F3C000704713 -S31508004920836843F004038360704700BF8068C0F360 -S315080049308000704721B1836843F4A0038360704701 -S31508004940836823F4A0038360704700BF8068C0F3C0 -S3150800495080507047436823F4604301F1FF3143EA0E -S3150800496041334360704700BF21B1436843F4006395 -S3150800497043607047436823F400634360704700BF91 -S3150800498070B4092910D9C66801EB4104A4F11E04C4 -S315080049904FF0070505FA04F526EA050503FA04F4B7 -S315080049A045EA0403C3600DE0066901EB41044FF0D4 -S315080049B0070505FA04F526EA050503FA04F445EAA7 -S315080049C004030361062A10D8446B02F1FF3202EB96 -S315080049D082024FF01F0303FA02F324EA030301FAE3 -S315080049E002F143EA0102426322E00C2A10D8046B62 -S315080049F002EB8202A2F123024FF01F0303FA02F32D -S31508004A0024EA030301FA02F143EA010202630FE012 -S31508004A10C46A02EB8202A2F141024FF01F0303FAB5 -S31508004A2002F324EA030301FA02F143EA0102C2622D -S31508004A3070BC704721B1836843F480138360704764 -S31508004A40836823F480138360704700BFC06C80B20C -S31508004A50704700BF42F24C43C4F20103186870471E -S31508004A6021B1436843F4806343607047436823F485 -S31508004A7080634360704700BF21B1436843F48053A5 -S31508004A8043607047436823F480534360704700BF10 -S31508004A90836823F4E04341EA03038360704700BF59 -S31508004AA021B1836843F4004383607047836823F425 -S31508004AB000438360704700BF21B1836843F4021343 -S31508004AC083607047836823F402138360704700BFCE -S31508004AD08068C0F34050704770B4092910D9C66879 -S31508004AE001EB4104A4F11E044FF0070505FA04F58D -S31508004AF026EA050503FA04F445EA0403C3600DE053 -S31508004B00066901EB41044FF0070505FA04F526EAA4 -S31508004B10050503FA04F445EA04030361836BC3F34A -S31508004B200154121B02F10202D2B202EB82024FF0CA -S31508004B301F0404FA02F423EA040301FA02F10B4300 -S31508004B40836370BC704700BF836B23F4401301F185 -S31508004B50FF3143EA01538363704700BF82B04FF0C9 -S31508004B60000301930190019BCB180193019B1A60E6 -S31508004B7002B0704782B04FF0000301930190019B89 -S31508004B8003F128035B180193019B186880B202B0F1 -S31508004B90704700BF436823F4400323F4007341EAD7 -S31508004BA003034360704700BF41628262704700BFDB -S31508004BB0436823F01F0341EA03034360704700BFBD -S31508004BC040B14FF41053C4F201039A6842F400024C -S31508004BD09A6070474FF41053C4F201039A6822F49E -S31508004BE000029A60704700BF036819420CBF002094 -S31508004BF0012070476FEA0101016070474268036847 -S31508004C0013EA112305D0C9B211420CBF00200120B6 -S31508004C1070474FF0000070476FEA11210160704736 -S31508004C2008B54FF0010002F075FD4FF0000002F0E4 -S31508004C3071FD08BD48F20463C4F20D23186070477D -S31508004C404FF40643C4F20D231860704748F2886390 -S31508004C50C4F20D23186070474FF4D842C4F200021C -S31508004C60938D23F460734FEA03434FEA134340EAF4 -S31508004C7003039385704700BF4FF4D842C4F200027D -S31508004C80938D23F07F034FEA03434FEA134340EA29 -S31508004C9003039385704700BF82B04FF0000301936A -S31508004CA04FF4D843C4F200030193019BC318019340 -S31508004CB0019B196002B0704782B04FF00003019360 -S31508004CC04FF4D843C4F200030193019BC318019320 -S31508004CD0019B188880B202B0704700BF48F2A063F3 -S31508004CE0C4F20D231868C0B2704700BF4FF4D8430A -S31508004CF0C4F200039A8E92B242F001029A86704775 -S31508004D0048F2A463C4F20D231868C0B2704700BF06 -S31508004D104FF4D843C4F200039A8E92B242F00202CC -S31508004D209A86704701420CBF00200120704700BFD9 -S31508004D3008B54FF4C843C4F2000398420CD14FF0AB -S31508004D4000704FF0010102F0D3FC4FF000704FF0F5 -S31508004D50000102F0CDFC08BD4FF080604FF0010164 -S31508004D6002F0C6FC4FF080604FF0000102F0C0FC74 -S31508004D7008BD00BF036823F002030360036843F01D -S31508004D8001030360436813F0010F07D14FF6FF7361 -S31508004D90426812F0010F01D1013BF9D1436813F0C3 -S31508004DA0010F5ED08B79012B03680CBF43F080039B -S31508004DB023F080030360CB79012B03680CBF43F013 -S31508004DC0400323F0400303600B7A012B03680CBFF2 -S31508004DD043F0200323F0200303604B7A012B03687A -S31508004DE00CBF43F0100323F0100303608B7A012BEA -S31508004DF003680CBF43F0080323F008030360CB7A6B -S31508004E00012B03680CBF43F0040323F0040303607B -S31508004E10CA788B784FEA837343EA02630A7943EACE -S31508004E2002434A7943EA02520B8803F1FF3342EA06 -S31508004E300303C361036823F001030360436813F0A7 -S31508004E40010F07D04FF6FF73426812F0010F01D029 -S31508004E50013BF9D1436813F0010F14BF002001206C -S31508004E6070474FF00000704770B4837A4FF0010125 -S31508004E7001FA03F14FF4C843C4F20003D3F8002241 -S31508004E8042F00102C3F80022D3F81C426FEA01027D -S31508004E9002EA0404C3F81C42037BE3B94FF4C8438F -S31508004EA0C4F20003D3F80C4202EA0404C3F80C4225 -S31508004EB0847AC688458845EA064504F1480443F8D5 -S31508004EC03450857A8688048844EA064405F14805FC -S31508004ED003EBC5035C60037B012B1CD14FF4C8436D -S31508004EE0C4F20003D3F80C4241EA0404C3F80C42A6 -S31508004EF0847A0688458845EA064504F1480443F855 -S31508004F003450857A8688C48844EA064405F14805FB -S31508004F1003EBC5035C60C37A53B94FF4C843C4F2C4 -S31508004F200003D3F8044202EA0404C3F8044209E081 -S31508004F304FF4C843C4F20003D3F8044241EA040418 -S31508004F40C3F80442038943B94FF4C843C4F20003C3 -S31508004F50D3F814422240C3F814220389012B01BF57 -S31508004F604FF4C843C4F20003D3F814220A4308BF17 -S31508004F70C3F81422437B012B01BF4FF4C843C4F284 -S31508004F800003D3F81C22114308BFC3F81C124FF4C0 -S31508004F90C843C4F20003D3F8002222F00102C3F882 -S31508004FA0002270BC704700BF4FF000038371C371C5 -S31508004FB0037243728372C3728370C3704FF0030324 -S31508004FC003714FF0020343714FF0010303807047EA -S31508004FD04FF4C843C4F20003D3F8002242F001029A -S31508004FE0C3F80022D3F8002222F47C5222F00E02E3 -S31508004FF0C3F80022D3F8002242EA0022C3F80022AE -S31508005000D3F8002222F00102C3F80022704700BF3D -S3150800501021B1036843F4803303607047036823F4BF -S3150800502080330360704700BFB1B1036843F0800363 -S315080050300360D0F8843143F48073C0F88431D0F823 -S31508005040943143F48073C0F89431D0F8A43143F412 -S315080050508073C0F8A4317047036823F080030360A7 -S31508005060D0F8843123F48073C0F88431D0F89431B1 -S3150800507023F48073C0F89431D0F8A43123F48073F4 -S31508005080C0F8A431704700BFF0B40346826812F036 -S31508005090806F18BF00200CD19A6812F0006F06D1F5 -S315080050A09A6812F0805F18BF022059D001E04FF0CD -S315080050B00100054600F118024FEA02129C5804F056 -S315080050C001049C500A7A5AB900F118024FEA0212F2 -S315080050D09E580F684C7A44EA475434439C500BE078 -S315080050E000F118044FEA04141E594F6842EAC70231 -S315080050F032434E7A32431A518A7A02F00F028A7282 -S3150800510005F118044FEA04141A19566826F00F0612 -S31508005110566056688F7A47EA060656608A7B4E7B43 -S315080051204FEA064646EA0266CA7A16430A7B46EA02 -S31508005130022603EB051202F5C475C2F888618E7C57 -S315080051404A7C4FEA024242EA0662CE7B3243097C37 -S3150800515042EA01226A601A5942F001021A5101E034 -S315080051604FF00400F0BC704701290DD021B1022987 -S3150800517018BF002317D10FE082684FF00303C0F26F -S31508005180004302EA03030EE082684FF44073C0F658 -S31508005190000302EA030306E082684FF00003C1F247 -S315080051A0030302EA03034FF00302C0F200429342EC -S315080051B017D04FF00302C0F20042934201D86BB1F8 -S315080051C018E04FF44072C0F6000293420CD04FF03C -S315080051D00002C1F2030293420CD108E04FF002002C -S315080051E070474FF0010070474FF0010070474FF0CD -S315080051F0010070474FF00000704700BF012908D032 -S3150800520011B102290ED109E0836843F08003836057 -S315080052107047836843F4004383607047836843F4A8 -S3150800522000038360704700BF30B401F11B034FEAE7 -S315080052300313C35803F00403DBB2137243B901F135 -S315080052401B034FEA0313C3584FEA5353136007E08F -S3150800525001F11B034FEA0313C3584FEAD303536004 -S3150800526001F11B044FEA04140319045904F002045B -S3150800527054725C6804F00F0494725B684FEA132357 -S31508005280D37400EB011303F5DC74D3F8B851D57267 -S31508005290D3F8B8514FEA15251573D3F8B8514FEA24 -S315080052A015455573D3F8B8314FEA1363937363689A -S315080052B0D37363684FEA1323137463684FEA13437F -S315080052C0537463684FEA1363937421B9C36843F050 -S315080052D02003C36003E0036943F02003036130BC85 -S315080052E0704700BF21B9C36843F02003C360704705 -S315080052F0036943F020030361704700BF19B9C0680A -S3150800530000F003007047012906BF006900F003009A -S3150800531000207047D9B9036823F0030343F001035B -S315080053200360436803F00303012B08D04FF6FF73AD -S31508005330426802F00302012A01D0013BF8D1406815 -S3150800534000F00300012814BF00200120704701293E -S3150800535016D1036823F003030360436813F0030FB1 -S3150800536007D04FF6FF73426812F0030F01D0013BD6 -S31508005370F9D1436813F0030F14BF002001207047CA -S3150800538002291BD1036823F0030343F002030360D9 -S31508005390436803F00303022B08D04FF6FF734268F5 -S315080053A002F00302022A01D0013BF8D1406800F05E -S315080053B00300022814BF0020012070474FF00000A8 -S315080053C0704700BF036823F0030343F0020303603A -S315080053D0406800F00300022814BF0020012070472F -S315080053E0036823F002030360436813F0020F07D033 -S315080053F04FF6FF73426812F0020F01D0013BF9D154 -S31508005400436813F0020F14BF00200120704700BF45 -S31508005410806900F07000704780694FEA1060704735 -S315080054208069C0F3074070471AB14369194341615F -S315080054307047436923EA01014161704711F4700F0F -S3150800544009D0836923F07F4323F470030B420CBF12 -S3150800545000200120704711F0807F09D0436823F0AF -S315080054607F4323F470030B420CBF002001207047D2 -S3150800547011F0006F09D0836823F07F4323F470038B -S315080054800B420CBF00200120704711F0007F09D0A5 -S31508005490C36823F07F4323F470030B420CBF00203C -S315080054A001207047036923F07F4323F470030B42FE -S315080054B00CBF0020012070474FF07003C3F2F003C1 -S315080054C0994203D14FF000038361704721F07F436F -S315080054D023F4700311F0007F01D0C360704711F008 -S315080054E0806F01D00361704711F0006F14BF8360AD -S315080054F04360704708B5436919427FD040294DD0AB -S315080055000ED8042932D004D8012921D0022978D10D -S3150800551026E0102936D020293AD0082971D12BE067 -S31508005520B1F5006F5ED009D8B1F5007F4ED0B1F560 -S31508005530806F51D0B1F5807F63D141E0B1F5803FEE -S3150800554032D0B1F5003F35D0B1F5004F59D14FE013 -S31508005550806840F20111C0F20101FFF7E3FB08BDC4 -S31508005560C0684FF00301FFF7DDFB08BDC0684FF0C8 -S315080055700801FFF7D7FB08BDC0684FF01001FFF719 -S31508005580D1FB08BD00694FF00301FFF7CBFB08BD4F -S3150800559000694FF00801FFF7C5FB08BD00694FF029 -S315080055A01001FFF7BFFB08BD40684FF00801FFF781 -S315080055B0B9FB08BD40684FF01001FFF7B3FB08BD03 -S315080055C080694FF00101FFF7ADFB08BD80694FF018 -S315080055D00201FFF7A7FB08BD80694FF00401FFF73A -S315080055E0A1FB08BD80694FF07001FFF79BFB08BD62 -S315080055F040684FF00401FFF795FB08BD4FF0000027 -S3150800560008BD4FF0000008BDB1F5807F40D00CD82A -S31508005610082929D004D801291CD0042951D11FE012 -S31508005620202925D040294CD126E0B1F5006F3BD082 -S3150800563006D8B1F5007F2FD0B1F5806F41D12FE0A4 -S31508005640B1F5803F1CD0B1F5003F1DD0B1F5004F34 -S3150800565037D130E040F20113C0F20103836070478E -S315080056604FF00803C36070474FF01003C3607047DC -S315080056704FF00803036170474FF01003036170474A -S315080056804FF00803436070474FF0100343607047BC -S315080056904FF00403436070474FF0040343607047BC -S315080056A04FF00403436070474FF0000383614FF0E7 -S315080056B00403436070474FF0000383614FF004030F -S315080056C04360704708B54FF080404FF0010102F083 -S315080056D00FF84FF080404FF0000102F009F808BDBE -S315080056E010B44FF4F043C4F20003196801F0F30153 -S315080056F04488028844EA020241EA020292B21A6027 -S3150800570010BC70474FF00003C4F20F23186038B975 -S315080057104FF4F042C4F20002136813F0010FFBD1F4 -S31508005720704700BF4FF00403C4F20F231860704798 -S315080057304FF4F043C4F20003586070474FF4F04347 -S31508005740C4F20003986070474FF4F043C4F20003B4 -S31508005750586170474FF4F043C4F200039869C0B229 -S31508005760704700BF4FF40073C4F20F234FF00102D5 -S315080057701A6070474FF40173C4F20F23186070471C -S3150800578020F07F43000F1ABF1B0C47F60C0247F6A2 -S315080057901002C4F2000212681A420CBF002001204F -S315080057A0704700BF4FF4F043C4F2000319691A6941 -S315080057B06FEA000020F0030001F0020140EA01014F -S315080057C001EA02021A6170474FF4F043C4F200037B -S315080057D01A681B69184214BFC2F3400000207047BC -S315080057E04FF4F043C4F2000319691A696FEA00001E -S315080057F020F0030001F0020140EA010101EA020279 -S315080058001A6170474FF44053C4F202034FF0010285 -S315080058109A6070474FF44053C4F202031860186840 -S31508005820704700BF10B40B4661B14FF000024FF449 -S315080058304054C4F2020450F8041B216002F101022C -S315080058409342F8D84FF44053C4F20203186810BCC8 -S31508005850704700BF4FF44053C4F2020318687047FC -S315080058604FF44053C4F20203187170474FF4405383 -S31508005870C4F202031879704708B54FF000504FF08C -S31508005880010101F035FF4FF000504FF0000101F023 -S315080058902FFF08BD30B44FF4E843C4F200031C6878 -S315080058A040F6FE7202FA00F224EA02024D680C681B -S315080058B025438C682543CC6845EA040101FA00F0C3 -S315080058C042EA0000186030BC704700BF4FF0000382 -S315080058D0036043608360C360704700BF59B14FF4EB -S315080058E0E843C4F200031A684FF0010101FA00F018 -S315080058F01043186070474FF4E843C4F200031A686F -S315080059004FF0010101FA00F022EA00001860704722 -S3150800591059B14FF4E843C4F200031A684FF48051B2 -S3150800592001FA00F01043186070474FF4E843C4F2D8 -S3150800593000031A684FF4805101FA00F022EA0000C9 -S315080059401860704769B14FF4E843C4F200035A6817 -S315080059504FEA10104FF0010101FA00F010435860A9 -S3150800596070474FF4E843C4F200035A684FEA101030 -S315080059704FF0010101FA00F022EA00005860704772 -S3150800598040B14FF4E843C4F200035A6842F00302F8 -S315080059905A6070474FF4E843C4F200035A6822F08D -S315080059A003025A60704700BF4AB14FF4E843C4F295 -S315080059B000031A6801FA00F11143196070474FF4A1 -S315080059C0E843C4F200031A6801FA00F122EA010169 -S315080059D01960704782B04FF0000301934FF4E84313 -S315080059E0C4F200030193019B03F108031B180193FA -S315080059F0019B196002B0704782B04FF00003019313 -S31508005A004FF4E843C4F200030193019B03F1140326 -S31508005A101B180193019B196002B0704708280CBF38 -S31508005A2042EA012142EA014147F22043C4F2000357 -S31508005A30C150704782B04FF0000301934FF4E8431A -S31508005A40C4F200030193019B03F12C0303EB9003BB -S31508005A500193019B186880B202B070474FF4005357 -S31508005A60CEF2040318684FEA104070474FF400530B -S31508005A70CEF2040318684FEA00504FEA10507047F8 -S31508005A8039B14FF40053CEF204035A6810435860F4 -S31508005A9070474FF40053CEF204035A6822EA000016 -S31508005AA05860704702684FF6FE7302EA0303036004 -S31508005AB04FF00003036043608360C3604FF0080340 -S31508005AC0C4F20203984208D14FF00003C4F202035D -S31508005AD05A6842F00F025A6070474FF01C03C4F22E -S31508005AE00203984208D14FF00003C4F202035A6831 -S31508005AF042F0F0025A6070474FF03003C4F20203D6 -S31508005B00984208D14FF00003C4F202035A6842F4DF -S31508005B1070625A6070474FF04403C4F20203984219 -S31508005B2008D14FF00003C4F202035A6842F47042E7 -S31508005B305A6070474FF05803C4F20203984208D1DE -S31508005B404FF00003C4F202035A6842F470225A6006 -S31508005B5070474FF06C03C4F20203984208D14FF025 -S31508005B600003C4F202035A6842F470025A6070478E -S31508005B704FF08003C4F20203984208D14FF00003A5 -S31508005B80C4F202035A6842F070625A6070474FF4D2 -S31508005B908163C4F20203984208D14FF48063C4F2C9 -S31508005BA002035A6842F00F025A60704740F21C43DB -S31508005BB0C4F20203984208D14FF48063C4F2020388 -S31508005BC05A6842F0F0025A6070474FF48663C4F28E -S31508005BD00203984208D14FF48063C4F202035A685C -S31508005BE042F470625A60704740F24443C4F20203BA -S31508005BF0984208D14FF48063C4F202035A6842F40B -S31508005C0070425A6070474FF48B63C4F2020398429D -S31508005C1001BF4FF48063C4F202035A6842F470224B -S31508005C2008BF5A60704700BF10B4026822F4FE42EB -S31508005C3022F0F0020C6A8B6844EA03030C692343DA -S31508005C404C6923438C692343CC6923434C6A234319 -S31508005C508C6A234313430360CB6843600B688360F5 -S31508005C604B68C36010BC70474FF000030360436085 -S31508005C708360C360036143618361C36103624362F6 -S31508005C808362704721B1036843F0010303607047DC -S31508005C9002684FF6FE7302EA03030360704700BF0B -S31508005CA01AB10368194301607047036823EA0101C2 -S31508005CB00160704741607047406880B2704700BF16 -S31508005CC010F0805F14BF4FF480630023C4F2020310 -S31508005CD01B6803420CBF00200120704710F0805F4C -S31508005CE014BF4FF480630023C4F202035860704760 -S31508005CF010F0805F14BF4FF480630023C4F20203E0 -S31508005D001B6803420CBF00200120704710F0805F1B -S31508005D1014BF4FF480630023C4F20203586070472F -S31508005D204FF48063C4F201034FF000021A605A6010 -S31508005D309A60DA604FF6FF72C0F20F025A61704736 -S31508005D4010B48379002B3DD04FF48063C4F201036D -S31508005D501A68016822EA01021A605A68016822EA8A -S31508005D6001025A60027902F1804202F58232146811 -S31508005D70016844EA010111609A68016822EA010291 -S31508005D809A60DA68016822EA0102DA604379102B20 -S31508005D900ED14FF48063C4F201039968026841EAA0 -S31508005DA002029A60D968026841EA0202DA6013E0E0 -S31508005DB003F1804303F582331968026841EA020257 -S31508005DC01A6009E0037903F1804303F582331A6800 -S31508005DD0016822EA01021A6010BC70474FF00003FE -S31508005DE0036003714FF00C0242718371704700BF64 -S31508005DF04FF48063C4F201031A6940EA02021A6189 -S31508005E00704700BF4FF48063C4F201035B69184210 -S31508005E100CBF0020012070474FF48063C4F20103D1 -S31508005E20586170474FF48063C4F201031A685B69CE -S31508005E30184204D010420CBF0020012070474FF0D2 -S31508005E40000070474FF48063C4F20103586170473D -S31508005E504FF40053C4F202031A6802F0380240EA0B -S31508005E6002021A60704700BF4FF40053C4F20203DF -S31508005E701A6822F008021A601A6840EA02021A60D2 -S31508005E80704700BF4FF40053C4F202031A6822F0A9 -S31508005E9010021A601A6840EA02021A60704700BFC8 -S31508005EA04FF40053C4F2020340F22312C4F26752BD -S31508005EB05A6048F6AB12CCF6EF525A60704700BFEC -S31508005EC04FF40053C4F2020340F22312C4F267529D -S31508005ED05A6048F6AB12CCF6EF525A60704700BFCC -S31508005EE04FF40053C4F202031A6942F080021A61A1 -S31508005EF0704700BF4FF40053C4F202031A6942F018 -S31508005F0080021A61704700BF4FF40053C4F20203BF -S31508005F10D8694FEA900070474FF40053C4F2020361 -S31508005F20186A70474FF40053C4F20203D869C0F3E5 -S31508005F30400070474FF40053C4F202031868C0F3D8 -S31508005F404010704739B14FF40053C4F202031A697E -S31508005F501043186170474FF40053C4F202031A69DC -S31508005F6022EA000018617047012807D14FF4005350 -S31508005F70C4F20203D86900F0010070474FF40053D9 -S31508005F80C4F20203DB6818420CBF002001207047E8 -S31508005F904FF40053C4F20203D86070474FF400531D -S31508005FA0C4F20203DB6813F0010F13D14FF4005358 -S31508005FB0C4F20203DB6813F0040F0ED14FF400534A -S31508005FC0C4F20203D86800F0100000280CBF0420B1 -S31508005FD0032070474FF0010070474FF002007047EA -S31508005FE04FF40053C4F20203DB6813F0010F13D118 -S31508005FF04FF40053C4F20203DB6813F0040F0ED10A -S315080060004FF40053C4F20203D86800F010000028C9 -S315080060100CBF0420032070474FF0010070474FF073 -S315080060200200704710B50446FFF7DAFF012814BFCF -S3150800603000220122002C0CBF002302F0010333B119 -S31508006040013C0CBF002302F00103002BF8D1002C01 -S3150800605008BF052010BD00BF70B505460C4616469C -S315080060604FF40053C4F2020340F22312C4F26752FB -S315080060709A6048F6AB12CCF6EF529A604FF400508D -S31508006080FFF7D0FF042820D14FF40053C4F20203CF -S315080060901A6942F010021A6145F0F8052C432643A6 -S315080060A04FF47843C1F6FF735E804FF40050FFF754 -S315080060B0B9FF052809D04FF40053C4F20203196941 -S315080060C041F6EF7201EA02021A6170BD10B5044684 -S315080060D04FF43020FFF7A6FF042856D14FF400539B -S315080060E0C4F2020340F22312C4F267529A6048F6D9 -S315080060F0AB12CCF6EF529A601A6942F020021A6186 -S315080061001A6942F040021A614FF43020FFF78AFFFD -S3150800611004282ED14FF40053C4F20203196941F63C -S31508006120DF7201EA02021A611A6942F010021A6164 -S315080061303CB14FF47843C1F6FF734FF000021A8062 -S3150800614006E04FF47843C1F6FF734FF0A5021A80B4 -S315080061504FF43020FFF766FF052816D04FF400539A -S31508006160C4F20203196941F6EF7201EA02021A61E2 -S3150800617010BD052809D04FF40053C4F2020319696B -S3150800618041F6DF7201EA02021A6110BD10B5044633 -S315080061904FF40050FFF746FF04286AD16FEA04045B -S315080061A0E1B24FF40053C4F2020340F22312C4F2E0 -S315080061B067529A6048F6AB12CCF6EF529A601A69A3 -S315080061C042F010021A61FF2908D04FF47843C1F64D -S315080061D0FF7319814FF40050FFF724FFC4F3072318 -S315080061E0B3F1FF0218BF0122042814BF002202F0EF -S315080061F0010242B14FF47842C1F6FF7253814FF45F -S315080062000050FFF70FFFC4F30743B3F1FF0218BFAF -S315080062100122042814BF002202F0010242B14FF401 -S315080062207842C1F6FF7293814FF40050FFF7FAFEE9 -S315080062304FEA1464B4F1FF0318BF0123042814BFFE -S31508006240002303F0010343B14FF47843C1F6FF730B -S31508006250DC814FF40050FFF7E5FE052809D04FF41E -S315080062600053C4F20203196941F6EF7201EA020209 -S315080062701A6110BD38B504460D464FF40050FFF7B5 -S31508006280D1FE042822D14FF40053C4F2020340F28F -S315080062902312C4F267529A6048F6AB12CCF6EF5254 -S315080062A09A601A6942F010021A6125804FF400506C -S315080062B0FFF7B8FE052809D04FF40053C4F20203CD -S315080062C0196941F6EF7201EA02021A6138BD00BF88 -S315080062D070B506460C464FF40050FFF7A3FE042897 -S315080062E012D14FF40055C4F202052B6943F001039D -S315080062F02B6134804FF40050FFF794FE2A6941F66B -S31508006300FE7302EA03032B6170BD00BF30B583B08C -S3150800631005460C464FF0000301934FF40050FFF773 -S3150800632081FE04282FD14FF40053C4F202031A69E0 -S3150800633042F001021A61A3B22B804FF40050FFF716 -S3150800634071FE042815D105F102050195019B4FEA56 -S3150800635014441C804FF40050FFF764FE4FF40053BA -S31508006360C4F20203196941F6FE7201EA02021A61D1 -S3150800637009E04FF40053C4F20203196941F6FE72AC -S3150800638001EA02021A6103B030BD00BF10B5FFF77B -S31508006390C9FD00280CBFA52400244FF43020FFF7C0 -S315080063A041FE04284BD14FF40053C4F2020340F2D5 -S315080063B02312C4F267529A6048F6AB12CCF6EF5233 -S315080063C09A601A6942F020021A611A6942F040027C -S315080063D01A614FF43020FFF725FE042823D14FF425 -S315080063E00053C4F20203196941F6DF7201EA020298 -S315080063F01A611A6942F010021A614FF47843C1F61D -S31508006400FF731C804FF40050FFF70CFE052816D0CA -S315080064104FF40053C4F20203196941F6EF7201EA18 -S3150800642002021A6110BD052809D04FF40053C4F2C0 -S315080064300203196941F6EF7201EA02021A6110BDF8 -S3150800644010B54FF43020FFF7EDFD042815D14FF4B1 -S315080064500054C4F20204236943F004032361236948 -S3150800646043F0400323614FF43020FFF7DBFD226938 -S3150800647041F6FB7302EA0303236110BD38B50546EE -S315080064804FF43020FFF7CEFD042816D14FF4005400 -S31508006490C4F20204236943F0020323616561236998 -S315080064A043F0400323614FF43020FFF7BBFD226918 -S315080064B041F6FD7302EA0303236138BD10B50446AD -S315080064C0FFF78EFD012814BF00220122002C0CBF05 -S315080064D0002302F0010333B1013C0CBF002302F094 -S315080064E00103002BF8D1002C08BF052010BD00BF02 -S315080064F010B54FF43020FFF7E1FF042815D14FF40B -S315080065000054C4F20204236943F004032361236997 -S3150800651043F0400323614FF43020FFF7CFFF226991 -S3150800652041F6FB7302EA0303236110BD034628B94B -S3150800653043F2DB014FF02042116005E043F2D2013D -S315080065404FF0204242F8201003F101006FF070412D -S315080065504FF0204242F820104FF48272CAF200022D -S3150800656042F82310704700BF10280CBF6023802311 -S31508006570CAF200034FF018021A604FF040025A6040 -S315080065804FF0FC329A60DA60704700BF4FF0A00304 -S31508006590CAF200034FF018021A604FF000025A6060 -S315080065A04FF0FC329A60DA601A61704710B40268DC -S315080065B0816843681943C3681943036919434369E2 -S315080065C0194383691943C3691943036A1943436A1B -S315080065D01943836A1943C36A1943036B19434FF076 -S315080065E0204343F822108368082B01BF02684FF046 -S315080065F0204353F8221041F0400108BF43F8221007 -S31508006600026802F10102436B9C69196844EA0101B8 -S315080066105C6841EA04119C6841EA0421DC6841EAA5 -S3150800662004411C6941EA04515B6941EA03614FF080 -S31508006630204343F82210C36AB3F5804F18D1026885 -S31508006640836B9869196840EA0101586841EA0011A4 -S31508006650986841EA0021186941EA00515B6941EAF4 -S3150800666003614FF48273CAF2000343F8221008E06C -S3150800667002684FF48273CAF200036FF0704143F860 -S31508006680221010BC704700BF30B4446883681C43AE -S3150800669044F00804C3681C4303691C43436944EA7D -S315080066A04324836944EA4334C3695A689D684FEAB8 -S315080066B0054545EA02251A681543DB6845EA036578 -S315080066C0036A59689A684FEA024242EA012219683F -S315080066D00A43DB6842EA03620368102B0CBF602397 -S315080066E08023CAF200031C609D60DA6030BC7047E4 -S315080066F010B4026842F01002436842EA43228368F3 -S3150800670042EA43324FF0A003CAF200031A60C26895 -S31508006710546891684FEA014141EA0421146821430B -S31508006720D26841EA02629A600269546891684FEA3F -S31508006730014141EA042114682143D26841EA026210 -S31508006740DA604269506891684FEA014141EA0021DE -S3150800675010680143D26841EA02621A6110BC7047A8 -S3150800676010B44FF0000303604FF0020242608360EA -S31508006770C360036143618361C36103624FF480525E -S3150800678042624FF400528262C3620363416B4FF068 -S315080067900F020A60416B4A60446B4FF0FF01A1602B -S315080067A0446BE260446B2261446B6261446BA36193 -S315080067B0846B2260846B6260846BA160816BCA60A3 -S315080067C0816B0A61816B4A61826B936110BC704769 -S315080067D04FF0100303604FF0000343608360C3600B -S315080067E0036143618361C2694FF0FC031360C269A8 -S315080067F05360C2699360C269D360026A1360026A11 -S315080068005360026A9360026AD36070474FF00003D0 -S31508006810036043608360C2684FF0FC031360C2687C -S315080068205360C2689360C268D360026913600269E4 -S315080068305360026993600269D360426913604269D2 -S315080068405360426993604269D360704741B14FF023 -S31508006850204353F8202042F0010243F820207047D5 -S315080068604FF0204252F820104FF6FE73C0F20F0385 -S3150800687001EA030342F82030704700BF51B11028DF -S315080068800CBF60238023CAF200031A6842F0040290 -S315080068901A60704710280CBF60228022CAF20002D4 -S315080068A011684FF6FB73C0F20F0301EA0303136086 -S315080068B0704700BF40B14FF0A003CAF200031A6840 -S315080068C042F004021A6070474FF0A002CAF20002B2 -S315080068D011684FF6FB73C0F20F0301EA0303136056 -S315080068E0704700BF51B110280CBF60238023CAF23D -S315080068F000031A6842F040021A60704710280CBF5D -S3150800690060228022CAF2000211684FF6BF73C0F2F5 -S315080069100F0301EA03031360704700BF102803BF83 -S315080069206023CAF20003586980231CBFCAF2000319 -S3150800693058697047A2B1102807D14FF06003CAF210 -S3150800694000035A68114359607047B0F5807F0CBF41 -S315080069508023A023CAF200035A681143596070477E -S31508006960102808D14FF06003CAF200035A6822EAD9 -S31508006970010159607047B0F5807F0CBF8023A023C2 -S31508006980CAF200035A6822EA01015960704700BF3B -S31508006990102805D14FF06003CAF200035B6807E0D0 -S315080069A0B0F5807F0CBF8023A023CAF200035B6882 -S315080069B00B420CBF00200120704700BF102808D1E9 -S315080069C04FF06003CAF200035A6822EA01015960CF -S315080069D07047B0F5807F0CBF8023A023CAF200035E -S315080069E05A6822EA01015960704700BF102805D18C -S315080069F04FF06003CAF200035B6807E0B0F5807FDA -S31508006A000CBF8023A023CAF200035B680B420CBFAD -S31508006A100020012013EAD1010CBF002000F001007C -S31508006A20704700BF102808D14FF06003CAF2000370 -S31508006A305A6822EAD10159607047B0F5807F0CBFC9 -S31508006A408023A023CAF200035A6822EAD1015960BA -S31508006A50704700BF08B54FF40063C4F201039842BB -S31508006A600CD14FF004004FF0010100F02FFE4FF05B -S31508006A7004004FF0000100F029FE08BD4FF4406302 -S31508006A80C4F2010398420CD14FF008004FF00101FF -S31508006A9000F01CFE4FF008004FF0000100F016FE53 -S31508006AA008BD4FF48053C4F2010398420CD14FF04D -S31508006AB010004FF0010100F009FE4FF010004FF0F2 -S31508006AC0000100F003FE08BD4FF4A053C4F2010311 -S31508006AD098420CD14FF020004FF0010100F0F6FD6E -S31508006AE04FF020004FF0000100F0F0FD08BD4FF414 -S31508006AF0C053C4F2010398420CD14FF040004FF046 -S31508006B00010100F0E3FD4FF040004FF0000100F0F6 -S31508006B10DDFD08BD4FF4E053C4F2010398420CD1E1 -S31508006B204FF080004FF0010100F0D0FD4FF08000DB -S31508006B304FF0000100F0CAFD08BD4FF40053C4F23F -S31508006B40010398420BD14FF480704FF0010100F019 -S31508006B50BDFD4FF480704FF0000100F0B7FD08BD91 -S31508006B6008B54FF00100014600F0B0FD4FF00100F6 -S31508006B704FF0000100F0AAFD08BD00BF2DE9F003A3 -S31508006B80CB7803F00F0513F0100F1CBF8B781D434D -S31508006B900B7833B3D0F800C04FF000034FF001066E -S31508006BA04FF00F0806FA03F20C8802EA040494422E -S31508006BB011D14FEA830708FA07F92CEA090C05FAF6 -S31508006BC007F74CEA070CCF78282F08BF446102D094 -S31508006BD0482F08BF026103F10103082BE2D1C0F870 -S31508006BE000C00B88FF2B28D9D0F804C04FF000034B -S31508006BF04FF001064FF00F0803F1080206FA02F2F9 -S31508006C000C8802EA0404944211D14FEA830708FA71 -S31508006C1007F92CEA090C05FA07F74CEA070CCF78AE -S31508006C20282F08BF4461CC78482C08BF026103F1BD -S31508006C300103082BE0D1C0F804C0BDE8F003704793 -S31508006C404FF0FF3303804FF0020383704FF00403C5 -S31508006C50C3707047836819420CBF00200120704733 -S31508006C60806880B2704700BFC36819420CBF002015 -S31508006C7001207047C06880B2704700BF0161704745 -S31508006C80416170470AB1016170474161704700BFB1 -S31508006C90C160704741F48033836181618361836990 -S31508006CA08369704710B44FF00003C4F201031C68EF -S31508006CB04FF6807204EA020241EA001141EA020232 -S31508006CC01A6010BC704700BF4FF01C03C4F22023A3 -S31508006CD01860704730B400284FF00003C4F201036F -S31508006CE0B4BFDB695B6884B200F44012B2F5401F9A -S31508006CF00AD123F070634FF00002C4F2010255680E -S31508006D0025F07065556010E010F4801F1DBFC0F3B4 -S31508006D100342032505FA02F2420D04BF120104FAE2 -S31508006D2002F223EA020343F0706331B14FEA50528C -S31508006D304FEA021204FA02F4234300284FF0000235 -S31508006D40C4F20102B4BFD361536030BC704700BFC0 -S31508006D5030B401F003024FEA82024FEA91014FF084 -S31508006D600003C4F2010301F1020153F821504FF068 -S31508006D700F0404FA02F425EA040443F8214053F800 -S31508006D80214000FA02F242EA040443F8214030BCEA -S31508006D90704700BF4FF0DC03C4F220231860704729 -S31508006DA008B54FF4A843C4F2000398420CD14FF437 -S31508006DB000104FF0010100F09BFC4FF400104FF05B -S31508006DC0000100F095FC08BD4FF480004FF001016A -S31508006DD000F08EFC4FF480004FF0000100F088FCB4 -S31508006DE008BD00BF70B586B004460D46868826F0F5 -S31508006DF03F064FEA06464FEA164601A800F0BEFBD4 -S31508006E0003994DF68362C4F21B32A2FB01024FEAD4 -S31508006E10924242EA0606A680238823F001034FEA37 -S31508006E2003434FEA134323802B6848F2A060C0F25D -S31508006E30010083420BD84FEA4303B1FBF3F189B251 -S31508006E4002F101022284032998BF04212EE0EE886C -S31508006E504BF6FF70864203BF03EB4303B1FBF3F126 -S31508006E6089B203EB83031FBF03EB8303B1FBF3F183 -S31508006E7089B241F480414FEA01534FEA13530BB9E3 -S31508006E8041F001016FEA41416FEA514189B24FF47D -S31508006E90967303FB02F244F6D353C1F2620383FBF3 -S31508006EA002034FEAA31303F101032384A183238872 -S31508006EB09BB243F001032380238823F4806323F0E5 -S31508006EC00A034FEA03434FEA13436989AA8841EA4A -S31508006ED0020213439BB223802A89AB8942EA030341 -S31508006EE09BB2238106B070BD41F2883303604FF030 -S31508006EF0000383804BF6FF72C280038143814FF4FF -S31508006F0080438381704700BF29B103889BB243F051 -S31508006F10010303807047038823F001034FEA034304 -S31508006F204FEA13430380704729B183889BB243F421 -S31508006F30006383807047838823F400634FEA034322 -S31508006F404FEA13438380704729B183889BB243F481 -S31508006F50805383807047838823F480534FEA034322 -S31508006F604FEA13438380704729B103889BB243F4E1 -S31508006F70807303807047038823F480734FEA0343C2 -S31508006F804FEA13430380704729B103889BB243F441 -S31508006F90007303807047038823F400734FEA0343A2 -S31508006FA04FEA13430380704729B103889BB243F421 -S31508006FB0806303807047038823F480634FEA0343A2 -S31508006FC04FEA134303807047838901F0FE0123F0DB -S31508006FD0FE034FEA03434FEA134341EA030383815F -S31508006FE0704700BF29B183899BB243F001038381AF -S31508006FF07047838923F001034FEA03434FEA13439B -S315080070008381704729B103889BB243F0400303800C -S315080070107047038823F040034FEA03434FEA1343BC -S315080070200380704722B183889BB2194381807047D9 -S3150800703083889BB223EA01018180704701827047E9 -S31508007040008AC0B2704700BF12B141F0010101E0E9 -S3150800705001F0FE010182704782B04FF000030193F0 -S315080070600190019BCB180193019B188880B202B04E -S31508007070704700BF39B103886FEA43436FEA534349 -S315080070809BB20380704703884FEA43434FEA534352 -S3150800709003807047B1F5006F038807BF9BB243F4BE -S315080070A0006323F400631B0418BF1B0C038070479E -S315080070B0B1F5005F038807BF9BB243F4005323F47E -S315080070C000531B0418BF1B0C0380704729B10388A3 -S315080070D09BB243F4805303807047038823F480539C -S315080070E04FEA03434FEA134303807047B1F5006F35 -S315080070F0038807BF9BB243F4006323F400631B04B1 -S3150800710018BF1B0C0380704729B103889BB243F054 -S31508007110200303807047038823F020034FEA0343C4 -S315080071204FEA134303807047008BC0F3072070476C -S3150800713029B103889BB243F0100303807047038884 -S3150800714023F010034FEA03434FEA134303807047C3 -S3150800715029B903889BB243F08003038070470388EC -S3150800716023F080034FEA03434FEA13430380704733 -S31508007170B1F5804F838B1DBF23F480431B041B0C82 -S315080071809BB208BF43F4804383837047838A9BB2CC -S31508007190008B43EA0040084020F07F40814214BF3C -S315080071A000200120704700BF838A9BB2008B43EA08 -S315080071B0004020F07F40704782B04FF000030193F3 -S315080071C0009300904FEA1173019321F07F41019BD0 -S315080071D023B1009B03F11403009305E04FEA114124 -S315080071E0009B03F118030093009B1B6819420CBF10 -S315080071F00020012002B070476FEA010189B281823E -S31508007200704700BF83889AB2838A9BB20B4207D025 -S3150800721001F0E06112EA11410CBF0020012070471D -S315080072204FF00000704700BF6FEA010189B2818202 -S31508007230704700BF4FF44053C4F20003186070470C -S315080072404FF44053C4F20003586070474FF440535C -S31508007250C4F20003986070474FF44053C4F2000329 -S315080072604AF6AA221A6070474FF44053C4F2000344 -S315080072704CF6CC421A6070474FF44053C4F20003F0 -S31508007280DB6818420CBF00200120704730BF7047EA -S3150800729008B54FF080504FF0010100F029FA4FF081 -S315080072A080504FF0000100F023FA08BD4FF020038C -S315080072B0C4F20E23186070474FF01003C4F20E2371 -S315080072C0186070474FF4E043C4F200031A6822F0CE -S315080072D0E00240EA02021A60704700BF4FF0A003BE -S315080072E0C4F20E231860704708B54FF4E043C4F2A1 -S315080072F000031A6822F0030240EA02021A604FF4F9 -S315080073006D43CEF200031A6942F004021A6101299C -S3150800731002D1FFF7BBFF00E020BF4FF46D43CEF26A -S3150800732000031A6922F004021A6108BD08B54FF471 -S31508007330E043C4F200031A6842F004021A601A68AD -S3150800734042F002021A604FF46D43CEF200031A6946 -S3150800735042F004021A61FFF799FF08BD4FF4E043B3 -S31508007360C4F200035B6818420CBF00200120704776 -S315080073704FF4E043C4F200031A6842EA80021A6036 -S31508007380704700BF4FF48053C4F202031A6842F0F4 -S3150800739001021A6059684FF00002CFF6FF0201EAAF -S315080073A002025A601A6822F0847222F480321A6045 -S315080073B01A6822F480221A605A6822F4FE025A6079 -S315080073C04FF41F029A6070474FF48053C4F20203C9 -S315080073D01A6822F480321A601A6822F480221A6027 -S315080073E0B0F5803F03D0B0F5802F11D108E04FF4F7 -S315080073F08053C4F202031A6842F480321A60704756 -S315080074004FF48053C4F202031A6842F4A0221A60A9 -S31508007410704700BF4FF48053C4F202031A6822F083 -S31508007420F80242EAC0021A60704700BF4FF0000334 -S31508007430C4F24223186070474FF48053C4F2020323 -S315080074405A6822F47C1240EA02020A435A607047DC -S315080074504FF06003C4F24223186070474FF480531C -S31508007460C4F202035A6822F0030240EA02025A6092 -S31508007470704700BF4FF48053C4F20203586800F007 -S315080074800C0070474FF48053C4F202035A6822F086 -S31508007490F00240EA02025A60704700BF4FF4805378 -S315080074A0C4F202035A6822F4E06240EA02025A6011 -S315080074B0704700BF4FF48053C4F202035A6822F49F -S315080074C0605242EAC0025A60704700BF39B141F2C1 -S315080074D00903C4F202031A7810431870704741F280 -S315080074E00903C4F202031A7822EA000018707047EA -S315080074F04FF0D803C4F24223186070474FF4805304 -S31508007500C4F202035A6822F4404240EA02025A6070 -S31508007510704700BF4FF48153C4F202034FF00002D4 -S315080075201A701A70012802D004280FD107E04FF408 -S315080075308153C4F202034FF001021A7070474FF4E8 -S315080075408153C4F202034FF005021A70704700BF58 -S315080075504FF49063C4F24223186070474FF4805387 -S31508007560C4F202031A6A40EA02021A62704700BFAE -S3150800757040F23C43C4F242231860704710B44FF4FB -S315080075808053C4F202035B6803F00C03042B02BFAA -S315080075904FF49053C0F27A03036036D0082B06D016 -S315080075A073BB4FF49053C0F27A0303602DE04FF497 -S315080075B08053C4F202035A685B68C2F3834202F13D -S315080075C0020213F4803F07D14FF41063C0F23D0363 -S315080075D003FB02F2026018E04FF48053C4F2020380 -S315080075E05B6813F4003F19BF4FF41063C0F23D0304 -S315080075F04FF49053C0F27A0303FB02F2026004E0F0 -S315080076004FF49053C0F27A0303604FF48053C4F2E8 -S3150800761002035968C1F3031140F21802C2F20002CC -S31508007620515C046824FA01F141605C68C4F30224E1 -S31508007630145D21FA04F484605C68C4F3C224125D04 -S3150800764021FA02F1C1605A68C2F3813240F214038A -S31508007650C2F200039B5CB1FBF3F1016110BC7047F9 -S3150800766039B14FF48053C4F202035A691043586182 -S3150800767070474FF48053C4F202035A6922EA0000A5 -S315080076805861704739B14FF48053C4F202039A69BE -S315080076901043986170474FF48053C4F202039A6905 -S315080076A022EA00009861704739B14FF48053C4F25A -S315080076B00203DA691043D86170474FF48053C4F265 -S315080076C00203DA6922EA0000D861704739B14FF43B -S315080076D08053C4F20203DA681043D86070474FF447 -S315080076E08053C4F20203DA6822EA0000D8607047C1 -S315080076F039B14FF48053C4F202031A691043186172 -S3150800770070474FF48053C4F202031A6922EA000054 -S31508007710186170474FF48863C4F2422318607047B3 -S315080077204FF04C03C4F242231860704741F2070336 -S31508007730C4F20203187070474FEA5013012B05D1A3 -S315080077404FF48053C4F202031B6807E0022B4FF480 -S315080077508053C4F202030CBF1B6A5B6A00F01F0069 -S3150800776023FA00F000F00100704700BF10B582B0A0 -S315080077704FF0000301934FF031042046FFF7DCFF7A -S31508007780019B03F101030193019BB3F5A06F01D09F -S315080077900028F2D04FF03100FFF7CEFF003818BFAF -S315080077A0012002B010BD00BF4FF48053C4F202039B -S315080077B05A6A42F080725A62704700BF4FF480538B -S315080077C0C4F202039B6818420CBF002001207047D0 -S315080077D041F20A03C4F202031870704741B14FF42C -S315080077E02053C4F200031A8892B2104318807047D7 -S315080077F04FF42053C4F200031A8892B222EA00001A -S31508007800188070474FF42053C4F200039A8892B246 -S3150800781042F010029A8070474FF42052C4F20002D8 -S31508007820938823F010034FEA03434FEA13439380E8 -S31508007830704700BF4FF42053C4F200039A8B92B2EC -S31508007840188B42EA0040704710B50446FFF7DAFF86 -S315080078504FEA14424FF42053C4F200031A83A4B229 -S315080078609C83FFF7D9FF10BD10B50446FFF7CAFF82 -S31508007870C4F303424FF42053C4F200031A81A4B29E -S315080078809C81FFF7C9FF10BD10B50446FFF7BAFF84 -S315080078904FEA14424FF42053C4F200031A84A4B2E8 -S315080078A09C84FFF7B9FF10BD4FF42053C4F20003C0 -S315080078B0188A00F00F009B8A9BB243EA0040704783 -S315080078C04FF42052C4F20002938813F0200FFBD025 -S315080078D0704700BF4FF42052C4F20002938823F089 -S315080078E008034FEA03434FEA134393804FF42052A9 -S315080078F0C4F20002938813F0080FFBD0704700BF4C -S315080079004FF42053C4F200039B8818420CBF002092 -S31508007910012070474FF42053C4F200039A8892B2AC -S3150800792022EA00029A8070474FF42053C4F20003FB -S315080079309A8892B21B88184207D000EA020212F00F -S31508007940FF0F0CBF0020012070474FF00000704762 -S315080079504FF42053C4F200039A8892B222EA000236 -S315080079609A8070474FF40043C4F201034FF00002B7 -S315080079701A605A609A60DA605A629A62DA6240F26B -S31508007980FF71C0F2C0019963DA63704710B44FF40F -S315080079900043C4F2010359684468826844EA020253 -S315080079A0C4682243046822430469224321F4FC4143 -S315080079B021F0FF010A43017D0A435A6010BC704753 -S315080079C04FF000030375036043608360C36003617F -S315080079D0704700BF4FF0A003C4F230231860704709 -S315080079E04FF40043C4F201031A6822F003021A6036 -S315080079F01A6840EA02021A60704700BF4FF4004353 -S31508007A00C4F20103186800F00300704739B14FF457 -S31508007A100043C4F20103DA6B1043D86370474FF48E -S31508007A200043C4F20103DA6B22EA0000D863704708 -S31508007A3040F28C53C4F230231860704710B40268C1 -S31508007A404FF40043C4F201039A60D96821F4FE6139 -S31508007A5021F00F018468426844EA0202C46822439E -S31508007A60006902430A43DA6010BC70474FF000030E -S31508007A70036043608360C360036170474FF400434B -S31508007A80C4F201031869C0B2704700BF82B04FF054 -S31508007A900003019348F21403C4F20103C3180193C7 -S31508007AA0019B186802B0704710B402684FF400438F -S31508007AB0C4F201035A6242689A62D96A21F0F70150 -S31508007AC0C468826844EA02020469224340690243A0 -S31508007AD00A43DA6210BC70474FF0FF3303604FF079 -S31508007AE0000343608360C36003614361704700BF5E -S31508007AF04FF40043C4F20103186B70474FF4004378 -S31508007B00C4F20103D3F88000704700BF4FF4004366 -S31508007B10C4F20103C3F88000704700BF4FF4004366 -S31508007B20C4F20103986C70474FF4B463C4F230236F -S31508007B301860704740F2A453C4F2302318607047A7 -S31508007B404FF4B563C4F230231860704740F2AC5363 -S31508007B50C4F23023186070474FF4D673C4F230234A -S31508007B60186070474FF4D873C4F230231860704712 -S31508007B7010F0010F14BF002201224FF4DA73C4F289 -S31508007B8030231A60704700BF4FF4DC73C4F2302309 -S31508007B90186070474FF40043C4F201035B6B184248 -S31508007BA00CBF0020012070474FF40043C4F20103C4 -S31508007BB0986370474FF40043C4F201035B6B1842A5 -S31508007BC00CBF0020012070474FF40043C4F20103A4 -S31508007BD09863704708B54FF44053C4F201039842BE -S31508007BE00CD14FF480504FF00101FFF76FFD4FF4B1 -S31508007BF080504FF00001FFF769FD08BD4FF4605350 -S31508007C00C4F2000398420CD14FF480404FF00101B2 -S31508007C10FFF76EFD4FF480404FF00001FFF768FD57 -S31508007C2008BD4FF47053C4F2000398420BD14FF4C9 -S31508007C3000404FF00101FFF75BFD4FF400404FF0A5 -S31508007C400001FFF755FD08BD10B4028802F4415241 -S31508007C504C880B8844EA03038C882343CC88234347 -S31508007C600C8923434C8923438C892343CC8923439A -S31508007C7042EA03039BB20380838B23F400634FEA33 -S31508007C8003434FEA134383830B8A038210BC70476E -S31508007C90F0B587B005460C46838B23F47A6323F048 -S31508007CA01F034FEA03434FEA134383834FF002014E -S31508007CB00184868BB6B2A368022B04BF0022022376 -S31508007CC03CD0A788002F14BF0227012701A8FFF779 -S31508007CD055FC019AE388B3F5007F0CD14FEA1222CE -S31508007CE002EB82024FEA4203A168B3FBF1F303F108 -S31508007CF005039BB20DE04FEA4717B2FBF7F707EB10 -S31508007D0087074FEA4703A268B3FBF2F303F10503BB -S31508007D109BB24CF6CD42CCF6CC42A2FB03134FEAFB -S31508007D20D30303F001024FEA5303A3F1020189B218 -S31508007D30FD2999BF120292B2002202231343E28858 -S31508007D4013432B84238846EA030343F400636288BB -S31508007D501343A2881343A28913439BB2AB8307B08C -S31508007D60F0BD00BF4FF00003038043808380C380CB -S31508007D70038143818381C3814FF0070303827047E0 -S31508007D804FF00003038043808380C3804FF00202D4 -S31508007D9082608381704700BF29B103889BB243F094 -S31508007DA0400303807047038823F040034FEA0343E8 -S31508007DB04FEA13430380704729B1838B9BB243F480 -S31508007DC0806383837047838B23F480634FEA03437E -S31508007DD04FEA1343838370474FEA11114FF00103AB -S31508007DE003FA01F39BB222B1828892B213438380CD -S31508007DF07047828892B222EA03038380704700BFE5 -S31508007E0022B183889BB219438180704783889BB2CD -S31508007E1023EA01018180704781817047808980B299 -S31508007E20704700BF4FF6FF639942038819BF9BB29C -S31508007E3043F4807323F480731B0408BF1B0C038070 -S31508007E40704700BF29B183889BB243F0040383803F -S31508007E507047838823F004034FEA03434FEA13432A -S31508007E6083807047038823F400634FEA03434FEA8D -S31508007E701343038003889BB241EA030303807047D8 -S31508007E8003889BB243F480530380704729B1038863 -S31508007E909BB243F4005303807047038823F40053CE -S31508007EA04FEA03434FEA134303807047012919BF7A -S31508007EB0008B80B2808A80B2704700BF008A80B289 -S31508007EC0704700BFB1F5804F038807BF9BB243F4E4 -S31508007ED0804323F480431B0418BF1B0C03807047A0 -S31508007EE0038919420CBF0020012070476FEA01017F -S31508007EF089B20181704700BF10B483889CB2028999 -S31508007F0092B201F00F034FF0010000FA03F31A4290 -S31508007F1008BF002007D04FEA111100FA01F10C4200 -S31508007F200CBF0020012010BC704700BF01F00F01F4 -S31508007F304FF0010303FA01F36FEA03039BB20381CF -S31508007F40704700BF70B4048C24F001044FEA04445F -S31508007F504FEA14440484048B058CADB224F0F30470 -S31508007F604FEA04444FEA144442EA040444EA031478 -S31508007F70A4B24FF43052C4F201024FF45056C4F280 -S31508007F800106B04214BF00260126904214BF3246AD -S31508007F9046F00102FAB94FF48063C4F2000398422E -S31508007FA014BF00230123B0F1804F08BF43F001033B -S31508007FB08BB94FF40063C4F200034FF44062C4F275 -S31508007FC00002904214BF00220122984214BF1346B1 -S31508007FD042F0010333B125F0020545F0010545EAF3 -S31508007FE0010105E025F00A0545F0010545EA01010C -S31508007FF00483018470BC704730B4048C24F01004E8 -S315080080004FEA04444FEA14440484048B058CADB249 -S3150800801024F440744FEA04544FEA145444EA022400 -S3150800802044EA0334A4B24FF43053C4F201034FF4C4 -S315080080305052C4F20102904214BF00220122984213 -S3150800804014BF134642F00103FBB94FF48063C4F230 -S315080080500003984214BF00230123B0F1804F08BFE4 -S3150800806043F001038BB94FF40063C4F200034FF4E5 -S315080080704062C4F20002904214BF002201229842D4 -S3150800808014BF134642F001033BB125F0200545F025 -S31508008090100545EA011189B205E025F0A00545F06D -S315080080A0100545EA01010483018430BC704700BF0E -S315080080B008B54FF43053C4F2010398420CD14FF47B -S315080080C000604FF00101FFF701FB4FF400604FF02D -S315080080D00001FFF7FBFA08BDB0F1804F0BD14FF056 -S315080080E001000146FFF704FB4FF001004FF00001C5 -S315080080F0FFF7FEFA08BD4FF48063C4F20003984206 -S315080081000CD14FF002004FF00101FFF7F1FA4FF0E2 -S3150800811002004FF00001FFF7EBFA08BD4FF40063C9 -S31508008120C4F2000398420CD14FF004004FF001014D -S31508008130FFF7DEFA4FF004004FF00001FFF7D8FA18 -S3150800814008BD4FF44063C4F2000398420CD14FF0C7 -S3150800815008004FF00101FFF7CBFA4FF008004FF087 -S315080081600001FFF7C5FA08BD4FF48053C4F20003B7 -S3150800817098420CD14FF010004FF00101FFF7B8FA02 -S315080081804FF010004FF00001FFF7B2FA08BD4FF4A8 -S31508008190A053C4F2000398420CD14FF020004FF0D0 -S315080081A00101FFF7A5FA4FF020004FF00001FFF795 -S315080081B09FFA08BD4FF45053C4F2010398420CD1FC -S315080081C04FF400504FF00101FFF780FA4FF40050CA -S315080081D04FF00001FFF77AFA08BD4FF49843C4F24E -S315080081E0010398420CD14FF400204FF00101FFF72C -S315080081F06DFA4FF400204FF00001FFF767FA08BD4B -S315080082004FF4A043C4F2010398420CD14FF48010F6 -S315080082104FF00101FFF75AFA4FF480104FF00001B2 -S31508008220FFF754FA08BD4FF4A843C4F20103984275 -S315080082300CD14FF400104FF00101FFF747FA4FF445 -S3150800824000104FF00001FFF741FA08BD4FF4C05384 -S31508008250C4F2000398420CD14FF040004FF00101E0 -S31508008260FFF746FA4FF040004FF00001FFF740FADB -S3150800827008BD4FF4E053C4F2000398420CD14FF006 -S3150800828080004FF00101FFF733FA4FF080004FF0FE -S315080082900001FFF72DFA08BD4FF40053C4F200039E -S315080082A098420CD14FF480704FF00101FFF720FA85 -S315080082B04FF480704FF00001FFF71AFA08BD4FF42B -S315080082C08043C4F2010398420CD14FF480304FF03A -S315080082D00101FFF7FBF94FF480304FF00001FFF77B -S315080082E0F5F908BD4FF48843C4F2010398420CD14E -S315080082F04FF400304FF00101FFF7E8F94FF4003072 -S315080083004FF00001FFF7E2F908BD4FF49043C4F2BD -S31508008310010398420BD14FF480204FF00101FFF77B -S31508008320D5F94FF480204FF00001FFF7CFF908BDCB -S3150800833030B403889BB24FF43052C4F201024FF4B2 -S315080083405054C4F20104A04214BF002401249042F0 -S3150800835008BF44F00104FCB94FF48062C4F200027D -S31508008360904214BF00220122B0F1804F08BF42F0AC -S3150800837001028AB94FF40062C4F200024FF4406564 -S31508008380C4F20005A84214BF00250125904214BF77 -S315080083902A4645F0010232B14FF68F7203EA02020D -S315080083A04B8842EA03034FF48052C4F200024FF4AA -S315080083B0A055C4F20005451B18BF012590420CBF05 -S315080083C0002205F0010232B14FF6FF4203EA02022B -S315080083D0CB8842EA030303808B8883850B88038551 -S315080083E0BCB94FF48043C4F201034FF48842C4F287 -S315080083F00102904214BF00220122984214BF13467C -S3150800840042F001032BB94FF49043C4F2010398429A -S3150800841001D10B7A03864FF00103838230BC704783 -S3150800842070B4038C23F001034FEA03434FEA134366 -S315080084300384038C8488A4B2028B22F073024FEA69 -S3150800844002424FEA12420D882A4323F002034FEAFA -S3150800845003434FEA13434E880D8946EA0505ADB234 -S3150800846045EA03034FF43055C4F201054FF450565C -S31508008470C4F20106B04214BF00260126A84214BF62 -S31508008480354646F00105BDB94FF48045C4F20105ED -S315080084904FF48846C4F20106B04214BF00260126EE -S315080084A0A84214BF354646F001052DB94FF490454C -S315080084B0C4F20105A84215D14FF6F77503EA05057A -S315080084C04B891D434FF6FB7305EA03038D882B433F -S315080084D04FF6FF4504EA0505CE898C8946EA040469 -S315080084E0A4B22C4384800283CA888286038470BC23 -S315080084F0704700BF70B4038C23F010034FEA0343A0 -S315080085004FEA13430384038C8488A4B2028B22F4B3 -S31508008510E6424FEA02424FEA12420D8842EA052233 -S3150800852092B223F020034FEA03434FEA13430D891F -S3150800853043EA05134D8843EA05139BB24FF43055B9 -S31508008540C4F201054FF45056C4F20106B04214BFF6 -S3150800855000260126A84214BF354646F00105CDB1CE -S315080085604FF67F7503EA05054B8945EA03154FF66D -S31508008570BF7305EA03038D8843EA05139BB24FF2DE -S31508008580FF3504EA05058C8945EA8405CC8945EA60 -S315080085908404A4B284800283CA880287038470BCD8 -S315080085A0704700BF70B4038C23F480734FEA03430B -S315080085B04FEA13430384038C8488A4B2828B22F087 -S315080085C073024FEA02424FEA12420D882A4323F405 -S315080085D000734FEA03434FEA13430D8943EA052321 -S315080085E04D8843EA05239BB24FF43055C4F2010582 -S315080085F04FF45056C4F20106B04214BF00260126B5 -S31508008600A84214BF354646F00105CDB14FF2FF75B5 -S3150800861003EA05054B8945EA03254FF6FF3305EAC4 -S3150800862003038D8843EA05239BB24CF6FF7504EADB -S3150800863005058C8945EA0415CC8945EA0414A4B2D3 -S3150800864084808283CA888287038470BC704700BF8F -S3150800865070B4038C23F480534FEA03434FEA134361 -S315080086600384038C8488A4B2828B22F4E6424FEA00 -S3150800867002424FEA12420D8842EA052292B223F4D8 -S3150800868000534FEA03434FEA13430D8943EA053380 -S315080086904D8843EA05339BB24FF43055C4F20105C1 -S315080086A04FF45056C4F20106B04214BF0026012604 -S315080086B0A84214BF354646F001053DB14BF6FF7595 -S315080086C004EA05058C8945EA8414A4B28480828369 -S315080086D0CA88A0F84020038470BC70474A880B8873 -S315080086E042EA03038A881343CA8813430A89134351 -S315080086F04A8913438A8913439BB2A0F844307047CA -S315080087004FF0FF3383804FF000030380C38043801C -S31508008710037270474FF00003038043808380C38051 -S31508008720038143818381C381704700BF4FF00003F3 -S31508008730038043804FF001028280C3800381704723 -S315080087404FF00003038043808380C3800381438105 -S315080087508381704729B103889BB243F001030380E4 -S315080087607047038823F001034FEA03434FEA134394 -S315080087700380704749B1B0F844306FEA43436FEA63 -S3150800878053439BB2A0F844307047B0F844304FEAE0 -S3150800879043434FEA5343A0F84430704722B18389D4 -S315080087A09BB219438181704783899BB223EA0101F1 -S315080087B081817047818270470A43A0F84820704734 -S315080087C022B183899BB219438181704783899BB201 -S315080087D023EA010181817047038923F007034FEAE1 -S315080087E003434FEA13430381704700BF10B404895B -S315080087F0E4B241EA040442EA040444EA0324A4B2C3 -S31508008800048110BC704700BF10B50446FFF7EEFFA1 -S3150800881023899BB243F48043238110BD10B50446D7 -S31508008820FFF7E4FF238923F077034FEA03434FEA70 -S31508008830134343F07703238110BD00BF018582826D -S31508008840704700BF038823F070034FEA03434FEADB -S31508008850134341EA03030380704700BF038923F0EB -S3150800886070034FEA03434FEA134341EA03030381C4 -S31508008870704700BF38B504460D46602905D1114634 -S315080088804FF00102FFF7B8FB04E011464FF0010272 -S31508008890FFF758FB20462946FFF7E0FF23899BB2DE -S315080088A043F00703238138BD10B50446FFF7D6FF0A -S315080088B023899BB243F00703238110BD70B4048952 -S315080088C0068B058C24F007044FEA04444FEA144447 -S315080088D0214326F4407626F003064FEA06464FEA79 -S315080088E0164646F4807646F0010625F022054FEA3C -S315080088F005454FEA154542EA050545EA0315ADB2B1 -S3150800890001810683058470BC704700BF038B23F082 -S3150800891070034FEA03434FEA134341EA0303038311 -S31508008920704700BF038B23F4E0434FEA03434FEA43 -S31508008930134343EA01239BB203837047838B23F0D7 -S3150800894070034FEA03434FEA134341EA0303838361 -S31508008950704700BF838B23F4E0434FEA03434FEA93 -S31508008960134343EA01239BB28383704729B10388E3 -S315080089709BB243F0800303807047038823F080038B -S315080089804FEA03434FEA13430380704729B18388AC -S315080089909BB243F0040383807047838823F0040363 -S315080089A04FEA03434FEA13438380704729B183880C -S315080089B09BB243F0080383807047838823F008033B -S315080089C04FEA03434FEA13438380704729B18388EC -S315080089D09BB243F0010383807047838823F0010329 -S315080089E04FEA03434FEA134383807047038B23F010 -S315080089F008034FEA03434FEA134341EA0303038399 -S31508008A00704700BF038B23F400634FEA03434FEA22 -S31508008A10134343EA01239BB203837047838B23F0F6 -S31508008A2008034FEA03434FEA134341EA03038383E8 -S31508008A30704700BF838B23F400634FEA03434FEA72 -S31508008A40134343EA01239BB283837047038B23F0C6 -S31508008A5004034FEA03434FEA134341EA030303833C -S31508008A60704700BF038B23F480634FEA03434FEA42 -S31508008A70134343EA01239BB203837047838B23F096 -S31508008A8004034FEA03434FEA134341EA030383838C -S31508008A90704700BF838B23F480634FEA03434FEA92 -S31508008AA0134343EA01239BB283837047038B23F066 -S31508008AB080034FEA03434FEA134341EA0303038360 -S31508008AC0704700BF038B4FEA43434FEA534343EAD9 -S31508008AD001239BB203837047838B23F080034FEAFD -S31508008AE003434FEA134341EA03038383704700BFF6 -S31508008AF0838B4FEA43434FEA534343EA01239BB22E -S31508008B0083837047038C23F002034FEA03434FEA3B -S31508008B10134341EA03030384704700BF038C23F021 -S31508008B2008034FEA03434FEA134341EA0303038466 -S31508008B30704700BF038C23F020034FEA03434FEA34 -S31508008B40134343EA01139BB203847047038C23F053 -S31508008B5080034FEA03434FEA134343EA01139BB2E8 -S31508008B6003847047038C23F400734FEA03434FEAE8 -S31508008B70134343EA01239BB203847047038C23F40F -S31508008B8000634FEA03434FEA134343EA01239BB2C8 -S31508008B9003847047038C23F400534FEA03434FEAD8 -S31508008BA0134343EA01339BB20384704710B4048C21 -S31508008BB0A4B24FF0010303FA01F324EA0303038482 -S31508008BC0038C02FA01F141EA03039BB2038410BC49 -S31508008BD0704700BF10B4048CA4B24FF0040303FA24 -S31508008BE001F324EA03030384038C02FA01F141EA40 -S31508008BF003039BB2038410BC704700BF30B400F176 -S31508008C001803058CADB24FF0010404FA01F425EA05 -S31508008C1004040484082914BF00200120002908BF81 -S31508008C2040F0010050B14FEA5101C85820F07000D9 -S31508008C30C850C85840EA0202CA500EE0A1F1040121 -S31508008C40C1F34E01C85820F4E040C850C8584FEA4E -S31508008C50022292B240EA0202CA5030BC704700BFF4 -S31508008C6029B103889BB243F0020303807047038847 -S31508008C7023F002034FEA03434FEA13430380704786 -S31508008C8029B103889BB243F0040303807047038825 -S31508008C9023F004034FEA03434FEA13430380704764 -S31508008CA029B183889BB243F0800383807047838809 -S31508008CB023F080034FEA03434FEA13438380704748 -S31508008CC0038823F008034FEA03434FEA134303805C -S31508008CD003889BB241EA030303807047838823F025 -S31508008CE070034FEA03434FEA1343838083889BB29A -S31508008CF041EA030383807047038923F007034FEA99 -S31508008D0003434FEA1343038103899BB241EA0303F2 -S31508008D1003817047038923F080034FEA03434FEA30 -S31508008D201343038103899BB241EA03030381704716 -S31508008D3081847047818570478186704701877047AF -S31508008D4081877047A0F84010704700BF038B23F057 -S31508008D500C034FEA03434FEA13430383038B9BB287 -S31508008D6041EA030303837047038B23F440634FEA06 -S31508008D7003434FEA13430383038B9BB243EA01235E -S31508008D809BB20383704700BFF8B505460C46498871 -S31508008D9000290CBF02260026A288012A14BF012733 -S31508008DA0022723888BB92389FFF7CCF82846E18860 -S31508008DB0FFF7CCFF284631463A462389FFF71CF9C8 -S31508008DC02846E188FFF7D0FFF8BD2389FFF714F995 -S31508008DD02846E188FFF7C8FF284631463A462389E0 -S31508008DE0FFF7B0F82846E188FFF7B0FFF8BD00BFE7 -S31508008DF0838B23F00C034FEA03434FEA1343838321 -S31508008E00838B9BB241EA030383837047838B23F4E6 -S31508008E1040634FEA03434FEA13438383838B9BB232 -S31508008E2043EA01239BB28383704700BFF8B5044623 -S31508008E300D460B884BB94988AA882B89FFF782F813 -S31508008E402046E988FFF782FFF8BD042B09D1498837 -S31508008E50AA882B89FFF7D0F82046E988FFF784FF10 -S31508008E60F8BD082B60D14E8889882889228C22F47F -S31508008E7080724FEA02424FEA12422284A38B278C61 -S31508008E80BFB223F0F3034FEA03434FEA134343EA1F -S31508008E9000139BB20B434FF43052C4F201024FF455 -S31508008EA05051C4F201018C4214BF002101219442A1 -S31508008EB014BF0A4641F00102FAB94FF48062C4F2BF -S31508008EC00002944214BF00220122B4F1804F08BF69 -S31508008ED042F001028AB94FF40062C4F200024FF46C -S31508008EE04061C4F200018C4214BF00210121944262 -S31508008EF014BF0A4641F001023AB127F4007747EA5F -S31508008F000626B6B246F4807607E04FF2FF5207EA25 -S31508008F10020246F4807642EA0606A38326842046A1 -S31508008F20E988FFF765FFF8BD4E8888880989228C8D -S31508008F3022F480524FEA02424FEA12422284A38B5D -S31508008F40228C97B223F440734FEA03534FEA135324 -S31508008F5043EA002343EA01339BB24FF43052C4F28A -S31508008F6001024FF45051C4F201018C4214BF002192 -S31508008F700121944214BF0A4641F00102FAB94FF49E -S31508008F808062C4F20002944214BF00220122B4F1A6 -S31508008F90804F08BF42F001028AB94FF40062C4F25A -S31508008FA000024FF44061C4F200018C4214BF002154 -S31508008FB00121944214BF0A4641F001023AB127F44E -S31508008FC0005747EA0636B6B246F4805607E047F633 -S31508008FD0FF5207EA020246F4805642EA0606A383CF -S31508008FE026842046E988FFF711FFF8BD038823F495 -S31508008FF040734FEA03434FEA1343038003889BB247 -S3150800900041EA030303807047808E80B2704700BF31 -S31508009010008F80B2704700BF808F80B2704700BF54 -S31508009020B0F8400080B27047808C80B2704700BFAD -S31508009030008D80B2704700BF038A19420CBF00201A -S31508009040012070476FEA010189B20182704700BFAB -S31508009050028A838911420CBF0020012019420CBFE5 -S31508009060002000F0010070476FEA010189B2018211 -S31508009070704700BF08B54FF46053C4F20103984225 -S315080090800CD14FF480404FF00101FEF71FFB4FF45F -S3150800909080404FF00001FEF719FB08BD4FF48843E6 -S315080090A0C4F2000398420CD14FF400304FF001018E -S315080090B0FEF71EFB4FF400304FF00001FEF718FBD9 -S315080090C008BD4FF49043C4F2000398420CD14FF404 -S315080090D080204FF00101FEF70BFB4FF480204FF084 -S315080090E00001FEF705FB08BD4FF49843C4F20003E0 -S315080090F098420CD14FF400204FF00101FEF7F8FA20 -S315080091004FF400204FF00001FEF7F2FA08BD4FF4C5 -S31508009110A043C4F2000398420BD14FF480104FF0DD -S315080091200101FEF7E5FA4FF480104FF00001FEF753 -S31508009130DFFA08BD30B587B004460D46038A23F426 -S3150800914040534FEA03434FEA1343CA881343038243 -S31508009150838923F4B05323F00C034FEA03434FEA01 -S3150800916013430989AA8841EA020269890A4392B225 -S3150800917042EA03038381838A23F440734FEA034355 -S315080091804FEA1343AA891343838201A8FEF7F6F927 -S315080091904FF46053C4F201039C420CBF049A039A2D -S315080091A0A3891BB2002B02EB820202EB8202BDBF2F -S315080091B02B685B00B2FBF3F22968A4BF8900B2FBF7 -S315080091C0F1F248F21F53C5F2EB13A3FB02134FEA61 -S315080091D053134FEA03154FF0640003FB1023A089CD -S315080091E000B200280DDA4FEAC30303F1320348F24E -S315080091F01F51C5F2EB11A1FB0321C1F3421129430B -S315080092000CE04FEA031303F1320348F21F51C5F28B -S31508009210EB11A1FB0321C1F34311294389B2218133 -S3150800922007B030BD4FF4165303604FF00003838038 -S31508009230C38003814FF00C0242818381704700BFCF -S3150800924010B4038A23F470634FEA03434FEA1343C7 -S315080092504C880A8844EA02028C882243C9880A4351 -S3150800926092B242EA0303038210BC70474FF0000330 -S31508009270038043808380C380704700BF29B18389F8 -S315080092809BB243F4005383817047838923F40053C8 -S315080092904FEA03434FEA13438381704710B4C1F37F -S315080092A0421301F01F014FF0010404FA01F1A34231 -S315080092B008BF0C3003D0022B0CBF1030143022B17B -S315080092C0036843EA0101016003E0036823EA010138 -S315080092D0016010BC704700BF22B1838A9BB2194354 -S315080092E081827047838A9BB223EA01018182704793 -S315080092F0038A23F00F034FEA03434FEA134303821B -S31508009300038A9BB241EA030303827047838923F4E5 -S3150800931000634FEA03434FEA1343838183899BB271 -S3150800932041EA03038381704729B183899BB243F0DD -S31508009330020383817047838923F002034FEA0343BC -S315080093404FEA134383817047038A23F020034FEAC9 -S3150800935003434FEA13430382038A9BB241EA03039A -S315080093600382704729B1038A9BB243F48043038280 -S315080093707047038A23F480434FEA03434FEA1343B3 -S31508009380038270474FEAC1514FEAD1518180704735 -S3150800939080884FEAC0504FEAD050704783899BB205 -S315080093A043F0010383817047038BDBB20383038B8E -S315080093B09BB243EA01230383704700BF038B03F480 -S315080093C07F430383038B9BB241EA030303837047FE -S315080093D029B1838A9BB243F0200383827047838A2C -S315080093E023F020034FEA03434FEA1343838270476F -S315080093F029B1838A9BB243F0100383827047838A1C -S3150800940023F010034FEA03434FEA1343838270475E -S3150800941029B1838A9BB243F0080383827047838A03 -S3150800942023F008034FEA03434FEA13438382704746 -S3150800943039B183896FEA43436FEA53439BB2838109 -S31508009440704783894FEA43434FEA53438381704702 -S3150800945029B1838A9BB243F4006383827047838A67 -S3150800946023F400634FEA03434FEA134383827047AA -S31508009470838A23F004034FEA03434FEA13438382A4 -S31508009480838A9BB241EA03038382704729B1838AA0 -S315080094909BB243F0020383827047838A23F0020358 -S315080094A04FEA03434FEA13438382704703881942FE -S315080094B00CBF0020012070476FEA010189B20180C4 -S315080094C0704700BF10B4C1F3421301F01F024FF0FA -S315080094D0010404FA02F4012B04D1828992B204EA47 -S315080094E0020206E0022B0CBF028A828A92B204EAC2 -S315080094F002024FEA11214FF0010303FA01F1038832 -S315080095009BB219420CBF00230123002A0CBF00207E -S3150800951003F0010010BC70474FEA11214FF0010318 -S3150800952003FA01F36FEA03039BB20380704700BF97 -S3150800953008B54FF400604FF00101FEF7D9F84FF473 -S3150800954000604FF00001FEF7D3F808BD4FF4305322 -S31508009550C4F200035A6822F4C07240EA02025A6052 -S31508009560704700BF82B04FF0000301934FF43053A9 -S31508009570C4F200035A6822F07F020192019A00F0B1 -S315080095807F0040EA02020192019A5A6002B07047CF -S3150800959048F2A403C4F205234FF001021A6070478B -S315080095A000F07F004FF43053C4F200031860704790 -S315080095B040F080004FF43053C4F20003186070473F -S315080095C04FF43053C4F200039868C0B2704700BF26 -S315080095D04FF43053C4F200034FF000029A6070470C -S315080095E00000000000000000010203040607080945 -S315080095F000A24A040204060800000000010203044F -S30D0800960001020304060708092C +S315080040000C010020554100084D4400084D440008A5 +S315080040104D4400084D4400084D4400084D4400082E +S315080040204D4400084D4400084D4400084D4400081E +S315080040304D4400084D4400084D4400083944000822 +S315080040404D4400084D4400084D4400084D440008FE +S315080040504D4400084D4400084D4400084D440008EE +S315080040604D4400084D4400084D4400084D440008DE +S315080040704D4400084D4400084D4400084D440008CE +S315080040804D4400084D4400084D4400084D440008BE +S315080040904D4400084D4400084D4400084D440008AE +S315080040A04D4400084D4400084D4400084D4400089E +S315080040B04D4400084D4400084D4400084D4400088E +S315080040C04D4400084D4400084D4400084D4400087E +S315080040D04D4400084D4400084D4400084D4400086E +S315080040E04D4400084D4400084D4400084D4400085E +S315080040F04D4400084D4400084D4400084D4400084E +S315080041004D4400084D4400084D4400084D4400083D +S315080041104D4400084D4400084D4400084D4400082D +S315080041204D4400084D4400084D4400084D4400081D +S315080041304D4400084D4400084D4400084D4400080D +S315080041404D4400084D4400084D4400084D440008FD +S31508004150EE11AA5508B516498D4640F20002C2F27C +S31508004160000240F20003C2F200039A4211D244F25E +S315080041704052C0F6000240F20003C2F2000340F2C9 +S315080041800000C2F2000052F8041B43F8041B8342E5 +S31508004190F9D3084808494FF000028842B8BF40F8EA +S315080041A0042BFADB44F29D23C0F60003984708BDAA +S315080041B00C010020000000200C00002062B67047A9 +S315080041C008B544F2BD13C0F60003984708BD00BF02 +S315080041D000B583B04FF010004FF0010144F21D53B3 +S315080041E0C0F6000398474FF48053ADF804304FF0FB +S315080041F003038DF806304FF010038DF807304FF49F +S315080042008050C4F2010001A944F25143C0F60003EC +S31508004210984703B000BD00BF10B544F22D43C0F661 +S3150800422000039847044640F20003C2F200031B68E5 +S31508004230C31AB3F5FA7F2FD340F20403C2F2000380 +S315080042401B7893B940F20403C2F200034FF001024F +S315080042501A704FF48050C4F201004FF4805144F2B2 +S315080042601953C0F60003984711E040F20403C2F25E +S3150800427000034FF000021A704FF48050C4F2010098 +S315080042804FF4805144F21553C0F60003984740F2A4 +S315080042900003C2F200031C6010BD00BF10B582B057 +S315080042A04FF00003019300934FF48053C4F20203C6 +S315080042B01A6842F001021A6059684FF00002CFF6F8 +S315080042C0FF0201EA02025A601A6822F0847222F496 +S315080042D080321A601A6822F480221A605A6822F418 +S315080042E0FE025A604FF41F029A601A6842F480323E +S315080042F01A604FF48053C4F2020340F2DC52196884 +S3150800430001F400310091019901F10101019100992F +S3150800431011B901999142F2D14FF48053C4F20203C4 +S315080043201B6813F4003F00D1FEE74FF40053C4F2B4 +S3150800433002031A6842F010021A601A6822F0030291 +S315080043401A601A6842F002021A604FF48053C4F2E7 +S3150800435002035A685A605A6842F400525A605A6808 +S3150800436042F480625A605A6822F47C125A605A688B +S3150800437042F4E8125A601A6842F080721A604FF4E2 +S315080043808053C4F202031A6812F0007FFBD04FF480 +S315080043908053C4F202035A6822F003025A605A682C +S315080043A042F002025A604FF48053C4F202035A687C +S315080043B002F00C02082AFAD144F2D113C0F600031F +S315080043C0984744F2F133C0F60003984744F2C11304 +S315080043D0C0F60003984744F21924C0F60004A04723 +S315080043E0FDE700BF40F20803C2F2000318607047F9 +S315080043F008B54EF21003CEF2000341F63F12C0F2A2 +S3150800440001025A604FF46D42CEF200024FF0F001FD +S3150800441082F823104FF0000098604FF007021A60E8 +S3150800442044F2E533C0F60003984708BD40F2080396 +S31508004430C2F200031868704740F20803C2F200038C +S315080044401A6802F101021A60704700BFFEE700BF52 +S315080044502DE9F003CB7803F00F0513F0100F1CBFFE +S315080044608B781D430B7833B3D0F800C04FF00003A8 +S315080044704FF001064FF00F0806FA03F20C8802EA1D +S315080044800404944211D14FEA830708FA07F92CEA83 +S31508004490090C05FA07F74CEA070CCF78282F08BF4E +S315080044A0446102D0482F08BF026103F10103082BBB +S315080044B0E2D1C0F800C00B88FF2B28D9D0F804C079 +S315080044C04FF000034FF001064FF00F0803F1080202 +S315080044D006FA02F20C8802EA0404944211D14FEA61 +S315080044E0830708FA07F92CEA090C05FA07F74CEAD4 +S315080044F0070CCF78282F08BF4461CC78482C08BF12 +S31508004500026103F10103082BE0D1C0F804C0BDE83D +S31508004510F0037047016170474161704739B14FF444 +S315080045208053C4F202039A691043986170474FF4A6 +S315080045308053C4F202039A6922EA00009861704720 S70508004000B2 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/makefile b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/makefile index 834e78fd..057b28a2 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/makefile +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32H103_GCC/Prog/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -134,13 +134,13 @@ LIB_PATH = #|---------------------------------------------------------------------------------------| #| Options for compiler binaries | #|---------------------------------------------------------------------------------------| -CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -O1 -T memory.x +CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -mlong-calls -O1 -T memory.x CFLAGS += -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D sprintf=usprintf -Wno-main CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -D snprintf=usnprintf CFLAGS += -D printf=uipprintf -ffunction-sections -fdata-sections $(INC_PATH) CFLAGS += -D STM32F10X_MD -D USE_STDPERIPH_DRIVER -D VECT_TAB_FLASH -D GCC_ARMCM3 LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O srec ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.elf index ccec1ad2..14b1ba70 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.map index a981dabf..b99196f9 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.map @@ -107,6 +107,8 @@ Discarded input sections .text 0x00000000 0x0 THUMB Debug/../../obj/com.o .data 0x00000000 0x0 THUMB Debug/../../obj/com.o .bss 0x00000000 0x0 THUMB Debug/../../obj/com.o + .text.ComSetDisconnectEntryState + 0x00000000 0x10 THUMB Debug/../../obj/com.o .text.ComIsConnectEntryState 0x00000000 0xc THUMB Debug/../../obj/com.o .text 0x00000000 0x0 THUMB Debug/../../obj/cop.o @@ -162,7 +164,7 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Linker script and memory map - 0x0800122c __do_debug_operation = __do_debug_operation_bkpt + 0x08001240 __do_debug_operation = __do_debug_operation_bkpt 0x08000000 __FLASH_segment_start__ = 0x8000000 0x08004000 __FLASH_segment_end__ = 0x8004000 0x20000000 __RAM_segment_start__ = 0x20000000 @@ -211,7 +213,7 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .init is too large to fit in FLASH memory segment) 0x080002e8 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x080002e8 0xf64 +.text 0x080002e8 0xf78 0x080002e8 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs @@ -222,148 +224,150 @@ Linker script and memory map 0x08000458 0x18 THUMB Debug/../../obj/vectors.o 0x08000458 UnusedISR .text.CpuStartUserProgram - 0x08000470 0x28 THUMB Debug/../../obj/cpu.o + 0x08000470 0x2c THUMB Debug/../../obj/cpu.o 0x08000470 CpuStartUserProgram .text.CpuMemCopy - 0x08000498 0x28 THUMB Debug/../../obj/cpu.o - 0x08000498 CpuMemCopy + 0x0800049c 0x28 THUMB Debug/../../obj/cpu.o + 0x0800049c CpuMemCopy .text.CpuReset - 0x080004c0 0xc THUMB Debug/../../obj/cpu.o - 0x080004c0 CpuReset - .text.NvmInit 0x080004cc 0xc THUMB Debug/../../obj/nvm.o - 0x080004cc NvmInit + 0x080004c4 0xc THUMB Debug/../../obj/cpu.o + 0x080004c4 CpuReset + .text.NvmInit 0x080004d0 0xc THUMB Debug/../../obj/nvm.o + 0x080004d0 NvmInit .text.NvmWrite - 0x080004d8 0xc THUMB Debug/../../obj/nvm.o - 0x080004d8 NvmWrite + 0x080004dc 0xc THUMB Debug/../../obj/nvm.o + 0x080004dc NvmWrite .text.NvmErase - 0x080004e4 0xc THUMB Debug/../../obj/nvm.o - 0x080004e4 NvmErase + 0x080004e8 0xc THUMB Debug/../../obj/nvm.o + 0x080004e8 NvmErase .text.NvmVerifyChecksum - 0x080004f0 0xc THUMB Debug/../../obj/nvm.o - 0x080004f0 NvmVerifyChecksum - .text.NvmDone 0x080004fc 0x18 THUMB Debug/../../obj/nvm.o - 0x080004fc NvmDone + 0x080004f4 0xc THUMB Debug/../../obj/nvm.o + 0x080004f4 NvmVerifyChecksum + .text.NvmDone 0x08000500 0x18 THUMB Debug/../../obj/nvm.o + 0x08000500 NvmDone .text.TimerReset - 0x08000514 0x10 THUMB Debug/../../obj/timer.o - 0x08000514 TimerReset + 0x08000518 0x10 THUMB Debug/../../obj/timer.o + 0x08000518 TimerReset .text.TimerUpdate - 0x08000524 0x24 THUMB Debug/../../obj/timer.o - 0x08000524 TimerUpdate + 0x08000528 0x24 THUMB Debug/../../obj/timer.o + 0x08000528 TimerUpdate .text.TimerSet - 0x08000548 0xc THUMB Debug/../../obj/timer.o - 0x08000548 TimerSet + 0x0800054c 0xc THUMB Debug/../../obj/timer.o + 0x0800054c TimerSet .text.TimerInit - 0x08000554 0x2c THUMB Debug/../../obj/timer.o - 0x08000554 TimerInit + 0x08000558 0x2c THUMB Debug/../../obj/timer.o + 0x08000558 TimerInit .text.TimerGet - 0x08000580 0x14 THUMB Debug/../../obj/timer.o - 0x08000580 TimerGet + 0x08000584 0x14 THUMB Debug/../../obj/timer.o + 0x08000584 TimerGet .text.UartReceiveByte - 0x08000594 0x24 THUMB Debug/../../obj/uart.o + 0x08000598 0x24 THUMB Debug/../../obj/uart.o .text.UartTransmitByte - 0x080005b8 0x4c THUMB Debug/../../obj/uart.o + 0x080005bc 0x4c THUMB Debug/../../obj/uart.o .text.UartInit - 0x08000604 0x2c THUMB Debug/../../obj/uart.o - 0x08000604 UartInit + 0x08000608 0x2c THUMB Debug/../../obj/uart.o + 0x08000608 UartInit .text.UartTransmitPacket - 0x08000630 0x70 THUMB Debug/../../obj/uart.o - 0x08000630 UartTransmitPacket + 0x08000634 0x70 THUMB Debug/../../obj/uart.o + 0x08000634 UartTransmitPacket .text.UartReceivePacket - 0x080006a0 0xb0 THUMB Debug/../../obj/uart.o - 0x080006a0 UartReceivePacket + 0x080006a4 0xb0 THUMB Debug/../../obj/uart.o + 0x080006a4 UartReceivePacket .text.FlashUnlock - 0x08000750 0x24 THUMB Debug/../../obj/flash.o + 0x08000754 0x24 THUMB Debug/../../obj/flash.o .text.FlashLock - 0x08000774 0x14 THUMB Debug/../../obj/flash.o + 0x08000778 0x14 THUMB Debug/../../obj/flash.o .text.FlashGetSector - 0x08000788 0x48 THUMB Debug/../../obj/flash.o + 0x0800078c 0x48 THUMB Debug/../../obj/flash.o .text.FlashWriteBlock - 0x080007d0 0xc4 THUMB Debug/../../obj/flash.o + 0x080007d4 0xc4 THUMB Debug/../../obj/flash.o .text.FlashGetSectorBaseAddr - 0x08000894 0x40 THUMB Debug/../../obj/flash.o + 0x08000898 0x40 THUMB Debug/../../obj/flash.o .text.FlashInitBlock - 0x080008d4 0x38 THUMB Debug/../../obj/flash.o + 0x080008d8 0x38 THUMB Debug/../../obj/flash.o .text.FlashSwitchBlock - 0x0800090c 0x50 THUMB Debug/../../obj/flash.o + 0x08000910 0x50 THUMB Debug/../../obj/flash.o .text.FlashAddToBlock - 0x0800095c 0xa0 THUMB Debug/../../obj/flash.o + 0x08000960 0xa0 THUMB Debug/../../obj/flash.o .text.FlashInit - 0x080009fc 0x1c THUMB Debug/../../obj/flash.o - 0x080009fc FlashInit + 0x08000a00 0x1c THUMB Debug/../../obj/flash.o + 0x08000a00 FlashInit .text.FlashWrite - 0x08000a18 0x58 THUMB Debug/../../obj/flash.o - 0x08000a18 FlashWrite + 0x08000a1c 0x58 THUMB Debug/../../obj/flash.o + 0x08000a1c FlashWrite .text.FlashErase - 0x08000a70 0x144 THUMB Debug/../../obj/flash.o - 0x08000a70 FlashErase - .text.FlashVerifyChecksum - 0x08000bb4 0x68 THUMB Debug/../../obj/flash.o - 0x08000bb4 FlashVerifyChecksum + 0x08000a74 0x144 THUMB Debug/../../obj/flash.o + 0x08000a74 FlashErase .text.FlashWriteChecksum - 0x08000c1c 0x50 THUMB Debug/../../obj/flash.o - 0x08000c1c FlashWriteChecksum + 0x08000bb8 0x5c THUMB Debug/../../obj/flash.o + 0x08000bb8 FlashWriteChecksum + .text.FlashVerifyChecksum + 0x08000c14 0x68 THUMB Debug/../../obj/flash.o + 0x08000c14 FlashVerifyChecksum .text.FlashDone - 0x08000c6c 0x58 THUMB Debug/../../obj/flash.o - 0x08000c6c FlashDone + 0x08000c7c 0x58 THUMB Debug/../../obj/flash.o + 0x08000c7c FlashDone .text.AssertFailure - 0x08000cc4 0x1c THUMB Debug/../../obj/assert.o - 0x08000cc4 AssertFailure + 0x08000cd4 0x1c THUMB Debug/../../obj/assert.o + 0x08000cd4 AssertFailure .text.BackDoorCheck - 0x08000ce0 0x3c THUMB Debug/../../obj/backdoor.o - 0x08000ce0 BackDoorCheck + 0x08000cf0 0x3c THUMB Debug/../../obj/backdoor.o + 0x08000cf0 BackDoorCheck .text.BackDoorInit - 0x08000d1c 0x1c THUMB Debug/../../obj/backdoor.o - 0x08000d1c BackDoorInit + 0x08000d2c 0x1c THUMB Debug/../../obj/backdoor.o + 0x08000d2c BackDoorInit .text.BootInit - 0x08000d38 0x18 THUMB Debug/../../obj/boot.o - 0x08000d38 BootInit + 0x08000d48 0x18 THUMB Debug/../../obj/boot.o + 0x08000d48 BootInit .text.BootTask - 0x08000d50 0x14 THUMB Debug/../../obj/boot.o - 0x08000d50 BootTask - .text.ComInit 0x08000d64 0x34 THUMB Debug/../../obj/com.o - 0x08000d64 ComInit - .text.ComTask 0x08000d98 0x24 THUMB Debug/../../obj/com.o - 0x08000d98 ComTask + 0x08000d60 0x14 THUMB Debug/../../obj/boot.o + 0x08000d60 BootTask + .text.ComInit 0x08000d74 0x34 THUMB Debug/../../obj/com.o + 0x08000d74 ComInit + .text.ComTask 0x08000da8 0x24 THUMB Debug/../../obj/com.o + 0x08000da8 ComTask + .text.ComFree 0x08000dcc 0x4 THUMB Debug/../../obj/com.o + 0x08000dcc ComFree .text.ComTransmitPacket - 0x08000dbc 0x10 THUMB Debug/../../obj/com.o - 0x08000dbc ComTransmitPacket + 0x08000dd0 0x10 THUMB Debug/../../obj/com.o + 0x08000dd0 ComTransmitPacket .text.ComSetConnectEntryState - 0x08000dcc 0x10 THUMB Debug/../../obj/com.o - 0x08000dcc ComSetConnectEntryState + 0x08000de0 0x10 THUMB Debug/../../obj/com.o + 0x08000de0 ComSetConnectEntryState .text.ComIsConnected - 0x08000ddc 0xc THUMB Debug/../../obj/com.o - 0x08000ddc ComIsConnected - .text.CopInit 0x08000de8 0x4 THUMB Debug/../../obj/cop.o - 0x08000de8 CopInit + 0x08000df0 0xc THUMB Debug/../../obj/com.o + 0x08000df0 ComIsConnected + .text.CopInit 0x08000dfc 0x4 THUMB Debug/../../obj/cop.o + 0x08000dfc CopInit .text.CopService - 0x08000dec 0x4 THUMB Debug/../../obj/cop.o - 0x08000dec CopService + 0x08000e00 0x4 THUMB Debug/../../obj/cop.o + 0x08000e00 CopService .text.XcpProtectResources - 0x08000df0 0x10 THUMB Debug/../../obj/xcp.o + 0x08000e04 0x10 THUMB Debug/../../obj/xcp.o .text.XcpSetCtoError - 0x08000e00 0x1c THUMB Debug/../../obj/xcp.o - .text.XcpInit 0x08000e1c 0x20 THUMB Debug/../../obj/xcp.o - 0x08000e1c XcpInit + 0x08000e14 0x1c THUMB Debug/../../obj/xcp.o + .text.XcpInit 0x08000e30 0x20 THUMB Debug/../../obj/xcp.o + 0x08000e30 XcpInit .text.XcpIsConnected - 0x08000e3c 0x14 THUMB Debug/../../obj/xcp.o - 0x08000e3c XcpIsConnected - .text.XcpPacketTransmitted 0x08000e50 0x14 THUMB Debug/../../obj/xcp.o - 0x08000e50 XcpPacketTransmitted + 0x08000e50 XcpIsConnected + .text.XcpPacketTransmitted + 0x08000e64 0x14 THUMB Debug/../../obj/xcp.o + 0x08000e64 XcpPacketTransmitted .text.XcpPacketReceived - 0x08000e64 0x3c8 THUMB Debug/../../obj/xcp.o - 0x08000e64 XcpPacketReceived + 0x08000e78 0x3c8 THUMB Debug/../../obj/xcp.o + 0x08000e78 XcpPacketReceived .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x0800122c 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x0800122c __do_debug_operation_bkpt + 0x08001240 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x08001240 __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x08001244 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08001244 __debug_io_lock + 0x08001258 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x08001258 __debug_io_lock .text.libc.__debug_io_unlock - 0x08001248 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08001248 __debug_io_unlock - 0x0800124c __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x0800124c __text_load_end__ = __text_end__ + 0x0800125c 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x0800125c __debug_io_unlock + 0x08001260 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x08001260 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -371,65 +375,65 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .text is too large to fit in FLASH memory segment) - 0x0800124c __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x08001260 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x0800124c 0x0 - 0x0800124c __dtors_start__ = . +.dtors 0x08001260 0x0 + 0x08001260 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x0800124c __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x0800124c __dtors_load_end__ = __dtors_end__ + 0x08001260 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x08001260 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .dtors is too large to fit in FLASH memory segment) - 0x0800124c __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x08001260 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x0800124c 0x0 - 0x0800124c __ctors_start__ = . +.ctors 0x08001260 0x0 + 0x08001260 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x0800124c __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x0800124c __ctors_load_end__ = __ctors_end__ + 0x08001260 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x08001260 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ctors is too large to fit in FLASH memory segment) - 0x0800124c __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x08001260 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x0800124c 0x23c - 0x0800124c __rodata_start__ = . +.rodata 0x08001260 0x23c + 0x08001260 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) .rodata.str1.4 - 0x0800124c 0x67 THUMB Debug/../../obj/main.o + 0x08001260 0x67 THUMB Debug/../../obj/main.o 0x68 (size before relaxing) - *fill* 0x080012b3 0x1 00 + *fill* 0x080012c7 0x1 00 .rodata.str1.4 - 0x080012b4 0x92 THUMB Debug/../../obj/vectors.o + 0x080012c8 0x92 THUMB Debug/../../obj/vectors.o 0x94 (size before relaxing) - *fill* 0x08001346 0x2 00 + *fill* 0x0800135a 0x2 00 .rodata.str1.4 - 0x08001348 0x84 THUMB Debug/../../obj/uart.o + 0x0800135c 0x84 THUMB Debug/../../obj/uart.o .rodata.flashLayout - 0x080013cc 0xb4 THUMB Debug/../../obj/flash.o + 0x080013e0 0xb4 THUMB Debug/../../obj/flash.o .rodata.xcpStationId - 0x08001480 0x8 THUMB Debug/../../obj/xcp.o - 0x08001488 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x08001488 __rodata_load_end__ = __rodata_end__ + 0x08001494 0x8 THUMB Debug/../../obj/xcp.o + 0x0800149c __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x0800149c __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .rodata is too large to fit in FLASH memory segment) - 0x08001488 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x0800149c __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x08001488 0x0 - 0x08001488 __ARM.exidx_start__ = . - 0x08001488 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x0800149c 0x0 + 0x0800149c __ARM.exidx_start__ = . + 0x0800149c __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x08001488 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x08001488 __exidx_end = __ARM.exidx_end__ - 0x08001488 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x0800149c __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x0800149c __exidx_end = __ARM.exidx_end__ + 0x0800149c __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x08001488 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x0800149c __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x08001488 +.fast 0x20000000 0x0 load address 0x0800149c 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x08001488 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x0800149c __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x20000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -438,13 +442,13 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __RAM_segment_start__) && (__fast_run_end__ <= (__RAM_segment_start__ + 0x5000))), error: .fast_run is too large to fit in RAM memory segment) - 0x08001488 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x0800149c __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x0 load address 0x08001488 +.data 0x20000000 0x0 load address 0x0800149c 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) 0x20000000 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x08001488 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x0800149c __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x20000))), error: .data is too large to fit in FLASH memory segment) .data_run 0x20000000 0x0 @@ -455,100 +459,98 @@ Linker script and memory map 0x00000001 . = ASSERT (((__data_run_end__ >= __RAM_segment_start__) && (__data_run_end__ <= (__RAM_segment_start__ + 0x5000))), error: .data_run is too large to fit in RAM memory segment) 0x20000000 __bss_load_start__ = ALIGN (__data_run_end__, 0x4) -.bss 0x20000000 0x4ec +.bss 0x20000000 0x4e8 0x20000000 __bss_start__ = . *(.bss .bss.* .gnu.linkonce.b.*) .bss.millisecond_counter 0x20000000 0x2 THUMB Debug/../../obj/timer.o - *fill* 0x20000002 0x2 00 - .bss.xcpCtoReqPacket.876 + .bss.xcpCtoRxInProgress.882 + 0x20000002 0x1 THUMB Debug/../../obj/uart.o + .bss.xcpCtoRxLength.881 + 0x20000003 0x1 THUMB Debug/../../obj/uart.o + .bss.xcpCtoReqPacket.880 0x20000004 0x44 THUMB Debug/../../obj/uart.o - .bss.xcpCtoRxInProgress.878 - 0x20000048 0x1 THUMB Debug/../../obj/uart.o - .bss.xcpCtoRxLength.877 - 0x20000049 0x1 THUMB Debug/../../obj/uart.o - *fill* 0x2000004a 0x2 00 .bss.bootBlockInfo - 0x2000004c 0x204 THUMB Debug/../../obj/flash.o + 0x20000048 0x204 THUMB Debug/../../obj/flash.o .bss.blockInfo - 0x20000250 0x204 THUMB Debug/../../obj/flash.o + 0x2000024c 0x204 THUMB Debug/../../obj/flash.o .bss.assert_failure_file - 0x20000454 0x4 THUMB Debug/../../obj/assert.o + 0x20000450 0x4 THUMB Debug/../../obj/assert.o .bss.assert_failure_line - 0x20000458 0x4 THUMB Debug/../../obj/assert.o + 0x20000454 0x4 THUMB Debug/../../obj/assert.o .bss.backdoorOpen - 0x2000045c 0x1 THUMB Debug/../../obj/backdoor.o + 0x20000458 0x1 THUMB Debug/../../obj/backdoor.o .bss.comEntryStateConnect - 0x2000045d 0x1 THUMB Debug/../../obj/com.o - *fill* 0x2000045e 0x2 00 - .bss.xcpCtoReqPacket.855 - 0x20000460 0x40 THUMB Debug/../../obj/com.o - .bss.xcpInfo 0x200004a0 0x4c THUMB Debug/../../obj/xcp.o + 0x20000459 0x1 THUMB Debug/../../obj/com.o + *fill* 0x2000045a 0x2 00 + .bss.xcpCtoReqPacket.859 + 0x2000045c 0x40 THUMB Debug/../../obj/com.o + .bss.xcpInfo 0x2000049c 0x4c THUMB Debug/../../obj/xcp.o *(COMMON) - 0x200004ec __bss_end__ = (__bss_start__ + SIZEOF (.bss)) - 0x200004ec __bss_load_end__ = __bss_end__ + 0x200004e8 __bss_end__ = (__bss_start__ + SIZEOF (.bss)) + 0x200004e8 __bss_load_end__ = __bss_end__ 0x00000001 . = ASSERT (((__bss_end__ >= __RAM_segment_start__) && (__bss_end__ <= (__RAM_segment_start__ + 0x5000))), error: .bss is too large to fit in RAM memory segment) - 0x200004ec __non_init_load_start__ = ALIGN (__bss_end__, 0x4) + 0x200004e8 __non_init_load_start__ = ALIGN (__bss_end__, 0x4) -.non_init 0x200004ec 0x0 - 0x200004ec __non_init_start__ = . +.non_init 0x200004e8 0x0 + 0x200004e8 __non_init_start__ = . *(.non_init .non_init.*) - 0x200004ec __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) - 0x200004ec __non_init_load_end__ = __non_init_end__ + 0x200004e8 __non_init_end__ = (__non_init_start__ + SIZEOF (.non_init)) + 0x200004e8 __non_init_load_end__ = __non_init_end__ 0x00000001 . = ASSERT (((__non_init_end__ >= __RAM_segment_start__) && (__non_init_end__ <= (__RAM_segment_start__ + 0x5000))), error: .non_init is too large to fit in RAM memory segment) - 0x200004ec __heap_load_start__ = ALIGN (__non_init_end__, 0x4) + 0x200004e8 __heap_load_start__ = ALIGN (__non_init_end__, 0x4) -.heap 0x200004ec 0x80 - 0x200004ec __heap_start__ = . +.heap 0x200004e8 0x80 + 0x200004e8 __heap_start__ = . *(.heap .heap.*) - 0x2000056c . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) - *fill* 0x200004ec 0x80 00 - 0x2000056c __heap_end__ = (__heap_start__ + SIZEOF (.heap)) - 0x2000056c __heap_load_end__ = __heap_end__ + 0x20000568 . = ALIGN (MAX ((__heap_start__ + __HEAPSIZE__), .), 0x4) + *fill* 0x200004e8 0x80 00 + 0x20000568 __heap_end__ = (__heap_start__ + SIZEOF (.heap)) + 0x20000568 __heap_load_end__ = __heap_end__ 0x00000001 . = ASSERT (((__heap_end__ >= __RAM_segment_start__) && (__heap_end__ <= (__RAM_segment_start__ + 0x5000))), error: .heap is too large to fit in RAM memory segment) - 0x2000056c __stack_load_start__ = ALIGN (__heap_end__, 0x4) + 0x20000568 __stack_load_start__ = ALIGN (__heap_end__, 0x4) -.stack 0x2000056c 0x100 - 0x2000056c __stack_start__ = . +.stack 0x20000568 0x100 + 0x20000568 __stack_start__ = . *(.stack .stack.*) - 0x2000066c . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) - *fill* 0x2000056c 0x100 00 - 0x2000066c __stack_end__ = (__stack_start__ + SIZEOF (.stack)) - 0x2000066c __stack_load_end__ = __stack_end__ + 0x20000668 . = ALIGN (MAX ((__stack_start__ + __STACKSIZE__), .), 0x4) + *fill* 0x20000568 0x100 00 + 0x20000668 __stack_end__ = (__stack_start__ + SIZEOF (.stack)) + 0x20000668 __stack_load_end__ = __stack_end__ 0x00000001 . = ASSERT (((__stack_end__ >= __RAM_segment_start__) && (__stack_end__ <= (__RAM_segment_start__ + 0x5000))), error: .stack is too large to fit in RAM memory segment) - 0x2000066c __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) + 0x20000668 __stack_process_load_start__ = ALIGN (__stack_end__, 0x4) -.stack_process 0x2000066c 0x0 - 0x2000066c __stack_process_start__ = . +.stack_process 0x20000668 0x0 + 0x20000668 __stack_process_start__ = . *(.stack_process .stack_process.*) - 0x2000066c . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) - 0x2000066c __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) - 0x2000066c __stack_process_load_end__ = __stack_process_end__ + 0x20000668 . = ALIGN (MAX ((__stack_process_start__ + __STACKSIZE_PROCESS__), .), 0x4) + 0x20000668 __stack_process_end__ = (__stack_process_start__ + SIZEOF (.stack_process)) + 0x20000668 __stack_process_load_end__ = __stack_process_end__ 0x00000001 . = ASSERT (((__stack_process_end__ >= __RAM_segment_start__) && (__stack_process_end__ <= (__RAM_segment_start__ + 0x5000))), error: .stack_process is too large to fit in RAM memory segment) - 0x2000066c __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) + 0x20000668 __tbss_load_start__ = ALIGN (__stack_process_end__, 0x4) -.tbss 0x2000066c 0x0 - 0x2000066c __tbss_start__ = . +.tbss 0x20000668 0x0 + 0x20000668 __tbss_start__ = . *(.tbss .tbss.*) - 0x2000066c __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) - 0x2000066c __tbss_load_end__ = __tbss_end__ + 0x20000668 __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) + 0x20000668 __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __RAM_segment_start__) && (__tbss_end__ <= (__RAM_segment_start__ + 0x5000))), error: .tbss is too large to fit in RAM memory segment) - 0x08001488 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x0800149c __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x2000066c 0x0 load address 0x08001488 - 0x2000066c __tdata_start__ = . +.tdata 0x20000668 0x0 load address 0x0800149c + 0x20000668 __tdata_start__ = . *(.tdata .tdata.*) - 0x2000066c __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x08001488 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x08001488 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x20000668 __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) + 0x0800149c __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x0800149c __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x20000))), error: .tdata is too large to fit in FLASH memory segment) -.tdata_run 0x2000066c 0x0 - 0x2000066c __tdata_run_start__ = . - 0x2000066c . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) - 0x2000066c __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) - 0x2000066c __tdata_run_load_end__ = __tdata_run_end__ - 0x2000066c __RAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) +.tdata_run 0x20000668 0x0 + 0x20000668 __tdata_run_start__ = . + 0x20000668 . = MAX ((__tdata_run_start__ + SIZEOF (.tdata)), .) + 0x20000668 __tdata_run_end__ = (__tdata_run_start__ + SIZEOF (.tdata_run)) + 0x20000668 __tdata_run_load_end__ = __tdata_run_end__ + 0x20000668 __RAM_segment_used_end__ = (ALIGN (__tbss_end__, 0x4) + SIZEOF (.tdata_run)) 0x00000001 . = ASSERT (((__tdata_run_end__ >= __RAM_segment_start__) && (__tdata_run_end__ <= (__RAM_segment_start__ + 0x5000))), error: .tdata_run is too large to fit in RAM memory segment) START GROUP LOAD THUMB Debug/../../obj/hooks.o @@ -578,7 +580,7 @@ LOAD C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib END GROUP OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/../bin/openbtl_olimex_stm32p103.elf elf32-littlearm) -.debug_info 0x00000000 0x27fc +.debug_info 0x00000000 0x2824 .debug_info 0x00000000 0x5e THUMB Debug/../../obj/hooks.o .debug_info 0x0000005e 0x32a THUMB Debug/../../obj/main.o .debug_info 0x00000388 0x53d THUMB Debug/../../obj/core_cm3.o @@ -590,16 +592,16 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_info 0x00001143 0x162 THUMB Debug/../../obj/nvm.o .debug_info 0x000012a5 0x148 THUMB Debug/../../obj/timer.o .debug_info 0x000013ed 0x28d THUMB Debug/../../obj/uart.o - .debug_info 0x0000167a 0x671 THUMB Debug/../../obj/flash.o - .debug_info 0x00001ceb 0xe8 THUMB Debug/../../obj/assert.o - .debug_info 0x00001dd3 0xa8 THUMB Debug/../../obj/backdoor.o - .debug_info 0x00001e7b 0x8c THUMB Debug/../../obj/boot.o - .debug_info 0x00001f07 0x18f THUMB Debug/../../obj/com.o - .debug_info 0x00002096 0x8a THUMB Debug/../../obj/cop.o - .debug_info 0x00002120 0x60f THUMB Debug/../../obj/xcp.o - .debug_info 0x0000272f 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_info 0x0000167a 0x670 THUMB Debug/../../obj/flash.o + .debug_info 0x00001cea 0xe8 THUMB Debug/../../obj/assert.o + .debug_info 0x00001dd2 0xa8 THUMB Debug/../../obj/backdoor.o + .debug_info 0x00001e7a 0x8c THUMB Debug/../../obj/boot.o + .debug_info 0x00001f06 0x1b8 THUMB Debug/../../obj/com.o + .debug_info 0x000020be 0x8a THUMB Debug/../../obj/cop.o + .debug_info 0x00002148 0x60f THUMB Debug/../../obj/xcp.o + .debug_info 0x00002757 0xcd C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_abbrev 0x00000000 0xe19 +.debug_abbrev 0x00000000 0xe28 .debug_abbrev 0x00000000 0x2a THUMB Debug/../../obj/hooks.o .debug_abbrev 0x0000002a 0x109 THUMB Debug/../../obj/main.o .debug_abbrev 0x00000133 0xa9 THUMB Debug/../../obj/core_cm3.o @@ -611,16 +613,16 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_abbrev 0x00000517 0xa5 THUMB Debug/../../obj/nvm.o .debug_abbrev 0x000005bc 0xe1 THUMB Debug/../../obj/timer.o .debug_abbrev 0x0000069d 0x133 THUMB Debug/../../obj/uart.o - .debug_abbrev 0x000007d0 0x229 THUMB Debug/../../obj/flash.o - .debug_abbrev 0x000009f9 0x7e THUMB Debug/../../obj/assert.o - .debug_abbrev 0x00000a77 0x5d THUMB Debug/../../obj/backdoor.o - .debug_abbrev 0x00000ad4 0x41 THUMB Debug/../../obj/boot.o - .debug_abbrev 0x00000b15 0xe2 THUMB Debug/../../obj/com.o - .debug_abbrev 0x00000bf7 0x41 THUMB Debug/../../obj/cop.o - .debug_abbrev 0x00000c38 0x1bc THUMB Debug/../../obj/xcp.o - .debug_abbrev 0x00000df4 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_abbrev 0x000007d0 0x238 THUMB Debug/../../obj/flash.o + .debug_abbrev 0x00000a08 0x7e THUMB Debug/../../obj/assert.o + .debug_abbrev 0x00000a86 0x5d THUMB Debug/../../obj/backdoor.o + .debug_abbrev 0x00000ae3 0x41 THUMB Debug/../../obj/boot.o + .debug_abbrev 0x00000b24 0xe2 THUMB Debug/../../obj/com.o + .debug_abbrev 0x00000c06 0x41 THUMB Debug/../../obj/cop.o + .debug_abbrev 0x00000c47 0x1bc THUMB Debug/../../obj/xcp.o + .debug_abbrev 0x00000e03 0x25 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_line 0x00000000 0x177d +.debug_line 0x00000000 0x17a3 .debug_line 0x00000000 0x1d THUMB Debug/../../obj/hooks.o .debug_line 0x0000001d 0x1d7 THUMB Debug/../../obj/main.o .debug_line 0x000001f4 0x295 THUMB Debug/../../obj/core_cm3.o @@ -628,20 +630,20 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_line 0x000006a0 0x15c THUMB Debug/../../obj/cstart.o .debug_line 0x000007fc 0xf0 THUMB Debug/../../obj/vectors.o .debug_line 0x000008ec 0x1d THUMB Debug/../../obj/can.o - .debug_line 0x00000909 0x116 THUMB Debug/../../obj/cpu.o - .debug_line 0x00000a1f 0x133 THUMB Debug/../../obj/nvm.o - .debug_line 0x00000b52 0x131 THUMB Debug/../../obj/timer.o - .debug_line 0x00000c83 0x16b THUMB Debug/../../obj/uart.o - .debug_line 0x00000dee 0x2c8 THUMB Debug/../../obj/flash.o - .debug_line 0x000010b6 0xdc THUMB Debug/../../obj/assert.o - .debug_line 0x00001192 0xf4 THUMB Debug/../../obj/backdoor.o - .debug_line 0x00001286 0xbf THUMB Debug/../../obj/boot.o - .debug_line 0x00001345 0x136 THUMB Debug/../../obj/com.o - .debug_line 0x0000147b 0xb7 THUMB Debug/../../obj/cop.o - .debug_line 0x00001532 0x1d7 THUMB Debug/../../obj/xcp.o - .debug_line 0x00001709 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_line 0x00000909 0x117 THUMB Debug/../../obj/cpu.o + .debug_line 0x00000a20 0x133 THUMB Debug/../../obj/nvm.o + .debug_line 0x00000b53 0x131 THUMB Debug/../../obj/timer.o + .debug_line 0x00000c84 0x16b THUMB Debug/../../obj/uart.o + .debug_line 0x00000def 0x2ca THUMB Debug/../../obj/flash.o + .debug_line 0x000010b9 0xdc THUMB Debug/../../obj/assert.o + .debug_line 0x00001195 0xf4 THUMB Debug/../../obj/backdoor.o + .debug_line 0x00001289 0xbf THUMB Debug/../../obj/boot.o + .debug_line 0x00001348 0x159 THUMB Debug/../../obj/com.o + .debug_line 0x000014a1 0xb7 THUMB Debug/../../obj/cop.o + .debug_line 0x00001558 0x1d7 THUMB Debug/../../obj/xcp.o + .debug_line 0x0000172f 0x74 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_str 0x00000000 0x13e2 +.debug_str 0x00000000 0x1405 .debug_str 0x00000000 0xfc THUMB Debug/../../obj/hooks.o 0x12c (size before relaxing) .debug_str 0x000000fc 0x162 THUMB Debug/../../obj/main.o @@ -670,13 +672,13 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ 0x170 (size before relaxing) .debug_str 0x00000e8e 0x89 THUMB Debug/../../obj/boot.o 0x14d (size before relaxing) - .debug_str 0x00000f17 0x102 THUMB Debug/../../obj/com.o - 0x1f9 (size before relaxing) - .debug_str 0x00001019 0x89 THUMB Debug/../../obj/cop.o + .debug_str 0x00000f17 0x125 THUMB Debug/../../obj/com.o + 0x21c (size before relaxing) + .debug_str 0x0000103c 0x89 THUMB Debug/../../obj/cop.o 0x14d (size before relaxing) - .debug_str 0x000010a2 0x26e THUMB Debug/../../obj/xcp.o + .debug_str 0x000010c5 0x26e THUMB Debug/../../obj/xcp.o 0x36f (size before relaxing) - .debug_str 0x00001310 0xd2 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_str 0x00001333 0xd2 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) 0xde (size before relaxing) .comment 0x00000000 0x11 @@ -743,7 +745,7 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .ARM.attributes 0x00000130 0x10 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_frame 0x00000000 0x8fc +.debug_frame 0x00000000 0x918 .debug_frame 0x00000000 0x30 THUMB Debug/../../obj/main.o .debug_frame 0x00000030 0x170 THUMB Debug/../../obj/core_cm3.o .debug_frame 0x000001a0 0x38 THUMB Debug/../../obj/system_stm32f10x.o @@ -752,17 +754,17 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_frame 0x0000026c 0x9c THUMB Debug/../../obj/nvm.o .debug_frame 0x00000308 0x78 THUMB Debug/../../obj/timer.o .debug_frame 0x00000380 0x90 THUMB Debug/../../obj/uart.o - .debug_frame 0x00000410 0x19c THUMB Debug/../../obj/flash.o - .debug_frame 0x000005ac 0x2c THUMB Debug/../../obj/assert.o - .debug_frame 0x000005d8 0x48 THUMB Debug/../../obj/backdoor.o - .debug_frame 0x00000620 0x48 THUMB Debug/../../obj/boot.o - .debug_frame 0x00000668 0xa4 THUMB Debug/../../obj/com.o - .debug_frame 0x0000070c 0x30 THUMB Debug/../../obj/cop.o - .debug_frame 0x0000073c 0x80 THUMB Debug/../../obj/xcp.o - .debug_frame 0x000007bc 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - .debug_frame 0x0000085c 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_frame 0x00000410 0x198 THUMB Debug/../../obj/flash.o + .debug_frame 0x000005a8 0x2c THUMB Debug/../../obj/assert.o + .debug_frame 0x000005d4 0x48 THUMB Debug/../../obj/backdoor.o + .debug_frame 0x0000061c 0x48 THUMB Debug/../../obj/boot.o + .debug_frame 0x00000664 0xc4 THUMB Debug/../../obj/com.o + .debug_frame 0x00000728 0x30 THUMB Debug/../../obj/cop.o + .debug_frame 0x00000758 0x80 THUMB Debug/../../obj/xcp.o + .debug_frame 0x000007d8 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + .debug_frame 0x00000878 0xa0 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_loc 0x00000000 0x11fe +.debug_loc 0x00000000 0x11eb .debug_loc 0x00000000 0x82 THUMB Debug/../../obj/main.o .debug_loc 0x00000082 0x2ae THUMB Debug/../../obj/core_cm3.o .debug_loc 0x00000330 0x165 THUMB Debug/../../obj/system_stm32f10x.o @@ -771,14 +773,14 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_loc 0x000005c6 0xff THUMB Debug/../../obj/nvm.o .debug_loc 0x000006c5 0x40 THUMB Debug/../../obj/timer.o .debug_loc 0x00000705 0x115 THUMB Debug/../../obj/uart.o - .debug_loc 0x0000081a 0x6c5 THUMB Debug/../../obj/flash.o - .debug_loc 0x00000edf 0x46 THUMB Debug/../../obj/assert.o - .debug_loc 0x00000f25 0x40 THUMB Debug/../../obj/backdoor.o - .debug_loc 0x00000f65 0x40 THUMB Debug/../../obj/boot.o - .debug_loc 0x00000fa5 0xb2 THUMB Debug/../../obj/com.o - .debug_loc 0x00001057 0x1a7 THUMB Debug/../../obj/xcp.o + .debug_loc 0x0000081a 0x6b2 THUMB Debug/../../obj/flash.o + .debug_loc 0x00000ecc 0x46 THUMB Debug/../../obj/assert.o + .debug_loc 0x00000f12 0x40 THUMB Debug/../../obj/backdoor.o + .debug_loc 0x00000f52 0x40 THUMB Debug/../../obj/boot.o + .debug_loc 0x00000f92 0xb2 THUMB Debug/../../obj/com.o + .debug_loc 0x00001044 0x1a7 THUMB Debug/../../obj/xcp.o -.debug_aranges 0x00000000 0x450 +.debug_aranges 0x00000000 0x460 .debug_aranges 0x00000000 0x20 THUMB Debug/../../obj/main.o .debug_aranges @@ -806,15 +808,15 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_aranges 0x00000310 0x28 THUMB Debug/../../obj/boot.o .debug_aranges - 0x00000338 0x48 THUMB Debug/../../obj/com.o + 0x00000338 0x58 THUMB Debug/../../obj/com.o .debug_aranges - 0x00000380 0x28 THUMB Debug/../../obj/cop.o + 0x00000390 0x28 THUMB Debug/../../obj/cop.o .debug_aranges - 0x000003a8 0x48 THUMB Debug/../../obj/xcp.o + 0x000003b8 0x48 THUMB Debug/../../obj/xcp.o .debug_aranges - 0x000003f0 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x00000400 0x60 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) -.debug_ranges 0x00000000 0x360 +.debug_ranges 0x00000000 0x370 .debug_ranges 0x00000000 0x10 THUMB Debug/../../obj/main.o .debug_ranges 0x00000010 0xb8 THUMB Debug/../../obj/core_cm3.o .debug_ranges 0x000000c8 0x18 THUMB Debug/../../obj/system_stm32f10x.o @@ -827,7 +829,7 @@ OUTPUT(D:/usr/feaser/software/OpenBLT/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_ .debug_ranges 0x00000248 0x10 THUMB Debug/../../obj/assert.o .debug_ranges 0x00000258 0x18 THUMB Debug/../../obj/backdoor.o .debug_ranges 0x00000270 0x18 THUMB Debug/../../obj/boot.o - .debug_ranges 0x00000288 0x38 THUMB Debug/../../obj/com.o - .debug_ranges 0x000002c0 0x18 THUMB Debug/../../obj/cop.o - .debug_ranges 0x000002d8 0x38 THUMB Debug/../../obj/xcp.o - .debug_ranges 0x00000310 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + .debug_ranges 0x00000288 0x48 THUMB Debug/../../obj/com.o + .debug_ranges 0x000002d0 0x18 THUMB Debug/../../obj/cop.o + .debug_ranges 0x000002e8 0x38 THUMB Debug/../../obj/xcp.o + .debug_ranges 0x00000320 0x50 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.srec index ebaebde5..8f4228a4 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/bin/openbtl_olimex_stm32p103.srec @@ -1,5 +1,5 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S315080000006C060020DB0100085904000859040008A2 +S3150800000068060020DB0100085904000859040008A6 S31508000010590400085904000859040008590400083E S31508000020590400085904000859040008590400082E S31508000030590400085904000859040008590400081E @@ -28,7 +28,7 @@ S315080001904E494F4A00F062F84E484F49002200F097 S315080001A068F84E484E49091A082903DB00220260FE S315080001B0043001603F484049884205D0026804304F S315080001C003B4904703BCF7E700208646EC4600F0E8 -S315080001D0FDFD00200021434A904772B62A498D4604 +S315080001D007FE00200021434A904772B62A498D46F9 S315080001E02A482B492B4A00F039F82B482B492C4A28 S315080001F000F034F82B482C492C4A00F02FF82C48EC S315080002002C492D4A00F02AF82C482D492D4A00F091 @@ -39,13 +39,13 @@ S315080002400268043003B4904703BCF7E700208646EB S31508000250EC4600200021234A9047FEE7884207D053 S31508000260521A05D0037801300B700131013AF9D1E1 S315080002707047884202D002700130FAE770470000E2 -S3150800028008ED00E0000000086C060020881400084D +S3150800028008ED00E000000008680600209C1400083D S315080002900000002000000020E8020008E80200082C -S315080002A04C120008881400080000002000000020F6 -S315080002B04C1200084C1200084C1200084C12000898 -S315080002C04C1200084C1200084C1200084C12000888 -S315080002D08814000800000020EC040020EC0400202C -S30D080002E06C050020E902000884 +S315080002A0601200089C1400080000002000000020CE +S315080002B06012000860120008601200086012000848 +S315080002C06012000860120008601200086012000838 +S315080002D09C14000800000020E8040020E804002020 +S30D080002E068050020E902000888 S315080002E800B582B04FF00003009301934FF4805392 S315080002F8C4F202031A6842F001021A6059684FF0FC S315080003080002CFF6FF020A405A601A6822F0847281 @@ -55,7 +55,7 @@ S3150800033880321A604FF48053C4F2020340F2DC524A S31508000348196801F400310191009901F10101009140 S31508000358019911B900999142F2D14FF48053C4F228 S3150800036802031B6813F4003F04D138484FF06F01A5 -S3150800037800F0A4FC4FF40053C4F202031A6842F0D2 +S3150800037800F0ACFC4FF40053C4F202031A6842F0CA S3150800038810021A601A6822F003021A601A6842F004 S3150800039802021A604FF48053C4F202035A685A607C S315080003A85A6842F400525A605A6842F480625A609F @@ -68,265 +68,266 @@ S31508000408FAD14FF48053C4F20203DA6942F400328F S31508000418DA619A6942F005029A614FF40063C4F2F8 S3150800042801031A6822F470621A601A6842F4306284 S315080004381A601A6822F470421A601A6842F48042EE -S315080004481A6000F075FC00F07FFCFCE74C12000807 -S3150800045800B541F2B420C0F600004FF03C0100F0A8 -S315080004682DFC5DF804FB00BF00B500F03DF860B14F -S315080004784EF60853CEF200034FF400521A6042F2C1 -S315080004880403C0F600031B6898475DF804FB00BF21 -S3150800049870B50E4692B272B1044600F1010002F137 -S315080004A8FF3292B2851816F8013B04F8013B00F0B2 -S315080004B899FCAC42F7D170BD00B5FFF78AFE5DF826 -S315080004C804FB00BF00B500F095FA5DF804FB00BF11 -S315080004D800B500F09DFA5DF804FB00BF00B500F012 -S315080004E8C3FA5DF804FB00BF00B500F05FFB5DF8D2 -S315080004F804FB00BF00B500F08DFB18B100F0B2FB95 -S315080005085DF804FB4FF000005DF804FB4EF210039B -S31508000518CEF200034FF000021A6070474EF210033D -S31508000528CEF200031B6813F4803F1FBF40F2000396 -S31508000538C2F200031A88013218BF1A80704700BF32 -S3150800054840F20003C2F200031880704700B5FFF7AF -S31508000558DDFF4EF21003CEF2000341F63F12C0F259 -S3150800056801025A604FF0000098604FF005021A60C1 -S31508000578FFF7E6FF5DF804FB00B5FFF7CFFF40F28B -S315080005880003C2F2000318885DF804FB4FF4884399 -S31508000598C4F200031B8813F0200F1FBF4FF48843CB -S315080005A8C4F200039B88037014BF0120002070471B -S315080005B810B5C0B24FF48843C4F200031B8813F081 -S315080005C8800F15D04FF48843C4F2000398801B881F -S315080005D813F0800F0FD14FF48844C4F2000400F0DA -S315080005E801FC238813F0800FF9D04FF0010010BDE5 -S315080005F84FF0000010BD4FF0010010BD4FF48843BE -S31508000608C4F200034FF000021A819A811A829A826C -S315080006181A8340F271221A819A8992B242F40052D8 -S3150800062842F00C029A8170472DE9F0410546CCB292 -S31508000638402C07D941F24830C0F600004FF088012F -S3150800064800F03CFB2046FFF7B3FF012807D041F22C -S315080006584830C0F600004FF08B0100F02FFB264605 -S31508000668BCB14FF0000441F24837C0F600074FF016 -S31508000678930800F0B7FB285DFFF79AFF012803D017 -S315080006883846414600F01AFB04F10104A3B2B34206 -S31508000698EFD3BDE8F08100BF30B5054640F2480300 -S315080006A8C2F200031B78B3B940F20400C2F2000094 -S315080006B8FFF76CFF01283BD140F24803C2F200035A -S315080006C84FF001021A7040F24903C2F200034FF0D4 -S315080006D80000187030BD40F24903C2F200031C78C6 -S315080006E840F20403C2F2000304F101001818FFF7E8 -S315080006F84DFF01281FD104F10104E2B240F2490373 -S31508000708C2F200031A7040F20403C2F200031B780F -S31508000718934213D128460B49FFF7BAFE40F248031D -S31508000728C2F200034FF000021A704FF0010030BD04 -S315080007384FF0000030BD4FF0000030BD4FF000000C -S3150800074830BD00BF050000204FF40053C4F2020371 -S3150800075840F22312C4F267525A6048F6AB12CCF636 -S31508000768EF525A604FF03402DA6070474FF400537C -S31508000778C4F202031A6942F080021A61704700BF80 -S3150800078870B5064641F2CC35C0F600054FF00004B0 -S3150800079800F028FB2B68B3420DD869685B189E429F -S315080007A809D241F2CC33C0F6000304EB440203EB4A -S315080007B88203187A70BD04F1010405F10C050F2CA3 -S315080007C8E6D14FF0FF0070BD2DE9F04107460068F5 -S315080007D8FFF7D6FFFF2808BF002454D0FFF7B4FF59 -S315080007E84FF40053C4F20203DB6813F0010F04D078 -S315080007F8FFF7BCFF4FF0000445E04FF40053C4F27E -S3150800080802031A6942F001021A614FF000054FF413 -S315080008180054C4F202043B6805EB030805F1040218 -S31508000828BE58B2B2EA52E36813F0010F05D000F0D9 -S31508000838D9FAE36813F0010FF9D14FEA1643A8F875 -S315080008480230E36813F0010F05D000F0CBFAE3682D -S3150800085813F0010FF9D1D8F80030B34207D105F1E2 -S315080008680405B5F5007FD6D14FF0010401E04FF035 -S3150800087800044FF40053C4F202031A6922F0010275 -S315080008881A61FFF773FF2046BDE8F08170B5C6B256 -S3150800089841F2CC35C0F600054FF0000400F0A2FA84 -S315080008A82B7AB34208D141F2CC33C0F6000304EBE5 -S315080008B8440253F8220070BD04F1010405F10C0541 -S315080008C80F2CEBD14FF0FF3070BD00BF00B54FEAD3 -S315080008D8C1534FEAD35363B903688B420DD040F826 -S315080008E8041B4FF40072FFF7D3FD4FF001005DF8C3 -S315080008F804FB4FF000005DF804FB4FF001005DF8BB -S3150800090804FB00BF30B504460D4640F24C03C2F25C -S315080009180003984209D04FF40053C0F600039942E1 -S3150800092808D0FFF751FF48B910E040F25024C2F248 -S31508000938000403E040F24C04C2F2000420462946AB -S31508000948FFF7C4FF002808BF002401E04FF00004A1 -S31508000958204630BD2DE9F04305460C4616469FB29B -S315080009684FEA51294FEA49290368B3F1FF3F04D1F1 -S315080009784946FFF7ABFF002830D02B684B4505D012 -S3150800098828464946FFF7BEFF054658B32B68E41ABA -S3150800099804F104042C1906F1010807F1FF37BFB260 -S315080009A8B84440F2FF1709F5007900F01BFA05F17B -S315080009B80403E31ABB4207D928464946FFF7A2FFAC -S315080009C8054698B100F1040416F8013B04F8013B02 -S315080009D84645EAD14FF00100BDE8F0834FF0000024 -S315080009E8BDE8F0834FF00000BDE8F0834FF0000043 -S315080009F8BDE8F08340F25023C2F200034FF0FF32FD -S31508000A081A6040F24C03C2F200031A60704700BF2E -S31508000A1870B504460D461646FFF7B2FEFF281DD0E8 -S31508000A2804F1FF304019FFF7ABFEFF2819D04FEA4B -S31508000A3854224FF40053C0F60003B3EB422F07BF06 -S31508000A4840F24C00C2F2000040F25020C2F2000008 -S31508000A58ABB221463246FFF77DFF70BD4FF0000066 -S31508000A6870BD4FF0000070BD2DE9F04104460E46F2 -S31508000A78FFF786FE054604F1FF34A019FFF780FE46 -S31508000A8804460646FF2814BF00230123FF2D08BF86 -S31508000A9843F00103002B40F08480854275D8002D69 -S31508000AA877D00F2879D8FFF74FFE4FF40053C4F2D2 -S31508000AB80203DB6813F0010F05D0FFF757FE4FF066 -S31508000AC80000BDE8F0814FF40053C4F202031A6926 -S31508000AD842F002021A612846FFF7D8FE0746204662 -S31508000AE8FFF7D4FE804641F2CC35C0F600054FF034 -S31508000AF8000400F077F92B7AB34209D141F2CC33D6 -S31508000B08C0F6000304EB440203EB82035B6807E0C4 -S31508000B1804F1010405F10C050F2CEAD14FF0000386 -S31508000B28C7EB08084344C3F38F2303B303F1FF3322 -S31508000B389EB206F101064FEA86264FF000054FF4E5 -S31508000B480054C4F20204EB196361236943F04003B5 -S31508000B582361E36813F0010F05D000F043F9E36851 -S31508000B6813F0010FF9D105F58065B542EBD14FF4BD -S31508000B780053C4F202031A6922F002021A61FFF747 -S31508000B88F5FD4FF00100BDE8F0814FF00000BDE823 -S31508000B98F0814FF00000BDE8F0814FF00000BDE895 -S31508000BA8F0814FF00000BDE8F08100BF42F2040270 -S31508000BB8C0F600024FF40053C0F6000310681B681D -S31508000BC8C01842F20803C0F600031B68C01842F2B0 -S31508000BD80C03C0F600031B68C01842F21003C0F6DF -S31508000BE800031B68C01842F21403C0F600031B680A -S31508000BF8C01842F21803C0F600031B68C01842F270 -S31508000C085013C0F600031B68C018D0F1010038BF9E -S31508000C180020704710B581B040F24C03C2F20003B9 -S31508000C289C685A68A418DA68A4181A69A4185A692C -S31508000C38A4189A69A418DB69E418C4F10004009496 -S31508000C48FFF7B4FF844208BF012008D042F25010CB -S31508000C58C0F600004FF004016A46FFF7D9FE01B056 -S31508000C6810BD00BF00B540F24C03C2F200031B6872 -S31508000C78B3F1FF3F06D040F24C00C2F20000FFF77E -S31508000C88A3FD90B140F25023C2F200031B68B3F1EA -S31508000C98FF3F0ED040F25020C2F20000FFF794FD45 -S31508000CA8003018BF01205DF804FB4FF000005DF81E -S31508000CB804FB4FF001005DF804FB00BF00B540F2E5 -S31508000CC85443C2F20003186040F25843C2F20003C4 -S31508000CD8196000F087F8FCE700B500F07BF80128F2 -S31508000CE815D040F25C43C2F200031B78012B0ED1E3 -S31508000CF8FFF742FC31280AD940F25C43C2F20003E6 -S31508000D084FF000021A70FFF701FCFFF7ADFB5DF81C -S31508000D1804FB00BF00B540F25C43C2F200034FF083 -S31508000D2801021A70FFF712FCFFF7D6FF5DF804FBFD -S31508000D3800B500F055F8FFF7EDFFFFF7C3FB00F025 -S31508000D480DF85DF804FB00BF00B500F04BF800F09D -S31508000D581FF8FFF7C1FF5DF804FB00BF00B581B0B7 -S31508000D684FF0FF038DF800304FF000038DF801307F -S31508000D7800F050F8FFF742FC40F25D43C2F2000368 -S31508000D881B78012B02D1684600F068F801B000BD4F -S31508000D9800B540F26040C2F20000FFF77DFC01286A -S31508000DA805D140F26040C2F2000000F057F85DF83D -S31508000DB804FB00BF00B5C9B2FFF736FC00F044F8DB -S31508000DC85DF804FB40F25D43C2F200034FF00102EE -S31508000DD81A70704700B500F02DF85DF804FB00BFDF -S31508000DE8704700BF704700BF40F2A043C2F2000335 -S31508000DF84FF000025A70704740F2A043C2F200034F -S31508000E084FF0FE02DA7018714FF00202A3F8442078 -S31508000E18704700BF40F2A043C2F200034FF0000239 -S31508000E281A709A6483F84320A3F844209A705A7073 -S31508000E38704700BF40F2A043C2F20003187800309A -S31508000E4818BF0120704700BF40F2A043C2F2000352 -S31508000E584FF0000283F84320704700BF30B50446B8 -S31508000E680278FF2A1DD1FFF7BFFF40F2A043C2F25E -S31508000E7800034FF001021A704FF0FF01D9704FF0C6 -S31508000E88100119714FF0000159714FF0400098711F -S31508000E98D87119725A729A724FF00802A3F8442048 -S31508000EA8A4E140F2A043C2F200031B78012B40F0EC -S31508000EB8B781A2F1C902352A00F29481DFE812F057 -S31508000EC8F800920192018D01920192017F011901A0 -S31508000ED865014F01920192019201920192019201D4 -S31508000EE89201920192019201920192019201920154 +S315080004481A6000F07DFC00F087FCFCE760120008E3 +S3150800045800B541F2C820C0F600004FF03C0100F094 +S3150800046835FC5DF804FB00BF00B500F03FF870B135 +S3150800047800F0A8FC4EF60853CEF200034FF40052DB +S315080004881A6042F20403C0F600031B6898475DF831 +S3150800049804FB00BF70B50E4692B272B1044600F16D +S315080004A8010002F1FF3292B2851816F8013B04F8EA +S315080004B8013B00F0A1FCAC42F7D170BD00B5FFF7CF +S315080004C888FE5DF804FB00BF00B500F095FA5DF8F4 +S315080004D804FB00BF00B500F09DFA5DF804FB00BFF9 +S315080004E800B500F0C3FA5DF804FB00BF00B500F0DC +S315080004F88DFB5DF804FB00BF00B500F059FB18B189 +S3150800050800F0B8FB5DF804FB4FF000005DF804FB4B +S315080005184EF21003CEF200034FF000021A6070473D +S315080005284EF21003CEF200031B6813F4803F1FBF78 +S3150800053840F20003C2F200031A88013218BF1A8073 +S31508000548704700BF40F20003C2F2000318807047E4 +S3150800055800B5FFF7DDFF4EF21003CEF2000341F6B1 +S315080005683F12C0F201025A604FF0000098604FF03F +S3150800057805021A60FFF7E6FF5DF804FB00B5FFF70A +S31508000588CFFF40F20003C2F2000318885DF804FBA7 +S315080005984FF48843C4F200031B8813F0200F1FBFCB +S315080005A84FF48843C4F200039B88037014BF0120E4 +S315080005B80020704710B5C0B24FF48843C4F2000350 +S315080005C81B8813F0800F15D04FF48843C4F2000334 +S315080005D898801B8813F0800F0FD14FF48844C4F213 +S315080005E8000400F009FC238813F0800FF9D04FF0B7 +S315080005F8010010BD4FF0000010BD4FF0010010BDFE +S315080006084FF48843C4F200034FF000021A819A8116 +S315080006181A829A821A8340F271221A819A8992B2A8 +S3150800062842F4005242F00C029A8170472DE9F041D3 +S315080006380546CCB2402C07D941F25C30C0F600001A +S315080006484FF0880100F042FB2046FFF7B3FF012868 +S3150800065807D041F25C30C0F600004FF08B0100F07D +S3150800066835FB2646BCB14FF0000441F25C37C0F6AC +S3150800067800074FF0930800F0BFFB285DFFF79AFFC5 +S31508000688012803D03846414600F020FB04F101044E +S31508000698A3B2B342EFD3BDE8F08100BF30B5054633 +S315080006A840F20203C2F200031B78B3B940F2040011 +S315080006B8C2F20000FFF76CFF01283BD140F20203A3 +S315080006C8C2F200034FF001021A7040F20303C2F2A5 +S315080006D800034FF00000187030BD40F20303C2F261 +S315080006E800031C7840F20403C2F2000304F1010077 +S315080006F81818FFF74DFF01281FD104F10104E2B2CB +S3150800070840F20303C2F200031A7040F20403C2F26D +S3150800071800031B78934213D128460B49FFF7BAFE04 +S3150800072840F20203C2F200034FF000021A704FF0BB +S31508000738010030BD4FF0000030BD4FF0000030BD5D +S315080007484FF0000030BD00BF050000204FF40053ED +S31508000758C4F2020340F22312C4F267525A6048F6FA +S31508000768AB12CCF6EF525A604FF03402DA60704793 +S315080007784FF40053C4F202031A6942F080021A6160 +S31508000788704700BF70B5064641F2E035C0F6000569 +S315080007984FF0000400F030FB2B68B3420DD86968A7 +S315080007A85B189E4209D241F2E033C0F6000304EB17 +S315080007B8440203EB8203187A70BD04F1010405F1BB +S315080007C80C050F2CE6D14FF0FF0070BD2DE9F0415E +S315080007D807460068FFF7D6FFFF2808BF002454D04D +S315080007E8FFF7B4FF4FF40053C4F20203DB6813F0B3 +S315080007F8010F04D0FFF7BCFF4FF0000445E04FF4A3 +S315080008080053C4F202031A6942F001021A614FF052 +S3150800081800054FF40054C4F202043B6805EB0308CC +S3150800082805F10402BE58B2B2EA52E36813F0010FA2 +S3150800083805D000F0E1FAE36813F0010FF9D14FEAA1 +S315080008481643A8F80230E36813F0010F05D000F044 +S31508000858D3FAE36813F0010FF9D1D8F80030B34298 +S3150800086807D105F10405B5F5007FD6D14FF0010487 +S3150800087801E04FF000044FF40053C4F202031A696A +S3150800088822F001021A61FFF773FF2046BDE8F081DE +S3150800089870B5C6B241F2E035C0F600054FF000045F +S315080008A800F0AAFA2B7AB34208D141F2E033C0F62F +S315080008B8000304EB440253F8220070BD04F1010456 +S315080008C805F10C050F2CEBD14FF0FF3070BD00BFBA +S315080008D800B54FEAC1534FEAD35363B903688B424D +S315080008E80DD040F8041B4FF40072FFF7D3FD4FF004 +S315080008F801005DF804FB4FF000005DF804FB4FF0BB +S3150800090801005DF804FB00BF30B504460D4640F209 +S315080009184803C2F20003984209D04FF40053C0F6C0 +S315080009280003994208D0FFF751FF48B910E040F292 +S315080009384C24C2F2000403E040F24804C2F2000460 +S3150800094820462946FFF7C4FF002808BF002401E00F +S315080009584FF00004204630BD2DE9F04305460C4605 +S3150800096816469FB24FEA51294FEA49290368B3F157 +S31508000978FF3F04D14946FFF7ABFF002830D02B6864 +S315080009884B4505D028464946FFF7BEFF054658B3E6 +S315080009982B68E41A04F104042C1906F1010807F176 +S315080009A8FF37BFB2B84440F2FF1709F5007900F0DF +S315080009B823FA05F10403E31ABB4207D92846494630 +S315080009C8FFF7A2FF054698B100F1040416F8013BA3 +S315080009D804F8013B4645EAD14FF00100BDE8F0832B +S315080009E84FF00000BDE8F0834FF00000BDE8F08343 +S315080009F84FF00000BDE8F08340F24C23C2F2000332 +S31508000A084FF0FF321A6040F24803C2F200031A6038 +S31508000A18704700BF70B504460D461646FFF7B2FE86 +S31508000A28FF281DD004F1FF304019FFF7ABFEFF2859 +S31508000A3819D04FEA54224FF40053C0F60003B3EB1B +S31508000A48422F07BF40F24800C2F2000040F24C208D +S31508000A58C2F20000ABB221463246FFF77DFF70BDF1 +S31508000A684FF0000070BD4FF0000070BD2DE9F04151 +S31508000A7804460E46FFF786FE054604F1FF34A0191C +S31508000A88FFF780FE04460646FF2814BF0023012305 +S31508000A98FF2D08BF43F00103002B40F084808542F0 +S31508000AA875D8002D77D00F2879D8FFF74FFE4FF461 +S31508000AB80053C4F20203DB6813F0010F05D0FFF7F1 +S31508000AC857FE4FF00000BDE8F0814FF40053C4F21A +S31508000AD802031A6942F002021A612846FFF7D8FE8D +S31508000AE807462046FFF7D4FE804641F2E035C0F6B1 +S31508000AF800054FF0000400F07FF92B7AB34209D1BC +S31508000B0841F2E033C0F6000304EB440203EB820328 +S31508000B185B6807E004F1010405F10C050F2CEAD11E +S31508000B284FF00003C7EB08084344C3F38F2303B306 +S31508000B3803F1FF339EB206F101064FEA86264FF007 +S31508000B4800054FF40054C4F20204EB1963612369E3 +S31508000B5843F040032361E36813F0010F05D000F062 +S31508000B684BF9E36813F0010FF9D105F58065B5422D +S31508000B78EBD14FF40053C4F202031A6922F00202B9 +S31508000B881A61FFF7F5FD4FF00100BDE8F0814FF057 +S31508000B980000BDE8F0814FF00000BDE8F0814FF095 +S31508000BA80000BDE8F0814FF00000BDE8F08100BF05 +S31508000BB800B581B040F24803C2F200031B68B3F1DE +S31508000BC8FF3F08BF01201ED040F24803C2F20003C7 +S31508000BD899685A688918DA6889181A6989185A69D1 +S31508000BE889189A698918DA698B18C3F1000301AA62 +S31508000BF842F8043D42F25010C0F600004FF00401D6 +S31508000C086A46FFF707FF01B000BD00BF42F20402BB +S31508000C18C0F600024FF40053C0F6000310681B68BC +S31508000C28C01842F20803C0F600031B68C01842F24F +S31508000C380C03C0F600031B68C01842F21003C0F67E +S31508000C4800031B68C01842F21403C0F600031B68A9 +S31508000C58C01842F21803C0F600031B68C01842F20F +S31508000C685013C0F600031B68C018D0F1010038BF3E +S31508000C780020704700B540F24803C2F200031B681B +S31508000C88B3F1FF3F06D040F24800C2F20000FFF772 +S31508000C989DFD90B140F24C23C2F200031B68B3F1E4 +S31508000CA8FF3F0ED040F24C20C2F20000FFF78EFD3F +S31508000CB8003018BF01205DF804FB4FF000005DF80E +S31508000CC804FB4FF001005DF804FB00BF00B540F2D5 +S31508000CD85043C2F20003186040F25443C2F20003BC +S31508000CE8196000F089F8FCE700B500F07DF80128DE +S31508000CF815D040F25843C2F200031B78012B0ED1D7 +S31508000D08FFF73CFC31280AD940F25843C2F20003DF +S31508000D184FF000021A70FFF7FBFBFFF7A5FB5DF81B +S31508000D2804FB00BF00B540F25843C2F200034FF077 +S31508000D3801021A70FFF70CFCFFF7D6FF5DF804FBF3 +S31508000D4800B500F057F8FFF7EDFFFFF7BDFB00F019 +S31508000D580DF85DF804FB00BF00B500F04DF800F08B +S31508000D681FF8FFF7C1FF5DF804FB00BF00B581B0A7 +S31508000D784FF0FF038DF800304FF000038DF801306F +S31508000D8800F052F8FFF73CFC40F25943C2F2000360 +S31508000D981B78012B02D1684600F06AF801B000BD3D +S31508000DA800B540F25C40C2F20000FFF777FC012864 +S31508000DB805D140F25C40C2F2000000F059F85DF82F +S31508000DC804FB00BF704700BF00B5C9B2FFF72EFC89 +S31508000DD800F044F85DF804FB40F25943C2F20003F8 +S31508000DE84FF001021A70704700B500F02DF85DF84B +S31508000DF804FB00BF704700BF704700BF40F29C4322 +S31508000E08C2F200034FF000025A70704740F29C4342 +S31508000E18C2F200034FF0FE02DA7018714FF00202B0 +S31508000E28A3F84420704700BF40F29C43C2F200036F +S31508000E384FF000021A709A6483F84320A3F84420F6 +S31508000E489A705A70704700BF40F29C43C2F200037A +S31508000E581878003018BF0120704700BF40F29C433D +S31508000E68C2F200034FF0000283F84320704700BF20 +S31508000E7830B504460278FF2A1DD1FFF7BFFF40F2B6 +S31508000E889C43C2F200034FF001021A704FF0FF01AB +S31508000E98D9704FF0100119714FF0000159714FF0D0 +S31508000EA840009871D87119725A729A724FF00802EE +S31508000EB8A3F84420A4E140F29C43C2F200031B783D +S31508000EC8012B40F0B781A2F1C902352A00F29481B4 +S31508000ED8DFE812F0F800920192018D019201920161 +S31508000EE87F01190165014F01920192019201920150 S31508000EF89201920192019201920192019201920144 S31508000F089201920192019201920192019201920133 -S31508000F1892019201820054003600740092019201EF -S31508000F289201B2009201CE00D300E70042783F2A28 -S31508000F3804D94FF02200FFF75FFF57E140F2A045BA -S31508000F48C2F2000505F10400A96CFFF7A1FA4FF0F3 -S31508000F58FF03EB706278AB6CD318AB64637803F164 -S31508000F680103A5F8443041E143783F2B04D94FF0F3 -S31508000F782200FFF741FF39E1416840F2A045C2F275 -S31508000F880005A96405F104006278FFF781FA4FF0B5 -S31508000F98FF03EB706278AB6CD318AB64637803F124 -S31508000FA80103A5F8443021E140F2A043C2F2000348 -S31508000FB84FF0FF02DA7042689A644FF00102A3F80C -S31508000FC8442013E140F2A043C2F200034FF0FF02A7 -S31508000FD8DA70996C43684FF000023BB14FF0000293 -S31508000FE811F8010B1218D2B2013BF9D140F2A0430D -S31508000FF8C2F200034FF00001DA714FEA1220C0B2BC -S3150800100818724FEA1240C0B258724FEA12629A72C0 -S315080010184FF001021A71597199714FF00802A3F835 -S315080010284420E3E040F2A043C2F200034FF0FF0277 -S31508001038DA7041F28042C0F600029A644FF0000264 -S315080010481A715A719A714FF00701D9711A725A7240 -S315080010589A724FF00802A3F84420C7E04FF0000040 -S31508001068FFF7CAFEC2E040F2A043C2F200034FF0FF -S31508001078FF02DA704FF000021A71597859719A719D -S31508001088DA711A724FF00602A3F84420AEE040F26D -S31508001098A044C2F200044FF000032370FFF7A4FE31 -S315080010A84FF0FF03E3704FF00103A4F844309DE0C6 -S315080010B840F2A043C2F20003986C04F101024FF013 -S315080010C83F01FFF705FA20B94FF03100FFF794FE04 -S315080010D88CE040F2A043C2F200034FF0FF02DA7038 -S315080010E89A6C02F13F029A644FF00102A3F8442071 -S315080010F87CE043783E2B04D94FF02200FFF77CFEAC -S3150800110874E040F2A043C2F200034FF0FF02DA701F -S315080011184FF00102A3F84420417841B9FFF7EAF9EC -S31508001128002863D14FF03100FFF766FE5EE040F213 -S31508001138A043C2F20003986C04F10202FFF7C8F94B -S3150800114820B94FF03100FFF757FE4FE040F2A043B1 -S31508001158C2F2000361789A6C8A189A6446E040F2EB -S31508001168A043C2F200034FF0FF02DA704FF0000204 -S315080011781A715A714FF040019971DA711A725A72D6 -S315080011884FF00702A3F8442030E040F2A043C2F229 -S315080011980003986C6168FFF7A1F920B94FF0310090 -S315080011A8FFF72AFE22E040F2A043C2F200034FF0FE -S315080011B8FF02DA704FF00102A3F8442016E0FFF7A1 -S315080011C87BF940F2A043C2F200034FF0FF02DA703F -S315080011D84FF00102A3F8442008E04FF03100FFF76A -S315080011E80BFE03E04FF02000FFF706FE40F2A0438F -S315080011F8C2F2000393F84330012B03D14FF01000D5 -S31508001208FFF7FAFD40F2A043C2F200034FF00102CD -S3150800121883F8432003F10300B3F84410FFF7CAFD27 -S3150800122830BD00BF00B503B400F008F803BC02B42B -S31508001238694609BE00F004F801BC00BD704700BF46 -S30908001248704700BF1E -S3150800124C443A2F7573722F6665617365722F736FC7 -S3150800125C6674776172652F4F70656E424C542F54C5 -S3150800126C61726765742F44656D6F2F41524D434DFE -S3150800127C335F53544D33325F4F6C696D65785F53EA -S3150800128C544D3332503130335F43726F7373776F0B -S3150800129C726B732F426F6F742F6964652F2E2E2F06 -S315080012AC6D61696E2E630000443A2F7573722F6652 -S315080012BC65617365722F736F6674776172652F4FEC -S315080012CC70656E424C542F5461726765742F446571 -S315080012DC6D6F2F41524D434D335F53544D33325F2F -S315080012EC4F6C696D65785F53544D333250313033DA -S315080012FC5F43726F7373776F726B732F426F6F7472 -S3150800130C2F6964652F2E2E2F2E2E2F2E2E2F2E2E36 -S3150800131C2F536F757263652F41524D434D335F538F -S3150800132C544D33322F43726F7373776F726B732FFF -S3150800133C766563746F72732E63000000443A2F75DA -S3150800134C73722F6665617365722F736F6674776136 -S3150800135C72652F4F70656E424C542F5461726765D7 -S3150800136C742F44656D6F2F41524D434D335F535463 -S3150800137C4D33325F4F6C696D65785F53544D33321C -S3150800138C503130335F43726F7373776F726B732F91 -S3150800139C426F6F742F6964652F2E2E2F2E2E2F2ECB -S315080013AC2E2F2E2E2F536F757263652F41524D4378 -S315080013BC4D335F53544D33322F756172742E63005F -S315080013CC0020000800200000010000000040000872 -S315080013DC0020000002000000006000080020000049 -S315080013EC0300000000800008002000000400000034 -S315080013FC00A00008002000000500000000C000083E -S3150800140C002000000600000000E000080020000094 -S3150800141C070000000000010800200000080000007A -S3150800142C0020010800200000090000000040010807 -S3150800143C002000000A0000000060010800200000DF -S3150800144C0B00000000800108002000000C000000C2 -S3150800145C00A00108002000000D00000000C00108D3 -S3150800146C002000000E00000000E00108002000002B -S3110800147C0F0000004F70656E424C5400D3 +S31508000F189201920192019201920192019201920123 +S31508000F2892019201920192018200540036007400DF +S31508000F38920192019201B2009201CE00D300E70015 +S31508000F4842783F2A04D94FF02200FFF75FFF57E19E +S31508000F5840F29C45C2F2000505F10400A96CFFF7AA +S31508000F6899FA4FF0FF03EB706278AB6CD318AB6451 +S31508000F78637803F10103A5F8443041E143783F2B30 +S31508000F8804D94FF02200FFF741FF39E1416840F2E2 +S31508000F989C45C2F20005A96405F104006278FFF7CA +S31508000FA879FA4FF0FF03EB706278AB6CD318AB6431 +S31508000FB8637803F10103A5F8443021E140F29C4324 +S31508000FC8C2F200034FF0FF02DA7042689A644FF0E3 +S31508000FD80102A3F8442013E140F29C43C2F200033D +S31508000FE84FF0FF02DA70996C43684FF000023BB184 +S31508000FF84FF0000211F8010B1218D2B2013BF9D1D1 +S3150800100840F29C43C2F200034FF00001DA714FEA3E +S315080010181220C0B218724FEA1240C0B258724FEA8C +S3150800102812629A724FF001021A71597199714FF04A +S315080010380802A3F84420E3E040F29C43C2F2000306 +S315080010484FF0FF02DA7041F29442C0F600029A6441 +S315080010584FF000021A715A719A714FF00701D97147 +S315080010681A725A729A724FF00802A3F84420C7E017 +S315080010784FF00000FFF7CAFEC2E040F29C43C2F2F6 +S3150800108800034FF0FF02DA704FF000021A71597820 +S3150800109859719A71DA711A724FF00602A3F8442048 +S315080010A8AEE040F29C44C2F200044FF000032370FD +S315080010B8FFF7A4FE4FF0FF03E3704FF00103A4F80F +S315080010C844309DE040F29C43C2F20003986C04F158 +S315080010D801024FF03F01FFF7FDF920B94FF0310043 +S315080010E8FFF794FE8CE040F29C43C2F200034FF0EF +S315080010F8FF02DA709A6C02F13F029A644FF0010215 +S31508001108A3F844207CE043783E2B04D94FF022000C +S31508001118FFF77CFE74E040F29C43C2F200034FF0EE +S31508001128FF02DA704FF00102A3F84420417841B96A +S31508001138FFF7E2F9002863D14FF03100FFF766FEA2 +S315080011485EE040F29C43C2F20003986C04F1020286 +S31508001158FFF7C0F920B94FF03100FFF757FE4FE007 +S3150800116840F29C43C2F2000361789A6C8A189A6422 +S3150800117846E040F29C43C2F200034FF0FF02DA70E1 +S315080011884FF000021A715A714FF040019971DA71DD +S315080011981A725A724FF00702A3F8442030E040F258 +S315080011A89C43C2F20003986C6168FFF799F920B965 +S315080011B84FF03100FFF72AFE22E040F29C43C2F2C4 +S315080011C800034FF0FF02DA704FF00102A3F844203B +S315080011D816E0FFF773F940F29C43C2F200034FF09A +S315080011E8FF02DA704FF00102A3F8442008E04FF036 +S315080011F83100FFF70BFE03E04FF02000FFF706FE6D +S3150800120840F29C43C2F2000393F84330012B03D102 +S315080012184FF01000FFF7FAFD40F29C43C2F20003B4 +S315080012284FF0010283F8432003F10300B3F8441092 +S31508001238FFF7CAFD30BD00BF00B503B400F008F8D3 +S3150800124803BC02B4694609BE00F004F801BC00BD37 +S30D08001258704700BF704700BF94 +S31508001260443A2F7573722F6665617365722F736FB3 +S315080012706674776172652F4F70656E424C542F54B1 +S3150800128061726765742F44656D6F2F41524D434DEA +S31508001290335F53544D33325F4F6C696D65785F53D6 +S315080012A0544D3332503130335F43726F7373776FF7 +S315080012B0726B732F426F6F742F6964652F2E2E2FF2 +S315080012C06D61696E2E630000443A2F7573722F663E +S315080012D065617365722F736F6674776172652F4FD8 +S315080012E070656E424C542F5461726765742F44655D +S315080012F06D6F2F41524D434D335F53544D33325F1B +S315080013004F6C696D65785F53544D333250313033C5 +S315080013105F43726F7373776F726B732F426F6F745D +S315080013202F6964652F2E2E2F2E2E2F2E2E2F2E2E22 +S315080013302F536F757263652F41524D434D335F537B +S31508001340544D33322F43726F7373776F726B732FEB +S31508001350766563746F72732E63000000443A2F75C6 +S3150800136073722F6665617365722F736F6674776122 +S3150800137072652F4F70656E424C542F5461726765C3 +S31508001380742F44656D6F2F41524D434D335F53544F +S315080013904D33325F4F6C696D65785F53544D333208 +S315080013A0503130335F43726F7373776F726B732F7D +S315080013B0426F6F742F6964652F2E2E2F2E2E2F2EB7 +S315080013C02E2F2E2E2F536F757263652F41524D4364 +S315080013D04D335F53544D33322F756172742E63004B +S315080013E0002000080020000001000000004000085E +S315080013F00020000002000000006000080020000035 +S31508001400030000000080000800200000040000001F +S3150800141000A00008002000000500000000C0000829 +S31508001420002000000600000000E000080020000080 +S315080014300700000000000108002000000800000066 +S3150800144000200108002000000900000000400108F3 +S31508001450002000000A0000000060010800200000CB +S315080014600B00000000800108002000000C000000AE +S3150800147000A00108002000000D00000000C00108BF +S31508001480002000000E00000000E001080020000017 +S311080014900F0000004F70656E424C5400BF S705080001DB16 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzp b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzp index 014e9b76..0fba3710 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzp +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzs b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzs index 8469425c..c5972e52 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Boot/ide/stm32f103_crossworks.hzs @@ -45,9 +45,9 @@ - - + + @@ -60,7 +60,8 @@ - + + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.elf index bbf18736..e82fdbef 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.map index cb541638..6af04e52 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.map @@ -34,9 +34,9 @@ Discarded input sections .bss.interruptNesting 0x00000000 0x1 THUMB Debug/../../obj/irq.o .text.IrqInterruptDisable - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text.IrqInterruptRestore - 0x00000000 0x34 THUMB Debug/../../obj/irq.o + 0x00000000 0x38 THUMB Debug/../../obj/irq.o .text 0x00000000 0x0 THUMB Debug/../../obj/boot.o .data 0x00000000 0x0 THUMB Debug/../../obj/boot.o .bss 0x00000000 0x0 THUMB Debug/../../obj/boot.o @@ -57,7 +57,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_adc.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_adc.o .text.ADC_DeInit - 0x00000000 0x88 THUMB Debug/../../obj/stm32f10x_adc.o + 0x00000000 0xac THUMB Debug/../../obj/stm32f10x_adc.o .text.ADC_Init 0x00000000 0xb0 THUMB Debug/../../obj/stm32f10x_adc.o .text.ADC_StructInit @@ -131,7 +131,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_bkp.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_bkp.o .text.BKP_DeInit - 0x00000000 0x18 THUMB Debug/../../obj/stm32f10x_bkp.o + 0x00000000 0x24 THUMB Debug/../../obj/stm32f10x_bkp.o .text.BKP_TamperPinLevelConfig 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_bkp.o .text.BKP_TamperPinCmd @@ -158,7 +158,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_can.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_can.o .text.CAN_DeInit - 0x00000000 0x50 THUMB Debug/../../obj/stm32f10x_can.o + 0x00000000 0x68 THUMB Debug/../../obj/stm32f10x_can.o .text.CAN_Init 0x00000000 0x1c0 THUMB Debug/../../obj/stm32f10x_can.o .text.CAN_FilterInit @@ -202,7 +202,7 @@ Discarded input sections .text.CAN_ClearFlag 0x00000000 0x7c THUMB Debug/../../obj/stm32f10x_can.o .text.CAN_GetITStatus - 0x00000000 0x1b8 THUMB Debug/../../obj/stm32f10x_can.o + 0x00000000 0x214 THUMB Debug/../../obj/stm32f10x_can.o .text.CAN_ClearITPendingBit 0x00000000 0xfc THUMB Debug/../../obj/stm32f10x_can.o .text.CheckITStatus @@ -211,7 +211,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_cec.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_cec.o .text.CEC_DeInit - 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_cec.o + 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_cec.o .text.CEC_Init 0x00000000 0x4c THUMB Debug/../../obj/stm32f10x_cec.o .text.CEC_Cmd 0x00000000 0x3c THUMB Debug/../../obj/stm32f10x_cec.o @@ -256,7 +256,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_dac.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_dac.o .text.DAC_DeInit - 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_dac.o + 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_dac.o .text.DAC_Init 0x00000000 0x74 THUMB Debug/../../obj/stm32f10x_dac.o .text.DAC_StructInit @@ -348,25 +348,25 @@ Discarded input sections .text.FLASH_LockBank1 0x00000000 0x24 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_ErasePage - 0x00000000 0x90 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x9c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_EraseAllPages - 0x00000000 0x80 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x8c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_EraseAllBank1Pages - 0x00000000 0x80 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x8c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_EraseOptionBytes - 0x00000000 0x134 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x14c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_ProgramWord - 0x00000000 0xbc THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0xd0 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_ProgramHalfWord - 0x00000000 0x74 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x80 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_ProgramOptionByteData - 0x00000000 0xa0 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0xac THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_EnableWriteProtection - 0x00000000 0x15c THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x178 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_ReadOutProtection - 0x00000000 0x138 THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x14c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_UserOptionByteConfig - 0x00000000 0xbc THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0xc8 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_GetUserOptionByte 0x00000000 0x1c THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_GetWriteProtectionOptionByte @@ -386,9 +386,9 @@ Discarded input sections .text.FLASH_GetBank1Status 0x00000000 0x70 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_WaitForLastOperation - 0x00000000 0x4c THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x58 THUMB Debug/../../obj/stm32f10x_flash.o .text.FLASH_WaitForLastBank1Operation - 0x00000000 0x4c THUMB Debug/../../obj/stm32f10x_flash.o + 0x00000000 0x58 THUMB Debug/../../obj/stm32f10x_flash.o .text 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_fsmc.o .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_fsmc.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_fsmc.o @@ -434,9 +434,9 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_gpio.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_gpio.o .text.GPIO_DeInit - 0x00000000 0x128 THUMB Debug/../../obj/stm32f10x_gpio.o + 0x00000000 0x17c THUMB Debug/../../obj/stm32f10x_gpio.o .text.GPIO_AFIODeInit - 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_gpio.o + 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_gpio.o .text.GPIO_StructInit 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_gpio.o .text.GPIO_ReadInputDataBit @@ -467,9 +467,9 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_i2c.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_i2c.o .text.I2C_DeInit - 0x00000000 0x50 THUMB Debug/../../obj/stm32f10x_i2c.o + 0x00000000 0x68 THUMB Debug/../../obj/stm32f10x_i2c.o .text.I2C_Init - 0x00000000 0x1ac THUMB Debug/../../obj/stm32f10x_i2c.o + 0x00000000 0x1b4 THUMB Debug/../../obj/stm32f10x_i2c.o .text.I2C_StructInit 0x00000000 0x44 THUMB Debug/../../obj/stm32f10x_i2c.o .text.I2C_Cmd 0x00000000 0x3c THUMB Debug/../../obj/stm32f10x_i2c.o @@ -552,7 +552,7 @@ Discarded input sections .text.__WFI 0x00000000 0xc THUMB Debug/../../obj/stm32f10x_pwr.o .text.__WFE 0x00000000 0xc THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_DeInit - 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_pwr.o + 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_BackupAccessCmd 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_PVDCmd @@ -562,9 +562,9 @@ Discarded input sections .text.PWR_WakeUpPinCmd 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_EnterSTOPMode - 0x00000000 0x84 THUMB Debug/../../obj/stm32f10x_pwr.o + 0x00000000 0x90 THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_EnterSTANDBYMode - 0x00000000 0x54 THUMB Debug/../../obj/stm32f10x_pwr.o + 0x00000000 0x58 THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_GetFlagStatus 0x00000000 0x3c THUMB Debug/../../obj/stm32f10x_pwr.o .text.PWR_ClearFlag @@ -577,7 +577,7 @@ Discarded input sections .text.RCC_HSEConfig 0x00000000 0x88 THUMB Debug/../../obj/stm32f10x_rcc.o .text.RCC_WaitForHSEStartUp - 0x00000000 0x64 THUMB Debug/../../obj/stm32f10x_rcc.o + 0x00000000 0x70 THUMB Debug/../../obj/stm32f10x_rcc.o .text.RCC_AdjustHSICalibrationValue 0x00000000 0x48 THUMB Debug/../../obj/stm32f10x_rcc.o .text.RCC_HSICmd @@ -642,11 +642,11 @@ Discarded input sections .text.RTC_GetCounter 0x00000000 0x38 THUMB Debug/../../obj/stm32f10x_rtc.o .text.RTC_SetCounter - 0x00000000 0x38 THUMB Debug/../../obj/stm32f10x_rtc.o + 0x00000000 0x44 THUMB Debug/../../obj/stm32f10x_rtc.o .text.RTC_SetPrescaler - 0x00000000 0x3c THUMB Debug/../../obj/stm32f10x_rtc.o + 0x00000000 0x48 THUMB Debug/../../obj/stm32f10x_rtc.o .text.RTC_SetAlarm - 0x00000000 0x38 THUMB Debug/../../obj/stm32f10x_rtc.o + 0x00000000 0x44 THUMB Debug/../../obj/stm32f10x_rtc.o .text.RTC_GetDivider 0x00000000 0x44 THUMB Debug/../../obj/stm32f10x_rtc.o .text.RTC_WaitForLastTask @@ -728,11 +728,11 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_spi.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_spi.o .text.SPI_I2S_DeInit - 0x00000000 0x88 THUMB Debug/../../obj/stm32f10x_spi.o + 0x00000000 0xac THUMB Debug/../../obj/stm32f10x_spi.o .text.SPI_Init 0x00000000 0x88 THUMB Debug/../../obj/stm32f10x_spi.o .text.I2S_Init - 0x00000000 0x198 THUMB Debug/../../obj/stm32f10x_spi.o + 0x00000000 0x1a0 THUMB Debug/../../obj/stm32f10x_spi.o .text.SPI_StructInit 0x00000000 0x5c THUMB Debug/../../obj/stm32f10x_spi.o .text.I2S_StructInit @@ -775,7 +775,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_tim.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_DeInit - 0x00000000 0x2b0 THUMB Debug/../../obj/stm32f10x_tim.o + 0x00000000 0x37c THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_TimeBaseInit 0x00000000 0x11c THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_OC1Init @@ -787,9 +787,9 @@ Discarded input sections .text.TIM_OC4Init 0x00000000 0xe0 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_ICInit - 0x00000000 0xb8 THUMB Debug/../../obj/stm32f10x_tim.o + 0x00000000 0xe8 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_PWMIConfig - 0x00000000 0xcc THUMB Debug/../../obj/stm32f10x_tim.o + 0x00000000 0xfc THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_BDTRConfig 0x00000000 0x50 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_TimeBaseStructInit @@ -814,13 +814,13 @@ Discarded input sections .text.TIM_InternalClockConfig 0x00000000 0x24 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_ITRxExternalClockConfig - 0x00000000 0x30 THUMB Debug/../../obj/stm32f10x_tim.o - .text.TIM_TIxExternalClockConfig - 0x00000000 0x58 THUMB Debug/../../obj/stm32f10x_tim.o - .text.TIM_ETRClockMode1Config - 0x00000000 0x54 THUMB Debug/../../obj/stm32f10x_tim.o - .text.TIM_ETRClockMode2Config 0x00000000 0x34 THUMB Debug/../../obj/stm32f10x_tim.o + .text.TIM_TIxExternalClockConfig + 0x00000000 0x6c THUMB Debug/../../obj/stm32f10x_tim.o + .text.TIM_ETRClockMode1Config + 0x00000000 0x5c THUMB Debug/../../obj/stm32f10x_tim.o + .text.TIM_ETRClockMode2Config + 0x00000000 0x38 THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_ETRConfig 0x00000000 0x4c THUMB Debug/../../obj/stm32f10x_tim.o .text.TIM_PrescalerConfig @@ -959,7 +959,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_usart.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_usart.o .text.USART_DeInit - 0x00000000 0xd8 THUMB Debug/../../obj/stm32f10x_usart.o + 0x00000000 0x114 THUMB Debug/../../obj/stm32f10x_usart.o .text.USART_StructInit 0x00000000 0x44 THUMB Debug/../../obj/stm32f10x_usart.o .text.USART_ClockInit @@ -1012,7 +1012,7 @@ Discarded input sections .data 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_wwdg.o .bss 0x00000000 0x0 THUMB Debug/../../obj/stm32f10x_wwdg.o .text.WWDG_DeInit - 0x00000000 0x20 THUMB Debug/../../obj/stm32f10x_wwdg.o + 0x00000000 0x2c THUMB Debug/../../obj/stm32f10x_wwdg.o .text.WWDG_SetPrescaler 0x00000000 0x3c THUMB Debug/../../obj/stm32f10x_wwdg.o .text.WWDG_SetWindowValue @@ -1078,11 +1078,11 @@ Discarded input sections .data.AHBPrescTable 0x00000000 0x10 THUMB Debug/../../obj/system_stm32f10x.o .text.SystemInit - 0x00000000 0xa8 THUMB Debug/../../obj/system_stm32f10x.o + 0x00000000 0xb0 THUMB Debug/../../obj/system_stm32f10x.o .text.SystemCoreClockUpdate 0x00000000 0x148 THUMB Debug/../../obj/system_stm32f10x.o .text.SetSysClock - 0x00000000 0xc THUMB Debug/../../obj/system_stm32f10x.o + 0x00000000 0x10 THUMB Debug/../../obj/system_stm32f10x.o .text.SetSysClockTo72 0x00000000 0x1ac THUMB Debug/../../obj/system_stm32f10x.o .text.libdebugio @@ -1132,7 +1132,7 @@ CM3_System_Control_Space 0xe000e000 0x00001000 xw Linker script and memory map - 0x08002f80 __do_debug_operation = __do_debug_operation_bkpt + 0x08003030 __do_debug_operation = __do_debug_operation_bkpt 0x08002000 __FLASH_segment_start__ = 0x8002000 0x08020000 __FLASH_segment_end__ = 0x8020000 0x20000000 __RAM_segment_start__ = 0x20000000 @@ -1181,97 +1181,97 @@ Linker script and memory map 0x00000001 . = ASSERT (((__init_end__ >= __FLASH_segment_start__) && (__init_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .init is too large to fit in FLASH memory segment) 0x08002268 __text_load_start__ = ALIGN (__init_end__, 0x4) -.text 0x08002268 0xd38 +.text 0x08002268 0xde8 0x08002268 __text_start__ = . *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table .ARM.extab* .gnu.linkonce.armextab.*) .glue_7 0x00000000 0x0 linker stubs .glue_7t 0x00000000 0x0 linker stubs - .text.LedInit 0x08002268 0x3c THUMB Debug/../../obj/led.o + .text.LedInit 0x08002268 0x48 THUMB Debug/../../obj/led.o 0x08002268 LedInit .text.LedToggle - 0x080022a4 0x88 THUMB Debug/../../obj/led.o - 0x080022a4 LedToggle - .text.main 0x0800232c 0x18 THUMB Debug/../../obj/main.o - 0x0800232c main - .text.Init 0x08002344 0x24c THUMB Debug/../../obj/main.o + 0x080022b0 0x9c THUMB Debug/../../obj/led.o + 0x080022b0 LedToggle + .text.main 0x0800234c 0x30 THUMB Debug/../../obj/main.o + 0x0800234c main + .text.Init 0x0800237c 0x260 THUMB Debug/../../obj/main.o .text.NVIC_SetPriority - 0x08002590 0x58 THUMB Debug/../../obj/timer.o + 0x080025dc 0x58 THUMB Debug/../../obj/timer.o .text.SysTick_Config - 0x080025e8 0x64 THUMB Debug/../../obj/timer.o + 0x08002634 0x68 THUMB Debug/../../obj/timer.o .text.TimerInit - 0x0800264c 0x1c THUMB Debug/../../obj/timer.o - 0x0800264c TimerInit + 0x0800269c 0x28 THUMB Debug/../../obj/timer.o + 0x0800269c TimerInit .text.TimerDeinit - 0x08002668 0x18 THUMB Debug/../../obj/timer.o - 0x08002668 TimerDeinit + 0x080026c4 0x18 THUMB Debug/../../obj/timer.o + 0x080026c4 TimerDeinit .text.TimerSet - 0x08002680 0x20 THUMB Debug/../../obj/timer.o - 0x08002680 TimerSet + 0x080026dc 0x20 THUMB Debug/../../obj/timer.o + 0x080026dc TimerSet .text.TimerGet - 0x080026a0 0x18 THUMB Debug/../../obj/timer.o - 0x080026a0 TimerGet + 0x080026fc 0x18 THUMB Debug/../../obj/timer.o + 0x080026fc TimerGet .text.TimerISRHandler - 0x080026b8 0x24 THUMB Debug/../../obj/timer.o - 0x080026b8 TimerISRHandler + 0x08002714 0x24 THUMB Debug/../../obj/timer.o + 0x08002714 TimerISRHandler .text.UnusedISR - 0x080026dc 0x8 THUMB Debug/../../obj/vectors.o - 0x080026dc UnusedISR + 0x08002738 0x8 THUMB Debug/../../obj/vectors.o + 0x08002738 UnusedISR .text.__enable_irq - 0x080026e4 0xc THUMB Debug/../../obj/irq.o + 0x08002740 0xc THUMB Debug/../../obj/irq.o .text.IrqInterruptEnable - 0x080026f0 0xc THUMB Debug/../../obj/irq.o - 0x080026f0 IrqInterruptEnable + 0x0800274c 0x10 THUMB Debug/../../obj/irq.o + 0x0800274c IrqInterruptEnable .text.BootActivate - 0x080026fc 0x20 THUMB Debug/../../obj/boot.o + 0x0800275c 0x28 THUMB Debug/../../obj/boot.o .text.BootComInit - 0x0800271c 0xac THUMB Debug/../../obj/boot.o - 0x0800271c BootComInit + 0x08002784 0xd0 THUMB Debug/../../obj/boot.o + 0x08002784 BootComInit .text.BootComCheckActivationRequest - 0x080027c8 0xc8 THUMB Debug/../../obj/boot.o - 0x080027c8 BootComCheckActivationRequest + 0x08002854 0xdc THUMB Debug/../../obj/boot.o + 0x08002854 BootComCheckActivationRequest .text.UartReceiveByte - 0x08002890 0x48 THUMB Debug/../../obj/boot.o + 0x08002930 0x54 THUMB Debug/../../obj/boot.o .text.GPIO_Init - 0x080028d8 0x1b0 THUMB Debug/../../obj/stm32f10x_gpio.o - 0x080028d8 GPIO_Init + 0x08002984 0x1b0 THUMB Debug/../../obj/stm32f10x_gpio.o + 0x08002984 GPIO_Init .text.GPIO_SetBits - 0x08002a88 0x1c THUMB Debug/../../obj/stm32f10x_gpio.o - 0x08002a88 GPIO_SetBits + 0x08002b34 0x1c THUMB Debug/../../obj/stm32f10x_gpio.o + 0x08002b34 GPIO_SetBits .text.GPIO_ResetBits - 0x08002aa4 0x1c THUMB Debug/../../obj/stm32f10x_gpio.o - 0x08002aa4 GPIO_ResetBits + 0x08002b50 0x1c THUMB Debug/../../obj/stm32f10x_gpio.o + 0x08002b50 GPIO_ResetBits .text.RCC_GetClocksFreq - 0x08002ac0 0x1d4 THUMB Debug/../../obj/stm32f10x_rcc.o - 0x08002ac0 RCC_GetClocksFreq + 0x08002b6c 0x1d4 THUMB Debug/../../obj/stm32f10x_rcc.o + 0x08002b6c RCC_GetClocksFreq .text.RCC_APB2PeriphClockCmd - 0x08002c94 0x50 THUMB Debug/../../obj/stm32f10x_rcc.o - 0x08002c94 RCC_APB2PeriphClockCmd + 0x08002d40 0x50 THUMB Debug/../../obj/stm32f10x_rcc.o + 0x08002d40 RCC_APB2PeriphClockCmd .text.RCC_APB1PeriphClockCmd - 0x08002ce4 0x50 THUMB Debug/../../obj/stm32f10x_rcc.o - 0x08002ce4 RCC_APB1PeriphClockCmd + 0x08002d90 0x50 THUMB Debug/../../obj/stm32f10x_rcc.o + 0x08002d90 RCC_APB1PeriphClockCmd .text.USART_Init - 0x08002d34 0x1ac THUMB Debug/../../obj/stm32f10x_usart.o - 0x08002d34 USART_Init + 0x08002de0 0x1b0 THUMB Debug/../../obj/stm32f10x_usart.o + 0x08002de0 USART_Init .text.USART_Cmd - 0x08002ee0 0x3c THUMB Debug/../../obj/stm32f10x_usart.o - 0x08002ee0 USART_Cmd + 0x08002f90 0x3c THUMB Debug/../../obj/stm32f10x_usart.o + 0x08002f90 USART_Cmd .text.USART_ReceiveData - 0x08002f1c 0x24 THUMB Debug/../../obj/stm32f10x_usart.o - 0x08002f1c USART_ReceiveData + 0x08002fcc 0x24 THUMB Debug/../../obj/stm32f10x_usart.o + 0x08002fcc USART_ReceiveData .text.USART_GetFlagStatus - 0x08002f40 0x40 THUMB Debug/../../obj/stm32f10x_usart.o - 0x08002f40 USART_GetFlagStatus + 0x08002ff0 0x40 THUMB Debug/../../obj/stm32f10x_usart.o + 0x08002ff0 USART_GetFlagStatus .text.libdebugio_bkpt.__do_debug_operation_bkpt - 0x08002f80 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) - 0x08002f80 __do_debug_operation_bkpt + 0x08003030 0x18 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libdebugio_v7m_t_le.a(libdebugio_asm.o) + 0x08003030 __do_debug_operation_bkpt .text.libc.__debug_io_lock - 0x08002f98 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08002f98 __debug_io_lock + 0x08003048 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x08003048 __debug_io_lock .text.libc.__debug_io_unlock - 0x08002f9c 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) - 0x08002f9c __debug_io_unlock - 0x08002fa0 __text_end__ = (__text_start__ + SIZEOF (.text)) - 0x08002fa0 __text_load_end__ = __text_end__ + 0x0800304c 0x4 C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.1/lib/libc_user_libc_v7m_t_le.a(user_libc.o) + 0x0800304c __debug_io_unlock + 0x08003050 __text_end__ = (__text_start__ + SIZEOF (.text)) + 0x08003050 __text_load_end__ = __text_end__ .vfp11_veneer 0x00000000 0x0 .vfp11_veneer 0x00000000 0x0 linker stubs @@ -1279,51 +1279,51 @@ Linker script and memory map .v4_bx 0x00000000 0x0 .v4_bx 0x00000000 0x0 linker stubs 0x00000001 . = ASSERT (((__text_end__ >= __FLASH_segment_start__) && (__text_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .text is too large to fit in FLASH memory segment) - 0x08002fa0 __dtors_load_start__ = ALIGN (__text_end__, 0x4) + 0x08003050 __dtors_load_start__ = ALIGN (__text_end__, 0x4) -.dtors 0x08002fa0 0x0 - 0x08002fa0 __dtors_start__ = . +.dtors 0x08003050 0x0 + 0x08003050 __dtors_start__ = . *(SORT(.dtors.*)) *(.dtors) *(.fini_array .fini_array.*) - 0x08002fa0 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) - 0x08002fa0 __dtors_load_end__ = __dtors_end__ + 0x08003050 __dtors_end__ = (__dtors_start__ + SIZEOF (.dtors)) + 0x08003050 __dtors_load_end__ = __dtors_end__ 0x00000001 . = ASSERT (((__dtors_end__ >= __FLASH_segment_start__) && (__dtors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .dtors is too large to fit in FLASH memory segment) - 0x08002fa0 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) + 0x08003050 __ctors_load_start__ = ALIGN (__dtors_end__, 0x4) -.ctors 0x08002fa0 0x0 - 0x08002fa0 __ctors_start__ = . +.ctors 0x08003050 0x0 + 0x08003050 __ctors_start__ = . *(SORT(.ctors.*)) *(.ctors) *(.init_array .init_array.*) - 0x08002fa0 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) - 0x08002fa0 __ctors_load_end__ = __ctors_end__ + 0x08003050 __ctors_end__ = (__ctors_start__ + SIZEOF (.ctors)) + 0x08003050 __ctors_load_end__ = __ctors_end__ 0x00000001 . = ASSERT (((__ctors_end__ >= __FLASH_segment_start__) && (__ctors_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ctors is too large to fit in FLASH memory segment) - 0x08002fa0 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) + 0x08003050 __rodata_load_start__ = ALIGN (__ctors_end__, 0x4) -.rodata 0x08002fa0 0x0 - 0x08002fa0 __rodata_start__ = . +.rodata 0x08003050 0x0 + 0x08003050 __rodata_start__ = . *(.rodata .rodata.* .gnu.linkonce.r.*) - 0x08002fa0 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) - 0x08002fa0 __rodata_load_end__ = __rodata_end__ + 0x08003050 __rodata_end__ = (__rodata_start__ + SIZEOF (.rodata)) + 0x08003050 __rodata_load_end__ = __rodata_end__ 0x00000001 . = ASSERT (((__rodata_end__ >= __FLASH_segment_start__) && (__rodata_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .rodata is too large to fit in FLASH memory segment) - 0x08002fa0 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) + 0x08003050 __ARM.exidx_load_start__ = ALIGN (__rodata_end__, 0x4) -.ARM.exidx 0x08002fa0 0x0 - 0x08002fa0 __ARM.exidx_start__ = . - 0x08002fa0 __exidx_start = __ARM.exidx_start__ +.ARM.exidx 0x08003050 0x0 + 0x08003050 __ARM.exidx_start__ = . + 0x08003050 __exidx_start = __ARM.exidx_start__ *(.ARM.exidx .ARM.exidx.*) - 0x08002fa0 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) - 0x08002fa0 __exidx_end = __ARM.exidx_end__ - 0x08002fa0 __ARM.exidx_load_end__ = __ARM.exidx_end__ + 0x08003050 __ARM.exidx_end__ = (__ARM.exidx_start__ + SIZEOF (.ARM.exidx)) + 0x08003050 __exidx_end = __ARM.exidx_end__ + 0x08003050 __ARM.exidx_load_end__ = __ARM.exidx_end__ 0x00000001 . = ASSERT (((__ARM.exidx_end__ >= __FLASH_segment_start__) && (__ARM.exidx_end__ <= (__FLASH_segment_start__ + 0x20000))), error: .ARM.exidx is too large to fit in FLASH memory segment) - 0x08002fa0 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) + 0x08003050 __fast_load_start__ = ALIGN (__ARM.exidx_end__, 0x4) -.fast 0x20000000 0x0 load address 0x08002fa0 +.fast 0x20000000 0x0 load address 0x08003050 0x20000000 __fast_start__ = . *(.fast .fast.*) 0x20000000 __fast_end__ = (__fast_start__ + SIZEOF (.fast)) - 0x08002fa0 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) + 0x08003050 __fast_load_end__ = (__fast_load_start__ + SIZEOF (.fast)) 0x00000001 . = ASSERT ((((__fast_load_start__ + SIZEOF (.fast)) >= __FLASH_segment_start__) && ((__fast_load_start__ + SIZEOF (.fast)) <= (__FLASH_segment_start__ + 0x20000))), error: .fast is too large to fit in FLASH memory segment) .fast_run 0x20000000 0x0 @@ -1332,9 +1332,9 @@ Linker script and memory map 0x20000000 __fast_run_end__ = (__fast_run_start__ + SIZEOF (.fast_run)) 0x20000000 __fast_run_load_end__ = __fast_run_end__ 0x00000001 . = ASSERT (((__fast_run_end__ >= __RAM_segment_start__) && (__fast_run_end__ <= (__RAM_segment_start__ + 0x5000))), error: .fast_run is too large to fit in RAM memory segment) - 0x08002fa0 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) + 0x08003050 __data_load_start__ = ALIGN ((__fast_load_start__ + SIZEOF (.fast)), 0x4) -.data 0x20000000 0x14 load address 0x08002fa0 +.data 0x20000000 0x14 load address 0x08003050 0x20000000 __data_start__ = . *(.data .data.* .gnu.linkonce.d.*) .data.APBAHBPrescTable @@ -1342,10 +1342,10 @@ Linker script and memory map .data.ADCPrescTable 0x20000010 0x4 THUMB Debug/../../obj/stm32f10x_rcc.o 0x20000014 __data_end__ = (__data_start__ + SIZEOF (.data)) - 0x08002fb4 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) + 0x08003064 __data_load_end__ = (__data_load_start__ + SIZEOF (.data)) 0x00000001 . = ASSERT ((((__data_load_start__ + SIZEOF (.data)) >= __FLASH_segment_start__) && ((__data_load_start__ + SIZEOF (.data)) <= (__FLASH_segment_start__ + 0x20000))), error: .data is too large to fit in FLASH memory segment) -.data_run 0x20000000 0x14 load address 0x08002fa0 +.data_run 0x20000000 0x14 load address 0x08003050 0x20000000 __data_run_start__ = . 0x20000014 . = MAX ((__data_run_start__ + SIZEOF (.data)), .) *fill* 0x20000000 0x14 00 @@ -1420,14 +1420,14 @@ Linker script and memory map 0x200001ec __tbss_end__ = (__tbss_start__ + SIZEOF (.tbss)) 0x200001ec __tbss_load_end__ = __tbss_end__ 0x00000001 . = ASSERT (((__tbss_end__ >= __RAM_segment_start__) && (__tbss_end__ <= (__RAM_segment_start__ + 0x5000))), error: .tbss is too large to fit in RAM memory segment) - 0x08002fb4 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + 0x08003064 __tdata_load_start__ = ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) -.tdata 0x200001ec 0x0 load address 0x08002fb4 +.tdata 0x200001ec 0x0 load address 0x08003064 0x200001ec __tdata_start__ = . *(.tdata .tdata.*) 0x200001ec __tdata_end__ = (__tdata_start__ + SIZEOF (.tdata)) - 0x08002fb4 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) - 0x08002fb4 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) + 0x08003064 __tdata_load_end__ = (__tdata_load_start__ + SIZEOF (.tdata)) + 0x08003064 __FLASH_segment_used_end__ = (ALIGN ((__data_load_start__ + SIZEOF (.data)), 0x4) + SIZEOF (.tdata)) 0x00000001 . = ASSERT ((((__tdata_load_start__ + SIZEOF (.tdata)) >= __FLASH_segment_start__) && ((__tdata_load_start__ + SIZEOF (.tdata)) <= (__FLASH_segment_start__ + 0x20000))), error: .tdata is too large to fit in FLASH memory segment) .tdata_run 0x200001ec 0x0 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.srec index 455fc453..c1dd243b 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/bin/demoprog_olimex_stm32p103.srec @@ -1,25 +1,25 @@ S02B0000443A2F7573722F6665617365722F736F6674776172652F4F70656E424C542F5461726765742F44657D -S31508002000EC010020F7210008DD260008DD2600087F -S31508002010DD260008DD260008DD260008DD26000886 -S31508002020DD260008DD260008DD260008DD26000876 -S31508002030DD260008DD260008DD260008B92600088A -S31508002040DD260008DD260008DD260008DD26000856 -S31508002050DD260008DD260008DD260008DD26000846 -S31508002060DD260008DD260008DD260008DD26000836 -S31508002070DD260008DD260008DD260008DD26000826 -S31508002080DD260008DD260008DD260008DD26000816 -S31508002090DD260008DD260008DD260008DD26000806 -S315080020A0DD260008DD260008DD260008DD260008F6 -S315080020B0DD260008DD260008DD260008DD260008E6 -S315080020C0DD260008DD260008DD260008DD260008D6 -S315080020D0DD260008DD260008DD260008DD260008C6 -S315080020E0DD260008DD260008DD260008DD260008B6 -S315080020F0DD260008DD260008DD260008DD260008A6 -S31508002100DD260008DD260008DD260008DD26000895 -S31508002110DD260008DD260008DD260008DD26000885 -S31508002120DD260008DD260008DD260008DD26000875 -S31508002130DD260008DD260008DD260008DD26000865 -S31508002140DD260008DD260008DD260008DD26000855 +S31508002000EC010020F72100083927000839270008C5 +S315080020103927000839270008392700083927000812 +S315080020203927000839270008392700083927000802 +S315080020303927000839270008392700081527000816 +S3150800204039270008392700083927000839270008E2 +S3150800205039270008392700083927000839270008D2 +S3150800206039270008392700083927000839270008C2 +S3150800207039270008392700083927000839270008B2 +S3150800208039270008392700083927000839270008A2 +S315080020903927000839270008392700083927000892 +S315080020A03927000839270008392700083927000882 +S315080020B03927000839270008392700083927000872 +S315080020C03927000839270008392700083927000862 +S315080020D03927000839270008392700083927000852 +S315080020E03927000839270008392700083927000842 +S315080020F03927000839270008392700083927000832 +S315080021003927000839270008392700083927000821 +S315080021103927000839270008392700083927000811 +S315080021203927000839270008392700083927000801 +S3150800213039270008392700083927000839270008F1 +S3150800214039270008392700083927000839270008E1 S30908002150EE11AA557F S315080021542A498D462A482B492B4A00F039F82B4838 S315080021642B492C4A00F034F82B482C492C4A00F009 @@ -32,225 +32,236 @@ S315080021C400208646EC4600200021234A9047FEE775 S315080021D4884207D0521A05D0037801300B700131B2 S315080021E4013AF9D17047884202D002700130FAE701 S315080021F470471A481A490160AAE70000EC01002052 -S31508002204A02F0008000000201400002068220008FF -S3150800221468220008A02F0008A02F0008000000204C -S3150800222400000020A02F0008A02F0008A02F0008F7 -S31508002234A02F0008A02F0008A02F0008A02F000830 -S31508002244A02F0008A02F0008140000206900002011 -S315080022546C000020EC0000202D23000808ED00E0A7 +S31508002204503000080000002014000020682200084E +S3150800221468220008503000085030000800000020EA +S3150800222400000020503000085030000850300008E4 +S31508002234503000085030000850300008503000086C +S3150800224450300008503000081400002069000020AF +S315080022546C000020EC0000204D23000808ED00E087 S309080022640020000840 -S3150800226880B583B000AF4FF010004FF0010100F0C1 -S315080022780DFD4FF480533B804FF003037B604FF00E -S315080022881003BB603B464FF48050C4F20100194660 -S3150800229800F01EFB07F10C07BD4680BD80B581B06E -S315080022A800AF00F0F9F903463B6040F21403C2F2A6 -S315080022B800031B683A68D21A40F2F3139A422CD9DB -S315080022C840F21803C2F200031B78002B0FD140F224 -S315080022D81803C2F200034FF001021A704FF4805037 -S315080022E8C4F201004FF4805100F0D8FB0EE040F22A -S315080022F81803C2F200034FF000021A704FF4805018 -S31508002308C4F201004FF4805100F0BAFB40F21403FE -S31508002318C2F200033A681A6000E000BF07F1040732 -S31508002328BD4680BD80B500AF00F008F800F0F2F9A8 -S31508002338FFF7B4FF00F044FAFAE700BF80B583B0A8 -S3150800234800AF4FF000037B604FF000033B604FF48B -S315080023588053C4F202034FF48052C4F20202126890 -S3150800236842F001021A604FF48052C4F202024FF496 -S315080023788053C4F2020359684FF00003CFF6FF03EF -S315080023880B4053604FF48053C4F202034FF4805253 -S31508002398C4F20202126822F0847222F480321A60A9 -S315080023A84FF48053C4F202034FF48052C4F2020277 -S315080023B8126822F480221A604FF48053C4F202038A -S315080023C84FF48052C4F20202526822F4FE025A609E -S315080023D84FF48053C4F202034FF41F029A604FF475 -S315080023E88053C4F202034FF48052C4F20202126800 -S315080023F842F480321A604FF48053C4F202031B6811 -S3150800240803F400333B607B6803F101037B603B6898 -S31508002418002B04D17A6840F2DC539A42EBD14FF488 -S315080024288053C4F202031B6803F40033002B00D15F -S31508002438FEE74FF40053C4F202034FF40052C4F205 -S315080024480202126842F010021A604FF40053C4F2EE -S3150800245802034FF40052C4F20202126822F0030281 -S315080024681A604FF40053C4F202034FF40052C4F240 -S315080024780202126842F002021A604FF48053C4F24C -S3150800248802034FF48052C4F2020252685A604FF4AB -S315080024988053C4F202034FF48052C4F2020252680F -S315080024A842F400525A604FF48053C4F202034FF4C0 -S315080024B88052C4F20202526842F480625A604FF4AB -S315080024C88053C4F202034FF48052C4F202025268DF -S315080024D822F47C125A604FF00903BB60BB68A3F16B -S315080024E802034FEA8343BB604FF48053C4F20203E6 -S315080024F84FF48052C4F202025168BA680A4342F499 -S3150800250880325A604FF48053C4F202034FF4805263 -S31508002518C4F20202126842F080721A6000BF4FF4D1 -S315080025288053C4F202031B6803F00073002BF6D02D -S315080025384FF48053C4F202034FF48052C4F20202E5 -S31508002548526822F003025A604FF48053C4F2020319 -S315080025584FF48052C4F20202526842F002025A60EC -S3150800256800BF4FF48053C4F202035B6803F00C0300 -S31508002578082BF6D1FFF774FE00F064F800F0B4F8FB -S3150800258807F10C07BD4680BD80B482B000AF7860FD -S3150800259839607B68002B10DA4FF46D43CEF20003DE -S315080025A87A6802F00F02A2F104013A68D2B24FEA39 -S315080025B80212D2B25B181A760CE04FF46143CEF2D7 -S315080025C8000379683A68D2B24FEA0212D2B25B18A7 -S315080025D883F8002307F10807BD4680BC704700BF8B -S315080025E880B581B000AF38603A686FF07F439A4289 -S315080025F802D94FF001031FE04EF21003CEF2000392 -S315080026083A6822F07F4202F1FF325A604FF0FF30F3 -S315080026184FF00F01FFF7B8FF4EF21003CEF2000392 -S315080026284FF000029A604EF21003CEF200034FF004 -S3150800263807021A604FF00003184607F10407BD465B -S3150800264880BD00BF80B500AF4FF4CA50C0F2010084 -S31508002658FFF7C6FF4FF0000000F00EF880BD00BF78 -S3150800266880B400AF4EF21003CEF200034FF000021A -S315080026781A60BD4680BC704780B481B000AF386028 -S3150800268840F21C03C2F200033A681A6007F104070D -S31508002698BD4680BC704700BF80B400AF40F21C033B -S315080026A8C2F200031B681846BD4680BC704700BFC7 -S315080026B880B400AF40F21C03C2F200031B6803F1A2 -S315080026C8010240F21C03C2F200031A60BD4680BC30 -S315080026D8704700BF80B400AFFEE700BF80B400AF04 -S315080026E862B6BD4680BC704780B500AFFFF7F6FFF7 -S315080026F880BD00BF80B581B000AFFFF7B1FF40F2DB -S315080027085113C0F600033B603B68984707F1040776 -S31508002718BD4680BD80B587B000AF4FF400304FF096 -S31508002728010100F0DBFA4FF005004FF0010100F057 -S31508002738ADFA4FF01803BB614FF004033B824FF024 -S3150800274803037B6107F110034FF40060C4F201002C -S31508002758194600F0BDF84FF00403BB614FF00803B3 -S315080027683B8207F110034FF40060C4F201001946D2 -S3150800277800F0AEF84FF461433B604FF00003BB80AE -S315080027884FF00003FB804FF000033B814FF0000336 -S31508002798BB814FF00C037B813B464FF48840C4F25B -S315080027A80000194600F0C2FA4FF48840C4F2000047 -S315080027B84FF0010100F090FB07F11C07BD4680BDEC -S315080027C880B500AF40F22003C2F200031B78002B45 -S315080027D817D140F22400C2F2000000F055F803466B -S315080027E8012B50D140F22003C2F200034FF0010238 -S315080027F81A7040F26803C2F200034FF000021A701A -S3150800280841E040F26803C2F200031B7803F10102B3 -S3150800281840F22403C2F20003D318184600F034F82D -S315080028280346012B2FD140F26803C2F200031B7836 -S3150800283803F10103DAB240F26803C2F200031A7020 -S3150800284840F22403C2F200031A7840F26803C2F27F -S3150800285800031B789A4216D140F22003C2F20003FD -S315080028684FF000021A7040F22403C2F200035B78A4 -S31508002878FF2B08D140F22403C2F200039B78002BF1 -S3150800288801D1FFF737FF80BD80B581B000AF38604A -S315080028984FF48840C4F200004FF0200100F04CFBCA -S315080028A80346012B0CD14FF48840C4F2000000F00F -S315080028B831FB0346DAB23B681A704FF0010301E0B0 -S315080028C84FF00003184607F10407BD4680BD00BF50 -S315080028D880B488B000AF786039604FF00003FB61B8 -S315080028E84FF000033B614FF00003BB614FF0000354 -S315080028F8FB604FF000037B614FF00003BB603B6849 -S315080029089B6803F00F03FB613B689B6803F01003A1 -S31508002918002B04D03B685B68FA691343FB613B6884 -S315080029281B88DBB2002B4ED07B681B687B614FF097 -S315080029380003BB6141E0BB694FF0010202FA03F3E9 -S31508002948FB603B681B881A46FB6813403B613A697B -S31508002958FB689A422DD1BB694FEA8303FB60FB6883 -S315080029684FF00F0202FA03F3BB60BB686FEA030372 -S315080029787A6913407B61FB68FA6902FA03F37A6994 -S3150800298813437B613B689B68282B07D1BB694FF0CB -S31508002998010202FA03F27B685A610AE03B689B68FF -S315080029A8482B06D1BB694FF0010202FA03F27B688D -S315080029B81A61BB6903F10103BB61BB69072BBAD965 -S315080029C87B687A691A603B681B88FF2B53D97B6832 -S315080029D85B687B614FF00003BB6146E0BB6903F1A6 -S315080029E808034FF0010202FA03F3FB603B681B88F1 -S315080029F81A46FB6813403B613A69FB689A4230D12C -S31508002A08BB694FEA8303FB60FB684FF00F0202FAC3 -S31508002A1803F3BB60BB686FEA03037A6913407B61FB -S31508002A28FB68FA6902FA03F37A6913437B613B6820 -S31508002A389B68282B08D1BB6903F108034FF00102EC -S31508002A4802FA03F27B685A613B689B68482B08D1EF -S31508002A58BB6903F108034FF0010202FA03F27B6827 -S31508002A681A61BB6903F10103BB61BB69072BB5D9B9 -S31508002A787B687A695A6007F12007BD4680BC7047AB -S31508002A8880B482B000AF78600B463B803A887B6892 -S31508002A981A6107F10807BD4680BC704780B482B042 -S31508002AA800AF78600B463B803A887B685A6107F125 -S31508002AB80807BD4680BC704780B485B000AF38604B -S31508002AC84FF000033B614FF00003FB604FF0000333 -S31508002AD8BB604FF000037B604FF48053C4F20203D7 -S31508002AE85B6803F00C033B613B69042B0AD0082B8F -S31508002AF80FD0002B4DD13A684FF49053C0F27A03A1 -S31508002B0813604DE03A684FF49053C0F27A031360A5 -S31508002B1846E04FF48053C4F202035B6803F470136B -S31508002B28FB604FF48053C4F202035B6803F48033F6 -S31508002B38BB60FB684FEA934303F10203FB60BB687B -S31508002B48002B09D1FA684FF41063C0F23D0303FB62 -S31508002B5802F23B681A6023E04FF48053C4F202037A -S31508002B685B6803F40033002B09D0FA684FF4106346 -S31508002B78C0F23D0303FB02F23B681A6010E0FA68EC -S31508002B884FF49053C0F27A0303FB02F23B681A60CB -S31508002B9806E03A684FF49053C0F27A03136000BF10 -S31508002BA84FF48053C4F202035B6803F0F0033B61F9 -S31508002BB83B694FEA13133B6140F20003C2F2000374 -S31508002BC83A699B181B78DBB27B603B681A687B6896 -S31508002BD822FA03F23B685A604FF48053C4F20203A0 -S31508002BE85B6803F4E0633B613B694FEA13233B6187 -S31508002BF840F20003C2F200033A699B181B78DBB25D -S31508002C087B603B685A687B6822FA03F23B689A60DD -S31508002C184FF48053C4F202035B6803F460533B61C4 -S31508002C283B694FEAD3233B6140F20003C2F2000333 -S31508002C383A699B181B78DBB27B603B685A687B68E5 -S31508002C4822FA03F23B68DA604FF48053C4F20203AF -S31508002C585B6803F440433B613B694FEA93333B6146 -S31508002C6840F21003C2F200033A699B181B78DBB2DC -S31508002C787B603B68DA687B68B2FBF3F23B681A61EB -S31508002C8807F11407BD4680BC704700BF80B482B000 -S31508002C9800AF786039603B68002B0CD04FF480533E -S31508002CA8C4F202034FF48052C4F2020291697A68A8 -S31508002CB80A439A610DE04FF48053C4F202034FF4B5 -S31508002CC88052C4F2020291697A686FEA02020A40DF -S31508002CD89A6107F10807BD4680BC704780B482B080 -S31508002CE800AF786039603B68002B0CD04FF48053EE -S31508002CF8C4F202034FF48052C4F20202D1697A6818 -S31508002D080A43DA610DE04FF48053C4F202034FF424 -S31508002D188052C4F20202D1697A686FEA02020A404E -S31508002D28DA6107F10807BD4680BC704780B58CB0E4 -S31508002D3800AF786039604FF00003FB624FF000037C -S31508002D48BB624FF000037B624FF000033B624FF013 -S31508002D580003FB617B68FB617B681B8A9BB2FB628D -S31508002D68FA6A4CF6FF731340FB623B68DB88FA6A1B -S31508002D781343FB62FB6A9AB27B681A827B689B8953 -S31508002D889BB2FB62FA6A4EF6F3131340FB623B6882 -S31508002D989A883B681B8913439AB23B685B89134335 -S31508002DA89BB2FA6A1343FB62FB6A9AB27B689A81FA -S31508002DB87B689B8A9BB2FB62FA6A4FF6FF4313400D -S31508002DC8FB623B689B89FA6A1343FB62FB6A9AB201 -S31508002DD87B689A8207F108031846FFF76DFEFA69B9 -S31508002DE84FF46053C4F201039A4202D17B69BB626D -S31508002DF801E03B69BB627B689B899BB29BB21BB2AD -S31508002E08002B0FDABA6A13464FEA83039B184FEA70 -S31508002E1883029A183B681B684FEA4303B2FBF3F32D -S31508002E287B620EE0BA6A13464FEA83039B184FEA99 -S31508002E3883029A183B681B684FEA8303B2FBF3F3CD -S31508002E487B627A6A48F21F53C5F2EB13A3FB021397 -S31508002E584FEA53134FEA0313FB62FB6A4FEA13134D -S31508002E684FF0640202FB03F37A6AD31A3B627B6863 -S31508002E789B899BB29BB21BB2002B12DA3B6A4FEABC -S31508002E88C30303F1320248F21F53C5F2EB13A3FB3F -S31508002E9802134FEA531303F00703FA6A1343FB6254 -S31508002EA811E03B6A4FEA031303F1320248F21F5353 -S31508002EB8C5F2EB13A3FB02134FEA531303F00F03F0 -S31508002EC8FA6A1343FB62FB6A9AB27B681A8107F1AE -S31508002ED83007BD4680BD00BF80B482B000AF7860B9 -S31508002EE839603B68002B08D07B689B899BB243F402 -S31508002EF800539AB27B689A8107E07B689B899BB2E4 -S31508002F0823F400539AB27B689A8107F10807BD46ED -S31508002F1880BC704780B481B000AF38603B689B8836 -S31508002F289BB24FEAC3534FEAD3539BB2184607F1ED -S31508002F380407BD4680BC704780B483B000AF78608C -S31508002F480B463B804FF00003BB607B681B889AB230 -S31508002F583B8813409BB2002B03D04FF00103BB609C -S31508002F6802E04FF00003BB60BB68184607F10C0780 -S31508002F78BD4680BC704700BF00B503B400F008F82A -S31508002F8803BC02B4694609BE00F004F801BC00BDDA -S30D08002F98704700BF704700BF37 -S31508002FA000000000010203040102030406070809E1 -S30908002FB002040608FB +S3150800226880B583B000AF4FF010004FF0010142F679 +S315080022784153C0F6000398474FF480533B804FF00C +S3150800228803037B604FF01003BB603B464FF4805056 +S31508002298C4F20100194642F68513C0F600039847AA +S315080022A807F10C07BD4680BD80B581B000AF42F284 +S315080022B8FD63C0F60003984703463B6040F21403E3 +S315080022C8C2F200031B683A68D21A40F2F3139A421C +S315080022D832D940F21803C2F200031B78002B12D138 +S315080022E840F21803C2F200034FF001021A704FF4C5 +S315080022F88050C4F201004FF4805142F65133C0F6BB +S315080023080003984711E040F21803C2F200034FF0A1 +S3150800231800021A704FF48050C4F201004FF480513D +S3150800232842F63533C0F60003984740F21403C2F262 +S3150800233800033A681A6000E000BF07F10407BD46C3 +S3150800234880BD00BF80B500AF42F27D33C0F60003FA +S31508002358984742F28573C0F60003984742F2B123BC +S31508002368C0F60003984742F65503C0F60003984797 +S31508002378F4E700BF80B583B000AF4FF000037B6079 +S315080023884FF000033B604FF48053C4F202034FF446 +S315080023988052C4F20202126842F001021A604FF42F +S315080023A88052C4F202024FF48053C4F202035968F9 +S315080023B84FF00003CFF6FF030B4053604FF48053EA +S315080023C8C4F202034FF48052C4F20202126822F0E1 +S315080023D8847222F480321A604FF48053C4F20203DE +S315080023E84FF48052C4F20202126822F480221A605C +S315080023F84FF48053C4F202034FF48052C4F2020227 +S31508002408526822F4FE025A604FF48053C4F202035B +S315080024184FF41F029A604FF48053C4F202034FF434 +S315080024288052C4F20202126842F480321A604FF4EB +S315080024388053C4F202031B6803F400333B607B68CD +S3150800244803F101037B603B68002B04D17A6840F2EC +S31508002458DC539A42EBD14FF48053C4F202031B684B +S3150800246803F40033002B00D1FEE74FF40053C4F2FF +S3150800247802034FF40052C4F20202126842F0100234 +S315080024881A604FF40053C4F202034FF40052C4F220 +S315080024980202126822F003021A604FF40053C4F2CB +S315080024A802034FF40052C4F20202126842F0020212 +S315080024B81A604FF48053C4F202034FF48052C4F2F0 +S315080024C8020252685A604FF48053C4F202034FF46A +S315080024D88052C4F20202526842F400525A604FF41B +S315080024E88053C4F202034FF48052C4F202025268BF +S315080024F842F480625A604FF48053C4F202034FF4E0 +S315080025088052C4F20202526822F47C125A604FF0D2 +S315080025180903BB60BB68A3F102034FEA8343BB60A8 +S315080025284FF48053C4F202034FF48052C4F20202F5 +S315080025385168BA680A4342F480325A604FF48053A5 +S31508002548C4F202034FF48052C4F20202126842F03F +S3150800255880721A6000BF4FF48053C4F202031B68E6 +S3150800256803F00073002BF6D04FF48053C4F202032D +S315080025784FF48052C4F20202526822F003025A60EB +S315080025884FF48053C4F202034FF48052C4F2020295 +S31508002598526842F002025A6000BF4FF48053C4F2F0 +S315080025A802035B6803F00C03082BF6D142F2692391 +S315080025B8C0F60003984742F29D63C0F600039847A1 +S315080025C842F24D73C0F60003984707F10C07BD465B +S315080025D880BD00BF80B482B000AF786039607B6880 +S315080025E8002B10DA4FF46D43CEF200037A6802F036 +S315080025F80F02A2F104013A68D2B24FEA0212D2B225 +S315080026085B181A760CE04FF46143CEF2000379683A +S315080026183A68D2B24FEA0212D2B25B1883F800239C +S3150800262807F10807BD4680BC704700BF80B581B072 +S3150800263800AF38603A686FF07F439A4202D94FF084 +S31508002648010322E04EF21003CEF200033A6822F0A4 +S315080026587F4202F1FF325A604FF0FF304FF00F0108 +S3150800266842F2DD53C0F6000398474EF21003CEF245 +S3150800267800034FF000029A604EF21003CEF20003F0 +S315080026884FF007021A604FF00003184607F10407CF +S31508002698BD4680BD80B500AF4FF4CA50C0F20100F0 +S315080026A842F23563C0F6000398474FF0000042F23D +S315080026B8DD63C0F60003984780BD00BF80B400AF4D +S315080026C84EF21003CEF200034FF000021A60BD4620 +S315080026D880BC704780B481B000AF386040F21C03F4 +S315080026E8C2F200033A681A6007F10407BD4680BCBF +S315080026F8704700BF80B400AF40F21C03C2F2000363 +S315080027081B681846BD4680BC704700BF80B400AF3A +S3150800271840F21C03C2F200031B6803F1010240F2EF +S315080027281C03C2F200031A60BD4680BC704700BF8E +S3150800273880B400AFFEE700BF80B400AF62B6BD46FE +S3150800274880BC704780B500AF42F24173C0F60003FB +S31508002758984780BD80B581B000AF42F2C563C0F620 +S315080027680003984740F25113C0F600033B603B68E4 +S31508002778984707F10407BD4680BD00BF80B587B0F6 +S3150800278800AF4FF400304FF0010142F69153C0F6FE +S31508002798000398474FF005004FF0010142F64153F0 +S315080027A8C0F6000398474FF01803BB614FF00403BF +S315080027B83B824FF003037B6107F110034FF4006077 +S315080027C8C4F20100194642F68513C0F60003984775 +S315080027D84FF00403BB614FF008033B8207F110036F +S315080027E84FF40060C4F20100194642F68513C0F694 +S315080027F8000398474FF461433B604FF00003BB80E2 +S315080028084FF00003FB804FF000033B814FF00003B5 +S31508002818BB814FF00C037B813B464FF48840C4F2DA +S315080028280000194642F6E153C0F6000398474FF4EC +S315080028388840C4F200004FF0010142F69173C0F6D1 +S315080028480003984707F11C07BD4680BD80B500AF51 +S3150800285840F22003C2F200031B78002B1AD140F27B +S315080028682400C2F2000042F63113C0F60003984766 +S315080028780346012B56D140F22003C2F200034FF05B +S3150800288801021A7040F26803C2F200034FF0000210 +S315080028981A7047E040F26803C2F200031B7803F196 +S315080028A8010240F22403C2F20003D318184642F67E +S315080028B83113C0F6000398470346012B32D140F27C +S315080028C86803C2F200031B7803F10103DAB240F287 +S315080028D86803C2F200031A7040F22403C2F2000326 +S315080028E81A7840F26803C2F200031B789A4219D193 +S315080028F840F22003C2F200034FF000021A7040F2B9 +S315080029082403C2F200035B78FF2B0BD140F22403A1 +S31508002918C2F200039B78002B04D142F25D73C0F61D +S315080029280003984780BD00BF80B581B000AF386006 +S315080029384FF48840C4F200004FF0200142F6F173C4 +S31508002948C0F6000398470346012B0FD14FF4884079 +S31508002958C4F2000042F6CD73C0F600039847034652 +S31508002968DAB23B681A704FF0010301E04FF0000332 +S31508002978184607F10407BD4680BD00BF80B488B075 +S3150800298800AF786039604FF00003FB614FF0000331 +S315080029983B614FF00003BB614FF00003FB604FF04B +S315080029A800037B614FF00003BB603B689B6803F03C +S315080029B80F03FB613B689B6803F01003002B04D0E8 +S315080029C83B685B68FA691343FB613B681B88DBB2A3 +S315080029D8002B4ED07B681B687B614FF00003BB61F8 +S315080029E841E0BB694FF0010202FA03F3FB603B685A +S315080029F81B881A46FB6813403B613A69FB689A428A +S31508002A082DD1BB694FEA8303FB60FB684FF00F02C1 +S31508002A1802FA03F3BB60BB686FEA03037A691340DB +S31508002A287B61FB68FA6902FA03F37A6913437B61E7 +S31508002A383B689B68282B07D1BB694FF0010202FA4D +S31508002A4803F27B685A610AE03B689B68482B06D103 +S31508002A58BB694FF0010202FA03F27B681A61BB6987 +S31508002A6803F10103BB61BB69072BBAD97B687A698D +S31508002A781A603B681B88FF2B53D97B685B687B61A8 +S31508002A884FF00003BB6146E0BB6903F108034FF04A +S31508002A98010202FA03F3FB603B681B881A46FB68C7 +S31508002AA813403B613A69FB689A4230D1BB694FEAE1 +S31508002AB88303FB60FB684FF00F0202FA03F3BB605F +S31508002AC8BB686FEA03037A6913407B61FB68FA6996 +S31508002AD802FA03F37A6913437B613B689B68282BE0 +S31508002AE808D1BB6903F108034FF0010202FA03F2A1 +S31508002AF87B685A613B689B68482B08D1BB6903F118 +S31508002B0808034FF0010202FA03F27B681A61BB69EF +S31508002B1803F10103BB61BB69072BB5D97B687A69E1 +S31508002B285A6007F12007BD4680BC704780B482B05A +S31508002B3800AF78600B463B803A887B681A6107F1D4 +S31508002B480807BD4680BC704780B482B000AF78607D +S31508002B580B463B803A887B685A6107F10807BD46E9 +S31508002B6880BC704780B485B000AF38604FF000036A +S31508002B783B614FF00003FB604FF00003BB604FF06A +S31508002B8800037B604FF48053C4F202035B6803F0CA +S31508002B980C033B613B69042B0AD0082B0FD0002B8A +S31508002BA84DD13A684FF49053C0F27A0313604DE05A +S31508002BB83A684FF49053C0F27A03136046E04FF42C +S31508002BC88053C4F202035B6803F47013FB604FF486 +S31508002BD88053C4F202035B6803F48033BB60FB6866 +S31508002BE84FEA934303F10203FB60BB68002B09D144 +S31508002BF8FA684FF41063C0F23D0303FB02F23B6820 +S31508002C081A6023E04FF48053C4F202035B6803F4A6 +S31508002C180033002B09D0FA684FF41063C0F23D035D +S31508002C2803FB02F23B681A6010E0FA684FF4905307 +S31508002C38C0F27A0303FB02F23B681A6006E03A68B8 +S31508002C484FF49053C0F27A03136000BF4FF48053D1 +S31508002C58C4F202035B6803F0F0033B613B694FEA81 +S31508002C6813133B6140F20003C2F200033A699B184A +S31508002C781B78DBB27B603B681A687B6822FA03F22A +S31508002C883B685A604FF48053C4F202035B6803F446 +S31508002C98E0633B613B694FEA13233B6140F200035B +S31508002CA8C2F200033A699B181B78DBB27B603B6863 +S31508002CB85A687B6822FA03F23B689A604FF4805395 +S31508002CC8C4F202035B6803F460533B613B694FEA4D +S31508002CD8D3233B6140F20003C2F200033A699B180A +S31508002CE81B78DBB27B603B685A687B6822FA03F27A +S31508002CF83B68DA604FF48053C4F202035B6803F456 +S31508002D0840433B613B694FEA93333B6140F210030A +S31508002D18C2F200033A699B181B78DBB27B603B68F2 +S31508002D28DA687B68B2FBF3F23B681A6107F11407A5 +S31508002D38BD4680BC704700BF80B482B000AF7860DB +S31508002D4839603B68002B0CD04FF48053C4F2020359 +S31508002D584FF48052C4F2020291697A680A439A616A +S31508002D680DE04FF48053C4F202034FF48052C4F2C4 +S31508002D78020291697A686FEA02020A409A6107F1C3 +S31508002D880807BD4680BC704780B482B000AF78603B +S31508002D9839603B68002B0CD04FF48053C4F2020309 +S31508002DA84FF48052C4F20202D1697A680A43DA619A +S31508002DB80DE04FF48053C4F202034FF48052C4F274 +S31508002DC80202D1697A686FEA02020A40DA6107F1F3 +S31508002DD80807BD4680BC704780B58CB000AF7860E0 +S31508002DE839604FF00003FB624FF00003BB624FF0F7 +S31508002DF800037B624FF000033B624FF00003FB6160 +S31508002E087B68FB617B681B8A9BB2FB62FA6A4CF695 +S31508002E18FF731340FB623B68DB88FA6A1343FB625D +S31508002E28FB6A9AB27B681A827B689B899BB2FB62AB +S31508002E38FA6A4EF6F3131340FB623B689A883B68B6 +S31508002E481B8913439AB23B685B8913439BB2FA6A98 +S31508002E581343FB62FB6A9AB27B689A817B689B8AF2 +S31508002E689BB2FB62FA6A4FF6FF431340FB623B6864 +S31508002E789B89FA6A1343FB62FB6A9AB27B689A8251 +S31508002E8807F10803184642F66D33C0F6000398475B +S31508002E98FA694FF46053C4F201039A4202D17B6976 +S31508002EA8BB6201E03B69BB627B689B899BB29BB2AC +S31508002EB81BB2002B0FDABA6A13464FEA83039B182C +S31508002EC84FEA83029A183B681B684FEA4303B2FB2A +S31508002ED8F3F37B620EE0BA6A13464FEA83039B183C +S31508002EE84FEA83029A183B681B684FEA8303B2FBCA +S31508002EF8F3F37B627A6A48F21F53C5F2EB13A3FB16 +S31508002F0802134FEA53134FEA0313FB62FB6A4FEAAD +S31508002F1813134FF0640202FB03F37A6AD31A3B626F +S31508002F287B689B899BB29BB21BB2002B12DA3B6A61 +S31508002F384FEAC30303F1320248F21F53C5F2EB13F3 +S31508002F48A3FB02134FEA531303F00703FA6A134362 +S31508002F58FB6211E03B6A4FEA031303F1320248F2B7 +S31508002F681F53C5F2EB13A3FB02134FEA531303F0DF +S31508002F780F03FA6A1343FB62FB6A9AB27B681A81E3 +S31508002F8807F13007BD4680BD80B482B000AF7860CF +S31508002F9839603B68002B08D07B689B899BB243F451 +S31508002FA800539AB27B689A8107E07B689B899BB233 +S31508002FB823F400539AB27B689A8107F10807BD463D +S31508002FC880BC704780B481B000AF38603B689B8886 +S31508002FD89BB24FEAC3534FEAD3539BB2184607F13D +S31508002FE80407BD4680BC704780B483B000AF7860DC +S31508002FF80B463B804FF00003BB607B681B889AB280 +S315080030083B8813409BB2002B03D04FF00103BB60EB +S3150800301802E04FF00003BB60BB68184607F10C07CF +S31508003028BD4680BC704700BF00B503B400F008F879 +S3150800303803BC02B4694609BE00F004F801BC00BD29 +S30D08003048704700BF704700BF86 +S315080030500000000001020304010203040607080930 +S30908003060020406084A S705080021F7DA diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzp b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzp index bb30cce8..cb5dd18b 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzp +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzp @@ -1,7 +1,7 @@ - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzs b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzs index 5fe3983b..5c422a72 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_Crossworks/Prog/ide/stm32f103_crossworks.hzs @@ -23,10 +23,6 @@ - - - - @@ -63,7 +59,7 @@ - + diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.elf index f8e0bc03..4c2abad5 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.map index d0f4310f..73c54ead 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.map @@ -7,47 +7,44 @@ start address 0x08000000 Program Header: LOAD off 0x00008000 vaddr 0x08000000 paddr 0x08000000 align 2**15 - filesz 0x000014c8 memsz 0x000014c8 flags r-x - LOAD off 0x00010000 vaddr 0x20000000 paddr 0x080014c8 align 2**15 - filesz 0x00000014 memsz 0x00000600 flags rw- + filesz 0x00001218 memsz 0x00001218 flags r-x + LOAD off 0x00010000 vaddr 0x20000000 paddr 0x20000000 align 2**15 + filesz 0x00000000 memsz 0x000005ec flags rw- private flags = 5000002: [Version5 EABI] [has entry point] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000014c8 08000000 08000000 00008000 2**2 + 0 .text 00001218 08000000 08000000 00008000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000014 20000000 080014c8 00010000 2**2 - CONTENTS, ALLOC, LOAD, DATA - 2 .bss 000005ec 20000014 080014dc 00010014 2**2 + 1 .bss 000005ec 20000000 20000000 00010000 2**2 ALLOC - 3 .debug_abbrev 00000e79 00000000 00000000 00010014 2**0 + 2 .debug_abbrev 00000e88 00000000 00000000 00009218 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 0000273b 00000000 00000000 00010e8d 2**0 + 3 .debug_info 00002763 00000000 00000000 0000a0a0 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 00001000 00000000 00000000 000135c8 2**0 + 4 .debug_line 00001024 00000000 00000000 0000c803 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_pubtypes 00000471 00000000 00000000 000145c8 2**0 + 5 .debug_pubtypes 00000471 00000000 00000000 0000d827 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_str 00000cfa 00000000 00000000 00014a39 2**0 + 6 .debug_str 00000d1d 00000000 00000000 0000dc98 2**0 CONTENTS, READONLY, DEBUGGING - 8 .comment 0000002a 00000000 00000000 00015733 2**0 + 7 .comment 0000002a 00000000 00000000 0000e9b5 2**0 CONTENTS, READONLY - 9 .ARM.attributes 00000031 00000000 00000000 0001575d 2**0 + 8 .ARM.attributes 00000031 00000000 00000000 0000e9df 2**0 CONTENTS, READONLY - 10 .debug_loc 00001163 00000000 00000000 0001578e 2**0 + 9 .debug_loc 00001150 00000000 00000000 0000ea10 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_pubnames 00000593 00000000 00000000 000168f1 2**0 + 10 .debug_pubnames 000005be 00000000 00000000 0000fb60 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_aranges 000003f8 00000000 00000000 00016e84 2**0 + 11 .debug_aranges 00000408 00000000 00000000 0001011e 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_ranges 000002f8 00000000 00000000 0001727c 2**0 + 12 .debug_ranges 00000308 00000000 00000000 00010526 2**0 CONTENTS, READONLY, DEBUGGING - 14 .debug_frame 0000080c 00000000 00000000 00017574 2**2 + 13 .debug_frame 0000082c 00000000 00000000 00010830 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 08000000 l d .text 00000000 .text -20000000 l d .data 00000000 .data -20000014 l d .bss 00000000 .bss +20000000 l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -63,126 +60,100 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 vectors.c 00000000 l df *ABS* 00000000 cstart.c 0800019e l F .text 00000000 zero_loop2 -0800139c l F .text 00000000 zero_loop -00000000 l df *ABS* 00000000 hooks.c +080010ec l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 main.c -00000000 l df *ABS* 00000000 core_cm3.c -00000000 l df *ABS* 00000000 system_stm32f10x.c 00000000 l df *ABS* 00000000 boot.c 00000000 l df *ABS* 00000000 com.c -20000014 l O .bss 00000001 comEntryStateConnect -20000018 l O .bss 00000040 xcpCtoReqPacket.1371 +20000000 l O .bss 00000001 comEntryStateConnect +20000004 l O .bss 00000040 xcpCtoReqPacket.1375 00000000 l df *ABS* 00000000 xcp.c -0800069c l F .text 00000010 XcpProtectResources -080006ac l F .text 0000001a XcpSetCtoError -080013bc l O .text 00000008 xcpStationId -20000058 l O .bss 0000004c xcpInfo +080003e0 l F .text 00000010 XcpProtectResources +080003f0 l F .text 0000001a XcpSetCtoError +0800110c l O .text 00000008 xcpStationId +20000044 l O .bss 0000004c xcpInfo 00000000 l df *ABS* 00000000 backdoor.c -200000a4 l O .bss 00000001 backdoorOpen +20000090 l O .bss 00000001 backdoorOpen 00000000 l df *ABS* 00000000 cop.c 00000000 l df *ABS* 00000000 assert.c -200000a8 l O .bss 00000004 assert_failure_file -200000ac l O .bss 00000004 assert_failure_line +20000094 l O .bss 00000004 assert_failure_file +20000098 l O .bss 00000004 assert_failure_line 00000000 l df *ABS* 00000000 cpu.c -00000000 l df *ABS* 00000000 can.c 00000000 l df *ABS* 00000000 uart.c -08000b88 l F .text 00000024 UartReceiveByte -08000bac l F .text 0000004a UartTransmitByte -200000b0 l O .bss 00000041 xcpCtoReqPacket.1392 -200000f4 l O .bss 00000001 xcpCtoRxLength.1393 -200000f5 l O .bss 00000001 xcpCtoRxInProgress.1394 +080008d0 l F .text 00000024 UartReceiveByte +080008f4 l F .text 0000004a UartTransmitByte +2000009c l O .bss 00000041 xcpCtoReqPacket.1396 +200000e0 l O .bss 00000001 xcpCtoRxLength.1397 +200000e1 l O .bss 00000001 xcpCtoRxInProgress.1398 00000000 l df *ABS* 00000000 nvm.c 00000000 l df *ABS* 00000000 timer.c -200000f6 l O .bss 00000002 millisecond_counter +200000e2 l O .bss 00000002 millisecond_counter 00000000 l df *ABS* 00000000 flash.c -08000dec l F .text 00000024 FlashUnlock -08000e10 l F .text 00000012 FlashLock -08000e24 l F .text 0000004c FlashGetSector -08000e70 l F .text 000000c2 FlashWriteBlock -08000f34 l F .text 0000003e FlashGetSectorBaseAddr -08000f74 l F .text 00000030 FlashInitBlock -08000fa4 l F .text 00000050 FlashSwitchBlock -08000ff4 l F .text 0000009a FlashAddToBlock -080013e8 l O .text 000000b4 flashLayout -200000f8 l O .bss 00000204 bootBlockInfo -200002fc l O .bss 00000204 blockInfo -08000614 g F .text 00000034 ComInit -080010ac g F .text 00000058 FlashWrite -08000374 g F .text 00000006 __set_PRIMASK -08000b1c g F .text 0000001c AssertFailure -08001358 g F .text 00000054 reset_handler -08000d7c g F .text 00000022 TimerUpdate -080006fc g F .text 00000012 XcpPacketTransmitted -08000648 g F .text 00000020 ComTask -08000678 g F .text 00000010 ComSetConnectEntryState -0800037c g F .text 00000006 __get_FAULTMASK -0800039c g F .text 00000004 __REV -080005f0 g F .text 00000014 BootInit -08000af8 g F .text 0000001a BackDoorInit -080003d8 g F .text 00000006 __STREXW -080003c0 g F .text 00000006 __LDREXW -08000b18 g F .text 00000002 CopService -080014c8 g .text 00000000 _etext -08000d6c g F .text 00000010 TimerReset -20000010 g O .data 00000004 SystemCoreClock -080003a8 g F .text 00000006 __RBIT -08000604 g F .text 00000010 BootTask -080012a0 g F .text 00000054 FlashWriteChecksum -08000384 g F .text 00000006 __set_FAULTMASK -08000668 g F .text 0000000e ComTransmitPacket -0800038c g F .text 00000006 __get_CONTROL -080006e8 g F .text 00000012 XcpIsConnected -08000d38 g F .text 00000008 NvmInit -08001090 g F .text 0000001a FlashInit -0800033c g F .text 00000008 __get_PSP -20000500 g .bss 00000000 _ebss -08000344 g F .text 00000006 __set_PSP +08000b34 l F .text 00000024 FlashUnlock +08000b58 l F .text 00000012 FlashLock +08000b6c l F .text 0000004c FlashGetSector +08000bb8 l F .text 000000c2 FlashWriteBlock +08000c7c l F .text 0000003e FlashGetSectorBaseAddr +08000cbc l F .text 00000030 FlashInitBlock +08000cec l F .text 00000050 FlashSwitchBlock +08000d3c l F .text 0000009a FlashAddToBlock +08001138 l O .text 000000b4 flashLayout +200000e4 l O .bss 00000204 bootBlockInfo +200002e8 l O .bss 00000204 blockInfo +00000000 l df *ABS* 00000000 hooks.c +00000000 l df *ABS* 00000000 core_cm3.c +00000000 l df *ABS* 00000000 system_stm32f10x.c +00000000 l df *ABS* 00000000 can.c +08000360 g F .text 00000034 ComInit +08000df4 g F .text 00000058 FlashWrite +08000860 g F .text 0000001c AssertFailure +080010a8 g F .text 00000054 reset_handler +08000ac4 g F .text 00000022 TimerUpdate +08000440 g F .text 00000012 XcpPacketTransmitted +08000394 g F .text 00000020 ComTask +080003c8 g F .text 00000010 ComSetConnectEntryState +0800033c g F .text 00000014 BootInit +0800083c g F .text 0000001a BackDoorInit +0800085c g F .text 00000002 CopService +08001218 g .text 00000000 _etext +08000ab4 g F .text 00000010 TimerReset +08000350 g F .text 00000010 BootTask +08000f80 g F .text 0000005c FlashWriteChecksum +080003b8 g F .text 0000000e ComTransmitPacket +0800042c g F .text 00000012 XcpIsConnected +08000a80 g F .text 00000008 NvmInit +08000dd8 g F .text 0000001a FlashInit +200004ec g .bss 00000000 _ebss 00000100 g *ABS* 00000000 __STACKSIZE__ -08001344 g F .text 00000014 UnusedISR -080003b0 g F .text 00000008 __LDREXB -08000bf8 g F .text 0000002c UartInit -08000d48 g F .text 00000008 NvmErase -20000014 g .bss 00000000 _bss -0800036c g F .text 00000006 __get_PRIMASK -08000710 g F .text 000003ae XcpPacketReceived -20000000 g O .data 00000010 AHBPrescTable -080012f4 g F .text 00000050 FlashDone -080003a4 g F .text 00000004 __REVSH +08001094 g F .text 00000014 UnusedISR +080003b4 g F .text 00000002 ComFree +08000940 g F .text 0000002c UartInit +08000a90 g F .text 00000008 NvmErase +20000000 g .bss 00000000 _bss +08000454 g F .text 000003ae XcpPacketReceived +08001044 g F .text 00000050 FlashDone 08000150 g F .text 00000062 EntryFromProg -08000688 g F .text 0000000c ComIsConnectEntryState -080006c8 g F .text 0000001e XcpInit -08001104 g F .text 00000134 FlashErase +0800040c g F .text 0000001e XcpInit +08000e4c g F .text 00000134 FlashErase 080001c8 g F .text 00000174 main -08000394 g F .text 00000006 __set_CONTROL -08000d58 g F .text 00000014 NvmDone -08000c24 g F .text 0000006e UartTransmitPacket -08000d50 g F .text 00000008 NvmVerifyChecksum -08000b5c g F .text 00000022 CpuMemCopy -08000da0 g F .text 0000000c TimerSet -0800034c g F .text 00000008 __get_MSP -080003e0 g F .text 00000130 SystemInit -08000c94 g F .text 000000a4 UartReceivePacket -080003a0 g F .text 00000004 __REV16 -20000000 g .data 00000000 _data -08000354 g F .text 00000006 __set_MSP -08000b14 g F .text 00000002 CopInit -08000b80 g F .text 00000008 CpuReset -08000d40 g F .text 00000008 NvmWrite -08000b38 g F .text 00000024 CpuStartUserProgram -20000600 g .bss 00000000 _estack -08001238 g F .text 00000068 FlashVerifyChecksum -08000364 g F .text 00000006 __set_BASEPRI -20000014 g .data 00000000 _edata +08000aa0 g F .text 00000014 NvmDone +0800096c g F .text 0000006e UartTransmitPacket +08000a98 g F .text 00000008 NvmVerifyChecksum +080008a4 g F .text 00000022 CpuMemCopy +08000ae8 g F .text 0000000c TimerSet +080009dc g F .text 000000a4 UartReceivePacket +20000000 g .text 00000000 _data +08000858 g F .text 00000002 CopInit +080008c8 g F .text 00000008 CpuReset +08000a88 g F .text 00000008 NvmWrite +0800087c g F .text 00000028 CpuStartUserProgram +200005ec g .bss 00000000 _estack +08000fdc g F .text 00000068 FlashVerifyChecksum +20000000 g .text 00000000 _edata 08000000 g O .text 00000150 _vectab -080003d0 g F .text 00000006 __STREXH -08000510 g F .text 000000e0 SystemCoreClockUpdate -080003b8 g F .text 00000008 __LDREXH -08000694 g F .text 00000008 ComIsConnected -0800035c g F .text 00000006 __get_BASEPRI -08000ac0 g F .text 00000038 BackDoorCheck -20000500 g .bss 00000000 _stack -08000dd8 g F .text 00000012 TimerGet -080003c8 g F .text 00000006 __STREXB -08000dac g F .text 0000002a TimerInit +080003d8 g F .text 00000008 ComIsConnected +08000804 g F .text 00000038 BackDoorCheck +200004ec g .bss 00000000 _stack +08000b20 g F .text 00000012 TimerGet +08000af4 g F .text 0000002a TimerInit diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.srec index 1a7015fa..ad91c0b9 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/bin/openbtl_olimex_stm32p103.srec @@ -1,33 +1,33 @@ S024000062696E2F6F70656E62746C5F6F6C696D65785F73746D3332703130332E737265639B -S315080000000006002059130008451300084513000888 -S315080000104513000845130008451300084513000852 -S315080000204513000845130008451300084513000842 -S315080000304513000845130008451300084513000832 -S315080000404513000845130008451300084513000822 -S315080000504513000845130008451300084513000812 -S315080000604513000845130008451300084513000802 -S3150800007045130008451300084513000845130008F2 -S3150800008045130008451300084513000845130008E2 -S3150800009045130008451300084513000845130008D2 -S315080000A045130008451300084513000845130008C2 -S315080000B045130008451300084513000845130008B2 -S315080000C045130008451300084513000845130008A2 -S315080000D04513000845130008451300084513000892 -S315080000E04513000845130008451300084513000882 -S315080000F04513000845130008451300084513000872 -S315080001004513000845130008451300084513000861 -S315080001104513000845130008451300084513000851 -S315080001204513000845130008451300084513000841 -S315080001304513000845130008451300084513000831 -S315080001404513000845130008451300084513000821 +S31508000000EC050020A91000089510000895100008B6 +S31508000010951000089510000895100008951000081E +S31508000020951000089510000895100008951000080E +S3150800003095100008951000089510000895100008FE +S3150800004095100008951000089510000895100008EE +S3150800005095100008951000089510000895100008DE +S3150800006095100008951000089510000895100008CE +S3150800007095100008951000089510000895100008BE +S3150800008095100008951000089510000895100008AE +S31508000090951000089510000895100008951000089E +S315080000A0951000089510000895100008951000088E +S315080000B0951000089510000895100008951000087E +S315080000C0951000089510000895100008951000086E +S315080000D0951000089510000895100008951000085E +S315080000E0951000089510000895100008951000084E +S315080000F0951000089510000895100008951000083E +S31508000100951000089510000895100008951000082D +S31508000110951000089510000895100008951000081D +S31508000120951000089510000895100008951000080D +S3150800013095100008951000089510000895100008FD +S3150800014095100008951000089510000895100008ED S3150800015008B572B617481849016018498D4640F225 -S315080001600002C2F2000240F21403C2F200039A42ED -S3150800017011D241F2C842C0F6000240F20003C2F2B0 -S31508000180000340F21400C2F2000052F8041B43F8C0 +S315080001600002C2F2000240F20003C2F200039A4201 +S3150800017011D241F21822C0F6000240F20003C2F280 +S31508000180000340F20000C2F2000052F8041B43F8D4 S31508000190041B8342F9D30A480A494FF000028842F1 -S315080001A0B8BF40F8042BFADB00F066FA00F00CF84A -S315080001B008BD000008ED00E0000000080006002069 -S315080001C0140000200005002000B583B04FF000039E +S315080001A0B8BF40F8042BFADB00F00EF900F00CF8A3 +S315080001B008BD000008ED00E000000008EC0500207E +S315080001C000000020EC04002000B583B04FF00003C7 S315080001D0019300934FF48053C4F202031A6842F065 S315080001E001021A6059684FF00002CFF6FF0201EAD1 S315080001F002025A601A6822F0847222F480321A6067 @@ -36,8 +36,8 @@ S315080002104FF41F029A601A6842F480321A604FF44B S315080002208053C4F2020340F2DC52196801F400312B S315080002300091019901F101010191009911B9019902 S315080002409142F2D14FF48053C4F202031B6813F4AF -S31508000250003F07D141F2B430C0F600004FF06F01FD -S3150800026000F05CFC4FF40053C4F202031A6842F033 +S31508000250003F07D141F20410C0F600004FF06F01CD +S3150800026000F0FEFA4FF40053C4F202031A6842F093 S3150800027010021A601A6822F003021A601A6842F01D S3150800028002021A604FF48053C4F202035A685A6095 S315080002905A6842F400525A605A6842F480625A60B8 @@ -50,288 +50,243 @@ S315080002F0FAD14FF48053C4F20203DA6942F40032A9 S31508000300DA619A6942F005029A614FF40063C4F211 S3150800031001031A6822F470621A601A6842F430629D S315080003201A601A6822F470421A601A6842F4804207 -S315080003301A6000F05DF900F065F9FCE7EFF3098053 -S315080003400046704780F30988704700BFEFF30880BE -S315080003500046704780F30888704700BFEFF31280A5 -S31508000360704700BF80F31188704700BFEFF3108015 -S31508000370704700BF80F31088704700BFEFF3138003 -S31508000380704700BF80F31388704700BFEFF31480EF -S31508000390704700BF80F31488704700BF00BA7047E3 -S315080003A040BA7047C0BA704790FAA0F0704700BFCD -S315080003B0D0E84F0FC0B27047D0E85F0F80B27047E1 -S315080003C050E8000F704700BFC1E8400F704700BFF4 -S315080003D0C1E8500F704700BF41E80000704700BFF2 -S315080003E082B04FF48053C4F202031A6842F0010245 -S315080003F01A6059684FF00002CFF6FF0201EA0202BE -S315080004005A601A6822F0847222F480321A601A68D6 -S3150800041022F480221A605A6822F4FE025A604FF4C7 -S315080004201F029A604FF00002019200921A6842F485 -S3150800043080321A604FF48052C4F20202136803F441 -S3150800044000330093019B03F101030193009B1BB941 -S31508000450019BB3F5A06FF1D14FF48053C4F20203A8 -S315080004601B6813F4003F14BF012300230093009B6D -S31508000470012B44D14FF40053C4F202031A6842F028 -S3150800048010021A601A6822F003021A601A6842F00B -S3150800049002021A604FF48053C4F202035A685A6083 -S315080004A05A685A605A6842F480625A605A6822F456 -S315080004B07C125A605A6842F4E8125A601A6842F086 -S315080004C080721A604FF48052C4F20202136813F065 -S315080004D0007FFBD04FF48053C4F202035A6822F01F -S315080004E003025A605A6842F002025A604FF4805278 -S315080004F0C4F20202536803F00C03082BFAD14FF436 -S315080005006D43CEF200034FF000629A6002B0704766 -S315080005104FF48053C4F202035B6803F00C03042B08 -S315080005200DD0082B15D0002B44D140F21003C2F28F -S3150800053000034FF49052C0F27A021A6043E040F288 -S315080005401003C2F200034FF49052C0F27A021A6006 -S3150800055039E04FF48053C4F202035A685B68C2F369 -S31508000560834202F1020213F4803F0BD140F21003DA -S31508000570C2F200034FF41061C0F23D0101FB02F222 -S315080005801A6020E04FF48053C4F202035B6813F448 -S31508000590003F40F21003C2F2000319BF4FF4106186 -S315080005A0C0F23D014FF49051C0F27A0101FB02F20C -S315080005B01A6008E040F21003C2F200034FF49052AA -S315080005C0C0F27A021A604FF48053C4F202035A68E2 -S315080005D0C2F3031240F20003C2F200039A5C40F22F -S315080005E01003C2F20003196821FA02F21A60704772 -S315080005F008B500F08FFA00F07FFA00F09DFB00F0D6 -S3150800060009F808BD08B500F087FA00F01DF800F0F3 -S3150800061057FA08BD00B583B04FF0FF038DF80430D4 -S315080006204FF000038DF8053000F04EF800F0E4FABC -S3150800063040F21403C2F200031B78012B02D101A871 -S3150800064000F066F803B000BD08B540F21800C2F223 -S31508000650000000F01FFB012805D140F21800C2F285 -S31508000660000000F055F808BD08B5C9B200F0DAFA7E -S3150800067000F044F808BD00BF40F21403C2F20003BC -S315080006804FF001021A70704740F21403C2F20003D9 -S315080006901878704708B500F027F808BD40F25803E7 -S315080006A0C2F200034FF000025A70704740F2580336 -S315080006B0C2F200034FF0FE02DA7018714FF0020220 -S315080006C0A3F84420704700BF40F25803C2F2000363 -S315080006D04FF000021A709A6483F84320A3F8442066 -S315080006E09A705A70704700BF40F25803C2F200036E -S315080006F01878003818BF0120704700BF40F2580329 -S31508000700C2F200034FF0000283F84320704700BF8F -S3150800071038B504460278FF2A1DD1FFF7BFFF40F21D -S315080007205803C2F200034FF001021A704FF0FF019E -S31508000730D9704FF0100119714FF0000159714FF03F -S3150800074040009871D87119725A729A724FF008025D -S31508000750A3F8442098E140F25803C2F200031B783C -S31508000760012B40F0AB81A2F1C902352A00F288813B -S31508000770DFE812F0EC008601860181018601860118 -S3150800078073010D015901430186018601860186011F -S315080007908601860186018601860186018601860113 -S315080007A08601860186018601860186018601860103 -S315080007B086018601860186018601860186018601F3 -S315080007C0860186018601860182005400360074007F -S315080007D0860186018601A8008601C200C700DB00E3 -S315080007E042783F2A04D94FF02200FFF75FFF4BE11A -S315080007F040F25805C2F2000505F10400A96C00F0A4 -S31508000800ADF94FF0FF03EB706278AB6CD318AB64AD -S31508000810637803F10103A5F8443035E143783F2BAB -S3150800082004D94FF02200FFF741FF2DE1416840F25D -S315080008305805C2F20005A96405F10400627800F0C3 -S315080008408DF94FF0FF03EB706278AB6CD318AB648D -S31508000850637803F10103A5F8443015E140F2580323 -S31508000860C2F200034FF0FF02DA7042689A644FF052 -S315080008700102A3F8442007E140F25805C2F2000538 -S315080008804FF0FF03EB70A96C43684FF000023BB1D1 -S315080008904FF0000211F8010B1218D2B2013BF9D140 -S315080008A0C5F8072040F25803C2F200034FF00102D0 -S315080008B01A714FF000025A719A714FF00802A3F8A4 -S315080008C04420E1E040F25803C2F200034FF0FF0271 -S315080008D0DA7041F2BC32C0F600029A644FF00002A8 -S315080008E01A715A719A714FF00702C3F807204FF030 -S315080008F00802A3F84420C7E04FF00000FFF7D6FE31 -S31508000900C2E040F25803C2F200034FF0FF02DA7069 -S315080009104FF000021A71597859719A71DA711A7280 -S315080009204FF00602A3F84420AEE040F25804C2F2A3 -S3150800093000044FF000032370FFF7B0FE4FF0FF03EB -S31508000940E3704FF00103A4F844309DE040F25803E9 -S31508000950C2F20003986C4FF03F0104F1010200F067 -S31508000960EFF920B94FF03100FFF7A0FE8CE040F216 -S315080009705803C2F200034FF0FF02DA709A6C02F1D4 -S315080009803F029A644FF00102A3F844207CE04378C2 -S315080009903E2B04D94FF02200FFF788FE74E040F2A0 -S315080009A05803C2F200034FF0FF02DA704FF001025B -S315080009B0A3F84420417841B900F0CEF9002863D164 -S315080009C04FF03100FFF772FE5EE040F25803C2F2C4 -S315080009D00003986C04F1020200F0B2F920B94FF056 -S315080009E03100FFF763FE4FE040F25803C2F20003FE -S315080009F061789A6C8A189A6446E040F25803C2F203 -S31508000A0000034FF0FF02DA704FF000021A715A71B4 -S31508000A104FF040019971DA711A725A724FF0070253 -S31508000A20A3F8442030E040F25803C2F20003986C61 -S31508000A30616800F089F920B94FF03100FFF736FEFA -S31508000A4022E040F25803C2F200034FF0FF02DA70C8 -S31508000A504FF00102A3F8442016E000F091F840F2A6 -S31508000A605803C2F200034FF0FF02DA704FF001029A -S31508000A70A3F8442008E04FF03100FFF717FE03E023 -S31508000A804FF02000FFF712FE40F25803C2F20003AF -S31508000A9093F84330012B03D14FF01000FFF706FE01 -S31508000AA040F25803C2F200034FF0010283F84320D4 -S31508000AB003F10300B3F84410FFF7D6FD38BD00BFB5 -S31508000AC008B5FFF7E7FD012815D040F2A403C2F2E6 -S31508000AD000031B78012B0ED100F07EF931280AD9C4 -S31508000AE040F2A403C2F200034FF000021A7000F0AD -S31508000AF03DF900F021F808BD08B540F2A403C2F29A -S31508000B0000034FF001021A7000F050F9FFF7D8FF02 -S31508000B1008BD00BF704700BF704700BF08B540F268 -S31508000B20A803C2F20003186040F2AC03C2F2000345 -S31508000B301960FFF7F1FFFCE708B500F009F960B1A5 -S31508000B404EF60853CEF200034FF400521A6042F2F2 -S31508000B500403C0F600031B68984708BD70B50D4628 -S31508000B6014465AB1064615F8013B06F8013BFFF74D -S31508000B70D3FF04F1FF34A4B2002CF4D170BD00BF3A -S31508000B8008B500F0E9FB08BD4FF48843C4F200033A -S31508000B901B8813F0200F1FBF4FF48843C4F20003CD -S31508000BA09B88037014BF01200020704710B54FF4CE -S31508000BB08843C4F200031B8813F0800F15D04FF446 -S31508000BC08843C4F2000398801B8813F0800F0FD166 -S31508000BD04FF48844C4F20004FFF79EFF238813F0FD -S31508000BE0800FF9D04FF0010010BD4FF0000010BD86 -S31508000BF04FF0010010BD00BF4FF48843C4F2000354 -S31508000C004FF000021A819A811A829A821A8340F258 -S31508000C1071221A819A8992B242F4005242F00C0269 -S31508000C209A8170472DE9F04105460C46402907D9B7 -S31508000C3041F2C430C0F600004FF08801FFF76EFF9E -S31508000C402046FFF7B3FF012807D041F2C430C0F6AB -S31508000C5000004FF08B01FFF761FF2646BCB14FF04D -S31508000C60000441F2C437C0F600074FF09308FFF7B7 -S31508000C7053FF285DFFF79AFF012803D038464146FF -S31508000C80FFF74CFF04F10104A3B2B342EFD3BDE86A -S31508000C90F08100BF38B5054640F2F503C2F20003FD -S31508000CA01B78B3B940F2B000C2F20000FFF76CFF40 -S31508000CB0012836D140F2F503C2F200034FF00102D3 -S31508000CC01A7040F2F403C2F200034FF000001870E5 -S31508000CD038BD40F2F403C2F200031C781548201808 -S31508000CE0FFF752FF01281FD104F10104E2B240F2D6 -S31508000CF0F403C2F200031A7040F2B003C2F2000312 -S31508000D001B78934213D128460A49FFF727FF40F27A -S31508000D10F503C2F200034FF000021A704FF001000B -S31508000D2038BD4FF0000038BD4FF0000038BD4FF019 -S31508000D30000038BDB100002008B500F0A9F908BDCB -S31508000D4008B500F0B3F908BD08B500F0DBF908BD31 -S31508000D5008B500F071FA08BD08B500F0A1FA10B19F -S31508000D6000F0C8FA08BD4FF0000008BD4EF21003A7 -S31508000D70CEF200034FF000021A6070474EF21003DD -S31508000D80CEF200031B6813F4803F1FBF40F2F60340 -S31508000D90C2F200031A88013218BF1A80704700BFD2 -S31508000DA040F2F603C2F200031880704708B5FFF751 -S31508000DB0DDFF4EF21003CEF2000341F63F12C0F2F9 -S31508000DC001025A604FF0000098604FF005021A6061 -S31508000DD0FFF7E6FF08BD00BF08B5FFF7CFFF40F2F3 -S31508000DE0F603C2F20003188808BD00BF4FF400538B -S31508000DF0C4F2020340F22312C4F267525A6048F65C -S31508000E00AB12CCF6EF525A604FF03402DA607047F4 -S31508000E104FF40053C4F202031A6942F080021A61C1 -S31508000E20704700BFF8B507464FF00004254641F263 -S31508000E30E836C0F60006FFF76FFE3359BB420ED8F8 -S31508000E40311949685B189F4209D241F2E833C0F666 -S31508000E50000305EB450203EB8203187AF8BD05F19A -S31508000E60010504F10C04B42CE5D14FF0FF00F8BDE0 -S31508000E702DE9F84380460068FFF7D4FFFF2808BF2E -S31508000E80002453D0FFF7B2FF4FF40053C4F2020315 -S31508000E90DB6813F0010F04D0FFF7BAFF4FF0000428 -S31508000EA044E04FF40053C4F202031A6942F0010207 -S31508000EB01A614FF0000508F104094FF40054C4F212 -S31508000EC00204D8F80030EF1859F80560B2B2EA52B1 -S31508000ED0E36813F0010F05D0FFF71EFEE36813F071 -S31508000EE0010FF9D14FEA16437B80E36813F0010F2F -S31508000EF005D0FFF711FEE36813F0010FF9D13B683F -S31508000F00B34207D105F10405B5F5007FD9D14FF0F5 -S31508000F10010401E04FF000044FF40053C4F2020349 -S31508000F201A6922F001021A61FFF772FF2046BDE82E -S31508000F30F88300BF70B5064641F2E835C0F60005ED -S31508000F404FF00004FFF7E8FD2B7AB34208D141F2CF -S31508000F50E833C0F6000304EB440253F8220070BDE0 -S31508000F6004F1010405F10C050F2CEBD14FF0FF300D -S31508000F7070BD00BF08B54FEAC1534FEAD3535BB9FA -S31508000F8003688B420BD040F8041B4FF40072FFF73E -S31508000F90E5FD4FF0010008BD4FF0000008BD4FF019 -S31508000FA0010008BD38B504460D4640F2F803C2F202 -S31508000FB00003984209D04FF40053C0F60003994243 -S31508000FC008D0FFF755FF88B108E040F2FC24C2F2CA -S31508000FD0000403E040F2F804C2F200042046294661 -S31508000FE0FFF7C8FF002808BF002401E04FF00004FF -S31508000FF0204638BD2DE9F84305460C4617461E46D9 -S315080010004FEA51294FEA49290368B3F1FF3F03D153 -S315080010104946FFF7AFFF50B32B684B4505D0284626 -S315080010204946FFF7BFFF054628B32B68E41A2C1973 -S3150800103004F1040440F2FF1809F50079FFF76CFD86 -S3150800104005F10403E31A434507D928464946FFF73D -S31508001050A9FF054698B100F1040417F8013B23706F -S3150800106006F1FF36B6B276B104F10104E6E74FF0B1 -S315080010700000BDE8F8834FF00000BDE8F8834FF0A4 -S315080010800000BDE8F8834FF00100BDE8F88300BF13 -S3150800109040F2FC23C2F200034FF0FF321A6040F21E -S315080010A0F803C2F200031A60704700BF70B5044621 -S315080010B00D461646FFF7B6FEFF281DD004F1FF3091 -S315080010C04019FFF7AFFEFF2819D04FEA54224FF414 -S315080010D00053C0F60003B3EB422F07BF40F2F800F7 -S315080010E0C2F2000040F2FC20C2F20000214632465D -S315080010F0ABB2FFF77FFF70BD4FF0000070BD4FF039 -S31508001100000070BD2DE9F04105460E46FFF78AFE40 -S31508001110044605F1FF308019FFF784FE0546FF28CF -S3150800112014BF00230123FF2C08BF43F00103002B43 -S315080011307ED1844270D8002C72D00F2874D8FFF75D -S3150800114055FE4FF40053C4F20203DB6813F0010F97 -S3150800115005D0FFF75DFE4FF00000BDE8F0814FF4C3 -S315080011600053C4F202031A6942F002021A612046C9 -S31508001170FFF7E0FE07462846FFF7DCFE804641F209 -S31508001180E836C0F600064FF00004FFF7C5FC337AD0 -S31508001190AB4209D141F2E833C0F6000304EB44023E -S315080011A003EB82035E6807E004F1010406F10C060E -S315080011B00F2CEAD14FF00006C7EB08084644C6F3E1 -S315080011C08F26DEB14FF000054FF40054C4F2020436 -S315080011D06761236943F040032361E36813F0010F55 -S315080011E005D0FFF799FCE36813F0010FF9D105F173 -S315080011F00105ADB207F58067AE42E9D84FF4005352 -S31508001200C4F202031A6922F002021A61FFF700FE0D -S315080012104FF00100BDE8F0814FF00000BDE8F08115 -S315080012204FF00000BDE8F0814FF00000BDE8F08106 -S315080012304FF00000BDE8F08142F20402C0F6000259 -S315080012404FF40053C0F6000310681B68C01842F23A -S315080012500803C0F600031B68C01842F20C03C0F668 -S3150800126000031B68C01842F21003C0F600031B688F -S31508001270C01842F21403C0F600031B68C01842F2F5 -S315080012801803C0F600031B68C01842F25013C0F6D4 -S3150800129000031B68C018D0F1010038BF0020704752 -S315080012A010B582B040F2F802C2F2000202F104035D -S315080012B09468D16864185268A418DA68A4181A6978 -S315080012C0A4185A69A4189B69E418C4F10004019487 -S315080012D0FFF7B2FF844208BF012009D042F250103E -S315080012E0C0F600004FF004010DEB0102FFF7DEFE29 -S315080012F002B010BD08B540F2F803C2F200031B683D -S31508001300B3F1FF3F06D040F2F800C2F20000FFF743 -S31508001310AFFD88B140F2FC23C2F200031B68B3F1AB -S31508001320FF3F0CD040F2FC20C2F20000FFF7A0FD00 -S31508001330003818BF012008BD4FF0000008BD4FF067 -S31508001340010008BD08B541F29C40C0F600004FF008 -S315080013503601FFF7E3FB08BD08B572B640F2000296 -S31508001360C2F2000240F21403C2F200039A4211D2FA -S3150800137041F2C842C0F6000240F20003C2F200037E -S3150800138040F21400C2F2000052F8041B43F8041B92 -S315080013908342F9D3054806494FF000028842B8BF90 -S315080013A040F8042BFADBFEF70FFF08BD14000020F7 -S315080013B0000500206D61696E2E6300004F70656E32 -S315080013C0424C54002E2E2F2E2E2F2E2E2F536F7555 -S315080013D07263652F41524D434D335F53544D33323B -S315080013E02F756172742E630000200008002000002B -S315080013F00100000000400008002000000200000074 -S3150800140000600008002000000300000000800008BB -S31508001410002000000400000000A0000800200000D2 -S315080014200500000000C000080020000006000000BB -S3150800143000E0000800200000070000000000010886 -S31508001440002000000800000000200108002000001D -S315080014500900000000400108002000000A00000002 -S3150800146000600108002000000B0000000080010851 -S31508001470002000000C00000000A001080020000069 -S315080014800D00000000C00108002000000E0000004A -S3150800149000E00108002000000F0000002E2E2F2E6D -S315080014A02E2F2E2E2F536F757263652F41524D4383 -S315080014B04D335F53544D33322F4743432F7665637D -S30D080014C0746F72732E630000BD -S315080014C800000000000000000102030406070809DE -S309080014D800A24A0412 +S315080003301A6000F003F800F00BF8FCE708B500F0C7 +S315080003408BFA00F07BFA00F09BFB00F009F808BD79 +S3150800035008B500F083FA00F01DF800F053FA08BD5E +S3150800036000B583B04FF0FF038DF804304FF000035B +S315080003708DF8053000F04AF800F0E2FA40F2000382 +S31508000380C2F200031B78012B02D101A800F062F823 +S3150800039003B000BD08B540F20400C2F2000000F048 +S315080003A01DFB012805D140F20400C2F2000000F04E +S315080003B051F808BD704700BF08B5C9B200F0D6FAB3 +S315080003C000F03EF808BD00BF40F20003C2F2000389 +S315080003D04FF001021A70704708B500F027F808BDFB +S315080003E040F24403C2F200034FF000025A7070470D +S315080003F040F24403C2F200034FF0FE02DA701871AD +S315080004004FF00202A3F84420704700BF40F24403AD +S31508000410C2F200034FF000021A709A6483F8432070 +S31508000420A3F844209A705A70704700BF40F24403FC +S31508000430C2F200031878003818BF0120704700BFC1 +S3150800044040F24403C2F200034FF0000283F843204F +S31508000450704700BF38B504460278FF2A1DD1FFF75A +S31508000460BFFF40F24403C2F200034FF001021A70C4 +S315080004704FF0FF01D9704FF0100119714FF00001CC +S3150800048059714FF040009871D87119725A729A7260 +S315080004904FF00802A3F8442098E140F24403C2F260 +S315080004A000031B78012B40F0AB81A2F1C902352A63 +S315080004B000F28881DFE812F0EC00860186018101EE +S315080004C08601860173010D015901430186018601E2 +S315080004D086018601860186018601860186018601D6 +S315080004E086018601860186018601860186018601C6 +S315080004F086018601860186018601860186018601B6 +S3150800050086018601860186018601860182005400DD +S3150800051036007400860186018601A8008601C2009D +S31508000520C700DB0042783F2A04D94FF02200FFF7C4 +S315080005305FFF4BE140F24405C2F2000505F10400F5 +S31508000540A96C00F0AFF94FF0FF03EB706278AB6C63 +S31508000550D318AB64637803F10103A5F8443035E199 +S3150800056043783F2B04D94FF02200FFF741FF2DE1D6 +S31508000570416840F24405C2F20005A96405F1040089 +S31508000580627800F08FF94FF0FF03EB706278AB6C7E +S31508000590D318AB64637803F10103A5F8443015E179 +S315080005A040F24403C2F200034FF0FF02DA704268D9 +S315080005B09A644FF00102A3F8442007E140F244058B +S315080005C0C2F200054FF0FF03EB70A96C43684FF0C9 +S315080005D000023BB14FF0000211F8010B1218D2B21B +S315080005E0013BF9D1C5F8072040F24403C2F20003E3 +S315080005F04FF001021A714FF000025A719A714FF0CA +S315080006000802A3F84420E1E040F24403C2F20003E2 +S315080006104FF0FF02DA7041F20C12C0F600029A643B +S315080006204FF000021A715A719A714FF00702C3F817 +S3150800063007204FF00802A3F84420C7E04FF0000057 +S31508000640FFF7D6FEC2E040F24403C2F200034FF0C1 +S31508000650FF02DA704FF000021A71597859719A71CF +S31508000660DA711A724FF00602A3F84420AEE040F29F +S315080006704404C2F200044FF000032370FFF7B0FEF3 +S315080006804FF0FF03E3704FF00103A4F844309DE0F8 +S3150800069040F24403C2F20003986C4FF03F0104F1A4 +S315080006A0010200F0F1F920B94FF03100FFF7A0FE82 +S315080006B08CE040F24403C2F200034FF0FF02DA7006 +S315080006C09A6C02F13F029A644FF00102A3F84420A3 +S315080006D07CE043783E2B04D94FF02200FFF788FED2 +S315080006E074E040F24403C2F200034FF0FF02DA70EE +S315080006F04FF00102A3F84420417841B900F0D0F93F +S31508000700002863D14FF03100FFF772FE5EE040F239 +S315080007104403C2F20003986C04F1020200F0B4F933 +S3150800072020B94FF03100FFF763FE4FE040F2440373 +S31508000730C2F2000361789A6C8A189A6446E040F21D +S315080007404403C2F200034FF0FF02DA704FF00002D2 +S315080007501A715A714FF040019971DA711A725A7208 +S315080007604FF00702A3F8442030E040F24403C2F2F7 +S315080007700003986C616800F08BF920B94FF03100DE +S31508000780FFF736FE22E040F24403C2F200034FF0C0 +S31508000790FF02DA704FF00102A3F8442016E000F0D9 +S315080007A093F840F24403C2F200034FF0FF02DA70F6 +S315080007B04FF00102A3F8442008E04FF03100FFF79C +S315080007C017FE03E04FF02000FFF712FE40F2440345 +S315080007D0C2F2000393F84330012B03D14FF0100007 +S315080007E0FFF706FE40F24403C2F200034FF001028F +S315080007F083F8432003F10300B3F84410FFF7DCFD48 +S3150800080038BD00BF08B5FFF7E7FD012815D040F24F +S315080008109003C2F200031B78012B0ED100F080F979 +S3150800082031280AD940F29003C2F200034FF00002C1 +S315080008301A7000F03FF900F021F808BD08B540F23B +S315080008409003C2F200034FF001021A7000F052F949 +S31508000850FFF7D8FF08BD00BF704700BF704700BF4D +S3150800086008B540F29403C2F20003186040F29803F8 +S31508000870C2F200031960FFF7F1FFFCE708B500F0C4 +S315080008800BF970B1FFF796FD4EF60853CEF200034A +S315080008904FF400521A6042F20403C0F600031B68C4 +S315080008A0984708BD70B50D4614465AB1064615F860 +S315080008B0013B06F8013BFFF7D1FF04F1FF34A4B270 +S315080008C0002CF4D170BD00BF08B500F0EDFB08BDE3 +S315080008D04FF48843C4F200031B8813F0200F1FBF90 +S315080008E04FF48843C4F200039B88037014BF0120A9 +S315080008F00020704710B54FF48843C4F200031B88E4 +S3150800090013F0800F15D04FF48843C4F20003988083 +S315080009101B8813F0800F0FD14FF48844C4F20004EB +S31508000920FFF79CFF238813F0800FF9D04FF00100E2 +S3150800093010BD4FF0000010BD4FF0010010BD00BF04 +S315080009404FF48843C4F200034FF000021A819A81DB +S315080009501A829A821A8340F271221A819A8992B26D +S3150800096042F4005242F00C029A8170472DE9F04198 +S3150800097005460C46402907D941F21410C0F6000076 +S315080009804FF08801FFF76CFF2046FFF7B3FF0128F9 +S3150800099007D041F21410C0F600004FF08B01FFF7A4 +S315080009A05FFF2646BCB14FF0000441F21417C0F6AB +S315080009B000074FF09308FFF751FF285DFFF79AFFEE +S315080009C0012803D038464146FFF74AFF04F10104DF +S315080009D0A3B2B342EFD3BDE8F08100BF38B50546F0 +S315080009E040F2E103C2F200031B78B3B940F29C005F +S315080009F0C2F20000FFF76CFF012836D140F2E1038E +S31508000A00C2F200034FF001021A7040F2E003C2F28C +S31508000A1000034FF00000187038BD40F2E003C2F240 +S31508000A2000031C7815482018FFF752FF01281FD12C +S31508000A3004F10104E2B240F2E003C2F200031A70C4 +S31508000A4040F29C03C2F200031B78934213D1284656 +S31508000A500A49FFF727FF40F2E103C2F200034FF00D +S31508000A6000021A704FF0010038BD4FF0000038BD83 +S31508000A704FF0000038BD4FF0000038BD9D00002043 +S31508000A8008B500F0A9F908BD08B500F0B3F908BD26 +S31508000A9008B500F0DBF908BD08B500F09FFA08BDF7 +S31508000AA008B500F06DFA10B100F0CCFA08BD4FF0A9 +S31508000AB0000008BD4EF21003CEF200034FF000020C +S31508000AC01A6070474EF21003CEF200031B6813F447 +S31508000AD0803F1FBF40F2E203C2F200031A880132C8 +S31508000AE018BF1A80704700BF40F2E203C2F2000343 +S31508000AF01880704708B5FFF7DDFF4EF21003CEF2F7 +S31508000B00000341F63F12C0F201025A604FF000009E +S31508000B1098604FF005021A60FFF7E6FF08BD00BFB0 +S31508000B2008B5FFF7CFFF40F2E203C2F200031888C8 +S31508000B3008BD00BF4FF40053C4F2020340F223126B +S31508000B40C4F267525A6048F6AB12CCF6EF525A60B6 +S31508000B504FF03402DA6070474FF40053C4F20203D0 +S31508000B601A6942F080021A61704700BFF8B5074655 +S31508000B704FF00004254641F23816C0F60006FFF786 +S31508000B806DFE3359BB420ED8311949685B189F422E +S31508000B9009D241F23813C0F6000305EB450203EB10 +S31508000BA08203187AF8BD05F1010504F10C04B42C8A +S31508000BB0E5D14FF0FF00F8BD2DE9F84380460068FF +S31508000BC0FFF7D4FFFF2808BF002453D0FFF7B2FF72 +S31508000BD04FF40053C4F20203DB6813F0010F04D08C +S31508000BE0FFF7BAFF4FF0000444E04FF40053C4F295 +S31508000BF002031A6942F001021A614FF0000508F172 +S31508000C0004094FF40054C4F20204D8F80030EF186F +S31508000C1059F80560B2B2EA52E36813F0010F05D03D +S31508000C20FFF71CFEE36813F0010FF9D14FEA1643EC +S31508000C307B80E36813F0010F05D0FFF70FFEE3682A +S31508000C4013F0010FF9D13B68B34207D105F104054A +S31508000C50B5F5007FD9D14FF0010401E04FF000044B +S31508000C604FF40053C4F202031A6922F001021A6112 +S31508000C70FFF772FF2046BDE8F88300BF70B5064649 +S31508000C8041F23815C0F600054FF00004FFF7E6FDFF +S31508000C902B7AB34208D141F23813C0F6000304EBAD +S31508000CA0440253F8220070BD04F1010405F10C0555 +S31508000CB00F2CEBD14FF0FF3070BD00BF08B54FEADF +S31508000CC0C1534FEAD3535BB903688B420BD040F844 +S31508000CD0041B4FF40072FFF7E5FD4FF0010008BD55 +S31508000CE04FF0000008BD4FF0010008BD38B50446B6 +S31508000CF00D4640F2E403C2F20003984209D04FF4CD +S31508000D000053C0F60003994208D0FFF755FF88B193 +S31508000D1008E040F2E824C2F2000403E040F2E404EA +S31508000D20C2F2000420462946FFF7C8FF002808BF7C +S31508000D30002401E04FF00004204638BD2DE9F843B1 +S31508000D4005460C4617461E464FEA51294FEA4929D9 +S31508000D500368B3F1FF3F03D14946FFF7AFFF50B32E +S31508000D602B684B4505D028464946FFF7BFFF054681 +S31508000D7028B32B68E41A2C1904F1040440F2FF186E +S31508000D8009F50079FFF76AFD05F10403E31A4345FF +S31508000D9007D928464946FFF7A9FF054698B100F145 +S31508000DA0040417F8013B237006F1FF36B6B276B194 +S31508000DB004F10104E6E74FF00000BDE8F8834FF0C0 +S31508000DC00000BDE8F8834FF00000BDE8F8834FF057 +S31508000DD00100BDE8F88300BF40F2E823C2F2000331 +S31508000DE04FF0FF321A6040F2E403C2F200031A60C1 +S31508000DF0704700BF70B504460D461646FFF7B6FEA7 +S31508000E00FF281DD004F1FF304019FFF7AFFEFF2879 +S31508000E1019D04FEA54224FF40053C0F60003B3EB3F +S31508000E20422F07BF40F2E400C2F2000040F2E82079 +S31508000E30C2F2000021463246ABB2FFF77FFF70BD13 +S31508000E404FF0000070BD4FF0000070BD2DE9F04175 +S31508000E5005460E46FFF78AFE044605F1FF3080195F +S31508000E60FFF784FE0546FF2814BF00230123FF2C45 +S31508000E7008BF43F00103002B7ED1844270D8002CB2 +S31508000E8072D00F2874D8FFF755FE4FF40053C4F2FA +S31508000E900203DB6813F0010F05D0FFF75DFE4FF084 +S31508000EA00000BDE8F0814FF40053C4F202031A694A +S31508000EB042F002021A612046FFF7E0FE074628467E +S31508000EC0FFF7DCFE804641F23816C0F600064FF002 +S31508000ED00004FFF7C3FC337AAB4209D141F2381359 +S31508000EE0C0F6000304EB440203EB82035E6807E0E6 +S31508000EF004F1010406F10C060F2CEAD14FF00006A6 +S31508000F00C7EB08084644C6F38F26DEB14FF0000546 +S31508000F104FF40054C4F202046761236943F04003A6 +S31508000F202361E36813F0010F05D0FFF797FCE36828 +S31508000F3013F0010FF9D105F10105ADB207F5806788 +S31508000F40AE42E9D84FF40053C4F202031A6922F0FC +S31508000F5002021A61FFF700FE4FF00100BDE8F081BA +S31508000F604FF00000BDE8F0814FF00000BDE8F081C9 +S31508000F704FF00000BDE8F0814FF00000BDE8F081B9 +S31508000F8000B583B040F2E403C2F200031B68B3F174 +S31508000F90FF3F08BF01201FD040F2E402C2F2000260 +S31508000FA002F104039068D168411852688918DA6812 +S31508000FB089181A6989185A6989189A698B18C3F1A0 +S31508000FC0000302AA42F8043D42F25010C0F600009F +S31508000FD04FF00401FFF70EFF03B000BD42F2040212 +S31508000FE0C0F600024FF40053C0F6000310681B68F1 +S31508000FF0C01842F20803C0F600031B68C01842F284 +S315080010000C03C0F600031B68C01842F21003C0F6B2 +S3150800101000031B68C01842F21403C0F600031B68DD +S31508001020C01842F21803C0F600031B68C01842F243 +S315080010305013C0F600031B68C018D0F1010038BF72 +S315080010400020704708B540F2E403C2F200031B68AB +S31508001050B3F1FF3F06D040F2E400C2F20000FFF70A +S31508001060ABFD88B140F2E823C2F200031B68B3F176 +S31508001070FF3F0CD040F2E820C2F20000FFF79CFDCB +S31508001080003818BF012008BD4FF0000008BD4FF01A +S31508001090010008BD08B541F2EC10C0F600004FF09B +S315080010A03601FFF7DDFB08BD08B572B640F200024F +S315080010B0C2F2000240F20003C2F200039A4211D2C1 +S315080010C041F21822C0F6000240F20003C2F2000301 +S315080010D040F20000C2F2000052F8041B43F8041B59 +S315080010E08342F9D3054806494FF000028842B8BF43 +S315080010F040F8042BFADBFFF767F808BD000000206C +S31508001100EC0400206D61696E2E6300004F70656EF9 +S31508001110424C54002E2E2F2E2E2F2E2E2F536F7507 +S315080011207263652F41524D434D335F53544D3332ED +S315080011302F756172742E63000020000800200000DD +S315080011400100000000400008002000000200000026 +S31508001150006000080020000003000000008000086E +S31508001160002000000400000000A000080020000085 +S315080011700500000000C0000800200000060000006E +S3150800118000E0000800200000070000000000010839 +S3150800119000200000080000000020010800200000D0 +S315080011A00900000000400108002000000A000000B5 +S315080011B000600108002000000B0000000080010804 +S315080011C0002000000C00000000A00108002000001C +S315080011D00D00000000C00108002000000E000000FD +S315080011E000E00108002000000F0000002E2E2F2E20 +S315080011F02E2F2E2E2F536F757263652F41524D4336 +S315080012004D335F53544D33322F4743432F7665632F +S30D08001210746F72732E6300006F S70508000000F2 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/makefile b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/makefile index b7977d1d..bc627bea 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/makefile +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Boot/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -114,7 +114,7 @@ CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) CFLAGS += -ffunction-sections -fdata-sections $(INC_PATH) -D STM32F10X_MD -D GCC_ARMCM3 CFLAGS += -Wa,-adhlns="$(OBJ_PATH)/$(subst .o,.lst,$@)" LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O srec ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.elf b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.elf index 45b6e773..c9367e95 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.elf and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.elf differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.map b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.map index b1dc3872..bab9c2be 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.map +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.map @@ -7,47 +7,47 @@ start address 0x08002000 Program Header: LOAD off 0x00000000 vaddr 0x08000000 paddr 0x08000000 align 2**15 - filesz 0x00007778 memsz 0x00007778 flags r-x - LOAD off 0x00008000 vaddr 0x20000000 paddr 0x08007778 align 2**15 - filesz 0x00000028 memsz 0x00000180 flags rw- + filesz 0x00002954 memsz 0x00002954 flags r-x + LOAD off 0x00008000 vaddr 0x20000000 paddr 0x08002954 align 2**15 + filesz 0x00000014 memsz 0x00000168 flags rw- private flags = 5000002: [Version5 EABI] [has entry point] Sections: Idx Name Size VMA LMA File off Algn - 0 .text 00005778 08002000 08002000 00002000 2**2 + 0 .text 00000954 08002000 08002000 00002000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000028 20000000 08007778 00008000 2**2 + 1 .data 00000014 20000000 08002954 00008000 2**2 CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000158 20000028 080077a0 00008028 2**2 + 2 .bss 00000154 20000014 08002968 00008014 2**2 ALLOC - 3 .debug_abbrev 00002ec0 00000000 00000000 00008028 2**0 + 3 .debug_abbrev 00002ec0 00000000 00000000 00008014 2**0 CONTENTS, READONLY, DEBUGGING - 4 .debug_info 0000cb90 00000000 00000000 0000aee8 2**0 + 4 .debug_info 0000cb90 00000000 00000000 0000aed4 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_line 00005a62 00000000 00000000 00017a78 2**0 + 5 .debug_line 00005a64 00000000 00000000 00017a64 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_loc 000061cc 00000000 00000000 0001d4da 2**0 + 6 .debug_loc 000061cc 00000000 00000000 0001d4c8 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_pubnames 00002da3 00000000 00000000 000236a6 2**0 + 7 .debug_pubnames 00002da3 00000000 00000000 00023694 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_pubtypes 000010d8 00000000 00000000 00026449 2**0 + 8 .debug_pubtypes 000010d8 00000000 00000000 00026437 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_aranges 00001300 00000000 00000000 00027521 2**0 + 9 .debug_aranges 00001300 00000000 00000000 0002750f 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_ranges 00001100 00000000 00000000 00028821 2**0 + 10 .debug_ranges 00001100 00000000 00000000 0002880f 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 0000526b 00000000 00000000 00029921 2**0 + 11 .debug_str 0000526b 00000000 00000000 0002990f 2**0 CONTENTS, READONLY, DEBUGGING - 12 .comment 0000002a 00000000 00000000 0002eb8c 2**0 + 12 .comment 0000002a 00000000 00000000 0002eb7a 2**0 CONTENTS, READONLY - 13 .ARM.attributes 00000031 00000000 00000000 0002ebb6 2**0 + 13 .ARM.attributes 00000031 00000000 00000000 0002eba4 2**0 CONTENTS, READONLY - 14 .debug_frame 0000259c 00000000 00000000 0002ebe8 2**2 + 14 .debug_frame 000025ac 00000000 00000000 0002ebd8 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 08002000 l d .text 00000000 .text 20000000 l d .data 00000000 .data -20000028 l d .bss 00000000 .bss +20000014 l d .bss 00000000 .bss 00000000 l d .debug_abbrev 00000000 .debug_abbrev 00000000 l d .debug_info 00000000 .debug_info 00000000 l d .debug_line 00000000 .debug_line @@ -62,28 +62,31 @@ SYMBOL TABLE: 00000000 l d .debug_frame 00000000 .debug_frame 00000000 l df *ABS* 00000000 vectors.c 00000000 l df *ABS* 00000000 boot.c -08002154 l F .text 00000032 UartReceiveByte -20000028 l O .bss 00000001 xcpCtoRxLength.3648 -20000029 l O .bss 00000001 xcpCtoRxInProgress.3649 -2000002c l O .bss 00000041 xcpCtoReqPacket.3647 +08002154 l F .text 0000003e UartReceiveByte +20000014 l O .bss 00000001 xcpCtoRxLength.3648 +20000015 l O .bss 00000001 xcpCtoRxInProgress.3649 +20000018 l O .bss 00000041 xcpCtoReqPacket.3647 00000000 l df *ABS* 00000000 cstart.c -0800231a l F .text 00000000 zero_loop +08002352 l F .text 00000000 zero_loop 00000000 l df *ABS* 00000000 irq.c -08002338 l F .text 00000004 __enable_irq -20000070 l O .bss 00000001 interruptNesting +08002374 l F .text 00000004 __enable_irq 00000000 l df *ABS* 00000000 led.c -20000074 l O .bss 00000004 timer_counter_last.3640 -20000078 l O .bss 00000001 led_toggle_state.3639 +2000005c l O .bss 00000004 timer_counter_last.3640 +20000060 l O .bss 00000001 led_toggle_state.3639 00000000 l df *ABS* 00000000 main.c 00000000 l df *ABS* 00000000 timer.c -2000007c l O .bss 00000004 millisecond_counter +20000064 l O .bss 00000004 millisecond_counter +00000000 l df *ABS* 00000000 stm32f10x_gpio.c +00000000 l df *ABS* 00000000 stm32f10x_rcc.c +20000000 l O .data 00000004 ADCPrescTable +20000004 l O .data 00000010 APBAHBPrescTable +00000000 l df *ABS* 00000000 stm32f10x_usart.c 00000000 l df *ABS* 00000000 core_cm3.c 00000000 l df *ABS* 00000000 system_stm32f10x.c 00000000 l df *ABS* 00000000 misc.c 00000000 l df *ABS* 00000000 stm32f10x_adc.c 00000000 l df *ABS* 00000000 stm32f10x_bkp.c 00000000 l df *ABS* 00000000 stm32f10x_can.c -08002ebc l F .text 0000000a CheckITStatus 00000000 l df *ABS* 00000000 stm32f10x_cec.c 00000000 l df *ABS* 00000000 stm32f10x_crc.c 00000000 l df *ABS* 00000000 stm32f10x_dac.c @@ -92,538 +95,45 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 stm32f10x_exti.c 00000000 l df *ABS* 00000000 stm32f10x_flash.c 00000000 l df *ABS* 00000000 stm32f10x_fsmc.c -00000000 l df *ABS* 00000000 stm32f10x_gpio.c 00000000 l df *ABS* 00000000 stm32f10x_i2c.c 00000000 l df *ABS* 00000000 stm32f10x_iwdg.c 00000000 l df *ABS* 00000000 stm32f10x_pwr.c -08005424 l F .text 00000004 __WFI -00000000 l df *ABS* 00000000 stm32f10x_rcc.c -20000014 l O .data 00000004 ADCPrescTable -20000018 l O .data 00000010 APBAHBPrescTable 00000000 l df *ABS* 00000000 stm32f10x_rtc.c 00000000 l df *ABS* 00000000 stm32f10x_sdio.c 00000000 l df *ABS* 00000000 stm32f10x_spi.c 00000000 l df *ABS* 00000000 stm32f10x_tim.c -080060dc l F .text 000000b4 TI1_Config -08006190 l F .text 000000b6 TI2_Config -00000000 l df *ABS* 00000000 stm32f10x_usart.c 00000000 l df *ABS* 00000000 stm32f10x_wwdg.c -080054c4 g F .text 00000030 PWR_EnterSTANDBYMode -08006898 g F .text 00000014 TIM_TimeBaseStructInit -08004ab4 g F .text 00000018 FSMC_GetECC -0800389c g F .text 0000001e CEC_Cmd -08002614 g F .text 00000006 __set_PRIMASK -08007540 g F .text 00000012 USART_SetGuardTime -080055c4 g F .text 0000000c RCC_HSICmd -08006abc g F .text 00000018 TIM_ForcedOC2Config -08004038 g F .text 0000001e FLASH_Unlock -080055e8 g F .text 0000000c RCC_PLLCmd -08004e3c g F .text 00000022 GPIO_EventOutputConfig -08006ed4 g F .text 00000004 TIM_SetCompare2 -08003e1c g F .text 0000001a DMA_Cmd -08002df0 g F .text 0000001e BKP_RTCOutputConfig -080022d4 g F .text 00000056 reset_handler -08006b24 g F .text 00000020 TIM_SelectCOM -080040b0 g F .text 0000000c FLASH_GetWriteProtectionOptionByte -08005968 g F .text 0000000c RCC_ClearITPendingBit -08005ccc g F .text 0000000c SDIO_StopSDIOReadWait -08005264 g F .text 00000020 I2C_TransmitPEC -08004264 g F .text 000000c0 FLASH_ReadOutProtection -08004e00 g F .text 0000000c GPIO_ReadOutputDataBit -08004724 g F .text 00000020 FSMC_PCCARDDeInit -08006d44 g F .text 00000026 TIM_CCxCmd -08006fa4 g F .text 0000001e TIM_SetIC4Prescaler -08003e88 g F .text 0000001c DMA_GetITStatus -08006b64 g F .text 00000020 TIM_CCPreloadControl -080051d8 g F .text 00000006 I2C_ReceiveData -08005fb0 g F .text 00000004 SPI_I2S_SendData -08005d40 g F .text 0000000c SDIO_ClearFlag -0800368c g F .text 00000114 CAN_GetITStatus -080037a0 g F .text 000000bc CAN_ClearITPendingBit -080044a4 g F .text 0000007e FLASH_ProgramWord -08003000 g F .text 0000013e CAN_FilterInit -0800599c g F .text 00000014 RTC_EnterConfigMode -08003a04 g F .text 0000000c CRC_GetIDRegister -0800233c g F .text 00000008 IrqInterruptEnable -08005340 g F .text 00000010 I2C_GetLastEvent -08002a74 g F .text 00000016 ADC_DMACmd -08003b40 g F .text 0000002c DAC_WaveGenerationCmd -08004a4c g F .text 0000002e FSMC_PCCARDCmd -08005aac g F .text 00000014 RTC_ClearFlag -08005cfc g F .text 0000000c SDIO_CommandCompletionCmd -08005b78 g F .text 0000001a SDIO_SetPowerState -0800261c g F .text 00000006 __get_FAULTMASK -080039bc g F .text 0000002e CRC_CalcBlockCRC -08006b84 g F .text 00000016 TIM_OC1PreloadConfig -08002ab8 g F .text 0000000a ADC_StartCalibration -0800263c g F .text 00000004 __REV -080058c4 g F .text 0000000c RCC_MCOConfig -080028a4 g F .text 00000084 NVIC_Init -080052c8 g F .text 00000020 I2C_ARPCmd -08005160 g F .text 0000001a I2C_OwnAddress2Config -08002d94 g F .text 0000001c ADC_GetITStatus -08005fb4 g F .text 00000006 SPI_I2S_ReceiveData -08005d6c g F .text 00000074 SPI_I2S_DeInit -08003300 g F .text 00000092 CAN_TransmitStatus -08003adc g F .text 0000003c DAC_SoftwareTriggerCmd -08006054 g F .text 00000006 SPI_GetCRCPolynomial -080069a0 g F .text 00000014 TIM_ETRClockMode2Config -08005664 g F .text 00000024 RCC_ITConfig -08005a40 g F .text 00000018 RTC_GetDivider -08006cb4 g F .text 00000016 TIM_OC1NPolarityConfig -08006aa4 g F .text 00000016 TIM_ForcedOC1Config -080039f8 g F .text 0000000c CRC_SetIDRegister -08004468 g F .text 0000003a FLASH_ProgramHalfWord -08006958 g F .text 00000018 TIM_DMACmd -080069b4 g F .text 0000001e TIM_ETRClockMode1Config -0800605c g F .text 0000001c SPI_BiDirectionalLineConfig -08002678 g F .text 00000006 __STREXW -0800393c g F .text 00000024 CEC_ClearFlag -080059cc g F .text 00000014 RTC_GetCounter -08006f88 g F .text 0000001c TIM_SetIC3Prescaler -08007568 g F .text 00000020 USART_SmartCardCmd -08007644 g F .text 0000000c USART_GetFlagStatus -08006c70 g F .text 00000016 TIM_ClearOC3Ref -08002660 g F .text 00000006 __LDREXW -08007778 g .text 00000000 _etext -08005ba4 g F .text 00000024 SDIO_ITConfig -08002d80 g F .text 0000000c ADC_GetFlagStatus -080055f4 g F .text 00000016 RCC_SYSCLKConfig -08002bcc g F .text 00000016 ADC_ExternalTrigConvCmd -0800347c g F .text 00000016 CAN_FIFORelease -08003dc0 g F .text 00000040 DMA_Init -08004614 g F .text 00000040 FLASH_ErasePage -08003eb8 g F .text 00000020 EXTI_DeInit -08005904 g F .text 0000003a RCC_WaitForHSEStartUp -08007488 g F .text 0000001c USART_SetAddress -08003e50 g F .text 00000006 DMA_GetCurrDataCounter -08004e60 g F .text 0000000c GPIO_EventOutputCmd -08005ce4 g F .text 0000000c SDIO_SetSDIOOperation -08007554 g F .text 00000014 USART_SetPrescaler -08004000 g F .text 0000001a FLASH_HalfCycleAccessCmd -080025c4 g F .text 00000012 TimerISRHandler -08002c10 g F .text 00000016 ADC_InjectedDiscModeCmd -080058ac g F .text 0000000c RCC_BackupResetCmd -080075e8 g F .text 00000020 USART_OneBitMethodCmd -080049e4 g F .text 0000002e FSMC_NORSRAMCmd -080039ac g F .text 0000000e CRC_CalcCRC -080053e4 g F .text 0000000c IWDG_SetReload -0800690c g F .text 00000028 TIM_CtrlPWMOutputs -080051bc g F .text 00000018 I2C_ITConfig -08002928 g F .text 00000016 NVIC_SetVectorTable -08002a5c g F .text 00000016 ADC_Cmd -08004100 g F .text 00000028 FLASH_GetFlagStatus -08003bf4 g F .text 00000010 DBGMCU_GetREVID -08002e30 g F .text 00000020 BKP_WriteBackupRegister -08002d48 g F .text 0000000e ADC_AnalogWatchdogSingleChannelConfig -08004e6c g F .text 0000007a GPIO_PinRemapConfig -08002aec g F .text 00000012 ADC_DiscModeChannelCountConfig -080035b8 g F .text 00000008 CAN_GetLSBTransmitErrorCounter -080038ec g F .text 0000000e CEC_ReceiveDataByte -080040cc g F .text 00000010 FLASH_GetPrefetchBufferStatus -08007768 g F .text 00000010 WWDG_ClearFlag -080058b8 g F .text 0000000c RCC_ClockSecuritySystemCmd -08003168 g F .text 0000003e CAN_SlaveStartBank -08005940 g F .text 00000012 RCC_ClearFlag -080068ec g F .text 00000020 TIM_Cmd -08006bcc g F .text 00000018 TIM_OC4PreloadConfig -20000010 g O .data 00000004 SystemCoreClock -080046c4 g F .text 0000003a FSMC_NORSRAMDeInit -08002db0 g F .text 00000008 ADC_ClearITPendingBit -080045d8 g F .text 0000003c FLASH_EraseAllPages -08005d2c g F .text 00000014 SDIO_GetFlagStatus -08003394 g F .text 0000002a CAN_CancelTransmit -08002648 g F .text 00000006 __RBIT -08007528 g F .text 0000000c USART_ReceiveData -08005560 g F .text 0000004a RCC_HSEConfig -080031c0 g F .text 0000005e CAN_TTComModeCmd -080071dc g F .text 0000000a TIM_ClearFlag -08004b84 g F .text 00000036 FSMC_GetITStatus -080038c8 g F .text 0000000c CEC_OwnAddressConfig -08006024 g F .text 00000020 SPI_CalculateCRC -08007200 g F .text 0000000a TIM_ClearITPendingBit -08002624 g F .text 00000006 __set_FAULTMASK -08003e4c g F .text 00000004 DMA_SetCurrDataCounter -080071c0 g F .text 00000006 TIM_GetCounter -08006084 g F .text 0000000a SPI_I2S_ClearFlag -0800581c g F .text 00000024 RCC_APB2PeriphClockCmd -08005c14 g F .text 0000000e SDIO_GetCommandResponse -080050c0 g F .text 00000020 I2C_DMACmd -080071b0 g F .text 00000006 TIM_GetCapture3 -08005284 g F .text 0000001c I2C_PECPositionConfig -08004d14 g F .text 000000c4 GPIO_Init -080055d0 g F .text 00000018 RCC_PLLConfig -08005694 g F .text 00000016 RCC_ADCCLKConfig -080035b0 g F .text 00000008 CAN_GetReceiveErrorCounter -08002aa4 g F .text 0000000a ADC_ResetCalibration -08007414 g F .text 00000020 USART_Cmd -08002d2c g F .text 00000012 ADC_AnalogWatchdogCmd -08004cf8 g F .text 0000001a GPIO_AFIODeInit -08002e84 g F .text 00000014 BKP_ClearFlag -080071a0 g F .text 00000006 TIM_GetCapture1 -08003960 g F .text 00000018 CEC_GetITStatus -08007624 g F .text 00000020 USART_IrDACmd -08002964 g F .text 0000001a SysTick_CLKSourceConfig -08004e28 g F .text 00000004 GPIO_Write -080040a0 g F .text 00000010 FLASH_GetUserOptionByte -08004e0c g F .text 00000006 GPIO_ReadOutputData -0800673c g F .text 000000aa TIM_OC3Init -080056ac g F .text 0000003a RCC_LSEConfig -080052a0 g F .text 00000020 I2C_CalculatePEC -080076b0 g F .text 00000016 USART_ClearITPendingBit -08005708 g F .text 0000000c RCC_RTCCLKCmd -08002c70 g F .text 0000006e ADC_InjectedChannelConfig -08003ea4 g F .text 00000014 DMA_ClearITPendingBit -08006248 g F .text 00000280 TIM_DeInit -08005840 g F .text 00000024 RCC_APB1PeriphClockCmd -080041f0 g F .text 00000074 FLASH_UserOptionByteConfig -080035d4 g F .text 0000007c CAN_GetFlagStatus -08005954 g F .text 00000014 RCC_GetITStatus -08005474 g F .text 0000000c PWR_WakeUpPinCmd -080049a4 g F .text 00000040 FSMC_PCCARDStructInit -0800262c g F .text 00000006 __get_CONTROL -08006090 g F .text 00000032 SPI_I2S_GetITStatus -080071d0 g F .text 0000000c TIM_GetFlagStatus -08006078 g F .text 0000000c SPI_I2S_GetFlagStatus -080057f8 g F .text 00000024 RCC_AHBPeriphClockCmd -08002b18 g F .text 000000b4 ADC_RegularChannelConfig -08006c14 g F .text 00000016 TIM_OC3FastConfig -080051d4 g F .text 00000004 I2C_SendData -08004688 g F .text 0000003c FLASH_EraseAllBank1Pages -08002be4 g F .text 00000006 ADC_GetConversionValue -08002ec8 g F .text 00000042 CAN_DeInit -08006b44 g F .text 00000020 TIM_SelectCCDMA -0800390c g F .text 0000000c CEC_EndOfMessageCmd -080040dc g F .text 00000024 FLASH_ITConfig -080075c8 g F .text 00000020 USART_OverSampling8Cmd -08003b18 g F .text 00000026 DAC_DualSoftwareTriggerCmd -08003e00 g F .text 0000001c DMA_StructInit -08007184 g F .text 0000001c TIM_SetClockDivision -08005f50 g F .text 00000020 I2S_Cmd -08005a00 g F .text 00000020 RTC_SetPrescaler -08004968 g F .text 0000003c FSMC_NANDStructInit -08005fdc g F .text 00000020 SPI_SSOutputCmd -08005ffc g F .text 0000001c SPI_DataSizeConfig -08004078 g F .text 00000012 FLASH_Lock -080053f0 g F .text 00000010 IWDG_ReloadCounter -08004f7c g F .text 00000104 I2C_Init -08003e58 g F .text 0000001c DMA_GetFlagStatus -08002d40 g F .text 00000006 ADC_AnalogWatchdogThresholdsConfig -08003fdc g F .text 0000000c EXTI_ClearITPendingBit -08002dd8 g F .text 0000000c BKP_TamperPinCmd -08005444 g F .text 0000000c PWR_BackupAccessCmd -080025dc g F .text 00000008 __get_PSP -08002ac4 g F .text 00000008 ADC_GetCalibrationStatus -20000080 g .bss 00000000 _ebss -0800355c g F .text 0000001c CAN_Sleep -0800765c g F .text 00000054 USART_GetITStatus -08005c88 g F .text 0000000c SDIO_GetDataCounter -080025e4 g F .text 00000006 __set_PSP -08004524 g F .text 000000b4 FLASH_EraseOptionBytes -08005a20 g F .text 00000020 RTC_SetAlarm -080065b8 g F .text 000000d2 TIM_OC1Init -08002acc g F .text 00000016 ADC_SoftwareStartConvCmd -08006bb4 g F .text 00000016 TIM_OC3PreloadConfig -08002ab0 g F .text 00000008 ADC_GetResetCalibrationStatus -08005cb4 g F .text 0000000c SDIO_GetFIFOCount -08004df8 g F .text 00000006 GPIO_ReadInputData -08006ecc g F .text 00000004 TIM_SetAutoreload -080074e0 g F .text 0000001c USART_LINBreakDetectLengthConfig -08005a6c g F .text 0000002a RTC_WaitForSynchro +0800230c g F .text 0000005c reset_handler +08002378 g F .text 0000000e IrqInterruptEnable +08002948 g F .text 0000000c USART_GetFlagStatus +08002954 g .text 00000000 _etext +08002614 g F .text 00000012 TimerISRHandler +0800293c g F .text 0000000c USART_ReceiveData +080027dc g F .text 00000024 RCC_APB2PeriphClockCmd +0800262c g F .text 000000c4 GPIO_Init +0800291c g F .text 00000020 USART_Cmd +08002800 g F .text 00000024 RCC_APB1PeriphClockCmd +20000068 g .bss 00000000 _ebss 00000100 g *ABS* 00000000 __STACKSIZE__ -080058d0 g F .text 00000032 RCC_GetFlagStatus -080025d8 g F .text 00000002 UnusedISR -08005b6c g F .text 0000000c SDIO_ClockCmd -08002db8 g F .text 00000014 BKP_DeInit -08002380 g F .text 0000003a LedInit -08004654 g F .text 00000032 FLASH_WaitForLastBank1Operation -08005cf0 g F .text 0000000c SDIO_SendSDIOSuspendCmd -080034ac g F .text 000000ae CAN_OperatingModeRequest -08005cc0 g F .text 0000000c SDIO_StartSDIOReadWait -08005c40 g F .text 00000030 SDIO_DataConfig -08004e14 g F .text 00000004 GPIO_SetBits -08003f9c g F .text 00000014 EXTI_GetFlagStatus -08002c28 g F .text 0000000e ADC_ExternalTrigInjectedConvConfig -0800560c g F .text 00000010 RCC_GetSYSCLKSource -08006b04 g F .text 00000020 TIM_ARRPreloadConfig -08004e1c g F .text 0000000a GPIO_WriteBit -08002e98 g F .text 0000000e BKP_GetITStatus -08002bf8 g F .text 00000016 ADC_AutoInjectedConvCmd -080059e0 g F .text 00000020 RTC_SetCounter -08002c50 g F .text 00000016 ADC_SoftwareStartInjectedConvCmd -08005d4c g F .text 00000014 SDIO_GetITStatus -08005100 g F .text 00000020 I2C_GenerateSTART -08005080 g F .text 0000001e I2C_StructInit -08002ea8 g F .text 00000014 BKP_ClearITPendingBit -08007738 g F .text 00000010 WWDG_SetCounter -08002650 g F .text 00000008 __LDREXB -08004f2c g F .text 0000000c GPIO_ETH_MediaInterfaceConfig -080071e8 g F .text 00000018 TIM_GetITStatus -08005714 g F .text 000000e4 RCC_GetClocksFreq -0800401c g F .text 0000001a FLASH_PrefetchBufferCmd -08006d94 g F .text 00000062 TIM_SelectOCxM -0800522c g F .text 0000001c I2C_NACKPositionConfig -08002364 g F .text 0000001c IrqInterruptRestore -08003f88 g F .text 00000012 EXTI_GenerateSWInterrupt -080072cc g F .text 000000f0 USART_Init -08004a14 g F .text 00000036 FSMC_NANDCmd -08004b28 g F .text 0000002a FSMC_GetFlagStatus -08004acc g F .text 0000005a FSMC_ITConfig -080033c0 g F .text 000000ba CAN_Receive -08003650 g F .text 0000003c CAN_ClearFlag -08002f0c g F .text 000000f4 CAN_Init -20000028 g .bss 00000000 _bss -0800260c g F .text 00000006 __get_PRIMASK -08006be4 g F .text 00000016 TIM_OC1FastConfig -080038fc g F .text 00000010 CEC_StartOfMessage -080053cc g F .text 0000000c IWDG_WriteAccessCmd -08004134 g F .text 00000044 FLASH_GetStatus -08003140 g F .text 00000028 CAN_StructInit -20000000 g O .data 00000010 AHBPrescTable -080075a8 g F .text 00000020 USART_HalfDuplexCmd -08003fb0 g F .text 0000000c EXTI_ClearFlag -08003c18 g F .text 00000024 DBGMCU_Config -08005350 g F .text 00000040 I2C_GetFlagStatus -08004128 g F .text 0000000c FLASH_ClearFlag -080050e0 g F .text 00000020 I2C_DMALastTransferCmd -080041bc g F .text 00000032 FLASH_WaitForLastOperation -08006b9c g F .text 00000018 TIM_OC2PreloadConfig -080056f4 g F .text 00000012 RCC_RTCCLKConfig -080069f4 g F .text 00000016 TIM_SelectInputTrigger -08005cd8 g F .text 0000000c SDIO_SetSDIOReadWaitMode -08006934 g F .text 00000018 TIM_ITConfig -08005248 g F .text 0000001c I2C_SMBusAlertConfig -0800668c g F .text 000000ae TIM_OC2Init -08005400 g F .text 00000010 IWDG_Enable -08007434 g F .text 0000003a USART_ITConfig -08003bb4 g F .text 00000018 DAC_SetDualChannelData -08003ed8 g F .text 0000009c EXTI_Init -08002644 g F .text 00000004 __REVSH -080039ec g F .text 0000000c CRC_GetCRC -08003a10 g F .text 0000001c DAC_DeInit -08003b6c g F .text 00000024 DAC_SetChannel1Data -08004bbc g F .text 0000002e FSMC_ClearITPendingBit -080069d4 g F .text 00000006 TIM_PrescalerConfig -08005fbc g F .text 0000001e SPI_NSSInternalSoftwareConfig -08004f38 g F .text 00000042 I2C_DeInit -08005d08 g F .text 00000016 SDIO_CEATAITCmd -080050a0 g F .text 00000020 I2C_Cmd -08005ac0 g F .text 00000028 RTC_GetITStatus -08004e18 g F .text 00000004 GPIO_ResetBits -08006d2c g F .text 00000018 TIM_OC4PolarityConfig -08006e74 g F .text 0000001c TIM_SelectOutputTrigger -08005390 g F .text 0000000a I2C_ClearFlag -08005d20 g F .text 0000000c SDIO_SendCEATACmd -08006018 g F .text 0000000c SPI_TransmitCRC -0800440c g F .text 0000005a FLASH_ProgramOptionByteData -080076e4 g F .text 00000016 WWDG_SetPrescaler -08007608 g F .text 0000001c USART_IrDAConfig -08006ed8 g F .text 00000004 TIM_SetCompare3 -080035c0 g F .text 00000014 CAN_ITConfig -080067e8 g F .text 0000008c TIM_OC4Init -08005b58 g F .text 00000012 SDIO_StructInit -08005bd4 g F .text 00000030 SDIO_SendCommand -08002ae4 g F .text 00000008 ADC_GetSoftwareStartConvStatus -08004744 g F .text 000000da FSMC_NORSRAMInit -08006e38 g F .text 00000020 TIM_SelectHallSensor -08007728 g F .text 00000010 WWDG_EnableIT -08003578 g F .text 0000002e CAN_WakeUp -08002bec g F .text 0000000c ADC_GetDualModeConversionValue -08004ee8 g F .text 00000042 GPIO_EXTILineConfig -08003b90 g F .text 00000024 DAC_SetChannel2Data -080051e0 g F .text 00000010 I2C_Send7bitAddress -08005d60 g F .text 0000000c SDIO_ClearITPendingBit -08006ee4 g F .text 0000001c TIM_SetIC1Prescaler -0800720c g F .text 000000c0 USART_DeInit -08005f18 g F .text 00000016 I2S_StructInit -080076fc g F .text 0000002c WWDG_SetWindowValue -08005c94 g F .text 0000000e SDIO_ReadData -08005308 g F .text 0000001c I2C_FastModeDutyCycleConfig -08003fbc g F .text 00000020 EXTI_GetITStatus -08006aec g F .text 00000018 TIM_ForcedOC4Config -08005480 g F .text 00000044 PWR_EnterSTOPMode -08005bc8 g F .text 0000000c SDIO_DMACmd -08003fe8 g F .text 00000016 FLASH_SetLatency -080055ac g F .text 00000016 RCC_AdjustHSICalibrationValue -0800242c g F .text 00000136 main -080060c4 g F .text 00000016 SPI_I2S_ClearITPendingBit -08005c04 g F .text 00000010 SDIO_CmdStructInit -080073d8 g F .text 0000002c USART_ClockInit -08006a40 g F .text 00000014 TIM_ITRxExternalClockConfig -08006cfc g F .text 00000018 TIM_OC3PolarityConfig -08004820 g F .text 00000068 FSMC_NANDInit -08007758 g F .text 0000000e WWDG_GetFlagStatus -08007534 g F .text 0000000c USART_SendBreak -08005f98 g F .text 00000018 SPI_I2S_DMACmd -08002634 g F .text 00000006 __set_CONTROL -08006970 g F .text 00000012 TIM_InternalClockConfig -08006c9c g F .text 00000016 TIM_OC1PolarityConfig -08006bfc g F .text 00000018 TIM_OC2FastConfig -08005634 g F .text 00000016 RCC_PCLK1Config -080038e0 g F .text 0000000c CEC_SendDataByte -08003f74 g F .text 00000012 EXTI_StructInit -08005c24 g F .text 0000001c SDIO_GetResponse -08005410 g F .text 00000014 IWDG_GetFlagStatus -08006ec8 g F .text 00000004 TIM_SetCounter -08005688 g F .text 0000000c RCC_USBCLKConfig -08003494 g F .text 00000018 CAN_MessagePending -08002574 g F .text 0000000c TimerSet -0800564c g F .text 00000016 RCC_PCLK2Config -08003918 g F .text 00000022 CEC_GetFlagStatus -08006edc g F .text 00000006 TIM_SetCompare4 -0800519c g F .text 00000020 I2C_GeneralCallCmd -080071a8 g F .text 00000006 TIM_GetCapture2 -08005f30 g F .text 00000020 SPI_Cmd -080025ec g F .text 00000008 __get_MSP -08007650 g F .text 0000000a USART_ClearFlag -080071c8 g F .text 00000006 TIM_GetPrescaler -08002188 g F .text 0000009a BootComInit -08006c5c g F .text 00000014 TIM_ClearOC2Ref -0800520c g F .text 00000020 I2C_SoftwareResetCmd -08002680 g F .text 00000130 SystemInit -08004a7c g F .text 00000036 FSMC_NANDECCCmd -08006fc4 g F .text 000001c0 TIM_ICInit -08004bec g F .text 0000010c GPIO_DeInit -08003a64 g F .text 0000000e DAC_StructInit -08002ce0 g F .text 00000012 ADC_InjectedSequencerLengthConfig -0800551c g F .text 00000044 RCC_DeInit -08005428 g F .text 0000001c PWR_DeInit -080068c4 g F .text 00000014 TIM_ICStructInit -08006f20 g F .text 00000066 TIM_PWMIConfig -08005c70 g F .text 00000016 SDIO_DataStructInit -0800408c g F .text 00000012 FLASH_LockBank1 -08003978 g F .text 00000024 CEC_ClearITPendingBit -08003c04 g F .text 00000014 DBGMCU_GetDEVID -08002a44 g F .text 00000016 ADC_StructInit -08002640 g F .text 00000004 __REV16 -08002a8c g F .text 00000016 ADC_ITConfig -08002564 g F .text 00000010 TimerDeinit -08006ce4 g F .text 00000018 TIM_OC2NPolarityConfig -08002940 g F .text 00000024 NVIC_SystemLPConfig -08006c44 g F .text 00000016 TIM_ClearOC1Ref -08004888 g F .text 00000070 FSMC_PCCARDInit -08002e50 g F .text 00000022 BKP_ReadBackupRegister -08005888 g F .text 00000024 RCC_APB1PeriphResetCmd -08002d8c g F .text 00000008 ADC_ClearFlag +08002628 g F .text 00000002 UnusedISR +08002388 g F .text 00000046 LedInit +080026f0 g F .text 00000004 GPIO_SetBits +080026f8 g F .text 000000e4 RCC_GetClocksFreq +08002824 g F .text 000000f6 USART_Init +20000014 g .bss 00000000 _bss +080026f4 g F .text 00000004 GPIO_ResetBits +08002454 g F .text 0000015a main +080025c0 g F .text 0000000c TimerSet +08002194 g F .text 000000b6 BootComInit +080025b0 g F .text 00000010 TimerDeinit 20000000 g .data 00000000 _data -080025f4 g F .text 00000006 __set_MSP -080023bc g F .text 00000070 LedToggle -08003e38 g F .text 00000014 DMA_ITConfig -08002e10 g F .text 0000001e BKP_SetRTCCalibrationValue -08004700 g F .text 00000022 FSMC_NANDDeInit -0800539c g F .text 00000022 I2C_GetITStatus -08006e18 g F .text 00000020 TIM_UpdateRequestConfig -08006ad4 g F .text 00000016 TIM_ForcedOC3Config -08006a0c g F .text 00000034 TIM_TIxExternalClockConfig -080052e8 g F .text 00000020 I2C_StretchClockCmd -080074a4 g F .text 0000001c USART_WakeUpConfig -08004dd8 g F .text 00000014 GPIO_StructInit -08002980 g F .text 00000074 ADC_DeInit -080068d8 g F .text 00000014 TIM_BDTRStructInit -080068ac g F .text 00000016 TIM_OCStructInit -080040bc g F .text 00000010 FLASH_GetReadOutProtectionStatus -08006d14 g F .text 00000018 TIM_OC3NPolarityConfig -08002c38 g F .text 00000016 ADC_ExternalTrigInjectedConvCmd -080029f4 g F .text 00000050 ADC_Init -0800751c g F .text 0000000c USART_SendData -20000180 g .bss 00000000 _estack -08006d6c g F .text 00000026 TIM_CCxNCmd -0800385c g F .text 0000001c CEC_DeInit -08002cf4 g F .text 00000018 ADC_SetInjectedOffset -08003aa8 g F .text 00000034 DAC_DMACmd -08005a58 g F .text 00000012 RTC_WaitForLastTask -08002604 g F .text 00000006 __set_BASEPRI -08006eac g F .text 0000001c TIM_SelectMasterSlaveMode -080051f0 g F .text 0000001a I2C_ReadRegister -08002d58 g F .text 00000026 ADC_TempSensorVrefintCmd -08006044 g F .text 0000000e SPI_GetCRC -20000028 g .data 00000000 _edata -080074c0 g F .text 00000020 USART_ReceiverWakeUpCmd -080071b8 g F .text 00000008 TIM_GetCapture4 -08003bcc g F .text 00000028 DAC_GetDataOutputValue -080073bc g F .text 0000001a USART_StructInit -08007748 g F .text 00000010 WWDG_Enable -080031a8 g F .text 00000016 CAN_DBGFreeze -080076c8 g F .text 0000001c WWDG_DeInit -08003a74 g F .text 00000034 DAC_Cmd -08002e74 g F .text 0000000e BKP_GetFlagStatus -080064c8 g F .text 000000f0 TIM_TimeBaseInit +080023d0 g F .text 00000082 LedToggle +20000168 g .bss 00000000 _estack +20000014 g .data 00000000 _edata 08002000 g O .text 00000154 _vectab -08002d0c g F .text 0000001e ADC_GetInjectedConversionValue -080054f4 g F .text 00000014 PWR_GetFlagStatus -08003878 g F .text 00000024 CEC_Init -08003a2c g F .text 00000036 DAC_Init -08005a98 g F .text 00000014 RTC_GetFlagStatus -080035a8 g F .text 00000008 CAN_GetLastErrorCode -08007588 g F .text 00000020 USART_SmartCardNACKCmd -0800545c g F .text 00000016 PWR_PVDLevelConfig -080059b0 g F .text 0000001a RTC_ExitConfigMode -080052c0 g F .text 00000008 I2C_GetPEC -08002670 g F .text 00000006 __STREXH -080027b0 g F .text 000000e0 SystemCoreClockUpdate -080048f8 g F .text 00000070 FSMC_NORSRAMStructInit -080074fc g F .text 00000020 USART_LINCmd -08005ae8 g F .text 00000014 RTC_ClearITPendingBit -08002dcc g F .text 0000000c BKP_TamperPinLevelConfig -08006950 g F .text 00000008 TIM_DMAConfig -08002b00 g F .text 00000016 ADC_DiscModeCmd -08005f70 g F .text 00000026 SPI_I2S_ITConfig -0800399c g F .text 00000010 CRC_ResetDR -08002658 g F .text 00000008 __LDREXH -08002344 g F .text 0000001e IrqInterruptDisable -0800694c g F .text 00000004 TIM_GenerateEvent -0800517c g F .text 00000020 I2C_DualAddressCmd -08005974 g F .text 00000028 RTC_ITConfig -08003e74 g F .text 00000014 DMA_ClearFlag -08002224 g F .text 000000b0 BootComCheckActivationRequest -08005b24 g F .text 00000034 SDIO_Init -08006874 g F .text 00000024 TIM_BDTRConfig -080053d8 g F .text 0000000c IWDG_SetPrescaler -08004324 g F .text 000000e8 FLASH_EnableWriteProtection -08005508 g F .text 00000012 PWR_ClearFlag -08004e2c g F .text 00000010 GPIO_PinLockConfig -080056e8 g F .text 0000000c RCC_LSICmd -08005140 g F .text 00000020 I2C_AcknowledgeConfig -08006f00 g F .text 0000001e TIM_SetIC2Prescaler -08006984 g F .text 0000001a TIM_ETRConfig -080025fc g F .text 00000006 __get_BASEPRI -20000080 g .bss 00000000 _stack -08007404 g F .text 0000000e USART_ClockStructInit -08005324 g F .text 0000001a I2C_CheckEvent -08005864 g F .text 00000024 RCC_APB2PeriphResetCmd -08006e90 g F .text 0000001c TIM_SelectSlaveMode -08005120 g F .text 00000020 I2C_GenerateSTOP -08005efc g F .text 0000001c SPI_StructInit -08005de0 g F .text 00000048 SPI_Init -08002890 g F .text 00000014 NVIC_PriorityGroupConfig -080025b8 g F .text 0000000c TimerGet -08005b94 g F .text 00000010 SDIO_GetPowerState -08003c3c g F .text 00000182 DMA_DeInit -08002de4 g F .text 0000000c BKP_ITConfig -080038d4 g F .text 0000000c CEC_SetPrescaler -08006c88 g F .text 00000014 TIM_ClearOC4Ref -08006e58 g F .text 0000001c TIM_SelectOnePulseMode -08002668 g F .text 00000006 __STREXB -08006a54 g F .text 0000004e TIM_EncoderInterfaceConfig -08002c68 g F .text 00000008 ADC_GetSoftwareStartInjectedConvCmdStatus -080053c0 g F .text 0000000a I2C_ClearITPendingBit -08006ed0 g F .text 00000004 TIM_SetCompare1 -08006ccc g F .text 00000018 TIM_OC2PolarityConfig -08006df8 g F .text 00000020 TIM_UpdateDisableConfig -08004dec g F .text 0000000c GPIO_ReadInputDataBit -08004178 g F .text 00000044 FLASH_GetBank1Status -08007470 g F .text 00000018 USART_DMACmd -08002580 g F .text 00000036 TimerInit -08006c2c g F .text 00000018 TIM_OC4FastConfig -08005ca4 g F .text 0000000e SDIO_WriteData -08003220 g F .text 000000e0 CAN_Transmit -080038bc g F .text 0000000c CEC_ITConfig -08005e28 g F .text 000000d2 I2S_Init -08005450 g F .text 0000000c PWR_PVDCmd -0800561c g F .text 00000016 RCC_HCLKConfig -08004058 g F .text 0000001e FLASH_UnlockBank1 -08004b54 g F .text 0000002e FSMC_ClearFlag -080069dc g F .text 00000016 TIM_CounterModeConfig -08005afc g F .text 00000028 SDIO_DeInit +0800224c g F .text 000000c0 BootComCheckActivationRequest +20000068 g .bss 00000000 _stack +08002608 g F .text 0000000c TimerGet +080025cc g F .text 0000003c TimerInit diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.srec b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.srec index 59138bc2..2084893f 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.srec +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/bin/demoprog_olimex_stm32p103.srec @@ -1,1405 +1,154 @@ S025000062696E2F64656D6F70726F675F6F6C696D65785F73746D3332703130332E7372656331 -S3150800200080010020D5220008D9250008D925000816 -S31508002010D9250008D9250008D9250008D92500089A -S31508002020D9250008D9250008D9250008D92500088A -S31508002030D9250008D9250008D9250008C52500088E -S31508002040D9250008D9250008D9250008D92500086A -S31508002050D9250008D9250008D9250008D92500085A -S31508002060D9250008D9250008D9250008D92500084A -S31508002070D9250008D9250008D9250008D92500083A -S31508002080D9250008D9250008D9250008D92500082A -S31508002090D9250008D9250008D9250008D92500081A -S315080020A0D9250008D9250008D9250008D92500080A -S315080020B0D9250008D9250008D9250008D9250008FA -S315080020C0D9250008D9250008D9250008D9250008EA -S315080020D0D9250008D9250008D9250008D9250008DA -S315080020E0D9250008D9250008D9250008D9250008CA -S315080020F0D9250008D9250008D9250008D9250008BA -S31508002100D9250008D9250008D9250008D9250008A9 -S31508002110D9250008D9250008D9250008D925000899 -S31508002120D9250008D9250008D9250008D925000889 -S31508002130D9250008D9250008D9250008D925000879 -S31508002140D9250008D9250008D9250008D925000869 +S31508002000680100200D230008292600082926000853 +S315080020102926000829260008292600082926000856 +S315080020202926000829260008292600082926000846 +S31508002030292600082926000829260008152600084A +S315080020402926000829260008292600082926000826 +S315080020502926000829260008292600082926000816 +S315080020602926000829260008292600082926000806 +S3150800207029260008292600082926000829260008F6 +S3150800208029260008292600082926000829260008E6 +S3150800209029260008292600082926000829260008D6 +S315080020A029260008292600082926000829260008C6 +S315080020B029260008292600082926000829260008B6 +S315080020C029260008292600082926000829260008A6 +S315080020D02926000829260008292600082926000896 +S315080020E02926000829260008292600082926000886 +S315080020F02926000829260008292600082926000876 +S315080021002926000829260008292600082926000865 +S315080021102926000829260008292600082926000855 +S315080021202926000829260008292600082926000845 +S315080021302926000829260008292600082926000835 +S315080021402926000829260008292600082926000825 S31508002150EE11AA5510B504464FF48840C4F20000A3 -S315080021604FF0200105F06EFA012809D14FF4884096 -S31508002170C4F2000005F0D8F920704FF0010010BD38 -S315080021804FF0000010BD00BF30B587B04FF40030E7 -S315080021904FF0010103F054FB4FF005004FF0010129 -S315080021A003F03CFB4FF018038DF817304FF004038B -S315080021B01D46ADF814304FF003038DF816304FF472 -S315080021C00064C4F20104204605A902F0A3FD8DF8B7 -S315080021D017504FF00803ADF81430204605A902F051 -S315080021E099FD4FF4614301934FF00003ADF80830B1 -S315080021F0ADF80A30ADF80C30ADF810304FF00C03DE -S31508002200ADF80E304FF48844C4F20004204601A904 -S3150800221005F05CF820464FF0010105F0FBF807B021 -S3150800222030BD00BF08B540F22903C2F200031B788F -S31508002230B3B940F22C00C2F20000FFF78BFF012869 -S3150800224044D140F22903C2F200034FF001021A708A -S3150800225040F22803C2F200034FF000021A7008BDCC -S3150800226040F22803C2F200031878194BC018FFF78A -S3150800227071FF01282AD140F22803C2F200031A7816 -S3150800228002F10102D2B21A7040F22C03C2F2000324 -S315080022901B7893421AD140F22903C2F200034FF089 -S315080022A000021A7040F22C03C2F200035B78FF2B7F -S315080022B00CD140F22C03C2F200039B7833B900F02C -S315080022C051F940F25113C0F60003984708BD00BF04 -S315080022D02D00002008B515498D4640F20002C2F2CD -S315080022E0000240F22803C2F200039A4211D247F2D2 -S315080022F07872C0F6000240F20003C2F2000340F210 -S315080023002800C2F2000052F8041B43F8041B83425B -S31508002310F9D3074807494FF000028842B8BF40F88A -S31508002320042BFADB00F082F808BD000080010020CB -S31508002330280000208000002062B6704708B5FFF725 -S31508002340FBFF08BD40F27003C2F200031A7802B917 -S3150800235072B640F27003C2F2000302F101021A706B -S31508002360704700BF08B540F27003C2F200031A783E -S3150800237002F1FF32D2B21A700AB9FFF7DDFF08BDC3 -S3150800238000B583B04FF010004FF0010103F046FA94 -S315080023904FF48053ADF804304FF003038DF8063040 -S315080023A04FF010038DF807304FF48050C4F2010047 -S315080023B001A902F0AFFC03B000BD00BF10B500F0E4 -S315080023C0FBF8044640F27403C2F200031B68C31A02 -S315080023D0B3F5FA7F29D340F27803C2F200031B78DB -S315080023E07BB940F27803C2F200034FF001021A707B -S315080023F04FF48050C4F201004FF4805102F00CFDF6 -S315080024000EE040F27803C2F200034FF000021A70A1 -S315080024104FF48050C4F201004FF4805102F0FAFCE8 -S3150800242040F27403C2F200031C6010BD00B583B00D -S315080024304FF00003019300934FF48053C4F2020354 -S315080024401A6842F001021A6059684FF00002CFF686 -S31508002450FF0201EA02025A601A6822F0847222F424 -S3150800246080321A601A6822F480221A605A6822F4A6 -S31508002470FE025A604FF41F029A601A6842F48032CC -S315080024801A604FF48053C4F2020340F2DC52196812 -S3150800249001F400310091019901F1010101910099BE -S315080024A011B901999142F2D14FF48053C4F2020353 -S315080024B01B6813F4003F00D1FEE74FF40053C4F243 -S315080024C002031A6842F010021A601A6822F0030220 -S315080024D01A601A6842F002021A604FF48053C4F276 -S315080024E002035A685A605A6842F400525A605A6897 -S315080024F042F480625A605A6822F47C125A605A681A -S3150800250042F4E8125A601A6842F080721A604FF470 -S315080025108053C4F202031A6812F0007FFBD04FF40E -S315080025208053C4F202035A6822F003025A605A68BA -S3150800253042F002025A604FF48053C4F202035A680A -S3150800254002F00C02082AFAD1FFF71AFF00F018F871 -S31508002550FFF7F4FEFFF718FEFFF730FFFFF762FEFE -S31508002560FAE700BF4EF21003CEF200034FF0000266 -S315080025701A60704740F27C03C2F200031860704785 -S3150800258008B54EF21003CEF2000341F63F12C0F230 -S3150800259001025A604FF46D42CEF200024FF0F0018C -S315080025A082F823104FF0000098604FF007021A6077 -S315080025B0FFF7E0FF08BD00BF40F27C03C2F200034C -S315080025C01868704740F27C03C2F200031A6802F1E9 -S315080025D001021A60704700BFFEE700BFEFF30980EB -S315080025E00046704780F30988704700BFEFF30880FC -S315080025F00046704780F30888704700BFEFF31280E3 -S31508002600704700BF80F31188704700BFEFF3108052 -S31508002610704700BF80F31088704700BFEFF3138040 -S31508002620704700BF80F31388704700BFEFF314802C -S31508002630704700BF80F31488704700BF00BA704720 -S3150800264040BA7047C0BA704790FAA0F0704700BF0A -S31508002650D0E84F0FC0B27047D0E85F0F80B270471E -S3150800266050E8000F704700BFC1E8400F704700BF31 -S31508002670C1E8500F704700BF41E80000704700BF2F -S3150800268082B04FF48053C4F202031A6842F0010282 -S315080026901A6059684FF00002CFF6FF0201EA0202FB -S315080026A05A601A6822F0847222F480321A601A6814 -S315080026B022F480221A605A6822F4FE025A604FF405 -S315080026C01F029A604FF00002019200921A6842F4C3 -S315080026D080321A604FF48052C4F20202136803F47F -S315080026E000330093019B03F101030193009B1BB97F -S315080026F0019BB3F5A06FF1D14FF48053C4F20203E6 -S315080027001B6813F4003F14BF012300230093009BAA -S31508002710012B44D14FF40053C4F202031A6842F065 -S3150800272010021A601A6822F003021A601A6842F048 -S3150800273002021A604FF48053C4F202035A685A60C0 -S315080027405A685A605A6842F480625A605A6822F493 -S315080027507C125A605A6842F4E8125A601A6842F0C3 -S3150800276080721A604FF48052C4F20202136813F0A2 -S31508002770007FFBD04FF48053C4F202035A6822F05C -S3150800278003025A605A6842F002025A604FF48052B5 -S31508002790C4F20202536803F00C03082BFAD14FF473 -S315080027A06D43CEF200034FF000629A6002B07047A4 -S315080027B04FF48053C4F202035B6803F00C03042B46 -S315080027C00DD0082B15D0002B44D140F21003C2F2CD -S315080027D000034FF49052C0F27A021A6043E040F2C6 -S315080027E01003C2F200034FF49052C0F27A021A6044 -S315080027F039E04FF48053C4F202035A685B68C2F3A7 -S31508002800834202F1020213F4803F0BD140F2100317 -S31508002810C2F200034FF41061C0F23D0101FB02F25F -S315080028201A6020E04FF48053C4F202035B6813F485 -S31508002830003F40F21003C2F2000319BF4FF41061C3 -S31508002840C0F23D014FF49051C0F27A0101FB02F249 -S315080028501A6008E040F21003C2F200034FF49052E7 -S31508002860C0F27A021A604FF48053C4F202035A681F -S31508002870C2F3031240F20003C2F200039A5C40F26C -S315080028801003C2F20003196821FA02F21A607047AF -S3150800289040F0BE6040F420204FF46D43CEF20003B2 -S315080028A0D860704710B4C3785BB34FF46D43CEF26B -S315080028B00003DB686FEA0303C3F30223C3F10402D0 -S315080028C0417801FA02F24FF00F0121FA03F18478F8 -S315080028D02140114302784FEA0111C9B24FF461430E -S315080028E0CEF200039A1882F8001302784FEA5211C2 -S315080028F002F01F024FF0010000FA02F243F821200D -S3150800290010E003784FEA531203F01F034FF001015A -S3150800291001FA03F14FF46143CEF2000302F12002FB -S3150800292043F8221010BC704721F0604121F07F0166 -S3150800293001434FF46D43CEF200039960704700BF20 -S3150800294039B14FF46D43CEF200031A69104318618A -S3150800295070474FF46D43CEF200031A6922EA00006D -S315080029601861704704284EF21003CEF200031A6865 -S315080029700CBF42F0040222F004021A60704700BF3E -S3150800298008B54FF41053C4F2010398420CD14FF422 -S3150800299000704FF0010102F065FF4FF400704FF030 -S315080029A0000102F05FFF08BD4FF42053C4F2010393 -S315080029B098420CD14FF480604FF0010102F052FFAB -S315080029C04FF480604FF0000102F04CFF08BD4FF451 -S315080029D07053C4F2010398420BD14FF400404FF0F4 -S315080029E0010102F03FFF4FF400404FF0000102F0F2 -S315080029F039FF08BD10B4436823F4702323F48073A9 -S31508002A000A6813430A7943EA0223436084688A689A -S31508002A10CB681A434FF2FD73CFF6F17304EA03034A -S31508002A2042EA03034A7943EA42038360C26A22F40C -S31508002A3070020B7C03F1FF33DBB242EA0353C36235 -S31508002A4010BC70474FF00003036003714371836045 -S31508002A50C3604FF001030374704700BF21B1836858 -S31508002A6043F0010383607047836823F001038360A2 -S31508002A70704700BF21B1836843F480738360704751 -S31508002A80836823F480738360704700BFC9B21AB1A4 -S31508002A904368194341607047436823EA010141606E -S31508002AA0704700BF836843F008038360704700BF20 -S31508002AB08068C0F3C0007047836843F004038360EE -S31508002AC0704700BF8068C0F38000704721B18368F3 -S31508002AD043F4A00383607047836823F4A0038360EC -S31508002AE0704700BF8068C0F380507047436823F47E -S31508002AF0604301F1FF3143EA41334360704700BF49 -S31508002B0021B1436843F4006343607047436823F484 -S31508002B1000634360704700BF70B4092910D9C668BE -S31508002B2001EB4104A4F11E044FF0070505FA04F56C -S31508002B3026EA050503FA04F445EA0403C3600DE032 -S31508002B40066901EB41044FF0070505FA04F526EA84 -S31508002B50050503FA04F445EA04030361062A10D8B6 -S31508002B60446B02F1FF3202EB82024FF01F0303FAB5 -S31508002B7002F324EA030301FA02F143EA010242637B -S31508002B8022E00C2A10D8046B02EB8202A2F123027F -S31508002B904FF01F0303FA02F324EA030301FA02F1D2 -S31508002BA043EA010202630FE0C46A02EB8202A2F161 -S31508002BB041024FF01F0303FA02F324EA030301FA62 -S31508002BC002F143EA0102C26270BC704721B1836810 -S31508002BD043F4801383607047836823F4801383600B -S31508002BE0704700BFC06C80B2704700BF42F24C43CA -S31508002BF0C4F201031868704721B1436843F480633F -S31508002C0043607047436823F480634360704700BF9E -S31508002C1021B1436843F4805343607047436823F403 -S31508002C2080534360704700BF836823F4E04341EA5A -S31508002C3003038360704700BF21B1836843F40043F0 -S31508002C4083607047836823F400438360704700BF3E -S31508002C5021B1836843F4021383607047836823F4C1 -S31508002C6002138360704700BF8068C0F34050704706 -S31508002C7070B4092910D9C66801EB4104A4F11E04F1 -S31508002C804FF0070505FA04F526EA050503FA04F4E4 -S31508002C9045EA0403C3600DE0066901EB41044FF001 -S31508002CA0070505FA04F526EA050503FA04F445EAD4 -S31508002CB004030361836BC3F30154121B02F102027E -S31508002CC0D2B202EB82024FF01F0404FA02F423EA9E -S31508002CD0040301FA02F10B43836370BC704700BF1B -S31508002CE0836B23F4401301F1FF3143EA01538363F5 -S31508002CF0704700BF82B04FF0000301930190019B1B -S31508002D00CB180193019B1A6002B0704782B04FF04E -S31508002D10000301930190019B03F128035B180193BB -S31508002D20019B186880B202B0704700BF436823F45D -S31508002D30400323F4007341EA03034360704700BF6E -S31508002D4041628262704700BF436823F01F0341EA6D -S31508002D5003034360704700BF40B14FF41053C4F2F9 -S31508002D6001039A6842F400029A6070474FF41053C0 -S31508002D70C4F201039A6822F400029A60704700BF01 -S31508002D80036819420CBF0020012070476FEA010151 -S31508002D90016070474268036813EA112305D0C9B277 -S31508002DA011420CBF0020012070474FF00000704709 -S31508002DB06FEA11210160704708B54FF0010002F073 -S31508002DC075FD4FF0000002F071FD08BD48F204637E -S31508002DD0C4F20D23186070474FF40643C4F20D235E -S31508002DE01860704748F28863C4F20D23186070476C -S31508002DF04FF4D842C4F20002938D23F460734FEA6D -S31508002E0003434FEA134340EA03039385704700BF21 -S31508002E104FF4D842C4F20002938D23F07F034FEAA1 -S31508002E2003434FEA134340EA03039385704700BF01 -S31508002E3082B04FF0000301934FF4D843C4F2000365 -S31508002E400193019BC3180193019B196002B0704757 -S31508002E5082B04FF0000301934FF4D843C4F2000345 -S31508002E600193019BC3180193019B188880B202B095 -S31508002E70704700BF48F2A063C4F20D231868C0B2B9 -S31508002E80704700BF4FF4D843C4F200039A8E92B23B -S31508002E9042F001029A86704748F2A463C4F20D23F1 -S31508002EA01868C0B2704700BF4FF4D843C4F2000395 -S31508002EB09A8E92B242F002029A86704701420CBF7D -S31508002EC000200120704700BF08B54FF4C843C4F27C -S31508002ED0000398420CD14FF000704FF0010102F048 -S31508002EE0D3FC4FF000704FF0000102F0CDFC08BD96 -S31508002EF04FF080604FF0010102F0C6FC4FF0806091 -S31508002F004FF0000102F0C0FC08BD00BF036823F0C3 -S31508002F1002030360036843F001030360436813F088 -S31508002F20010F07D14FF6FF73426812F0010F01D166 -S31508002F30013BF9D1436813F0010F5ED08B79012B61 -S31508002F4003680CBF43F0800323F080030360CB794A -S31508002F50012B03680CBF43F0400323F040030360D2 -S31508002F600B7A012B03680CBF43F0200323F02003E0 -S31508002F7003604B7A012B03680CBF43F0100323F060 -S31508002F80100303608B7A012B03680CBF43F0080318 -S31508002F9023F008030360CB7A012B03680CBF43F0C8 -S31508002FA0040323F004030360CA788B784FEA83731B -S31508002FB043EA02630A7943EA02434A7943EA025238 -S31508002FC00B8803F1FF3342EA0303C361036823F066 -S31508002FD001030360436813F0010F07D04FF6FF7330 -S31508002FE0426812F0010F01D0013BF9D1436813F092 -S31508002FF0010F14BF0020012070474FF000007047F2 -S3150800300070B4837A4FF0010101FA03F14FF4C84313 -S31508003010C4F20003D3F8002242F00102C3F80022EA -S31508003020D3F81C426FEA010202EA0404C3F81C4200 -S31508003030037BE3B94FF4C843C4F20003D3F80C4248 -S3150800304002EA0404C3F80C42847AC688458845EA2D -S31508003050064504F1480443F83450857A868804887E -S3150800306044EA064405F1480503EBC5035C60037BA7 -S31508003070012B1CD14FF4C843C4F20003D3F80C4209 -S3150800308041EA0404C3F80C42847A0688458845EA6E -S31508003090064504F1480443F83450857A8688C4887E -S315080030A044EA064405F1480503EBC5035C60C37AA8 -S315080030B053B94FF4C843C4F20003D3F8044202EAF2 -S315080030C00404C3F8044209E04FF4C843C4F20003F9 -S315080030D0D3F8044241EA0404C3F80442038943B915 -S315080030E04FF4C843C4F20003D3F814422240C3F88D -S315080030F014220389012B01BF4FF4C843C4F200030D -S31508003100D3F814220A4308BFC3F81422437B012BC1 -S3150800311001BF4FF4C843C4F20003D3F81C2211437D -S3150800312008BFC3F81C124FF4C843C4F20003D3F80F -S31508003130002222F00102C3F8002270BC704700BFCB -S315080031404FF000038371C371037243728372C372B3 -S315080031508370C3704FF0030303714FF0020343718A -S315080031604FF00103038070474FF4C843C4F20003CD -S31508003170D3F8002242F00102C3F80022D3F8002255 -S3150800318022F47C5222F00E02C3F80022D3F8002261 -S3150800319042EA0022C3F80022D3F8002222F00102F4 -S315080031A0C3F80022704700BF21B1036843F4803397 -S315080031B003607047036823F480330360704700BFD9 -S315080031C0B1B1036843F080030360D0F8843143F457 -S315080031D08073C0F88431D0F8943143F48073C0F812 -S315080031E09431D0F8A43143F48073C0F8A431704701 -S315080031F0036823F080030360D0F8843123F48073D6 -S31508003200C0F88431D0F8943123F48073C0F894312F -S31508003210D0F8A43123F48073C0F8A431704700BFF6 -S31508003220F0B40346826812F0806F18BF00200CD1F4 -S315080032309A6812F0006F06D19A6812F0805F18BF7C -S31508003240022059D001E04FF00100054600F11802AE -S315080032504FEA02129C5804F001049C500A7A5AB9A3 -S3150800326000F118024FEA02129E580F684C7A44EA97 -S31508003270475434439C500BE000F118044FEA0414F9 -S315080032801E594F6842EAC70232434E7A32431A51F0 -S315080032908A7A02F00F028A7205F118044FEA0414BA -S315080032A01A19566826F00F06566056688F7A47EA46 -S315080032B0060656608A7B4E7B4FEA064646EA026653 -S315080032C0CA7A16430A7B46EA022603EB051202F57A -S315080032D0C475C2F888618E7C4A7C4FEA024242EA8B -S315080032E00662CE7B3243097C42EA01226A601A5999 -S315080032F042F001021A5101E04FF00400F0BC704799 -S3150800330001290DD021B1022918BF002317D10FE0DA -S3150800331082684FF00303C0F2004302EA03030EE09B -S3150800332082684FF44073C0F6000302EA030306E01E -S3150800333082684FF00003C1F2030302EA03034FF069 -S315080033400302C0F20042934217D04FF00302C0F2C4 -S315080033500042934201D86BB118E04FF44072C0F6B0 -S31508003360000293420CD04FF00002C1F203029342CE -S315080033700CD108E04FF0020070474FF0010070478B -S315080033804FF0010070474FF0010070474FF0000002 -S31508003390704700BF012908D011B102290ED109E0F2 -S315080033A0836843F0800383607047836843F400436F -S315080033B083607047836843F400038360704700BFE7 -S315080033C030B401F11B034FEA0313C35803F0040397 -S315080033D0DBB2137243B901F11B034FEA0313C35857 -S315080033E04FEA5353136007E001F11B034FEA031337 -S315080033F0C3584FEAD303536001F11B044FEA041480 -S315080034000319045904F0020454725C6804F00F04AA -S3150800341094725B684FEA1323D37400EB011303F528 -S31508003420DC74D3F8B851D572D3F8B8514FEA1525DC -S315080034301573D3F8B8514FEA15455573D3F8B83113 -S315080034404FEA136393736368D37363684FEA13236E -S31508003450137463684FEA1343537463684FEA13633C -S31508003460937421B9C36843F02003C36003E003697A -S3150800347043F02003036130BC704700BF21B9C3681D -S3150800348043F02003C3607047036943F020030361D8 -S31508003490704700BF19B9C06800F0030070470129DA -S315080034A006BF006900F0030000207047D9B9036819 -S315080034B023F0030343F001030360436803F00303A7 -S315080034C0012B08D04FF6FF73426802F00302012A67 -S315080034D001D0013BF8D1406800F00300012814BF71 -S315080034E0002001207047012916D1036823F0030341 -S315080034F00360436813F0030F07D04FF6FF73426863 -S3150800350012F0030F01D0013BF9D1436813F0030F02 -S3150800351014BF00200120704702291BD1036823F03D -S31508003520030343F002030360436803F00303022B1B -S3150800353008D04FF6FF73426802F00302022A01D050 -S31508003540013BF8D1406800F00300022814BF0020B0 -S31508003550012070474FF00000704700BF036823F052 -S31508003560030343F002030360406800F003000228E7 -S3150800357014BF002001207047036823F0020303608C -S31508003580436813F0020F07D04FF6FF73426812F034 -S31508003590020F01D0013BF9D1436813F0020F14BFA3 -S315080035A000200120704700BF806900F07000704756 -S315080035B080694FEA106070478069C0F3074070471A -S315080035C01AB14369194341617047436923EA010106 -S315080035D04161704711F4700F09D0836923F07F4366 -S315080035E023F470030B420CBF00200120704711F032 -S315080035F0807F09D0436823F07F4323F470030B428E -S315080036000CBF00200120704711F0006F09D08368B5 -S3150800361023F07F4323F470030B420CBF00200120E4 -S31508003620704711F0007F09D0C36823F07F4323F465 -S3150800363070030B420CBF002001207047036923F07A -S315080036407F4323F470030B420CBF00200120704710 -S315080036504FF07003C3F2F003994203D14FF0000311 -S315080036608361704721F07F4323F4700311F0007FD4 -S3150800367001D0C360704711F0806F01D003617047B5 -S3150800368011F0006F14BF83604360704708B5436943 -S3150800369019427FD040294DD00ED8042932D004D8FB -S315080036A0012921D0022978D126E0102936D02029EF -S315080036B03AD0082971D12BE0B1F5006F5ED009D850 -S315080036C0B1F5007F4ED0B1F5806F51D0B1F5807F4E -S315080036D063D141E0B1F5803F32D0B1F5003F35D036 -S315080036E0B1F5004F59D14FE0806840F20111C0F2A0 -S315080036F00101FFF7E3FB08BDC0684FF00301FFF7C0 -S31508003700DDFB08BDC0684FF00801FFF7D7FB08BD11 -S31508003710C0684FF01001FFF7D1FB08BD00694FF0F4 -S315080037200301FFF7CBFB08BD00694FF00801FFF75F -S31508003730C5FB08BD00694FF01001FFF7BFFB08BDC8 -S3150800374040684FF00801FFF7B9FB08BD40684FF025 -S315080037501001FFF7B3FB08BD80694FF00101FFF7C1 -S31508003760ADFB08BD80694FF00201FFF7A7FB08BD56 -S3150800377080694FF00401FFF7A1FB08BD80694FF08F -S315080037807001FFF79BFB08BD40684FF00401FFF787 -S3150800379095FB08BD4FF0000008BD4FF0000008BDBE -S315080037A0B1F5807F40D00CD8082929D004D8012942 -S315080037B01CD0042951D11FE0202925D040294CD1FD -S315080037C026E0B1F5006F3BD006D8B1F5007F2FD0C3 -S315080037D0B1F5806F41D12FE0B1F5803F1CD0B1F52E -S315080037E0003F1DD0B1F5004F37D130E040F201134C -S315080037F0C0F20103836070474FF00803C360704747 -S315080038004FF01003C36070474FF008030361704719 -S315080038104FF01003036170474FF008034360704789 -S315080038204FF01003436070474FF00403436070473E -S315080038304FF00403436070474FF00403436070473A -S315080038404FF0000383614FF00403436070474FF065 -S31508003850000383614FF004034360704708B54FF0D7 -S3150800386080404FF0010102F00FF84FF080404FF012 -S31508003870000102F009F808BD10B44FF4F043C4F291 -S315080038800003196801F0F3014488028844EA020239 -S3150800389041EA020292B21A6010BC70474FF0000368 -S315080038A0C4F20F23186038B94FF4F042C4F200028C -S315080038B0136813F0010FFBD1704700BF4FF00403E4 -S315080038C0C4F20F23186070474FF4F043C4F20003A4 -S315080038D0586070474FF4F043C4F20003986070478D -S315080038E04FF4F043C4F20003586170474FF4F043B5 -S315080038F0C4F200039869C0B2704700BF4FF4007362 -S31508003900C4F20F234FF001021A6070474FF4017397 -S31508003910C4F20F231860704720F07F43000F1ABFC8 -S315080039201B0C47F60C0247F61002C4F20002126896 -S315080039301A420CBF00200120704700BF4FF4F04325 -S31508003940C4F2000319691A696FEA000020F003003F -S3150800395001F0020140EA010101EA02021A61704718 -S315080039604FF4F043C4F200031A681B69184214BFE7 -S31508003970C2F34000002070474FF4F043C4F200033E -S3150800398019691A696FEA000020F0030001F00201C4 -S3150800399040EA010101EA02021A6170474FF44053F6 -S315080039A0C4F202034FF001029A6070474FF4405385 -S315080039B0C4F2020318601868704700BF10B40B46BB -S315080039C061B14FF000024FF44054C4F2020450F8BB -S315080039D0041B216002F101029342F8D84FF44053C8 -S315080039E0C4F20203186810BC704700BF4FF4405376 -S315080039F0C4F20203186870474FF44053C4F2020336 -S31508003A00187170474FF44053C4F20203187970478F -S31508003A1008B54FF000504FF0010101F035FF4FF0A7 -S31508003A2000504FF0000101F02FFF08BD30B44FF4ED -S31508003A30E843C4F200031C6840F6FE7202FA00F27C -S31508003A4024EA02024D680C6825438C682543CC6835 -S31508003A5045EA040101FA00F042EA0000186030BCA9 -S31508003A60704700BF4FF00003036043608360C36084 -S31508003A70704700BF59B14FF4E843C4F200031A680F -S31508003A804FF0010101FA00F01043186070474FF437 -S31508003A90E843C4F200031A684FF0010101FA00F086 -S31508003AA022EA00001860704759B14FF4E843C4F29F -S31508003AB000031A684FF4805101FA00F010431860A9 -S31508003AC070474FF4E843C4F200031A684FF4805174 -S31508003AD001FA00F022EA00001860704769B14FF455 -S31508003AE0E843C4F200035A684FEA10104FF0010188 -S31508003AF001FA00F01043586070474FF4E843C4F2E7 -S31508003B0000035A684FEA10104FF0010101FA00F05D -S31508003B1022EA00005860704740B14FF4E843C4F207 -S31508003B2000035A6842F003025A6070474FF4E843AC -S31508003B30C4F200035A6822F003025A60704700BFB5 -S31508003B404AB14FF4E843C4F200031A6801FA00F1D7 -S31508003B501143196070474FF4E843C4F200031A682A -S31508003B6001FA00F122EA01011960704782B04FF0AC -S31508003B70000301934FF4E843C4F200030193019B49 -S31508003B8003F108031B180193019B196002B07047E3 -S31508003B9082B04FF0000301934FF4E843C4F20003E8 -S31508003BA00193019B03F114031B180193019B1960F0 -S31508003BB002B0704708280CBF42EA012142EA0141D7 -S31508003BC047F22043C4F20003C150704782B04FF059 -S31508003BD0000301934FF4E843C4F200030193019BE9 -S31508003BE003F12C0303EB90030193019B186880B241 -S31508003BF002B070474FF40053CEF2040318684FEA38 -S31508003C00104070474FF40053CEF2040318684FEA89 -S31508003C1000504FEA1050704739B14FF40053CEF2B6 -S31508003C2004035A681043586070474FF40053CEF2A5 -S31508003C3004035A6822EA00005860704702684FF683 -S31508003C40FE7302EA030303604FF000030360436058 -S31508003C508360C3604FF00803C4F20203984208D198 -S31508003C604FF00003C4F202035A6842F00F025A608A -S31508003C7070474FF01C03C4F20203984208D14FF074 -S31508003C800003C4F202035A6842F0F0025A60704711 -S31508003C904FF03003C4F20203984208D14FF00003F4 -S31508003CA0C4F202035A6842F470625A6070474FF0D1 -S31508003CB04403C4F20203984208D14FF00003C4F249 -S31508003CC002035A6842F470425A6070474FF058032C -S31508003CD0C4F20203984208D14FF00003C4F202036B -S31508003CE05A6842F470225A6070474FF06C03C4F267 -S31508003CF00203984208D14FF00003C4F202035A683F -S31508003D0042F470025A6070474FF08003C4F202030F -S31508003D10984208D14FF00003C4F202035A6842F0F1 -S31508003D2070625A6070474FF48163C4F20203984286 -S31508003D3008D14FF48063C4F202035A6842F00F02B6 -S31508003D405A60704740F21C43C4F20203984208D1F5 -S31508003D504FF48063C4F202035A6842F0F0025A60D4 -S31508003D6070474FF48663C4F20203984208D14FF4B1 -S31508003D708063C4F202035A6842F470625A6070475C -S31508003D8040F24443C4F20203984208D14FF48063D8 -S31508003D90C4F202035A6842F470425A6070474FF4FC -S31508003DA08B63C4F20203984201BF4FF48063C4F2E6 -S31508003DB002035A6842F4702208BF5A60704700BF6F -S31508003DC010B4026822F4FE4222F0F0020C6A8B68F4 -S31508003DD044EA03030C6923434C6923438C69234350 -S31508003DE0CC6923434C6A23438C6A234313430360F9 -S31508003DF0CB6843600B6883604B68C36010BC704730 -S31508003E004FF00003036043608360C360036143614E -S31508003E108361C361036243628362704721B10368A9 -S31508003E2043F001030360704702684FF6FE7302EA27 -S31508003E3003030360704700BF1AB1036819430160A2 -S31508003E407047036823EA01010160704741607047C3 -S31508003E50406880B2704700BF10F0805F14BF4FF40F -S31508003E6080630023C4F202031B6803420CBF0020D0 -S31508003E700120704710F0805F14BF4FF48063002361 -S31508003E80C4F202035860704710F0805F14BF4FF405 -S31508003E9080630023C4F202031B6803420CBF0020A0 -S31508003EA00120704710F0805F14BF4FF48063002331 -S31508003EB0C4F20203586070474FF48063C4F20103EA -S31508003EC04FF000021A605A609A60DA604FF6FF7285 -S31508003ED0C0F20F025A61704710B48379002B3DD0A7 -S31508003EE04FF48063C4F201031A68016822EA0102EA -S31508003EF01A605A68016822EA01025A60027902F1D8 -S31508003F00804202F582321468016844EA01011160B0 -S31508003F109A68016822EA01029A60DA68016822EA68 -S31508003F200102DA604379102B0ED14FF48063C4F294 -S31508003F3001039968026841EA02029A60D968026830 -S31508003F4041EA0202DA6013E003F1804303F58233A3 -S31508003F501968026841EA02021A6009E0037903F166 -S31508003F60804303F582331A68016822EA01021A605F -S31508003F7010BC70474FF00003036003714FF00C024A -S31508003F8042718371704700BF4FF48063C4F2010326 -S31508003F901A6940EA02021A61704700BF4FF480634B -S31508003FA0C4F201035B6918420CBF00200120704768 -S31508003FB04FF48063C4F20103586170474FF480637D -S31508003FC0C4F201031A685B69184204D010420CBF98 -S31508003FD00020012070474FF0000070474FF48063BF -S31508003FE0C4F20103586170474FF40053C4F2020348 -S31508003FF01A6802F0380240EA02021A60704700BFE7 -S315080040004FF40053C4F202031A6822F008021A6039 -S315080040101A6840EA02021A60704700BF4FF400535C -S31508004020C4F202031A6822F010021A601A6840EAFB -S3150800403002021A60704700BF4FF40053C4F202032D -S3150800404040F22312C4F267525A6048F6AB12CCF615 -S31508004050EF525A60704700BF4FF40053C4F2020390 -S3150800406040F22312C4F267525A6048F6AB12CCF6F5 -S31508004070EF525A60704700BF4FF40053C4F2020370 -S315080040801A6942F080021A61704700BF4FF4005364 -S31508004090C4F202031A6942F080021A61704700BF2F -S315080040A04FF40053C4F20203D8694FEA90007047F0 -S315080040B04FF40053C4F20203186A70474FF40053D2 -S315080040C0C4F20203D869C0F3400070474FF40053A6 -S315080040D0C4F202031868C0F34010704739B14FF4B0 -S315080040E00053C4F202031A691043186170474FF46B -S315080040F00053C4F202031A6922EA000018617047E5 -S31508004100012807D14FF40053C4F20203D86900F01E -S31508004110010070474FF40053C4F20203DB681842EB -S315080041200CBF0020012070474FF40053C4F202036D -S31508004130D86070474FF40053C4F20203DB6813F0EB -S31508004140010F13D14FF40053C4F20203DB6813F0D6 -S31508004150040F0ED14FF40053C4F20203D86800F0DE -S31508004160100000280CBF0420032070474FF0010000 -S3150800417070474FF0020070474FF40053C4F2020331 -S31508004180DB6813F0010F13D14FF40053C4F2020396 -S31508004190DB6813F0040F0ED14FF40053C4F2020388 -S315080041A0D86800F0100000280CBF042003207047D0 -S315080041B04FF0010070474FF00200704710B50446F3 -S315080041C0FFF7DAFF012814BF00220122002C0CBFDA -S315080041D0002302F0010333B1013C0CBF002302F0B7 -S315080041E00103002BF8D1002C08BF052010BD00BF25 -S315080041F070B505460C4616464FF40053C4F2020342 -S3150800420040F22312C4F267529A6048F6AB12CCF613 -S31508004210EF529A604FF40050FFF7D0FF042820D1E0 -S315080042204FF40053C4F202031A6942F010021A61ED -S3150800423045F0F8052C4326434FF47843C1F6FF733F -S315080042405E804FF40050FFF7B9FF052809D04FF4F8 -S315080042500053C4F20203196941F6EF7201EA020239 -S315080042601A6170BD10B504464FF43020FFF7A6FF5B -S31508004270042856D14FF40053C4F2020340F2231225 -S31508004280C4F267529A6048F6AB12CCF6EF529A60BF -S315080042901A6942F020021A611A6942F040021A614C -S315080042A04FF43020FFF78AFF04282ED14FF400532D -S315080042B0C4F20203196941F6DF7201EA02021A61C1 -S315080042C01A6942F010021A613CB14FF47843C1F6FC -S315080042D0FF734FF000021A8006E04FF47843C1F6E8 -S315080042E0FF734FF0A5021A804FF43020FFF766FFE0 -S315080042F0052816D04FF40053C4F20203196941F693 -S31508004300EF7201EA02021A6110BD052809D04FF4BE -S315080043100053C4F20203196941F6DF7201EA020288 -S315080043201A6110BD10B504464FF40050FFF746FF5A -S3150800433004286AD16FEA0404E1B24FF40053C4F2C8 -S31508004340020340F22312C4F267529A6048F6AB128F -S31508004350CCF6EF529A601A6942F010021A61FF29E8 -S3150800436008D04FF47843C1F6FF7319814FF4005013 -S31508004370FFF724FFC4F30723B3F1FF0218BF012296 -S31508004380042814BF002202F0010242B14FF4784219 -S31508004390C1F6FF7253814FF40050FFF70FFFC4F3C5 -S315080043A00743B3F1FF0218BF0122042814BF0022F5 -S315080043B002F0010242B14FF47842C1F6FF729381CE -S315080043C04FF40050FFF7FAFE4FEA1464B4F1FF0306 -S315080043D018BF0123042814BF002303F0010343B1C7 -S315080043E04FF47843C1F6FF73DC814FF40050FFF7B2 -S315080043F0E5FE052809D04FF40053C4F202031969F3 -S3150800440041F6EF7201EA02021A6110BD38B5044698 -S315080044100D464FF40050FFF7D1FE042822D14FF481 -S315080044200053C4F2020340F22312C4F267529A60A0 -S3150800443048F6AB12CCF6EF529A601A6942F01002AF -S315080044401A6125804FF40050FFF7B8FE052809D0F9 -S315080044504FF40053C4F20203196941F6EF7201EAF8 -S3150800446002021A6138BD00BF70B506460C464FF405 -S315080044700050FFF7A3FE042812D14FF40055C4F2EA -S3150800448002052B6943F001032B6134804FF4005079 -S31508004490FFF794FE2A6941F6FE7302EA03032B61CD -S315080044A070BD00BF30B583B005460C464FF000031B -S315080044B001934FF40050FFF781FE04282FD14FF4E3 -S315080044C00053C4F202031A6942F001021A61A3B248 -S315080044D02B804FF40050FFF771FE042815D105F123 -S315080044E002050195019B4FEA14441C804FF40050C5 -S315080044F0FFF764FE4FF40053C4F20203196941F64C -S31508004500FE7201EA02021A6109E04FF40053C4F28E -S315080045100203196941F6FE7201EA02021A6103B042 -S3150800452030BD00BF10B5FFF7C9FD00280CBFA52494 -S3150800453000244FF43020FFF741FE04284BD14FF4F6 -S315080045400053C4F2020340F22312C4F267529A607F -S3150800455048F6AB12CCF6EF529A601A6942F020027E -S315080045601A611A6942F040021A614FF43020FFF7C7 -S3150800457025FE042823D14FF40053C4F20203196917 -S3150800458041F6DF7201EA02021A611A6942F0100264 -S315080045901A614FF47843C1F6FF731C804FF400503C -S315080045A0FFF70CFE052816D04FF40053C4F2020399 -S315080045B0196941F6EF7201EA02021A6110BD05286F -S315080045C009D04FF40053C4F20203196941F6EF7299 -S315080045D001EA02021A6110BD10B54FF43020FFF748 -S315080045E0EDFD042815D14FF40054C4F202042369E2 -S315080045F043F004032361236943F0400323614FF426 -S315080046003020FFF7DBFD226941F6FB7302EA03035C -S31508004610236110BD38B505464FF43020FFF7CEFDAF -S31508004620042816D14FF40054C4F20204236943F057 -S31508004630020323616561236943F0400323614FF454 -S315080046403020FFF7BBFD226941F6FD7302EA03033A -S31508004650236138BD10B50446FFF78EFD012814BF47 -S3150800466000220122002C0CBF002302F0010333B103 -S31508004670013C0CBF002302F00103002BF8D1002CEB -S3150800468008BF052010BD00BF10B54FF43020FFF756 -S31508004690E1FF042815D14FF40054C4F2020423693B -S315080046A043F004032361236943F0400323614FF475 -S315080046B03020FFF7CFFF226941F6FB7302EA0303B6 -S315080046C0236110BD034628B943F2DB014FF02042AF -S315080046D0116005E043F2D2014FF0204242F8201063 -S315080046E003F101006FF070414FF0204242F82010AC -S315080046F04FF48272CAF2000242F82310704700BFD4 -S3150800470010280CBF60238023CAF200034FF018025A -S315080047101A604FF040025A604FF0FC329A60DA6035 -S31508004720704700BF4FF0A003CAF200034FF018020B -S315080047301A604FF000025A604FF0FC329A60DA6055 -S315080047401A61704710B40268816843681943C368E0 -S315080047501943036919434369194383691943C369AB -S315080047601943036A1943436A1943836A1943C36A97 -S315080047701943036B19434FF0204343F8221083680B -S31508004780082B01BF02684FF0204353F8221041F06E -S31508004790400108BF43F82210026802F10102436B88 -S315080047A09C69196844EA01015C6841EA04119C683D -S315080047B041EA0421DC6841EA04411C6941EA0451E2 -S315080047C05B6941EA03614FF0204343F82210C36A4C -S315080047D0B3F5804F18D10268836B9869196840EA67 -S315080047E00101586841EA0011986841EA00211869F0 -S315080047F041EA00515B6941EA03614FF48273CAF2E8 -S31508004800000343F8221008E002684FF48273CAF2E4 -S3150800481000036FF0704143F8221010BC704700BFC8 -S3150800482030B4446883681C4344F00804C3681C43D6 -S3150800483003691C43436944EA4324836944EA4334CD -S31508004840C3695A689D684FEA054545EA02251A680C -S315080048501543DB6845EA0365036A59689A684FEAAF -S31508004860024242EA012219680A43DB6842EA036205 -S315080048700368102B0CBF60238023CAF200031C6058 -S315080048809D60DA6030BC704710B4026842F01002CE -S31508004890436842EA4322836842EA43324FF0A00360 -S315080048A0CAF200031A60C268546891684FEA014167 -S315080048B041EA042114682143D26841EA02629A60F7 -S315080048C00269546891684FEA014141EA0421146873 -S315080048D02143D26841EA0262DA6042695068916807 -S315080048E04FEA014141EA002110680143D26841EAD2 -S315080048F002621A6110BC704710B44FF000030360DF -S315080049004FF0020242608360C360036143618361C2 -S31508004910C36103624FF4805242624FF400528262CE -S31508004920C3620363416B4FF00F020A60416B4A6032 -S31508004930446B4FF0FF01A160446BE260446B226157 -S31508004940446B6261446BA361846B2260846B626012 -S31508004950846BA160816BCA60816B0A61816B4A6155 -S31508004960826B936110BC70474FF0100303604FF0E1 -S31508004970000343608360C360036143618361C26966 -S315080049804FF0FC031360C2695360C2699360C26941 -S31508004990D360026A1360026A5360026A9360026A0D -S315080049A0D36070474FF00003036043608360C268BA -S315080049B04FF0FC031360C2685360C2689360C26814 -S315080049C0D3600269136002695360026993600269E1 -S315080049D0D3604269136042695360426993604269D1 -S315080049E0D360704741B14FF0204353F8202042F07E -S315080049F0010243F8202070474FF0204252F8201059 -S31508004A004FF6FE73C0F20F0301EA030342F82030A3 -S31508004A10704700BF51B110280CBF60238023CAF22B -S31508004A2000031A6842F004021A60704710280CBF87 -S31508004A3060228022CAF2000211684FF6FB73C0F2A8 -S31508004A400F0301EA03031360704700BF40B14FF03C -S31508004A50A003CAF200031A6842F004021A607047FB -S31508004A604FF0A002CAF2000211684FF6FB73C0F2BB -S31508004A700F0301EA03031360704700BF51B1102802 -S31508004A800CBF60238023CAF200031A6842F0400272 -S31508004A901A60704710280CBF60228022CAF20002F2 -S31508004AA011684FF6BF73C0F20F0301EA03031360E0 -S31508004AB0704700BF102803BF6023CAF20003586975 -S31508004AC080231CBFCAF2000358697047A2B1102898 -S31508004AD007D14FF06003CAF200035A6811435960C0 -S31508004AE07047B0F5807F0CBF8023A023CAF200036D -S31508004AF05A68114359607047102808D14FF060036F -S31508004B00CAF200035A6822EA010159607047B0F5F3 -S31508004B10807F0CBF8023A023CAF200035A6822EACA -S31508004B2001015960704700BF102805D14FF0600396 -S31508004B30CAF200035B6807E0B0F5807F0CBF8023EC -S31508004B40A023CAF200035B680B420CBF00200120B9 -S31508004B50704700BF102808D14FF06003CAF200035F -S31508004B605A6822EA010159607047B0F5807F0CBF88 -S31508004B708023A023CAF200035A6822EA0101596079 -S31508004B80704700BF102805D14FF06003CAF2000332 -S31508004B905B6807E0B0F5807F0CBF8023A023CAF2CC -S31508004BA000035B680B420CBF0020012013EAD10109 -S31508004BB00CBF002000F00100704700BF102808D184 -S31508004BC04FF06003CAF200035A6822EAD10159601D -S31508004BD07047B0F5807F0CBF8023A023CAF200037C -S31508004BE05A6822EAD1015960704700BF08B54FF4E8 -S31508004BF00063C4F2010398420CD14FF004004FF051 -S31508004C00010100F02FFE4FF004004FF0000100F004 -S31508004C1029FE08BD4FF44063C4F2010398420CD143 -S31508004C204FF008004FF0010100F01CFE4FF008009D -S31508004C304FF0000100F016FE08BD4FF48053C4F291 -S31508004C40010398420CD14FF010004FF0010100F01B -S31508004C5009FE4FF010004FF0000100F003FE08BDFA -S31508004C604FF4A053C4F2010398420CD14FF0200030 -S31508004C704FF0010100F0F6FD4FF020004FF0000163 -S31508004C8000F0F0FD08BD4FF4C053C4F2010398428A -S31508004C900CD14FF040004FF0010100F0E3FD4FF05A -S31508004CA040004FF0000100F0DDFD08BD4FF4E05371 -S31508004CB0C4F2010398420CD14FF080004FF0010175 -S31508004CC000F0D0FD4FF080004FF0000100F0CAFD63 -S31508004CD008BD4FF40053C4F2010398420BD14FF4B8 -S31508004CE080704FF0010100F0BDFD4FF480704FF069 -S31508004CF0000100F0B7FD08BD08B54FF001000146F8 -S31508004D0000F0B0FD4FF001004FF0000100F0AAFDE1 -S31508004D1008BD00BF2DE9F003CB7803F00F0513F0AB -S31508004D20100F1CBF8B781D430B7833B3D0F800C027 -S31508004D304FF000034FF001064FF00F0806FA03F292 -S31508004D400C8802EA0404944211D14FEA830708FA50 -S31508004D5007F92CEA090C05FA07F74CEA070CCF788D -S31508004D60282F08BF446102D0482F08BF026103F10B -S31508004D700103082BE2D1C0F800C00B88FF2B28D905 -S31508004D80D0F804C04FF000034FF001064FF00F08AB -S31508004D9003F1080206FA02F20C8802EA04049442B5 -S31508004DA011D14FEA830708FA07F92CEA090C05FA24 -S31508004DB007F74CEA070CCF78282F08BF4461CC7850 -S31508004DC0482C08BF026103F10103082BE0D1C0F8A3 -S31508004DD004C0BDE8F00370474FF0FF3303804FF07F -S31508004DE0020383704FF00403C37070478368194247 -S31508004DF00CBF002001207047806880B2704700BF52 -S31508004E00C36819420CBF002001207047C06880B2F1 -S31508004E10704700BF01617047416170470AB101617F -S31508004E2070474161704700BFC160704741F48033E5 -S31508004E3083618161836183698369704710B44FF028 -S31508004E400003C4F201031C684FF6807204EA0202EA -S31508004E5041EA001141EA02021A6010BC704700BF1D -S31508004E604FF01C03C4F220231860704730B40028A2 -S31508004E704FF00003C4F20103B4BFDB695B6884B278 -S31508004E8000F44012B2F5401F0AD123F070634FF0C8 -S31508004E900002C4F20102556825F07065556010E0FD -S31508004EA010F4801F1DBFC0F30342032505FA02F262 -S31508004EB0420D04BF120104FA02F223EA020343F088 -S31508004EC0706331B14FEA50524FEA021204FA02F403 -S31508004ED0234300284FF00002C4F20102B4BFD36195 -S31508004EE0536030BC704700BF30B401F003024FEA8C -S31508004EF082024FEA91014FF00003C4F2010301F167 -S31508004F00020153F821504FF00F0404FA02F425EA7F -S31508004F10040443F8214053F8214000FA02F242EA19 -S31508004F20040443F8214030BC704700BF4FF0DC034F -S31508004F30C4F220231860704708B54FF4A843C4F29A -S31508004F40000398420CD14FF400104FF0010100F015 -S31508004F509BFC4FF400104FF0000100F095FC08BDD3 -S31508004F604FF480004FF0010100F08EFC4FF48000F2 -S31508004F704FF0000100F088FC08BD00BF70B586B090 -S31508004F8004460D46868826F03F064FEA06464FEA4F -S31508004F90164601A800F0BEFB03994DF68362C4F2DB -S31508004FA01B32A2FB01024FEA924242EA0606A6809B -S31508004FB0238823F001034FEA03434FEA1343238070 -S31508004FC02B6848F2A060C0F2010083420BD84FEA72 -S31508004FD04303B1FBF3F189B202F1010222840329EA -S31508004FE098BF04212EE0EE884BF6FF70864203BF79 -S31508004FF003EB4303B1FBF3F189B203EB83031FBF52 -S3150800500003EB8303B1FBF3F189B241F480414FEA24 -S3150800501001534FEA13530BB941F001016FEA4141BD -S315080050206FEA514189B24FF4967303FB02F244F6D4 -S31508005030D353C1F2620383FB02034FEAA31303F1BE -S3150800504001032384A18323889BB243F001032380B1 -S31508005050238823F4806323F00A034FEA03434FEAC5 -S3150800506013436989AA8841EA020213439BB2238043 -S315080050702A89AB8942EA03039BB2238106B070BD35 -S3150800508041F2883303604FF0000383804BF6FF72CA -S31508005090C280038143814FF480438381704700BFF8 -S315080050A029B103889BB243F0010303807047038844 -S315080050B023F001034FEA03434FEA13430380704783 -S315080050C029B183889BB243F4006383807047838841 -S315080050D023F400634FEA03434FEA13438380704780 -S315080050E029B183889BB243F48053838070478388B1 -S315080050F023F480534FEA03434FEA134383807047F0 -S3150800510029B103889BB243F48073038070470388F0 -S3150800511023F480734FEA03434FEA1343038070472F -S3150800512029B103889BB243F4007303807047038850 -S3150800513023F400734FEA03434FEA1343038070478F -S3150800514029B103889BB243F48063038070470388C0 -S3150800515023F480634FEA03434FEA134303807047FF -S31508005160838901F0FE0123F0FE034FEA03434FEA69 -S31508005170134341EA03038381704700BF29B183893A -S315080051809BB243F0010383817047838923F00103AF -S315080051904FEA03434FEA13438381704729B10388D3 -S315080051A09BB243F0400303807047038823F0400313 -S315080051B04FEA03434FEA13430380704722B18388BB -S315080051C09BB219438180704783889BB223EA010109 -S315080051D08180704701827047008AC0B2704700BF5D -S315080051E012B141F0010101E001F0FE0101827047B0 -S315080051F082B04FF0000301930190019BCB180193F5 -S31508005200019B188880B202B0704700BF39B1038885 -S315080052106FEA43436FEA53439BB2038070470388A0 -S315080052204FEA43434FEA534303807047B1F5006F93 -S31508005230038807BF9BB243F4006323F400631B048F -S3150800524018BF1B0C03807047B1F5005F038807BFC2 -S315080052509BB243F4005323F400531B0418BF1B0CE2 -S315080052600380704729B103889BB243F480530380B7 -S315080052707047038823F480534FEA03434FEA1343E6 -S3150800528003807047B1F5006F038807BF9BB243F4EC -S31508005290006323F400631B0418BF1B0C03807047CC -S315080052A029B103889BB243F0200303807047038823 -S315080052B023F020034FEA03434FEA13430380704762 -S315080052C0008BC0F30720704729B103889BB243F0CF -S315080052D0100303807047038823F010034FEA034343 -S315080052E04FEA13430380704729B903889BB243F0FA -S315080052F0800303807047038823F080034FEA034343 -S315080053004FEA134303807047B1F5804F838B1DBF67 -S3150800531023F480431B041B0C9BB208BF43F4804351 -S3150800532083837047838A9BB2008B43EA0040084018 -S3150800533020F07F40814214BF00200120704700BF43 -S31508005340838A9BB2008B43EA004020F07F40704777 -S3150800535082B04FF000030193009300904FEA117357 -S31508005360019321F07F41019B23B1009B03F11403B4 -S31508005370009305E04FEA1141009B03F118030093DF -S31508005380009B1B6819420CBF0020012002B0704721 -S315080053906FEA010189B28182704700BF83889AB299 -S315080053A0838A9BB20B4207D001F0E06112EA1141F1 -S315080053B00CBF0020012070474FF00000704700BF67 -S315080053C06FEA010189B28182704700BF4FF44053EA -S315080053D0C4F20003186070474FF44053C4F2000348 -S315080053E0586070474FF44053C4F200039860704702 -S315080053F04FF44053C4F200034AF6AA221A607047D3 -S315080054004FF44053C4F200034CF6CC421A6070477E -S315080054104FF44053C4F20003DB6818420CBF002067 -S315080054200120704730BF704708B54FF080504FF0E5 -S31508005430010100F029FA4FF080504FF0000100F00A -S3150800544023FA08BD4FF02003C4F20E2318607047F4 -S315080054504FF01003C4F20E23186070474FF4E04370 -S31508005460C4F200031A6822F0E00240EA02021A6057 -S31508005470704700BF4FF0A003C4F20E2318607047B0 -S3150800548008B54FF4E043C4F200031A6822F0030299 -S3150800549040EA02021A604FF46D43CEF200031A691D -S315080054A042F004021A61012902D1FFF7BBFF00E0AE -S315080054B020BF4FF46D43CEF200031A6922F00402AE -S315080054C01A6108BD08B54FF4E043C4F200031A6830 -S315080054D042F004021A601A6842F002021A604FF497 -S315080054E06D43CEF200031A6942F004021A61FFF70F -S315080054F099FF08BD4FF4E043C4F200035B68184205 -S315080055000CBF0020012070474FF4E043C4F20003AB -S315080055101A6842EA80021A60704700BF4FF4805347 -S31508005520C4F202031A6842F001021A6059684FF081 -S315080055300002CFF6FF0201EA02025A601A6822F058 -S31508005540847222F480321A601A6822F480221A6061 -S315080055505A6822F4FE025A604FF41F029A60704796 -S315080055604FF48053C4F202031A6822F480321A6098 -S315080055701A6822F480221A60B0F5803F03D0B0F58D -S31508005580802F11D108E04FF48053C4F202031A6841 -S3150800559042F480321A6070474FF48053C4F2020313 -S315080055A01A6842F4A0221A60704700BF4FF480536D -S315080055B0C4F202031A6822F0F80242EAC0021A602C -S315080055C0704700BF4FF00003C4F2422318607047CB -S315080055D04FF48053C4F202035A6822F47C1240EA5C -S315080055E002020A435A6070474FF06003C4F242232E -S315080055F0186070474FF48053C4F202035A6822F0C9 -S31508005600030240EA02025A60704700BF4FF4805313 -S31508005610C4F20203586800F00C0070474FF4805338 -S31508005620C4F202035A6822F0F00240EA02025A6003 -S31508005630704700BF4FF48053C4F202035A6822F43D -S31508005640E06240EA02025A60704700BF4FF4805396 -S31508005650C4F202035A6822F4605242EAC0025A604F -S31508005660704700BF39B141F20903C4F202031A7840 -S3150800567010431870704741F20903C4F202031A78FE -S3150800568022EA0000187070474FF0D803C4F242238C -S31508005690186070474FF48053C4F202035A6822F424 -S315080056A0404240EA02025A60704700BF4FF48153F5 -S315080056B0C4F202034FF000021A701A70012802D0D1 -S315080056C004280FD107E04FF48153C4F202034FF0C8 -S315080056D001021A7070474FF48153C4F202034FF067 -S315080056E005021A70704700BF4FF49063C4F2422354 -S315080056F0186070474FF48053C4F202031A6A40EAEE -S3150800570002021A62704700BF40F23C43C4F24223C9 -S315080057101860704710B44FF48053C4F202035B68F4 -S3150800572003F00C03042B02BF4FF49053C0F27A0324 -S31508005730036036D0082B06D073BB4FF49053C0F2E3 -S315080057407A0303602DE04FF48053C4F202035A68CB -S315080057505B68C2F3834202F1020213F4803F07D169 -S315080057604FF41063C0F23D0303FB02F2026018E037 -S315080057704FF48053C4F202035B6813F4003F19BF69 -S315080057804FF41063C0F23D034FF49053C0F27A030E -S3150800579003FB02F2026004E04FF49053C0F27A036E -S315080057A003604FF48053C4F202035968C1F303112E -S315080057B040F21802C2F20002515C046824FA01F1B0 -S315080057C041605C68C4F30224145D21FA04F4846021 -S315080057D05C68C4F3C224125D21FA02F1C1605A68FA -S315080057E0C2F3813240F21403C2F200039B5CB1FBA0 -S315080057F0F3F1016110BC704739B14FF48053C4F21C -S3150800580002035A691043586170474FF48053C4F233 -S3150800581002035A6922EA00005861704739B14FF409 -S315080058208053C4F202039A691043986170474FF493 -S315080058308053C4F202039A6922EA0000986170470D -S3150800584039B14FF48053C4F20203DA691043D861C0 -S3150800585070474FF48053C4F20203DA6922EA000063 -S31508005860D861704739B14FF48053C4F20203DA683D -S315080058701043D86070474FF48053C4F20203DA68C5 -S3150800588022EA0000D860704739B14FF48053C4F259 -S3150800589002031A691043186170474FF48053C4F223 -S315080058A002031A6922EA0000186170474FF48863F8 -S315080058B0C4F24223186070474FF04C03C4F24223E7 -S315080058C01860704741F20703C4F202031870704764 -S315080058D04FEA5013012B05D14FF48053C4F202034B -S315080058E01B6807E0022B4FF48053C4F202030CBF77 -S315080058F01B6A5B6A00F01F0023FA00F000F0010043 -S31508005900704700BF10B582B04FF0000301934FF007 -S3150800591031042046FFF7DCFF019B03F101030193E5 -S31508005920019BB3F5A06F01D00028F2D04FF03100EB -S31508005930FFF7CEFF003818BF012002B010BD00BF28 -S315080059404FF48053C4F202035A6A42F080725A62D4 -S31508005950704700BF4FF48053C4F202039B68184295 -S315080059600CBF00200120704741F20A03C4F202036B -S315080059701870704741B14FF42053C4F200031A88D7 -S3150800598092B21043188070474FF42053C4F20003B4 -S315080059901A8892B222EA0000188070474FF4205302 -S315080059A0C4F200039A8892B242F010029A807047B5 -S315080059B04FF42052C4F20002938823F010034FEAF2 -S315080059C003434FEA13439380704700BF4FF42053B5 -S315080059D0C4F200039A8B92B2188B42EA00407047D1 -S315080059E010B50446FFF7DAFF4FEA14424FF4205386 -S315080059F0C4F200031A83A4B29C83FFF7D9FF10BD33 -S31508005A0010B50446FFF7CAFFC4F303424FF4205308 -S31508005A10C4F200031A81A4B29C81FFF7C9FF10BD26 -S31508005A2010B50446FFF7BAFF4FEA14424FF4205365 -S31508005A30C4F200031A84A4B29C84FFF7B9FF10BD10 -S31508005A404FF42053C4F20003188A00F00F009B8A13 -S31508005A509BB243EA004070474FF42052C4F200025A -S31508005A60938813F0200FFBD0704700BF4FF42052E5 -S31508005A70C4F20002938823F008034FEA03434FEA6F -S31508005A80134393804FF42052C4F20002938813F014 -S31508005A90080FFBD0704700BF4FF42053C4F2000331 -S31508005AA09B8818420CBF0020012070474FF42053F2 -S31508005AB0C4F200039A8892B222EA00029A807047DA -S31508005AC04FF42053C4F200039A8892B21B881842F6 -S31508005AD007D000EA020212F0FF0F0CBF00200120D7 -S31508005AE070474FF0000070474FF42053C4F200038C -S31508005AF09A8892B222EA00029A8070474FF40043CD -S31508005B00C4F201034FF000021A605A609A60DA6024 -S31508005B105A629A62DA6240F2FF71C0F2C001996372 -S31508005B20DA63704710B44FF40043C4F201035968AE -S31508005B304468826844EA0202C4682243046822432D -S31508005B400469224321F4FC4121F0FF010A43017D47 -S31508005B500A435A6010BC70474FF000030375036090 -S31508005B6043608360C3600361704700BF4FF0A003C2 -S31508005B70C4F23023186070474FF40043C4F201039F -S31508005B801A6822F003021A601A6840EA02021A60CA -S31508005B90704700BF4FF40043C4F20103186800F0D1 -S31508005BA00300704739B14FF40043C4F20103DA6BBE -S31508005BB01043D86370474FF40043C4F20103DA6B0D -S31508005BC022EA0000D863704740F28C53C4F23023AF -S31508005BD01860704710B402684FF40043C4F201031A -S31508005BE09A60D96821F4FE6121F00F018468426841 -S31508005BF044EA0202C4682243006902430A43DA609F -S31508005C0010BC70474FF00003036043608360C360B5 -S31508005C10036170474FF40043C4F201031869C0B228 -S31508005C20704700BF82B04FF00003019348F2140397 -S31508005C30C4F20103C3180193019B186802B07047A8 -S31508005C4010B402684FF40043C4F201035A62426872 -S31508005C509A62D96A21F0F701C468826844EA0202A6 -S31508005C6004692243406902430A43DA6210BC70475A -S31508005C704FF0FF3303604FF0000343608360C36057 -S31508005C8003614361704700BF4FF40043C4F2010348 -S31508005C90186B70474FF40043C4F20103D3F8800031 -S31508005CA0704700BF4FF40043C4F20103C3F88000F5 -S31508005CB0704700BF4FF40043C4F20103986C704765 -S31508005CC04FF4B463C4F230231860704740F2A4530B -S31508005CD0C4F23023186070474FF4B563C4F230231A -S31508005CE01860704740F2AC53C4F23023186070470E -S31508005CF04FF4D673C4F23023186070474FF4D87344 -S31508005D00C4F230231860704710F0010F14BF002248 -S31508005D1001224FF4DA73C4F230231A60704700BFC9 -S31508005D204FF4DC73C4F23023186070474FF4004315 -S31508005D30C4F201035B6B18420CBF002001207047B8 -S31508005D404FF40043C4F20103986370474FF40043CD -S31508005D50C4F201035B6B18420CBF00200120704798 -S31508005D604FF40043C4F201039863704708B54FF433 -S31508005D704053C4F2010398420CD14FF480504FF0BF -S31508005D800101FFF76FFD4FF480504FF00001FFF758 -S31508005D9069FD08BD4FF46053C4F2000398420CD164 -S31508005DA04FF480404FF00101FFF76EFD4FF480403D -S31508005DB04FF00001FFF768FD08BD4FF47053C4F2B9 -S31508005DC0000398420BD14FF400404FF00101FFF752 -S31508005DD05BFD4FF400404FF00001FFF755FD08BD8D -S31508005DE010B4028802F441524C880B8844EA030333 -S31508005DF08C882343CC8823430C8923434C8923432B -S31508005E008C892343CC89234342EA03039BB203804C -S31508005E10838B23F400634FEA03434FEA13438383D8 -S31508005E200B8A038210BC7047F0B587B005460C464E -S31508005E30838B23F47A6323F01F034FEA03434FEA65 -S31508005E40134383834FF002010184868BB6B2A3689D -S31508005E50022B04BF002202233CD0A788002F14BFC0 -S31508005E600227012701A8FFF755FC019AE388B3F535 -S31508005E70007F0CD14FEA122202EB82024FEA42035C -S31508005E80A168B3FBF1F303F105039BB20DE04FEAFA -S31508005E904717B2FBF7F707EB87074FEA4703A268EE -S31508005EA0B3FBF2F303F105039BB24CF6CD42CCF6F5 -S31508005EB0CC42A2FB03134FEAD30303F001024FEAD5 -S31508005EC05303A3F1020189B2FD2999BF120292B2C6 -S31508005ED0002202231343E28813432B84238846EACD -S31508005EE0030343F4006362881343A2881343A28919 -S31508005EF013439BB2AB8307B0F0BD00BF4FF000035E -S31508005F00038043808380C380038143818381C38167 -S31508005F104FF00703038270474FF000030380438066 -S31508005F208380C3804FF0020282608381704700BF7E -S31508005F3029B103889BB243F0400303807047038866 -S31508005F4023F040034FEA03434FEA134303807047A5 -S31508005F5029B1838B9BB243F4806383837047838B19 -S31508005F6023F480634FEA03434FEA1343838370475E -S31508005F704FEA11114FF0010303FA01F39BB222B164 -S31508005F80828892B2134383807047828892B222EA4B -S31508005F9003038380704700BF22B183889BB21943ED -S31508005FA08180704783889BB223EA0101818070470C -S31508005FB081817047808980B2704700BF4FF6FF63C2 -S31508005FC09942038819BF9BB243F4807323F4807304 -S31508005FD01B0408BF1B0C0380704700BF29B18388C8 -S31508005FE09BB243F0040383807047838823F004033D -S31508005FF04FEA03434FEA134383807047038823F429 -S3150800600000634FEA03434FEA1343038003889BB2B6 -S3150800601041EA03030380704703889BB243F4805325 -S315080060200380704729B103889BB243F40053038069 -S315080060307047038823F400534FEA03434FEA134398 -S3150800604003807047012919BF008B80B2808A80B20D -S31508006050704700BF008A80B2704700BFB1F5804F15 -S31508006060038807BF9BB243F4804323F480431B0491 -S3150800607018BF1B0C03807047038919420CBF002008 -S31508006080012070476FEA010189B20181704700BF9C -S3150800609010B483889CB2028992B201F00F034FF0C4 -S315080060A0010000FA03F31A4208BF002007D04FEA9E -S315080060B0111100FA01F10C420CBF0020012010BC9E -S315080060C0704700BF01F00F014FF0010303FA01F317 -S315080060D06FEA03039BB20381704700BF70B4048C58 -S315080060E024F001044FEA04444FEA14440484048B60 -S315080060F0058CADB224F0F3044FEA04444FEA144485 -S3150800610042EA040444EA0314A4B24FF43052C4F237 -S3150800611001024FF45056C4F20106B04214BF0026DD -S315080061200126904214BF324646F00102FAB94FF4EE -S315080061308063C4F20003984214BF00230123B0F120 -S31508006140804F08BF43F001038BB94FF40063C4F2D4 -S3150800615000034FF44062C4F20002904214BF0022CA -S315080061600122984214BF134642F0010333B125F0C9 -S31508006170020545F0010545EA010105E025F00A0595 -S3150800618045F0010545EA01010483018470BC7047A6 -S3150800619030B4048C24F010044FEA04444FEA144443 -S315080061A00484048B058CADB224F440744FEA04547D -S315080061B04FEA145444EA022444EA0334A4B24FF4DE -S315080061C03053C4F201034FF45052C4F20102904214 -S315080061D014BF00220122984214BF134642F001035D -S315080061E0FBB94FF48063C4F20003984214BF00233E -S315080061F00123B0F1804F08BF43F001038BB94FF478 -S315080062000063C4F200034FF44062C4F200029042F5 -S3150800621014BF00220122984214BF134642F001031C -S315080062203BB125F0200545F0100545EA011189B274 -S3150800623005E025F0A00545F0100545EA01010483AF -S31508006240018430BC704700BF08B54FF43053C4F220 -S31508006250010398420CD14FF400604FF00101FFF79B -S3150800626001FB4FF400604FF00001FFF7FBFA08BD91 -S31508006270B0F1804F0BD14FF001000146FFF704FB48 -S315080062804FF001004FF00001FFF7FEFA08BD4FF48A -S315080062908063C4F2000398420CD14FF002004FF01D -S315080062A00101FFF7F1FA4FF002004FF00001FFF786 -S315080062B0EBFA08BD4FF40063C4F2000398420CD110 -S315080062C04FF004004FF00101FFF7DEFA4FF004002B -S315080062D04FF00001FFF7D8FA08BD4FF44063C4F247 -S315080062E0000398420CD14FF008004FF00101FFF768 -S315080062F0CBFA4FF008004FF00001FFF7C5FA08BDCA -S315080063004FF48053C4F2000398420CD14FF01000AA -S315080063104FF00101FFF7B8FA4FF010004FF00001F7 -S31508006320FFF7B2FA08BD4FF4A053C4F2000398422F -S315080063300CD14FF020004FF00101FFF7A5FA4FF0FE -S3150800634020004FF00001FFF79FFA08BD4FF45053A5 -S31508006350C4F2010398420CD14FF400504FF00101EA -S31508006360FFF780FA4FF400504FF00001FFF77AFA72 -S3150800637008BD4FF49843C4F2010398420CD14FF478 -S3150800638000204FF00101FFF76DFA4FF400204FF09F -S315080063900001FFF767FA08BD4FF4A043C4F20103F2 -S315080063A098420CD14FF480104FF00101FFF75AFACA -S315080063B04FF480104FF00001FFF754FA08BD4FF470 -S315080063C0A843C4F2010398420CD14FF400104FF0D1 -S315080063D00101FFF747FA4FF400104FF00001FFF7ED -S315080063E041FA08BD4FF4C053C4F2000398420CD1D9 -S315080063F04FF040004FF00101FFF746FA4FF040001A -S315080064004FF00001FFF740FA08BD4FF4E053C4F21D -S31508006410000398420CD14FF080004FF00101FFF7BE -S3150800642033FA4FF080004FF00001FFF72DFA08BD50 -S315080064304FF40053C4F2000398420CD14FF4807015 -S315080064404FF00101FFF720FA4FF480704FF000017A -S31508006450FFF71AFA08BD4FF48043C4F201039842C5 -S315080064600CD14FF480304FF00101FFF7FBF94FF4E0 -S3150800647080304FF00001FFF7F5F908BD4FF4884367 -S31508006480C4F2010398420CD14FF400304FF00101D9 -S31508006490FFF7E8F94FF400304FF00001FFF7E2F993 -S315080064A008BD4FF49043C4F2010398420BD14FF450 -S315080064B080204FF00101FFF7D5F94FF480204FF007 -S315080064C00001FFF7CFF908BD30B403889BB24FF43B -S315080064D03052C4F201024FF45054C4F20104A042EF -S315080064E014BF00240124904208BF44F00104FCB9FB -S315080064F04FF48062C4F20002904214BF00220122C7 -S31508006500B0F1804F08BF42F001028AB94FF4006229 -S31508006510C4F200024FF44065C4F20005A84214BF55 -S3150800652000250125904214BF2A4645F0010232B1E2 -S315080065304FF68F7203EA02024B8842EA03034FF4CE -S315080065408052C4F200024FF4A055C4F20005451B60 -S3150800655018BF012590420CBF002205F0010232B196 -S315080065604FF6FF4203EA0202CB8842EA030303809E -S315080065708B8883850B880385BCB94FF48043C4F2A6 -S3150800658001034FF48842C4F20102904214BF00226C -S315080065900122984214BF134642F001032BB94FF467 -S315080065A09043C4F20103984201D10B7A03864FF057 -S315080065B00103838230BC704770B4038C23F0010357 -S315080065C04FEA03434FEA13430384038C8488A4B237 -S315080065D0028B22F073024FEA02424FEA12420D88FA -S315080065E02A4323F002034FEA03434FEA13434E8834 -S315080065F00D8946EA0505ADB245EA03034FF4305561 -S31508006600C4F201054FF45056C4F20106B04214BF55 -S3150800661000260126A84214BF354646F00105BDB935 -S315080066204FF48045C4F201054FF48846C4F20106CA -S31508006630B04214BF00260126A84214BF354646F0CC -S3150800664001052DB94FF49045C4F20105A84215D1AC -S315080066504FF6F77503EA05054B891D434FF6FB739D -S3150800666005EA03038D882B434FF6FF4504EA050523 -S31508006670CE898C8946EA0404A4B22C43848002831A -S31508006680CA888286038470BC704700BF70B4038CC6 -S3150800669023F010034FEA03434FEA13430384038CA2 -S315080066A08488A4B2028B22F4E6424FEA02424FEAF9 -S315080066B012420D8842EA052292B223F020034FEADD -S315080066C003434FEA13430D8943EA05134D8843EA0A -S315080066D005139BB24FF43055C4F201054FF45056DA -S315080066E0C4F20106B04214BF00260126A84214BF10 -S315080066F0354646F00105CDB14FF67F7503EA050527 -S315080067004B8945EA03154FF6BF7305EA03038D88DF -S3150800671043EA05139BB24FF2FF3504EA05058C8957 -S3150800672045EA8405CC8945EA8404A4B284800283B8 -S31508006730CA880287038470BC704700BF70B4038C94 -S3150800674023F480734FEA03434FEA13430384038C0D -S315080067508488A4B2828B22F073024FEA02424FEA7F -S3150800676012420D882A4323F400734FEA03434FEA83 -S3150800677013430D8943EA05234D8843EA05239BB253 -S315080067804FF43055C4F201054FF45056C4F20106D1 -S31508006790B04214BF00260126A84214BF354646F06B -S315080067A00105CDB14FF2FF7503EA05054B8945EAA8 -S315080067B003254FF6FF3305EA03038D8843EA0523CD -S315080067C09BB24CF6FF7504EA05058C8945EA041563 -S315080067D0CC8945EA0414A4B284808283CA88828755 -S315080067E0038470BC704700BF70B4038C23F48053D5 -S315080067F04FEA03434FEA13430384038C8488A4B205 -S31508006800828B22F4E6424FEA02424FEA12420D8890 -S3150800681042EA052292B223F400534FEA03434FEAB1 -S3150800682013430D8943EA05334D8843EA05339BB282 -S315080068304FF43055C4F201054FF45056C4F2010620 -S31508006840B04214BF00260126A84214BF354646F0BA -S3150800685001053DB14BF6FF7504EA05058C8945EA45 -S315080068608414A4B284808283CA88A0F84020038452 -S3150800687070BC70474A880B8842EA03038A88134328 -S31508006880CA8813430A8913434A8913438A891343D7 -S315080068909BB2A0F8443070474FF0FF3383804FF027 -S315080068A000030380C3804380037270474FF00003E0 -S315080068B0038043808380C380038143818381C381AE -S315080068C0704700BF4FF00003038043804FF001027A -S315080068D08280C380038170474FF0000303804380A2 -S315080068E08380C380038143818381704729B10388EC -S315080068F09BB243F0010303807047038823F001032A -S315080069004FEA03434FEA13430380704749B1B0F88F -S3150800691044306FEA43436FEA53439BB2A0F84430CE -S315080069207047B0F844304FEA43434FEA5343A0F860 -S315080069304430704722B183899BB2194381817047DD -S3150800694083899BB223EA010181817047818270475E -S315080069500A43A0F84820704722B183899BB219439D -S315080069608181704783899BB223EA0101818170473F -S31508006970038923F007034FEA03434FEA13430381CE -S31508006980704700BF10B40489E4B241EA040442EA3D -S31508006990040444EA0324A4B2048110BC704700BF6F -S315080069A010B50446FFF7EEFF23899BB243F48043F4 -S315080069B0238110BD10B50446FFF7E4FF238923F0B1 -S315080069C077034FEA03434FEA134343F077032381E0 -S315080069D010BD00BF01858282704700BF038823F07F -S315080069E070034FEA03434FEA134341EA0303038064 -S315080069F0704700BF038923F070034FEA03434FEA49 -S31508006A00134341EA03030381704700BF38B50446C0 -S31508006A100D46602905D111464FF00102FFF7B8FB74 -S31508006A2004E011464FF00102FFF758FB20462946BD -S31508006A30FFF7E0FF23899BB243F00703238138BDA4 -S31508006A4010B50446FFF7D6FF23899BB243F0070328 -S31508006A50238110BD70B40489068B058C24F00704C5 -S31508006A604FEA04444FEA1444214326F4407626F0BC -S31508006A7003064FEA06464FEA164646F4807646F07F -S31508006A80010625F022054FEA05454FEA154542EA73 -S31508006A90050545EA0315ADB201810683058470BC78 -S31508006AA0704700BF038B23F070034FEA03434FEA96 -S31508006AB0134341EA03030383704700BF038B23F4A0 -S31508006AC0E0434FEA03434FEA134343EA01239BB2E9 -S31508006AD003837047838B23F070034FEA03434FEA1F -S31508006AE0134341EA03038383704700BF838B23F470 -S31508006AF0E0434FEA03434FEA134343EA01239BB2B9 -S31508006B008383704729B103889BB243F080030380CF -S31508006B107047038823F080034FEA03434FEA134381 -S31508006B200380704729B183889BB243F004038380AE -S31508006B307047838823F004034FEA03434FEA13435D -S31508006B408380704729B183889BB243F0080383800A -S31508006B507047838823F008034FEA03434FEA134339 -S31508006B608380704729B183889BB243F001038380F1 -S31508006B707047838823F001034FEA03434FEA134320 -S31508006B8083807047038B23F008034FEA03434FEAD9 -S31508006B90134341EA03030383704700BF038B23F4BF -S31508006BA000634FEA03434FEA134343EA01239BB2C8 -S31508006BB003837047838B23F008034FEA03434FEAA6 -S31508006BC0134341EA03038383704700BF838B23F48F -S31508006BD000634FEA03434FEA134343EA01239BB298 -S31508006BE083837047038B23F004034FEA03434FEA7A -S31508006BF0134341EA03030383704700BF038B23F45F -S31508006C0080634FEA03434FEA134343EA01239BB2E7 -S31508006C1003837047838B23F004034FEA03434FEA49 -S31508006C20134341EA03038383704700BF838B23F42E -S31508006C3080634FEA03434FEA134343EA01239BB2B7 -S31508006C4083837047038B23F080034FEA03434FEA9D -S31508006C50134341EA03030383704700BF038B4FEADC -S31508006C6043434FEA534343EA01239BB203837047E6 -S31508006C70838B23F080034FEA03434FEA134341EA29 -S31508006C8003038383704700BF838B4FEA43434FEA6E -S31508006C90534343EA01239BB283837047038C23F053 -S31508006CA002034FEA03434FEA134341EA030303840B -S31508006CB0704700BF038C23F008034FEA03434FEAEB -S31508006CC0134341EA03030384704700BF038C23F090 -S31508006CD020034FEA03434FEA134343EA01139BB2E7 -S31508006CE003847047038C23F080034FEA03434FEA7B -S31508006CF0134343EA01139BB203847047038C23F4BE -S31508006D0000734FEA03434FEA134343EA01239BB256 -S31508006D1003847047038C23F400634FEA03434FEA66 -S31508006D20134343EA01239BB203847047038C23F47D -S31508006D3000534FEA03434FEA134343EA01339BB236 -S31508006D400384704710B4048CA4B24FF0010303FA0D -S31508006D5001F324EA03030384038C02FA01F141EAEE -S31508006D6003039BB2038410BC704700BF10B4048CA5 -S31508006D70A4B24FF0040303FA01F324EA03030384DD -S31508006D80038C02FA01F141EA03039BB2038410BCA7 -S31508006D90704700BF30B400F11803058CADB24FF050 -S31508006DA0010404FA01F425EA04040484082914BF3A -S31508006DB000200120002908BF40F0010050B14FEA29 -S31508006DC05101C85820F07000C850C85840EA02025D -S31508006DD0CA500EE0A1F10401C1F34E01C85820F4CF -S31508006DE0E040C850C8584FEA022292B240EA02026E -S31508006DF0CA5030BC704700BF29B103889BB243F024 -S31508006E00020303807047038823F002034FEA034313 -S31508006E104FEA13430380704729B103889BB243F0B6 -S31508006E20040303807047038823F004034FEA0343EF -S31508006E304FEA13430380704729B183889BB243F016 -S31508006E40800383807047838823F080034FEA0343D7 -S31508006E504FEA134383807047038823F008034FEAF9 -S31508006E6003434FEA1343038003889BB241EA0303B3 -S31508006E7003807047838823F070034FEA03434FEA81 -S31508006E801343838083889BB241EA03038380704758 -S31508006E90038923F007034FEA03434FEA13430381A9 -S31508006EA003899BB241EA030303817047038923F0F0 -S31508006EB080034FEA03434FEA1343038103899BB2D6 -S31508006EC041EA0303038170478184704781857047CF -S31508006ED0818670470187704781877047A0F8401000 -S31508006EE0704700BF038B23F00C034FEA03434FEAB6 -S31508006EF013430383038B9BB241EA0303038370475F -S31508006F00038B23F440634FEA03434FEA1343038397 -S31508006F10038B9BB243EA01239BB20383704700BFEE -S31508006F20F8B505460C46498800290CBF02260026F6 -S31508006F30A288012A14BF0127022723888BB923892F -S31508006F40FFF7CCF82846E188FFF7CCFF28463146FC -S31508006F503A462389FFF71CF92846E188FFF7D0FF50 -S31508006F60F8BD2389FFF714F92846E188FFF7C8FF1B -S31508006F70284631463A462389FFF7B0F82846E1887D -S31508006F80FFF7B0FFF8BD00BF838B23F00C034FEA71 -S31508006F9003434FEA13438383838B9BB241EA03037C -S31508006FA083837047838B23F440634FEA03434FEA96 -S31508006FB013438383838B9BB243EA01239BB2838368 -S31508006FC0704700BFF8B504460D460B884BB949888B -S31508006FD0AA882B89FFF782F82046E988FFF782FFFF -S31508006FE0F8BD042B09D14988AA882B89FFF7D0F860 -S31508006FF02046E988FFF784FFF8BD082B60D14E8844 -S3150800700089882889228C22F480724FEA02424FEA44 -S3150800701012422284A38B278CBFB223F0F3034FEAD4 -S3150800702003434FEA134343EA00139BB20B434FF45F -S315080070303052C4F201024FF45051C4F201018C429D -S3150800704014BF00210121944214BF0A4641F00102EF -S31508007050FAB94FF48062C4F20002944214BF0022C7 -S315080070600122B4F1804F08BF42F001028AB94FF4F9 -S315080070700062C4F200024FF44061C4F200018C427F -S3150800708014BF00210121944214BF0A4641F00102AF -S315080070903AB127F4007747EA0626B6B246F4807670 -S315080070A007E04FF2FF5207EA020246F4807642EA08 -S315080070B00606A38326842046E988FFF765FFF8BD00 -S315080070C04E8888880989228C22F480524FEA024227 -S315080070D04FEA12422284A38B228C97B223F4407380 -S315080070E04FEA03534FEA135343EA002343EA0133B3 -S315080070F09BB24FF43052C4F201024FF45051C4F21D -S3150800710001018C4214BF00210121944214BF0A4692 -S3150800711041F00102FAB94FF48062C4F200029442C7 -S3150800712014BF00220122B4F1804F08BF42F00102C9 -S315080071308AB94FF40062C4F200024FF44061C4F207 -S3150800714000018C4214BF00210121944214BF0A4653 -S3150800715041F001023AB127F4005747EA0636B6B2BB -S3150800716046F4805607E047F6FF5207EA020246F45D -S31508007170805642EA0606A38326842046E988FFF756 -S3150800718011FFF8BD038823F440734FEA03434FEA1F -S315080071901343038003889BB241EA030303807047C5 -S315080071A0808E80B2704700BF008F80B2704700BFE4 -S315080071B0808F80B2704700BFB0F8400080B2704739 -S315080071C0808C80B2704700BF008D80B2704700BFC8 -S315080071D0038A19420CBF0020012070476FEA01019B -S315080071E089B20182704700BF028A838911420CBFA7 -S315080071F00020012019420CBF002000F00100704752 -S315080072006FEA010189B20182704700BF08B54FF4E1 -S315080072106053C4F2010398420CD14FF480404FF0FA -S315080072200101FEF71FFB4FF480404FF00001FEF707 -S3150800723019FB08BD4FF48843C4F2000398420CD1E9 -S315080072404FF400304FF00101FEF71EFB4FF40030FB -S315080072504FF00001FEF718FB08BD4FF49043C4F247 -S31508007260000398420CD14FF480204FF00101FEF73D -S315080072700BFB4FF480204FF00001FEF705FB08BD1D -S315080072804FF49843C4F2000398420CD14FF40020FF -S315080072904FF00101FEF7F8FA4FF400204FF0000115 -S315080072A0FEF7F2FA08BD4FF4A043C4F20003984271 -S315080072B00BD14FF480104FF00101FEF7E5FA4FF4B9 -S315080072C080104FF00001FEF7DFFA08BD30B587B031 -S315080072D004460D46038A23F440534FEA03434FEA14 -S315080072E01343CA8813430382838923F4B05323F0D4 -S315080072F00C034FEA03434FEA13430989AA8841EA74 -S31508007300020269890A4392B242EA03038381838AA5 -S3150800731023F440734FEA03434FEA1343AA891343FE -S31508007320838201A8FEF7F6F94FF46053C4F201030D -S315080073309C420CBF049A039AA3891BB2002B02EB4A -S31508007340820202EB8202BDBF2B685B00B2FBF3F23E -S315080073502968A4BF8900B2FBF1F248F21F53C5F2AF -S31508007360EB13A3FB02134FEA53134FEA03154FF02F -S31508007370640003FB1023A08900B200280DDA4FEA47 -S31508007380C30303F1320348F21F51C5F2EB11A1FB07 -S315080073900321C1F3421129430CE04FEA031303F119 -S315080073A0320348F21F51C5F2EB11A1FB0321C1F3C9 -S315080073B04311294389B2218107B030BD4FF41653D2 -S315080073C003604FF000038380C38003814FF00C02F3 -S315080073D042818381704700BF10B4038A23F4706327 -S315080073E04FEA03434FEA13434C880A8844EA0202E9 -S315080073F08C882243C9880A4392B242EA030303826D -S3150800740010BC70474FF00003038043808380C3801D -S31508007410704700BF29B183899BB243F40053838127 -S315080074207047838923F400534FEA03434FEA134313 -S315080074308381704710B4C1F3421301F01F014FF066 -S31508007440010404FA01F1A34208BF0C3003D0022B51 -S315080074500CBF1030143022B1036843EA0101016001 -S3150800746003E0036823EA0101016010BC704700BF0E -S3150800747022B1838A9BB2194381827047838A9BB261 -S3150800748023EA010181827047038A23F00F034FEA3A -S3150800749003434FEA13430382038A9BB241EA030379 -S315080074A003827047838923F400634FEA03434FEA54 -S315080074B01343838183899BB241EA0303838170471F -S315080074C029B183899BB243F002038381704783897C -S315080074D023F002034FEA03434FEA134383817047BD -S315080074E0038A23F020034FEA03434FEA1343038238 -S315080074F0038A9BB241EA03030382704729B1038AD0 -S315080075009BB243F4804303827047038A23F4804383 -S315080075104FEA03434FEA1343038270474FEAC151C8 -S315080075204FEAD1518180704780884FEAC0504FEAB0 -S31508007530D050704783899BB243F00103838170471B -S31508007540038BDBB20383038B9BB243EA01230383DA -S31508007550704700BF038B03F47F430383038B9BB2FF -S3150800756041EA03030383704729B1838A9BB243F038 -S31508007570200383827047838A23F020034FEA03435C -S315080075804FEA13438382704729B1838A9BB243F03B -S31508007590100383827047838A23F010034FEA03435C -S315080075A04FEA13438382704729B1838A9BB243F01B -S315080075B0080383827047838A23F008034FEA03434C -S315080075C04FEA13438382704739B183896FEA43438D -S315080075D06FEA53439BB28381704783894FEA4343DB -S315080075E04FEA53438381704729B1838A9BB243F498 -S315080075F0006383827047838A23F400634FEA034358 -S315080076004FEA134383827047838A23F004034FEAC1 -S3150800761003434FEA13438382838A9BB241EA0303F7 -S315080076208382704729B1838A9BB243F0020383821F -S315080076307047838A23F002034FEA03434FEA134352 -S3150800764083827047038819420CBF002001207047C7 -S315080076506FEA010189B20180704700BF10B4C1F317 -S31508007660421301F01F024FF0010404FA02F4012B41 -S3150800767004D1828992B204EA020206E0022B0CBF08 -S31508007680028A828A92B204EA02024FEA11214FF074 -S31508007690010303FA01F103889BB219420CBF0023C8 -S315080076A00123002A0CBF002003F0010010BC70471C -S315080076B04FEA11214FF0010303FA01F36FEA0303BE -S315080076C09BB20380704700BF08B54FF400604FF0C7 -S315080076D00101FEF7D9F84FF400604FF00001FEF7FC -S315080076E0D3F808BD4FF43053C4F200035A6822F4A5 -S315080076F0C07240EA02025A60704700BF82B04FF07B -S31508007700000301934FF43053C4F200035A6822F081 -S315080077107F020192019A00F07F0040EA020201927C -S31508007720019A5A6002B0704748F2A403C4F20523CE -S315080077304FF001021A60704700F07F004FF4305393 -S31508007740C4F200031860704740F080004FF43053CD -S31508007750C4F20003186070474FF43053C4F20003B4 -S315080077609868C0B2704700BF4FF43053C4F20003A4 -S30D080077704FF000029A60704711 -S3150800777800000000000000000102030406070809CB -S3150800778800A24A04020406080000000001020304D5 -S30D080077980102030406070809B3 +S315080021604FF0200142F64913C0F6000398470128AC +S315080021700CD14FF48840C4F2000042F63D13C0F675 +S315080021800003984720704FF0010010BD4FF0000083 +S3150800219010BD00BF70B586B04FF400304FF0010196 +S315080021A042F60103C0F6000398474FF005004FF0CA +S315080021B0010142F2DD73C0F6000398474FF0180399 +S315080021C08DF817304FF004031E46ADF814304FF063 +S315080021D003038DF816304FF40065C4F2010528464E +S315080021E005A942F22D64C0F60004A0478DF81760D1 +S315080021F04FF00803ADF81430284605A9A0474FF458 +S31508002200614301934FF00003ADF80830ADF80A308A +S31508002210ADF80C30ADF810304FF00C03ADF80E30B9 +S315080022204FF48844C4F20004204601A942F6250367 +S31508002230C0F60003984720464FF0010142F61D13E9 +S31508002240C0F60003984706B070BD00BF08B540F257 +S315080022501503C2F200031B78CBB940F21800C2F28C +S31508002260000042F25513C0F60003984701284AD1E8 +S3150800227040F21503C2F200034FF001021A7040F251 +S315080022801403C2F200034FF000021A7008BD40F2B0 +S315080022901403C2F2000318781B4BC01842F25513F8 +S315080022A0C0F60003984701282DD140F21403C2F264 +S315080022B000031A7802F10102D2B21A7040F218032A +S315080022C0C2F200031B7893421DD140F21503C2F2F5 +S315080022D000034FF000021A7040F21803C2F200031E +S315080022E05B78FF2B0FD140F21803C2F200039B78EC +S315080022F04BB942F2B153C0F60003984740F2511366 +S31508002300C0F60003984708BD1900002008B516490D +S315080023108D4640F20002C2F2000240F21403C2F2F5 +S3150800232000039A4211D242F65412C0F6000240F255 +S315080023300003C2F2000340F21400C2F2000052F891 +S31508002340041B43F8041B8342F9D3084808494FF095 +S3150800235000028842B8BF40F8042BFADB42F2554324 +S31508002360C0F60003984708BD680100201400002045 +S315080023706800002062B6704708B542F27533C0F6A9 +S315080023800003984708BD00BF00B583B04FF01000A2 +S315080023904FF0010142F2DD73C0F6000398474FF48F +S315080023A08053ADF804304FF003038DF806304FF034 +S315080023B010038DF807304FF48050C4F2010001A9CC +S315080023C042F22D63C0F60003984703B000BD00BF74 +S315080023D010B542F20963C0F600039847044640F276 +S315080023E05C03C2F200031B68C31AB3F5FA7F2FD346 +S315080023F040F26003C2F200031B7893B940F260030F +S31508002400C2F200034FF001021A704FF48050C4F272 +S3150800241001004FF4805142F2F563C0F60003984775 +S3150800242011E040F26003C2F200034FF000021A7096 +S315080024304FF48050C4F201004FF4805142F2F16328 +S31508002440C0F60003984740F25C03C2F200031C6022 +S3150800245010BD00BF30B583B04FF000030193009361 +S315080024604FF48053C4F202031A6842F001021A605C +S3150800247059684FF00002CFF6FF0201EA02025A60DD +S315080024801A6822F0847222F480321A601A6822F4DA +S3150800249080221A605A6822F4FE025A604FF41F021C +S315080024A09A601A6842F480321A604FF48053C4F274 +S315080024B0020340F2DC52196801F4003100910199D7 +S315080024C001F101010191009911B901999142F2D1E5 +S315080024D04FF48053C4F202031B6813F4003F00D183 +S315080024E0FEE74FF40053C4F202031A6842F01002E2 +S315080024F01A601A6822F003021A601A6842F0020289 +S315080025001A604FF48053C4F202035A685A605A6834 +S3150800251042F400525A605A6842F480625A605A6815 +S3150800252022F47C125A605A6842F4E8125A601A6811 +S3150800253042F080721A604FF48053C4F202031A689C +S3150800254012F0007FFBD04FF48053C4F202035A689E +S3150800255022F003025A605A6842F002025A604FF4A7 +S315080025608053C4F202035A6802F00C02082AFAD110 +S3150800257042F28933C0F60003984742F2CD53C0F6BB +S315080025800003984742F27933C0F60003984742F2AF +S315080025909513C0F60003984742F2D135C0F60005F8 +S315080025A042F24D24C0F60004A847A047FCE700BF46 +S315080025B04EF21003CEF200034FF000021A60704785 +S315080025C040F26403C2F200031860704708B54EF281 +S315080025D01003CEF2000341F63F12C0F201025A6020 +S315080025E04FF46D42CEF200024FF0F00182F823104C +S315080025F04FF0000098604FF007021A6042F2C1538C +S31508002600C0F60003984708BD40F26403C2F200030F +S315080026101868704740F26403C2F200031A6802F1B0 +S3150800262001021A60704700BFFEE700BF2DE9F003FC +S31508002630CB7803F00F0513F0100F1CBF8B781D43E2 +S315080026400B7833B3D0F800C04FF000034FF0010603 +S315080026504FF00F0806FA03F20C8802EA04049442C3 +S3150800266011D14FEA830708FA07F92CEA090C05FA8B +S3150800267007F74CEA070CCF78282F08BF446102D029 +S31508002680482F08BF026103F10103082BE2D1C0F805 +S3150800269000C00B88FF2B28D9D0F804C04FF00003E0 +S315080026A04FF001064FF00F0803F1080206FA02F28E +S315080026B00C8802EA0404944211D14FEA830708FA07 +S315080026C007F92CEA090C05FA07F74CEA070CCF7844 +S315080026D0282F08BF4461CC78482C08BF026103F153 +S315080026E00103082BE0D1C0F804C0BDE8F003704729 +S315080026F0016170474161704710B44FF48053C4F2CA +S3150800270002035B6803F00C03042B02BF4FF49053DB +S31508002710C0F27A03036036D0082B06D073BB4FF499 +S315080027209053C0F27A0303602DE04FF48053C4F24D +S3150800273002035A685B68C2F3834202F1020213F489 +S31508002740803F07D14FF41063C0F23D0303FB02F24A +S31508002750026018E04FF48053C4F202035B6813F476 +S31508002760003F19BF4FF41063C0F23D034FF4905376 +S31508002770C0F27A0303FB02F2026004E04FF49053BE +S31508002780C0F27A0303604FF48053C4F20203596817 +S31508002790C1F3031140F20402C2F20002515C04685C +S315080027A024FA01F141605C68C4F30224145D21FA3D +S315080027B004F484605C68C4F3C224125D21FA02F151 +S315080027C0C1605A68C2F3813240F20003C2F20003C4 +S315080027D09B5CB1FBF3F1016110BC704739B14FF452 +S315080027E08053C4F202039A691043986170474FF404 +S315080027F08053C4F202039A6922EA0000986170477E +S3150800280039B14FF48053C4F20203DA691043D86130 +S3150800281070474FF48053C4F20203DA6922EA0000D3 +S31508002820D861704730B587B004460D46038A23F44D +S3150800283040534FEA03434FEA1343CA8813430382BC +S31508002840838923F4B05323F00C034FEA03434FEA7A +S3150800285013430989AA8841EA020269890A4392B29E +S3150800286042EA03038381838A23F440734FEA0343CE +S315080028704FEA1343AA891343838201A842F2F963F4 +S31508002880C0F6000398474FF46053C4F201039C4214 +S315080028900CBF049A039AA3891BB2002B02EB82028F +S315080028A002EB8202BDBF2B685B00B2FBF3F229681C +S315080028B0A4BF8900B2FBF1F248F21F53C5F2EB132D +S315080028C0A3FB02134FEA53134FEA03154FF06400B4 +S315080028D003FB1023A08900B200280DDA4FEAC303D0 +S315080028E003F1320348F21F51C5F2EB11A1FB032194 +S315080028F0C1F3421129430CE04FEA031303F13203F3 +S3150800290048F21F51C5F2EB11A1FB0321C1F3431194 +S31508002910294389B2218107B030BD00BF29B1838917 +S315080029209BB243F4005383817047838923F4005391 +S315080029304FEA03434FEA13438381704780884FEA7F +S31508002940C0504FEAD0507047038819420CBF002088 +S30908002950012070479D +S31508002954020406080000000001020304010203043D +S309080029640607080943 S70508002000D2 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/makefile b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/makefile index aefddb44..697c0a8d 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/makefile +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC/Prog/makefile @@ -5,7 +5,7 @@ #|--------------------------------------------------------------------------------------- #| C O P Y R I G H T #|--------------------------------------------------------------------------------------- -#| Copyright (c) 2011 by Feaser LLC http://www.feaser.com All rights reserved +#| Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved #| #|--------------------------------------------------------------------------------------- #| L I C E N S E @@ -136,13 +136,13 @@ LIB_PATH = #|---------------------------------------------------------------------------------------| #| Options for compiler binaries | #|---------------------------------------------------------------------------------------| -CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -O1 -T memory.x +CFLAGS = -g -D inline= -mthumb -mcpu=cortex-m3 -mlong-calls -O1 -T memory.x CFLAGS += -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D sprintf=usprintf -Wno-main CFLAGS += -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -D snprintf=usnprintf CFLAGS += -D printf=uipprintf -ffunction-sections -fdata-sections $(INC_PATH) CFLAGS += -D STM32F10X_MD -D USE_STDPERIPH_DRIVER -D VECT_TAB_FLASH -D GCC_ARMCM3 LFLAGS = -nostartfiles -Xlinker -M -Xlinker -Map=$(BIN_PATH)/$(PROJ_NAME).map -LFLAGS += $(LIB_PATH) -Xlinker --no-gc-sections +LFLAGS += $(LIB_PATH) -Xlinker --gc-sections OFLAGS = -O srec ODFLAGS = -x SZFLAGS = -B -d diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log index d790a12f..50a1af18 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log @@ -8,3 +8,5 @@ *** SESSION Dez 02, 2011 18:53:52.79 ------------------------------------------- *** SESSION Dez 02, 2011 20:59:08.37 ------------------------------------------- *** SESSION Dez 02, 2011 21:05:21.49 ------------------------------------------- +*** SESSION Mär 04, 2012 17:55:12.82 ------------------------------------------- +*** SESSION Mär 04, 2012 18:32:33.31 ------------------------------------------- diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Boot.1322834671001.pdom b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Boot.1322834671001.pdom index 38accbaf..8b9237e1 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Boot.1322834671001.pdom and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Boot.1322834671001.pdom differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Prog.1322831217304.pdom b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Prog.1322831217304.pdom index c3c3d6f3..0be21b9b 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Prog.1322831217304.pdom and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/Prog.1322831217304.pdom differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Boot.build.log b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Boot.build.log index 0b1142b7..b5b9199c 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Boot.build.log +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Boot.build.log @@ -2,113 +2,14 @@ **** Build of configuration bin for project Boot **** cs-make all -Building file: ../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -MT"lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o" "../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c" -Finished building: ../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - -Building file: ../lib/CMSIS/CM3/CoreSupport/core_cm3.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="lib/CMSIS/CM3/CoreSupport/core_cm3.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/CMSIS/CM3/CoreSupport/core_cm3.d" -MT"lib/CMSIS/CM3/CoreSupport/core_cm3.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/CMSIS/CM3/CoreSupport/core_cm3.o" "../lib/CMSIS/CM3/CoreSupport/core_cm3.c" -Finished building: ../lib/CMSIS/CM3/CoreSupport/core_cm3.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/GCC/cstart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/GCC/cstart.d" -MT"Source/ARMCM3_STM32/GCC/cstart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/GCC/cstart.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/GCC/vectors.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/GCC/vectors.d" -MT"Source/ARMCM3_STM32/GCC/vectors.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/GCC/vectors.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/can.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/can.d" -MT"Source/ARMCM3_STM32/can.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/can.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/cpu.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/cpu.d" -MT"Source/ARMCM3_STM32/cpu.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/cpu.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/flash.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/flash.d" -MT"Source/ARMCM3_STM32/flash.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/flash.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/nvm.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/nvm.d" -MT"Source/ARMCM3_STM32/nvm.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/nvm.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/timer.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/timer.d" -MT"Source/ARMCM3_STM32/timer.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/timer.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/uart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/uart.d" -MT"Source/ARMCM3_STM32/uart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/uart.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/assert.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/assert.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/assert.d" -MT"Source/assert.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/assert.o" "D:/usr/feaser/software/OpenBLT/Target/Source/assert.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/assert.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/backdoor.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/backdoor.d" -MT"Source/backdoor.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/backdoor.o" "D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/boot.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/boot.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/boot.d" -MT"Source/boot.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/boot.o" "D:/usr/feaser/software/OpenBLT/Target/Source/boot.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/boot.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/com.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/com.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/com.d" -MT"Source/com.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/com.o" "D:/usr/feaser/software/OpenBLT/Target/Source/com.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/com.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/cop.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/cop.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/cop.d" -MT"Source/cop.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/cop.o" "D:/usr/feaser/software/OpenBLT/Target/Source/cop.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/cop.c - -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/xcp.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/xcp.d" -MT"Source/xcp.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/xcp.o" "D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c - -Building file: ../hooks.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="hooks.o.lst" -c -fmessage-length=0 -MMD -MP -MF"hooks.d" -MT"hooks.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "hooks.o" "../hooks.c" -Finished building: ../hooks.c - -Building file: ../main.c -Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "main.o" "../main.c" -Finished building: ../main.c - -Building target: openbtl_olimex_stm32p103.elf -Invoking: ARM Sourcery Windows GCC C Linker -arm-none-eabi-gcc -T"memory.x" -nostartfiles -L"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -Wl,-Map,openbtl_olimex_stm32p103.map -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "openbtl_olimex_stm32p103.elf" ./lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o ./lib/CMSIS/CM3/CoreSupport/core_cm3.o ./Source/ARMCM3_STM32/GCC/cstart.o ./Source/ARMCM3_STM32/GCC/vectors.o ./Source/ARMCM3_STM32/can.o ./Source/ARMCM3_STM32/cpu.o ./Source/ARMCM3_STM32/flash.o ./Source/ARMCM3_STM32/nvm.o ./Source/ARMCM3_STM32/timer.o ./Source/ARMCM3_STM32/uart.o ./Source/assert.o ./Source/backdoor.o ./Source/boot.o ./Source/com.o ./Source/cop.o ./Source/xcp.o ./hooks.o ./main.o -Finished building target: openbtl_olimex_stm32p103.elf - Invoking: ARM Sourcery Windows GNU Create Flash Image arm-none-eabi-objcopy -O srec openbtl_olimex_stm32p103.elf openbtl_olimex_stm32p103.srec Finished building: openbtl_olimex_stm32p103.hex -Invoking: ARM Sourcery Windows GNU Create Listing -arm-none-eabi-objdump -h -S openbtl_olimex_stm32p103.elf > "openbtl_olimex_stm32p103.lst" -Finished building: openbtl_olimex_stm32p103.lst - Invoking: ARM Sourcery Windows GNU Print Size arm-none-eabi-size --format=berkeley openbtl_olimex_stm32p103.elf text data bss dec hex filename - 5344 20 1520 6884 1ae4 openbtl_olimex_stm32p103.elf + 4688 0 1520 6208 1840 openbtl_olimex_stm32p103.elf Finished building: openbtl_olimex_stm32p103.siz diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Prog.build.log b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Prog.build.log index 564a4f3c..523c08d3 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Prog.build.log +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/Prog.build.log @@ -4,172 +4,172 @@ cs-make all Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c" Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c Building file: ../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -MT"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o" "../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -MT"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o" "../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c" Finished building: ../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c Building file: ../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -MT"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o" "../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -MT"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o" "../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c" Finished building: ../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c Building file: ../lib/stdio_mini.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdio_mini.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/stdio_mini.d" -MT"lib/stdio_mini.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdio_mini.o" "../lib/stdio_mini.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdio_mini.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdio_mini.d" -MT"lib/stdio_mini.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdio_mini.o" "../lib/stdio_mini.c" Finished building: ../lib/stdio_mini.c Building file: ../boot.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="boot.o.lst" -c -fmessage-length=0 -MMD -MP -MF"boot.d" -MT"boot.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "boot.o" "../boot.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="boot.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"boot.d" -MT"boot.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "boot.o" "../boot.c" Finished building: ../boot.c Building file: ../cstart.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="cstart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"cstart.d" -MT"cstart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "cstart.o" "../cstart.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="cstart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"cstart.d" -MT"cstart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "cstart.o" "../cstart.c" Finished building: ../cstart.c Building file: ../irq.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="irq.o.lst" -c -fmessage-length=0 -MMD -MP -MF"irq.d" -MT"irq.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "irq.o" "../irq.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="irq.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"irq.d" -MT"irq.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "irq.o" "../irq.c" Finished building: ../irq.c Building file: ../led.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="led.o.lst" -c -fmessage-length=0 -MMD -MP -MF"led.d" -MT"led.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "led.o" "../led.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="led.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"led.d" -MT"led.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "led.o" "../led.c" Finished building: ../led.c Building file: ../main.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "main.o" "../main.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "main.o" "../main.c" Finished building: ../main.c Building file: ../timer.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="timer.o.lst" -c -fmessage-length=0 -MMD -MP -MF"timer.d" -MT"timer.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "timer.o" "../timer.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="timer.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"timer.d" -MT"timer.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "timer.o" "../timer.c" Finished building: ../timer.c Building file: ../uart.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="uart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"uart.d" -MT"uart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "uart.o" "../uart.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="uart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"uart.d" -MT"uart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "uart.o" "../uart.c" Finished building: ../uart.c Building file: ../vectors.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="vectors.o.lst" -c -fmessage-length=0 -MMD -MP -MF"vectors.d" -MT"vectors.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "vectors.o" "../vectors.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="vectors.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"vectors.d" -MT"vectors.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "vectors.o" "../vectors.c" Finished building: ../vectors.c Building target: demoprog_olimex_stm32p103.elf @@ -177,18 +177,18 @@ Invoking: ARM Sourcery Windows GCC C Linker arm-none-eabi-gcc -T"memory.x" -nostartfiles -Xlinker --gc-sections -L"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog" -Wl,-Map,demoprog_olimex_stm32p103.map -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "demoprog_olimex_stm32p103.elf" ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o ./lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o ./lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o ./lib/stdio_mini.o ./boot.o ./cstart.o ./irq.o ./led.o ./main.o ./timer.o ./uart.o ./vectors.o Finished building target: demoprog_olimex_stm32p103.elf -Invoking: ARM Sourcery Windows GNU Create Flash Image -arm-none-eabi-objcopy -O srec demoprog_olimex_stm32p103.elf demoprog_olimex_stm32p103.srec -Finished building: demoprog_olimex_stm32p103.hex - Invoking: ARM Sourcery Windows GNU Create Listing arm-none-eabi-objdump -h -S demoprog_olimex_stm32p103.elf > "demoprog_olimex_stm32p103.lst" Finished building: demoprog_olimex_stm32p103.lst +Invoking: ARM Sourcery Windows GNU Create Flash Image +arm-none-eabi-objcopy -O srec demoprog_olimex_stm32p103.elf demoprog_olimex_stm32p103.srec +Finished building: demoprog_olimex_stm32p103.hex + Invoking: ARM Sourcery Windows GNU Print Size arm-none-eabi-size --format=berkeley demoprog_olimex_stm32p103.elf text data bss dec hex filename - 7072 24 1124 8220 201c demoprog_olimex_stm32p103.elf + 4440 24 1120 5584 15d0 demoprog_olimex_stm32p103.elf Finished building: demoprog_olimex_stm32p103.siz diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log index 0b1142b7..523c08d3 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log @@ -1,115 +1,195 @@ -**** Build of configuration bin for project Boot **** +**** Build of configuration bin for project Prog **** cs-make all -Building file: ../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -MT"lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o" "../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c" -Finished building: ../lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.c -Building file: ../lib/CMSIS/CM3/CoreSupport/core_cm3.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="lib/CMSIS/CM3/CoreSupport/core_cm3.o.lst" -c -fmessage-length=0 -MMD -MP -MF"lib/CMSIS/CM3/CoreSupport/core_cm3.d" -MT"lib/CMSIS/CM3/CoreSupport/core_cm3.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/CMSIS/CM3/CoreSupport/core_cm3.o" "../lib/CMSIS/CM3/CoreSupport/core_cm3.c" -Finished building: ../lib/CMSIS/CM3/CoreSupport/core_cm3.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/GCC/cstart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/GCC/cstart.d" -MT"Source/ARMCM3_STM32/GCC/cstart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/GCC/cstart.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/cstart.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/GCC/vectors.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/GCC/vectors.d" -MT"Source/ARMCM3_STM32/GCC/vectors.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/GCC/vectors.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/GCC/vectors.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/can.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/can.d" -MT"Source/ARMCM3_STM32/can.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/can.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/can.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/cpu.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/cpu.d" -MT"Source/ARMCM3_STM32/cpu.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/cpu.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/cpu.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/flash.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/flash.d" -MT"Source/ARMCM3_STM32/flash.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/flash.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/flash.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/nvm.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/nvm.d" -MT"Source/ARMCM3_STM32/nvm.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/nvm.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/nvm.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/timer.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/timer.d" -MT"Source/ARMCM3_STM32/timer.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/timer.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/timer.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/ARMCM3_STM32/uart.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/ARMCM3_STM32/uart.d" -MT"Source/ARMCM3_STM32/uart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/ARMCM3_STM32/uart.o" "D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/ARMCM3_STM32/uart.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/assert.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/assert.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/assert.d" -MT"Source/assert.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/assert.o" "D:/usr/feaser/software/OpenBLT/Target/Source/assert.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/assert.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/backdoor.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/backdoor.d" -MT"Source/backdoor.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/backdoor.o" "D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/backdoor.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/boot.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/boot.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/boot.d" -MT"Source/boot.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/boot.o" "D:/usr/feaser/software/OpenBLT/Target/Source/boot.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/boot.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/com.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/com.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/com.d" -MT"Source/com.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/com.o" "D:/usr/feaser/software/OpenBLT/Target/Source/com.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/com.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/cop.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/cop.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/cop.d" -MT"Source/cop.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/cop.o" "D:/usr/feaser/software/OpenBLT/Target/Source/cop.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/cop.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c -Building file: D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="Source/xcp.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Source/xcp.d" -MT"Source/xcp.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "Source/xcp.o" "D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c" -Finished building: D:/usr/feaser/software/OpenBLT/Target/Source/xcp.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c -Building file: ../hooks.c +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="hooks.o.lst" -c -fmessage-length=0 -MMD -MP -MF"hooks.d" -MT"hooks.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "hooks.o" "../hooks.c" -Finished building: ../hooks.c +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c + +Building file: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -MT"lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o" "../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c" +Finished building: ../lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c + +Building file: ../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -MT"lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o" "../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c" +Finished building: ../lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + +Building file: ../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -MT"lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o" "../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c" +Finished building: ../lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.c + +Building file: ../lib/stdio_mini.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="lib/stdio_mini.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"lib/stdio_mini.d" -MT"lib/stdio_mini.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "lib/stdio_mini.o" "../lib/stdio_mini.c" +Finished building: ../lib/stdio_mini.c + +Building file: ../boot.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="boot.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"boot.d" -MT"boot.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "boot.o" "../boot.c" +Finished building: ../boot.c + +Building file: ../cstart.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="cstart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"cstart.d" -MT"cstart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "cstart.o" "../cstart.c" +Finished building: ../cstart.c + +Building file: ../irq.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="irq.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"irq.d" -MT"irq.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "irq.o" "../irq.c" +Finished building: ../irq.c + +Building file: ../led.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="led.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"led.d" -MT"led.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "led.o" "../led.c" +Finished building: ../led.c Building file: ../main.c Invoking: ARM Sourcery Windows GCC C Compiler -arm-none-eabi-gcc -DGCC_ARMCM3 -DSTM32F10X_MD -I"D:\usr\feaser\software\OpenBLT\Target\Source" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32" -I"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Boot\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "main.o" "../main.c" +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "main.o" "../main.c" Finished building: ../main.c -Building target: openbtl_olimex_stm32p103.elf -Invoking: ARM Sourcery Windows GCC C Linker -arm-none-eabi-gcc -T"memory.x" -nostartfiles -L"D:\usr\feaser\software\OpenBLT\Target\Source\ARMCM3_STM32\GCC" -Wl,-Map,openbtl_olimex_stm32p103.map -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "openbtl_olimex_stm32p103.elf" ./lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o ./lib/CMSIS/CM3/CoreSupport/core_cm3.o ./Source/ARMCM3_STM32/GCC/cstart.o ./Source/ARMCM3_STM32/GCC/vectors.o ./Source/ARMCM3_STM32/can.o ./Source/ARMCM3_STM32/cpu.o ./Source/ARMCM3_STM32/flash.o ./Source/ARMCM3_STM32/nvm.o ./Source/ARMCM3_STM32/timer.o ./Source/ARMCM3_STM32/uart.o ./Source/assert.o ./Source/backdoor.o ./Source/boot.o ./Source/com.o ./Source/cop.o ./Source/xcp.o ./hooks.o ./main.o -Finished building target: openbtl_olimex_stm32p103.elf +Building file: ../timer.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="timer.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"timer.d" -MT"timer.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "timer.o" "../timer.c" +Finished building: ../timer.c -Invoking: ARM Sourcery Windows GNU Create Flash Image -arm-none-eabi-objcopy -O srec openbtl_olimex_stm32p103.elf openbtl_olimex_stm32p103.srec -Finished building: openbtl_olimex_stm32p103.hex +Building file: ../uart.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="uart.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"uart.d" -MT"uart.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "uart.o" "../uart.c" +Finished building: ../uart.c + +Building file: ../vectors.c +Invoking: ARM Sourcery Windows GCC C Compiler +arm-none-eabi-gcc -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DVECT_TAB_FLASH -DGCC_ARMCM3 -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\STM32F10x_StdPeriph_Driver\inc" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\CoreSupport" -I"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog\lib\stdperiphlib\CMSIS\CM3\DeviceSupport\ST\STM32F10x" -O1 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="vectors.o.lst" -c -fmessage-length=0 -mlong-calls -MMD -MP -MF"vectors.d" -MT"vectors.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "vectors.o" "../vectors.c" +Finished building: ../vectors.c + +Building target: demoprog_olimex_stm32p103.elf +Invoking: ARM Sourcery Windows GCC C Linker +arm-none-eabi-gcc -T"memory.x" -nostartfiles -Xlinker --gc-sections -L"D:\usr\feaser\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse\Prog" -Wl,-Map,demoprog_olimex_stm32p103.map -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "demoprog_olimex_stm32p103.elf" ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/misc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.o ./lib/stdperiphlib/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.o ./lib/stdperiphlib/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o ./lib/stdperiphlib/CMSIS/CM3/CoreSupport/core_cm3.o ./lib/stdio_mini.o ./boot.o ./cstart.o ./irq.o ./led.o ./main.o ./timer.o ./uart.o ./vectors.o +Finished building target: demoprog_olimex_stm32p103.elf Invoking: ARM Sourcery Windows GNU Create Listing -arm-none-eabi-objdump -h -S openbtl_olimex_stm32p103.elf > "openbtl_olimex_stm32p103.lst" -Finished building: openbtl_olimex_stm32p103.lst +arm-none-eabi-objdump -h -S demoprog_olimex_stm32p103.elf > "demoprog_olimex_stm32p103.lst" +Finished building: demoprog_olimex_stm32p103.lst + +Invoking: ARM Sourcery Windows GNU Create Flash Image +arm-none-eabi-objcopy -O srec demoprog_olimex_stm32p103.elf demoprog_olimex_stm32p103.srec +Finished building: demoprog_olimex_stm32p103.hex Invoking: ARM Sourcery Windows GNU Print Size -arm-none-eabi-size --format=berkeley openbtl_olimex_stm32p103.elf +arm-none-eabi-size --format=berkeley demoprog_olimex_stm32p103.elf text data bss dec hex filename - 5344 20 1520 6884 1ae4 openbtl_olimex_stm32p103.elf -Finished building: openbtl_olimex_stm32p103.siz + 4440 24 1120 5584 15d0 demoprog_olimex_stm32p103.elf +Finished building: demoprog_olimex_stm32p103.siz **** Build Finished **** diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/79/61/1e/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/79/61/1e/history.index index a555734e..8e7abe28 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/79/61/1e/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/79/61/1e/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/f0/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/f0/history.index index 1f6298a0..370305ba 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/f0/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/85/13/9/f0/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/e7/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/e7/history.index index d0f4e7d0..c6928190 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/e7/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/e7/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/history.index index ac50af91..fd80392b 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/f9/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/history.index index 89dc3ae0..84c89cf0 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/c5/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/history.index index f6972833..95c60419 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/7/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/properties.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/properties.index index e091111c..af370430 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/properties.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Boot/.indexes/properties.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/79/61/1e/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/79/61/1e/history.index index 63e7fb90..6414cbf0 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/79/61/1e/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/79/61/1e/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/f0/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/f0/history.index index 1d134f16..4d3830c3 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/f0/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/13/9/f0/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/3f/e4/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/3f/e4/history.index index 8b3286d5..b94d6841 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/3f/e4/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/5e/3f/e4/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/history.index index 5ab070da..52ca637d 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/85/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/history.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/history.index index 761535d2..2dce71db 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/history.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/7/history.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/properties.index b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/properties.index index 332e5761..b7d941d0 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/properties.index and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Prog/.indexes/properties.index differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index c9eb8e7e..54b0c512 100644 Binary files a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs index f3d88dbe..26f6b1f3 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -1,6 +1,6 @@ -#Fri Dec 02 21:20:18 CET 2011 +#Sun Mar 04 18:36:15 CET 2012 eclipse.preferences.version=1 properties/Boot.null.2099644599/cdt.managedbuild.toolchain.gnu.cross.base.704426003=\#\r\n\#Fri Dec 02 15\:01\:18 CET 2011\r\ncdt.managedbuild.tool.gnu.cross.c.compiler.1659811929\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.assembler.1747933774\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.toolchain.gnu.cross.base.19286403\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.cpp.compiler.897271491\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.toolchain.gnu.cross.base.704426003\=\\\#\\r\\n\\\#Fri Dec 02 14\\\:06\\\:54 CET 2011\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.cpp.linker.1945131682\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.c.linker.561103820\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.archiver.1329719800\=\\\#\\r\\n\\\#Fri Dec 02 15\\\:01\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\n -properties/Prog.org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.1995384738/org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1639800803=\#\r\n\#Fri Dec 02 21\:20\:18 CET 2011\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1652107540\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.1650210210\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.1029814416\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1709347650\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.1401723031\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.638372325\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.1871513771\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1839723576\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1639800803\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:14\\\:39 CET 2011\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.1948855455\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1416805565\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\n +properties/Prog.org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.1995384738/org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1639800803=\#\r\n\#Sun Mar 04 18\:36\:15 CET 2012\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1652107540\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.1650210210\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.1029814416\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1709347650\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.1401723031\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.638372325\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.1871513771\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1839723576\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1639800803\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:32\\\:59 CET 2012\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.1948855455\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1416805565\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:36\\\:15 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\n properties/Prog.null.364757599/cdt.managedbuild.toolchain.gnu.cross.base.1931562967=\#\r\n\#Fri Dec 02 13\:24\:18 CET 2011\r\ncdt.managedbuild.tool.gnu.cross.archiver.1895881695\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.cpp.linker.870210068\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.c.compiler.602729988\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.toolchain.gnu.cross.base.1789339306\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.c.linker.1062578263\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.toolchain.gnu.cross.base.1931562967\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:22\\\:12 CET 2011\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.assembler.1908346833\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\ncdt.managedbuild.tool.gnu.cross.cpp.compiler.1209824354\=\\\#\\r\\n\\\#Fri Dec 02 13\\\:24\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\n -properties/Boot.org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.672893664/org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.364435663=\#\r\n\#Fri Dec 02 21\:20\:18 CET 2011\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.737947540\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.2013116877\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.922950910\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1487118424\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.778379542\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1346908913\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.248792117\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1933182557\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.1775648822\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1326845546\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.1580685788\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.75976766\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.317334834\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1304542712\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.925789995\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.415209124\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.556602464\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.364435663\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:17\\\:20 CET 2011\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.111331378\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1810400386\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1224055994\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.45873621\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.574737311\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.951948194\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.1404694970\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.2023518672\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1445907369\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.924834461\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.497673922\=\\\#\\r\\n\\\#Fri Dec 02 21\\\:20\\\:18 CET 2011\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.1220292484\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.424416054\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\n +properties/Boot.org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.672893664/org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.364435663=\#\r\n\#Sun Mar 04 18\:34\:01 CET 2012\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.737947540\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.2013116877\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.922950910\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1487118424\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.778379542\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1346908913\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.248792117\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.1933182557\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.1775648822\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1326845546\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.1580685788\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.75976766\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.317334834\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1304542712\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.925789995\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.415209124\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.linker.debug.556602464\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.364435663\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createflash.debug.111331378\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.1810400386\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.createlisting.debug.1224055994\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.45873621\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.574737311\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.printsize.debug.951948194\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.1404694970\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.2023518672\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.linker.debug.1445907369\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.924834461\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.toolchain.debug.497673922\=\\\#\\r\\n\\\#Sun Mar 04 18\\\:34\\\:01 CET 2012\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.1220292484\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\norg.eclipse.cdt.cross.arm.gnu.sourcery.windows.archiver.base.424416054\=\\\#\\r\\n\\\#Fri Dec 02 16\\\:44\\\:18 CET 2011\\r\\nrebuildState\\\=true\\r\\n\r\n diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs index 599c6c83..e51ba421 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs @@ -1,3 +1,3 @@ -#Fri Dec 02 13:18:15 CET 2011 -org.eclipse.epp.usagedata.recording.last-upload=1322828295561 +#Sun Mar 04 17:55:24 CET 2012 +org.eclipse.epp.usagedata.recording.last-upload=1330880124313 eclipse.preferences.version=1 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.tm.terminal.view.prefs b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.tm.terminal.view.prefs index 749231a6..7b1a087b 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.tm.terminal.view.prefs +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.tm.terminal.view.prefs @@ -1,5 +1,5 @@ -#Fri Dec 02 18:53:28 CET 2011 -Connectors.org.eclipse.tm.internal.terminal.serial.SerialConnector.SerialPort=COM6 +#Sun Mar 04 18:05:54 CET 2012 +Connectors.org.eclipse.tm.internal.terminal.serial.SerialConnector.SerialPort=COM4 Connectors.org.eclipse.tm.internal.terminal.serial.SerialConnector.StopBits=1 Connectors.org.eclipse.tm.internal.terminal.serial.SerialConnector.DataBits=8 eclipse.preferences.version=1 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv index 4b2f459b..9143072d 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv @@ -1,90 +1,171 @@ what,kind,bundleId,bundleVersion,description,time -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856543232 -executed,command,org.eclipse.ltk.ui.refactoring,3.6.0.v20110505-0800,"org.eclipse.ltk.ui.refactoring.commands.deleteResources",1322856543232 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.edit.delete",1322856543232 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856547148 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856627738 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.properties",1322856627816 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856640155 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856688593 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856691885 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856700980 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.properties",1322856701026 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856707376 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856759136 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856767436 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856778371 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.properties",1322856778418 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856783613 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856784018 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856784689 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856799353 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856805936 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.edit.paste",1322856808183 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856837589 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856843376 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856866683 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.refresh",1322856871628 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856877494 -started,bundle,org.eclipse.cdt.managedbuilder.gnu.ui,8.0.1.201109151620,"org.eclipse.cdt.managedbuilder.gnu.ui",1322856877525 -error,log,,,"Problems occurred when invoking code from plug-in: ""org.eclipse.core.resources"".",1322856879147 -error,log,,,"Errors occurred during the build.",1322856880723 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856884950 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856887946 -started,bundle,org.eclipse.cdt.managedbuilder.ui,8.0.0.201109151620,"org.eclipse.cdt.managedbuilder.ui",1322856895870 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856961266 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.properties",1322856961328 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856962654 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322856996025 -started,bundle,org.eclipse.debug.ui,3.7.101.v20110817_r371,"org.eclipse.debug.ui",1322857021625 -started,bundle,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools",1322857021641 -started,bundle,org.eclipse.core.externaltools,1.0.100.v20110506,"org.eclipse.core.externaltools",1322857023247 -started,bundle,org.eclipse.cdt.debug.mi.ui,6.1.0.201109151620,"org.eclipse.cdt.debug.mi.ui",1322857026165 -started,bundle,org.eclipse.cdt.dsf,2.2.0.201109151620,"org.eclipse.cdt.dsf",1322857026445 -started,bundle,org.eclipse.cdt.dsf.gdb,4.0.1.201109151620,"org.eclipse.cdt.dsf.gdb",1322857026477 -started,bundle,org.eclipse.cdt.dsf.gdb.ui,2.2.1.201109151620,"org.eclipse.cdt.dsf.gdb.ui",1322857026477 -started,bundle,org.eclipse.cdt.debug.core,7.1.0.201109151620,"org.eclipse.cdt.debug.core",1322857026789 -started,bundle,org.eclipse.cdt.debug.mi.core,7.1.1.201109151620,"org.eclipse.cdt.debug.mi.core",1322857026789 -executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.refresh",1322857036291 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857038116 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857040643 -started,bundle,org.eclipse.cdt.debug.ui,7.1.1.201109151620,"org.eclipse.cdt.debug.ui",1322857041096 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857042905 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857046649 -started,bundle,org.eclipse.tm.terminal.view,2.2.0.v201103142315,"org.eclipse.tm.terminal.view",1322857050237 -started,bundle,org.eclipse.tm.terminal,3.1.1.R33x_v201107181530,"org.eclipse.tm.terminal",1322857050237 -opened,view,org.eclipse.tm.terminal.view,2.2.0.v201103142315,"org.eclipse.tm.terminal.view.TerminalView",1322857050456 -activated,view,org.eclipse.tm.terminal.view,2.2.0.v201103142315,"org.eclipse.tm.terminal.view.TerminalView",1322857050503 -started,bundle,org.eclipse.tm.terminal.serial,2.1.0.v201101042155,"org.eclipse.tm.terminal.serial",1322857051938 -activated,view,org.eclipse.ui.navigator.resources,3.4.300.I20110421-1800,"org.eclipse.ui.navigator.ProjectExplorer",1322857067071 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857069692 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857069801 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857072125 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857075510 -activated,view,org.eclipse.ui.console,3.5.100.v20110511,"org.eclipse.ui.console.ConsoleView",1322857075604 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857080237 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857080362 -executed,command,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools.ExternalToolMenuDelegateToolbar",1322857113574 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857113855 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857117693 -activated,view,org.eclipse.ui.navigator.resources,3.4.300.I20110421-1800,"org.eclipse.ui.navigator.ProjectExplorer",1322857122576 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857128129 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857128363 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857129424 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857131546 -executed,command,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools.ExternalToolMenuDelegateToolbar",1322857170312 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857170436 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857174336 -executed,command,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools.ExternalToolMenuDelegateToolbar",1322857175257 -deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857175382 -activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857179141 -closed,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1322857223040 -stopped,bundle,org.eclipse.cdt.build.crossgcc,1.0.0.201109151620,"org.eclipse.cdt.build.crossgcc",1322857223601 -stopped,bundle,org.eclipse.cdt.codan.checkers.ui,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers.ui",1322857223601 -stopped,bundle,org.eclipse.cdt.codan.checkers,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers",1322857223601 -stopped,bundle,org.eclipse.cdt.codan.ui.cxx,2.0.0.201109151620,"org.eclipse.cdt.codan.ui.cxx",1322857223601 -stopped,bundle,org.eclipse.cdt.codan.core.cxx,1.0.0.201109151620,"org.eclipse.cdt.codan.core.cxx",1322857223601 -stopped,bundle,org.eclipse.cdt.launch.remote,2.3.0.201109151620,"org.eclipse.cdt.launch.remote",1322857223601 -stopped,bundle,org.eclipse.cdt.debug.mi.ui,6.1.0.201109151620,"org.eclipse.cdt.debug.mi.ui",1322857223601 -stopped,bundle,org.eclipse.cdt.debug.mi.core,7.1.1.201109151620,"org.eclipse.cdt.debug.mi.core",1322857223601 -stopped,bundle,org.eclipse.cdt.debug.ui.memory.memorybrowser,1.2.100.201109151620,"org.eclipse.cdt.debug.ui.memory.memorybrowser",1322857223648 +stopped,bundle,org.eclipse.cdt.codan.checkers,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers",1330880754738 +stopped,bundle,org.eclipse.cdt.codan.ui.cxx,2.0.0.201109151620,"org.eclipse.cdt.codan.ui.cxx",1330880754738 +stopped,bundle,org.eclipse.cdt.codan.core.cxx,1.0.0.201109151620,"org.eclipse.cdt.codan.core.cxx",1330880754738 +stopped,bundle,org.eclipse.cdt.launch.remote,2.3.0.201109151620,"org.eclipse.cdt.launch.remote",1330880754803 +stopped,bundle,org.eclipse.cdt.debug.mi.ui,6.1.0.201109151620,"org.eclipse.cdt.debug.mi.ui",1330880754803 +stopped,bundle,org.eclipse.cdt.debug.mi.core,7.1.1.201109151620,"org.eclipse.cdt.debug.mi.core",1330880754803 +stopped,bundle,org.eclipse.cdt.debug.ui.memory.memorybrowser,1.2.100.201109151620,"org.eclipse.cdt.debug.ui.memory.memorybrowser",1330880754844 +stopped,bundle,org.eclipse.cdt.debug.ui.memory.search,1.2.0.201109151620,"org.eclipse.cdt.debug.ui.memory.search",1330880754902 +stopped,bundle,org.eclipse.cdt.dsf.gdb.ui,2.2.1.201109151620,"org.eclipse.cdt.dsf.gdb.ui",1330880754902 +activated,perspective,org.eclipse.cdt.ui,,"org.eclipse.cdt.ui.CPerspective",1330882367553 +started,bundle,org.eclipse.osgi,3.7.1.R37x_v20110808-1106,"org.eclipse.osgi",1330882367556 +started,bundle,org.eclipse.equinox.simpleconfigurator,1.0.200.v20110502-1955,"org.eclipse.equinox.simpleconfigurator",1330882367558 +started,bundle,com.ibm.icu,4.4.2.v20110208,"com.ibm.icu",1330882367560 +started,bundle,org.eclipse.cdt.codan.checkers,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers",1330882367562 +started,bundle,org.eclipse.cdt.codan.core,2.0.0.201109151620,"org.eclipse.cdt.codan.core",1330882367564 +started,bundle,org.eclipse.cdt.codan.core.cxx,1.0.0.201109151620,"org.eclipse.cdt.codan.core.cxx",1330882367566 +started,bundle,org.eclipse.cdt.codan.ui,2.0.0.201109151620,"org.eclipse.cdt.codan.ui",1330882367568 +started,bundle,org.eclipse.cdt.codan.ui.cxx,2.0.0.201109151620,"org.eclipse.cdt.codan.ui.cxx",1330882367569 +started,bundle,org.eclipse.cdt.core,5.3.1.201109151620,"org.eclipse.cdt.core",1330882367569 +started,bundle,org.eclipse.cdt.make.core,7.1.1.201109151620,"org.eclipse.cdt.make.core",1330882367571 +started,bundle,org.eclipse.cdt.make.ui,7.1.1.201109151620,"org.eclipse.cdt.make.ui",1330882367573 +started,bundle,org.eclipse.cdt.managedbuilder.core,8.0.1.201109151620,"org.eclipse.cdt.managedbuilder.core",1330882367576 +started,bundle,org.eclipse.cdt.msw.build,1.0.0.201109151620,"org.eclipse.cdt.msw.build",1330882367577 +started,bundle,org.eclipse.cdt.ui,5.3.1.201109151620,"org.eclipse.cdt.ui",1330882367577 +started,bundle,org.eclipse.compare.core,3.5.200.I20110208-0800,"org.eclipse.compare.core",1330882367579 +started,bundle,org.eclipse.core.contenttype,3.4.100.v20110423-0524,"org.eclipse.core.contenttype",1330882367580 +started,bundle,org.eclipse.core.databinding.observable,1.4.0.I20110222-0800,"org.eclipse.core.databinding.observable",1330882367583 +started,bundle,org.eclipse.core.expressions,3.4.300.v20110228,"org.eclipse.core.expressions",1330882367584 +started,bundle,org.eclipse.core.filebuffers,3.5.200.v20110505-0800,"org.eclipse.core.filebuffers",1330882367585 +started,bundle,org.eclipse.core.filesystem,1.3.100.v20110423-0524,"org.eclipse.core.filesystem",1330882367588 +started,bundle,org.eclipse.core.jobs,3.5.100.v20110404,"org.eclipse.core.jobs",1330882367590 +started,bundle,org.eclipse.core.net,1.2.100.I20110511-0800,"org.eclipse.core.net",1330882367598 +started,bundle,org.eclipse.core.resources,3.7.100.v20110510-0712,"org.eclipse.core.resources",1330882367601 +started,bundle,org.eclipse.core.runtime,3.7.0.v20110110,"org.eclipse.core.runtime",1330882367603 +started,bundle,org.eclipse.core.runtime.compatibility,3.2.100.v20100505,"org.eclipse.core.runtime.compatibility",1330882367605 +started,bundle,org.eclipse.core.runtime.compatibility.auth,3.2.200.v20110110,"org.eclipse.core.runtime.compatibility.auth",1330882367607 +started,bundle,org.eclipse.core.variables,3.2.500.v20110511,"org.eclipse.core.variables",1330882367609 +started,bundle,org.eclipse.debug.core,3.7.0.v20110518,"org.eclipse.debug.core",1330882367612 +started,bundle,org.eclipse.egit.core,1.1.0.201109151100-r,"org.eclipse.egit.core",1330882367614 +started,bundle,org.eclipse.egit.ui,1.1.0.201109151100-r,"org.eclipse.egit.ui",1330882367618 +started,bundle,org.eclipse.epp.mpc.ui,1.1.1.I20110907-0947,"org.eclipse.epp.mpc.ui",1330882367619 +started,bundle,org.eclipse.epp.usagedata.gathering,1.3.1.R201106061540,"org.eclipse.epp.usagedata.gathering",1330882367621 +started,bundle,org.eclipse.epp.usagedata.recording,1.3.1.R201106061540,"org.eclipse.epp.usagedata.recording",1330882367622 +started,bundle,org.eclipse.equinox.app,1.3.100.v20110321,"org.eclipse.equinox.app",1330882367629 +started,bundle,org.eclipse.equinox.common,3.6.0.v20110523,"org.eclipse.equinox.common",1330882367631 +started,bundle,org.eclipse.equinox.ds,1.3.1.R37x_v20110701,"org.eclipse.equinox.ds",1330882367633 +started,bundle,org.eclipse.equinox.event,1.2.100.v20110502,"org.eclipse.equinox.event",1330882367635 +started,bundle,org.eclipse.equinox.p2.core,2.1.0.v20110502-1955,"org.eclipse.equinox.p2.core",1330882367636 +started,bundle,org.eclipse.equinox.p2.directorywatcher,1.0.300.v20110502-1955,"org.eclipse.equinox.p2.directorywatcher",1330882367639 +started,bundle,org.eclipse.equinox.p2.engine,2.1.0.v20110511,"org.eclipse.equinox.p2.engine",1330882367640 +started,bundle,org.eclipse.equinox.p2.metadata,2.1.0.v20110510,"org.eclipse.equinox.p2.metadata",1330882367648 +started,bundle,org.eclipse.equinox.p2.metadata.repository,1.2.0.v20110511-1359,"org.eclipse.equinox.p2.metadata.repository",1330882367651 +started,bundle,org.eclipse.equinox.p2.operations,2.1.0.v20110511-1821,"org.eclipse.equinox.p2.operations",1330882367652 +started,bundle,org.eclipse.equinox.p2.reconciler.dropins,1.1.100.v20110510,"org.eclipse.equinox.p2.reconciler.dropins",1330882367655 +started,bundle,org.eclipse.equinox.p2.repository,2.1.0.v20110601,"org.eclipse.equinox.p2.repository",1330882367656 +started,bundle,org.eclipse.equinox.p2.ui.sdk.scheduler,1.0.100.v20110502-1955,"org.eclipse.equinox.p2.ui.sdk.scheduler",1330882367657 +started,bundle,org.eclipse.equinox.p2.updatechecker,1.1.200.v20110502-1955,"org.eclipse.equinox.p2.updatechecker",1330882367658 +started,bundle,org.eclipse.equinox.preferences,3.4.1.R37x_v20110725,"org.eclipse.equinox.preferences",1330882367661 +started,bundle,org.eclipse.equinox.registry,3.5.101.R37x_v20110810-1611,"org.eclipse.equinox.registry",1330882367662 +started,bundle,org.eclipse.equinox.security,1.1.1.R37x_v20110822-1018,"org.eclipse.equinox.security",1330882367665 +started,bundle,org.eclipse.equinox.util,1.0.300.v20110502,"org.eclipse.equinox.util",1330882367667 +started,bundle,org.eclipse.help,3.5.100.v20110426,"org.eclipse.help",1330882367669 +started,bundle,org.eclipse.jface,3.7.0.I20110522-1430,"org.eclipse.jface",1330882367671 +started,bundle,org.eclipse.jgit,1.1.0.201109151100-r,"org.eclipse.jgit",1330882367672 +started,bundle,org.eclipse.jsch.core,1.1.300.I20110514-0800,"org.eclipse.jsch.core",1330882367674 +started,bundle,org.eclipse.linuxtools.cdt.autotools.core,1.0.2.201108301805,"org.eclipse.linuxtools.cdt.autotools.core",1330882367691 +started,bundle,org.eclipse.ltk.core.refactoring,3.5.201.r371_v20110824-0800,"org.eclipse.ltk.core.refactoring",1330882367693 +started,bundle,org.eclipse.ltk.ui.refactoring,3.6.0.v20110505-0800,"org.eclipse.ltk.ui.refactoring",1330882367695 +started,bundle,org.eclipse.mylyn.bugzilla.core,3.6.2.v20110903-0100,"org.eclipse.mylyn.bugzilla.core",1330882367698 +started,bundle,org.eclipse.mylyn.bugzilla.ui,3.6.0.v20110608-1400,"org.eclipse.mylyn.bugzilla.ui",1330882367699 +started,bundle,org.eclipse.mylyn.commons.identity,0.8.0.v20110608-1400,"org.eclipse.mylyn.commons.identity",1330882367701 +started,bundle,org.eclipse.mylyn.commons.net,3.6.0.v20110608-1400,"org.eclipse.mylyn.commons.net",1330882367701 +started,bundle,org.eclipse.mylyn.commons.ui,3.6.1.v20110720-0100,"org.eclipse.mylyn.commons.ui",1330882367703 +started,bundle,org.eclipse.mylyn.context.core,3.6.1.v20110720-0100,"org.eclipse.mylyn.context.core",1330882367705 +started,bundle,org.eclipse.mylyn.context.ui,3.6.0.v20110608-1400,"org.eclipse.mylyn.context.ui",1330882367708 +started,bundle,org.eclipse.mylyn.monitor.ui,3.6.0.v20110608-1400,"org.eclipse.mylyn.monitor.ui",1330882367710 +started,bundle,org.eclipse.mylyn.tasks.ui,3.6.2.v20110826-0100,"org.eclipse.mylyn.tasks.ui",1330882367712 +started,bundle,org.eclipse.mylyn.team.ui,3.6.1.v20110825-0100,"org.eclipse.mylyn.team.ui",1330882367714 +started,bundle,org.eclipse.search,3.7.0.v20110505-0800,"org.eclipse.search",1330882367717 +started,bundle,org.eclipse.team.core,3.6.0.I20110525-0800,"org.eclipse.team.core",1330882367719 +started,bundle,org.eclipse.team.cvs.core,3.3.400.I20110510-0800,"org.eclipse.team.cvs.core",1330882367721 +started,bundle,org.eclipse.team.cvs.ui,3.3.400.I20110510-0800,"org.eclipse.team.cvs.ui",1330882367723 +started,bundle,org.eclipse.team.ui,3.6.100.I20110525-0800,"org.eclipse.team.ui",1330882367725 +started,bundle,org.eclipse.tm.terminal,3.1.1.R33x_v201107181530,"org.eclipse.tm.terminal",1330882367728 +started,bundle,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui",1330882367732 +started,bundle,org.eclipse.ui.console,3.5.100.v20110511,"org.eclipse.ui.console",1330882367733 +started,bundle,org.eclipse.ui.editors,3.7.0.v20110517-0800,"org.eclipse.ui.editors",1330882367733 +started,bundle,org.eclipse.ui.forms,3.5.100.v20110425,"org.eclipse.ui.forms",1330882367736 +started,bundle,org.eclipse.ui.ide,3.7.0.v20110809-1737,"org.eclipse.ui.ide",1330882367739 +started,bundle,org.eclipse.ui.navigator,3.5.100.v20110809-2227,"org.eclipse.ui.navigator",1330882367740 +started,bundle,org.eclipse.ui.navigator.resources,3.4.300.I20110421-1800,"org.eclipse.ui.navigator.resources",1330882367742 +started,bundle,org.eclipse.ui.net,1.2.100.I20110511-0800,"org.eclipse.ui.net",1330882367744 +started,bundle,org.eclipse.ui.views,3.6.0.I20110412-0800,"org.eclipse.ui.views",1330882367746 +started,bundle,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"org.eclipse.ui.workbench",1330882367748 +started,bundle,org.eclipse.ui.workbench.texteditor,3.7.0.v20110505-0800,"org.eclipse.ui.workbench.texteditor",1330882367751 +started,bundle,org.eclipse.update.configurator,3.3.100.v20100512,"org.eclipse.update.configurator",1330882367753 +started,bundle,org.eclipse.update.core,3.2.500.v20110330,"org.eclipse.update.core",1330882367755 +started,bundle,org.eclipse.update.scheduler,3.2.300.v20100512,"org.eclipse.update.scheduler",1330882367757 +started,bundle,org.eclipse.tm.terminal.view,2.2.0.v201103142315,"org.eclipse.tm.terminal.view",1330882367759 +started,bundle,org.eclipse.cdt.cross.arm.gnu,0.5.4.201111262136,"org.eclipse.cdt.cross.arm.gnu",1330882367773 +os,sysinfo,,,"win32",1330882367783 +arch,sysinfo,,,"x86",1330882367783 +ws,sysinfo,,,"win32",1330882367783 +locale,sysinfo,,,"de_DE",1330882367783 +processors,sysinfo,,,"2",1330882367783 +java.runtime.name,sysinfo,,,"Java(TM) SE Runtime Environment",1330882367783 +java.runtime.version,sysinfo,,,"1.6.0_24-b07",1330882367783 +java.specification.name,sysinfo,,,"Java Platform API Specification",1330882367783 +java.specification.vendor,sysinfo,,,"Sun Microsystems Inc.",1330882367783 +java.specification.version,sysinfo,,,"1.6",1330882367783 +java.vendor,sysinfo,,,"Sun Microsystems Inc.",1330882367783 +java.version,sysinfo,,,"1.6.0_24",1330882367783 +java.vm.info,sysinfo,,,"mixed mode, sharing",1330882367783 +java.vm.name,sysinfo,,,"Java HotSpot(TM) Client VM",1330882367783 +java.vm.specification.name,sysinfo,,,"Java Virtual Machine Specification",1330882367783 +java.vm.specification.vendor,sysinfo,,,"Sun Microsystems Inc.",1330882367783 +java.vm.specification.version,sysinfo,,,"1.0",1330882367783 +java.vm.vendor,sysinfo,,,"Sun Microsystems Inc.",1330882367783 +java.vm.version,sysinfo,,,"19.1-b02",1330882367783 +activated,view,org.eclipse.ui.navigator.resources,3.4.300.I20110421-1800,"org.eclipse.ui.navigator.ProjectExplorer",1330882379243 +started,bundle,org.eclipse.compare,3.5.201.R37x_v20110817-0800,"org.eclipse.compare",1330882380066 +executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.refresh",1330882382401 +opened,view,org.eclipse.ui.console,3.5.100.v20110511,"org.eclipse.ui.console.ConsoleView",1330882390091 +activated,view,org.eclipse.ui.console,3.5.100.v20110511,"org.eclipse.ui.console.ConsoleView",1330882390393 +started,bundle,org.eclipse.cdt.managedbuilder.gnu.ui,8.0.1.201109151620,"org.eclipse.cdt.managedbuilder.gnu.ui",1330882391410 +started,bundle,org.eclipse.debug.ui,3.7.101.v20110817_r371,"org.eclipse.debug.ui",1330882419122 +started,bundle,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools",1330882419136 +started,bundle,org.eclipse.core.externaltools,1.0.100.v20110506,"org.eclipse.core.externaltools",1330882420703 +started,bundle,org.eclipse.cdt.debug.mi.ui,6.1.0.201109151620,"org.eclipse.cdt.debug.mi.ui",1330882421019 +started,bundle,org.eclipse.cdt.dsf,2.2.0.201109151620,"org.eclipse.cdt.dsf",1330882421026 +started,bundle,org.eclipse.cdt.dsf.gdb,4.0.1.201109151620,"org.eclipse.cdt.dsf.gdb",1330882421030 +started,bundle,org.eclipse.cdt.dsf.gdb.ui,2.2.1.201109151620,"org.eclipse.cdt.dsf.gdb.ui",1330882421034 +started,bundle,org.eclipse.cdt.debug.core,7.1.0.201109151620,"org.eclipse.cdt.debug.core",1330882421109 +started,bundle,org.eclipse.cdt.debug.mi.core,7.1.1.201109151620,"org.eclipse.cdt.debug.mi.core",1330882421118 +activated,view,org.eclipse.ui.navigator.resources,3.4.300.I20110421-1800,"org.eclipse.ui.navigator.ProjectExplorer",1330882426397 +executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.refresh",1330882429699 +deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882443009 +activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882447118 +deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882451242 +started,bundle,org.eclipse.cdt.managedbuilder.ui,8.0.0.201109151620,"org.eclipse.cdt.managedbuilder.ui",1330882456757 +activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882467909 +executed,command,org.eclipse.ui,3.7.0.I20110602-0100,"org.eclipse.ui.file.properties",1330882468011 +activated,editor,org.eclipse.cdt.ui,5.3.1.201109151620,"org.eclipse.cdt.ui.editor.CEditor",1330882470393 +started,bundle,org.eclipse.cdt.debug.ui,7.1.1.201109151620,"org.eclipse.cdt.debug.ui",1330882575903 +deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882577871 +activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882580835 +activated,view,org.eclipse.tm.terminal.view,2.2.0.v201103142315,"org.eclipse.tm.terminal.view.TerminalView",1330882585577 +started,bundle,org.eclipse.tm.terminal.serial,2.1.0.v201101042155,"org.eclipse.tm.terminal.serial",1330882586666 +executed,command,org.eclipse.ui.externaltools,3.2.0.v20110506,"org.eclipse.ui.externaltools.ExternalToolMenuDelegateToolbar",1330882592915 +deactivated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882593191 +activated,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882596145 +activated,editor,org.eclipse.cdt.ui,5.3.1.201109151620,"org.eclipse.cdt.ui.editor.CEditor",1330882598392 +started,bundle,org.eclipse.cdt.mylyn.ui,3.6.0.v20110608-1400,"org.eclipse.cdt.mylyn.ui",1330882602023 +closed,workbench,org.eclipse.ui.workbench,3.7.0.I20110519-0100,"",1330882602237 +stopped,bundle,org.eclipse.cdt.build.crossgcc,1.0.0.201109151620,"org.eclipse.cdt.build.crossgcc",1330882603414 +stopped,bundle,org.eclipse.cdt.codan.checkers.ui,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers.ui",1330882603417 +stopped,bundle,org.eclipse.cdt.codan.checkers,1.0.0.201109151620,"org.eclipse.cdt.codan.checkers",1330882603421 +stopped,bundle,org.eclipse.cdt.codan.ui.cxx,2.0.0.201109151620,"org.eclipse.cdt.codan.ui.cxx",1330882603421 +stopped,bundle,org.eclipse.cdt.codan.core.cxx,1.0.0.201109151620,"org.eclipse.cdt.codan.core.cxx",1330882603421 +stopped,bundle,org.eclipse.cdt.launch.remote,2.3.0.201109151620,"org.eclipse.cdt.launch.remote",1330882603426 +stopped,bundle,org.eclipse.cdt.debug.mi.ui,6.1.0.201109151620,"org.eclipse.cdt.debug.mi.ui",1330882603426 +stopped,bundle,org.eclipse.cdt.debug.mi.core,7.1.1.201109151620,"org.eclipse.cdt.debug.mi.core",1330882603426 +stopped,bundle,org.eclipse.cdt.debug.ui.memory.memorybrowser,1.2.100.201109151620,"org.eclipse.cdt.debug.ui.memory.memorybrowser",1330882603428 +stopped,bundle,org.eclipse.cdt.debug.ui.memory.search,1.2.0.201109151620,"org.eclipse.cdt.debug.ui.memory.search",1330882603431 +stopped,bundle,org.eclipse.cdt.dsf.gdb.ui,2.2.1.201109151620,"org.eclipse.cdt.dsf.gdb.ui",1330882603431 +stopped,bundle,org.eclipse.cdt.dsf.ui,2.2.0.201109151620,"org.eclipse.cdt.dsf.ui",1330882603436 +stopped,bundle,org.eclipse.cdt.gdb.ui,7.0.0.201109151620,"org.eclipse.cdt.gdb.ui",1330882603506 +stopped,bundle,org.eclipse.cdt.dsf.gdb,4.0.1.201109151620,"org.eclipse.cdt.dsf.gdb",1330882603506 +stopped,bundle,org.eclipse.cdt.launch,7.0.0.201109151620,"org.eclipse.cdt.launch",1330882603509 +stopped,bundle,org.eclipse.cdt.debug.ui,7.1.1.201109151620,"org.eclipse.cdt.debug.ui",1330882603509 diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.tm.terminal.view/dialog_settings.xml b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.tm.terminal.view/dialog_settings.xml index ad1d9eea..44c4660f 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.tm.terminal.view/dialog_settings.xml +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.tm.terminal.view/dialog_settings.xml @@ -3,8 +3,8 @@
- +
diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml index 76ffe01f..71fd8c82 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml @@ -1,5 +1,5 @@ - + @@ -14,12 +14,12 @@ - + - + @@ -28,10 +28,16 @@ - + + + + + + + @@ -45,14 +51,14 @@ - + - + @@ -68,7 +74,7 @@ - + @@ -96,7 +102,7 @@ - + @@ -184,7 +190,7 @@ - + @@ -218,7 +224,21 @@ - + + + + + + + + + + + + + + + @@ -236,6 +256,12 @@ + + + + + + @@ -275,11 +301,5 @@ - - - - - - \ No newline at end of file diff --git a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/Boot/.cproject b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/Boot/.cproject index addd65d3..41f396c7 100644 --- a/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/Boot/.cproject +++ b/Target/Demo/ARMCM3_STM32_Olimex_STM32P103_GCC_Eclipse/Boot/.cproject @@ -49,7 +49,7 @@